Looks like it should be fairly simple from the example provided with WSE 2
install. I get an error on the last line. Retrieve the signing token OK. It's
definitley not nothing. Anything I am doing wrong.
-- IN THE WEB METHOD
Dim x509st As X509SecurityToken
Dim se As ISecurityElement
'loop over security elements in request
For Each se In context.Security.Elements
'when current element is message signature
If TypeOf se Is MessageSignature Then
Dim ms As MessageSignature = se
x509st = ms.SigningToken
End If
Next
'encrypt the response
Dim responseContext As SoapContext = ResponseSoapContext.Current
-- ** ERROR - Refereced security token could not be retrieved **
responseContext.Security.Elements.Add(New EncryptedData(x509st))
SA - 06 Sep 2004 16:11 GMT
You will need to add your security token to the context first, like
responseContext.Security.Tokens.Add(x509st)
HTH

Signature
Sven
> Looks like it should be fairly simple from the example provided with WSE 2
> install. I get an error on the last line. Retrieve the signing token OK. It's
[quoted text clipped - 21 lines]
> -- ** ERROR - Refereced security token could not be retrieved **
> responseContext.Security.Elements.Add(New EncryptedData(x509st))