BizTalk Utilities CV ,   Jobs ,   Code library
 
Go to the front page to continue learning about XML or select below:

Contents

ReBlogger Contents

Previous posts in WSCF/WCF

 
 
Page 17359 of 20233

More on simple tracing in Indigo

Blogger : Musings from Gudge
All posts : All posts by Musings from Gudge
Category : WSCF/WCF
Blogged date : 2005 May 22

A fellow Indigette, Dan Roth, pointed out to me via e-mail and a comment on my earlier blog entry, that I`d neglected to explain *why* the service level message logs contain SOAP headers that were not actually transmitted by the client. This entry attempts to make up for my earlier omission.
 
The binding I`ve used in my samples so far does not actually use WS-Addressing on the wire. This means that the messages sent by the client don`t actually contain wsa:To or wsa:Action headers. However, it is possible to infer the values of those headers from the HTTP Request-URI and the SOAPAction HTTP header respectively. When a message arrives at the service the server-side plumbing for the binding creates the wsa:To and wsa:Action headers and populates the message object with them. This means that other parts of the plumbing (and the application code, if it cares) don`t need to worry about whether the message actually used WS-Addressing or not (at least WRT wsa:To and wsa:Action); the values can always be pulled out of the same place, namely the Headers property of the System.ServiceModel.Message object;
 
  System.ServiceModel.Message.Headers.To
  System.ServiceModel.Message.Headers.Action
 
Inside a the Ping method on the service side, we can get at this information via OperationContext.Current;
 
  OperationContext.Current.IncomingMessageHeaders.To
  OperationContext.Current.IncomingMessageHeaders.Action
 
We could also use
 
  OperationContext.Current.RequestContext.RequestMessage.Headers.To
  OperationContext.Current.RequestContext.RequestMessage.Headers.Action
 
which is slightly more long winded, but shows how you`d get hold of the actual System.ServiceModel.Message object, should you need it.
 

Read comments or post a reply to : More on simple tracing in Indigo
Page 17359 of 20233

Newest posts
 

    Email TopXML