cancel
Showing results for 
Search instead for 
Did you mean: 

[R]Missing operation for soapAction [] and body element, moc

Occasional Contributor

[R]Missing operation for soapAction [] and body element, moc

Hi,

I am receiving DispatchException on my mockservice when requesting responses from mock thru web client. In mock logs i see:

com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [] and body element [{xxxx.xxxx/producer}list_documents] with SOAP Version [SOAP 1.1]
at com.eviware.soapui.impl.wsdl.support.soap.SoapUtils.findOperationForRequest(SoapUtils.java:359)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchPostRequest(WsdlMockRunner.java:250)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:375)
at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:715)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

If i query the same thing thru soapUI everything works. On my mock properties, the "Require SOAP Action" is set to false.

It doesn't happen with all of the WSDLs, but only some of them. What could be the problem?
7 REPLIES 7
Occasional Contributor

Re: Missing operation for soapAction [] and body element, mo

No replys needed here. Figured it out.
Moderator

Re: Missing operation for soapAction [] and body element, mo

Hi,

Thanks for resolving your issue. It would be good for the community if you post your resolution to the problem here.




Thanks.

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Contributor

Re: Missing operation for soapAction [] and body element, mo

erki wrote:
No replys needed here. Figured it out.

fyerf wrote:
Having the same issue especially with soap1.2 WSDLs. Would greatly appreciate insight into how you resolved same.
New Contributor

Re: [R]Missing operation for soapAction [] and body element,

Greetings, I am having the same issue especially with soap1.2 WSDLs. Any insight into resolution would be most appreciated. The returned mock fault message follows:

<soap:Text xml:lang="en">Missing operation for soapAction [http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0/HelloWorldServicePortType/HelloWorldReque... and body element [{http://ca.gov/niem/webservice/helloworldservice/ca-hlw/1.0}HelloWorldRequest] with SOAP Version [SOAP 1.2]</soap:Text>
New Contributor

Re: [R]Missing operation for soapAction [] and body element,

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">
<wsdlSmiley Tongueart name="body" element="ca-hlw:HelloWorldRequest"/>
<wsdlSmiley Tongueart name="MessageID" element="wsa:MessageID"/>
<wsdlSmiley Tongueart name="From" element="wsa:From"/>
<wsdlSmiley Tongueart name="Action" element="wsa:Action"/>
<wsdlSmiley Tongueart name="Security" element="wsseSmiley Frustratedecurity"/>
</wsdl:message>
<wsdl:message name="HelloWorldResponseMessage">
<wsdlSmiley Tongueart name="body" element="ca-hlw:HelloWorldResponse"/>
<wsdlSmiley Tongueart name="MessageID" element="wsa:MessageID"/>
<wsdlSmiley Tongueart name="Action" element="wsa:Action"/>
</wsdl:message>
<wsdl:message name="HelloWorldFaultListMessage">
<wsdlSmiley Tongueart name="HelloWorldFaultList" element="ca-hlw:HelloWorldFaultList"/>
</wsdl:message>
<wsdlSmiley TongueortType name="HelloWorldServicePortType">
<wsdlSmiley Surprisedperation name="HelloWorld">
<wsdl:input name="HelloWorldRequest" message="ca-hlw:HelloWorldRequestMessage"/>
<wsdlSmiley Surprisedutput name="HelloWorldResponse" message="ca-hlw:HelloWorldResponseMessage"/>
<wsdl:fault name="HelloWorldFaultList" message="ca-hlw:HelloWorldFaultListMessage"/>
</wsdlSmiley Surprisedperation>
</wsdlSmiley TongueortType>
<wsdl:binding name="HelloWorldServicePortTypeBinding" type="ca-hlw:HelloWorldServicePortType">
<soap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdlSmiley Surprisedperation name="HelloWorld">
<soap12Smiley Surprisedperation 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>
<wsdlSmiley Surprisedutput 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"/>
</wsdlSmiley Surprisedutput>
<wsdl:fault name="HelloWorldFaultList">
<soap12:fault name="HelloWorldFaultList" use="literal"/>
</wsdl:fault>
</wsdlSmiley Surprisedperation>
</wsdl:binding>
<wsdl:service name="HelloWorldService">
<wsdlSmiley Tongueort name="HelloWorldServicePortType" binding="ca-hlw:HelloWorldServicePortTypeBinding">
<soap12:address location="http://EndPoint/Goes/Here/"/>
</wsdlSmiley Tongueort>
</wsdl:service>
</wsdl:definitions>
Moderator

Re: [R]Missing operation for soapAction [] and body element,

Thanks fyerf for sharing this with the community.

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
Occasional Contributor

Re: [R]Missing operation for soapAction [] and body element,

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?

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors