我正在使用Mule ESB 3.2来调用Web服务。由于响应是分页的,我需要多次调用此服务并合并结果。第二次调用wevservice时,我在Mule中得到一个I / O异常,我在被叫服务端看不到任何东西。 我也尝试使用SOAP UI模拟服务,结果相同。
Mule日志错误(MULE_ERROR-42999):
org.apache.commons.httpclient.HttpMethodDirector: I/O exception (java.net.SocketException) caught when processing request: Connection reset by peer: socket write error
这是我的骡子配置:
<?xml version="1.0" encoding="UTF-8"?>
<mule
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml"
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:core="http://www.mulesoft.org/schema/mule/core"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:http="http://www.mulesoft.org/schema/mule/http"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/3.2/mule-xml.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/3.2/mule.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/3.2/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/3.2/mule-http.xsd">
<configuration defaultResponseTimeout="30000" />
<custom-transformer class="com.mutnelat.transform.ComingEvents"
name="ComingEvents">
<spring:property name="eventBrandIdDefault" value="${eventBrandIdDefault}" />
<spring:property name="fatherClassificationId" value="${fatherClassificationId}" />
</custom-transformer>
<custom-transformer class="com.mutnelat.transform.ComingEventsResponse"
name="ComingEventsResponse" mimeType="text/plain" />
<custom-transformer class="com.mutnelat.transform.PageCount" name="PageCount"/>
<!-- Eventlist flows -->
<flow name="EventList" processingStrategy="synchronous">
<http:inbound-endpoint address="${web.service.url}/events" exchange-pattern="request-response">
</http:inbound-endpoint>
<flow-ref name="GetEventsFromCRM" />
<transformer ref="PageCount" />
<choice>
<when evaluator="groovy"
expression="message.getSessionProperty('page_count') > 0">
<logger level="INFO" message="More than one page..." />
<flow-ref name="GetEventsFromCRM" />
</when>
</choice>
<transformer ref="ComingEventsResponse" />
<mulexml:xslt-transformer name="transform-response-fi"
xsl-file="events.xsl" mimeType="text/xml" />
</flow>
<!-- Eventlist subflows -->
<flow name="GetEventsFromCRM" processingStrategy="synchronous">
<transformer ref="ComingEvents" />
<logger level="INFO" doc:name="Logger" message="Calling..." />
<http:outbound-endpoint host="${adapter.host}" method="GET"
port="${adapter.port}" path="crmService" user="${adapter.username}"
password="${adapter.password}">
<cxf:jaxws-client operation="sendFetchXml" serviceClass="com.mutnelat.adapter.ws.CRMService" />
</http:outbound-endpoint>
<logger level="INFO" doc:name="Logger" message="Reveived coming events" />
</flow>