Skip to main content

wsimport -wsdllocation useage (newbie)

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2011-09-07

In wsimport how do I use the -wsdllocation switch to use a local wsdl copied from a remote http site??

I am a raw newbie at web services, trying to use java se jdk7 wsimport to build a client.

My first step was a success; I simply used the remote site url?wsdl directly and wsimport built me a neat little client that worked.

Now I want to copy the wsdl over to my computer and have wsimport build my client from there, but I can't figure it out and there doesn't seem to
be any detailed examples on the web as to how to do this.

If my service's url is and the locally copied wsdl is uszipwsdl.xml on my computer, what is the wsimport command line to correctly build my client?? (this is a simple service that returns the state that a given zipcode is in.)

This is just a step in my learning; the reason I want to do this is that my eventual target server is a more complicated web service
that uses https and currently gives me certificate errors when I try running wsimport on it. Another post on one of the forums said to
use a local copy of the wsdl and wsdllocation to avoid those wsimport errors.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-03-07

Here's the parameters to use :

wsimport -d /path/to/final/generated/classes -wsdllocation uszipwsdl.xml

note that the path specified with -d needs to exist first.

For a few hints on the other options, just type : wsimport

this will list all the available options of wsimport you can use.

Richard Lavoie