POC: Operation scheduling over the REST api

Heiko W.Rupp hrupp at redhat.com
Thu Dec 1 20:33:42 UTC 2011


Am 01.12.2011 um 21:13 schrieb Alan Santos:
> 
> So two questions:  1) Why is AtomPub the right format for XML? 

Good question - I have not directly found a standards document, but all sources (incl. Bill Burkes book) either
propose link headers in the http header or atom pub. And when a resource has many links, atom pub seems
to be the way to go.

> and 2) Assuming the same RESTful access does the JSON format really need to mirror the XML format? 

It looks like common practice to mimic the xml, but I do not think it would be a blocker to do it different. 
On the other hand if existing tools expect the {rel:x , href:y} format, we should follow it too.
I have not looked too deep into customizing that; a simple MessageBodyWriter is at least not able
to do the job. Perhaps a post-processing interceptor. Or I hope that there is a way to tell Jackson to 
treat those Link types differently (I know that you can have custom masrshallers; question is rather
how to hook them into the processing stream).

  Heiko

-- 
Reg. Adresse: Red Hat GmbH, Technopark II, Haus C, 
Werner-von-Siemens-Ring 14, D-85630 Grasbrunn
Handelsregister: Amtsgericht München HRB 153243
Geschaeftsführer: Brendan Lane, Charlie Peters, Michael Cunningham, Charles Cachera



More information about the rhq-devel mailing list