I'm working on changing our implementation of a SOAP service from using Axis2 to using JAX-WS (technically, the CXF implementation provided by JBossWS on AS 7) and I've run into an issue that's preventing me from switching the final remaining method to the JAX-WS style.
The (slightly anonymized since the spec seems to not be public) method returns a Type which contains a base64binary element.
<xs:complexType name="BitmapResult">
<xs:sequence>
<xs:element minOccurs="0" name="chunkBitmap" nillable="true" type="xs:base64Binary"/>
</xs:sequence>
</xs:complexType>
In Axis2 this generates a class that uses a DataHandler to handle the binary parameter and appears to use MTOM by default for returning the result.
Using the CXF wsdl2java tool this generates a type class that uses a byte[] and will return the parameter as base64 encoded text within the SOAP reply itself.
From everything that I have read, the correct way to do this with CXF is to make sure the wsdl that you are generating from contains: xmime:expectedContentTypes="application/octet-stream"
but since we are being provided with the WSDL by an outside source, I would prefer not to modify it locally.
Is there another way to request that CXF generate the class using a DataHandler other than modifying the WSDL? I am already using a jaxb binding file to tweak some other parameters of the generation, but I wasn't able to find anything that would enable me to override this particular setting.