How can I return an arbitrary XML document using an Eclipse/AXIS2 POJO Service?
For full background details, see this question: Java Web Service returns string with > and < instead of > and <
To deploy the web service, I have a dynamic web project with a class that defines the interface of my service. The method I am concerned with returns a String type. To create and deploy the web service I right click on the class (contained in the dynamic web project) and select create web service, here I indicate that I want a "Bottom up Java bean Web Service" and that the service implementation comes from the class in my dynamic web project. This starts my service and creates a WSDL that has the definition of my ports and endpoints.
The types section of the wsdl are automatically generated based on the code that will become the service. The function of intrest has an org.w3c.DOM.Document that holds the XML that I want to return. This Document is converted to a string and returned, because the Document object is not serialized and does not have a public constructor. Is there another type that I can use as the return type for my function that will hold the XML structure throught the service call?