Package org.jboss.internal.soa.esb.couriers

Examples of org.jboss.internal.soa.esb.couriers.PickUpOnlyCourier.pickup()


          // Mock a service that picks up the original message and replies
          FileEpr serviceEpr = new FileEpr(toEpr.getURI());
          serviceEpr.setInputSuffix(initialSuffix);
          serviceEpr.setPostDelete(true);
          PickUpOnlyCourier listener = CourierFactory.getPickupCourier(serviceEpr);
          Message received = listener.pickup(100);
          String text_2 = new String((byte[]) received.getBody().get());
          assertTrue(text_1.equals(text_2));
          assertTrue(replyToEpr.equals(received.getHeader().getCall().getReplyTo()));
         
          // now respond to replyTo
View Full Code Here


          response.getBody().add(text_2.getBytes());
          CourierUtil.deliverMessage(response);
         
          // try to pick up reply
          PickUpOnlyCourier waiter = CourierFactory.getPickupCourier(replyToEpr);
          Message finalMsg = waiter.pickup(100);
          assertTrue(text_2.equals(new String((byte[]) finalMsg.getBody().get())));
         
          _logger.info(text_2+"... and back from local filesystem");
          _logger.info("getDefaultReplyToEpr test succeeded for local file transport");
View Full Code Here

          // Mock a service that picks up the original message and replies
          FTPEpr serviceEpr = new FTPEpr(toEpr.getURI());
          serviceEpr.setInputSuffix(initialSuffix);
          serviceEpr.setPostDelete(true);
          PickUpOnlyCourier listener = CourierFactory.getPickupCourier(serviceEpr);
          Message received = listener.pickup(100);
          String text_2 = new String((byte[]) received.getBody().get());
          assertTrue(text_1.equals(text_2));
          assertTrue(replyToEpr.equals(received.getHeader().getCall().getReplyTo()));
         
          // now respond to replyTo
View Full Code Here

          response.getBody().add(text_2.getBytes());
          CourierUtil.deliverMessage(response);
         
          // try to pick up reply
          PickUpOnlyCourier waiter = CourierFactory.getPickupCourier(replyToEpr);
          Message finalMsg = waiter.pickup(100);
          assertTrue(text_2.equals(new String((byte[]) finalMsg.getBody().get())));
         
          _logger.info(text_2+"... and back from FTP server");
          _logger.info("getDefaultReplyToEpr test succeeded for FTP transport");
View Full Code Here

    {
      transactionStrategy.begin();
     
      pickUpCourier = getCourier() ;
     
      message = (maxWaitMillis > 0) ? pickUpCourier
          .pickup(maxWaitMillis) : null;
                        errorDelay = 0 ;
    }
    catch (TransactionStrategyException ex)
    {
View Full Code Here

                                        call.setReplyTo(DefaultReplyTo.getReplyTo(call.getTo()));
                                receiver        = CourierFactory.getPickupCourier(call.getReplyTo());
                        }
                       
                        sender.deliver(outgoing);
                        return (waitForResponse ? receiver.pickup(maxWaitMillis) : null) ;
                }
                finally
                {
                    CourierUtil.cleanCourier(sender) ;
                    CourierUtil.cleanCourier(receiver) ;
View Full Code Here

        CourierUtil.deliverMessage(outgoingMsg);

        // Mock a service that picks up the original message and replies
        JDBCEpr serviceEpr = getEpr("foo");
        PickUpOnlyCourier listener = CourierFactory.getPickupCourier(serviceEpr);
        Message received = listener.pickup(100);
        String text_2 = new String((byte[]) received.getBody().get());
        assertTrue(text_1.equals(text_2));
//          assertTrue(replyToEpr.equals(received.getHeader().getCall().getReplyTo()));

        // now respond to replyTo
View Full Code Here

        response.getBody().add(text_2.getBytes());
        CourierUtil.deliverMessage(response);

        // try to pick up reply
        PickUpOnlyCourier waiter = CourierFactory.getPickupCourier(replyToEpr);
        Message finalMsg = waiter.pickup(100);
        assertTrue(text_2.equals(new String((byte[]) finalMsg.getBody().get())));

        _logger.info(text_2+"... and back from jdbc ReplyTo EPR");
        _logger.info("getDefaultReplyToEpr test succeeded for JDBC message transport");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.