hi jmaes..
thanks for helping me out...Still i couldn't find the reason why this MSA
and MSH fields are swapped..
What im doing is;

   - Sending a raw HL7 message to the server.
   - Waiting for response from the backend application. (putting a
   thread.sleep)
   - Once received a response, im put the responses in a queue.(that is the
   response im receiving as xml response)
   - Creating ack/nack message, using that response.. That is, im polling
   the response from the queue, and using generateACK();  method.
      - response.generateACK();

I would like to know the process im following is right or wrong?
Can i generate ack message from the application response? Or else, should i
use the initial raw hl7 message to generate ack message?

Thanks and regards,
-ratha



On 24 April 2013 22:42, James Agnew <ja...@jamesagnew.ca> wrote:

> Hi Ratha,
>
> No, your understanding is exactly correct. Your XML response is a correct
> response, and HAPI should be fine with it. If you look at the log you
> provided however:
>
> INFO app.Receiver: Unexpected Message Received:
> MSH|^~\&|||||20130424171523.303+0530||ACK|335|P|2.1
>   [java] MSA|AA|208
>
> ..the message you supplied doesn't match it. In other words, your client
> is sending a message to the server that looks like this (I'll delete most
> fields for clarity here):
>
> MSH||||||||12345
>
> ..and the client is waiting for a response that looks like:
>
> MSH|
> MSA|AA|12345
>
> ...but instead it's getting a response back that looks like:
>
> MSH|
> MSA|AA|208
>
> So you will need to check the server and see why it is sending back a
> response to control ID 208.
>
> Cheers,
> James
>
>
>
> On Wed, Apr 24, 2013 at 12:28 PM, vijayaratha vijayasingam <
> vijayara...@gmail.com> wrote:
>
>> Hi james,
>> That also i noted,
>> i receive above xml response from my backend server, after receiving that
>> xml message i generate an ack message as follows;
>> hl7Msg.generateACK();
>> I dont know why it is changed at client end..
>> You can see my xml response contains   <MSA.2>12345</MSA.2> and  
>> <MSH.10>208</MSH.10>
>> .
>> I found reference from web and it says, request MSH.10 filed and
>> response's MSA.2 field should contain same messageID..
>> Is my understand wrong?
>>
>> Thanks and regsrds
>> -ratha
>>
>>
>>
>>
>> On 24 April 2013 21:47, James Agnew <ja...@jamesagnew.ca> wrote:
>>
>>> It looks to me like your server isn't actually sending back that
>>> particular response. If you look at the log line in [2], a response message
>>> is received, but if you look at the value of MSA-2 it doesn't match the
>>> value of "12345" in the message [1], which is what the client is actually
>>> expecting to see back.. I'd check the logic in your server to see if
>>> there's something odd going on there.
>>>
>>> James
>>>
>>>
>>> On Wed, Apr 24, 2013 at 8:03 AM, vijayaratha vijayasingam <
>>> vijayara...@gmail.com> wrote:
>>>
>>>> Hi all;
>>>> I send a hl7 message with a messgeid=12345 and receives XML response[1]
>>>> with same messageID.( check the MSA field ; ie:12345)
>>>> In the request message's MSH_10 header and the response's MSA.2 filed
>>>> values are matching..
>>>> But why do i get the timeout exception[2]?
>>>> I store the response [1] in a queue, and polling back and sending to
>>>> client..
>>>> Why client looks for MSH filed?
>>>>  shouldn't it check the MSA filed for matching messageId?
>>>>
>>>> Can anyone explain me the rootcause..
>>>>
>>>>
>>>> [1]<?xml version="1.0"?>
>>>> <ACK xmlns="urn:hl7-org:v2xml">
>>>>     <MSH>
>>>>         <MSH.1>|</MSH.1>
>>>>         <MSH.2>^~\&amp;</MSH.2>
>>>>         <MSH.7>20130424151508.74+0530</MSH.7>
>>>>         <MSH.9>
>>>>             <CM_MSG.1>ACK</CM_MSG.1>
>>>>         </MSH.9>
>>>>         <MSH.10>208</MSH.10>
>>>>         <MSH.11>P</MSH.11>
>>>>         <MSH.12>2.1</MSH.12>
>>>>     </MSH>
>>>>     <MSA>
>>>>         <MSA.1>AA</MSA.1>
>>>>         <MSA.2>12345</MSA.2>
>>>>     </MSA>
>>>> </ACK>
>>>>
>>>> [2] INFO app.Receiver: Unexpected Message Received:
>>>> MSH|^~\&|||||20130424171523.303+0530||ACK|335|P|2.1
>>>>   [java] MSA|AA|208Exception in thread "main"
>>>> ca.uhn.hl7v2.HL7Exception: Timeout waiting for response to message with
>>>> control ID '12345
>>>>   [java]     at
>>>> ca.uhn.hl7v2.app.Initiator.sendAndReceive(Initiator.java:154)
>>>>   [java]     at
>>>> org.wso2.carbon.business.messaging.hl7.samples.HL7Sender.send(HL7Sender.java:48)
>>>>   [java]     at
>>>> org.wso2.carbon.business.messaging.hl7.samples.HL7Sender.main(HL7Sender.java:68)
>>>>   [java]     at
>>>> org.wso2.carbon.business.messaging.hl7.samples.ClientMain.main(ClientMain.java:30)
>>>>
>>>> Thanks
>>>> -Ratha
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> Try New Relic Now & We'll Send You this Cool Shirt
>>>> New Relic is the only SaaS-based application performance monitoring
>>>> service
>>>> that delivers powerful full stack analytics. Optimize and monitor your
>>>> browser, app, & servers with just a few lines of code. Try New Relic
>>>> and get this awesome Nerd Life shirt!
>>>> http://p.sf.net/sfu/newrelic_d2d_apr
>>>> _______________________________________________
>>>> Hl7api-devel mailing list
>>>> Hl7api-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>>>
>>>>
>>>
>>
>
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to