-
Sep 4th, 2009, 11:02 AM
#1
REST + XStream Annotations
Hi
I've built an application with ROO and have made use of ContentNegotiatingViewResolver and RESTFul URLs. I've picked XStream to serialize my domain objects to XML. I'd like to use XStream annotations to override the default names of properties in my domain objects, and I'd like to exclude the version and id fields from the XML; but because these are wrapped up in the aspects I can't add annotations. What would be the best approach here do you think?
As a side-note; Spring 3.0.0.M3 (seems to have been addresses in trunk) doesn't support XStream's autoDetectAnnotation property so I've used a Customer Marshaller/Unmarshaller implementation and 'decorated' the Spring implmentation so that I can set this property.
One more side-note: I have used a custom mime-type for my xml, because of problems with content-negotiation with Safarai and also IE. See http://jira.springframework.org/browse/SPR-5706
Jon
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules