通过 wso2 esb 中的计划任务的代理服务 运行 出现错误 "Unexpected error sending message back"
Proxy service run through scheduled task in wso2 esb is giving error "Unexpected error sending message back"
我们已经在 eclipse 中使用 esb 项目在 wso2 esb 中创建了一个代理服务。此代理服务正在调用 2 个 Web 服务,第一个是从遗留系统查询数据,另一个是在 oracle fusion 中创建销售订单。
当 运行 from soap ui 成功执行并创建销售订单时,此代理服务没有错误。当 运行 来自计划任务时,它 运行 并创建订单但在 wso2carbon.log 文件中给出错误 "Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender}"。
定时任务xml如下
<task class="org.apache.synapse.startup.tasks.MessageInjector"
group="synapse.simple.quartz" name="testtask2">
<trigger count="1" interval="60"/>
<property name="proxyName" value="EslSfaOFAOMSOIntegrationPS" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="soapAction" value="operation" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="injectTo" value="proxy" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="to"
value="http://10.1.6.176:8280/services/EslSfaOFAOMSOIntegrationPS.EslSfaOFAOMSOIntegrationPSHttpSoap11Endpoint" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="message" xmlns:task="http://www.wso2.org/products/wso2commons/tasks">
<soapenv:Envelope xmlns:esl="esl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<esl:operation/>
</soapenv:Body>
</soapenv:Envelope>
</property>
</task>
完整的错误日志如下
TID: [-1234] [] [2017-02-23 06:19:17,471] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Connection:keep-alive,Content-Language:en,Content-Length:0,Content-Type:,Date:Thu, 23 Feb 2017 06:19:17 GMT,Server:Oracle-Application-Server-11g,Set-Cookie:<oracle fusion url>; httponly; secure; path=/,X-ORACLE-DMS-ECID:005IImNkZMq3z005RzH7id0001U70002LZ,<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender}
org.apache.axis2.AxisFault: Transport out has not been set
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:432)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:222)
at org.apache.synapse.mediators.builtin.RespondMediator.mediate(RespondMediator.java:35)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:260)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:766)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
将 <property name="OUT_ONLY" value="true"/>
放入您的 EslSfaOFAOMSOIntegrationPS
代理中。
而且我认为您可以删除 to
属性,因为消息已发送到 proxyName
属性.
中指定的代理
我们已经在 eclipse 中使用 esb 项目在 wso2 esb 中创建了一个代理服务。此代理服务正在调用 2 个 Web 服务,第一个是从遗留系统查询数据,另一个是在 oracle fusion 中创建销售订单。
当 运行 from soap ui 成功执行并创建销售订单时,此代理服务没有错误。当 运行 来自计划任务时,它 运行 并创建订单但在 wso2carbon.log 文件中给出错误 "Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender}"。
定时任务xml如下
<task class="org.apache.synapse.startup.tasks.MessageInjector"
group="synapse.simple.quartz" name="testtask2">
<trigger count="1" interval="60"/>
<property name="proxyName" value="EslSfaOFAOMSOIntegrationPS" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="soapAction" value="operation" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="injectTo" value="proxy" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="to"
value="http://10.1.6.176:8280/services/EslSfaOFAOMSOIntegrationPS.EslSfaOFAOMSOIntegrationPSHttpSoap11Endpoint" xmlns:task="http://www.wso2.org/products/wso2commons/tasks"/>
<property name="message" xmlns:task="http://www.wso2.org/products/wso2commons/tasks">
<soapenv:Envelope xmlns:esl="esl" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<esl:operation/>
</soapenv:Body>
</soapenv:Envelope>
</property>
</task>
完整的错误日志如下
TID: [-1234] [] [2017-02-23 06:19:17,471] ERROR {org.apache.synapse.core.axis2.Axis2Sender} - Connection:keep-alive,Content-Language:en,Content-Length:0,Content-Type:,Date:Thu, 23 Feb 2017 06:19:17 GMT,Server:Oracle-Application-Server-11g,Set-Cookie:<oracle fusion url>; httponly; secure; path=/,X-ORACLE-DMS-ECID:005IImNkZMq3z005RzH7id0001U70002LZ,<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body/></soapenv:Envelope> Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender}
org.apache.axis2.AxisFault: Transport out has not been set
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:432)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:222)
at org.apache.synapse.mediators.builtin.RespondMediator.mediate(RespondMediator.java:35)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:260)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:766)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:261)
at org.apache.axis2.transport.base.threads.NativeWorkerPool.run(NativeWorkerPool.java:172)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
将 <property name="OUT_ONLY" value="true"/>
放入您的 EslSfaOFAOMSOIntegrationPS
代理中。
而且我认为您可以删除 to
属性,因为消息已发送到 proxyName
属性.