Description
Hello,
I'm using CXF through the JAX-WS Provider interface. I set the parametric parameter of the interface to javax.xml.transform.Source.
The XML results of marshalling a DOMSource or a JAXBSource are different, look for example at the first attribute of the "formatResponse" element (the DOMSource one is correct):
— DOMSource —
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<formatResponse attribute="attr1" xmlns="http://www.cxftest.org">
<formattedName>test</formattedName>
</formatResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------------------------------------------------------------------------------------
— JAXBSource —
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<formatResponse formatResponse="attr1" xmlns="http://www.cxftest.org">
<formattedName>test</formattedName>
</formatResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------------------------------------------------------------------------------------
you can find attached a test case.
Regards
Valerio Angelini