Forum Discussion

VinayKM's avatar
Senior Member
3 years ago

Getting DispatchException: Missing operation for soapAction [xyz] and body element [null]

I am stuck with one exception while trying to achieve a scenario using SoapUI(open source version 5.6.0) tool. The scenario is like below:

I have an external application client which is sending a Soap message with attachment(pdf document) to SoapUI. I have a mock server running in SoapUI tool to receive the message and in the OnRequest script I am able to receive the message and the received message is in the form of ByteArrayInputStream. I am able to read the XML and attachment content and store them successfully. The problem is when the tool finishes the execution of OnRequest script and when it moves on to execute the Dispatch script I am getting below exception and this exception occurs even before executing the dispatch script.

Thu Sep 02 09:20:25 EDT 2021:ERROR:com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [xyz] and body element [null] with SOAP Version [SOAP 1.1]
com.eviware.soapui.impl.wsdl.mock.DispatchException: Missing operation for soapAction [xyz] and body element [null] with SOAP Version [SOAP 1.1]
at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchPostRequest(
at com.eviware.soapui.impl.wsdl.mock.WsdlMockDispatcher.dispatchRequest(
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(
at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(
at org.mortbay.jetty.handler.HandlerCollection.handle(
at org.mortbay.jetty.handler.HandlerWrapper.handle(
at org.mortbay.jetty.Server.handle(
at org.mortbay.jetty.HttpConnection.handleRequest(
at org.mortbay.jetty.HttpConnection$RequestHandler.content(
at org.mortbay.jetty.HttpParser.parseNext(
at org.mortbay.jetty.HttpParser.parseAvailable(
at org.mortbay.jetty.HttpConnection.handle(
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.base/java.util.concurrent.ThreadPoolExecutor$
at java.base/


Modifications that I have tried to solve the issue:

In MockResponse properties I have set Enable MTOM = true and Enable multiparts = true

In MockService properties I have set Match SOAP Version = false and Require SOAP Action = false


But none of the above configurations solved the exception.


My OnRequest Script logic:


def attachments = mockRequest.getRequestAttachments(); "Number of attachments received: " + attachments.size();       //array size is 2, 1st index being the XML and 2nd index being the attachment(pdf)
def inputStream1
def inputStream2
if(attachments.size() > 0){
       inputStream1 = attachments[0].getInputStream()       //able to get the XML correctly
       inputStream2 = attachments[1].getInputStream()       //able to get the attachment(pdf) correctly
       def receivedXml = inputStream1.getText("UTF-8")
       def attachmentContent = inputStream2.getText() "Incoming XML is: " + receivedXml "attachment content is: " + attachmentContent
else{ 'No attachments found!!!'


Can someone help me out with the solution to handle this exception? Also why this exception is thrown before executing the Dispatch script?

No RepliesBe the first to reply