Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCAClient


        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-spring-scatag"),
                                                              locate("creditcard-payment-jaxb"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment/Payment");

        System.out.println("Payment Spring SCATag test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f));
       
View Full Code Here


        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-spring"),
                                                              locate("creditcard-payment-jaxb"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment/Payment");

        System.out.println("Payment Spring test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f));
       
View Full Code Here

        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-python"),
                                                              locate("emailgateway"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("Payment Python test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
       
        node.stop();
View Full Code Here

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-java-reference-pass"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("===================================================");
        System.out.println("\n\nPayment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("===================================================");
       
View Full Code Here

        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-groovy"),
                                                              locate("emailgateway"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("Payment Groovy test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
       
        node.stop();
View Full Code Here

        SCANode node = SCANodeFactory.newInstance().createSCANode(null,
                                                              locate("payment-java"),
                                                              locate("creditcard-payment-jaxb"));
        node.start();
       
        SCAClient client = (SCAClient)node;
        Payment payment = client.getService(Payment.class, "Payment");

        System.out.println("Payment Java test");
        System.out.println("\nSuccessful Payment - Status = \n\n" + payment.makePaymentMember("c-0", 100.00f));
        System.out.println("\n\nFailed Payment - Status = \n\n" + payment.makePaymentMember("c-1", 100.00f));
       
View Full Code Here

            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
           
            SCANode node = nodeFactory.createSCANode(chosenDeployableLocation, contributions);
           
            node.start();
            SCAClient client = (SCAClient)node;
            CalculatorService calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");
           
            System.out.println("Add 2.0 + 3.0 + 3.0 = " + calculatorService.add(2.0, 3.0));

/*
            AssemblyInspector assemblyInspector = new AssemblyInspector();
View Full Code Here

    public static void main(String[] args) throws Exception {
        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
        SCANode2 storeClientNode = nodeLauncher.createNode("http://localhost:9990/node-config/StoreClientNode");
        storeClientNode.start();
        SCAClient client = (SCAClient)storeClientNode;
       
        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        storeClientNode.stop();
View Full Code Here

        domainManager.stop();
    }
   
    @Test
    public void testShop() {
        SCAClient client = (SCAClient)storeClientNode;
        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        Assert.assertEquals("$17.75", total);
View Full Code Here

            nodeC.start();
            nodeB.start();
            nodeA.start();
           
            SCAClient client = (SCAClient)nodeA;
            calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");

        } catch(Exception ex){
            System.err.println(ex.toString());
       
       
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.SCAClient

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.