[resolved] tSoap error happening only on Windows

One Star

[resolved] tSoap error happening only on Windows

Hi all, I have a strange problem and I really hope someone here could help.

I have to make a call to a WebService, and I dit it, sending my soap request with a tSoap, getting a response and getting my informations thanks to a tExtractXMLField.
I tested it on a Unix machine, no problem.
Sadly, the WebService I'm invoking is down for the week because my client is still working on it and has enhancements to do.
So I decided to mock it under my windows (xp) dev machine, using SoapUI, the WSDL they gave me and a Sample Response I had.
My problem is that, when the tSoap is sending its request I have this error :
11 avr. 2012 11:45:10 com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl lookForEnvelope
GRAVE: SAAJ0514: Unable to create envelope from given source because the root element is not named Envelope
11 avr. 2012 11:45:10 com.sun.xml.internal.messaging.saaj.soap.EnvelopeFactory createEnvelope
GRAVE: SAAJ0511: Unable to create envelope from given source
Exception in component tSOAP_1
com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source:
at com.sun.xml.internal.messaging.saaj.soap.EnvelopeFactory.createEnvelope(Unknown Source)
at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.createEnvelopeFromSource(Unknown Source)
at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.getEnvelope(Unknown Source)
at org.talend.soap.SOAPUtil.invokeSOAP(SOAPUtil.java:107)
at acs.enr_acs_refcli_0_1.enr_acs_refcli.tSOAP_1Process(enr_acs_refcli.java:3875)
at acs.enr_acs_refcli_0_1.enr_acs_refcli.tJava_7Process(enr_acs_refcli.java:660)
at acs.enr_acs_refcli_0_1.enr_acs_refcli.runJobInTOS(enr_acs_refcli.java:5669)
at acs.enr_acs_refcli_0_1.enr_acs_refcli.main(enr_acs_refcli.java:5537)
Caused by: com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to create envelope from given source because the root element is not named "Envelope"
at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.lookForEnvelope(Unknown Source)
at com.sun.xml.internal.messaging.saaj.soap.SOAPPartImpl.getEnvelope(Unknown Source)
... 8 more
But I did no change to my Soap Message between the unix working version and the windows not working one.

Here is my message as it is in the tSoap :
"<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:msg=\"http://MYCLIENTURL1/CommonTypes/Mediation/MsgHeader\" xmlns:fram=\"http://MYCLIENTURL1/CommonTypes/Mediation/Framework\" xmlns:v3=\"http://MYCLIENTURL2/infra/mediation/services/consultercontratstitulaire/in/v3\">
<soapenv:Header>
<msg:msgHeader>
<msg:eventId>circum claustra</msg:eventId>
<msg:timeStamp>2003-08-09T02:18:37+02:00</msg:timeStamp>
<msg:source>ferant rapidi</msg:source>
<msgSmiley Tongueriority>3</msgSmiley Tongueriority>
<msg:flowId>sceptra tenens</msg:flowId>
<msg:transactionId>turbine corripuit scopuloque</msg:transactionId>
<msg:correlationId>flammato secum dea</msg:correlationId>
<msgSmiley TonguerivateCtxt>
<!--You may enter ANY elements at this point-->
</msgSmiley TonguerivateCtxt>
<msg:batchInfo>
<fram:batchName>enr_acs_refcli</fram:batchName>
<fram:msgNo>3</fram:msgNo>
<fram:batchSize>3</fram:batchSize>
</msg:batchInfo>
</msg:msgHeader>
</soapenv:Header>
<soapenv:Body>
<v3:ConsulterContratsTitulaireIn>
<v3:ContratServices>
<v3:noReference>"+((String)globalMap.get("numref"))+"</v3:noReference>
</v3:ContratServices>
<v3Smiley SurprisedptionOffre2G>
<v3:conversionDemandee>false</v3:conversionDemandee>
</v3Smiley SurprisedptionOffre2G>
</v3:ConsulterContratsTitulaireIn>
</soapenv:Body>
</soapenv:Envelope>"

I don't understand the error about the root element not being named Envelope because IT IS named that way.
I'm quite stuck here, so I hope someone'll have an hint for me.
Thx all

Accepted Solutions
One Star

Re: [resolved] tSoap error happening only on Windows

My bad, forgot to surround my response with "<soapenv:Envelope><soapenv:Body>" in the mock

All Replies
One Star

Re: [resolved] tSoap error happening only on Windows

My bad, forgot to surround my response with "<soapenv:Envelope><soapenv:Body>" in the mock