Normally to access a https service you need to have these variables set in
your java runtime

System.setProperty("javax.net.ssl.trustStore", "keys/sec.jks");
System.setProperty("javax.net.ssl.trustStorePassword", "password");
System.setProperty("javax.net.ssl.trustStoreType","JKS");

try to set these variables editing wsdl2java.sh file.
eg. -Djavax.net.ssl.trustStore="keys/sec.jks"

thanks,
Amila.

On Wed, Nov 5, 2008 at 6:27 PM, Sagara Gunathunga <
[EMAIL PROTECTED]> wrote:

> HI,
> I have exposed  a web service over HTTP/S using AXIS2 and Synapse's
> HttpCoreNIOSSLListener , now I can see WSDL endpoints generated as follows .
>
> * <wsdl:port name="PayfoneServiceHttpsSoap11Endpoint"
> binding="ns:PayfoneServiceSoap11Binding">
>             <soap:address location="
> https://sagara-desktop:9002/axis2/services/PayfoneService.PayfoneServiceHttpsSoap11Endpoint
> "/>
> </wsdl:port>*
>
> But when I try to genarate client codes with WSDL2JAVA it give following
> error .
>
> Retrieving document at '
> https://192.168.102.73:9002/web/services/PayfoneService?wsdl'.
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:156)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: javax.wsdl.WSDLException: WSDLException: faultCode=OTHER_ERROR:
> Unable to resolve imported document at '
> https://192.168.102.73:9002/web/services/PayfoneService?wsdl'<https://192.168.102.73:9002/web/services/PayfoneService?wsdl%27>.:
> 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
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:288)
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:111)
>         ... 2 more
> Caused by: 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
>         at
> com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
>         at
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1518)
>         at
> com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
>
>
>
>
> In the client machine, I dint configure  any certificates and I use
> untrusted certificate in server too, I'm bit of confusing with following
> questions
>
>
> 1.) In ordered to genarate client code  using WSDL2JAVA do I have to
> configure any certificate in client side ....?
>
> 2.) I'm not sure whether I'm following the correct way  , if not please
> proved what is the recommended way to use HTTP/S transport with AXIS2 ..?
>
>
> Thanks
>
> --
> Sagara Gunathunga
>
> Blog - ssagara.blogspot.com
> Web - http://sagaras.awardspace.com/
>



-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Reply via email to