Reputation: 811
We have the webservice xml request as below. for this I have developed the Orchestration. But while we are sending the request to client, we need to add the SOAP header.
Could you suggest me, how can I do this?
WebService XML Request
<?xml version="1.0" encoding="utf-8" ?>
<Request xmlns="http://modeler.ass.abc/efgh/">
<HeaderReq>
<PartnerID>E0</PartnerID>
<TimeStampSubmitted>2013-11-21T18:19:11</TimeStampSubmitted>
<Version>3.0</Version>
</HeaderReq>
<ApplicationREQ>
<ID>1</ID>
</ApplicationREQ>
</Request>
SOAP Header
<soapenv:Header>
<wsse:Security xmlns:wsse="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-wssecurity-secext-1.0.xsd">
<wsu:Timestamp wsu:Id="TS-10">
<wsu:Created>2013-10-11T17:26:52.890Z</wsu:Created>
<wsu:Expires>2013-10-11T17:51:52.890Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken wsu:Id="UsernameToken-10">
<wsse:Username>User</wsse:Username>
<wsse:Password Type="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-username-token-profile-1.0#PasswordText">xxxxxxx</wsse:Password>
<wsse:Nonce EncodingType="http://adb.ddad-sdfad.org/wss/2010/01/fasd-201201-wss-soap-message-security-1.0#Base64Binary">xxxxxxx</wsse:Nonce>
<wsu:Created>2013-10-11T17:26:52.889Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
Upvotes: 0
Views: 2154
Reputation: 3266
You would need to use the property WCF.OutboundCustomHeaders
Example:
xmlDoc.LoadXml("<headers><Origination>Home</Origination><Destination>Work</Destination></headers>");
And then
RequestMessageInstance(WCF.OutboundCustomHeaders) = xmlDoc.OuterXml;
I found this example at this page: http://msdn.microsoft.com/en-us/library/bb246026.aspx
Hope this helps!
Upvotes: 1