camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: How to prevent HL7 message validation?
Date Wed, 29 Jul 2009 13:04:19 GMT
Hi

And could you send examples of the HL7 you send that fails when
validation is enabled?
Would be nice to use for unit testing.

On Wed, Jul 29, 2009 at 2:45 PM, Claus Ibsen<claus.ibsen@gmail.com> wrote:
> Hi
>
> Could you post your entire route, that will help me to add this feature.
>
> On Wed, Jul 29, 2009 at 1:43 PM, Johnny2R<grails@jmsd.co.uk> wrote:
>>
>> I got my HL7 listener application (Camel, MINA, HAPI, Spring) working, and it
>> is now receiving messages from remmote clients (thanks to the 0.0.0.0 in the
>> URI). I've run into another problem, though, in that the HL7 messages it is
>> receiving are incorrectly formed and it's throwing validation errors. Now,
>> when using HAPI by itself I was able to get around this issue by setting
>>
>> parser.setValidationContext(new NoValidation());
>>
>> But I don't see how I can do this in a CamelContext. This is what I have in
>> my Spring applicationContext.xml.
>>
>>    <bean id="hl7codec" class="org.apache.camel.component.hl7.HL7MLLPCodec">
>>       <property name="charset" value="iso-8859-1"/>
>>    </bean>
>>
>>    <bean id="iceServer" class="medill.IceServer" init-method="init"
>> destroy-method="stop"/>
>>
>>    <camel:camelContext>
>>        <camel:endpoint id="hl7listener"
>> uri="mina:tcp://0.0.0.0:8888?sync=true&amp;codec=hl7codec"/>
>>    </camel:camelContext>
>>
>>    <bean id="messageHandler" class="medill.MessageHandler" >
>>        <property name="dataSource" ref="dataSource"/>
>>     </bean>
>>
>> In the IceServer's init method I set up the SpringCamelContext (addRoutes,
>> start, etc).
>>
>> Here's the relevant chunk from the log, showing where the error occurs. All
>> I need to do is to stop validation. Any suggestions?
>>
>> Caused by: ca.uhn.hl7v2.model.DataTypeException: Failed validation rule:
>> Matches the regular expression (\+|\-)?\d*\.?\d*: Segment: PD1 (rep 0) Field
>> #3
>>        at ca.uhn.hl7v2.model.AbstractPrimitive.setValue(AbstractPrimitive.java:84)
>>        at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:360)
>>        at ca.uhn.hl7v2.parser.PipeParser.parse(PipeParser.java:309)
>>        at ca.uhn.hl7v2.parser.PipeParser.doParse(PipeParser.java:259)
>>        at ca.uhn.hl7v2.parser.Parser.parse(Parser.java:151)
>>        at
>> org.apache.camel.dataformat.hl7.HL7Converter.toMessage(HL7Converter.java:49)
>>        at
>> org.apache.camel.dataformat.hl7.HL7DataFormat.unmarshal(HL7DataFormat.java:76)
>>        at
>> org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:48)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:80)
>>        at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:189)
>>        at
>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:133)
>>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:115)
>>        at org.apache.camel.processor.Pipeline.process(Pipeline.java:89)
>>        at
>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
>>        at
>> org.apache.camel.processor.interceptor.StreamCachingInterceptor.proceed(StreamCachingInterceptor.java:87)
>>        at
>> org.apache.camel.processor.interceptor.StreamCachingInterceptor.process(StreamCachingInterceptor.java:82)
>>        at
>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:52)
>>        at
>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
>>        at
>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
>>        at
>> org.apache.camel.component.mina.MinaConsumer$ReceiveHandler.messageReceived(MinaConsumer.java:110)
>>
>>
>> --
>> View this message in context: http://www.nabble.com/How-to-prevent-HL7-message-validation--tp24717549p24717549.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message