users@jersey.java.net

Re: [Jersey] State Client / HATEOAS proposal

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 08 Oct 2009 17:26:23 +0200

On Oct 8, 2009, at 5:17 PM, gerard davison wrote:

>
> Paul,
>
> I was thinking something along the lines of:
>
> <xsd:element name="bank">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="link">
> <xsd:annotation>
> <xsd:appinfo>
> <wadlb:bindings>
> <wadlb:definition>http://otherApplication.com/application.wadl#resourceName
> </wadlb:definition>
> </wadlb:bindings>
> </xsd:appinfo>
> </xsd:annotation>
> <xsd:complexType>
> <xsd:attribute name="ref" default="self"
> type="xsd:string"/>
> </xsd:complexType>
> </xsd:element>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
>

Ah! i see the other way around to what i thought.


> Although this is a bit wordy it would allow a generation tool to
> grab and generate an interface for this WADL, and if it contains
> suitable grammar links it should be able to give you the correct
> types also. I would be happy if someone has a better suggestion
> though....
>

Just a general point it would be good if JAXB related model classes
could be used on the client or server. Thus when the server serializes
links are embedded. When used on the client it helps create typed
artifacts to aid clients traversing state.


> (Still waiting to hear back about the code)
>

OK!

Paul.