Forum Discussion
fyerf
11 years agoNew Contributor
Greetings all,
As it turns out, for multipart WSDLs, soapUI needs the body part declared and bound first for it to build a mock service correctly. Below is a Hello Word example of of a multiple part explicit bindings WSDL with the message body parts declared and bound first. It is consumed by soapUI and generates a mock service without errors. Changing the order of part declaration/binding causes the mock service to throw spurious Missing operation for soapAction faults. I have tested this approach successfully for both SOAP1.1 and 1.2 WSDLs.
Best regards,
fyerf
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ca-hlw="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" name="HelloWorldService" targetNamespace="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0">
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0" schemaLocation="HelloWorldService.xsd"/>
<xsd:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="ws_addr.xsd"/>
<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="oasis_200401_wss_wssecurity_secext_1.0.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="HelloWorldRequestMessage">
<wsdl:part name="body" element="ca-hlw:HelloWorldRequest"/>
<wsdl:part name="MessageID" element="wsa:MessageID"/>
<wsdl:part name="From" element="wsa:From"/>
<wsdl:part name="Action" element="wsa:Action"/>
<wsdl:part name="Security" element="wsse:Security"/>
</wsdl:message>
<wsdl:message name="HelloWorldResponseMessage">
<wsdl:part name="body" element="ca-hlw:HelloWorldResponse"/>
<wsdl:part name="MessageID" element="wsa:MessageID"/>
<wsdl:part name="Action" element="wsa:Action"/>
</wsdl:message>
<wsdl:message name="HelloWorldFaultListMessage">
<wsdl:part name="HelloWorldFaultList" element="ca-hlw:HelloWorldFaultList"/>
</wsdl:message>
<wsdl:portType name="HelloWorldServicePortType">
<wsdl:operation name="HelloWorld">
<wsdl:input name="HelloWorldRequest" message="ca-hlw:HelloWorldRequestMessage"/>
<wsdl:output name="HelloWorldResponse" message="ca-hlw:HelloWorldResponseMessage"/>
<wsdl:fault name="HelloWorldFaultList" message="ca-hlw:HelloWorldFaultListMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServicePortTypeBinding" type="ca-hlw:HelloWorldServicePortType">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0/HelloWorld"/>
<wsdl:input name="HelloWorldRequest">
<soap12:body parts="body" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="MessageID" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="From" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="Action" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="Security" use="literal"/>
</wsdl:input>
<wsdl:output name="HelloWorldResponse">
<soap12:body parts="body" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldResponseMessage" part="MessageID" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldResponseMessage" part="Action" use="literal"/>
</wsdl:output>
<wsdl:fault name="HelloWorldFaultList">
<soap12:fault name="HelloWorldFaultList" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port name="HelloWorldServicePortType" binding="ca-hlw:HelloWorldServicePortTypeBinding">
<soap12:address location="http://EndPoint/Goes/Here/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
As it turns out, for multipart WSDLs, soapUI needs the body part declared and bound first for it to build a mock service correctly. Below is a Hello Word example of of a multiple part explicit bindings WSDL with the message body parts declared and bound first. It is consumed by soapUI and generates a mock service without errors. Changing the order of part declaration/binding causes the mock service to throw spurious Missing operation for soapAction faults. I have tested this approach successfully for both SOAP1.1 and 1.2 WSDLs.
Best regards,
fyerf
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:ca-hlw="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" name="HelloWorldService" targetNamespace="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0">
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0" schemaLocation="HelloWorldService.xsd"/>
<xsd:import namespace="http://www.w3.org/2005/08/addressing" schemaLocation="ws_addr.xsd"/>
<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="oasis_200401_wss_wssecurity_secext_1.0.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="HelloWorldRequestMessage">
<wsdl:part name="body" element="ca-hlw:HelloWorldRequest"/>
<wsdl:part name="MessageID" element="wsa:MessageID"/>
<wsdl:part name="From" element="wsa:From"/>
<wsdl:part name="Action" element="wsa:Action"/>
<wsdl:part name="Security" element="wsse:Security"/>
</wsdl:message>
<wsdl:message name="HelloWorldResponseMessage">
<wsdl:part name="body" element="ca-hlw:HelloWorldResponse"/>
<wsdl:part name="MessageID" element="wsa:MessageID"/>
<wsdl:part name="Action" element="wsa:Action"/>
</wsdl:message>
<wsdl:message name="HelloWorldFaultListMessage">
<wsdl:part name="HelloWorldFaultList" element="ca-hlw:HelloWorldFaultList"/>
</wsdl:message>
<wsdl:portType name="HelloWorldServicePortType">
<wsdl:operation name="HelloWorld">
<wsdl:input name="HelloWorldRequest" message="ca-hlw:HelloWorldRequestMessage"/>
<wsdl:output name="HelloWorldResponse" message="ca-hlw:HelloWorldResponseMessage"/>
<wsdl:fault name="HelloWorldFaultList" message="ca-hlw:HelloWorldFaultListMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HelloWorldServicePortTypeBinding" type="ca-hlw:HelloWorldServicePortType">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="HelloWorld">
<soap12:operation soapAction="http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0/HelloWorld"/>
<wsdl:input name="HelloWorldRequest">
<soap12:body parts="body" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="MessageID" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="From" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="Action" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldRequestMessage" part="Security" use="literal"/>
</wsdl:input>
<wsdl:output name="HelloWorldResponse">
<soap12:body parts="body" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldResponseMessage" part="MessageID" use="literal"/>
<soap12:header message="ca-hlw:HelloWorldResponseMessage" part="Action" use="literal"/>
</wsdl:output>
<wsdl:fault name="HelloWorldFaultList">
<soap12:fault name="HelloWorldFaultList" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdl:port name="HelloWorldServicePortType" binding="ca-hlw:HelloWorldServicePortTypeBinding">
<soap12:address location="http://EndPoint/Goes/Here/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
- mindgnat7 years agoOccasional Contributor
Thanks for taking the time to post this solution. However, that had no effect on my Community Edition 5.2.1 version of SoapUI.
The same problem persists.
Has anyone else tried this solution and gotten past the problem or does it still remain after this change?
Related Content
- 9 years agofrancisco_garci
- 14 years agolmcdjma
- 3 years agoaaronpliu
Recent Discussions
- 2 hours agoGuhan-B
- 4 days agoruchisingh