我有一个代理在WSO2 ESB 4.6.0中调用另一个本地代理。 基本上,定义是:
<proxy name="Proxy1" >
<target>
<inSequence>
<xslt/>
<header name="Action" value="issueActivity" />
<send>
<endpoint>
<address uri="http://localhost:8280/services/Proxy2" format="soap11"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<filter xpath="not(get-property('FAULT'))">
<xslt/>
</filter>
<send />
</outSequence>
</target>
</proxy>
<proxy name="Proxy2">
<target>
<inSequence>
<xslt />
<property name="DISABLE_CHUNKING" value="true" scope="axis2"/>
<send>
<endpoint key="Inbound" />
</send>
</inSequence>
<outSequence>
<filter xpath="get-property('FAULT')">
<then>
<sequence key="DefaultErrorSequence" />
<header name="To" action="remove" />
</then>
<else>
<property name="Content-Encoding" scope="transport" action="remove"/>
<xslt/>
</else>
</filter>
<send />
</outSequence>
</target>
</proxy>
在几乎所有的调用中,流程都运行良好,但是当Proxy1
尝试调用Proxy2
时,定期会在日志中显示此错误:
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:03:35,431] WARN {org.apache.synapse.transport.passthru.TargetHandler} - Receiving response while the handler is in an inconsistent state REQUEST_HEAD
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:03:35,432] ERROR {org.apache.synapse.transport.passthru.util.RelayUtils} - Error while building Passthrough stream
org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:296)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
[...]
日志中的错误结束时:
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:04:35,435] WARN {org.apache.synapse.transport.passthru.TargetHandler} - Connection time out while in state: REQUEST_DONE
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:04:35,436] WARN {org.apache.synapse.FaultHandler} - ERROR_CODE : 101507
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:04:35,436] WARN {org.apache.synapse.FaultHandler} - ERROR_MESSAGE : Error in Sender
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:04:35,437] WARN {org.apache.synapse.FaultHandler} - ERROR_DETAIL : Error in Sender
TID: [0] [ESB] TID: [0] [ESB] [2014-05-08 12:04:35,437] WARN {org.apache.synapse.FaultHandler} - ERROR_EXCEPTION : null
根据WSO2文档,错误101507
表示Connection canceled
。
问题是这个错误的原因是什么?这是客户端或服务器的问题吗?
更新
显然,错误的原因与此问题中描述的相同:WSO2 ESB unknown error code 102511
答案 0 :(得分:2)
在编写查询时,您是否在操作部分启用了“返回请求状态”复选框?这可能会导致问题。试试吧..
答案 1 :(得分:1)
总结到目前为止的所有评论,我认为第一个成就是问题在代替Proxy1->Proxy2
架构时解决了,将Proxy2
更改为序列并使用Sequence mediator调用它们而不是调用使用send mediator删除之前显示的错误。
这工作正常,但由于我们需要Proxy1->Proxy2
架构,我认为将Proxy1
的“outSequence”定义为接收Proxy1
的“inSequence”中的序列并将其发送给{{1}使用带有Proxy2
端点的Send mediator将是解决方案。