Skip to main content

Metro web service client and certificates error

2 replies [Last post]
Anonymous

Hi,

I am trying to connect to a HTTPS web service using metro 2.1. I have
downloaded the certificate from the browser and used keytool to import the
client certificate. Initially, I used JSSE to direct my client to use the
certificates from a file. Unfortunately, it didnt work as I am getting
*com.sun.xml.ws.client.ClientTransportException: HTTP transport error:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target*

Then I tried updating the cacerts file of my jre. This didnt help either.
Could someone please point what could I be missing.

Thanks,
Atique

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Glen Mazza

Almost certainly, it's not finding the truststore that has the public
cert in it; meaning it's either using a truststore different from the
one you think it's using (do you have multiple JRE's on your machine?
Does "java -version" from a command prompt point to the correct JRE
folder), or you've downloaded the wrong public cert.

Here's my tutorial on SSL w/web services:
http://www.jroller.com/gmazza/entry/ssl_for_web_services

HTH,
Glen

On 07/29/2012 05:43 AM, atiquek wrote:
> Hi,
>
> I am trying to connect to a HTTPS web service using metro 2.1. I have
> downloaded the certificate from the browser and used keytool to import the
> client certificate. Initially, I used JSSE to direct my client to use the
> certificates from a file. Unfortunately, it didnt work as I am getting
> *com.sun.xml.ws.client.ClientTransportException: HTTP transport error:
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target*
>
> Then I tried updating the cacerts file of my jre. This didnt help either.
> Could someone please point what could I be missing.
>
> Thanks,
> Atique
>
>
>
>
>

Kumar Jayanti Guest
Offline
Joined: 2011-04-02
Points: 0

Does the SSL WebService require Client-Certificate ?. Or are you just looking at validating/trusting the server certificate ?.

On Jul 29, 2012, at 3:13 PM, atiquek wrote:

> Hi,
>
> I am trying to connect to a HTTPS web service using metro 2.1. I have
> downloaded the certificate from the browser and used keytool to import the
> client certificate. Initially, I used JSSE to direct my client to use the
> certificates from a file. Unfortunately, it didnt work as I am getting
> *com.sun.xml.ws.client.ClientTransportException: HTTP transport error:
> javax.net.ssl.SSLHandshakeException:
> sun.security.validator.ValidatorException: PKIX path building failed:
> sun.security.provider.certpath.SunCertPathBuilderException: unable to find
> valid certification path to requested target*
>
> Then I tried updating the cacerts file of my jre. This didnt help either.
> Could someone please point what could I be missing.
>
> Thanks,
> Atique
>
>
>
>
>