Examples of ServiceInvoker


Examples of Framework.anchored.ServiceInvoker

     * This constructor can store no reference to the original object,
     * but must instead copy over it's necessary attributes.
     */
    public BusinessDBMgrProxy(BusinessDBMgr baseClass) {
        super(new ServiceObjectContext());
        ServiceInvoker serviceInvoker = getInvoker(baseClass);
        if (serviceInvoker == null) {
            throw new UsageException("Cannot create a proxy for an object that has not yet been exported.");
        }
        this.objectName = serviceInvoker.getObjectName();
        // The proxy is being created on the same host as the real object
        //this.hostName = System.getProperty("RMIregistry.host");
        try {
            this.hostName = InetAddress.getLocalHost().getHostAddress();
        } catch (UnknownHostException e) {
            throw new UsageException("Cannot BIND to RMI object ", e);
        }
        this.port = serviceInvoker.getPort();
    }
View Full Code Here

Examples of net.helipilot50.stocktrade.framework.anchored.ServiceInvoker

     * This constructor can store no reference to the original object,
     * but must instead copy over it's necessary attributes.
     */
    public RemoteEventImpl(RemoteEvent baseClass) {
        super(new ServiceObjectContext());
        ServiceInvoker serviceInvoker = getInvoker(baseClass);
        if (serviceInvoker == null) {
            throw new UsageException("Cannot create a proxy for an object that has not yet been exported.");
        }
        serviceInvoker.prepareForRemoteCall();
        this.objectName = serviceInvoker.getObjectName();
        // The proxy is being created on the same host as the real object
        //this.hostName = System.getProperty("RMIregistry.host");
        try {
            this.hostName = InetAddress.getLocalHost().getHostAddress();
        } catch (UnknownHostException e) {
            throw new UsageException("Cannot BIND to RMI object ", e);
        }
        this.port = serviceInvoker.getPort();
    }
View Full Code Here

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

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

      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

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

     
      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

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

    @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

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

    return serviceName;
  }
 
  protected ServiceInvoker createServiceInvoker( final String serviceCategoryName, final String serviceName ) throws MessageDeliverException
  {
    return new ServiceInvoker( serviceCategoryName, serviceName );
  }
View Full Code Here

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

    // 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

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

        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

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
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.