However at below line,
IReceivable receivable = client.sendAndReceiveMessage(sendable);
I am facing an exception, NonHL7ResponseException,
ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: text/plain
at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233)
at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541)
at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159)
at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279)
at ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55)
at ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161)
To me it seems that the response being received is not of a format that HAPI expects. I’m not sure if they are following some sort of standard for sending HL7 message over HTTP. For the OpenHIE project (as it currently stands) just a simple HTTP post with a HL7 message in XML is expected.
You could look into how HAPI is sending these messages and what it expects back, and we could take a look at that and advise further.
However at below line,
IReceivable receivable = client.sendAndReceiveMessage(sendable);
I am facing an exception, NonHL7ResponseException,
ca.uhn.hl7v2.hoh.api.NonHl7ResponseException: Invalid Content-Type: text/plain
at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.doReadContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:233)
at ca.uhn.hl7v2.hoh.encoder.AbstractHl7OverHttpDecoder.readHeadersAndContentsFromInputStreamAndDecode(AbstractHl7OverHttpDecoder.java:541)
at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.doSendAndReceiveInternal(AbstractRawClient.java:159)
at ca.uhn.hl7v2.hoh.raw.client.AbstractRawClient.sendAndReceive(AbstractRawClient.java:279)
at ca.uhn.hl7v2.hoh.raw.client.HohRawClientSimple.sendAndReceive(HohRawClientSimple.java:55)
at ca.uhn.hl7v2.hoh.hapi.client.AbstractClient.sendAndReceiveMessage(AbstractClient.java:161)
Could someone suggest what could be going wrong?
Thanks & Regards
Sara
–
You received this message because you are subscribed to the Google Groups “OpenHIE Architecture” group.