title: Send file to Mule inbound-endpoint
body: <p>I'm trying to send a form with a file and two inputs to an Mule inbound-endpoint. I've got a custom-processor, and a flow defined like that:</p>
  
  <pre><code>&lt;custom-processor class="informa.app.classifier.transformers.MyfileUploadProcessor" name="fileuploadprocessor"&gt;&lt;/custom-processor&gt;
  &lt;flow name="httpTest"&gt;
      &lt;http:inbound-endpoint
                      address="http://tango.privada.informa:11002/services/fileupload"&gt;&lt;/http:inbound-endpoint&gt;
      &lt;processor ref="fileuploadprocessor"/&gt;
  &lt;/flow&gt;
  </code></pre>
  
  <p>In the class MyfileUploadProcessor:</p>
  
  <p>public class MyfileUploadProcessor implements MessageProcessor {</p>
  
  <pre><code>    @Override
      public MuleEvent process(MuleEvent event) throws MuleException {
          // TODO Auto-generated method stub
          String response = "success";
  
          MuleMessage mulemessage = event.getMessage();
  
          String countryCode = mulemessage.getInboundProperty("username");
          String sourceCode = mulemessage.getInboundProperty("password");
          InputStream input = (InputStream) mulemessage.getPayload();
  
  ...
  </code></pre>
  
  <p>And to test, a simple html:</p>
  
  <p>
  
  </p>
  
  <pre><code>&lt;form action="http://tango.privada.informa:11002/services/fileupload" method="post"
  enctype="multipart/form-data"&gt;
     &lt;p&gt;Country Code :&lt;input type="text" name="username" /&gt;&lt;/p&gt;
     &lt;p&gt;Source Code :&lt;input type="text" name="password" /&gt;&lt;/p&gt;
     &lt;p&gt;File :&lt;input type="file" name="payload" /&gt;&lt;/p&gt;
     &lt;p&gt;&lt;input type="submit" name="submit" value="submit" /&gt;
  &lt;input type="reset" name="reset" value="reset"&gt;&lt;/p&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The issue is I can't create a file from the payload of the mulemessage and I don't know how to get the value of the inputs in the form...what I'm doing wrong? any clues?</p>
  
  <p>Thanks in advance</p>