+

Search Tips   |   Advanced Search

Test web services-enabled clients

Once we have developed, assembled, deployed and configured the web service, we can test to confirm the web service runs in the application server environment.

Before testing the web services Java client to confirm the web service runs in the WAS environment, verify that the server endpoint specified in the client WSDL file is running and available.

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 JAX-RPC with WebSphere Application Server application environment or the Thin Client for JAX-WS with WebSphere Application Server application environment.

  1. Test an unmanaged client JAR file by running the 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

    (zos)(iseries) 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

    (zos) 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.

  2. Test a managed JAX-RPC client EAR file or an unmanaged JAX-WS client EAR file.

    1. Run the client application with the launchClient command. Example use of this command:

        launchClient clientEar


Results

You have a web services-enabled client that is tested. Now we can add security measures to the web service. Security measures are optional.


Related concepts

  • Secure web services
  • Overview of standards and programming models for web services message-level security


    Related tasks

  • Secure web services applications using the WSS APIs at the message level
  • Set up a development environment for web services
  • Implement static JAX-WS web services clients
  • Implement JAX-RPC web services clients
  • Troubleshooting web services