Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to pass security token in header of a soap request from c# code as per the sample below

<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-8">
<wsse:Username>rrrrr</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">test</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">f8nUe3YupTU5ISdCy3X9Gg==</wsse:Nonce>
<wsu:Created>2011-05-04T19:01:40.981Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>


What I have tried:

I tried various methods but nothing worked for me

My service url is

http://nclpwntapp10188.devaonnet.aon.net:9089/ECMGenericWS/v2/ECMGenericWS/ECMGenericWS.wsdl[^]
Posted
Updated 25-Jul-19 5:20am
v2

1 solution

Have you tried using the WSE (Web Services Enhancements) for Microsoft .NET package from Microsoft?
Download Web Services Enhancements (WSE) 2.0 SP3 for Microsoft .NET[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900