Use the Apache Wink REST client as a stand-alone thin client
Instead of using the Apache Wink REST client inside a server application, we can use the Thin Client for JAX-RS provided with WebSphere Application Server as a stand-alone thin client to send requests to your RESTful service. The Thin Client for JAX-RS 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 runtime environment in a pure Java SE environment. The Thin Client for JAX-RS is not supported running within WAS or WebSphere Application Client environments. 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.
Tasks
- Configure the development environment. Before we start developing JAX-RS applications, we must set up the development environment by adding the JAX-RS libraries on the classpath.
- Implement a client using the unmanaged RESTful web services JAX-RS client. Use the Thin Client for JAX-RS to create a stand-alone client runtime environment in a pure Java SE environment to send requests to the JAX-RS application.
We have implemented an unmanaged RESTful web services JAX-RS client that can issue requests to a JAX-RS application.
Subtopics
- Set up a development environment for JAX-RS applications
The application server provides command-line tools to develop web services clients and implementations that are based on the Java API for RESTful Web Services (JAX-RS) specification. We must set up the development environment before starting developing web services.- Implementing a client using the unmanaged RESTful web services JAX-RS 1.1 client
WAS 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.
Implement a client using the unmanaged RESTful web services JAX-RS 1.1 client