Network Deployment (Distributed operating systems), v8.0 > Develop and deploying applications > Develop web services - RESTful services > Develop JAX-RS web applications
Implement a client using the unmanaged RESTful web services JAX-RS client
WAS provides a thin Java Platform, Standard Edition 6 (Java SE 6) RESTful web services client runtime 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.
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 Java archive (JAR) file.
To obtain the Thin Client for JAX-RS, install WAS v8.0 or the Application Client for WAS v8.0. The Thin Client for JAX-RS JAR file, com.ibm.jaxrs.thinclient_8.0.0.jar, is located in...
WAS_HOME\runtimesCopy the Thin Client for JAX-RS com.ibm.jaxrs.thinclient_8.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-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.
Procedure
- 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) (Solaris)
export PATH= <your_JDK_bin_directory>:$PATH
- Configure the class path. Add the Thin Client for JAX-RS JAR file to the classpath definition; for example:
(Windows)
set CLASSPATH=.; <your_jax-rs_thin_client_install_directory>\com.ibm.jaxrs.thinclient_8.0.0.jar; <your_application_jars>;%CLASSPATH%(AIX) (Solaris)
export CLASSPATH=.: <your_JAX-RS_thin_client_install_directory>/com.ibm.jaxrs.thinclient_8.0.0.jar: <your_application_jars>;$CLASSPATH
- Enter the following command to run your client application:
(Windows)
%JAVA_HOME%/bin/java <your_client_application>(AIX) (Solaris)
$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.
Use the Apache Wink REST client as a stand-alone thin client
Implement clients using the Apache Wink REST client