Advertisement

05.19.2008 at 10:53AM PDT, ID: 23414565
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.2

How do I setup an AXIS client on Tomcat when the target WebService(WSDL) uses SSL?

Asked by tmorv in Apache Tomcat Application Server, Eclipse, Java Application Servers

Tags: ,

I have developed a WebService client using apache AXIS. This was done using "New Web Service Client" wizard in Eclipse. The WebService itself was made using .NET and has a WSDL file attached to it. I used this WSDL file as a basis for the wizard. At this time the WebService wasn't using SSL. The wizard generated all necessary Java classes and I could immediately access the WebService.

Then my software partner changed the WebService to use SSL instead of plain HTTP access. It still worked fine on my computer even when SSL was turned on. Later on I deployed this on our server (Windows 2003) and I got this exception:

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

I then was a bit confused that it suddenly stopped working. I have been looking for an answer on this site and I found many solutions - but none of them has worked for me.

I tried to install a certificate from my software partner who made the webservice. I did this using the control panel in Java. I still got the same exception. I then tried the keytool but with the same results. I also tried creating my own keystore file for my web application and adding the certificate there. Also this without any success.

I then created a JSP file which accesses the same SSL webservice and it actually manages to read it!

The development was done on a Mac OSX(leopard, java 1.5) and also tested successfully on a Windows Vista 32bit Java 1.6.

Can anyone please help me?

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
try {
        URL url = new URL( "https://server/webservice.asmx" );
        InputStream in = url.openStream();
        int chunkSize = 1024;
 
		int count;
		ByteArrayOutputStream bo = new ByteArrayOutputStream();
		byte[] b = new byte[chunkSize];
		try {
			while ((count = in.read(b, 0, chunkSize)) > 0)
				bo.write(b, 0, count);
			byte[] thebytes = bo.toByteArray();
			String s = new String( thebytes );
			System.out.println( s );
		} finally {
			bo.close();
			bo = null;
		}
    } catch (Exception e) {	
    	e.printStackTrace();
    }
 
Loading Advertisement...
 
[+][-]05.19.2008 at 11:47PM PDT, ID: 21603970

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 03:46AM PDT, ID: 21604844

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.20.2008 at 03:48AM PDT, ID: 21604853

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.05.2008 at 11:40PM PDT, ID: 21726705

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Apache Tomcat Application Server, Eclipse, Java Application Servers
Tags: Java, PKIX path building failed
Sign Up Now!
Solution Provided By: tmorv
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628