soap 1.1 response Content-Type is not handled as expected with soap 1.2 binding in camel-cxf endpoint

Solution Verified - Updated -

Environment

  • Red Hat JBoss Fuse
    • 6.1.0
  • Apache Camel
    • camel-cxf component
  • Apache CXF

Issue


<camelcxf:cxfEndpoint id="test" address="/testService" wsdlURL="META-INF/test.wsdl" serviceName="v:getService" endpointName="v:SOAP12Port" xmlns:v="http://redhat.com/test"> <camelcxf:properties> <entry key="dataFormat" value="PAYLOAD" ></entry> <entry key="schema-validation-enabled" value="false" ></entry> </camelcxf:properties> </camelcxf:cxfEndpoint>
  • We have an endpoint that's exposed with soap 1.2 binding, serves 1.2 and 1.1 inbound soap requests, everything is fine. But, by default the soap response Content-Type we receive for soap 1.1 messages is application/soap+xml; charset=UTF-8 HTTP Header.
  • We expect that when a soap 1.1 request is sent, the returned Content-Type should be text/xml.

Resolution

  • When soap 1.2 binding is set in camel-cxf transport, the expectation is that it should serve for both soap 1.1 as well as 1.2 soap requests.

However, when soap 1.1 request is sent, the Content-Type returned in the response is application/soap+xml, which is not correct.
The expected soap response Content-type for soap 1.1 message with soap 1.2 binding set should still be text/xml.

  • This behaviour of camel-cxf transport differs from the pure CXF's JAX-WS frontend configuration, wherein, the Content-Type returned in response for soap 1.1 request is text/xml.

  • There is a bug report which is logged here, https://issues.jboss.org/browse/ENTESB-4461.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.