Hi all,
I use WSE 2.0 SP3 (.NET Framewok 1.1) for consume secure web service.
But I try to send the UsernameToken with SOAP Header to the secure web service.
See below,
....
UsernameToken userToken = new UsernameToken(userName,password, PasswordOption.SendPlainText);
SoapContext requestContext = this.objProxyService.RequestSoapContext;
requestContext.Security.Tokens.Add(userToken);
MessageSignature sig = new MessageSignature(userToken);
requestContext.Security.Elements.Add(sig);
......
this.objProxyService.GetValue(); --> Error Appear
But the error is occurred, "Namespace prefix 'soap' not defined".
Does it have problem from the SOAP Message use "soapenv" prefix?
Below is expect SOAP message
<soapenv:Envelope xmlns:ser="http://servicexxxxxxxxxx.xx.xx" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken wsu:Id="UsernameToken-448969DA1257B4367F14967409135479">
<wsse:Username>MyUsername</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">MyPassword</wsse:Password>
<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">dnvHwbnDwj27eNtJhTPpAw==</wsse:Nonce>
<wsu:Created>2017-06-06T09:21:53.547Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
........
How can I solve this problem?
Thank you very much,