users@jax-ws.java.net

RE: [nbusers] JAX-WS 2.0 Web service client in Netbeans 5 hitting HTTPS web service and getting error, help?

From: Lucuk, Pete <pete.lucuk_at_ngc.com>
Date: Thu, 16 Feb 2006 10:05:00 -0500

First off, sorry about the return receipt in the previous email, I
forgot to turn it off, my bad

Anyways, I tired importing the cert. To my $HOME/.keystore and it still
did not work.

Poked around this morning and added the following to my netbeans shell
script in bin and got it to work!.......


             -J-Djavax.net.ssl.trustStore=/home/my_user_name/.keystore \
           -J-Djavax.net.ssl.trustStorePassword=my_pass_word \

Hope this helps some one!

Also I would think it would be a good idea to start including HTTPS
stuff like the above in ALL of the tutorials.
Not too many enterprises that do not uses HTTPS externally and even
internally anymore.

Thanks




>-----Original Message-----
>From: Lukas Jungmann [mailto:Lukas.Jungmann_at_Sun.COM]
>Sent: Wednesday, February 15, 2006 2:22 PM
>To: nbusers_at_netbeans.org
>Subject: Re: [nbusers] JAX-WS 2.0 Web service client in
>Netbeans 5 hitting HTTPS web service and getting error, help?
>
>Lucuk, Pete wrote:
>> Hello All,
>>
>> Here is the high level of the problem......
>>
>> I created a HTTP JAX-WS 2.0 server and client in Netbeans 5
>based on a
>> modified*
>**_http://www.netbeans.org/kb/50/jaxws20.html_**********. *
>> Everything works like a champ!
>>
>> - create JAX-WS 2.0 web service in Netebans 5
>> - put web service war file in a Tomcat 5.5.12 container
>> outside of netbeans
>> - created JAX-WS 2.0 web service client in Netbeans 5
>> - during precompile I generate all the code from the
>> URL wsdl="http://servername:8080/JAX-WS20Project/test?wsdl"
>>
>> - then comile the main driver
>> - then I run the client in Netbeans that hits the HTTP Tomcat
>> 5.5.12* and no problems!*
>>
>> *BUT then I try to do the same thing using a HTTPS Tomcat like
so.....*
>>
>> Added the following to netbeans.conf and different variations tried
>> with* no luck*.....
>>
>> netbeans_default_options="-J-Xms256m -J-Xmx512m
>> -J-XX:PermSize=32m -J-XX:MaxPermSize=96m -J-Xverify:none
>> -J-Dapple.laf.useScreenMenuBar=true
>> -Djavax.net.ssl.keyStore=/absolute_path_to_keystore/keystore
>> -Djavax.net.ssl.keyStorePassword=tomcat
>> -Djavax.net.ssl.trustStore=/absolute_path_to_keystore/keystore
>> -Djavax.net.ssl.trustStorePassword=tomcat"
>>
>> And got errors on the command line starting the above options* were
>> ignored*
>>
>> Then I added........
>>
>> -Djavax.net.ssl.keyStore=/absolute_path_to_keystore/keystore
>> -Djavax.net.ssl.keyStorePassword=tomcat
>> -Djavax.net.ssl.trustStore=/absolute_path_to_keystore/keystore
>> -Djavax.net.ssl.trustStorePassword=tomcat
>>
>> To the Netbeans web service client
>> properties->build->compiling->additional compiler options and also
>> properties->run->vm options* with no luck*
>>
>> - create JAX-WS 2.0 web service in Netebans 5
>> - put web service war file in a Tomcat 5.5.12 HTTPS
>container
>> outside of netbeans
>> - attempt to create JAX-WS 2.0 web service client in
>Netbeans
>> 5 against the URL
>wsdl="https://servername:8443/JAX-WS20Project/test?wsdl"
>> and get this.......
>>
>> init:
>> deps-jar:
>> running wsimport
>> error: failed to parse document at
>> "___https://servername:8443/JAX-WS20Project/test?wsdl_":
>> 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
>>
>> compile:
>> BUILD SUCCESSFUL (total time: 1 second)
>>
>>
>> *Where and how do I setup Netebans/JAX-WS so that it can see
>and trust
>> the self signed certificate I created on my Tomcat 5.5.12 and let me
>> generate the needed code to run the client?*
>
> Try to import the certificate to your default keystore (by default
>$HOME/.keystore) and restart IDE (that's how it has been
>working for me). Also try to use google, i'm sure that i
>answered similar question some time ago but I don't know if on
>nbusers or nbj2ee :-(.
>
>>
>>
>> Thanks much!
>>
>
>--lukas
>