Testing Web services-enabled clients

Before testing your Java client, confirm that the server endpoint specified in the client Web Services Description Language (WSDL) file is running and available.

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 execution environment.

Tests are run differently depending on whether the client module has client container deployment information, which consists of the application-client.xml and webservicesclient.xml files, as well as the 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 JAR files discussed are referred to as unmanaged because they that do not contain the deployment information. To test Web services-enabled clients...

  1. Test an unmanaged client JAR file.

    1. Execute 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 UNIX

      "$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. Execute your client application with the launchClient command. An example of using the command is as follows

      launchClient clientEar
      

Web services-enabled clients that have been tested.

Troubleshoot your Web services application.

 

See Also

Setting up a development and unmanaged client execution environment for Web services based on Web Services for J2EE
Developing Web services clients based on Web Services for J2EE
Troubleshooting Web services based on Web Services for J2EE