...
PAYLOAD means you will get or set the payload message which has been take out the SOAP envelope from or into the CXF message. You can use the Header.HEADER_LIST as the key to set or get the SOAP headers and use the List<Element> to set or get SOAP body elements.
Camel 1.x branch, you can get the List<Element> and header from the CXF Message, but if you want to set the response message, you need to create the cxf message by use the CXF API.
Wiki Markup |
---|
{snippet:id=payload|lang=java|url=camel/branches/camel-1.x/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfConsumerPayloadTest.java} |
Change in 2.0, CxfMessage.getBody() will return a org.apache.camel.component.cxf.CxfPayload object, which has getters for SOAP message headers and Body elements. This change enables decoupling the native CXF message from the Camel message.
Wiki Markup |
---|
{snippet:id=payload|lang=java|url=camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfPayLoadSoapHeaderTestCxfConsumerPayloadTest.java} |
How to throw the SOAP Fault from Camel
...