Skip to main content

Blog Archive for spericas during October 2011

In the first blog entry of this series, we showed how to configure a message body reader (MBR) on an instance of Client. Specifically, our example required the registration of an MBR to convert an application/json representation of the Money bean.  Client client = ClientFactory.newClient();client.configuration().register(MoneyMBR.class); As stated in that blog entry, a Client instance can be...
This is a follow-up to last week's blog in which we introduced the new Client API in JAX-RS 2.0. In that blog, we defined a simple AtmService and showed how to use the Client API to access its resources. For example, the following code was used to check an account's balance: Client client = ClientFactory.newClient();String bal = client.target("http://.../atm/balance") ...
The Early Draft for JAX-RS 2.0 (JSR 339) has recently been submitted for publication. There are number of interested features in the new draft, and I'd like to start with the new Client API. The Client API is used to access Web resources. It provides a higher-level API than HttpURLConnection, and perhaps more importantly, integration with JAX-RS providers. Let us start by defining a simple ATM...