I am using AfterReceiveRequest() method as below
public object AfterReceiveRequest(ref System.ServiceModel.Channels.Message request, System.ServiceModel.IClientChannel channel, System.ServiceModel.InstanceContext instanceContext)
{
}
I am getting entire message header as shown below (request.ToString()):
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<MyHeader xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AppIp xmlns="http://schemas.datacontract.org/2004/07/WcfTest">192.168.1.0</AppIp>
<AppPwd xmlns="http://schemas.datacontract.org/2004/07/WcfTest">UITPass</AppPwd>
<Appid xmlns="http://schemas.datacontract.org/2004/07/WcfTest">UIT</Appid>
<ShibbolethSessionID i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/WcfTest" />
<UCLALogonID i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/WcfTest" />
<UserUID i:nil="true" xmlns="http://schemas.datacontract.org/2004/07/WcfTest" />
</MyHeader>
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://localhost:60729/Service/StudyListService.svc</To>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://tempuri.org/IStudyListService/GetStudyListData</Action>
</s:Header>
</s:Envelope>
I want to read node using request.Headers.MyHeader
By default request.Headers is giving properties for To and Action nodes like shown below:
request.Headers.To
request.Headers.Action
Similary is there any way to get request.Headers.MyHeader ?
Any ideas is appreciated.