Once you have developed, assembled, deployed and configured your
Web service, you can test to confirm your Web service runs in the WebSphere
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
has client container deployment information, which consists of the application-client.xml file,
as well as the Java API for XML-based remote procedure call (JAX-RPC) mapping
file and WSDL file. The client enterprise archive (EAR) files discussed in
this topic are referred to as managed because they contain the deployment
information. The client Java archive (JAR) files discussed are referred to
as unmanaged because they that do not contain the deployment information.
Test
Web services-enabled clients by following the listed actions.
Procedure
- Test an unmanaged client JAR file.
- Run your application with the java command.
"%JAVA_HOME%\bin\java" "-Xbootclasspath/p:%WAS_BOOTCLASSPATH%"
-Djava.security.auth.login.config="%app_server_root%\properties\wsjaas_client.conf"
-Djava.ext.dirs="%WAS_EXT_DIRS%"
-classpath "%WAS_CLASSPATH%;<list_of_your_application_jars_and_classes>"
<fully_qualified_class_name_to_run> <your_application_parameters>
"$JAVA_HOME/bin/java" "-Xbootclasspath/p:$WAS_BOOTCLASSPATH"
-Djava.security.auth.login.config="$app_server_root/properties/wsjaas_client.conf"
-Djava.ext.dirs="$WAS_EXT_DIRS"
-classpath "$WAS_CLASSPATH;<list_of_your_application_jars_and_classes>
<fully_qualified_class_name_to_run> <your_application_parameters>
The unmanaged client application runs.
- Test a managed 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.