Package org.jboss.soa.esb.client

Examples of org.jboss.soa.esb.client.ServiceInvoker.deliverAsync()


        esbMessage.getBody().add(message);
       
        ServiceInvoker invoker = new ServiceInvoker(args[0], args[1]);
       
        try {
            invoker.deliverAsync(esbMessage);
        }catch(Exception ex) {
           ex.printStackTrace();
        }
        System.exit(0);
    }
View Full Code Here


        final EPR faultToEPR = new LogicalEPR("TestJBPMReplyESB", "Reply") ;
        faultToEPR.getAddr().addExtension(ReplyAction.REPLY_TYPE, "fault") ;
        call.setFaultTo(faultToEPR) ;
       
        final ServiceInvoker si = new ServiceInvoker("TestJBPMReplyESB", "Create") ;
        si.deliverAsync(message) ;
       
        final int numMessages = 4 ;
        final String[] messages = (String[])getServer().invoke(new ObjectName(RedeliveryMBean.objectName), "waitForMessages",
                new Integer[] {Integer.valueOf(numMessages)}, new String[] { Integer.TYPE.getName() });
    List messageList = Arrays.asList(messages);
View Full Code Here

      requestMessage.getBody().add(message);

      // Deliver the request message synchronously - timeout after 20
      // seconds...
      deliveryAdapter.deliverAsync(requestMessage);
   }
  
   public static void main(String args[]) throws Exception
   {
      SendEsbMessage sm = new SendEsbMessage();
View Full Code Here

      requestMessage.getBody().add(message);

      // Deliver the request message synchronously - timeout after 20
      // seconds...
      deliveryAdapter.deliverAsync(requestMessage);
   }
  
   public static void main(String args[]) throws Exception
   {
      SendEsbMessage sm = new SendEsbMessage();
View Full Code Here

            public void test() throws Exception {
                ServiceInvoker invoker = new ServiceInvoker("ServiceCat", "ServiceName");
                Message message = MessageFactory.getInstance().getMessage();

                message.getBody().add("Hi there!");
                invoker.deliverAsync(message);

                waitForMockSet(message);
                assertTrue("Message equality", checkMessageEquality(message, MockAction.message));
            }
        }.setServiceConfig("in-listener-config-01.xml");
View Full Code Here

        ServiceInvoker invoker = new ServiceInvoker(cat, name);

        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add("Hi there!");
        invoker.deliverAsync(message);

        waitForMockSet(message);
        assertTrue("Message equality", checkMessageEquality(message, MockAction.message));
    }
View Full Code Here

    final String name = "qwerty" ;

    try
    {
            ServiceInvoker invoker = new ServiceInvoker("foo", "bar");
            invoker.deliverAsync(message);
      fail();
    }
    catch (MessageDeliverException ex)
    {
    }
View Full Code Here

    MockRegistry.register(category, name, epr, new MockCourier(true)) ;

    {
      ServiceInvoker invoker = new ServiceInvoker(category, name);
      invoker.deliverAsync(message);
    }

    RegistryUtil.unregister(category, name, epr);
   
    try
View Full Code Here

    RegistryUtil.unregister(category, name, epr);
   
    try
    {
      ServiceInvoker invoker = new org.jboss.soa.esb.client.ServiceInvoker(category, name);
      invoker.deliverAsync(message);
    }
    catch (final MissingServiceException mse) {} // expected
  }
}
View Full Code Here

        final SealedObject securityContext = SecurityContext.encryptContext(new SecurityContext()) ;
        SecurityContext.setSecurityContext(securityContext) ;
       
        assertNotNull("securityContext", SecurityContext.getSecurityContext()) ;
       
        si.deliverAsync(message) ;
       
        assertNotSame("messages", message, mockCourier.message) ;
        assertNull("message context", message.getContext().getContext(SecurityService.CONTEXT)) ;
        assertNotNull("delivered message context", mockCourier.message.getContext().getContext(SecurityService.CONTEXT)) ;
        assertNotNull("securityContext", SecurityContext.getSecurityContext()) ;
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.