Very sorry to sending all this messages but the code I used It's ok,
works well.
(the error was I loaded all the hapi-structures-v**-1.0.jar and not
only the hapi-structures-v24-1.0.jar)
So It's very nice, I hope can be useful for someone:
The server can handle the rigth Application also if the incoming message
have some error inside, just override the Parser :D
Bye Alessandro
Il 06/05/2010 10.04, alessandro ha scritto:
> I tried starting from the SimpleServer in the Examples
> I think that the server does not handle the registered Application
> when I try to override the parser...
>
>
> Parser parser = new PipeParser() {
>
> // We override the parse method to correct issues
> public Message parse(String theMessage) throws
> HL7Exception, EncodingNotSupportedException {
> theMessage = theMessage.replace("OBR| ", "OBR|");
> return super.parse(theMessage);
> }};
>
> SimpleServer server = new SimpleServer(port, llp, parser);
>
> Application handler = new ORUReceiverApplication();
> server.registerApplication("ORU", "R01", handler);
>
> the handler don't go up.
>
>
> Thankyou for any suggestion
> Alessandro
>
>
>
>
>
>
> Il 05/05/2010 17.52, alessandro ha scritto:
>
>> Hi all
>>
>> It is possible to parse a message who arrive with this error inside:
>> ...
>> OBR| |............... a space inside the OBR-1
>>
>>
>> I tried to override the Pipe Parser in this way:
>>
>> // parser that replace 'OBR|_' with 'OBR|'
>> Parser parser = new PipeParser() {
>>
>> // We override the parse method to correct issues
>> public Message parse(String theMessage) throws
>> HL7Exception, EncodingNotSupportedException {
>> theMessage = theMessage.replace("OBR| ", "OBR|");
>> return super.parse(theMessage);
>> }};
>>
>> but:
>>
>> Unexpected Message Received:
>> MSH|^&~\|||||20100505154105.494-0100||ACK|85|P|2.4^MMSA|AE|8813|Failed
>> validation rule for value " ": Matches the regular expres
>> sion ~T~d*: Segme^MERR|^^^207\Application Internal Error\HL70357
>>
>> Do you have a suggest?
>> Thanks in advance
>> Alessandro Del Prete
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Hl7api-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>>
>>
> ------------------------------------------------------------------------------
> _______________________________________________
> Hl7api-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/hl7api-devel
>
------------------------------------------------------------------------------
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel