title: Can I use WCF wsHttpContextBinding with WSIT (Metro) clients?
body: <p>I am working on a WCF - WSIT (Metro) integration project and I would like to allow Java clients to connect to Durable Services. </p>
  
  <p>Durable Services
  <a href="http://msdn.microsoft.com/en-us/library/bb410767(v=vs.90).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/bb410767(v=vs.90).aspx</a></p>
  
  <p>Durable services require wsHttpContextBinding, which seems to be working fine. The only issues is that the WSIT client generated proxy doesn’t seem to be able to assign a instanceId to the soap envelope. Is there a config setting I am not aware of or maybe a way to intercept the outgoing messages and append the instanceId? </p>
  
  <p>The following SOAP example is generated by a .NET client. The only difference between the envelop WSIT send and this one is that the Context node is missing from the WSIT one: </p>
  
  <pre><code>      &lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:r="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:a="http://www.w3.org/2005/08/addressing"&gt;
          &lt;s:Header&gt; 
  ...
            &lt;Context xmlns="http://schemas.microsoft.com/ws/2006/05/context"&gt;
              &lt;Property name="instanceId"&gt;{I want to set this Id}&lt;/Property&gt;
            &lt;/Context&gt;
  ...
          &lt;/s:Header&gt;
          &lt;s:Body&gt;
            &lt;IncreaseCounter xmlns="http://tempuri.org/"/&gt;
          &lt;/s:Body&gt;
        &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>I hope it makes sense. The question is not ws2007HttpBinding or wsHttpBinding related or WCF instance management related like; per/call, session, single. I need help with the WSIT, Java bit only. </p>