+

Search Tips   |   Advanced Search

Testing Web services-enabled clients


Once we have developed, assembled, deployed and configured your Web service, we can test to confirm the Web service runs in the appserver 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 WAS application environment or the Thin Client for JAX-WS with WAS application environment.

 

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

    (Windows) For JAX-WS applications:

    "%JAVA_HOME%\bin\java" 
    -classpath 
    "%WAS_HOME%\runtimes\com.ibm.jaxws.thinclient_7.0.0.jar;
    <list_of_my_application_jars_and_classes>"
    <fully_qualified_class_name_to_run> <my_application_parameters>
    

    (Windows) For JAX-RPC applications:

    "%JAVA_HOME%\bin\java" 
    -classpath 
    "%WAS_HOME%\runtimes\com.ibm.ws.webservices.thinclient_7.0.0.jar;
    <list_of_my_application_jars_and_classes>"
    <fully_qualified_class_name_to_run> <my_application_parameters>
    

    [AIX] [HP-UX] [Linux] [Solaris]

    For JAX-WS applications:

    "$JAVA_HOME/bin/java" 
    -classpath 
    "$WAS_HOME/runtimes/com.ibm.jaxws.thinclient_7.0.0.jar:
    <list_of_my_application_jars_and_classes>"
    <fully_qualified_class_name_to_run> <my_application_parameters>
    
    

    [Linux] For JAX-RPC applications:

    "$JAVA_HOME/bin/java" 
    -classpath 
    "$WAS_HOME/runtimes/com.ibm.ws.webservices.thinclient_7.0.0.jar:
    <list_of_my_application_jars_and_classes>"
    <fully_qualified_class_name_to_run> <my_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
      

 

Results

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 tasks


Secure Web services for V5.x applications based on WS-Security
Secure Web services applications using message level security
Secure Web services applications using the WSS APIs at the message level
Set up a development environment for Web services
Implementing JAX-WS Web services clients
Implementing JAX-RPC Web services clients
Troubleshooting Web services