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.

Reply via email to