The primary purpose of JAX-WS is to allow the Java developers to develop web services with the convenience provided by the Java language. However, there may be situations where the contract or WSDL has already been designed and you are forced to use that WSDL. In this section, you will see how an existing WSDL document can be used for developing a JAX-WS service or client. You will be using the wsimport tool that is shipped with the JDK.
The Java artifacts created using the wsimport tool are:
Service Endpoint Interface (SEI)
Service class
Exception class that is mapped from the
wsdl:fault
class (if any)JAXB generated type values (that are Java classes mapped from XML schema types)
This is what you will see if you run wsimport
-help
:
Usage: wsimport [options] <WSDL_URI> where [options] include:-b <path> specify jaxws/jaxb binding files or additional schemas (Each <path> must have its own -b)-B<jaxbOption> Pass this option...