[
https://issues.apache.org/jira/browse/CXF-1634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Brad Moody updated CXF-1634:
----------------------------
Attachment: jaxrsXmlBeans.patch
Here's a patch to give JAX-RS providers which allow XMLBeans classes to work
with media types application/xml and application/json. The definition of an
XMLBean being an object that extends org.apache.xmlbeans.XMLObject.
Completely untested other than they work on my machine.
I'm not 100% happy with the JSON provider as it writes the data from
XMLBean.save() to a temporary file and then reads it back in using an
XMLStream.
I've not really got enough experience with XML streams to come up with a better
way of converting to JSON. The only alternative I could think of was to
eliminate the temp file by keeping the whole document string in memory.
Unfortunately the project I developed this for has concerns about large files
so I had to steer clear of that.
I'd be interested to see a better way of doing this if anyone else finds these
classes useful.
> Add XMLBean data provider to JAX-RS front end
> ---------------------------------------------
>
> Key: CXF-1634
> URL: https://issues.apache.org/jira/browse/CXF-1634
> Project: CXF
> Issue Type: Improvement
> Components: REST
> Affects Versions: 2.1
> Reporter: Brad Moody
> Priority: Minor
> Attachments: jaxrsXmlBeans.patch
>
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.