Hi, I would like to inquire regarding converting a CXFRS XML Response to HL7 Format. Currently I have this cxfrs route:
<cxf:rsServer id="restRouter" address="/restRouter/" serviceClass="com.project.service.impl.ServiceManagerImpl" /> <cxf:rsClient id="restEndpoint" address="http://localhost:8080/services/rest" serviceClass="com.project.service.impl.ServiceManagerImpl" /> <route> <from uri="cxfrs:bean:restRouter"/> <process ref="hl7Processor"/> <to uri="cxfrs:bean:restEndpoint"/> </route> <bean id="hl7Processor" class="com.slmc.camel.processor.HL7Processor"/> What I am trying to do is to process the Exchange and getting the in message object then setting the out message with my parsed HL7 String. Here's my implementation of the HL7Processor: public class HL7Processor implements Processor { private static Logger logger = Logger.getLogger(HL7Processor.class); @Override public void process(Exchange exchange) throws Exception { logger.debug("entering `process` method..."); PatientTO patientTo = exchange.getIn().getBody(PatientTO.class); String hl7XML = convertToHL7(patientTo); exchange.getOut().setBody(hl7XML, String.class); } } The current effect is that I am getting null on patientTO. Here are my questions: 1. During the exchange of two cxfrs endpoints, what should be the type of exchange.getIn().getBody(..)? 2. Is this the correct solution for my goal? Thanks in advance! -- View this message in context: http://old.nabble.com/Convert-CXFRS-XML-Response-To-HL7-Format-tp28066971p28066971.html Sent from the Camel - Users mailing list archive at Nabble.com.
