title: Spring-ws client mtom
body: <p>I'm trying to call a web service and add an attachment to my request using mtom. Mtom is enabled on the web service I'm calling and I can call the service ok using soapui.</p>
  
  <p>The schema for the request looks like this;</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;element name="MyRequest"&gt;
      &lt;complexType&gt;
          &lt;sequence&gt;
              ...
              &lt;element name="content" type="base64Binary"
                  xmime:expectedContentTypes="text/xml" /&gt;
          &lt;/sequence&gt;
      &lt;/complexType&gt;
  &lt;/element&gt;
  </code></pre>
  
  <p>In my java code I then create the jaxb request object and attempt to set the content from a string;</p>
  
  <pre><code>MyRequest request = factory.createMyRequest();
  
  StreamSource ss = new StreamSource(new StringReader("some content..."));
  
  request.setContent(ss);
  
  WebServiceTemplate wst = ...;
  
  wst.marshalSendAndReceive(request);
  </code></pre>
  
  <p>I've set my marshaller to have mtom enabled (although I'm not sure this is necessary on the client);</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;bean id="my-marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller"&gt;
      &lt;property name="contextPath" value="..."/&gt;
      &lt;property name="mtomEnabled" value="true"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>But I get the following exception;</p>
  
  <pre>javax.xml.transform.TransformerFactoryConfigurationError: Provider net.sf.saxon.TransformerFactoryImpl not found</pre>
  
  <p>Does anyone have any ideas of what I'm doing wrong or can anyone show me an example of how to marshal a jaxb request with an mtom attachment from a spring-ws client? Help would be greatly appreciated.</p>