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: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>
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:
<To soap:mustUnderstand="1" xmlns="http://www.w3.org/2005/08/addressing">
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.