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: HL7 and Custom Models
Date Tue, 21 Aug 2012 14:45:44 GMT
Hi

I dont think this is possible to use a custom parser.
There is only an option to turn parsing on|off.

As we love contributions then fell free to work on a patch with this
functionality.

Mind that Camel 2.11 onwards has been upgraded to HAPI 2.x and uses
Apache Mina 2.x.
So the code on trunk is a bit different than older Camel releases.


On Tue, Aug 21, 2012 at 4:30 PM, mconner <mconner@brookdaleliving.com> wrote:
> I'm trying to use the HL7 component in Camel, but I have a custom model.
> Outside of camel, I can do this with:     new PipeParser(ModelClassFactory
> theFactory)
>
> However, I don't see any direct way to configure that in Camel.  In
> org.apache.camel.component.hl7.HL7Converter (camel-hl7-2.2.0), the parser is
> hard-coded, and I don't see a simple way to configure it.:
>
>     static Message parse(String body, boolean validate) throws HL7Exception
> {
>         // replace \n with \r as HL7 uses 0x0d = \r as segment terminators
> and HAPI only parses with \r
>         body = body.replace('\n', '\r');
>
>         Parser parser = new PipeParser();
>         if (!validate) {
>             parser.setValidationContext(new NoValidation());
>         }
>         return parser.parse(body);
>     }
>
>
> Is there a way to do this?
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/HL7-and-Custom-Models-tp5717772.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message