+

Search Tips   |   Advanced Search

Running an unmanaged Web services JAX-RPC client


WAS V7.0 and the Application Client for WAS V7.0 provides an unmanaged client implementation that is based on the JAX-RPC 1.1 specification. The Thin Client for JAX-RPC with WAS is an unmanaged and stand-alone Java client environment that enables you to run JAX-RPC Web services client applications to invoke Web services that are hosted by the appserver.

Before we can set up a JAX-RPC unmanaged client environment you will need to obtain the Thin Client for JAX-RPC JAR file. To obtain the Thin Client for JAX-RPC, either install the appserver or the application client.

The Thin Client for JAX-RPC JAR file, com.ibm.ws.webservices.thinclient_7.0.0.jar, is located in...

APP_ROOT\runtimes

Refer to the license agreements to ensure correct usage and for limitations on copies of the Thin Client for JAX-RPC outside of the WebSphere environment. The Thin Client for JAX-RPC runs on distributed operating systems with IBM Software Development Kits (SDKs) V6.0 and Sun Java Development Kit (JDK) V6.0 that are provided by IBM. The Thin Client for JAX-RPC is supported on non-IBM SDKs V6.0 with this limitation:

Supported configurations: WS-Addressing is not supported for JAX-RPC Web services in an unmanaged client environment. If we need to use WS-Addressing, or a Web service standard that relies on WS-Addressing, such as WS-Notification, use the Thin Client for Java API for XML-based Web Services (JAX-WS) instead. To learn how to setup and run the Thin Client for JAX-WS, see the Thin Client for JAX-WS documentation. sptcfg

 

  1. Set the path. We can add the Java bin directories to the path by typing:

    (Windows)

    set PATH=<my_JDK_bin_directory>;%PATH%
    

    [AIX] [HP-UX] [Solaris]

    [Linux]

    export PATH=<my_JDK_bin_directory>:$PATH
    

  2. Set the classpath.

    (Windows)

    set CLASSPATH=.;<my_web_services_thin_client_install_directory>\com.ibm.ws.webservices.thinclient_7.0.0.jar;
    <my_application_jars>;%CLASSPATH%
    

    [AIX] [HP-UX] [Solaris]

    [Linux]

    export CLASSPATH=.:<my_web_services_thin_client_install_directory>/com.ibm.ws.webservices.thinclient_7.0.0.jar:
    <my_application_jars>;$CLASSPATH
    

    • For a non-IBM SDK, obtain a Xerces xml-apis.jar and xercesImpl.jar from the Xerces Web site and configure the classpath definition.

      (Windows)

      set CLASSPATH=.;<my_Xerces_install_directory>\xml-apis.jar;<my_Xerces_install_directory>
      \xercesImpl.jar;%CLASSPATH%
      

      [AIX] [HP-UX] [Solaris]

      [Linux]

      export CLASSPATH=.:<my_Xerces_install_directory>/xml-apis.jar:<my_Xerces_install_directory>
      \xercesImpl.jar:$CLASSPATH
      

  3. Set SSL for the client.

    1. Add the following system properties to the Java command:

      -Dcom.ibm.SSL.ConfigURL=file:
      ///home/sample/ssl.client.props
      
      

      We can obtain the ssl.client.props file from the WAS installation and modify the file to suit the environment. You must, at a minimum, update the location of the com.ibm.ssl.keyStore and com.ibm.ssl.trustStore key files in the ssl.client.props file to the match location of the target environment.

      For example, use these SSL configuration settings when running the application with a Sun JRE:

      com.ibm.ssl.protocol=SSL com.ibm.ssl.trustManager=SunX509 com.ibm.ssl.keyManager=SunX509 com.ibm.ssl.contextProvider=SunJSSE
       com.ibm.ssl.keyStoreType=JKS com.ibm.ssl.keyStoreProvider=SUN com.ibm.ssl.keyStore=/home/user1/etc/key.jks
       com.ibm.ssl.trustStoreType=JKS com.ibm.ssl.trustStoreProvider=SUN com.ibm.ssl.trustStore=/home/user1/etc/trust.jks
      

      The key store file and trust store file must be created using the Java keytool utility before the application runs. The automatic key file generation is not supported with a non-IBM product JRE.

  4. Enter the following command to run the client application:

    (Windows)

    %JAVA_HOME%/bin/java -Dcom.ibm.SSL.ConfigURL=file:
    ///home/sample/ssl.client.props <my_client_application>
    

    [AIX] [HP-UX] [Solaris]

    [Linux]

    $JAVA_HOME/bin/java -Dcom.ibm.SSL.ConfigURL=file:
    ///home/sample/ssl.client.props <my_client_application>
    

 

Results

we have set up an unmanaged JAX-RPC client runtime environment that can be used to invoke Web services hosted on a WAS.

 

Related tasks


Task overview: Implement Web services applications
Install Application Client for WAS
Implementing JAX-RPC Web services clients
Running an unmanaged Web services JAX-WS client

 

Related information


Xerces Web site