soap 1.1 response Content-Type is not handled as expected with soap 1.2 binding in camel-cxf endpoint
Environment
- Red Hat JBoss Fuse
- 6.1.0
- Apache Camel
- camel-cxf component
- Apache CXF
Issue
-
We would like to get an answer on this question that my colleague raised
http://qnalist.com/questions/6031345/handle-soap1-1-and-soap1-2-payloads-in-a-single-cxf-ws-endpoint. -
Here's how our camel-cxf transport definition looks like:
<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-Typewe receive for soap 1.1 messages isapplication/soap+xml; charset=UTF-8HTTP Header. - We expect that when a soap 1.1 request is sent, the returned
Content-Typeshould betext/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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
