Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to create a SOAP based webservice. I use Talend Open Studio ESB 7.1.1 and SOAP 5.3. I have wsdl below:
<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.talend.org/service/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="Test_Webservice_2" targetNamespace="http://www.talend.org/service/"> <script/> <wsdl:types> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.talend.org/service/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://www.talend.org/service/"> </xsd:schema> </wsdl:types> <wsdl:message name="Operation_1Request"> <wsdl:part name="nev" type="xsd:string"> </wsdl:part> <wsdl:part name="kor" type="xsd:long"> </wsdl:part> </wsdl:message> <wsdl:message name="Operation_1Response"> <wsdl:part name="responseText" type="xsd:string"> </wsdl:part> <wsdl:part name="responseText2" type="xsd:int"> </wsdl:part> </wsdl:message> <wsdl:portType name="TWS_PortType"> <wsdl:operation name="Operation_1"> <wsdl:input message="tns:Operation_1Request"> </wsdl:input> <wsdl:output message="tns:Operation_1Response"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="Test_Webservice_2Binding" type="tns:TWS_PortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="Operation_1"> <soap:operation soapAction="http://www.talend.org/service/Operation_1"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="Test_Webservice_2"> <wsdl:port binding="tns:Test_Webservice_2Binding" name="Test_Webservice_2Port"> <soap:address location="http://localhost:8090/services/Test_Webservice_2"/> </wsdl:port> </wsdl:service> </wsdl:definitions>
And here is the basic structure, I made and the Map component binding.
the tJava componenet only log some technical data...
When I call this API like this -from SOAP UI-:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header/> <soapenv:Body> <nev>?</nev> <kor>?</kor> </soapenv:Body> </soapenv:Envelope>
I receive this result:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <nev>?</nev> </soap:Body> </soap:Envelope>
This is strange me, 'cause as I write down in the wsdl, I need responseText field in the response instead if <nev></nev>.
Any idea what did I wrong?
I'm newbie in Talend...
UPDATE
I have recognised, I need to use tXMLMap instead of tMap component 'cause of this article:
https://help.talend.com/reader/iYcvdknuprDzYycT3WRU8w/EHwWqn8Io8xKgHS09BJD4A
But if I use this componenet, I got this error message:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <soap:Fault> <faultcode>soap:Server</faultcode> <faultstring>Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog at [row,col {unknown-source}]: [2,0].</faultstring> </soap:Fault> </soap:Body> </soap:Envelope>
The input and the output parameters are the same. Here is the connection:
Any idea?
Hello,
This error indicates the tXMLMap setup within job is not correct.
Ensure to verify following steps Once the job is designed with producer and consumer :
1. Right click on Services -> xxxxxx and select "Import WSDL Schemas".
2. Open tXMLMap map editor. In the row1 input table right-click on the payload and select "Import from repository". From the "Metadata" popup that opens, select Metadata -> File xml ->xxxx -> service -> xxxx -> xxxxx -> metadata
3. In the output table delete the current value of the Expression field.
4. Redo the mapping between the input and output table.
Let us know if it is OK with you.
Best regards
Sabrina
Hello,
This error indicates the tXMLMap setup within job is not correct.
Ensure to verify following steps Once the job is designed with producer and consumer :
1. Right click on Services -> xxxxxx and select "Import WSDL Schemas".
2. Open tXMLMap map editor. In the row1 input table right-click on the payload and select "Import from repository". From the "Metadata" popup that opens, select Metadata -> File xml ->xxxx -> service -> xxxx -> xxxxx -> metadata
3. In the output table delete the current value of the Expression field.
4. Redo the mapping between the input and output table.
Let us know if it is OK with you.
Best regards
Sabrina
Hey Sabrina,
yes, this solved my issue, thank you!
Best regards,
Viktor