VMware Cloud Community
SamXtravirt
Contributor
Contributor
Jump to solution

Add SOAP Envelope to request?

Hi,

I'm trying to invoke a SOAP request for a customer and the error response from the web service is:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <soapenv:Fault>

         <faultcode>Server</faultcode>

         <faultstring>org.apache.xmlbeans.XmlException: Missing/Invalid SOAP Envelope, expecting [{http://schemas.xmlsoap.org/soap/envelope/}Envelope]</faultstring>

      </soapenv:Fault>

   </soapenv:Body>

</soapenv:Envelope>

Using the SOAPInterceptor I can view the request that was sent to the server. If I take that output, manually add the code below and then send it to the web service using SoapUI the correct response is recieved:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

   <soap:Body>

...vCO generated request XML...

   </soap:Body>

</soap:Envelope>

How do I add the SOAP envelope to the request? The code being used in the Orchestrator workflow is the standard code generated by the "Generate a new workflow from a SOAP operation", with the SOAPInterceptor added.

Thanks,

Sam

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
SamXtravirt
Contributor
Contributor
Jump to solution

OK, I was wrong on several levels here, so to avoid misleading anyone:

If you use the SOAPInterceptor class and output the XML body, it is ONLY the body you see - so of course I didn't see the envelope and needed to manually add it in SoapUI - this is not a vCO fault but my own!

This was solved by logging into the vCO admin web page and setting the logging level to "DEBUG" - this outputted a much more usable error message which led me to the actual problem. The WSDL returned a short name for the host running the web service - the vCO appliance used that as the endpoint and could not resolve the hostname, therefore the script failed. Modifying the web service to reply with it's IP address meant Orchestrator could communicate correctly.

View solution in original post

0 Kudos
1 Reply
SamXtravirt
Contributor
Contributor
Jump to solution

OK, I was wrong on several levels here, so to avoid misleading anyone:

If you use the SOAPInterceptor class and output the XML body, it is ONLY the body you see - so of course I didn't see the envelope and needed to manually add it in SoapUI - this is not a vCO fault but my own!

This was solved by logging into the vCO admin web page and setting the logging level to "DEBUG" - this outputted a much more usable error message which led me to the actual problem. The WSDL returned a short name for the host running the web service - the vCO appliance used that as the endpoint and could not resolve the hostname, therefore the script failed. Modifying the web service to reply with it's IP address meant Orchestrator could communicate correctly.

0 Kudos