On Thu, Jun 25, 2009 at 10:47:02AM +0300, Eugeny N Dzhurinsky wrote: > Hello, everybody! > > I need to return the complex XML as a result of the REST call to the service. > I've looked at the documentation and realized that it is possible to > > - use JAXB and serialize the complex object > - use custom message body handlers > - simply return String with the XML content > > However because of the fact the underlying service returns > org.w3c.dom.Document, > looks like I have to use either custom message body handler for Document > object, or serialize XML to a String and return the String object. > > So could somebody please explain, what is the best way to return the custom > XML having a DOM model available? May be there is some standard way of doing > such kind of things in CXF I am not aware of? > > Thank you in advance!
Looks like I've found the solution with using javax.xml.transform.Source as a return type, and javax.xml.transform.dom.DOMSource as the actual result of the method. -- Eugene N Dzhurinsky
pgphLVFsllyfi.pgp
Description: PGP signature
