Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-03 Thread Tom Chiverton
https://github.com/hapifhir/hapi-hl7v2/pull/2 Tom On 03/08/17 12:27, James Agnew wrote: Hi Tom, If you are able to, a pull request against the GitHub Project would be gratefully accepted. Cheers, James On Thu, Aug 3, 2017 at 7:00 AM, Tom Chiverton

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-03 Thread James Agnew
Hi Tom, If you are able to, a pull request against the GitHub Project would be gratefully accepted. Cheers, James On Thu, Aug 3, 2017 at 7:00 AM, Tom Chiverton wrote: > Here's a patch against the current trunk that adds this support. > > Using a modifie

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-03 Thread Tom Chiverton
Here's a patch against the current trunk that adds this support. Using a modified version of the send and receive example with a new build is easy: HL7Service server = context.newServer(4567, false, true); // port, tls, accept all My server is now able to receive these unsolicited ACK

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-02 Thread Jens Villadsen
Unsolicited ACK's are a bit weird to receive. While I can agree that it would be nice if the behavior was configurable, it is currently not the case (as you found out). I guess the case where it makes sense would be in the case where your opposing system is supporting enhanced acknowledgements, whi

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-02 Thread Tom Chiverton
I'm receiving this message from another server (I don't know why). We're building an interface between our app and a HL7 server, and the first step is just getting the HL7 messages off the wire and storing them. The Reciever implementation is making a hard coded policy decision that my applica

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-08-02 Thread Jens Villadsen
Why would you send an unexpected ACK back to the server? On 31 July 2017 at 17:00, Tom Chiverton wrote: > *AH HA*. > > There's a 3 year old bug with HAPI [1] where it throws away messages if > they are unexpected replies. > > I don't see a way to replace the Receiver instance in use by SimpleSer

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-07-31 Thread Tom Chiverton
*AH HA*. There's a 3 year old bug with HAPI [1] where it throws away messages if they are unexpected replies. I don't see a way to replace the Receiver instance in use by SimpleServer ? Tom [1] https://sourceforge.net/p/hl7api/feature-requests/88/?limit=25 On 31/07/17 14:51, Tom Chiverton

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-07-31 Thread Tom Chiverton
Hi, Sorry I wasn't clear, but further down my RecivingApplication implementation I do have that : public Message processMessage(Message theMessage, Map theMetadata) throws ReceivingApplicationException, HL7Exception { String encodedMessage = new DefaultHapiContext().getPipeParser().e

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-07-31 Thread Jens Villadsen
Take a look at the example found at http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html and http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/ExampleReceiverApplication.html What you probably would like to look at is the "processMessage" On 31 July 2017

Re: [HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-07-31 Thread Tom Chiverton
Given public class EvReceiverApplication implements ReceivingApplication { public boolean canProcess(Message theIn) { System.out.println("Received message: canProcess true"); return true; } I never see this output when a message is received. So it's like the rec

[HAPI-devel] Trouble receiving messages usubg SendAndReceiveaMessage example

2017-07-31 Thread Tom Chiverton
I have used http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/SendAndReceiveAMessage.html to build a simple app that should listen for all messages, and echo them to the console ( server.registerApplication("*", "*", handler); ). However, although I get a line from the connectionReceiv