|
From: Bryan T. <bp...@gm...> - 2006-07-24 03:38:20
|
Hi Matt,
It looks about right. Have you tried it yet? You should get the A19
back from sendAndReceive(). There may be an intermediate ack, if the
query message requests one, but you shoudn't see it at this level.
Calling disconnect() should be fine. Hope it goes well.
Bryan
On 7/20/06, Matt Krevs <mat...@in...> wrote:
>
>
>
>
> 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
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
> _______________________________________________
> Hl7api-devel mailing list
> Hl7...@li...
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
>
|