Package org.jboss.soa.esb.client

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


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

      esbMessage.getBody().add(message);
     
        Message respMessage = new ServiceInvoker(serviceCategory, serviceName).deliverSync(esbMessage, timeout);
     
        result = (String)respMessage.getBody().get();

        return(result);
  }
View Full Code Here


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

      esbMessage.getBody().add(args[2]);
     
      try {
        Message respMessage = new ServiceInvoker(args[0], args[1]).deliverSync(esbMessage, 5000);
     
        System.out.println("REPLY: "+respMessage.getBody().get());
      } catch(org.jboss.soa.esb.couriers.FaultMessageException fme) {
        System.out.println("FAULT TYPE (AS QNAME): "+fme.getReturnedMessage().getBody().get(ESB_FAULT_CODE));
        System.out.println("FAULT TYPE (AS STRING): "+fme.getReturnedMessage().getBody().get(BPEL_FAULT_CODE));
View Full Code Here

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

      esbMessage.getBody().add(args[2]);
     
        Message respMessage = new ServiceInvoker(args[0], args[1]).deliverSync(esbMessage, 5000);
     
        System.out.println("REPLY: "+respMessage.getBody().get());
    }
View Full Code Here

    @ConfigParam(name = MessagePayloadProxy.SET_PAYLOAD_LOCATION, defaultVal = Body.DEFAULT_LOCATION)
    private String setPayloadLocation;

    @Initialize
    public void intitialize() throws MessageDeliverException {
        serviceInvoker = new ServiceInvoker(serviceCategory, serviceName);
    }
View Full Code Here

    return serviceName;
  }
 
  protected ServiceInvoker createServiceInvoker( final String serviceCategoryName, final String serviceName ) throws MessageDeliverException
  {
    return new ServiceInvoker( serviceCategoryName, serviceName );
  }
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", "Webserviceconsumer_wise2");

    // Create and populate the request message...
    Message requestMessage = MessageFactory.getInstance().getMessage(
        MessageType.JBOSS_XML);
    ExternalObject external = new ExternalObject();
    InternalObject internal = new InternalObject();
    internal.setNumber(new Integer(1));
    internal.setText(message);
    external.setInternal(internal);
    String dateString = "2007-03-07T04:27:00";
    Date date = (new SimpleDateFormat(DEFAULT_DATE_FORMAT))
        .parse(dateString);
    external.setDate(date);
    requestMessage.getBody().add(external);

    // Deliver the request message synchronously - timeout after 20
    // seconds...
    deliveryAdapter.deliverAsync(requestMessage);
  }
View Full Code Here

        try {
            wsEndpointServer.start();
            try {
                new AbstractTestRunner() {
                    public void test() throws Exception {
                        ServiceInvoker invoker = new ServiceInvoker("OrderManagement", "GoodbyeService");
                        Message message = MessageFactory.getInstance().getMessage();
                        Map params = new HashMap();

                        params.put("sayGoodbye.message", "Goodbye Henry!!");
                        message.getBody().add(params);

                        message = invoker.deliverSync(message, 10000);

                        String soapResponse = (String) message.getBody().get();
                        assertEquals("<response/>", soapResponse);
                    }
                }.setServiceConfig(esbConfig).run();
View Full Code Here

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

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

        esbConfig.uninstallRegistry();
        esbConfig.resetESBProperties();
    }

    public void test_String2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(new String(personXmlBytes));
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }
View Full Code Here

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }

    public void test_bytes2String() throws MessageDeliverException, RegistryException, FaultMessageException {
        ServiceInvoker invoker = new ServiceInvoker("Transform", "String");
        Message message = MessageFactory.getInstance().getMessage();

        message.getBody().add(personXmlBytes);
        message = invoker.deliverSync(message, 30000);

        assertEquals("<someone called=\"Tom Fennelly\" is=\"21\">", message.getBody().get());
    }
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.