Skip to main content

Achieving HATEOAS with JAXB

1 reply [Last post]
jabekb
Offline
Joined: 2009-07-02
Points: 0

Over the past few days, I've been working to familiarize myself with the various technologies used to implement RESTful web services. After reviewing several different approaches on the web, I decided to annotate my resource objects and return them, allowing Jersey and JAXB to translate the POJO into the appropriate MIME type. I am very impressed with how simple it was to use.

Now that I have a POXy-like attempt at a RESTful web service, I'd like to take it to the next level and apply the premise of HATEOAS. The problem I see, however, is that there is really no way to embed the links necessary to make the generated xml/json file properly descriptive of the actions available in the representation.

What techniques have JAXB users employed to achieve HATEOAS?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Paul Sandoz

On Jul 2, 2009, at 4:16 PM, metro@javadesktop.org wrote:

> Over the past few days, I've been working to familiarize myself with
> the various technologies used to implement RESTful web services.
> After reviewing several different approaches on the web, I decided
> to annotate my resource objects and return them, allowing Jersey and
> JAXB to translate the POJO into the appropriate MIME type. I am
> very impressed with how simple it was to use.
>
> Now that I have a POXy-like attempt at a RESTful web service, I'd
> like to take it to the next level and apply the premise of HATEOAS.
> The problem I see, however, is that there is really no way to embed
> the links necessary to make the generated xml/json file properly
> descriptive of the actions available in the representation.
>
> What techniques have JAXB users employed to achieve HATEOAS?

See here for some ideas exploring this area;

http://brettdargan.com/blog/2009/04/29/rimvr/

Any JAX-RS 2.0 will likely investigate an appropriate solution that
works with JAXB.

Paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net