On 6-Jul-07, at 12:36 PM, Sean Landis wrote:
Caroline Grima <carolineg <at> ccbilleu.com> writes:
Is there a way to pass complex objects and ints from the client to
a restlet?
Thanks.
Caroline
Hi Caroline,
The typical way in web services is to marshal objects into an XML
structure
and then unmarshal them on the server. There are many approaches
for this,
the most infamous being SOAP which also encompasses remote method call
semantics (unRESTful).
In RESTful applications, there are a variety of ways to go: JSON
and JAXB are
two I am familiar with. Restlet 1.1 beta has JaxbRepresentation and
JAXB is
the technology I'm most familiar with.
Another one, which lives up to its name, is Simple: http://
simple.sourceforge.net/ - I'm using that with Restlet.
There's also Xstream (http://xstream.codehaus.org/) and Betwixt
(http://jakarta.apache.org/commons/betwixt/) but I have not used these.
--Toby
Sean