title: WCF Post with Query String
body: <p>I am currently developing a Windows Service hosted WCF service. One of the methods has a URI which is set up to receive a callback from a payment provider. This is the interface contract...</p>
  
  <pre><code>    [OperationContract]
      [WebInvoke(UriTemplate = "3DSecureCallback?TrxId={id}", Method = "POST", BodyStyle = WebMessageBodyStyle.Bare)]
      void ThreeDSecureCallBack(string id, Stream body);
  </code></pre>
  
  <p>This issue I am having is that the 3rd party provider posts to our service. I have to provide a callback url to it. So we can reconcile payments, we provide a URL with a query string parameter containing the transaction id. </p>
  
  <p>During development of this service, the call backs have been successful. (This was prior to adding the Steam parameter)</p>
  
  <p>However, we are now at the stage where we need to parse the posted data. This is the point that the 2nd 'Stream' parameter was added to the method signature.</p>
  
  <p>The issue that I am getting is that I receive the following exception...</p>
  
  <pre><code>For request in operation ThreeDSecureCallBack to be a stream the operation must have a single parameter whose type is Stream.
  </code></pre>
  
  <p>By removing the id parameter, and having stream only, we can get the post data. This won't work in practice though as I need to query string paramter also.</p>
  
  <p>Can anyone advise on how to resolve this issue please? I am really at a loss.</p>
  
  <p>Thanks in advance, </p>
  
  <p>David</p>