troubleshooting Question

Calling HTTPS webservices using Axis and Soap

Avatar of prohacx
prohacx asked on
Java EE
9 Comments1 Solution10501 ViewsLast Modified:

I'm pretty new in this webservice thing and I want to call a webservice deployed over HTTPS.

My current code is like so:

        System.setProperty("", "CustomKeyStore");
        System.setProperty("", "littlesecret");
      String endpoint = "https://brsla-cadev-vm3/axis/services/USD_R11_WebService?wsdl";
      String user = "someuser";
      String pwd = "somepassword";

            // create a new web service stub instance
          USD_WebServiceLocator ws = new USD_WebServiceLocator();
 url = new;
          USD_WebServiceSoap usd = ws.getUSD_WebServiceSoap(url);
            // login to server
            int sid = usd.login(user, pwd);

When deploying the service over HTTP I don't have any problems and can access all methods of the web service. However, over HTTPS, I keep on getting Java errors.

I already created a keystore and it looks like the code has no problems accessing that. However, now I run in errors like this: PKIX path building failed: unable to find valid certification path to requested target

All I'm looking for is a simple example of calling a method over HTTPS, but I seem to be unable to find that anywhere. Kind of stuck here....

Can anyone help me please?

Thanks in advance!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros