JAXB will encode any strings that you return. If you want to return an xml document directly from a RESTful service you'd have to use a different databinding. If you use the Aegis databinding you can return javax.xml.transform.Source objects or or org.w3c.dom.Documents. http://cwiki.apache.org/CXF20DOC/aegis-databinding.html. Strings will still be encoded.
Hope that helps, - Dan On 8/10/07, Dave Kallstrom <[EMAIL PROTECTED]> wrote: > > I am tring to return a snippet of xml as a string from a cxf/rest based > web > service method. How do I prevent cxf from marking it up. > Here is what is supposed to be returned > <?xml version="1.0" encoding="UTF-8" ?> > <add><doc> > <field name="id">1</field> > <field name="filename">filename.psd</field> > <field name="releaseDate">2007-08-10T10:00:20:070Z</field> > <field name="dateAdded">2007-08-10T10:00:20:070Z</field> > <field name="dateUpdated">2007-08-10T10:00:20:070Z</field> > </doc></add> > Here is the response from cxf > > <ns2:getDocumentsResponse > xmlns:ns2="http://myservice.webservices"><?xml version="1.0" > encoding="UTF-8" ?>
 > <add><doc>
 > <field name="id">1</field>
 > <field name="filename">beaver.psd</field>
 > <field name="releaseDate">2007-08-10T10:00:20:070Z</field>
 > <field name="dateAdded">2007-08-10T10:00:20:070Z</field>
 > > <field name="dateUpdated">2007-08-10T10:00:20:070Z</field>
 > </doc></add>
 > </ns2:getDocumentsResponse> > > > -- > > Dave Kallstrom > -- Dan Diephouse Envoi Solutions http://envoisolutions.com | http://netzooid.com/blog
