Examples of deliverSync()


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

        {
          invoker.deliverAsync(msg_in);
        }
        else
        {
          invoker.deliverSync(msg_in, timeout);
        }
      }
      catch (Throwable t)
      {
        if (t instanceof RuntimeException)
View Full Code Here

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

            deliveryAdapter = new org.jboss.soa.esb.client.ServiceInvoker("MyServiceCategory", "MyNativeClientService");
            // Create and populate the request message...
            requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
            requestMessage.getBody().add(toWhom); // inject the value from the WS client
            // Deliver the request message synchronously - timeout after 20 seconds...
            replyMessage = deliveryAdapter.deliverSync(requestMessage, 20000);

            if (replyMessage != null) {
                results = (String) replyMessage.getBody().get();
            } else {
                results = "Hello World: " + toWhom + " on " + new java.util.Date();
View Full Code Here

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

      Message replyMessage = null;           
      requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
      requestMessage.getBody().add(msgText);
     
    try {     
      replyMessage = invoker.deliverSync(requestMessage, 20000);
     
      System.out.println("Reply Message: " + replyMessage.getBody().get());
    } catch (Exception e) {
      System.out.println("Exception caught by client: " + e);
      Throwable cause = e.getCause();
View Full Code Here

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

    ServiceInvoker invoker = new ServiceInvoker(service);
    if (async) {
      invoker.deliverAsync(esbMessageIn);
    }
    else {
      Message esbMessageOut = invoker.deliverSync(esbMessageIn, timeout);
      org.apache.camel.Message camelMessageOut = getComposer().decompose(esbMessageOut, camelMessageIn);
      exchange.setOut(camelMessageOut);
    }
  }
View Full Code Here

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

        {
            message.getBody().add(requestLocation, EBWSUtil.VALID_REQUEST) ;
        }
        final ServiceInvoker serviceInvoker = new ServiceInvoker("TestEBWS", name) ;
       
        final Message responseMessage = serviceInvoker.deliverSync(message, 30000) ;
       
        final Object response ;
        if (responseLocation == null)
        {
            response = responseMessage.getBody().get();
View Full Code Here

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

      requestMessage.getBody().add(msgText);
     
      invoker.deliverAsync(requestMessage); // no waiting for a response
     
      // now delivery it and wait for a response
      replyMessage = invoker.deliverSync(requestMessage, 20000);
     
      System.out.println("Reply Message: " + replyMessage.getBody().get());
    }
   
}
View Full Code Here

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

      invoker = new ServiceInvoker("MyTransformationServicesESB", "MyXML2POJO2TransformationService");
      requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
      requestMessage.getBody().add(fileContent);
           
      // now delivery it and wait for a response
      replyMessage = invoker.deliverSync(requestMessage, 20000);
     
      System.out.println("Reply Message: " + replyMessage.getBody().get());
    }
   
    public static String readAsciiFile(String fileName) throws IOException {
View Full Code Here

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

        final Message message = MessageFactory.getInstance().getMessage() ;
       
        final ServiceInvoker si = new ServiceInvoker("test", "fail") ;
        try
        {
            si.deliverSync(message, 10) ;
            fail("Expected MessageDeliveryException") ;
        }
        catch (final MessageDeliverException mde) {} // expected
       
        assertNull("Call To EPR", message.getHeader().getCall().getTo()) ;
View Full Code Here

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

        message.getHeader().getCall().setTo(deliverEPR) ;
       
        final ServiceInvoker si = new ServiceInvoker("test", "fail") ;
        try
        {
            si.deliverSync(message, 10) ;
            fail("Expected MessageDeliveryException") ;
        }
        catch (final MessageDeliverException mde) {} // expected
       
        assertEquals("Call To EPR", deliverEPR, message.getHeader().getCall().getTo()) ;
View Full Code Here

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

        message.getHeader().getCall().setReplyTo(pickupEPR) ;
       
        final ServiceInvoker si = new ServiceInvoker("test", "fail") ;
        try
        {
            si.deliverSync(message, 10) ;
            fail("Expected MessageDeliveryException") ;
        }
        catch (final MessageDeliverException mde) {} // expected
       
        assertEquals("Call To EPR", deliverEPR, message.getHeader().getCall().getTo()) ;
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.