Re: X509 Signing: criticism on code snippet
- From: "Pablo Cibraro" <pcibraro@xxxxxxxxxxx>
- Date: Fri, 14 Oct 2005 12:27:20 -0300
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
"Mr. BogoMips" <MrBogoMips@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D395530C-E17C-4E11-BC10-68E9CE619E76@xxxxxxxxxxxxxxxx
> 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
.
- Prev by Date: Re: Exception Details: System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later
- Next by Date: Getting rid of custom authentication in the quick starts.
- Previous by thread: Exception Details: System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later
- Next by thread: Getting rid of custom authentication in the quick starts.
- Index(es):
Relevant Pages
|