title: How to Solve Message payload is of type: BufferInputStream Exception in Mule
body: <p>I am already transforming to byte array but i constantly get this error :</p>
  
  <pre><code>ERROR 2015-02-25 11:12:30,517 [[ESR].HTTP_Request_Listener.worker.01] org.mule.exception.DefaultMessagingExceptionStrategy: 
  ********************************************************************************
  Message               : Response code 400 mapped as failure. Message payload is of type: BufferInputStream
  Code                  : MULE_ERROR--2
  --------------------------------------------------------------------------------
  Exception stack is:
  1. Response code 400 mapped as failure. Message payload is of type: BufferInputStream (org.mule.module.http.internal.request.ResponseValidatorException)
    org.mule.module.http.internal.request.SuccessStatusCodeValidator:37 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/module/http/internal/request/ResponseValidatorException.html)
  --------------------------------------------------------------------------------
  Root Exception stack trace:
  org.mule.module.http.internal.request.ResponseValidatorException: Response code 400 mapped as failure. Message payload is of type: BufferInputStream
      at org.mule.module.http.internal.request.SuccessStatusCodeValidator.validate(SuccessStatusCodeValidator.java:37)
      at org.mule.module.http.internal.request.DefaultHttpRequester.innerProcess(DefaultHttpRequester.java:202)
      at org.mule.module.http.internal.request.DefaultHttpRequester.process(DefaultHttpRequester.java:166)
      + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
  ********************************************************************************
  </code></pre>
  
  <p>and this is my flow :</p>
  
  <pre><code>&lt;sub-flow name="requestBeanCreate"&gt;
      &lt;object-to-byte-array-transformer /&gt;
      &lt;set-payload value="#[app.registry.messageBean.createServiceRequest(message.inboundProperties['http.uri.params']['name'],payload)]"/&gt;
  &lt;/sub-flow&gt;
  
  &lt;flow name = "RequestsEntryFlow" &gt;
      &lt;http:listener allowedMethods="POST"  parseRequest="false"  config-ref="HTTP_Request_Listener" path="/{name}" doc:name="HTTP Entry Flow" /&gt;
      &lt;flow-ref name="requestBeanCreate" /&gt;
      &lt;choice doc:name="Choice"&gt;
          &lt;when expression="#[app.registry.messageBean.isEMCRequired(payload)]"&gt;
              &lt;jms:outbound-endpoint connector-ref="jms-connector" ref="EMCRequiredRequestsQueue" /&gt;
          &lt;/when&gt;
          &lt;otherwise&gt;             
               &lt;flow-ref name="req" /&gt;
          &lt;/otherwise&gt;
      &lt;/choice&gt;
  &lt;/flow&gt;
  
  &lt;http:request-config parseResponse="false" name="HTTP_Request_Configuration"   /&gt;
  
  &lt;sub-flow name = "req"&gt;    
      &lt;set-variable variableName="id" value="#[payload]" doc:name="Variable" /&gt;
      &lt;set-variable variableName="destination" value="#[app.registry.routerBean.getDestination(app.registry.messageBean.getReceiverID(payload))]"  doc:name="Variable" /&gt;
      &lt;set-payload value="#[app.registry.messageBean.sendRequestToDestination(payload)]" /&gt;              
      &lt;processor-chain&gt;
      &lt;http:request  parseResponse="false" config-ref="HTTP_Request_Configuration" host="#[flowVars.destination]" port="80" path="/" method="POST" /&gt;
          &lt;object-to-byte-array-transformer /&gt;
          &lt;expression-component&gt;
              app.registry.messageBean.sendResponseToSender(flowVars.id);
              app.registry.messageBean.messageProcessedSuccessfully(flowVars.id);
          &lt;/expression-component&gt;
      &lt;/processor-chain&gt;
  &lt;/sub-flow&gt;
  </code></pre>