Hi Xavier,
In addition to using annotation parameters like @Get("xml"), @Get("json"),
etc. as hinted by Jonathan, you can also simply return a POJO and rely on
converters to get representations in XML or JSON or GWT serialization format
or anything else.
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Technical Lead ~ http://www.restlet.org
Noelios Technologies ~ http://www.noelios.com
-----Message d'origine-----
De : Jonathan Hall [mailto:[email protected]]
Envoyé : jeudi 7 janvier 2010 15:00
À : [email protected]
Objet : Re: Many representation handling in a resource
http://wiki.restlet.org/developers/172-restlet/226-restlet.html
Xavier M. wrote:
> Hello,
> I would like to know if there is an exampel where in the same resource
> we can find for instance several @get methods with different kinds of
> representations.
> If so, we could provide for the same resource a @get method matching
> object represention, another one for xml, and finaly one for json.
> Interesting for interoperability or scalability.
> regards
> Xavier
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24354
76
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2448285