【问题标题】:wso2esb how to respond message in iso8583 inbound endpointwso2esb 如何在 iso8583 入站端点中响应消息
【发布时间】:2016-09-13 18:34:35
【问题描述】:

我正在从 testclient 向我的入站发送 ISO8583 消息,

我有日志控制台:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Body>
<ISOMessage xmlns="http://ws.apache.org/ns/synapse">
<data>
<field id="0">0200</field>
<field id="3">568893</field>
<field id="4">000000020000</field>
<field id="7">0110563280</field>
<field id="11">456893</field>
<field id="44">DFGHT</field>
<field id="105">ABCDEFGHIJ 1234567890</field>
</data>
</ISOMessage>
</soapenv:Body>
</soapenv:Envelope>


Response From Server :ISOMessage from pool-28-thread-1 is consumed :
0210B220000002100000000000000080000056892300000010050001105632804568930005KAMAL021ABCDEFGHIJ 1234567890

如何更改来自服务器的响应,例如我想将字段 id 105 从 &lt;field id="105"&gt;ABCDEFGHIJ 1234567890&lt;/field&gt; 更改为 &lt;field id="105"&gt;xxxxxxxxxx 000000000&lt;/field&gt;

我不知道如何更改数据并将其发送回客户端。 我在 wso2 文档上搜索,如何在入站响应消息,但我找不到任何东西。 如何处理传入的 ISOMessage,对其进行更改并将其发送回客户端? 我们需要创建连接器还是只是按顺序修改数据?

谢谢

【问题讨论】:

    标签: wso2 wso2esb iso8583


    【解决方案1】:

    您可以简单地修改序列中的 XML。收到消息后,您可以使用Enrich Mediator 对其进行修改,如下所示(您需要指定正确的 XPath 来标识要更改的元素)。

    修改响应后,可以使用Send mediator发送给a

    <!-- todo: receive the message -->
    
    <property name="newValue" value="xxxxxxxxxx 000000000"/>
    <enrich>
      <source type="property" clone="true" property="newValue"/>
      <target xpath="$body/*[1]/*[1]/*[7]"/>
    </enrich>
    <log>
      <property name="message" expression="$body"/>
    </log>
    
    <!-- todo: send the message -->
    

    【讨论】:

      猜你喜欢
      • 2016-05-21
      • 2016-01-20
      • 2014-02-12
      • 2019-06-01
      • 2016-09-15
      • 1970-01-01
      • 2013-07-25
      • 1970-01-01
      • 2017-08-15
      相关资源
      最近更新 更多