WSE 2.0 - SoapHeaders, Signatures and DigestValue

N

nsyforce

I have a need to create a generic CCW that adds a username token to
soap request to a web service. However, I have to do this generically
for any web service. Thus, I'm not using a proxy at design time. This
is to support legacy VB6 apps so we don't have to write a CCW for every
single web service that we want to apply WS Security to.

The solution I'm trying to use is to create my own HttpWebRequest and
create my own header information to send to the Web Service. I'm having
problems with creating the information that supports adding a user
token through a MessageSignature to the
requestContext.Security.Elements.

I can see that the reference element has a URI that ties it back to
another item in the soap header. Consider the following:
<wsa:Action
wsu:Id="Id-60fc6e83-9022-4965-99c9-670b249d3281">http://tempuri.org/HelloMsXmlEnc</wsa:Action>
....
<Reference URI="#Id-60fc6e83-9022-4965-99c9-670b249d3281">
<Transforms>
<Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#" />
</Transforms>
<DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
<DigestValue>xBPdU+CihzhpR7eBBHL66KNdW/4=</DigestValue>
</Reference>

I've been searching everywhere, and I'm trying to find the answer to
these 2 questions:

1. What is the decrypted value of digestValue?
2. I'm using the following code to try and generate this info, but
can't figure out how to get the digestValue populated. Does anyone
know how I do that?

MessageSignature mesSig = new MessageSignature();
SignatureReference soapRef = new
SignatureReference("#Id:05d2518d-d6db-481f-846d-2e8872b6e56d");
soapRef.AddTransform(new XmlDsigExcC14NTransform());
mesSig.AddReference(soapRef);

Thanks in advance for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top