This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes JAX-WS and javax.net.ssl.SSLKeyException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-WS and javax.net.ssl.SSLKeyException" Watch "JAX-WS and javax.net.ssl.SSLKeyException" New topic
Author

JAX-WS and javax.net.ssl.SSLKeyException

Ong Vua
Ranch Hand

Joined: Jan 24, 2008
Posts: 59
I got the error using JDeveloper 11.1.1.2

javax.xml.ws.WebServiceException: javax.net.ssl.SSLKeyException: [Security:090504]Certificate chain received from secure-ausomxdsa.crmondemand.com - 141.146.149.220 failed hostname verification check. Certificate contained secure-ausomxdsa.crmondemand.com but check expected secure-ausomxdsa.crmondemand.com

This WS uses policy Wssp1.2-2007-Https-UsernameToken-Plain.xml and the certificate was issued by Verisign. Below is my code

In the service class, I added the annotation.

@Policy(uri = "policy:Wssp1.2-2007-Https-UsernameToken-Plain.xml")
public class IntegrationEventWS
extends Service {

}

In my client class, here's my code to call the WS

ArrayList credentialproviders = new ArrayList();
CredentialProvider cp = new ClientUNTCredentialProvider(username.getBytes(),password.getBytes());
credentialproviders.add(cp);

IntegrationEventWS service = new IntegrationEventWS()
DefaultBindingIntegrationEventWS port = service.getDefault();
BindingProvider bp = (BindingProvider)port;
Map<String, Object> ctx = bp.getRequestContext();
ctx.put(WSSecurityContext.CREDENTIAL_PROVIDER_LIST,credentialproviders);

In Weblogic 10.3.2, under Keystores, I selected "Custom Identity and Java Standard Trust" and leave everything default

Do you have any ideas how to fix this?

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAX-WS and javax.net.ssl.SSLKeyException
 
Similar Threads
WebServiceException: HTTP Status-Code 404
web service security issue
JAX-WS - understanding BindingProvider
problem with jax-ws trying to overide default callback endpoint address
JAX-WS Consuming Exchange Web Services with java using glassfish, error authentication: Unauthorized