Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.Node.start()


        Node node = null;

        try {
            String location = ROOT;
            node = NodeFactory.newInstance().createNode("InvalidRemoteAttribute.composite", new Contribution("c1", location));
            node.start();
        } catch (Exception e) {
            if (! e.getCause().getClass().equals(InvalidAnnotationException.class)) {
                throw e;
            }
        } finally {
View Full Code Here


public class StandaloneTestCase{

    @Test
    public void test1() throws Exception {
        Node node = NodeFactory.newInstance().createNode(URI.create("tuscany:foo"),"../helloworld/target/itest-domains-helloworld.zip");
        node.start();
        assertEquals(1, node.getServiceNames().size());
        assertEquals("HelloworldComponent/Helloworld", node.getServiceNames().get(0));
        Helloworld helloworld = SCAClientFactory.newInstance(URI.create("tuscany:foo")).getService(Helloworld.class, "HelloworldComponent");
        assertEquals("Hello petra", helloworld.sayHello("petra"));
    }
View Full Code Here

    public void testLocal() throws Exception {
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/local/MatchLocal.composite",
                                                                     contributions);
        node1.start();
       
        ClientComponent local = node1.getService(ClientComponent.class, "LocalClientComponent");
        ParameterObject po = new ParameterObject();
       
        try {
View Full Code Here

       
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedClient.composite",
                                                                     contributions);
        node1.start();

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchDistributedService.composite",
                                                                     contributions);
       
View Full Code Here

                                                                     contributions);
       
        // force default binding on node2 to use a different port from node 1(which will default to 8080
        ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
        ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
        node2.start();
       
        ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
        ParameterObject po = new ParameterObject();
       
        try {
View Full Code Here

       
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedClient.composite",
                                                                     contributions);
        node1.start();

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchNonJAXBDistributedService.composite",
                                                                     contributions);
       
View Full Code Here

       
        // force default binding on node2 to use a different port from node 1(which will default to 8080
        // Don't need to do this as not testing callbacks here
        //((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
        //((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
        node2.start();
       
        ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
        ParameterObject po = new ParameterObject();
        po.field1 = "Test String";
       
View Full Code Here

       
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedClient.composite",
                                                                     contributions);
        node1.start();

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite",
                                                                     contributions);
        // force binding.ws on node2 to use a different port from node 1(which will default to 8080
View Full Code Here

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchPolicyDistributedService.composite",
                                                                     contributions);
        // force binding.ws on node2 to use a different port from node 1(which will default to 8080
        ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
        node2.start();
       
        ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
        ParameterObject po = new ParameterObject();
       
        try {
View Full Code Here

       
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite",
                                                                     contributions);
        node1.start();

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite",
                                                                     contributions);
       
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.