Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
vmurariu
Contributor
Contributor

Adding a header to the SOAP message generated by tESBConsumer

Problem
The SOAP message should be like this:
<soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:MNP_PI_WorkOrder">
<soapenv:Header>
<urn:AuthenticationInfo>
<urn:userName>user</urn:userName>
<urn 0683p000009MAB6.pngassword>password</urn 0683p000009MAB6.pngassword>
</urn:AuthenticationInfo>
</soapenv:Header>
<soapenv:Body>
<urn 0683p000009MA5A.pngpGetList>
<urn 0683p000009MAB6.pngOA_ID>98094-B2B0268415</urn 0683p000009MAB6.pngOA_ID>
</urn 0683p000009MA5A.pngpGetList>
</soapenv:Body>
</soapenv:Envelope>
If I feed the WSDL to Talend, I will get this SOAP message (retrieved from console: tESBConsumer > Component > Advanced Settings > Log messages checked):
<soap:Envelope xmlns:soap=" http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<s0 0683p000009MA5A.pngpGetList xmlns:s0="urn:MNP_PI_WorkOrder">
<s0 0683p000009MAB6.pngOA_ID>98094-B2B0268415</s0 0683p000009MAB6.pngOA_ID>
</s0 0683p000009MA5A.pngpGetList>
</soap:Body>
</soap:Envelope>
Solution
I need to add a Header.
I tried to follow through the tutorial at https://help.talend.com/search/all?query=tESBConsumer&content-lang=en
using Talend Open Studio for ESB 5.3.0 to add a header to the SOAP request.
At "Procedure 12.3. Configuring the tMap component", as soon as I add headers in step 2 with type Document in addition to the payload which is also of Document type, the studio gives me this error message:
Multiple document type in the same schema: request/headers
Thus, I cannot build the job run properly.
Any suggestions ?
Thanks,
Valentin
0683p000009MEX7.png 0683p000009MEcy.png 0683p000009MESQ.png 0683p000009MEd3.png
Labels (4)
3 Replies
Anonymous
Not applicable

In your use case there are three XMLMap whereas in th documentation example, there are two tXMLMap and one tMap.
Their function are different.
Try to change this tXMLMap with a regular tMap, let us know if works better.
Cheers
Elisa
vmurariu
Contributor
Contributor
Author

I have to admit to making a newbie error.
After replacing the 3rd XML map with a tMap all went just fine, I got a response as expected.
Thanks a lot,
Valentin
Anonymous
Not applicable

Hi There,
I have a job Which have tsoap component,using web service i fetch the data from the database and another tsoap component have web service which push the data to another database .
my problem is thath when i run the job form talend its worked perfectly but When i export job as WAR file and deploy it on Jboss 4.2.2 GA server and tried to run job from url its gives error like..
 Exception in component tSOAP_1
javax.xml.soap.SOAPException: java.io.IOException: Could not transmit message
at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:115)
at org.jboss.ws.core.soap.SOAPConnectionImpl.call(SOAPConnectionImpl.java:66)
at org.talend.soap.SOAPUtil.extractContentAsDocument(SOAPUtil.java:221)
at navsdisync.navmdmsyncsoap_0_1.NAVMDMSyncSoap.tFileInputXML_2Process(NAVMDMSyncSoap.java:2237)
at navsdisync.navmdmsyncsoap_0_1.NAVMDMSyncSoap.tJava_3Process(NAVMDMSyncSoap.java:1328)
at navsdisync.navmdmsyncsoap_0_1.NAVMDMSyncSoap.tJava_2Process(NAVMDMSyncSoap.java:1226)
at navsdisync.navmdmsyncsoap_0_1.NAVMDMSyncSoap.runJobInTOS(NAVMDMSyncSoap.java:5321)
at navsdisync.navmdmsyncsoap_0_1.NAVMDMSyncSoap.runJob(NAVMDMSyncSoap.java:4994)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.QSMethodHandler.invokeEndpointFromGet(QSMethodHandler.java:129)
at org.apache.axis.transport.http.QSMethodHandler.invoke(QSMethodHandler.java:94)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.transport.http.AxisServlet.processQuery(AxisServlet.java:1226)
at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:249)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
at org.apache.catalina.authenticator.MDMSingleSignOn.invoke(MDMSingleSignOn.java:73)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:56
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: Could not transmit message
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:204)
at org.jboss.ws.core.client.SOAPRemotingConnection.invoke(SOAPRemotingConnection.java:77)
at org.jboss.ws.core.soap.SOAPConnectionImpl.callInternal(SOAPConnectionImpl.java:106)
... 50 more
Caused by: org.jboss.remoting.CannotConnectException: Can not connect http client invoker.
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:333)
at org.jboss.remoting.transport.http.HTTPClientInvoker.transport(HTTPClientInvoker.java:135)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at org.jboss.ws.core.client.RemotingConnectionImpl.invoke(RemotingConnectionImpl.java:183)
... 52 more
Caused by: java.net.UnknownHostException: us-navapp-99
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:529)
at sun.net.NetworkClient.doConnect(NetworkClient.java:158)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:395)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:530)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:234)
at sun.net.www.http.HttpClient.New(HttpClient.java:307)
at sun.net.www.http.HttpClient.New(HttpClient.java:324)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)
at org.jboss.remoting.transport.http.HTTPClientInvoker.useHttpURLConnection(HTTPClientInvoker.java:275)

so any one please help me what to do