Sunday, November 16, 2014

Calling a web service using wsimport from a proxy internet connection

When you try to access a basic web service using the wsimport command from your system to a valid web service over a proxy network there is a chance that you might be getting the below error

[ERROR] Connection timed out: connect

Failed to read the WSDL document: http://www.webservicex.net/geoipservice.asmx?W
SDL, because 1) could not find the document; /2) the document could not be read;
 3) the root element of the document is not <wsdl:definitions>.


[ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s):

 At least one WSDL with at least one service definition needs to be provided.


        Failed to parse the WSDL.


To resolve this issue you should specify the proxy server host and port also along with the wsimport command.

>wsimport -httpproxy:<Proxy Host>:<Proxy Port> http://www.webservicex.net/geoipservice.asmx?WSDL

Then the wsimport will work fine.

Thanks.

No comments:

Post a Comment