简体   繁体   中英

How to create a webservice client to a secure webservice at localhost

I have created a webservice and it has deployed on localhost. When I browse the WSDL using browser https://localhost:8181/Test/TestOne?wsdl it shows me the WSDL.

But when I try to create client program (I am using NetBeans 7.0) and give this URL for the WSDL URL, it shows me error message that wsdl Problem with downloading wsdl or schema file.... . I tried editing the proxy to use system proxy settings also but no luck. Am I doing something wrong or is this a bug in NetBeans?

I think your server doesn't use a certificate signed by CA. So, you need to create a keystore with certificate and pass "-Djavax.net.ssl.trustStore=" parameter to NetBeans.

Open the wizard for setting the attributes for the WebService: right mouse click on the Web Service reference in the client application, choose Edit WebService Attributes, go to Wsimport options tab, and correct the property wsdlLocation as follows:

from: https://<address>:8181/<ws-url>?wsdl
to: /META-INF/wsdl/<address>_8181/<ws-url>.wsdl 

more info here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM