We used the Ant task wsimport
to generate the client JAR file in the generate-client
target. We may also use the wsimport
tool to generate the client JAR from the command line. First, we need to start the GlassFish Server using the following command:
asadmin start-domain domain1
Domain1
starts successfully as shown in the command output:
Next, generate the client JAR file using the wsimport
tool with the following options:
Option |
Value |
Description |
---|---|---|
|
|
Package name of the client-side classes |
|
|
Destination directory of the client JAR |
|
Output messages about the compiler | |
|
|
The client JAR file name |
For other command line options refer to the URL http://jax-ws.java.net/nonav/2.2.3/docs/wsimport.html. Run the wsimport
command with the options and the WSDL URL:
wsimport -p hellowsclient -verbose -d C:UsersdvohraDocumentsNetBeansProjectsHelloWSuildclasses -clientjar HelloWSServiceClient.jar http://localhost:8080/clientjar/hellows?wsdl
The output from the wsimport
command shows that the client JAR HelloWSServiceClient.jar
is generated in the build/classes
folder:
3.12.166.131