Java Reference
In-Depth Information
set WSIMPORT_OPTS=-Djavax.xml.accessExternalSchema=all
Pay close attention when entering this command (there is only one space and note the capitalization).
Once you've executed this command, you can run wsimport again. You should now get the results
shown in Figure 10-13.
figure 10-13  
wsimport is warning you that it found some ports that are not SOAP‐specific or using a non‐
standard binding. You can safely ignore this warning, as you're interested in the SOAP 1.1 endpoint
only.
What has happened here? wsimport downloaded the WSDL file, parsed its contents, constructed
some classes, and compiled them, placing them in the location where you executed the tool (the bin
folder in this case). If you take a look with the file explorer, you'll see that a new folder called net
has been added, as shown in Figure 10-14.
When exploring this folder deeper, you'll see a listing of class files, as shown in Figure 10-15.
These generated class files can immediately be used in your project to interact with the web service.
However, since you would like to take a look at the generated source code, run the wsimport tool
again, but this time with the -keep option set, like so:
wsimport -keep http://www.webservicex.net/stockquote.asmx?WSDL
Search WWH ::




Custom Search