Package org.jboss.soa.esb.client

Examples of org.jboss.soa.esb.client.ServiceInvoker


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

      esbMessage.getBody().add(args[2]);
     
        new ServiceInvoker(args[0], args[1]).deliverAsync(esbMessage);
     
    }
View Full Code Here


                throw new ConfigurationException("No EPR present in process instance") ;
            }
           
           
            if(epr instanceof LogicalEPR) {
                final ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } else {
                final Courier courier = CourierFactory.getCourier(epr);
                try {
                    courier.deliver(message);
                } finally {
View Full Code Here

     * @throws MessageDeliverException
     */
    private ServiceInvoker getServiceInvoker() throws MessageDeliverException
    {
        String key = esbCategoryName + esbServiceName;
        final ServiceInvoker origInvoker = siCache.get(key) ;
        if (origInvoker != null) {
            return origInvoker;
        } else {
            ServiceInvoker invoker = new ServiceInvoker(esbCategoryName,  esbServiceName);
            siCache.put(key, invoker);
            return invoker;
        }
    }
View Full Code Here

                epr = EPRHelper.fromXMLString(replyToEPR.toString()) ;
            } else {
                throw new ConfigurationException("No EPR present in process instance") ;
            }
            if(epr instanceof LogicalEPR) {
                final ServiceInvoker invoker = ((LogicalEPR)epr).getServiceInvoker();
                invoker.deliverAsync(message);
            } else {
                final Courier courier = CourierFactory.getCourier(epr);
                try {
                    courier.deliver(message);
                } finally {
View Full Code Here

    {
        String key = esbCategoryName + esbServiceName;
        if (siCache.containsKey(key)) {
            return siCache.get(key);
        } else {
            ServiceInvoker invoker = new ServiceInvoker(esbCategoryName,  esbServiceName);
            siCache.put(key, invoker);
            return invoker;
        }
    }
View Full Code Here

      // Create the delivery adapter for the target service (cache it)
      System.setProperty("javax.xml.registry.ConnectionFactoryClass",
            "org.apache.ws.scout.registry.ConnectionFactoryImpl");

      // Create the delivery adapter for the target service (cache it)
      ServiceInvoker deliveryAdapter = new ServiceInvoker("MyServiceCategory",
            "WebserviceConsumer2");
     
      // Create and populate the request message...
      Message requestMessage = MessageFactory.getInstance().getMessage(
            MessageType.JAVA_SERIALIZED);
     
      // Deliver the request message synchronously - timeout after 20
      // seconds...
      deliveryAdapter.deliverAsync(requestMessage);

      // need to cleanup connection pool for service invoker
      //deliveryAdapter.close();
   }
View Full Code Here

      if (args[2] != null && !args[2].equals(""))
         msgText =  args[2];
     
      System.out.println("Inbound Data: " + msgText);
     
      ServiceInvoker invoker = new ServiceInvoker(category,serviceName);
      Message requestMessage;
      requestMessage = MessageFactory.getInstance().getMessage(MessageType.JBOSS_XML);
      requestMessage.getBody().add(msgText);
     try {    
        invoker.deliverAsync(requestMessage); // no waiting for a response
        } catch (Exception e) {
            System.out.println("Exception caught by client: " + e);
        }
    }
View Full Code Here

      if (args[2] != null && !args[2].equals(""))
         msgText =  args[2];     

      System.out.println("Inbound Data: " + msgText);
     
      ServiceInvoker invoker = new ServiceInvoker(category,serviceName);
      Message requestMessage;
      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

     *
     * @throws ManagedLifecycleException for errors while initialisation.
     */
    protected void doInitialise() throws ManagedLifecycleException {
        try {
            serviceInvoker = new ServiceInvoker(targetService);
        } catch (MessageDeliverException e) {
            throw new ManagedLifecycleException(e);
        }
    }
View Full Code Here

        ServiceInvoker dlQueueInvoker;

        @SuppressWarnings("unchecked")
        public void run() {
            try {
                dlQueueInvoker = new ServiceInvoker(INTERNAL_SERVICE_CATEGORY, DEAD_LETTER_SERVICE_NAME);
            } catch (MessageDeliverException e) {
                logger.error("Unable to initialise Dead Letter Channel Service Invoker for Aggregation timeout checker. Not using Dead Letter Channel.", e);
            }

            boolean running = true ;
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.client.ServiceInvoker

Copyright © 2018 www.massapicom. 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.