NotMyRealName221
Programmer
This is my code, inside a SOAP Extension:
obviously not the complete listing but you get the idea. That is creating this SOAP header:
What I want is:
I can change the name of custom header class from myHeader to SessionId that will change the first tag, but then I want to set the value directly rather than have another tag inside it. How would I do that?
Thanks
Code:
public void AddSessionId(SoapMessage message)
{
myHeader SessionHead = new myHeader();
SessionHead.SessionId = _SessionId + "|" + _Sequence;
message.Headers.Add(SessionHead);
}
public class myHeader : SoapHeader
{
public string SessionId;
}
obviously not the complete listing but you get the idea. That is creating this SOAP header:
Code:
<soap:Header><myHeader><SessionId>H8SDF876|0</SessionId></myHeader></soap:Header>
What I want is:
Code:
<soap:Header><SessionId>H8SDF876|0</SessionId></soap:Header>
I can change the name of custom header class from myHeader to SessionId that will change the first tag, but then I want to set the value directly rather than have another tag inside it. How would I do that?
Thanks