From: fan y. <fan...@ho...> - 2005-03-29 08:01:13
|
Hello, I have implemented a class in which the method 'sendAndReceive' of Initiator class is called. I always got a message, in my IDE console, like this, log4j:WARN No appenders could be found for logger (ca.uhn.hl7v2.app.Initiator). log4j:WARN Please initialize the log4j system properly. Do I need to do extra configuration to make log4j work? Because currently the logging system does not work. Also I notice in the 'sendAndReceive' method, two HapiLog objects are instantiated like this HapiLog rawOutbound = HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.outbound"); HapiLog rawInbound = HapiLogFactory.getHapiLog("ca.uhn.hl7v2.raw.inbound"); But under the installation directory of my HAPI, I could not find directory 'raw', I wonder what it is used for and whether my copy of HAPI is correct and complete. Thank you, Sarah >From: "Tripp, Bryan" <Bry...@uh...> >To: "fan yue" <fan...@ho...>,<hl7...@li...> >Subject: RE: [HAPI-devel] Building message >Date: Tue, 22 Feb 2005 10:47:15 -0500 > >Hi Sarah, > >Yes, like this ... > >//1. create a Message object with the structure you need, e.g. ADT_A01 >ADT_A01 message = new ADT_A01(); > >//2. Set its values using getters/setters >message.getMSH().getSendingApplication().getNamespaceID().setValue("my >app"); > >// ... or using Terser ... >Terser terser = new Terser(message); >terser.set("/MSH-3-1", "my app"); > >//3. Encode the message using a Parser >PipeParser parser = new PipeParser(); >String encodedMessage = parser.encode(message); > >//4. Then you can send it somewhere >Connection conn = new Connection(parser, new MinLowerLayerProtocol(), new >Socket(host, port)); >Message response = conn.getInitiator().sendAndReceive(message); > >Bryan > >-----Original Message----- >From: hl7...@li... on behalf of fan yue >Sent: Tue 2/22/2005 1:47 AM >To: hl7...@li... >Subject: [HAPI-devel] Building message > >Hi, > >I just started using HAPI and am not very farmiliar with it. My question >is, except for parsing an HL7 message, can we also build or construct an >HL7 message using HAPI? Which package should I look into? > >Thank you very much, > >Sarah > > > > >------------------------------------------------------- >SF email is sponsored by - The IT Product Guide >Read honest & candid reviews on hundreds of IT Products from real users. >Discover which products truly live up to the hype. Start reading now. >http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click >_______________________________________________ >Hl7api-devel mailing list >Hl7...@li... >https://lists.sourceforge.net/lists/listinfo/hl7api-devel > |