Digital Signing the SOAP Message

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 = new 
KerberosToken("host/" + hostname + "@" + domainName);
// Add the security token.                
// Specify the security token to sign the message with.
MessageSignature sig = new MessageSignature(kerbToken);
// Add the digital signature to the SOAP message.


Related Posts:

%d bloggers like this: