This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Cloud Application Architecture Patterns: Designing, Building, and Modernizing for the Cloud and have Kyle Brown, Bobby Woolf and Joseph Yodor on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JAX-WS and javax.net.ssl.SSLKeyException

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
reply
    Bookmark Topic Watch Topic
  • New Topic