How to avoid XOP generation in CXF - behaviour changed between 3.3.2 and 3.3.4

188 Views Asked by At

This issue involves recent CXF change (3.3.2->3.3.4).

We are sending a SOAP request to our partner with image contents On TomEE 8.0.0 (CXF 3.3.2), the SOAP request generated doesn't include XOP generation :

<ns3:Picture>
<ns6:Image>
<ns6:StorageFormat>JPG</ns6:StorageFormat>
<ns6:Length>13286</ns6:Length>
<ns6:Buffer>/9j/4AAQSkZJRgABAAEAlgCWAAD//gAfTE (...) VBRCB=</ns6:Buffer>
</ns6:Image>
</ns3:Picture>
<ns3:Signature>
<ns6:Image>
<ns6:StorageFormat>TIF</ns6:StorageFormat>
<ns6:Length>700</ns6:Length>
<ns6:Buffer>SUkqAAgAAAATAP4ABAABAAAAAgAAAAABBAABAA (...) AA+==</ns6:Buffer>
</ns6:Image>
</ns3:Signature>

Running the code, isMTOMEnabled() return false

SOAPBinding binding = (SOAPBinding) ((BindingProvider) port).getBinding();
boolean mtomEnabled = binding.isMTOMEnabled();

Same war deployed on TomEE 8.0.1 (CXF 3.3.4). Now CXF generates (unrequested) XOP

<ns3:Picture>
<ns6:Image>
<ns6:StorageFormat>JPG</ns6:StorageFormat>
<ns6:Length>12099</ns6:Length>
<ns6:Buffer>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:[email protected]"/>
</ns6:Buffer>
</ns6:Image>
</ns3:Picture>
<ns3:Signature>
<ns6:Image>
<ns6:StorageFormat>TIF</ns6:StorageFormat>
<ns6:Length>580</ns6:Length>
<ns6:Buffer>
<xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:[email protected]"/>
</ns6:Buffer>
</ns6:Image>
</ns3:Signature>

As our partner is not able to parse xop, how can avoid xop SOAP inclusion and get same result as previously with CXF 3.3.2?

0

There are 0 best solutions below