title: Mule custom transformer with
body: <p>I'm having some trouble finding out how to create a custom transformer that can input and output a file in Mule 3.2. I have prototyped the code for the transformation and that works fine but I can't find any documentation on how to take in a file in a transformer.</p>
  
  <p>Here is what I have so far as I'm but even this throws an error:</p>
  
  <pre><code>@ContainsTransformerMethods
    public class xmlToJson {
  
    @Transformer
    public File xmlIn(File file) {
      // logic to go here
      return file;
    }
  }
  </code></pre>
  
  <p>Here is the exception that is thrown:</p>
  
  <pre><code>ERROR 2012-06-27 14:08:37,664 [main] org.mule.tooling.server.application.
  ApplicationDeployer: null
  java.lang.IllegalStateException: Cannot convert value of type [convert.xmlToJson]
  to required type [org.mule.api.processor.MessageProcessor] for property 'messageProcessors[0]': no matching editors or conversion strategy found
  </code></pre>
  
  <p>I can't seem to find any documentation or tutorials that show how to structure a custom transformer to take in a file.</p>