<?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: Passing a parameter to a Talend SOAP service in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Passing-a-parameter-to-a-Talend-SOAP-service/m-p/2315859#M86467</link>
    <description>&lt;P&gt;Solved by ceating an instance of type &lt;SPAN&gt;txnOperationRequest&lt;/SPAN&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;txnPortType txnService = locator.gettxnPort();
txnOperationRequest request = new txnOperationRequest(refNumber); //refNumber is an integer parameter being passed from the calling method
txnOperationResponse response = txnService.txnOperation(request); // request will be passed to the web service
System.out.println(response.getAccountNumber()); // use get methods to extract the fields from the webservice&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 27 Aug 2017 15:00:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-27T15:00:53Z</dc:date>
    <item>
      <title>Passing a parameter to a Talend SOAP service</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-a-parameter-to-a-Talend-SOAP-service/m-p/2315858#M86466</link>
      <description>&lt;P&gt;I created a simple web service in Talend by following the (very well written, I must say) instructions &lt;A title="Building a Customer service provider" href="https://help.talend.com/reader/NIk6d__P9eg0hu8lhdLWig/DVa0ut8EPGf18yHFkPFJ4g" target="_blank" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;.&lt;/P&gt; 
&lt;P&gt;I named my service 'txn' and it accepts a numeric refNumber and returns the txn record from Mysql db. All works perfectly using SoapUI.&lt;/P&gt; 
&lt;P&gt;Now, I wanted to create a java web service client using Eclipse. The problem comes with passing the parameter to the web service. From the code generated by eclipse, the parameter is of type TxnOperationRequest, yet I want to pass an int type reference number. So I get the error:&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;The method txnOperation(TxnOperationRequest) in the type TxnPortType is not applicable for the arguments (int)&lt;/PRE&gt; 
&lt;P&gt;As far as I can tell, the types and methods are autogenerated in Talend, despite me setting the refNumber type to int when creating the service (see images below).&lt;/P&gt; 
&lt;P&gt;My question is how do I convert the parameter into usable types?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snip1.PNG" style="width: 749px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwFq.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151186i2B7947DD0BA44D5A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwFq.png" alt="0683p000009LwFq.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Snip2.PNG" style="width: 469px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009LwHz.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135632i56DCC65BD163DFB4/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009LwHz.png" alt="0683p000009LwHz.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Edit:&lt;/P&gt; 
&lt;P&gt;I found where the problem was: I had not created an instance of type&amp;nbsp;TxnOperationRequest&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;txnPortType txnService = locator.gettxnPort();&lt;BR /&gt;txnOperationRequest request = new txnOperationRequest(refNumber); //refNumber is an integer parameter being passed from the calling method&lt;BR /&gt;txnOperationResponse response = txnService.txnOperation(request); // request will be passed to the web service&lt;BR /&gt;System.out.println(response.getAccountNumber()); // use get methods to extract the fields from the webservice&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:22:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-a-parameter-to-a-Talend-SOAP-service/m-p/2315858#M86466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: Passing a parameter to a Talend SOAP service</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Passing-a-parameter-to-a-Talend-SOAP-service/m-p/2315859#M86467</link>
      <description>&lt;P&gt;Solved by ceating an instance of type &lt;SPAN&gt;txnOperationRequest&lt;/SPAN&gt;:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;PRE&gt;txnPortType txnService = locator.gettxnPort();
txnOperationRequest request = new txnOperationRequest(refNumber); //refNumber is an integer parameter being passed from the calling method
txnOperationResponse response = txnService.txnOperation(request); // request will be passed to the web service
System.out.println(response.getAccountNumber()); // use get methods to extract the fields from the webservice&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 27 Aug 2017 15:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Passing-a-parameter-to-a-Talend-SOAP-service/m-p/2315859#M86467</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-27T15:00:53Z</dc:date>
    </item>
  </channel>
</rss>

