Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Info
titleSupported SOAP versions

SOAP 1.1 is supported by default. SOAP 1.2 is supported from Camel 2.11 onwards.

Tip
titleNamespace prefix mapping

See JAXB for details how you can control namespace prefix mappings when marshalling using SOAP data format.

ElementNameStrategy

An element name strategy is used for two purposes. The first is to find a xml element name for a given object and soap action when marshaling the object into a SOAP message. The second is to find an Exception class for a given soap fault name.

...

When using XML DSL there is a version attribute you can set on the <soap> <soapjaxb> element.

Code Block
xml
xml
    <!-- Defining a ServiceInterfaceStrategy for retrieving the element name when marshalling -->
    <bean id="myNameStrategy" class="org.apache.camel.dataformat.soap.name.ServiceInterfaceStrategy">
    	<constructor-arg value="com.example.customerservice.CustomerService"/>
	<constructor-arg value="true"/>
    </bean>

...

Code Block
xml
xml
<route>
  <from uri="direct:start"/>
  <marshal>
    <soap<soapjaxb contentPath="com.example.customerservice" version="1.2" elementNameStrategyRef="myNameStrategy"/>
  </marshal>
  <to uri="jms:myQueue"/>
</route>

...