You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Gnanaguru S <gn...@gmail.com> on 2015/05/11 06:02:39 UTC

Handle Soap1.1 and Soap1.2 payloads in a single CXF WS Endpoint

Hi All Camel cxf users, 

A general question on how to handle both Soap 1.1 and Soap1.2 payloads in a
single CXF gateway endpoint ( with cxf dataformat is MESSAGE)

I am exposing my camel routes through a WS endpoint, my cxf endpoint
definition looks as shown below:
    
	<camel-cxf:cxfEndpoint id="esb-adapter-ws-gateway" 
		wsdlURL="adapters/esb/wsdls/product-v1.wsdl"
		address="/esb/adapter/v1"
		serviceName="ns:EsbService"
		endpointName="ns:EsbServiceSOAP12Port"
		xmlns:cfc="http://www.test.com/services/esb/adapter/v1">
        <camel-cxf:properties>
            <entry key="dataFormat" value="MESSAGE" />
        </camel-cxf:properties>
    </camel-cxf:cxfEndpoint>
	
	
Here I use MESSAGE dataformat, because it gives more control & visibility
over the fault payloads. And also I like it :)

The question is , I want to handle both Soap 1.1 and Soap 1.2 payloads at
this endpoint. 

How I am handling this at route level ?

I am checking for the incoming soap namespace and setting a flag through
camel headers. Based on the header, I am setting the soap namespace for Soap
response & Soap Faults. 

The solution works fine, However I am concerned about the
endpointName="ns:EsbServiceSOAP12Port" mentioned in the cxf endpoint
declaration. 

1. I cant define both Soap 1.1 and Soap 1.2 ports from the WSDL
2. I cant ignore endpointName option :)


Is there a better way to handle these kind of scenario's ?

Note: I am using XSLT to form the response and fault messages. For eg: If
the incoming payload is Soap1.1 then I have a separate Soap 1.1 fault xslt
template to generate fault payloads. 


Regards
Guru
@tallguru
camelguru.com





--
View this message in context: http://camel.465427.n5.nabble.com/Handle-Soap1-1-and-Soap1-2-payloads-in-a-single-CXF-WS-Endpoint-tp5766947.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Handle Soap1.1 and Soap1.2 payloads in a single CXF WS Endpoint

Posted by Gnanaguru S <gn...@gmail.com>.
The same question is posted here as well:

http://stackoverflow.com/questions/30204063/handle-multiple-soap-versions-in-camel
<http://stackoverflow.com/questions/30204063/handle-multiple-soap-versions-in-camel>  



--
View this message in context: http://camel.465427.n5.nabble.com/Handle-Soap1-1-and-Soap1-2-payloads-in-a-single-CXF-WS-Endpoint-tp5766947p5767034.html
Sent from the Camel - Users mailing list archive at Nabble.com.