<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Need to create a proxy HTTP service on Talend ESB in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Need-to-create-a-proxy-HTTP-service-on-Talend-ESB/m-p/2215480#M11882</link>
    <description>&lt;P&gt;I figured it out.&amp;nbsp; For future reference, what I did was create a messagingEndpoint component, using the ahc schema (probably any other http type of connector would do the trick).&amp;nbsp; The key is that it doesn't really matter what url you specify on the actual component's configuration dialog.&amp;nbsp; It all can be overridden by editing the headers.&amp;nbsp; So I used a processor node and ended up calling setHeader(). Like so:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;	exchange.getIn().setHeader(Exchange.HTTP_URI, "http://localhost:8080/");
	exchange.getIn().setHeader(Exchange.HTTP_PATH, "my/base/path/goes/here");
	exchange.getIn().setHeader(Exchange.HTTP_METHOD, "POST");
	exchange.getIn().setHeader(Exchange.HTTP_QUERY, "PARAMETER1=" + value1 + "&amp;amp;PARAMETER2=" + value2);&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Aug 2019 17:35:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-29T17:35:38Z</dc:date>
    <item>
      <title>Need to create a proxy HTTP service on Talend ESB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-to-create-a-proxy-HTTP-service-on-Talend-ESB/m-p/2215479#M11881</link>
      <description>&lt;P&gt;I'm fairly new to Talend (ESB or otherwise), so feel free to let me know if there is a better way to accomplish what I'm trying to do.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The problem I have to solve is that there is a program that performs HTTP POSTs with an associated JSON body and needs to talk to a service that accepts HTTP POSTs with url query parameters.&amp;nbsp; So I have to read the request from the client, extract the fields I need from the original request's body, and use those fields to generate the url for the destination server. To accomplish this I have used the following design:&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;a cRest component acting as a server&lt;/LI&gt; 
 &lt;LI&gt;a java Bean modeling the JSON body (the cRest component is configured with that bean as its bean class)&lt;/LI&gt; 
 &lt;LI&gt;a cProcessor that extracts the fields from the bean and stores them using exchange.setProperty()&lt;/LI&gt; 
 &lt;LI&gt;a router put in place to filter out some cases (I stop processing on certain values from the original call)&lt;/LI&gt; 
 &lt;LI&gt;a cHttp component that will make the POST to the destination URL after setting the parameters using the properties set on step 3.&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;Steps 1 through 4 work great.&amp;nbsp; But I'm stuck on step 5.&amp;nbsp; I've searched and I have no idea how to access the properties I set in the previous step. I tried using the form style on the client configuration, but it seems to me it treats whatever I put there as a fixed string.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any idea on how go about doing this?&amp;nbsp; As I said earlier, if there is a better way to do this, I'm not married to this design at all.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks in advance.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Santi&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:50:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-to-create-a-proxy-HTTP-service-on-Talend-ESB/m-p/2215479#M11881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:50:51Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create a proxy HTTP service on Talend ESB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-to-create-a-proxy-HTTP-service-on-Talend-ESB/m-p/2215480#M11882</link>
      <description>&lt;P&gt;I figured it out.&amp;nbsp; For future reference, what I did was create a messagingEndpoint component, using the ahc schema (probably any other http type of connector would do the trick).&amp;nbsp; The key is that it doesn't really matter what url you specify on the actual component's configuration dialog.&amp;nbsp; It all can be overridden by editing the headers.&amp;nbsp; So I used a processor node and ended up calling setHeader(). Like so:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;	exchange.getIn().setHeader(Exchange.HTTP_URI, "http://localhost:8080/");
	exchange.getIn().setHeader(Exchange.HTTP_PATH, "my/base/path/goes/here");
	exchange.getIn().setHeader(Exchange.HTTP_METHOD, "POST");
	exchange.getIn().setHeader(Exchange.HTTP_QUERY, "PARAMETER1=" + value1 + "&amp;amp;PARAMETER2=" + value2);&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Aug 2019 17:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-to-create-a-proxy-HTTP-service-on-Talend-ESB/m-p/2215480#M11882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-29T17:35:38Z</dc:date>
    </item>
  </channel>
</rss>

