Small addition to jPOS XML message format

When we started to log messages using a very simple XML format a long time ago, and then created the XMLPackager to support that message format, we never thought that this was going to be so heavily used, we frequently find ISO-8583 interchanges based on this format, implemented in different languages by different vendors in different countries.

I’ve recently been involved in the deployment of an ISO/Bridge system at a financial institution in one African country connected to another institution at another African country. When I asked for the ISO-8583 specs in order to configure ISO/Bridge, I was surprised to see that the specs where XML based, and basically our spec.

I hope we start seeing this with the jPOS CMF soon.

The existing format looks like this:

 <isomsg>
   <field id="0" value="0800" />
   <field id="11" value="000001" />
   <field id="70" value="301" />
 </isomsg>

Starting in jPOS 1.6.5 r2817, you can optionally use:

 <isomsg>
   <field id="0">0800</field>
   <field id="11">000001</field>
   <field id="70">301</field>
 </isomsg>

Or any combination, i.e:

 <isomsg>
   <field id="0" value="0800" />
   <field id="11" value="000001" />
   <field id="70">301</field>
 </isomsg>

This is particularly useful in some implementations that use XML content as part of the ISO-8583 payload, in the past, we had to expand it using XML entities such as <, > that where not nice looking in the logs.

With the new addition, we can:

 <isomsg>
   <field id="0" value="0800" />
   <field id="11" value="000001" />
   <field id="70">301</field>
   <field id="127">< ?xml version='1.0' encoding='UTF-8' ?>
      <custom>
         <tid>29110001</tid>
         <message>I love XML tags</message>
      </custom>
   </field>
 </isomsg>

(you have to add a CDATA block around your inner XML)

At response time, we wanted to make it as backward compatible as possible, so we only use this mode if we detect that the field content is XML.

This entry was posted in general. Bookmark the permalink.

Comments are closed.