Hi Alfario Eka Putra !

What I understand from your question is , You need to extract the field
id="105" from the response string
0210B2200000021000000000000000800000568923000000100500011056
32804568930005KAMAL021ABCDEFGHIJ 1234567890
If that so you can use the following piece of code to set the filed and
corresponding value

ISOMsg isoMsg = new ISOMsg();
isoMsg.setPackager(packager);
isoMsg.unpack(message.getBytes());
isoMsg.set("105", "xxxxxxxxxx 000000000");
byte[] msg = isoMsg.pack();
String packedMessage = new String(msg).toUpperCase();
isoMsg.dump(System.out, "");
return packedMessage;

Generally Inbound messages are inject into the sequence. For further
information, you can follow up the doc [1]. You can construct the format of
isomessage as you need by using payloadload factory mediator [2].

[1] https://docs.wso2.com/display/ESB490/Working+with+Inbound+Endpoints

[2] https://docs.wso2.com/display/ESB490/PayloadFactory+Mediator


Thanks

Kanapriya Kuleswararajan
Associate Software Engineer
Mobile : - 0774894438
Mail : - [email protected]

On Thu, Sep 8, 2016 at 1:30 PM, Alfario Eka Putra <[email protected]
> wrote:

> I'm send ISO8583 message from testclient to my inbound,
>
> i have the log console :
>
> <?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
>
> how to change response from server, for example i want to change field id
> 105 from <field id="105">ABCDEFGHIJ 1234567890</field> to <field
> id="105">xxxxxxxxxx 000000000</field>
>
> I don't know how to alter data and send it back to client. I search on
> wso2 documentation, how to respond message in inbound, but I can't find
> anything. how to handle incoming ISOMessage, alter it, and send it back to
> client? Do we need create connector or just simply modify data in sequence?
>
> thanks
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to