How to create ISO8583 Meesage from XML using j8583

1.7k Views Asked by At

Using http://j8583.sourceforge.net/ I have parsed ISO message to XML in Java.

ISO to XML:

 <j8583config>
 <parse>
  <PROCESSINGCODE>000000</PROCESSINGCODE> 
  <SYSTEMTRACEAUDITNUMBER>000001</SYSTEMTRACEAUDITNUMBER> 
  <Cardacceptorterminalidentification>3239313130303031</Cardacceptorterminalidentification> 
  <Reservednational>001054455354204D45535347</Reservednational> 
  <Networkmanagementinformationcode>0301</Networkmanagementinformationcode> 
  </parse>
  </j8583config>

Now I need to do vice-versa. I need to create ISO message from XML.

Can someone please guide for this.

Any help is appreciated.

1

There are 1 best solutions below

6
On

j8583 doesn't do that. You'll have to parse the XML yourself, create an IsoMessage and set the fields you want from the values in the XML fields.

At most, you could transform the XML to something resembling a message template, then create a MessageFactory and create a message with it, but that sounds terribly inefficient.

Perhaps a XSLT transformation could do the trick?