You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2022/05/21 19:12:32 UTC
[hop] branch master updated: HOP-3956: fix patch method and add tests
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/master by this push:
new 0a1c5faaad HOP-3956: fix patch method and add tests
new 4d1be7ccd1 Merge pull request #1496 from hansva/master
0a1c5faaad is described below
commit 0a1c5faaad66d2d4afce5223a25fc5261a563280
Author: Hans Van Akelyen <ha...@gmail.com>
AuthorDate: Sat May 21 12:48:15 2022 +0200
HOP-3956: fix patch method and add tests
---
assemblies/core/lib/pom.xml | 2 +-
assemblies/lib/pom.xml | 2 +-
engine/pom.xml | 2 +-
integration-tests/http/0007-rest-client-post.hpl | 187 +++++++++++++++++++++
integration-tests/http/0008-rest-client-put.hpl | 187 +++++++++++++++++++++
integration-tests/http/0009-rest-client-delete.hpl | 187 +++++++++++++++++++++
integration-tests/http/0010-rest-client-head.hpl | 187 +++++++++++++++++++++
.../http/0011-rest-client-options.hpl | 187 +++++++++++++++++++++
integration-tests/http/0012-rest-client-patch.hpl | 187 +++++++++++++++++++++
.../http/main-0007-rest-client-post.hwf | 103 ++++++++++++
.../http/main-0008-rest-client-put.hwf | 103 ++++++++++++
.../http/main-0009-rest-client-delete.hwf | 103 ++++++++++++
.../http/main-0010-rest-client-head.hwf | 103 ++++++++++++
.../http/main-0011-rest-client-options.hwf | 103 ++++++++++++
.../http/main-0012-rest-client-patch.hwf | 103 ++++++++++++
.../apache/hop/pipeline/transforms/rest/Rest.java | 45 ++++-
16 files changed, 1781 insertions(+), 10 deletions(-)
diff --git a/assemblies/core/lib/pom.xml b/assemblies/core/lib/pom.xml
index d8950d3c87..d9b51d980d 100644
--- a/assemblies/core/lib/pom.xml
+++ b/assemblies/core/lib/pom.xml
@@ -43,7 +43,7 @@
<blueprints-core.version>2.6.0</blueprints-core.version>
<commons-configuration.version>1.10</commons-configuration.version>
<flexjson.version>2.1</flexjson.version>
- <jersey-multipart.version>1.19.1</jersey-multipart.version>
+ <jersey-multipart.version>1.19.4</jersey-multipart.version>
<mimepull.version>1.9.3</mimepull.version>
<jsr311-api.version>1.1.1</jsr311-api.version>
<enunciate-jersey-rt.version>1.27</enunciate-jersey-rt.version>
diff --git a/assemblies/lib/pom.xml b/assemblies/lib/pom.xml
index abcf4350e4..3432c113a0 100644
--- a/assemblies/lib/pom.xml
+++ b/assemblies/lib/pom.xml
@@ -41,7 +41,7 @@
<blueprints-core.version>2.6.0</blueprints-core.version>
<commons-configuration.version>1.10</commons-configuration.version>
<flexjson.version>2.1</flexjson.version>
- <jersey-multipart.version>1.19.1</jersey-multipart.version>
+ <jersey-multipart.version>1.19.4</jersey-multipart.version>
<mimepull.version>1.9.3</mimepull.version>
<jsr311-api.version>1.1.1</jsr311-api.version>
<enunciate-jersey-rt.version>1.27</enunciate-jersey-rt.version>
diff --git a/engine/pom.xml b/engine/pom.xml
index 20c2c90393..f1b2ed12d4 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -42,7 +42,7 @@
<!-- Third-party dependencies -->
<commons-validator.version>1.3.1</commons-validator.version>
<commons-collections4.version>4.4</commons-collections4.version>
- <jersey-apache-client.version>1.19.1</jersey-apache-client.version>
+ <jersey-apache-client.version>1.19.4</jersey-apache-client.version>
<jersey-bundle.version>1.19.4</jersey-bundle.version>
<olap4j.version>1.2.0</olap4j.version>
<olap4j-xmla.version>1.2.0</olap4j-xmla.version>
diff --git a/integration-tests/http/0007-rest-client-post.hpl b/integration-tests/http/0007-rest-client-post.hpl
new file mode 100644
index 0000000000..4dea9bf17d
--- /dev/null
+++ b/integration-tests/http/0007-rest-client-post.hpl
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>0007-rest-client-post</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+ <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+ <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/05/21 11:26:33.851</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/05/21 11:26:33.851</modified_date>
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
+ <is_key_private>N</is_key_private>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Generate rows</from>
+ <to>REST client</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>REST client</from>
+ <to>check result</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>check result</from>
+ <to>Abort</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Abort</name>
+ <type>Abort</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <abort_option>ABORT_WITH_ERROR</abort_option>
+ <always_log_rows>Y</always_log_rows>
+ <row_threshold>0</row_threshold>
+ <attributes/>
+ <GUI>
+ <xloc>592</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Generate rows</name>
+ <type>RowGenerator</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <fields>
+</fields>
+ <interval_in_ms>5000</interval_in_ms>
+ <last_time_field>FiveSecondsAgo</last_time_field>
+ <never_ending>N</never_ending>
+ <limit>1</limit>
+ <row_time_field>now</row_time_field>
+ <attributes/>
+ <GUI>
+ <xloc>112</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>REST client</name>
+ <type>Rest</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <applicationType>TEXT PLAIN</applicationType>
+ <method>POST</method>
+ <url>http://${HOSTNAME}/post</url>
+ <urlInField>N</urlInField>
+ <dynamicMethod>N</dynamicMethod>
+ <methodFieldName/>
+ <urlField/>
+ <bodyField/>
+ <httpLogin/>
+ <httpPassword>Encrypted </httpPassword>
+ <proxyHost/>
+ <proxyPort/>
+ <preemptive>N</preemptive>
+ <trustStoreFile/>
+ <trustStorePassword>Encrypted </trustStorePassword>
+ <ignoreSsl>N</ignoreSsl>
+ <headers>
+ </headers>
+ <parameters>
+ </parameters>
+ <matrixParameters>
+ </matrixParameters>
+ <result>
+ <name>result</name>
+ <code>result_status</code>
+ <response_time/>
+ <response_header/>
+ </result>
+ <attributes/>
+ <GUI>
+ <xloc>272</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>check result</name>
+ <type>FilterRows</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>Y</negated>
+ <leftvalue>result_status</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>200</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
+ <attributes/>
+ <GUI>
+ <xloc>432</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git a/integration-tests/http/0008-rest-client-put.hpl b/integration-tests/http/0008-rest-client-put.hpl
new file mode 100644
index 0000000000..ff83744d19
--- /dev/null
+++ b/integration-tests/http/0008-rest-client-put.hpl
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>0008-rest-client-put</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+ <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+ <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/05/21 11:26:33.851</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/05/21 11:26:33.851</modified_date>
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
+ <is_key_private>N</is_key_private>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Generate rows</from>
+ <to>REST client</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>REST client</from>
+ <to>check result</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>check result</from>
+ <to>Abort</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Abort</name>
+ <type>Abort</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <abort_option>ABORT_WITH_ERROR</abort_option>
+ <always_log_rows>Y</always_log_rows>
+ <row_threshold>0</row_threshold>
+ <attributes/>
+ <GUI>
+ <xloc>592</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Generate rows</name>
+ <type>RowGenerator</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <fields>
+</fields>
+ <interval_in_ms>5000</interval_in_ms>
+ <last_time_field>FiveSecondsAgo</last_time_field>
+ <never_ending>N</never_ending>
+ <limit>1</limit>
+ <row_time_field>now</row_time_field>
+ <attributes/>
+ <GUI>
+ <xloc>112</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>REST client</name>
+ <type>Rest</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <applicationType>TEXT PLAIN</applicationType>
+ <method>PUT</method>
+ <url>http://${HOSTNAME}/put</url>
+ <urlInField>N</urlInField>
+ <dynamicMethod>N</dynamicMethod>
+ <methodFieldName/>
+ <urlField/>
+ <bodyField/>
+ <httpLogin/>
+ <httpPassword>Encrypted </httpPassword>
+ <proxyHost/>
+ <proxyPort/>
+ <preemptive>N</preemptive>
+ <trustStoreFile/>
+ <trustStorePassword>Encrypted </trustStorePassword>
+ <ignoreSsl>N</ignoreSsl>
+ <headers>
+ </headers>
+ <parameters>
+ </parameters>
+ <matrixParameters>
+ </matrixParameters>
+ <result>
+ <name>result</name>
+ <code>result_status</code>
+ <response_time/>
+ <response_header/>
+ </result>
+ <attributes/>
+ <GUI>
+ <xloc>272</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>check result</name>
+ <type>FilterRows</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>Y</negated>
+ <leftvalue>result_status</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>200</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
+ <attributes/>
+ <GUI>
+ <xloc>432</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git a/integration-tests/http/0009-rest-client-delete.hpl b/integration-tests/http/0009-rest-client-delete.hpl
new file mode 100644
index 0000000000..f5dd098dec
--- /dev/null
+++ b/integration-tests/http/0009-rest-client-delete.hpl
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>0009-rest-client-delete</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+ <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+ <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/05/21 11:26:33.851</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/05/21 11:26:33.851</modified_date>
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
+ <is_key_private>N</is_key_private>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Generate rows</from>
+ <to>REST client</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>REST client</from>
+ <to>check result</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>check result</from>
+ <to>Abort</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Abort</name>
+ <type>Abort</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <abort_option>ABORT_WITH_ERROR</abort_option>
+ <always_log_rows>Y</always_log_rows>
+ <row_threshold>0</row_threshold>
+ <attributes/>
+ <GUI>
+ <xloc>592</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Generate rows</name>
+ <type>RowGenerator</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <fields>
+</fields>
+ <interval_in_ms>5000</interval_in_ms>
+ <last_time_field>FiveSecondsAgo</last_time_field>
+ <never_ending>N</never_ending>
+ <limit>1</limit>
+ <row_time_field>now</row_time_field>
+ <attributes/>
+ <GUI>
+ <xloc>112</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>REST client</name>
+ <type>Rest</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <applicationType>TEXT PLAIN</applicationType>
+ <method>DELETE</method>
+ <url>http://${HOSTNAME}/delete</url>
+ <urlInField>N</urlInField>
+ <dynamicMethod>N</dynamicMethod>
+ <methodFieldName/>
+ <urlField/>
+ <bodyField/>
+ <httpLogin/>
+ <httpPassword>Encrypted </httpPassword>
+ <proxyHost/>
+ <proxyPort/>
+ <preemptive>N</preemptive>
+ <trustStoreFile/>
+ <trustStorePassword>Encrypted </trustStorePassword>
+ <ignoreSsl>N</ignoreSsl>
+ <headers>
+ </headers>
+ <parameters>
+ </parameters>
+ <matrixParameters>
+ </matrixParameters>
+ <result>
+ <name>result</name>
+ <code>result_status</code>
+ <response_time/>
+ <response_header/>
+ </result>
+ <attributes/>
+ <GUI>
+ <xloc>272</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>check result</name>
+ <type>FilterRows</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>Y</negated>
+ <leftvalue>result_status</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>200</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
+ <attributes/>
+ <GUI>
+ <xloc>432</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git a/integration-tests/http/0010-rest-client-head.hpl b/integration-tests/http/0010-rest-client-head.hpl
new file mode 100644
index 0000000000..e2a7cca156
--- /dev/null
+++ b/integration-tests/http/0010-rest-client-head.hpl
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>0010-rest-client-head</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+ <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+ <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/05/21 11:26:33.851</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/05/21 11:26:33.851</modified_date>
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
+ <is_key_private>N</is_key_private>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Generate rows</from>
+ <to>REST client</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>REST client</from>
+ <to>check result</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>check result</from>
+ <to>Abort</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Abort</name>
+ <type>Abort</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <abort_option>ABORT_WITH_ERROR</abort_option>
+ <always_log_rows>Y</always_log_rows>
+ <row_threshold>0</row_threshold>
+ <attributes/>
+ <GUI>
+ <xloc>592</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Generate rows</name>
+ <type>RowGenerator</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <fields>
+</fields>
+ <interval_in_ms>5000</interval_in_ms>
+ <last_time_field>FiveSecondsAgo</last_time_field>
+ <never_ending>N</never_ending>
+ <limit>1</limit>
+ <row_time_field>now</row_time_field>
+ <attributes/>
+ <GUI>
+ <xloc>112</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>REST client</name>
+ <type>Rest</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <applicationType>TEXT PLAIN</applicationType>
+ <method>HEAD</method>
+ <url>http://${HOSTNAME}/head</url>
+ <urlInField>N</urlInField>
+ <dynamicMethod>N</dynamicMethod>
+ <methodFieldName/>
+ <urlField/>
+ <bodyField/>
+ <httpLogin/>
+ <httpPassword>Encrypted </httpPassword>
+ <proxyHost/>
+ <proxyPort/>
+ <preemptive>N</preemptive>
+ <trustStoreFile/>
+ <trustStorePassword>Encrypted </trustStorePassword>
+ <ignoreSsl>N</ignoreSsl>
+ <headers>
+ </headers>
+ <parameters>
+ </parameters>
+ <matrixParameters>
+ </matrixParameters>
+ <result>
+ <name>result</name>
+ <code>result_status</code>
+ <response_time/>
+ <response_header/>
+ </result>
+ <attributes/>
+ <GUI>
+ <xloc>272</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>check result</name>
+ <type>FilterRows</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>Y</negated>
+ <leftvalue>result_status</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>200</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
+ <attributes/>
+ <GUI>
+ <xloc>432</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git a/integration-tests/http/0011-rest-client-options.hpl b/integration-tests/http/0011-rest-client-options.hpl
new file mode 100644
index 0000000000..5058d40209
--- /dev/null
+++ b/integration-tests/http/0011-rest-client-options.hpl
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>0011-rest-client-option</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+ <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+ <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/05/21 11:26:33.851</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/05/21 11:26:33.851</modified_date>
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
+ <is_key_private>N</is_key_private>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Generate rows</from>
+ <to>REST client</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>REST client</from>
+ <to>check result</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>check result</from>
+ <to>Abort</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Abort</name>
+ <type>Abort</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <abort_option>ABORT_WITH_ERROR</abort_option>
+ <always_log_rows>Y</always_log_rows>
+ <row_threshold>0</row_threshold>
+ <attributes/>
+ <GUI>
+ <xloc>592</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Generate rows</name>
+ <type>RowGenerator</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <fields>
+</fields>
+ <interval_in_ms>5000</interval_in_ms>
+ <last_time_field>FiveSecondsAgo</last_time_field>
+ <never_ending>N</never_ending>
+ <limit>1</limit>
+ <row_time_field>now</row_time_field>
+ <attributes/>
+ <GUI>
+ <xloc>112</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>REST client</name>
+ <type>Rest</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <applicationType>TEXT PLAIN</applicationType>
+ <method>OPTIONS</method>
+ <url>http://${HOSTNAME}/get</url>
+ <urlInField>N</urlInField>
+ <dynamicMethod>N</dynamicMethod>
+ <methodFieldName/>
+ <urlField/>
+ <bodyField/>
+ <httpLogin/>
+ <httpPassword>Encrypted </httpPassword>
+ <proxyHost/>
+ <proxyPort/>
+ <preemptive>N</preemptive>
+ <trustStoreFile/>
+ <trustStorePassword>Encrypted </trustStorePassword>
+ <ignoreSsl>N</ignoreSsl>
+ <headers>
+ </headers>
+ <parameters>
+ </parameters>
+ <matrixParameters>
+ </matrixParameters>
+ <result>
+ <name>result</name>
+ <code>result_status</code>
+ <response_time/>
+ <response_header/>
+ </result>
+ <attributes/>
+ <GUI>
+ <xloc>272</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>check result</name>
+ <type>FilterRows</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>Y</negated>
+ <leftvalue>result_status</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>200</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
+ <attributes/>
+ <GUI>
+ <xloc>432</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git a/integration-tests/http/0012-rest-client-patch.hpl b/integration-tests/http/0012-rest-client-patch.hpl
new file mode 100644
index 0000000000..f03b80f4ed
--- /dev/null
+++ b/integration-tests/http/0012-rest-client-patch.hpl
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<pipeline>
+ <info>
+ <name>0012-rest-client-patch</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <pipeline_version/>
+ <pipeline_type>Normal</pipeline_type>
+ <parameters>
+ </parameters>
+ <capture_transform_performance>N</capture_transform_performance>
+ <transform_performance_capturing_delay>1000</transform_performance_capturing_delay>
+ <transform_performance_capturing_size_limit>100</transform_performance_capturing_size_limit>
+ <created_user>-</created_user>
+ <created_date>2022/05/21 11:26:33.851</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2022/05/21 11:26:33.851</modified_date>
+ <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key>
+ <is_key_private>N</is_key_private>
+ </info>
+ <notepads>
+ </notepads>
+ <order>
+ <hop>
+ <from>Generate rows</from>
+ <to>REST client</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>REST client</from>
+ <to>check result</to>
+ <enabled>Y</enabled>
+ </hop>
+ <hop>
+ <from>check result</from>
+ <to>Abort</to>
+ <enabled>Y</enabled>
+ </hop>
+ </order>
+ <transform>
+ <name>Abort</name>
+ <type>Abort</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <abort_option>ABORT_WITH_ERROR</abort_option>
+ <always_log_rows>Y</always_log_rows>
+ <row_threshold>0</row_threshold>
+ <attributes/>
+ <GUI>
+ <xloc>592</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>Generate rows</name>
+ <type>RowGenerator</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <fields>
+</fields>
+ <interval_in_ms>5000</interval_in_ms>
+ <last_time_field>FiveSecondsAgo</last_time_field>
+ <never_ending>N</never_ending>
+ <limit>1</limit>
+ <row_time_field>now</row_time_field>
+ <attributes/>
+ <GUI>
+ <xloc>112</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>REST client</name>
+ <type>Rest</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <applicationType>TEXT PLAIN</applicationType>
+ <method>PATCH</method>
+ <url>http://${HOSTNAME}/patch</url>
+ <urlInField>N</urlInField>
+ <dynamicMethod>N</dynamicMethod>
+ <methodFieldName/>
+ <urlField/>
+ <bodyField/>
+ <httpLogin/>
+ <httpPassword>Encrypted </httpPassword>
+ <proxyHost/>
+ <proxyPort/>
+ <preemptive>N</preemptive>
+ <trustStoreFile/>
+ <trustStorePassword>Encrypted </trustStorePassword>
+ <ignoreSsl>N</ignoreSsl>
+ <headers>
+ </headers>
+ <parameters>
+ </parameters>
+ <matrixParameters>
+ </matrixParameters>
+ <result>
+ <name>result</name>
+ <code>result_status</code>
+ <response_time/>
+ <response_header/>
+ </result>
+ <attributes/>
+ <GUI>
+ <xloc>272</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform>
+ <name>check result</name>
+ <type>FilterRows</type>
+ <description/>
+ <distribute>Y</distribute>
+ <custom_distribution/>
+ <copies>1</copies>
+ <partitioning>
+ <method>none</method>
+ <schema_name/>
+ </partitioning>
+ <send_true_to/>
+ <send_false_to/>
+ <compare>
+ <condition>
+ <negated>Y</negated>
+ <leftvalue>result_status</leftvalue>
+ <function>=</function>
+ <rightvalue/>
+ <value>
+ <name>constant</name>
+ <type>Integer</type>
+ <text>200</text>
+ <length>-1</length>
+ <precision>0</precision>
+ <isnull>N</isnull>
+ <mask>#</mask>
+ </value>
+ </condition>
+ </compare>
+ <attributes/>
+ <GUI>
+ <xloc>432</xloc>
+ <yloc>64</yloc>
+ </GUI>
+ </transform>
+ <transform_error_handling>
+ </transform_error_handling>
+ <attributes/>
+</pipeline>
diff --git a/integration-tests/http/main-0007-rest-client-post.hwf b/integration-tests/http/main-0007-rest-client-post.hwf
new file mode 100644
index 0000000000..aadb9c885e
--- /dev/null
+++ b/integration-tests/http/main-0007-rest-client-post.hwf
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-0007-rest-client-post</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <workflow_status>0</workflow_status>
+ <created_user>-</created_user>
+ <created_date>2021/09/27 10:46:50.001</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2021/09/27 10:46:50.001</modified_date>
+ <parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <default_value>localhost</default_value>
+ <description/>
+ </parameter>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <intervalSeconds>0</intervalSeconds>
+ <intervalMinutes>60</intervalMinutes>
+ <hour>12</hour>
+ <minutes>0</minutes>
+ <weekDay>1</weekDay>
+ <DayOfMonth>1</DayOfMonth>
+ <parallel>N</parallel>
+ <xloc>50</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>0007-rest-client-post.hpl</name>
+ <description/>
+ <type>PIPELINE</type>
+ <attributes/>
+ <filename>${PROJECT_HOME}/0007-rest-client-post.hpl</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <clear_rows>N</clear_rows>
+ <clear_files>N</clear_files>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Basic</loglevel>
+ <set_append_logfile>N</set_append_logfile>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <stream_name/>
+ <value>${HOSTNAME}</value>
+ </parameter>
+ </parameters>
+ <parallel>N</parallel>
+ <xloc>310</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Start</from>
+ <to>0007-rest-client-post.hpl</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git a/integration-tests/http/main-0008-rest-client-put.hwf b/integration-tests/http/main-0008-rest-client-put.hwf
new file mode 100644
index 0000000000..76362fa4eb
--- /dev/null
+++ b/integration-tests/http/main-0008-rest-client-put.hwf
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-0008-rest-client-put</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <workflow_status>0</workflow_status>
+ <created_user>-</created_user>
+ <created_date>2021/09/27 10:46:50.001</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2021/09/27 10:46:50.001</modified_date>
+ <parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <default_value>localhost</default_value>
+ <description/>
+ </parameter>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <intervalSeconds>0</intervalSeconds>
+ <intervalMinutes>60</intervalMinutes>
+ <hour>12</hour>
+ <minutes>0</minutes>
+ <weekDay>1</weekDay>
+ <DayOfMonth>1</DayOfMonth>
+ <parallel>N</parallel>
+ <xloc>50</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>0008-rest-client-put.hpl</name>
+ <description/>
+ <type>PIPELINE</type>
+ <attributes/>
+ <filename>${PROJECT_HOME}/0008-rest-client-put.hpl</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <clear_rows>N</clear_rows>
+ <clear_files>N</clear_files>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Basic</loglevel>
+ <set_append_logfile>N</set_append_logfile>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <stream_name/>
+ <value>${HOSTNAME}</value>
+ </parameter>
+ </parameters>
+ <parallel>N</parallel>
+ <xloc>310</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Start</from>
+ <to>0008-rest-client-put.hpl</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git a/integration-tests/http/main-0009-rest-client-delete.hwf b/integration-tests/http/main-0009-rest-client-delete.hwf
new file mode 100644
index 0000000000..f0f4d757f1
--- /dev/null
+++ b/integration-tests/http/main-0009-rest-client-delete.hwf
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-0009-rest-client-delete</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <workflow_status>0</workflow_status>
+ <created_user>-</created_user>
+ <created_date>2021/09/27 10:46:50.001</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2021/09/27 10:46:50.001</modified_date>
+ <parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <default_value>localhost</default_value>
+ <description/>
+ </parameter>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <intervalSeconds>0</intervalSeconds>
+ <intervalMinutes>60</intervalMinutes>
+ <hour>12</hour>
+ <minutes>0</minutes>
+ <weekDay>1</weekDay>
+ <DayOfMonth>1</DayOfMonth>
+ <parallel>N</parallel>
+ <xloc>50</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>0009-rest-client-delete.hpl</name>
+ <description/>
+ <type>PIPELINE</type>
+ <attributes/>
+ <filename>${PROJECT_HOME}/0009-rest-client-delete.hpl</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <clear_rows>N</clear_rows>
+ <clear_files>N</clear_files>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Basic</loglevel>
+ <set_append_logfile>N</set_append_logfile>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <stream_name/>
+ <value>${HOSTNAME}</value>
+ </parameter>
+ </parameters>
+ <parallel>N</parallel>
+ <xloc>310</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Start</from>
+ <to>0009-rest-client-delete.hpl</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git a/integration-tests/http/main-0010-rest-client-head.hwf b/integration-tests/http/main-0010-rest-client-head.hwf
new file mode 100644
index 0000000000..c8c9cd13ba
--- /dev/null
+++ b/integration-tests/http/main-0010-rest-client-head.hwf
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-0010-rest-client-head</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <workflow_status>0</workflow_status>
+ <created_user>-</created_user>
+ <created_date>2021/09/27 10:46:50.001</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2021/09/27 10:46:50.001</modified_date>
+ <parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <default_value>localhost</default_value>
+ <description/>
+ </parameter>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <intervalSeconds>0</intervalSeconds>
+ <intervalMinutes>60</intervalMinutes>
+ <hour>12</hour>
+ <minutes>0</minutes>
+ <weekDay>1</weekDay>
+ <DayOfMonth>1</DayOfMonth>
+ <parallel>N</parallel>
+ <xloc>50</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>0010-rest-client-head.hpl</name>
+ <description/>
+ <type>PIPELINE</type>
+ <attributes/>
+ <filename>${PROJECT_HOME}/0010-rest-client-head.hpl</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <clear_rows>N</clear_rows>
+ <clear_files>N</clear_files>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Basic</loglevel>
+ <set_append_logfile>N</set_append_logfile>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <stream_name/>
+ <value>${HOSTNAME}</value>
+ </parameter>
+ </parameters>
+ <parallel>N</parallel>
+ <xloc>310</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Start</from>
+ <to>0010-rest-client-head.hpl</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git a/integration-tests/http/main-0011-rest-client-options.hwf b/integration-tests/http/main-0011-rest-client-options.hwf
new file mode 100644
index 0000000000..2c732b04ba
--- /dev/null
+++ b/integration-tests/http/main-0011-rest-client-options.hwf
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-0011-rest-client-options</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <workflow_status>0</workflow_status>
+ <created_user>-</created_user>
+ <created_date>2021/09/27 10:46:50.001</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2021/09/27 10:46:50.001</modified_date>
+ <parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <default_value>localhost</default_value>
+ <description/>
+ </parameter>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <intervalSeconds>0</intervalSeconds>
+ <intervalMinutes>60</intervalMinutes>
+ <hour>12</hour>
+ <minutes>0</minutes>
+ <weekDay>1</weekDay>
+ <DayOfMonth>1</DayOfMonth>
+ <parallel>N</parallel>
+ <xloc>50</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>0011-rest-client-options.hpl</name>
+ <description/>
+ <type>PIPELINE</type>
+ <attributes/>
+ <filename>${PROJECT_HOME}/0011-rest-client-options.hpl</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <clear_rows>N</clear_rows>
+ <clear_files>N</clear_files>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Basic</loglevel>
+ <set_append_logfile>N</set_append_logfile>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <stream_name/>
+ <value>${HOSTNAME}</value>
+ </parameter>
+ </parameters>
+ <parallel>N</parallel>
+ <xloc>310</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Start</from>
+ <to>0011-rest-client-options.hpl</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git a/integration-tests/http/main-0012-rest-client-patch.hwf b/integration-tests/http/main-0012-rest-client-patch.hwf
new file mode 100644
index 0000000000..b8b4a21545
--- /dev/null
+++ b/integration-tests/http/main-0012-rest-client-patch.hwf
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements. See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+-->
+<workflow>
+ <name>main-0012-rest-client-patch</name>
+ <name_sync_with_filename>Y</name_sync_with_filename>
+ <description/>
+ <extended_description/>
+ <workflow_version/>
+ <workflow_status>0</workflow_status>
+ <created_user>-</created_user>
+ <created_date>2021/09/27 10:46:50.001</created_date>
+ <modified_user>-</modified_user>
+ <modified_date>2021/09/27 10:46:50.001</modified_date>
+ <parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <default_value>localhost</default_value>
+ <description/>
+ </parameter>
+ </parameters>
+ <actions>
+ <action>
+ <name>Start</name>
+ <description/>
+ <type>SPECIAL</type>
+ <attributes/>
+ <repeat>N</repeat>
+ <schedulerType>0</schedulerType>
+ <intervalSeconds>0</intervalSeconds>
+ <intervalMinutes>60</intervalMinutes>
+ <hour>12</hour>
+ <minutes>0</minutes>
+ <weekDay>1</weekDay>
+ <DayOfMonth>1</DayOfMonth>
+ <parallel>N</parallel>
+ <xloc>50</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ <action>
+ <name>0012-rest-client-patch.hpl</name>
+ <description/>
+ <type>PIPELINE</type>
+ <attributes/>
+ <filename>${PROJECT_HOME}/0012-rest-client-patch.hpl</filename>
+ <params_from_previous>N</params_from_previous>
+ <exec_per_row>N</exec_per_row>
+ <clear_rows>N</clear_rows>
+ <clear_files>N</clear_files>
+ <set_logfile>N</set_logfile>
+ <logfile/>
+ <logext/>
+ <add_date>N</add_date>
+ <add_time>N</add_time>
+ <loglevel>Basic</loglevel>
+ <set_append_logfile>N</set_append_logfile>
+ <wait_until_finished>Y</wait_until_finished>
+ <create_parent_folder>N</create_parent_folder>
+ <run_configuration>local</run_configuration>
+ <parameters>
+ <pass_all_parameters>Y</pass_all_parameters>
+ <parameter>
+ <name>HOSTNAME</name>
+ <stream_name/>
+ <value>${HOSTNAME}</value>
+ </parameter>
+ </parameters>
+ <parallel>N</parallel>
+ <xloc>310</xloc>
+ <yloc>48</yloc>
+ <attributes_hac/>
+ </action>
+ </actions>
+ <hops>
+ <hop>
+ <from>Start</from>
+ <to>0012-rest-client-patch.hpl</to>
+ <enabled>Y</enabled>
+ <evaluation>Y</evaluation>
+ <unconditional>Y</unconditional>
+ </hop>
+ </hops>
+ <notepads>
+ </notepads>
+ <attributes/>
+</workflow>
diff --git a/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java b/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java
index dad872cab5..5c65fc0c96 100644
--- a/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java
+++ b/plugins/transforms/rest/src/main/java/org/apache/hop/pipeline/transforms/rest/Rest.java
@@ -44,18 +44,25 @@ import org.apache.http.client.CredentialsProvider;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.json.simple.JSONObject;
-import javax.net.ssl.*;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLContext;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.UriBuilder;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.net.HttpURLConnection;
import java.security.KeyManagementException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.cert.CertificateException;
+import java.util.Arrays;
+import java.util.LinkedHashSet;
import java.util.List;
+import java.util.Set;
public class Rest extends BaseTransform<RestMeta, RestData> {
private static final Class<?> PKG = RestMeta.class; // For Translator
@@ -193,6 +200,8 @@ public class Rest extends BaseTransform<RestMeta, RestData> {
} else if (data.method.equals(RestMeta.HTTP_METHOD_OPTIONS)) {
response = builder.options(ClientResponse.class);
} else if (data.method.equals(RestMeta.HTTP_METHOD_PATCH)) {
+ //Workaround to make PATCH work, remove when updating to Jersey 2.X
+ allowMethods("PATCH");
if (null != contentType) {
response =
builder
@@ -321,7 +330,7 @@ public class Rest extends BaseTransform<RestMeta, RestData> {
if (!Utils.isEmpty(data.trustStoreFile) && !meta.isIgnoreSsl()) {
setTrustStoreFile();
}
- if(meta.isIgnoreSsl()){
+ if (meta.isIgnoreSsl()) {
setTrustAll();
}
}
@@ -338,15 +347,16 @@ public class Rest extends BaseTransform<RestMeta, RestData> {
} catch (NoSuchAlgorithmException e) {
throw new HopException(BaseMessages.getString(PKG, "Rest.Error.NoSuchAlgorithm"), e);
} catch (KeyManagementException e) {
- throw new HopException(
- BaseMessages.getString(PKG, "Rest.Error.KeyManagementException"), e);
+ throw new HopException(BaseMessages.getString(PKG, "Rest.Error.KeyManagementException"), e);
}
}
private void setTrustStoreFile() throws HopException {
try (FileInputStream trustFileStream = new FileInputStream(data.trustStoreFile)) {
- SSLContext ctx = HttpClientManager.getSslContextWithTrustStoreFile(trustFileStream, data.trustStorePassword);
+ SSLContext ctx =
+ HttpClientManager.getSslContextWithTrustStoreFile(
+ trustFileStream, data.trustStorePassword);
HostnameVerifier hv = HttpClientManager.getHostnameVerifier(isDebug(), log);
data.config
@@ -364,8 +374,7 @@ public class Rest extends BaseTransform<RestMeta, RestData> {
} catch (IOException e) {
throw new HopException(BaseMessages.getString(PKG, "Rest.Error.IOException"), e);
} catch (KeyManagementException e) {
- throw new HopException(
- BaseMessages.getString(PKG, "Rest.Error.KeyManagementException"), e);
+ throw new HopException(BaseMessages.getString(PKG, "Rest.Error.KeyManagementException"), e);
}
}
@@ -595,4 +604,26 @@ public class Rest extends BaseTransform<RestMeta, RestData> {
data.paramNames = null;
super.dispose();
}
+
+ // Workaround to make PATCH method work, remove when updating to jersey 2.X
+ private static void allowMethods(String... methods) {
+ try {
+ Field methodsField = HttpURLConnection.class.getDeclaredField("methods");
+
+ Field modifiersField = Field.class.getDeclaredField("modifiers");
+ modifiersField.setAccessible(true);
+ modifiersField.setInt(methodsField, methodsField.getModifiers() & ~Modifier.FINAL);
+
+ methodsField.setAccessible(true);
+
+ String[] oldMethods = (String[]) methodsField.get(null);
+ Set<String> methodsSet = new LinkedHashSet<>(Arrays.asList(oldMethods));
+ methodsSet.addAll(Arrays.asList(methods));
+ String[] newMethods = methodsSet.toArray(new String[0]);
+
+ methodsField.set(null /*static field*/, newMethods);
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+ throw new IllegalStateException(e);
+ }
+ }
}