I believe this will work:
@WebService(wsdlLocation = "....") @DataBinding(org.apache.cxf.databinding.source.SourceDataBinding.class) @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE) public class HelloWorldImpl implements HelloWorld { public Source sayHi(Source xml) { return xml; } }
By default, you should get a StaxSource (which is a subclass of SAXSource) so that you can pass this into your XML processing library and the like. You can return any subclass of Source. However, you can also be more specific and use:
public Source sayHi(DOMSource xml)
if you know that you need it as a DOM. I really think:
public Source sayHi(XMLStreamReader xml)
will work too.
source share