title: Java HTTP Post against .NET WCF - "ContractFilter mismatch at the EndpointDispatcher"
body: <p>I have a WCF service that one of our clients is trying to connect too using Java. They are doing a HTTP Post using the following XML.</p>
  
  <p>I'm getting an error outlined below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
      &lt;env:Header&gt;&lt;/env:Header&gt;
      &lt;env:Body&gt;
          &lt;req:GetLeads xmlns:req="http://tempuri.org"&gt;
              &lt;userName&gt;blah&lt;/userName&gt;
              &lt;password&gt;blow&lt;/password&gt;
              &lt;startDateTime&gt;2010-09-24T12.01.37&lt;/startDateTime&gt;
              &lt;endDateTime&gt;2011-03-25T09.07.41&lt;/endDateTime&gt;
          &lt;/req:GetLeads&gt;
      &lt;/env:Body&gt;
      &lt;/env:Envelope&gt;
  </code></pre>
  
  <p>Error Message</p>
  
  <pre><code>The message with Action 'https://carinsuranceapp.uat.infochoice.com.au/LeadReports.svc/basic' 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).
  </code></pre>
  
  <p>Stack Trace</p>
  
  <pre><code>at System.ServiceModel.Dispatcher.ErrorBehavior.ThrowAndCatch(Exception e, Message message)
            at System.ServiceModel.Dispatcher.ChannelHandler.ReplyFailure(RequestContext request, Message fault, String action, String reason, FaultCode code)
            at System.ServiceModel.Dispatcher.ChannelHandler.ReplyContractFilterDidNotMatch(RequestContext request)
            at System.ServiceModel.Dispatcher.ChannelHandler.EnsureChannelAndEndpoint(RequestContext request)
            at System.ServiceModel.Dispatcher.ChannelHandler.TryRetrievingInstanceContext(RequestContext request)
            at System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext request, OperationContext currentOperationContext)
            at System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)
            at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
            at System.Security.SecurityContext.Run(SecurityContext securityContext, ContextCallback callback, Object state)
            at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
            at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
            at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
            at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
            at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
            at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
  </code></pre>