> For example an ISO message with ASCII packaging like this :
> 303230303030413030303030303038303030303030303030303333333030303030313030303030303236
> with a header 02 and a trailler 03 was added to this ISO message,
> so ISO message becomes a new ISO message as follow :
>
> 0230323030303041303030303030303830303030303030303030333333303030303031303030303030323603
>
I would probably modify your Channel to add (and remove on receive) the
bytes you want to add.
These bytes are use to mark the start and end of a message over a wire,
they look a little out of place on an ISO message, transmitted via TCP/IP?
What Packager and Channel are you using?
--
Mark
import org.jpos.iso.*;
import org.jpos.iso.channel.*;
import java.util.Date;
import org.jpos.iso.packager.ISO87APackager;
import java.io.*;
public class SignOn extends BaseChannel {
public static void main(String[] args) {
byte[] header = {'0','2'};
byte[] b = {'0','3'};
ISOMsg m=new ISOMsg();
try {
m.setMTI("0800");
m.set(new ISOField(7, ISODate.getDateTime(new Date())));
m.set(new ISOField(11, "000001"));
m.set(new ISOField(70, "061"));
m.set(new ISOField(100, "123456"));
m.setPackager(new ISO87APackager());
NACChannel channel = new NACChannel("localhost", 8000, new
ISO87APackager(), header);
((BaseChannel)channel).sendMessageTrailler(m,b);
channel.connect();
channel.send(m);
ISOMsg response = nc.receive();
if(response!=null){
response.dump(System. out,"");
}
channel.disconnect();
}
catch (ISOException ex) {
}
catch (IOException ex1) {
}
}
}
SignOn.java:26: sendMessageTrailler(org.jpos.iso.ISOMsg,byte[]) has
protected ac
cess in org.jpos.iso.BaseChannel
((BaseChannel)channel).sendMessageTrailler(m,b);
^
1 error
--
View this message in context: http://www.nabble.com/ISO-Message-with-the-header-and-trailler-tf4084537.html#a12551515
Sent from the jPOS - Users mailing list archive at Nabble.com.
--Alejandro
++ Heru ++
--
View this message in context: http://www.nabble.com/ISO-Message-with-the-header-and-trailler-tf4084537.html#a12873137