}
public Exchange populateCamelExchangeFromNmrExchange(CamelContext context, org.apache.servicemix.nmr.api.Exchange nmrExchange) {
Exchange answer = new DefaultExchange(context);
answer.setPattern(ExchangePattern.fromWsdlUri(nmrExchange.getPattern().getWsdlUri()));
// copy the nmrExchange's properties
answer.getProperties().putAll(nmrExchange.getProperties());
org.apache.servicemix.nmr.api.Message inMessage = nmrExchange.getIn();
if (inMessage != null) {
Message message = new DefaultMessage();
copyNmrMessageToCamelMessage(inMessage, message);
answer.setIn(message);
}
answer.setProperty(NMR_EXCHANGE, nmrExchange);
if (nmrExchange != null && nmrExchange.getOperation() != null) {
answer.setProperty(NMR_OPERATION, nmrExchange.getOperation().toString());
}
return answer;
}