Hello All,
I'm attempting to execute a secured webservice over an https connection.
I followed all the documentation provided with the WSW2.0 sp2 but
unfortunately I get a final error message related to x509 digital signing of
the message.
The Webserivce runs on BEA WebLogic Server 8.1
I would show you the process and the code I've written down to get possibly
suggestions and criticism to point me on the way.
1. I've got the .wsdl and, by wsdl.exe I've generated the proxy class
2. I've changed the superclass to WebServicesClientProtocol
3. I've write the following code:
// BEGIN C# Snippet
X509SecurityToken signatureToken = GetSecurityToken(); // OK
GetDocumentSoapService svc = new GetDocumentSoapService(); // The Proxy
// HTTPS Configuration cut off...
SoapContext requestContext = svc.RequestSoapContext;
requestContext.Security.Tokens.Add(signatureToken);
MessageSignature sig_c = new MessageSignature(signatureToken);
requestContext.Security.Elements.Add(sig_c);
requestContext.Security.Timestamp.TtlInSeconds = 60;
svc.executeTheRemoteMethod("Hello World!");
// END C# Snippet
I receive the following error message:
// BEGIN ERROR MESSAGE
An unhandled exception of type
'System.Web.Services.Protocols.SoapHeaderException' occurred in
system.web.services.dll
Additional information: Could not resolve key for signature
weblogic.xml.security.signature.Signature@4719a8
// END ERROR MESSAGE
Where I'm wrong?
Thanks in advance
Pablo Cibraro - 14 Oct 2005 16:20 GMT
Hi,
You are not specifying what elements should be signed with the signature.
(Signature references).
I recommend you to use a policy file instead of code to describe the
security requeriments for your service.
Regards,
Pablo Cibraro
http://weblogs.asp.net/cibrax
> Hello All,
> I'm attempting to execute a secured webservice over an https connection.
[quoted text clipped - 41 lines]
>
> Thanks in advance