WSO2 ESB task (scheduler) doesn't work

為{幸葍}努か 提交于 2020-01-17 11:16:07

问题


I have to send XML message to my jms proxy service (service receive and send back message over JMS) with ESB Task (scheduler). I tried 2 solutions.

1 solution

In added task I fill:

message -> my XML
injectTo -> set 'proxy'
proxyName -> my proxy name

The result is that, my jms proxy receive the message but without JMS_Corelation (I guess the message is send local in ESB) and I get that error:

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)

If I send this message to queue, all workflow works fine, so it is well configure.

2 solution

In added task I fill:

message -> my XML
to -> my jms endpoint
format -> message format

The result is that, there is no result becasue nothing is happend. My jms proxy service doesn't receive any message.

Someone knows how to fix that? Maybe there is another way to do that?


回答1:


Your JMS Proxy is configured to receive messages from a JMS queue or topic.

You should try to write a named sequence that send an appropriate message into your queue or topic. Then, configure your scheduled task to call this sequence :

  • injectTo = sequence
  • format = soap11 (for exemple)
  • soapAction = mySoapAction (if needed)
  • message = <root>myMessage</root>
  • sequenceName = YourSequenceThatSendTheMessageToJMS


来源:https://stackoverflow.com/questions/29290847/wso2-esb-task-scheduler-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!