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 at 12:05, Tom Chiverton <t...@extravision.com> wrote:

> 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
> receiver is not registered ?
>
>
> I am doing
>
>
> HL7Service server = context.newServer(port, useTls);
>
> ReceivingApplication handler = new EvReceiverApplication();
>
> server.registerApplication("*", "*", handler);
>
> server.startAndWait();
>
> Tom
>
>
> On 31/07/17 10:24, Tom Chiverton wrote:
>
> 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 connectionReceived method, and
> none from an output I added to the exceptionHandler, I do not get anything
> from my processMessage() code.
>
>
> Java 1.8 on Ubuntu Server, with the latest HAPI library. I can confirm I
> am getting a message  (admittedly it's MSA is "MSA|AA|245635223|Failure")
> with a Wireshark packet capture.
>
>
> Any ideas what could be up ?
> --
> *Tom Chiverton*
> Lead Developer
> e:  t...@extravision.com
> p:  0161 817 2922
> t:  @extravision <http://www.twitter.com/extravision>
> w:  www.extravision.com
> [image: Extravision - email worth seeing] <http://www.extravision.com/>
> Registered in the UK at: First floor, Tomorrow, MediaCityUK, Manchester,
> M50 2AB.
> Company Reg No: 0‌‌5017214 VAT: GB 8‌‌24 5386 19 <24%2053%2086%2019>
>
> This e-mail is intended solely for the person to whom it is addressed and
> may contain confidential or privileged information.
> Any views or opinions presented in this e-mail are solely of the author
> and do not necessarily represent those of Extravision Ltd.
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>
>
>
> _______________________________________________
> Hl7api-devel mailing 
> listHl7api-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Hl7api-devel mailing list
> Hl7api-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
>


-- 

Med venlig hilsen / Kind regards

*Jens Kristian Villadsen*
cand.polyt

Stålhøjen 24
8240 Risskov
Denmark

Mobile +4523373806
jenskristianvillad...@gmail.com
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to