Hello kanapriya,
Thanks for you answer.
I will explain my case furthermore.
So in my scenario, there are 3 system as below:

   - Bank, which will send inquiry and payment request from an invoice
   - ESB, to receive inquiry from bank, extract data, call web service from
   biller, return result, pack to isomessage and send back response
   - Biller, is a system who produce invoice to be paid from bank

The process flow is discribed as follow:

   - Biller produce an invoice, so the invoice data is recorded with an
   Invoice ID
   - A customer go to bank to pay his invoice, and using his Invoice ID,
   bank send an ISOMessage to ESB with Invoice ID, let say the ID using bit 48
   - ESB receive ISO message from inbound, extract data, get the Invoice
   ID, call a web service Inquiry from Biller using Invoice ID, web service
   return detail data such as name, amount, fine, address, description, etc.
   This detail returned to bank with ISO Message, let say we use bit 48


Right now, I have successfully receive data from inbound, extract Invoice
ID, call web service Inquiry from biller, get return data. And what I'm
still confuse is, how I package data from biller into ISO Message, and send
back to bank from sequence (not Java code). Can you show me a sample how to
package ISOMessage from mediator, and send response to client (bank). A
complete sample from A to Z to A again will be appreciated, thank you.


On Thu, Sep 8, 2016 at 7:16 PM, Kanapriya Kuleswararajan <[email protected]
> wrote:

> 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