@Test
 public void test() throws Exception {
   while (true) {
     Request request = (Request) consumer.receiveBody("direct:out");
     Util.print(request);
   }
 }
예제 #2
0
 @Override
 public void process(Exchange exchange) throws Exception {
   Document document = exchange.getIn().getBody(Document.class);
   if (document == null) {
     LOG.warn("Exchange input message body does not contain IDoc document");
     return;
   }
   if (LOG.isDebugEnabled()) {
     try {
       LOG.debug("Sending IDoc document to ''{}''", getEndpoint().getEndpointUri());
       LOG.debug("Document: " + (document == null ? document : Util.marshal(document)));
     } catch (Exception e) {
       LOG.warn("Failed to log request", e);
     }
   }
   String tid = DestinationRfcTransactionHandler.getTID(exchange, getEndpoint().getDestination());
   IDocUtil.sendDocument(
       getEndpoint().getDestination(), document, tid, getEndpoint().getQueueName());
 }