aspose file tools*
The moose likes Web Services and the fly likes wsimport wsdl unreachable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsimport wsdl unreachable" Watch "wsimport wsdl unreachable" New topic
Author

wsimport wsdl unreachable

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 108
Hello,
I have implemented a Soap WebService running on JBoss EAP 6.1
I would like to write a JSE client against it.
The wsdl is published under the url
http://localhost:8080/dez-druck-server/DocumentService/DocumentServiceBean?wsdl

this url works, the wsdl is displayed in the browser.
From the same machine I run

wsimport -p generated -keep http://localhost:8080/dez-druck-server/DocumentService/DocumentServiceBean?wsdl

and get

[ERROR] http://localhost:8080/dez-druck-server/DocumentService/DocumentServiceBe
an?wsdl is unreachable


Failed to parse the WSDL.

(on Windows 7 professional)

Any ideas what might be wrong?

Many thanks,

Hans
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1212
    
    1

Hi Marcus

normally if you are able to access WSDL file from browser, then, wsimport command should be able to read it / find it.

Few pointers for your error

a. are you using executing wsimport command from Command prompt OR from some IDE console ?
b. since host name is localhost , it means web service is deployed on your machine. So just for check , can you shutdown your web service and then run same wsimport command. check what error message you get ?
c. make sure that your machine hosts file points 'localhost' domain to 127.0.0.1 IP



thanks
abhay


Oracle Java Web Service Developer (1z0-897), Oracle certified Java 7 Programmer, SCJA 1.0, SCJP 5.0, SCWCD 5.0, Oracle SQL Fundamentals I, CIW Certified Ecommerce specialist
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1212
    
    1

also one more point - please add -verbose and -Xdebug switches to your wsimport command and check what output you get

wsimport -p generated -keep -Xdebug -verbose http://localhost:8085/CalculatorWS/Calculator?wsdl

Markus Schmider
Ranch Hand

Joined: Feb 25, 2007
Posts: 108
Thanks for your replies.
I have found some references that wsimport does not work with localhost.
After binding the server to my IP-Address with
standalone -Djboss.bind.address=<ip-address>
wsimport works.
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1212
    
    1

Hi

thanks for posting the solution here.

You have said that
I have found some references that wsimport does not work with localhost.

Please share these references if possible.

thanks
 
jQuery in Action, 2nd edition
 
subject: wsimport wsdl unreachable