16
Aug
2008
Aug
2008
Digital Signing the SOAP Message
Author: Kalyan Bandarupalli. categories: Webservices
WSE allows you to digitally sign a SOAP Messages by overriding the SecureMessage method.
To sign a SOAP message
1. The following code example overrides the SecureMessage method.
public override void SecureMessage(SoapEnvelope envelope, Security security)
{//Obtain the security token with which you want to sign the SOAP message with.
KerberosToken kerbToken = newKerberosToken("host/" + hostname + "@" + domainName);// Add the security token. security.Tokens.Add(kerbToken);// Specify the security token to sign the message with. MessageSignature sig = new MessageSignature(kerbToken);// Add the digital signature to the SOAP message. security.Elements.Add(sig);
}
Pingback: Tech Bubbles » Overview of WSE 3.0()
Pingback: DotNetKicks.com()