Package org.apache.tuscany.sca.node

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


     * Runs once before running the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/helloservice.composite", null);
        node.start();
        client = (SCAClient)node;
        }catch(Throwable e) {
            e.printStackTrace();
        }
View Full Code Here


    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsuserprop/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsdefault/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

            SCAContribution [] contributions = new SCAContribution[contributionsToDeploy.size()];
            for (int i = 0; i < contributionsToDeploy.size(); i++) {
                contributions[i] = new SCAContribution(contributionsToDeploy.get(i).getURI(), contributionsToDeploy.get(i).getLocation());
            }
                  
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
           
            SCANode node = nodeFactory.createSCANode(chosenDeployableLocation, contributions);
           
            node.start();
            SCAClient client = (SCAClient)node;
            CalculatorService calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");
View Full Code Here

            throw new IllegalArgumentException(e);
        }
    }

    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();

        List<SCAContribution> contributions = new ArrayList<SCAContribution>();

        if (composites != null && composites.length > 1) {
            // Create an aggregated composite that includes all the composites as Node API only takes one composite
            String content = createDeploymentComposite(applicationClassLoader, composites);
            // Create SCA contributions
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            node =
                factory.createSCANode("http://tuscany.apache.org/xmlns/sca/1.0/aggregated", content, contributions
                    .toArray(new SCAContribution[contributions.size()]));
        } else {
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            String composite = (composites != null && composites.length >= 1) ? composites[0] : null;
            if (!contributions.isEmpty()) {
                node =
                    factory.createSCANode(composite, contributions.toArray(new SCAContribution[contributions.size()]));
            } else {
                node = factory.createSCANodeFromClassLoader(composite, applicationClassLoader);
            }
        }
        client = (SCAClient)node;
        compositeActivator = ((NodeImpl)node).getCompositeActivator();
        components = new HashMap<String, Component>();
View Full Code Here

                    ex.printStackTrace();
                   
                }
            }
           
            SCANodeFactory factory = SCANodeFactory.newInstance();
            SCANode node = factory.createSCANode(null,
                                                 new SCAContribution("contrib2wsdl", contributionPath));
           
            // Print out all generated WSDL
            // today this means finding all services in the deployment composites
            // that have a binding.ws configured
View Full Code Here

    /**
     * Runs before each test method
     */
    @BeforeClass
    public static void setUp() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        node = nodeFactory.createSCANodeFromClassLoader("wsdl/wrapped/primitivesservice.composite", null);
        node.start();
        domain = (SCAClient)node;
    }
View Full Code Here

    private boolean duplicateReferenceException = false;

    @Override
    protected void setUp() throws Exception {
        try {
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
            node = nodeFactory.createSCANode(new File("src/main/resources/DuplicateReferenceName/Calculator.composite").toURL().toString(),
                                 new SCAContribution("TestContribution",
                                                     new File("src/main/resources/DuplicateReferenceName").toURL().toString()));
            node.start();
            calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
        } catch (ServiceRuntimeException ex) {
View Full Code Here

    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsdefault/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    private static SCANode node;

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsobject/helloworld.composite",
                new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

TOP

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

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.