Thoughts on Integrating Systems & IoT

Error Calling BizTalk WCF-WSHttp Endpoint

After exposing an external XML schema as a BizTalk WCF-WSHttp end point using the BizTalk WCF Service Publishing Wizard I fired up SOAPUI and attempted to call my web service using a test SOAP message…

However I was baffled by this obscure response:

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
 <s:Header>
  <a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action>
 </s:Header>
 <s:Body>
  <s:Fault>
   <s:Code>
    <s:Value>s:Sender</s:Value>
    <s:Subcode>
     <s:Value>a:DestinationUnreachable</s:Value>
    </s:Subcode>
   </s:Code>
   <s:Reason>
    <s:Text xml:lang="en-US">The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.  Check that the sender and receiver's EndpointAddresses agree.</s:Text>
   </s:Reason>
  </s:Fault>
 </s:Body>
</s:Envelope>

So a SOAP fault message was returned but what on earth does the explanation in the “Reason” element mean (highlighted in bold)??

The empty single quotes in the response immediately made me think that something was missing in my SOAP request but since the request was created in SOAPUI by reference to the WSDL exposed by my web service, surely everything required to call the web service would be defined?

However looks like the WSDL let me down…  This article by Nabeel Prior resolved the issue:  I needed to add the following <To> element in my SOAP header:

<soap:Header>
 <To soap:mustUnderstand="1" xmlns="http://www.w3.org/2005/08/addressing">http://myservername/ClaimsServiceWCF/ClaimsService.svc</To>
</soap:Header>

After adding this to my SOAP request message, I was able to call my BizTalk web service successfully.

The URI matches that specified in my receive location.

However surely this should have been defined in the WSDL?  I would be grateful for any feedback on this.

Advertisements

3 responses

  1. James Corbould

    My colleague Johann has written an excellent article on this issue: http://adventuresinsidethemessagebox.wordpress.com/2012/10/22/calling-a-wcf-wshttp-service-from-soapui/.

    The WCF-WSHttp binding requires WS-Addressing to be configured in SOAPUI and Johann does a good job of explaining this in his post (thanks mate :-))

    June 28, 2013 at 6:22 pm

  2. No worries, I was just about to point you to it 🙂

    Another well written article, thanks James.

    June 28, 2013 at 8:57 pm

  3. Gopi Srinivas

    Thanks JAmes.. Johann article really helps

    June 12, 2015 at 9:01 pm

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s