Mule HTTP POST接收无效子类型错误

Mule HTTP POST接收无效子类型错误,mule,Mule,我有两个Mule流,我正试图通过httppost连接它们。运行时,我收到一个无效的子类型错误。我已经在下面包含了请求和web服务的代码。我还包括了给出的错误。知道我做错了什么吗 请求 <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" contentType="text/xml" doc:name="HTTP" mimeType="text/xml" path="*

我有两个Mule流,我正试图通过httppost连接它们。运行时,我收到一个无效的子类型错误。我已经在下面包含了请求和web服务的代码。我还包括了给出的错误。知道我做错了什么吗

请求

<http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" contentType="text/xml" doc:name="HTTP" mimeType="text/xml" path="***some path removed***" method="POST"/>

网络服务

<mule xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" 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.3.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/jersey http://www.mulesoft.org/schema/mule/jersey/current/mule-jersey.xsd
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 ">

<spring:beans>
<spring:bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<spring:property name="ignoreResourceNotFound" value="true"/>
<spring:property name="locations">
<spring:list>
<spring:value>classpath:local_valueDate.properties</spring:value>
<spring:value>classpath:valueDate.properties</spring:value>
</spring:list>
</spring:property>
</spring:bean>
<spring:bean id="staticDataLoader" name="staticDataLoader" class="StaticDalaLoader"
scope="singleton" init-method="initialize" />
<spring:bean id="valueDateService" name="valueDateService" class="ValueDateService">
<spring:property name="staticDataLoader" ref="staticDataLoader" />
</spring:bean>
</spring:beans>

<flow name="paymentHubServicesFlow1" doc:name="paymentHubServicesFlow1">
<inbound-endpoint exchange-pattern="request-response" responseTimeout="10000" address="${valueDate.host.url}"/>

<jersey:resources doc:name="REST">
<component doc:name="Value Date Service">
<spring-object bean="valueDateService"/>
</component>
</jersey:resources>
</flow>
</mule>

类路径:local_valueDate.properties
类路径:valueDate.properties
错误

********************************************************************************
消息:调用JerseyResourcesComponent{paymentHubServicesFlow1.component.28420486}失败。导致异常的组件是:JerseyResourcesComponent{paymentHubServicesFlow1.Component.28420486}。消息负载的类型为:ContentLengthinInputStream
代码:MULE_错误--2
--------------------------------------------------------------------------------
异常堆栈是:
1.子类型无效。(javax.activation.MimeTypeParseException)
javax.activation.MimeType:-1(http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/activation/MimeTypeParseException.html)
2.javax.activation.MimeTypeParseException:子类型无效。(org.mule.api.MuleRuntimeException)
org.mule.transformer.types.SimpleDataType:53(http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MuleRuntimeException.html)
3.调用JerseyResourcesComponent{paymentHubServicesFlow1.component.28420486}失败。导致异常的组件是:JerseyResourcesComponent{paymentHubServicesFlow1.Component.28420486}。消息负载的类型为:ContentLengthinInputStream(org.mule.component.ComponentException)
org.mule.component.AbstractComponent:148(http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/component/ComponentException.html)
--------------------------------------------------------------------------------
根异常堆栈跟踪:
javax.activation.MimeTypeParseException:子类型无效。
位于javax.activation.MimeType.parse(未知源)
位于javax.activation.MimeType。(未知源)
位于org.mule.transformer.types.SimpleDataType。(SimpleDataType.java:43)
+3个以上(为所有内容设置调试级别日志或“-Dmule.verbose.exceptions=true”)
********************************************************************************
如果从http:outbound中删除mimeType=“text/xml”。它将停止错误。但是,您将收到一条警告,说明未设置内容类型。如果您需要添加Conent类型,我现在会添加一个set属性来绕过它

<set-property propertyName="Content-Type" value="text/xml" doc:name="Property" />       

有一个JIRA已为contentType打开,但从外观上看不起作用:

但是对内容类型有影响的mimeType很可能是另一个值得报告的bug

<set-property propertyName="Content-Type" value="text/xml" doc:name="Property" />