0

I want to add a tracking identifier to my SOAP requests (for example a GUID). This tracking identifier will change for each request. I can then relate logs from the client to the server.

I know how to add this as a SOAP Header for every request.

I know how to add this as an HTTP Header for every request.

Is there a way to add this as a QueryString parameter in the HTTP request? It won't be used by the WCF Server, it will only be used to correlate the load balancer and web server logs.

Please note, this isn't a WebBinding, it's a SOAP via HTTP using a post.

Community
  • 1
  • 1
Daniel James Bryars
  • 4,429
  • 3
  • 39
  • 57

1 Answers1

0

Look into using a UriTemplate.

Example (simple interface):

  [ServiceContract]
  interface ISomeInterface
  {
     [OperationContract]
     [WebInvoke(Method="POST", UriTemplate="params?n={name}&q={quantity}")]
     void SomeMethod(string name, string quantity);
  }
William Xifaras
  • 5,212
  • 2
  • 19
  • 21