Mauro
Mauro

Reputation: 170

Getting Soap Fault on hitting a WebService using JMETER

I'm trying to contact a webservice via Jmeter (3.0), and I get the following error:

<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope">
   <s:Body>
      <s:Fault>
         <s:Code>
            <s:Value>s:Sender</s:Value>
            <s:Subcode>
               <s:Value xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</s:Value>
            </s:Subcode>
         </s:Code>
         <s:Reason>
            <s:Text xml:lang="es-AR">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</s:Text>
         </s:Reason>
      </s:Fault>
   </s:Body>
</s:Envelope>

I haven't encountered any issues contacting the web service from SoapUI, so I'm wondering what could cause this problem.

You can see the screen shots here:

The HTTP Request within the tree, first part of the HTTP Request data, the HTTP Header Manager settings: https://i.sstatic.net/6HxIK.jpg

enter image description here

Here are the results on SoapUI (works just fine):

Results and log enter image description here

Is it possible that the way that SoapUI sends the requests differs from the way Jmeter does and that's why it works?

Please help. Thanks!

Upvotes: 1

Views: 1135

Answers (2)

Dmitri T
Dmitri T

Reputation: 168092

You need to put this action bit to be a part of the Content-Type header like:

Header Manager Settings

I would also recommend adding HTTP Cookie Manager to your Test Plan


Out of interest, why don't you just record the request originated from SoapUI using JMeter HTTP(S) Test Script Recorder like:

  1. Configure JMeter for recording. The easiest way of doing this is using JMeter Templates feature

    • From JMeter main menu: File - Templates - Recording - Create
    • Workbench - HTTP(S) Test Script Recorder - Start

      JMeter Proxy

  2. Configure SoapUI for recording

    • From SoapUI main menu: Preferences - Proxy Settings
    • Proxy Settting: manual, host: IP address or hostname of machine where JMeter is running, port: 8888

      SoapUI proxy settings

  3. Execute request in SoapUI

  4. Inspect the recorded request in JMeter under Workbench -> Recording Controller.

Upvotes: 1

Rao
Rao

Reputation: 21379

I think you have some trivial error in the value of http header SOAPAction.

Happened to notice(in the image you attached) that there are double quotes in its value.
Just remove the double quotes " from the SOAPAction value.

UPDATE:

It is noticed, while editing the question, that soapui has sent an additional http header action with a value (you masked the value).

So, please add action header in the jmeter request as well the right value in the jmeter plan.

Upvotes: 1

Related Questions