<?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: Retrieve attachment (octet-stream) from SOAP or REST webservice in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241795#M28840</link>
    <description>&lt;P&gt;Adding last 2 screenshot with expected result and actual one.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LvtQ"&gt;actual.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lx5u"&gt;expected.png&lt;/A&gt;</description>
    <pubDate>Tue, 07 Jan 2020 11:27:18 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-01-07T11:27:18Z</dc:date>
    <item>
      <title>Retrieve attachment (octet-stream) from SOAP or REST webservice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241794#M28839</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've done a lot of research and I can't find a reliable solution to my issue:&lt;/P&gt; 
&lt;P&gt;I'm using talend DI 7.1.&lt;/P&gt; 
&lt;P&gt;I'm trying to call a webservice (my provider publishes it as a REST as well as a SOAP webservice) and retrieve the PDF attchment returned by this webservice.&lt;/P&gt; 
&lt;P&gt;I successfully achieved this with SOAPUI (both ways; REST and SOAP) (soapui.png). But whith this tools, you only have to double click on the attachment to display it (soapui2.png).&lt;/P&gt; 
&lt;P&gt;But I really don't know how to do this with Talend DI.&lt;/P&gt; 
&lt;P&gt;talend1.png, talend2.png and talend3.png will show you how I managed it until now.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I successfully call the webservice (both ways; in the screenshot, I kept only REST), which returns "OK". But how to retrieve the attachment?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My issue seems to be an encoding issue, as characters are modified by tRestClient. (expected.png is what Soapui get, actual.png is what is written in my tFileouputDelimited).&lt;/P&gt; 
&lt;P&gt;FYI I tried UTF-8 and ISO-8859-15 as encoding (I 'm in France) and even if characters are different, the result is not the one I expect.&lt;/P&gt; 
&lt;P&gt;I read somewhere to use a tFileFetch to retrieve the attchment, using the URL sent in the response BUT there is no URL in the response.&lt;/P&gt; 
&lt;P&gt;I read that I need to get the response as binary but I don't know how to manage this.&lt;/P&gt; 
&lt;P&gt;And I read that the response could be encode64-based but I don't know how to manage this neither.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Could you please help me?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Don't hesitate to ask more details if needed.&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 11:26:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241794#M28839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-07T11:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve attachment (octet-stream) from SOAP or REST webservice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241795#M28840</link>
      <description>&lt;P&gt;Adding last 2 screenshot with expected result and actual one.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LvtQ"&gt;actual.png&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lx5u"&gt;expected.png&lt;/A&gt;</description>
      <pubDate>Tue, 07 Jan 2020 11:27:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241795#M28840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-07T11:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve attachment (octet-stream) from SOAP or REST webservice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241796#M28841</link>
      <description>&lt;P&gt;UP&lt;/P&gt;</description>
      <pubDate>Fri, 17 Apr 2020 12:52:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241796#M28841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-17T12:52:58Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve attachment (octet-stream) from SOAP or REST webservice</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241797#M28842</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I wanted to give the solution to this issue. (using the SOAP webservice)&lt;/P&gt; 
&lt;P&gt;FYI I tried every component allowing to call a webservice, I guess.&lt;/P&gt; 
&lt;P&gt;The one I successfully used to achieve this, is tHttpRequest.&lt;/P&gt; 
&lt;P&gt;- First write the xml file you wish to send to the webservice as parameters. (you need to write everything from the root node)&lt;/P&gt; 
&lt;P&gt;- Read this file in a tHttpRequest (checking option "Post parameters from file" (you can put "onComponentOk" beteween writing the xml and thttpRequest component)&lt;/P&gt; 
&lt;P&gt;- Set up the httpRequest with the webservice's endpoint in the "URI" field&lt;/P&gt; 
&lt;P&gt;- Check "the out to file option " (in French: "Ecrire le contenu de la réponse dans le fichier")&lt;/P&gt; 
&lt;P&gt;- Set the path of this output&lt;/P&gt; 
&lt;P&gt;- Read this file with a tFileInputRaw (you can pu a onComponentOK between thttpRequest en tFileInputRaw) (it doesn't seem to be mandatory to check "read the file as a byte array")&lt;/P&gt; 
&lt;P&gt;- Write in a tFileOutputRaw (with a main link between Input and output).&lt;/P&gt; 
&lt;P&gt;I'm not sur the encoding of the tFileoutputRaw is relevant, but I set it to my local encoding (ISO-8859-15)&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Even if the response is a multipart one, it works, I'm not sure why. (I'm not used to webservices)&lt;/P&gt; 
&lt;P&gt;I'm pretty sure it will work with a REST webservice. But I won't try it right now.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2020 09:14:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Retrieve-attachment-octet-stream-from-SOAP-or-REST-webservice/m-p/2241797#M28842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-21T09:14:21Z</dc:date>
    </item>
  </channel>
</rss>

