+

Search Tips   |   Advanced Search

Testing 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 WebSphere Application Server environment, verify that the server endpoint specified in the client Web Services Description Language (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 WAS application environment or the Thin Client for JAX-WS with WAS application environment.


Tasks

  1. Test an unmanaged client JAR file by running the application with the java command.

    (Windows) 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>
    

    (Windows) 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>
    

    (UNIX) (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>
    

    (Linux) (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. The following example illustrates the use of this command:
      launchClient clientEar
      

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


Related:

  • Secure web services
  • Overview of standards and programming models for web services message-level security
  • 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
  • Troubleshoot web services