Once you have developed, assembled, deployed and configured
your web service, you can test to confirm your web service runs in
the application server environment.
Before you begin
Before testing your web services Java™ client
to confirm your web service runs in the WebSphere® Application
Server environment, verify that the server endpoint specified in the
client Web Services Description Language (WSDL) file is running and
available.
About this task
Tests are run differently depending on whether the client
module is in a Java EE container or if the client
is running in the Thin Client for Java API
for XML-based RPC (JAX-RPC) with WebSphere Application
Server application environment or the Thin Client for Java API for XML-Based Web Services (JAX-WS)
with WebSphere Application Server application
environment.
Procedure
- Test an unmanaged client JAR file by running your application
with the java command.
For
JAX-WS applications:
"%JAVA_HOME%\bin\java"
-Djava.endorsed.dirs=<your_jax-ws_thin_client_install_directory>/endorsed_apis_8.5.0.jar
-classpath
"<your_JAX-WS_thin_client_install_directory>\runtimes\com.ibm.jaxws.thinclient_8.5.0.jar;
<list_of_your_application_jars_and_classes>"
<fully_qualified_class_name_to_run> <your_application_parameters>
For JAX-RPC applications:
"%JAVA_HOME%\bin\java"
-classpath
"<your_JAX-RPC_thin_client_install_directory>\runtimes\com.ibm.ws.webservices.thinclient_8.5.0.jar;
<list_of_your_application_jars_and_classes>"
<fully_qualified_class_name_to_run> <your_application_parameters>
For JAX-RPC applications:
"$JAVA_HOME/bin/java"
-classpath
"<your_JAX-RPC_thin_client_install_directory>/runtimes/com.ibm.ws.webservices.thinclient_8.5.0.jar:
<list_of_your_application_jars_and_classes>"
<fully_qualified_class_name_to_run> <your_application_parameters>
The unmanaged client application
runs.
- Test a managed JAX-RPC client EAR file or an unmanaged
JAX-WS client EAR file.
- Run your client application with the launchClient command.
The following example illustrates the use of this command:
launchClient clientEar
Results
You have a web services-enabled client that is tested. Now
you can add security measures to the web service. Security measures
are optional.