+

Search Tips   |   Advanced Search

Implement a client using the unmanaged RESTful web services JAX-RS 1.1 client

WebSphere Application Server provides a thin Java Platform, Standard Edition 6 (Java SE 6) RESTful web services client run time to enable application developers to quickly and easily create JAX-RS client applications. The Thin Client for JAX-RS with WAS is a stand-alone Java SE 6 client environment that enables running unmanaged JAX-RS RESTful web services client applications in a non-WebSphere environment to invoke JAX-RS RESTful web services that are hosted by the application server.

Use the Thin Client for JAX-RS with WAS as a stand-alone client run time in a pure Java SE environment. The Thin Client for JAX-RS running within WAS or WebSphere Application Client environments is not supported. In this version of the application server, other Thin Client run times provided with the application server can also reside in the CLASSPATH and coexist with the Thin Client for JAX-RS.

Before we set up a JAX-RS unmanaged client execution environment, obtain the Thin Client for JAX-RS JAR file. To obtain the Thin Client for JAX-RS, install WAS v9.0 or the Application Client for WAS v9.0. The Thin Client for JAX-RS JAR file, com.ibm.jaxrs.thinclient_9.0.jar, is located in the app_server_root\runtimes directory.

Copy the Thin Client for JAX-RS com.ibm.jaxrs.thinclient_9.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-RS are subject to the same terms and conditions of the license agreement for the WebSphere product where obtained the Thin Client for JAX-RS. Refer to the license agreements for correct usage and other limitations.

The Thin Client for JAX-RS works with IBM SDKs (SDKs) Version 6.0 and higher. The Thin Client for JAX-RS is also supported on non-IBM software development kits that are V6.0 and higher.

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


Tasks

  1. Configure the path. Enter the following command to add the Java bin directories to your path:

    (Windows) (ZOS)

    set PATH=<your_JDK_bin_directory>;%PATH%
    

    (AIX) (HPUX) (Solaris) (Linux)

    export PATH=<your_JDK_bin_directory>:$PATH
    

  2. Configure the class path. Add the Thin Client for JAX-RS JAR file to the classpath definition; for example:

    (Windows) (ZOS)

    set CLASSPATH=.;<your_jax-rs_thin_client_install_directory>\com.ibm.jaxrs.thinclient_9.0.jar;
    <your_application_jars>;%CLASSPATH%
    

    (AIX) (HPUX) (Solaris) (Linux) (iSeries)

    export CLASSPATH=.:<your_JAX-RS_thin_client_install_directory>/com.ibm.jaxrs.thinclient_9.0.jar:
    <your_application_jars>;$CLASSPATH
    

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

    (Windows) (ZOS)

    %JAVA_HOME%/bin/java <your_client_application>
    

    (AIX) (HPUX) (Solaris) (Linux) (iSeries)

    $JAVA_HOME/bin/java <your_client_application>
    

We have set up an unmanaged JAX-RS client runtime environment to invoke RESTful web services that are hosted on a WAS.

  • Use the Apache Wink REST client as a stand-alone thin client
  • Implement clients that use the Apache Wink REST client