vtputil.UtilSoapClient util = new vtputil.UtilSoapClient(); using (new OperationContextScope(util.InnerChannel)) { // Add a SOAP Header to an outgoing request MessageHeader aMessageHeader = MessageHeader.CreateHeader("ServiceAuthHeader", "http://viettelpost.org/", new vtputil.ServiceAuthHeader() { Token = "40872835345345D7A3DBEEC5213062F1" }); OperationContext.Current.OutgoingMessageHeaders.Add(aMessageHeader); util.ListBKCompleted += BindDSBKCompleted; util.ListBKAsync(""); }
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <ServiceAuthHeader xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://viettelpost.org/"> <Token xmlns="http://schemas.datacontract.org/2004/07/PanoramaApp1.vtputil">4087283037AAC3D7A3DBEEC5213062F1</Token> </ServiceAuthHeader> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ListBK xmlns="http://viettelpost.org/"> <FIND/> </ListBK> </s:Body> </s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:viet="http://viettelpost.org/"> <s:Header> <ServiceAuthHeader xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://viettelpost.org/"> <viet:Token xmlns="http://schemas.datacontract.org/2004/07/PanoramaApp1.vtputil">4087283037AAC3D7A3DBEEC5213062F1</viet:Token> </ServiceAuthHeader> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <ListBK xmlns="http://viettelpost.org/"> <FIND/> </ListBK> </s:Body> </s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:viet="http://viettelpost.org/"> <Token xmlns="http://schemas.datacontract.org/2004/07/PanoramaApp1.vtputil">4087283037AAC3D7A3DBEEC5213062F1</Token> <viet:Token xmlns="http://schemas.datacontract.org/2004/07/PanoramaApp1.vtputil">4087283037AAC3D7A3DBEEC5213062F1</viet:Token>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)