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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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>
<msg 0683p000009MAB6.pngriority>3</msg 0683p000009MAB6.pngriority>
<msg:flowId>sceptra tenens</msg:flowId>
<msg:transactionId>turbine corripuit scopuloque</msg:transactionId>
<msg:correlationId>flammato secum dea</msg:correlationId>
<msg 0683p000009MAB6.pngrivateCtxt>
<!--You may enter ANY elements at this point-->
</msg 0683p000009MAB6.pngrivateCtxt>
<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>
<v3 0683p000009MA5A.pngptionOffre2G>
<v3:conversionDemandee>false</v3:conversionDemandee>
</v3 0683p000009MA5A.pngptionOffre2G>
</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
Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

View solution in original post

2 Replies
Anonymous
Not applicable
Author

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

i am facing the same issue? how did you fix it