JAX-WS : wsimport tool example
The wsimport tool is used to parse an existing Web Services Description Language (WSDL) file and generate required files (JAX-WS portable artifacts) for web service client to access the published web services. This wsimport tool is available in the $JDK/bin folder.
Use Case
An common use case of this wsimport tool.
1. Server – Published web service – WSDL file.
The CompA has published a web service along with a WSDL file at URL : http://compA.com/ws/server?wsdl
2. Client – Access the published service.
For CompB, to develop a web service client to access the CompA published web service, they can use wsimport tool to parse CompA’s WSDL file and generate files (JAX-WS portable artifacts) to access CompA’s published service.
Command : wsimport command to parse CompA WSDL file
C:\>wsimport -keep -verbose http://compA.com/ws/server?wsdl parsing WSDL... generating code... com\mkyong\ws\ServerInfo.java com\mkyong\ws\ServerInfoImplService.java
For complete example, please visit this JAX-WS hello world example article, refer to the section “2. Java Web Service Client via wsimport tool“.
For other use cases or usages, please visit reference links below.






[...] “TCP/IP Monitor” in Eclipse IDE, and also intercept the SOAP messages generated by web service.JAX-WS : wsimport tool example The wsimport tool is used to parse an existing Web Services Description Language (WSDL) file and [...]