Hello!
Thanks for the help, but it doesn't work yet. The default timeout is 10
seconds no? I think it should be time enough in order to receive an answer,
anyway I changed it to 30 as you suggested and it doesn't work neither, I
have tried both scenario, running client and server in different PC's and in
the same PC, and I got the same behaviour, the server recieves the message
but the client timesOut.. :(  I am gonna put again the error I get so you
can try to guess what is happening...

ca.uhn.hl7v2.HL7Exception: Timeout waiting for response to message with
control ID 'null
        at ca.uhn.hl7v2.app.Initiator.sendAndReceive(Initiator.java:148)
        at cliente.ClienteEnviaMsg.main(ClienteEnviaMsg.java:104)

I think the error must be related to the fact of "control ID'null", maybe
the server is sending back the ACK but by any reason it looses the ID or
something or the client expects a different one and timesOut since the one
it receives is not right. What I dont understand is why the example works
when I run it all in one class???

Thank you again!



Torben Greiser wrote:
> 
> Hi Lucas,
> 
> just set the initiator timeout value to as high as needed:
> 
> int timeout = 30000;
> System.setProperty("ca.uhn.hl7v2.app.initiator.timeout", 
> Integer.toString(timeout));
> 
> Greets
> Torben
> 
> Lucas Gonz schrieb:
>> Hello you all!!
>> 
>> I am starting in this HL7 world.... and after a couples of days I almost
>> give up, hopefully I found this forum...
>> 
>> I am having problems with "sendAndReceive", If I run the example class
>> SendAndReceiveAMessage in my PC everything works fine, but if I split the
>> code from the example class SendAndReceiveAMessage into two classes, one
>> for
>> the client and another for the server and I run them, the server receives
>> the message but at the client I get a time out:
>>  
>> ca.uhn.hl7v2.HL7Exception: Timeout waiting for response to message with
>> control ID 'null
>> 
>> I touch nothing relevant from the example code, and I am sending the same
>> message.
>> I can't understand why joined into one class it works and separated no... 
>> 
>> Has anybody any idea??
>> 
>> Thanks in advance!! 
>> 
>> 
>> 
>> VIOT Yves wrote:
>>> Hi aj,
>>> I had a problem like that one. My problem was not really a time out. I 
>>> had a timeout for the expected ack. It is because i received an ack with 
>>> the MSA-2 (Message control ID) empty, so it receive an ack with no 
>>> corresponding original message.  I've noticed that it also return an  
>>> ack /err for the  not well-formed ack check for you will probably have  
>>> an answer. 
>>> The ack of the ack looks like , in my case:
>>> MSH|^~\&|||||20080109104510.904+0100||ACK|15|T|2.5
>>> MSA|AR|20080109104510420|No appropriate destination could be found to 
>>> which this message could be routed.
>>> ERR|^^^207&Application Internal Error&HL70357\x0d
>>>
>>> Hope it helps...
>>> Yves
>>>
>>> Greetings All,
>>> My application was successfully able to connect to the server but it 
>>> times out and give following error. Any help is appreciated.
>>>
>>> ca.uhn.hl7v2.HL7Exception: Timeout waiting for response to message with 
>>> control ID '1339497
>>> at ca.uhn.hl7v2.app.Initiator.sendAndReceive(Initiator.java:148)
>>>
>>>
>>> Thanks,
>>> aj
>>>
>>> -------------------------------------------------------------------------
>>> Check out the new SourceForge.net Marketplace.
>>> It's the best place to buy or sell services for
>>> just about anything Open Source.
>>> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>>> _______________________________________________
>>> Hl7api-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>>
>>>
>> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Re%3A-Timeout-on-sendAndreceive-tp14762009p15130492.html
Sent from the hl7api-devel mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to