Running an unmanaged Web services JAX-WS client

WebSphere® Application Server provides a thin Java Platform, Standard Edition 6 (Java SE 6) Web services client runtime implementation that is based on the Java™ API for XML-based Web Services (JAX-WS) 2.1 specification. The Thin Client for JAX-WS with WebSphere Application Server is a stand-alone Java SE 6 client environment that enables running unmanaged JAX-WS Web services client applications in a non-WebSphere environment to invoke Web services that are hosted by the application server.

Before you begin

Supported configurations: You can use the Thin Client for JAX-WS with WebSphere Application Server as a stand-alone client run time in a pure Java SE environment, or within an OSGi environment. The Thin Client for JAX-WS is not supported running within WebSphere Application Server or WebSphere Application Client environments. In this version of the application server, with the exception of the Administration Thin Client, other Thin Client run times provided with the application server can also reside in the CLASSPATH and coexist with the Thin Client for JAX-WS. sptcfg

Before you set up a JAX-WS unmanaged client execution environment, obtain the Thin Client for JAX-WS Java archive (JAR) file. To obtain the Thin Client for JAX-WS, install WebSphere Application Server Version 7.0 or the Application Client for WebSphere Application Server Version 7.0. The Thin Client for JAX-WS JAR file, com.ibm.jaxws.thinclient_7.0.0.jar, is located in the app_server_root\runtimes directory.

Copy the Thin Client for JAX-WS, com.ibm.jaxws.thinclient_7.0.0.jar file, to other machines to create a lightweight client environment that enables communications with the product. Copies of the Thin Client for JAX-WS are subject to the same terms and conditions of the license agreement for the WebSphere product where you obtained the Thin Client for JAX-WS. Refer to the license agreements for correct usage and other limitations.

The Thin Client for JAX-WS is supported in the following environments:
  • IBM® Software Development Kits (SDKs) Version 6.0
  • non-IBM SDKs V6.0 with the following limitation:
    • Xerces limitation on non-IBM SDKs

      You must download Xerces-J Version 2.6.2, and add the file to the classpath when setting up the Thin Client for JAX-WS environment.

    • WS-SecurityKerberos on non-IBM SDKs

      WS-SecurityKerberos is not supported with the Sun JDK or other non-IBM SDKs. Applications running in a Thin Client for JAX-WS environment that make use of WS-Security message level protection and use Kerberos security tokens as described in the Web Services Security Kerberos Token Profile 1.1 specification, do not correctly work on non-IBM JDKs. This limitation exists because of a dependancy on the IBM JGSS provider that is only available within IBM SDKs.

  • [jun2010] Equinox 3.2.1 OSGi runtime environments [jun2010]
    jun2010

About this task

Set up a Thin Client for JAX-WS environment by completing the following steps.

Procedure

  1. Configure the path. Enter the following command to add the Java bin directories to your path:
    [Windows]
    set PATH=<your_JDK_bin_directory>;%PATH%
    [AIX] [HP-UX] [Solaris] [Linux]
    export PATH=<your_JDK_bin_directory>:$PATH
  2. Configure the classpath.
    • Add the Thin Client for JAX-WS JAR file to the classpath definition.
      Important: If the Thin Client is to use the Java Message Service (JMS), then all the jars that are required must be in the classpath for JMS and for the client so that entries exist for all the required files. Otherwise, required files will not be identified as installed and ready for use.
      [Windows]
      set CLASSPATH=.;<your_jax-ws_thin_client_install_directory>\com.ibm.jaxws.thinclient_7.0.0.jar;
      <your_application_jars>;%CLASSPATH%
      [AIX] [HP-UX] [Solaris] [Linux]
      export CLASSPATH=.:<your_jax-ws_thin_client_install_directory>/com.ibm.jaxws.thinclient_7.0.0.jar:
      <your_application_jars>;$CLASSPATH
    • If you are using a non-IBM SDK, obtain a Xerces xml-apis.jar file and xercesImpl.jar file from the Xerces Web site, and configure the classpath definition.
      [Windows]
      set CLASSPATH=.;<your_Xerces_install_directory>\xml-apis.jar;<your_Xerces_install_directory>
      \xercesImpl.jar;%CLASSPATH%
      [AIX] [HP-UX] [Solaris] [Linux]
      export CLASSPATH=.:<your_Xerces_install_directory>/xml-apis.jar:<your_Xerces_install_directory>
      \xercesImpl.jar:$CLASSPATH
  3. Configure SSL for the client.
    1. Add the following system properties to the Java command:
      -Dcom.ibm.SSL.ConfigURL=file:///home/sample/ssl.client.props
      

      You can obtain the ssl.client.props file from the WebSphere Application Server installation and modify the file to suit your 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 your 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 your client application:
    [Windows]
    %JAVA_HOME%/bin/java -Dcom.ibm.SSL.ConfigURL=file:///home/sample/ssl.client.props <your_client_application>
    [AIX] [HP-UX] [Solaris] [Linux]
    $JAVA_HOME/bin/java -Dcom.ibm.SSL.ConfigURL=file:///home/sample/ssl.client.props <your_client_application>

Results

You have set up an unmanaged JAX-WS client runtime environment to invoke Web services hosted on a WebSphere Application Server.



In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Oct 20, 2010 9:57:58 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-base-dist&topic=twbs_jaxwsthinclient
File name: twbs_jaxwsthinclient.html