Service Manager / Service Center Practitioners Forum
Showing results for 
Search instead for 
Do you mean 

Third party web service connection, Need to us SSL - how?

Highlighted
Frequent Advisor

Third party web service connection, Need to us SSL - how?

Hi All,

 

I am trying to connect to a third party webservice we have on another box (internal in our organisation).  It needs SSL and when i try to connect to the url using HTTPS in javascript i get the following error:

 

Script <unknown script> line 0: ERROR uncaught exception: Error calling method: doHttpRequest in class: com/hp/ov/sm/server/utility/HttpClient Exception (java
x.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderExceptio
n: unable to find valid certification path to requested target) at char 1

 

What do i need to do to get this to work - i am confused with SSL in SM and a lot of the documents are based on using the SM WSDLs, not connecting to a third party service.

 

Thanks

7 REPLIES
Frequent Advisor

Re: Third party web service connection, Need to us SSL - how?

Ok i have worked it out a bit more.

 

When i connect to the URL in IE i can see the certificate and export it.  I guess i need to now import this into SM.  

Frequent Advisor

Re: Third party web service connection, Need to us SSL - how?

Hi,

Please let us know the procedure you followed to import certificates to SM.

 

Many Thanks

Respected Contributor [Founder]

Re: Third party web service connection, Need to us SSL - how?

Please explain the steps which are taken when you see this error. Usually this type of handshake method is 'SIngle Handshake' meaning the webservice application would have a truststore and keystore (usually for SM apps). If the user is inside Service Manager and clicks on something which take them to another application requring SSL then you need to add the certificate to the browser so the browser trusts that application.

Frequent Advisor

Re: Third party web service connection, Need to us SSL - how?

Hi Brett,

Thanks for the reply. I am calling an external web service inside my javascript of HPSM using dohttprequest function.

same is workign fine for non-SSL URL. We are facing issue only with the SSL url.

Please help.

Thanks

Trusted Contributor [Founder]

Re: Third party web service connection, Need to us SSL - how?

Please can you give me the steps you used to import certificate into SM cacerts certificate.

 

Respected Contributor

Re: Third party web service connection, Need to us SSL - how?

You need to open a command prompt and drill down to where you have Java installed on your computer, then put the certificate and the cacerts file in the same folder as the keytool utility and then run the following command from within that same folder.

%KEYTOOL% -import -alias %1 -file %FILE% -keystore cacerts -storepass %cacerts_password%

Replace %KEYTOOL%. with where you have Java installed such as C:\Program Files (x86)\Java\jdk1.5.0_11\jre\bin\keytool

Replace %1 with whatever you want to use as a name for the certificate within the file.

Replace %FILE% with the name of your certificate.

Replace %cacerts_password% with the password of cacerts.

This may not be perfect, but it'll be close to being right. :-)

 

 

 

Trusted Contributor [Founder]

Re: Third party web service connection, Need to us SSL - how?

please let me know how you made to work because I'm also having same type of issue