I havent tried this out. But I guess that this should help. Its a remedy to
your problem.

http://wso2.org/blog/dims/1906

Thanks,
Keith.

On 7/11/07, Wah Yim <[EMAIL PROTECTED]> wrote:

Thanks Jennifer.  Actually, I found out that I forgot to set the
environment variables "https.proxyHost" and "https.proxyPort" as well.
Once I've set these variables my wsdl2java is running fine =)

However, I'm running into the same "No route to host: connect" error again
when I actually tried connecting to the web service over HTTPS.  Despite
setting the related environment variables using "System.setProperty(...)"
and adding the lines that you have suggested, I'm still getting the same
error.  It seems like Axis2 is ignoring those system variables.  I've also
tried the ProxyProperties code as suggested in the documentation (my sample
code uses XMLBeans binding):

            HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties.ProxyProperties();
            proxyProperties.setProxyName("...");   // my proxy hostname
            proxyProperties.setProxyPort(...);   // my proxy port

            stub._getServiceClient().getOptions().setTransportInProtocol(
Constants.TRANSPORT_HTTP);
            stub._getServiceClient().getOptions().setProperty(
HTTPConstants.PROXY, proxyProperties);

But I still get the same error.  Any suggestions?

Thanks,
-wah


----- Original Message ----
From: "Ford, Jennifer M." <[EMAIL PROTECTED]>
To: [email protected]
Sent: Tuesday, July 10, 2007 2:00:39 PM
Subject: RE: [Axis2] wsdl2java problem with HTTPS

Have you tried adding the lines:

System.setProperty( "java.protocol.handler.pkgs", "
com.sun.net.ssl.internal.www.protocol");

Security.addProvider( new com.sun.net.ssl.internal.ssl.Provider() );

System.setProperty("javax.net.ssl.trustStore", path/to/your/java/keystore);
//Path is usually HOME_DIRECTORY/.keystore

You would also need to use the java keytool to add the site's certificate
to the keystore.

 ------------------------------
*From:* Wah Yim [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, July 10, 2007 11:54 AM
*To:* [email protected]
*Subject:* [Axis2] wsdl2java problem with HTTPS

 Hello,

I have been having this issue with wsdl2java over HTTPS for a few days
now, I have searched through some of the older posts regarding to this
topic, but my problem is a little bit different, so hopefully someone can
help me with this.

Basically, when I run wsdl2java on a WSDL over HTTP, it works fine.
However, when I run it over HTTPS, some give me "No trusted certificate
found" (a common problem based on the archived posts I've seen), but the
actual WSDL that I'm interested in always give me "No route to host:
connect" error.  I'm able to find a similar WSDL on HTTPS that gives me the
same "No route to host: connect" problem:

https://adcenterapi.microsoft.com/v4/Reporting/Reporting.asmx?wsdl

Now, here are a few additional piece of information about my issue:

1) I'm running wsdl2java behind a company firewall, but I have already
passed in the environment variables "http.proxyHost" and "http.proxyPort"
and this is working based on the results I'm getting with wsdl2java when
running against a WSDL over HTTP.

2) The WSDL over HTTPS that are giving me "No route to host: connect"
error are all .NET services.

3) I know that these services are working because I'm able to view the
WSDL through IE, and the HTML version of the web service works (for the
Microsoft Ad Center example shown above, I can type in the URL in IE without
the "?wsdl" suffix to access the HTML version of the web service).

Any help is greatly appreciated, thanks!!

-wah




--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Reply via email to