Testing Web Services

To test Web Services you invoke a web service endpoint deployed on a
web service client. A web service client is a Java program that makes a request
to the service through a stub that acts as a proxy for the remote service.
This stub is generated by the wsimport tool based on the
WSDL file of the service.

To Invoke a Web Service Client

WSDL of the deployed web service from URL http://host:port/context-root/endpoint?wsdl

Call wsimport to generate the client-side
artifacts using the deployed Web Services's WSDL.

Implement the client to invoke the web service.

Clients
can run a deployed web service by accessing its service-endpoint-address URL,
which has the following format:

http://host:port/context-root/servlet-mapping-url-pattern

The context-root is defined in the web.xml file.
The servlet-mapping-url-pattern is defined in the web.xml file.

In the following example, the context-root is my-ws and the servlet-mapping-url-pattern is /simple. You can view the WSDL file of the deployed service in a
browser by adding ?WSDL to the end of the URL, for example,