Test Web services-enabled clients

The following steps and examples assume that you are testing a system that has WAS installed, and that you have configured your environment as described in Setting up a Web services development and unmanaged client run-time environment.

 

Before you begin

Testing the Web services client is done after you have developed, assembled, deployed and configured the Web service. Now you want to confirm that the Web service can run in the WAS environment. Before testing your Java client, confirm that the server endpoint specified in the client Web Services Description Language (WSDL) file is running and available.

 

Overview

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 RPC (JAX-RPC) mapping file and WSDL file. The client EAR files discussed in this topic are referred to as managed because they contain the deployment information. The client 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

  1. Test an unmanaged client JAR file.

    1. Run your application with the java command. On Windows platforms

      "%JAVA_HOME%\bin\java" "-Xbootclasspath/p:%WAS_BOOTCLASSPATH%"
      -Djava.security.auth.login.config="%WAS_HOME%\properties\wsjaas_client.conf"
      -Djava.ext.dirs="%WAS_EXT_DIRS%"
      -classpath "%WAS_CLASSPATH%;<list your application JAR files and classes>"
      <fully qualified class name to run><your application parameters>
      
      On Linux and UNIX platforms

      "$JAVA_HOME/bin/java" "-Xbootclasspath/p:$WAS_BOOTCLASSPATH"
      -Djava.security.auth.login.config="$WAS_HOME/properties/wsjaas_client.conf"
      -Djava.ext.dirs="$WAS_EXT_DIRS"
      -classpath "$WAS_CLASSPATH;<list of your application JAR files and classes>
      <fully qualified class name to run><your application parameters>
      
      

    The unmanaged client application runs.

  2. Test a managed client EAR file.

    1. Run your client application with the launchClient command. The following example illustrates the use of this command

      launchClient clientEar
      

 

Result

You have a Web services-enabled client that is tested. Now one can add security measures to the Web service.

 

What to do next

Security measures are optional. For more information about security see Securing Web services.

Troubleshoot your Web services application if you are having problems.


 

Related Tasks


Setting up a development and unmanaged client run-time environment for Web services
Developing Web services clients
Troubleshooting Web services