{color:#000000}My mule config is :
{color:#003366}<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/3.2/mule-vm.xsd">
<description>
This configuration uses an HTTP endpoint to receive requests.
</description>
<custom-transformer name="ExceptionToString" class="org.mule.example.hello.ExceptionToString"/>
<http:connector name="HttpConnector" clientSoTimeout="12000" keepSendSocketOpen="true" />
<http:endpoint name="HttpEndpoint" address="http://localhost:8888/services" method="POST" encoding="utf-8" mimeType="multipart/form-data"
connector-ref="HttpConnector">
</http:endpoint>
<flow name="core">
<inbound-endpoint ref="HttpEndpoint" exchange-pattern="request-response" mimeType="multipart/form-data"/>
<outbound-endpoint address="stdio://ERR" exchange-pattern="one-way"/>
<custom-exception-strategy class="net.bmc.exception.MuleExceptionHandler"/>
</flow>
<flow name="exception">
<vm:inbound-endpoint path="userErrorHandler" responseTransformer-refs="ExceptionToString"
exchange-pattern="request-response"/>
<outbound-endpoint address="stdio://ERR" exchange-pattern="one-way"/>
</flow>
<!-- Handle any unexpected errors. Errors could also be routed elsewhere,
e.g. into an error file, send via email to a list, stored in a database, etc. -->
<flow name="SystemErrorHandler">
<vm:inbound-endpoint path="systemErrorHandler" exchange-pattern="request-response"/>
<outbound-endpoint address="stdio://ERR" exchange-pattern="one-way"/>
</flow>
</mule>
{color:#000000}please help me to solve this problem{color}
{color:#000000}Thanx{color}
{color}{color}{color}{color:#003366}
{color}
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
//We need to store this so that the headers for the part can be read
parts = in.getParts();
for (Part part : parts)
{
if (part.getName().equals("payload"))
{
body = part.getInputStream();
break;
}
}
if (body == null)
{
throw new IllegalArgumentException("todo");
}
}
So after i commented the if block or one of my parameters name being "payload" it works perfect. somebody knows why there is this kind of hard code in mule source?
This looks like a bug to me. Can you create a JIRA please and attach this config *and a way to create a failing HTTP request* (i.e. either a for or some httpclient snippet)?
for (Part part : parts) {
// if (part.getName().equals("payload"))
// {
body = part.getInputStream();
break;
// }
}
if (body == null) {
throw new IllegalArgumentException("todo");
}
} finally {
lock.unlock();
}
is it a bug or I have forgotten to configure something in config file?