Forum Discussion

der_chirurg's avatar
der_chirurg
Regular Visitor
6 years ago

SOAPUI Mock Service without action in Content-Type

I'm having an Mock-Service wich is working fine when using a SOAPUI request.

I'm now trying to communicate with that mock service from an WCF client, but getting the following error message:

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
   <soap:Body>
      <soap:Fault>
         <soap:Code>
            <soap:Value>Server</soap:Value>
         </soap:Code>
         <soap:Reason>
            <!--1 or more repetitions:-->
            <soap:Text xml:lang="en">Missing operation for soapAction [null] and body element [null] with SOAP Version [SOAP 1.2]</soap:Text>
         </soap:Reason>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

It seems, that the mock service needs the action attribute in the HTTP Content-Type header. The requests are exactly the same (recorded by fiddler), except the action attribute.

 

When changing the request in SOAP-UI, switching the option "Skip SOAP Action" from false to true, I'm getting the same error message as in the WCF client.

 

I'm using WS-Addressing.

See the requests.

Working:

POST https://localhost:1234/mock_Management HTTP/1.1
Connection: close
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8;action="http://foo.bar/CreateID"
Content-Length: 871
Host: localhost:1234
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
   <s:Header>
      
      <a:MessageID>urn:uuid:0458e1a6-83fd-46c8-80f2-641ffb8783e7</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">https://localhost/Test/Management.svc</a:To>
   <a:Action s:mustUnderstand="1">http://foo.bar/CreateID</a:Action></s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</s:Envelope>

 

Not working (as of WCF):

POST https://localhost:1234/mock_Management HTTP/1.1
Connection: close
Accept-Encoding: gzip,deflate
Content-Type: application/soap+xml;charset=UTF-8
Content-Length: 871
Host: localhost:1234
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
   <s:Header>
      
      <a:MessageID>urn:uuid:0458e1a6-83fd-46c8-80f2-641ffb8783e7</a:MessageID>
      <a:ReplyTo>
         <a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address>
      </a:ReplyTo>
      <a:To s:mustUnderstand="1">https://localhost/Test/Management.svc</a:To>
   <a:Action s:mustUnderstand="1">http://foo.bar/CreateID</a:Action></s:Header>
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</s:Envelope>

 

Can I tell the mock service to use WS-Addressing?