This project is read-only.


TSoap After sending one successful request


The TSoap object tested in job testSoap 0.1 works correctly to send one request as when we try to add an item it adds an item in Innovator. But it raises an exception and actually crashes the job.
For example with this soap request:
End-Point : ""
soap action : "applyItem"
<soap:Envelope xmlns:soap=\"\" xmlns:aras=\"\">
   <Item action=\"add\" type=\"Document\">
The document gets created in Aras Innovator but the job crashes with the following message:
[statistics] connecting to socket on port 3919
[statistics] connected
6 févr. 2011 16:08:10 com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl extractContentAsDocument
GRAVE: SAAJ0250: Cannot extract Document from body
Exception in component tSOAP_1
javax.xml.soap.SOAPException: Cannot extract Document from body
at com.sun.xml.internal.messaging.saaj.soap.impl.BodyImpl.extractContentAsDocument(Unknown Source)
at org.talend.soap.SOAPUtil.extractContentAsDocument(
at org.talend.soap.SOAPUtil.invokeSOAP(
at innovatoretl.testsoap_0_1.testSoap.tSOAP_1Process(
at innovatoretl.testsoap_0_1.testSoap.runJobInTOS(
at innovatoretl.testsoap_0_1.testSoap.main(
[statistics] disconnected
Job testSoap terminé à 16:08 06/02/2011. [Code sortie=1]


aponceot wrote Mar 2, 2011 at 3:32 PM

Same problem for me...

I think it is related to the tsoap component. I tried to send the same SOAP message from talend and from a vbs script. Talend return the error while the vbs script returns a correct xml message...
When debugging step to step the generated Java code in Talend, we can see that the soapUtil_tSOAP_1.invokeSOAP is the problem. But we can not step to step debug this library...

wrote Mar 3, 2011 at 8:29 PM

aponceot wrote Mar 3, 2011 at 8:39 PM

I did not succeed to make the tsoap component to work so I decided to use java code in order to manage the http connection in order to send the SOAP message.

In order to do that, i've just replaced the tSOAP_1 component by a tJava one and placed this code in the component settings :
            String nameSpace = "";
            String remoteMethod = "ApplyItem";
            String characterEncoding = "UTF-8";
            String SOAPmessage = "<SOAP-ENV:Envelope xmlns:SOAP-ENV='' encodingStyle=''><SOAP-ENV:Body><ApplyItem xmlns:m=''>" + context.XML_Buffer + "</ApplyItem></SOAP-ENV:Body></SOAP-ENV:Envelope>";
            // Create new URL object and HttpURLConnection object
   url = new;
   httpConnection = ( url.openConnection();

            // Convert the message to a byte array
            byte[] messageBytes = SOAPmessage.getBytes();

            // Set headers
            httpConnection.setRequestProperty("Content-Length", String.valueOf(messageBytes.length));
            httpConnection.setRequestProperty("Content-Type","text/xml; charset=" + characterEncoding + "\"");
            httpConnection.setRequestProperty("SOAPAction", remoteMethod);
            httpConnection.setRequestProperty("AUTHUSER", context.ArasServerLogin);
            httpConnection.setRequestProperty("AUTHPASSWORD", context.ArasServerPassword);
            httpConnection.setRequestProperty("DATABASE", context.ArasServerDb);

            // Write and send the SOAP message
   out = httpConnection.getOutputStream();

            // Read server response
   in = new

            String inputLine;
            while ((inputLine = in.readLine()) != null) {

yoannmaingon wrote Mar 4, 2011 at 6:26 AM

Thanx for the input, i just tried it and it works superwell !
I'll commit it today, make a video and deliver it as a first Release.

Thanx Anthony !

wrote Mar 4, 2011 at 6:27 AM

wrote Feb 13, 2013 at 7:55 PM

wrote May 16, 2013 at 2:47 AM

wrote May 16, 2013 at 2:47 AM

wrote Jun 14, 2013 at 8:16 AM