|
From: Matt K. <mat...@in...> - 2006-07-20 04:17:56
|
Hi all
In the next couple of days I'm going to go onsite to test out an A19 request
and response.
Can someone have a quick look at the code below and let me know if it looks
like its in the correct general format?
Specifically
- when I call sendAndReceive() will the response I get typically be
an ADR_A19 response, or will I just receive some sort of generic
acknowledgement and have to retrieve the ADR_19 some other way
- I have been asked by the hl7 gateway to make sure I close my
connection and disconnect from their server after each request. Do I just
need to cal tl.disconnect() or are there other housekeeping duties involved
in disconnecting?
My test code is below
PipeParser pipeParser = new PipeParser();
QRY_A19 request = (QRY_A19) pipeParser.parse("some text here");
SocketAddress a = new InetSocketAddress("the host here", 1234);
TransportLayer tl = new MLLPTransport(new ClientSocketStreamSource(a));
ApplicationRouter ar = new ApplicationRouterImpl();
ProcessorContext pc = new ProcessorContextImpl(ar, tl, new
NullSafeStorage());
Processor p = new ProcessorImpl(pc, true);
Initiator i = new InitiatorImpl(p);
Message ack = i.sendAndReceive(request);
ADR_A19 response = (ADR_A19) ack;
tl.disconnect();
Thanks
Matt
|