Implementing 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 run time to enable application developers to quickly and easily create JAX-RS client applications. The Thin Client for JAX-RS with WebSphere Application Server 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.

Before you begin

Supported configurations Supported configurations: You can use the Thin Client for JAX-RS with WebSphere Application Server as a stand-alone client run time in a pure Java SE environment. The Thin Client for JAX-RS running within WebSphere Application Server 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.sptcfg

Before you set up a JAX-RS unmanaged client execution environment, obtain the Thin Client for JAX-RS Java archive (JAR) file. To obtain the Thin Client for JAX-RS, install WebSphere Application Server Version 8.5 or the Application Client for WebSphere Application Server Version 8.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) 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.

About this task

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

Procedure

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

  2. Configure the class path. Add the Thin Client for JAX-RS JAR file to the classpath definition; for example:
    [IBM i]
    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 your client application:
    [IBM i]
    $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 WebSphere Application Server.
Task topic    

Terms and conditions for information centers | Feedback

Last updated: April 17, 2014 04:48 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-base-iseries&topic=twbs_jaxrs_impl_thinclient_runningthinc
File name: twbs_jaxrs_impl_thinclient_runningthinc.html