One Star

Component tWebServiceInput doesn't run

Hello, I have a problem with the invocation of a WebService through TWebServiceInput component.
Version: Talend Open Studio, Version: 3.0.3
Build id: r21383-20090126-2207
I'm trying to run the webservice but doesn't obtain the correct results, another tools to test webservices runs ok. I have attached several images.
Execution ok of the webservice through "http", fich1.jpg
Execution via tWebServiceInput, fich2.jpg (ko)
Design of the Job on Talend 3.0.3, fich3.jpg
Thanks in advance
7 REPLIES
Employee

Re: Component tWebServiceInput doesn't run

Can you post your schema of tWebServiceInput please?
One Star

Re: Component tWebServiceInput doesn't run

Yes, of course, here you are.
I have tested with two schemas "exit1" and "exit2" but the results are the same.
The file "exit2.jpg" contains the fields corresponding to the Webservice response.
I have attached too an extract of a document that explains the webservice response and input parameters.
Thanks
Community Manager

Re: Component tWebServiceInput doesn't run

Hello guy
If you return multiple fileds at a time or the result contains complex type, you should use the 'Advanced Use' in Advanced settings tab. see 3814.
Please follow the steps as the screenshots.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Component tWebServiceInput doesn't run

Hello,
I have followed your instructions and i have had to rebuild the generate code by Talend, to obtain right results, the results are ok.
I have now another problem. The parameters that WebService needs as arguments (8 paramters) are included in code (see figure1 and the next code):
*************************
routines.DeydeSoap_PortType DeydeSoap = new routines.Deyde_ServiceLocator().getdeydeSoap();
routines.DeydeSoap_BindingStub stub = (routines.DeydeSoap_BindingStub)DeydeSoap;
java.lang.String param1 = "user";
java.lang.String param2 = "password";
java.lang.String param3 = "mayor 8 28000 madrid";
java.lang.String param4 = "es,dom,cand";
javax.xml.rpc.holders.StringHolder param5 = new javax.xml.rpc.holders.StringHolder("noerror");
javax.xml.rpc.holders.StringHolder param6 = new javax.xml.rpc.holders.StringHolder("");
java.lang.Long paramLong = -1L;
javax.xml.rpc.holders.LongWrapperHolder param7 = new javax.xml.rpc.holders.LongWrapperHolder(paramLong);
javax.xml.rpc.holders.StringHolder param8 = new javax.xml.rpc.holders.StringHolder("");
java.lang.Object[] result = DeydeSoap.deydePlus(param1, param2, param3, param4, param5, param6, param7, param8);

output_row.errorMsg = (String) result;
output_row.candidateList = (String)result;
output_row.selectedCandidate = (Long)result;
output_row.pobVia = (String)result;
output_row.deydePlusResult = (String)result;
*****************************************
But I would like to obtain the input parameters (by code) dynamically through the values of the parameters of the TWebService Component. This component has a prior component (file) that contains several sets of parameters.
For example, "java.lang.String param1 = "entrada_ws.user" is not valid.
Thanks
Community Manager

Re: Component tWebServiceInput doesn't run

Hello
But I would like to obtain the input parameters (by code) dynamically through the values of the parameters of the TWebService Component.

Yes, we can set the parameters dynamically. Please see my screenshots.
Best regards
shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Component tWebServiceInput doesn't run

When I follow these steps, I get a "Generate Java files failed. java.io.IOException :" error message when I click the "..." button on the "Advanced Settings" page.
On the "Basic Settings" page I have the following values:
WSDL: "http://192.168.100.80/fsc/fscdav/wsdl?WEBSVC=COO.200.300.1.108119" (my web service, not reachable from outside)
Needs authentication? Yes, provided username + password
Method name: ""
Here is the WSDL:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:fsc-svc="http://schemas.fabasoft.com/websvc/INVOICE_200_300_InvoicingWebServices/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension" targetNamespace="http://schemas.fabasoft.com/websvc/INVOICE_200_300_InvoicingWebServices/">
- <wsdl:types>
- <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://schemas.fabasoft.com/websvc/INVOICE_200_300_InvoicingWebServices/" xmlns:tns="http://schemas.fabasoft.com/websvc/INVOICE_200_300_InvoicingWebServices/" elementFormDefault="qualified">
- <xs:element name="INVOICE_200_300_GetInvoiceData">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="invoicenumber" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
- <xs:element name="INVOICE_200_300_GetInvoiceDataResponse">
- <xs:complexType>
- <xs:sequence>
<xs:element minOccurs="0" maxOccurs="1" name="creditor" type="xs:string" />
<xs:element minOccurs="0" maxOccurs="1" name="amount" type="xs:double" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
- <wsdl:message name="INVOICE_200_300_GetInvoiceDataSoapIn">
<wsdlSmiley Tongueart name="parameters" element="fsc-svc:INVOICE_200_300_GetInvoiceData" />
</wsdl:message>
- <wsdl:message name="INVOICE_200_300_GetInvoiceDataSoapOut">
<wsdlSmiley Tongueart name="parameters" element="fsc-svc:INVOICE_200_300_GetInvoiceDataResponse" />
</wsdl:message>
- <wsdlSmiley TongueortType name="INVOICE_200_300_InvoicingWebServicesSoap">
- <wsdlSmiley Surprisedperation name="INVOICE_200_300_GetInvoiceData">
<wsdl:input message="fsc-svc:INVOICE_200_300_GetInvoiceDataSoapIn" />
<wsdlSmiley Surprisedutput message="fsc-svc:INVOICE_200_300_GetInvoiceDataSoapOut" />
</wsdlSmiley Surprisedperation>
</wsdlSmiley TongueortType>
- <wsdl:binding name="INVOICE_200_300_InvoicingWebServicesSoap" type="fsc-svc:INVOICE_200_300_InvoicingWebServicesSoap">
<stk:binding xmlns:stk="http://schemas.microsoft.com/soap-toolkit/wsdl-extension" preferredEncoding="UTF-8" />
<soap:binding xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" transport="http://schemas.xmlsoap.org/soap/http" style="document" />
- <wsdlSmiley Surprisedperation name="INVOICE_200_300_GetInvoiceData">
<soapSmiley Surprisedperation xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="http://schemas.fabasoft.com/object/INVOICE_200_300_GetInvoiceData" style="document" />
- <wsdl:input>
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" />
</wsdl:input>
- <wsdlSmiley Surprisedutput>
<soap:body xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" use="literal" />
</wsdlSmiley Surprisedutput>
</wsdlSmiley Surprisedperation>
</wsdl:binding>
- <wsdl:service name="INVOICE_200_300_InvoicingWebServices">
- <wsdlSmiley Tongueort name="INVOICE_200_300_InvoicingWebServicesSoap" binding="fsc-svc:INVOICE_200_300_InvoicingWebServicesSoap">
<soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://folio-hofmann/FSC/fscdav/wsdl?WEBSVC=INVOICE_200_300_InvoicingWebServices" />
</wsdlSmiley Tongueort>
</wsdl:service>
</wsdl:definitions>
One Star

Re: Component tWebServiceInput doesn't run

These posts are useless without the images, why has the Talend forum removed them?