英文:
Unable to push data to JMS queue
问题
我正在尝试将一些数据推送到JMS队列,但当我在队列上看到接收到的消息时,数据是空的。入队消息的数量正在增加,这意味着端点被正确调用,但数据没有正确传递。我附上我的代码如下:
<log level="custom">
<property name="MockApi" value="After payload"/>
<property expression="$ctx:XML" name="Payload"/>
</log>
<property name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<call>
<endpoint>
<address format="soap11" uri="jms:/Check?transport.jms.ConnectionFactory=myQueueSender">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</call>
日志记录如下:
MockApi = After payload, Payload = <prov><Name>wajih</Name></prov><prov><Name>Ali</Name></prov>
请告诉我这里是否有什么问题。
英文:
I am trying to push some data to a JMS queue, however, the data is blank when I see the message received on the queue. The number on enqueued message is increasing which means endpoint is being called correctly, but the data is not going through properly. I'm attaching my code below. Please let me know what can be corrected here.
<log level="custom">
<property name="MockApi" value="After payload"/>
<property expression="$ctx:XML" name="Payload"/>
</log>
<property name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<call>
<endpoint>
<address format="soap11" uri="jms:/Check?transport.jms.ConnectionFactory=myQueueSender">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</call>
The log is logging below:
MockApi = After payload, Payload = <prov><Name>wajih</Name></prov><prov><Name>Ali</Name></prov>
Please let me know if something wrong here.
答案1
得分: 0
尝试以下内容。
<log level="custom">
<property name="MockApi" value="After payload"/>
<property expression="$ctx:XML" name="Payload"/>
</log>
<enrich>
<source clone="false" type="property" property="XML"/>
<target action="replace" type="body"/>
</enrich>
<property name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<call>
<endpoint>
<address format="soap11" uri="jms:/Check?transport.jms.ConnectionFactory=myQueueSender">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</call>
英文:
Try the following.
<log level="custom">
<property name="MockApi" value="After payload"/>
<property expression="$ctx:XML" name="Payload"/>
</log>
<enrich>
<source clone="false" type="property" property="XML"/>
<target action="replace" type="body"/>
</enrich>
<property name="messageType" scope="axis2" type="STRING" value="text/xml"/>
<property name="OUT_ONLY" scope="default" type="STRING" value="true"/>
<call>
<endpoint>
<address format="soap11" uri="jms:/Check?transport.jms.ConnectionFactory=myQueueSender">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>1</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</address>
</endpoint>
</call>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论