In this tutorial we are going to see how to generate client using wsimport tool
The wsimpot tool is used to generate generate web service client from WSDL file to access the published web service. you can see the wsimport tool in %Java Home %/bin folder
Web Service – Service published WDSL
Refer this JAX-WS service example http://www.javatutorialcorner.com/2013/12/jax-ws-hello-world-web-service.html. create the web service and publish the web service and WDSL published for this service.
Web Service – Client
Generate client from WSDL
Open command prompt run the following command to generate client using wsimport
C:\Documents and Settings>cd Administrator
C:\Documents and Settings\Administrator>cd jtc
C:\Documents and Settings\Administrator\jtc>cd WebService
C:\Documents and Settings\Administrator\jtc\WebService>cd src
C:\Documents and Settings\Administrator\jtc\WebService\src>wsimport -keep http:/
/localhost:9080/helloworld?wsdl
It will generate client class . Refer this example for complete reference.
http://www.javatutorialcorner.com/2013/12/jax-ws-hello-world-web-service.html
The wsimpot tool is used to generate generate web service client from WSDL file to access the published web service. you can see the wsimport tool in %Java Home %/bin folder
Web Service – Service published WDSL
Refer this JAX-WS service example http://www.javatutorialcorner.com/2013/12/jax-ws-hello-world-web-service.html. create the web service and publish the web service and WDSL published for this service.
Web Service – Client
Generate client from WSDL
Open command prompt run the following command to generate client using wsimport
cd %project_home%/src wsimport -keep http://localhost:9080/helloworld?wsdl
or
cd %project_home%/src wsimport -s . http://localhost:9080/helloworld?wsdl
for example
C:\Documents and Settings>cd Administrator
C:\Documents and Settings\Administrator>cd jtc
C:\Documents and Settings\Administrator\jtc>cd WebService
C:\Documents and Settings\Administrator\jtc\WebService>cd src
C:\Documents and Settings\Administrator\jtc\WebService\src>wsimport -keep http:/
/localhost:9080/helloworld?wsdl
It will generate client class . Refer this example for complete reference.
http://www.javatutorialcorner.com/2013/12/jax-ws-hello-world-web-service.html
0 comments:
Post a Comment