title: Unmarshalling MTOM message using Camel Spring-WS and JAXB dataformat
body: <p>1) Is there a way to unmarshall MTOM message using Camel Spring-WS component?</p>
  
  <p>2) I tried with Camel JAXB dataformat. It didn't work. Datahandler doesn't have any content. Does JAXB dataformat support MTOM?</p>
  
  <pre><code>&lt;dataFormats&gt;
      &lt;jaxb id="jaxb" contextPath="com.mycompany.hr.jaxb"/&gt;
  &lt;/dataFormats&gt;
  
  &lt;route&gt;
      &lt;from uri="spring-ws:rootqname:{http://mycompany.com/hr/schemas}HolidayRequest?endpointMapping=#endpointMapping" /&gt;
      &lt;unmarshal ref="jaxb"/&gt;
      &lt;process ref="testProcessor" /&gt;
  &lt;/route&gt;
  </code></pre>
  
  <p>3) I thought MTOM is not enabled in JAXB dataformat. So I created a custom dataformat using MTOM enabled JAXB2Marshaller. But still facing the same issue. </p>
  
  <pre><code>import java.io.InputStream;
  import java.io.OutputStream;
  
  import javax.xml.transform.Source;
  
  import org.apache.camel.Exchange;
  import org.apache.camel.spi.DataFormat;
  import org.springframework.oxm.jaxb.Jaxb2Marshaller;
  
  public class MtomDataFormat implements DataFormat {
  
      public void marshal(Exchange arg0, Object arg1, OutputStream arg2)
              throws Exception {
          // TODO Auto-generated method stub
  
      }
  
      public Object unmarshal(Exchange exchange, InputStream is) throws Exception {
          Source source = exchange.getContext().getTypeConverter().mandatoryConvertTo(Source.class, is);
  
          Jaxb2Marshaller mar = new Jaxb2Marshaller();
          mar.setContextPath("com.mycompany.hr.jaxb");
          mar.setMtomEnabled(true);
          return mar.unmarshal(source);
      }
  
  }
  </code></pre>
  
  <p>Spring configuration</p>
  
  <p>
          
      </p>
  
  <pre><code>&lt;bean id="endpointMapping"
      class="org.apache.camel.component.spring.ws.bean.CamelEndpointMapping"&gt;
  &lt;/bean&gt;
  
  &lt;bean id="testProcessor" class="TestProcessor" /&gt;
  
  &lt;bean id="mtomDataFormat" class="MtomDataFormat" /&gt;
  
  &lt;camelContext xmlns="http://camel.apache.org/schema/spring"&gt;
      &lt;route&gt;
          &lt;from uri="spring-ws:rootqname:{http://mycompany.com/hr/schemas}HolidayRequest?endpointMapping=#endpointMapping" /&gt;
          &lt;unmarshal ref="mtomDataFormat"/&gt;
          &lt;process ref="testProcessor" /&gt;
      &lt;/route&gt;
  &lt;/camelContext&gt;
  </code></pre>