I'm not sure I understand your question 100%. Regardless, this info will
probably give you the insight and direction you need...
We have a participant in our TransactionManager that looks like this:
<group name="QueryAMEX">
<participant class="org.jpos.nnn.CreateAMEXRequest"
logger="Q2" realm="create-amex-request">
<property name="mti" value="1100" />
<property name="pcode" value="004000" />
<property name="space" value="jdbm:amex-stan" />
<property name="template" value="cfg/amex-template.xml" />
<property name="checkpoint" value="create-amex-request" />
</participant>
&query_amex_host;
&credit_response;
</group>
Then, we do something like this in our code where we create the outbound
ISO8583 request (these are not contiguous lines...I'm plucking the relevant
lines):
protected ISOMsg templateMsg;
[SNIP]
ISOMsg m = (ISOMsg) templateMsg.clone();
[SNIP]
templateMsg = getTemplate (cfg.get ("template"));
[SNIP]
protected ISOMsg getTemplate (String filename)
throws IOException, ISOException
{
String k = getClass().getName()+"."+filename;
ISOMsg m = (ISOMsg) sp.rdp (k);
if (m == null) {
m = new ISOMsg ();
File templateFile = new File (filename);
if (templateFile.canRead()) {
LogEvent evt = createInfo ();
FileInputStream fis = new FileInputStream (templateFile);
byte[] b = new byte[fis.available()];
fis.read (b);
m.setPackager (new XMLPackager ());
m.unpack (b);
evt.addMessage ("<template-file>" + filename +
"</template-file>");
evt.addMessage (m);
Logger.log (evt);
} else {
m = new ISOMsg(); // dummy message
}
sp.out (k, m, 60000L);
}
return m;