Hi, I have created a HL7Client (using an exemple from http://hl7api.sourceforge.net/hapi-hl7overhttp/doc_hapi.html#Sending_Messages). My example's message is:
ADT_A01 adt = new ADT_A01(); adt.initQuickstart("ADT", "A01", "T"); MSH mshSegment = adt.getMSH(); mshSegment.getFieldSeparator().setValue("|"); mshSegment.getEncodingCharacters().setValue("^~\\&"); mshSegment.getDateTimeOfMessage().getTimeOfAnEvent().setValue("200701011539"); mshSegment.getSendingApplication().getNamespaceID().setValue("MYSENDER"); mshSegment.getSequenceNumber().setValue("123"); mshSegment.getMessageType().getMessageType().setValue("ADT"); mshSegment.getMessageType().getTriggerEvent().setValue("A01"); PID pid = adt.getPID(); pid.getPatientName(0).getFamilyName().getSurname().setValue("Doe"); pid.getPatientName(0).getGivenName().setValue("John"); pid.getPatientIdentifierList(0).getID().setValue("123456"); // The MessageSendable provides the message to send ISendable sendable = new MessageSendable(adt); The server is running and stops in the doPost method but not stops in the processMessage method. When I try to send the message using IReceivable<Message> receivable = client.sendAndReceiveMessage(sendable); produces the follow error: 17965 [main] INFO ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder - Read -1 from input stream, closing it ca.uhn.hl7v2.hoh.api.DecodeException: Failed to decode CHUNKED encoding What's the problem? The ADT message is incorrect? Thanks a lot! Juan Carlos El jue, 31-01-2013 a las 22:07 -0500, James Agnew escribió: > Hi Juan, > > > > HL7 over HTTP requires that messages be sent using an HTTP POST > request. This error means that your client is using an HTTP GET > instead. Out of curiosity, what are you using to send the messages? > > > Cheers, > James > > > 2013/1/31 Juan Carlos Rodríguez <j.rodrig...@necsia.es> > > Hi, > > I have a question about HL7 over HTTP and the integration with > our application. > > I have modified my pom.xml, adding the following lines: > > <!-- This is the core HAPI library --> > <dependency> > <groupId>ca.uhn.hapi</groupId> > <artifactId>hapi-base</artifactId> > <version>2.0</version> > </dependency> > <!-- This is the structure JAR for HL7 v2.4 --> > <dependency> > <groupId>ca.uhn.hapi</groupId> > <artifactId>hapi-structures-v24</artifactId> > <version>2.0</version> > </dependency> > <!-- This is the HL7 over HTTP (HoH) library --> > <dependency> > <groupId>ca.uhn.hapi</groupId> > <artifactId>hapi-hl7overhttp</artifactId> > <version>2.1-alpha1</version> > </dependency> > > > I have modified my web.xml, adding the following lines: > > <servlet> > <servlet-name>hl7_listener</servlet-name> > > <servlet-class>com.test.MensajeriaSocketOverHttpServlet</servlet-class> > </servlet> > ... > <servlet-mapping> > <servlet-name>hl7_listener</servlet-name> > <url-pattern>/hl7list</url-pattern> > </servlet-mapping> > > > > My MensajeriaSocketOverHttpServlet class extends of your > HohServlet class. > > When deploy my application in a OC4J Server, I put the next > URL: http://localhost:8888/<myContext>/hl7list but returns the > following error: > > > HTTP 400 - Bad Request > GET method is not supported by this server > > HAPI (HL7 over HTTP) version 2.1-alpha1 > > > > What is the error? Have I create a socket to listen the > messages? How I send the messages and receive them? > > Thanks for all and regards! > > > > > -- Un saludo, JUAN CARLOS RODRÍGUEZ RAYO j.rodrig...@necsia.es Almogàvers 119-123. 3ª planta 08018 Barcelona T +34 932 521 285 www.necsia.es AVISO DE CONFIDENCIALIDAD: Tanto este mensaje como todos los posibles documentos adjuntos al mismo son confidenciales y están dirigidos exclusivamente a los destinatarios de los mismos. Por favor, si Ud. no es uno de dichos destinatarios, notifíquenos este hecho y elimine el mensaje de su sistema. Queda prohibida la copia, difusión o revelación de su contenido a terceros sin el previo consentimiento por escrito de Necsia. En caso contrario, vulnerará la legislación vigente. INFORMACIÓN RELATIVA A LA LOPD: En cumplimiento de la Ley Orgánica de Protección de Datos de Carácter Personal (LOPD), le informamos que sus datos de contacto han sido incorporados en ficheros titularidad de Necsia IT Consulting SL, que responden a la finalidad de servir de directorio o agenda de contactos así como para facilitar la gestión administrativa y comercial desarrollada por la empresa. Ud tiene la posibilidad de ejercer los derechos de acceso, rectificación, cancelación y oposición previstos en la ley mediante carta dirigida a Necsia IT Consulting, SL, Ref. Protección de datos, C/Almogàvers, nº 119-123. 3ª Planta, puerta 3, CP 08018, Barcelona.
<<attachment: facebook.png>>
<<attachment: googleplus.png>>
<<attachment: blog.png>>
<<attachment: twitter.png>>
<<attachment: linkedin.png>>
<<attachment: necsia.jpg>>
------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________ Hl7api-devel mailing list Hl7api-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hl7api-devel