/** * Converts outgoing request to a {@link Message} * and performs some exchange configuration. */ @Override public void process(Exchange exchange) throws Exception { if (charsetName != null) { exchange.setProperty(Exchange.CHARSET_NAME, charsetName); } Message msg = Hl7v2MarshalUtils.extractHapiMessage( exchange.getIn(), characterSet(exchange), getEndpoint().getHl7v2TransactionConfiguration().getParser()); if (msg == null) { throw new Hl7v2AdaptingException("Cannot create HL7v2 message from the given " + ClassUtils.getSimpleName(exchange.getIn().getBody(), "<null>")); } exchange.getIn().setBody(msg); exchange.setPattern(ExchangePattern.InOut); // run the route getWrappedProcessor().process(exchange); } }
exchange.setProperty(Exchange.CHARSET_NAME, charsetName); Message msg = Hl7v2MarshalUtils.extractHapiMessage( m, characterSet(exchange),
if ((msg = Hl7v2MarshalUtils.extractHapiMessage( resultMessage(exchange), exchange.getProperty(Exchange.CHARSET_NAME, String.class),