我必须使用ESB Task(调度程序)将XML消息发送到我的jms代理服务(服务通过JMS接收和发回消息)。 我尝试了2种解决方案。
1解决方案
在添加的任务中,我填写:
message -> my XML
injectTo -> set 'proxy'
proxyName -> my proxy name
结果是,我的jms代理接收消息但没有JMS_Corelation(我猜这个消息是在ESB中发送本地的),我得到了这个错误:
Unexpected error sending message back
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:163)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:321)
at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:94)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:255)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:556)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:198)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
at org.apache.axis2.transport.local.LocalResponder.handleResponse(LocalResponder.java:214)
at org.apache.axis2.transport.local.LocalResponder.invoke(LocalResponder.java:111)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:163)
at org.apache.synapse.mediators.builtin.RespondMediator.mediate(RespondMediator.java:23)
at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:77)
at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:255)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:556)
at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:198)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:488)
at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:170)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
如果我将此消息发送到队列,则所有工作流程都可以正常工作,因此配置良好。
2解决方案
在添加的任务中,我填写:
message -> my XML
to -> my jms endpoint
format -> message format
结果是,没有任何结果,因为没有任何事情发生。我的jms代理服务没有收到任何消息。
有人知道如何解决这个问题吗? 也许有另一种方法可以做到这一点?
答案 0 :(得分:1)
您的JMS代理配置为从JMS队列或主题接收消息。
您应该尝试编写一个命名序列,将适当的消息发送到您的队列或主题中。然后,配置您的计划任务以调用此序列:
<root>myMessage</root>