Dear all,

In my implementation, I have client and server, and the client send ORU R01
(v2.5)
messages to the server. The messages are exchanged successfully when using
PipeParser.
I suppose PipeParser send messages in "|" delimited format. However, in my
implementation
the client and server need to exchange XML messages and I have been unable
to
implement that. My codes are as follows:

Client side:
---------------------------------------
    private void send(Message oru) throws HL7Exception, LLPException,
IOException {
        ConnectionHub connectionHub = ConnectionHub.getInstance();
        Connection connection = connectionHub.attach(host, port, new
DefaultXMLParser(), MinLowerLayerProtocol.class);

        // The initiator is used to transmit unsolicited messages
        Initiator initiator = connection.getInitiator();
        Message response = initiator.sendAndReceive(oru);
        String responseString = (new DefaultXMLParser()).encode(response);
        System.out.println("Received response:\n" + responseString);
        connection.close();
    }
---------------------------------------
Server side:
---------------------------------------
    public void listen() {
        LowerLayerProtocol llp = LowerLayerProtocol.makeLLP(); // The
transport protocol
        DefaultXMLParser xmlParser = new DefaultXMLParser();
        SimpleServer server = new SimpleServer(port, llp, xmlParser);
        Application handler = new ReceiverApplication();
        server.registerApplication("ORU", "R01", handler);
        server.start();
    }
---------------------------------------

When executing the server and client I got the following timeout error:

     [java] ca.uhn.hl7v2.HL7Exception: Timeout waiting for response to
message with control ID '12345
     [java]     at
ca.uhn.hl7v2.app.Initiator.sendAndReceive(Initiator.java:154)
     [java]     at
tr.com.srdc.icardea.ihe.idco.observationCreator.ObservationCreator.send(Obse
rvationCreator.java:309)
     [java]     at
tr.com.srdc.icardea.ihe.idco.observationCreator.ObservationCreator.run(Obser
vationCreator.java:66)
     [java]     at
tr.com.srdc.icardea.ihe.idco.observationCreator.ObservationCreator.main(Obse
rvationCreator.java:322)

I will truly appreciate if you could kindly help me on this issue.

Best regards,

YILDIRAY KABAK, PhD.

Software Research, Development and Consultation Ltd.
ODTU Silikon Blok 1. Kat No:14
Middle East Technical University Campus
06531 Ankara TURKEY

Email: [email protected]
Phone: +90 (312) 210 1763
Fax: +90 (312) 210 1837




------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to