我正在尝试使用Mule ESB和Alfresco WS在Alfresco中创建一个文件夹。
我收到一个错误,抱怨它是一个MIME问题。流量如下:
<flow name="MuleProxyFlowWS" doc:name="MuleProxyFlowWS">
<http:inbound-endpoint exchange-pattern="request-response"
host="localhost" port="8088" path="createCase" doc:name="HTTP" />
<cxf:jaxws-service namespace="http://docs.oasis-open.org/ns/cmis/ws/200908/"
service="com.alfresco.cmis.ws.ObjectService" doc:name="SOAP"
enableMuleSoapHeaders="false" mtomEnabled="true"
serviceClass="com.alfresco.cmis.ws.ObjectServicePort">
<cxf:ws-security>
<cxf:ws-config>
<cxf:property key="action" value="UsernameToken" />
<cxf:property key="username" value="admin" />
<cxf:property key="passwordCallbackClass" value="mule.security.PasswordCallback" />
</cxf:ws-config>
</cxf:ws-security>
</cxf:jaxws-service>
<cxf:jaxws-client doc:name="SOAP"
clientClass="com.alfresco.cmis.ws.ObjectService" operation="createFolder"
port="ObjectServicePort"
wsdlLocation="/home/dev/MuleStudio/workspace/soapws/src/main/resources/cmis_ws.wsdl"
enableMuleSoapHeaders="false">
<cxf:ws-security>
<cxf:ws-config>
<cxf:property key="user" value="admin" />
<cxf:property key="action" value="UsernameToken" />
<cxf:property key="passwordCallbackClass" value="mule.security.PasswordCallback" />
</cxf:ws-config>
</cxf:ws-security>
</cxf:jaxws-client>
<logger
message="***** COMES HERE WEB SERVICE END POINT ****** #[payload:java.lang.String]"
level="INFO" doc:name="Logger" />
</flow>
错误:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Couldn't find MIME boundary: ------=_Part_225_1899798280.1399630782102. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PushbackInputStream</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
答案 0 :(得分:1)
在调用Content-Type
之前设置jaxws:client
属性,如:
<set-property propertyName="Content-Type" value="whatever it is" />
对于xml,它是application/xml