Calling WebService using SSL
Miguel Angel Torres Avila <[email protected]> Thu, 10 Mar 2011 21:19:36 -0600
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi List,
I have been developing a java .jar that encapsulates the call to a WebService using SSL.
In order to test it I created a simple java application and included the jar and the app worked fine.
But once I include the jar in a WebObjects Wonder application and try to use it I get the following error:
ERROR [Timer-0] - + ErrorHandler::handleFatalError::Error al timbrar el CFDI javax.xml.ws.WebServiceException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
It looks like a problem with the certificate that I am using to get connected.
This is part of the code I am using to set the keystore to my application:
System.setProperty("javax.net.debug", "all");
System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStore", pathToCertificate);
System.setProperty("javax.net.ssl.keyStorePassword", password);
System.setProperty("sun.security.ssl.allowUnsafeRenegotiation", "true");
In my code I am setting a property to debug the connection process:
System.setProperty("javax.net.debug", "all");
If I run the simple Java application I get info like this:
%% Created: [Session-2, SSL_RSA_WITH_RC4_128_MD5]
** SSL_RSA_WITH_RC4_128_MD5
[read] MD5 and SHA1 hashes: len = 74
0000: 02 00 00 46 03 01 4D 78 EA 3A 10 98 50 8F 19 B5 ...F..Mx.:..P...
0010: 31 5A 6E C0 B8 CA 7B 34 C3 23 61 EE 96 A2 8F DA 1Zn....4.#a.....
0020: C4 77 CD 5A 82 A1 20 E4 31 7E 77 0F A2 A2 F8 99 .w.Z.. .1.w.....
0030: 7C 14 54 F4 AF 07 7B C9 D9 2B 5F BA D8 A6 65 65 ..T......+_...ee
0040: 3C 40 96 1B E9 15 1C 00 04 00 <@........
But when I run my WO application I don't get any message I would expect at least messages indicating that it is trying to connect to the WebService.
Is there something that I have to configure in a WebObjects Wonder application in case y need to work with secure connections?????
It seems like when I run the WO applications the System properties are not set or something like that.
I am really lost, any help will be really appreciated.
_______________________________
Ing. Miguel Angel Torres Avila
Director General
Tel: +52 (33) 3367 1892
Cel: +52 (33) 3106 8758
E-mail: [email protected]
www.toracom.net
_______________________________________________
WebObjects-dev mailing list
[email protected]
http://www.omnigroup.com/mailman/listinfo/webobjects-dev