WAS v8.5 > Develop applications > Develop web services - RESTful services > Develop JAX-RS web applications

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

WebSphere Application Server provides a thin Java Platform, Standard Edition 6 (Java SE 6) RESTful web services client runtime to enable application developers to 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.

We can 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 you 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 v8.5 or the Application Client for WAS v8.5. The Thin Client for JAX-RS JAR file, com.ibm.jaxrs.thinclient_8.5.0.jar, is located in the app_server_root\runtimes directory.

Copy the Thin Client for JAX-RS com.ibm.jaxrs.thinclient_8.5.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 you 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 Software Development Kits (SDKs) v6.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.

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

      set PATH=<your_JDK_bin_directory>;%PATH%

      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:

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

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

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

      %JAVA_HOME%/bin/java <your_client_application>

      $JAVA_HOME/bin/java <your_client_application>


Results

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


Related


Use the Apache Wink REST client as a stand-alone thin client
Implement clients using the Apache Wink REST client


+

Search Tips   |   Advanced Search