When using an invalid MIME type in set-payload the error message is not very clear.
Deploy this app:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:db="http://www.mulesoft.org/schema/mule/db"
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking"
xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.7.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd">
<http:listener-config name="HTTP_Listener_Configuration" host="0.0.0.0" port="8081" doc:name="HTTP Listener Configuration"/>
<http:request-config name="HTTP_Request_Configuration3" host="localhost" port="8082" doc:name="HTTP Request Configuration"/>
<flow name="nonblockingFlow" processingStrategy="non-blocking">
<http:listener config-ref="HTTP_Listener_Configuration" path="/" doc:name="HTTP" allowedMethods="GET"/>
<http:request config-ref="HTTP_Request_Configuration3" path="/delayedRequest" method="GET" doc:name="HTTP"
responseTimeout="60000"/>
<set-payload value="Response OK" encoding="asdfsadf" returnClass="pepe" name="my-set-payload" mimeType="mimeTypeFake" ignoreBadInput="false"/>
</flow>
</mule>
Request: ~ curl http://localhost:8081/ javax.activation.MimeTypeParseException: Unable to find a sub type. (org.mule.api.MuleRuntimeException). Message payload is of type: BufferInputStream%
App log: org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) -------------------------------------------------------------------------------- Root Exception stack trace: javax.activation.MimeTypeParseException: Unable to find a sub type. at javax.activation.MimeType.parse(MimeType.java:102) at javax.activation.MimeType.<init>(MimeType.java:63) at org.mule.transformer.types.SimpleDataType.<init>(SimpleDataType.java:40) + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ********************************************************************************
|