<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>BizTalk lessons from the field : SOAP</title><link>http://blogs.msdn.com/nabeelp/archive/tags/SOAP/default.aspx</link><description>Tags: SOAP</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Obscure Error: AddressFilter mismatch at the EndpointDispatcher</title><link>http://blogs.msdn.com/nabeelp/archive/2008/03/07/obscure-error-addressfilter-mismatch-at-the-endpointdispatcher.aspx</link><pubDate>Fri, 07 Mar 2008 18:20:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8100727</guid><dc:creator>Nabeel Prior</dc:creator><slash:comments>2</slash:comments><comments>http://blogs.msdn.com/nabeelp/comments/8100727.aspx</comments><wfw:commentRss>http://blogs.msdn.com/nabeelp/commentrss.aspx?PostID=8100727</wfw:commentRss><description>&lt;P&gt;While testing the WCF-WSHttp receive adapter this week I ran in this very interesting, and rather obscurely worded&amp;nbsp;error:&lt;/P&gt;
&lt;P class=CodeSection&gt;&lt;FONT face="Courier, Courier New"&gt;The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.&amp;nbsp; Check that the sender and receiver's EndpointAddresses agree.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The objective of this integration was to expose a service through which we would be able to receive a message from an IBM WebSphere Message Broker implementation initially.&amp;nbsp; The intention was that other applications and back-end systems would also be able to utilise this service at a later stage.&amp;nbsp; It had therefore been decided way back in the design stage of the project that we would accomplish this by using the SOAP 1.2 protocol for receiving messages into BizTalk.&amp;nbsp; To implement this on the BizTalk side we published the schema for the message we were expecting as a WCF service, and created the matching receive location.&amp;nbsp; My first mistake was that I thought we could use the WCF-BasicHttp adapter, as the only requirement was that the service needed to adhere to the WS-BasicProfile standard.&amp;nbsp; What I did not know at the time was that the BasicHttp adapter only supports SOAP 1.1, and to use SOAP 1.2 you have to use the WCF-WSHttp adapter.&lt;/P&gt;
&lt;P&gt;After using the command line utility discussed in a &lt;A class="" href="http://blogs.msdn.com/nabeelp/archive/2008/02/26/Switching-a-Published-WCF-Service-between-WSHttp-and-BasicHttp.aspx" mce_href="http://blogs.msdn.com/nabeelp/archive/2008/02/26/Switching-a-Published-WCF-Service-between-WSHttp-and-BasicHttp.aspx"&gt;previous post&lt;/A&gt; to recreate the service and update the receive location, I figured everything would&amp;nbsp;be ready and I started to test the service via SOAP 1.2 again.&amp;nbsp; That was when this rather obscure error was returned in the SOAP response.&amp;nbsp; The actual response looked something like this:&lt;/P&gt;
&lt;P class=CodeSection&gt;&lt;FONT face="Courier, Courier New"&gt;&amp;lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;s:Header&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;a:Action s:mustUnderstand="1"&amp;gt;http://www.w3.org/2005/08/addressing/soap/fault&amp;lt;/a:Action&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Header&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;s:Body&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Fault&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Code&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Value&amp;gt;s:Sender&amp;lt;/s:Value&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Subcode&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Value&amp;gt;a:DestinationUnreachable&amp;lt;/s:Value&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Subcode&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Code&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Reason&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;s:Text xml:lang="en-ZA"&amp;gt;The message with To '' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher.&amp;nbsp; Check that the sender and receiver's EndpointAddresses agree.&amp;lt;/s:Text&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Reason&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Fault&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/s:Body&amp;gt;&lt;BR&gt;&amp;lt;/s:Envelope&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;After scouring the web for an explanation I came across a number of articles that discussed WCF coding changes and endpoint behaviour changes that would remedy the error.&amp;nbsp; The only problem with that is that we do not have access to making code changes, and changing the endpoint behaviour did not make sense either.&amp;nbsp; I also wanted to stay away from implementing custom WCF bindings, as this is supposed to be "out-of-the-box" functionality.&lt;/P&gt;
&lt;P&gt;Eventually I came across this article: &lt;A href="http://msdn2.microsoft.com/en-us/library/bb246105.aspx"&gt;http://msdn2.microsoft.com/en-us/library/bb246105.aspx&lt;/A&gt;, which focuses on using incoming SOAP headers, and&amp;nbsp;I noticed the "To" element within the SOAP Header section.&amp;nbsp; With a little more reading and surfing I came to realise that the WSHttp adapter utilises the WS-Addressing standard to identify the receive location to which the message needs to be submitted.&amp;nbsp; With this knowledge in hand I added the following section to the SOAP message I was sending to BizTalk:&lt;/P&gt;
&lt;P class=CodeSection&gt;&lt;FONT face="Courier, Courier New"&gt;&amp;lt;soap:Header&amp;gt;&lt;BR&gt;&amp;nbsp;&amp;nbsp; &amp;lt;To soap:mustUnderstand="1" xmlns="http://www.w3.org/2005/08/addressing"&amp;gt;http://server1/virtualDir/MyService.svc&amp;lt;/To&amp;gt;&lt;BR&gt;&amp;lt;/soap:Header&amp;gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;The addressing namespace can, of course go into the "Envelope" declaration of the SOAP message, but for simplicity sake I am reflecting it as shown here.&amp;nbsp; &lt;/P&gt;
&lt;P&gt;The URI that is put into the To element is essentially the URI used to get to the service in the first place.&amp;nbsp; A few interesting observations about this URI:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The value of the server name portion of the URI ("server1" in the snippet above) is immaterial.&lt;/LI&gt;
&lt;LI&gt;The portion of the URI after the server name, up to and including the ".svc" must match the URI in your receive location.&lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;After adding this section to the SOAP message and submitting it to BizTalk the message was received and processed successfully.&lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8100727" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/nabeelp/archive/tags/BizTalk/default.aspx">BizTalk</category><category domain="http://blogs.msdn.com/nabeelp/archive/tags/WCF/default.aspx">WCF</category><category domain="http://blogs.msdn.com/nabeelp/archive/tags/SOAP/default.aspx">SOAP</category></item></channel></rss>