Package org.apache.tuscany.sca.node

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


    private Target targetClient;

    @Before
    public void setUp() throws Exception {
        try {
          NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/policy/PolicyOuterComposite.composite").toURI().toURL().toString(),
                    new Contribution("TestContribution", new File("src/main/resources/policy/").toURI().toURL().toString()));
            node.start();
            targetClient = node.getService(Target.class, "TargetClientComponent");
        } catch(Exception ex) {
            System.out.println(ex.toString());
View Full Code Here


    private Target targetClient;

    @Before
    public void setUp() throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/bindingoverride/OuterComposite.composite").toURI().toURL().toString(),
                    new Contribution("TestContribution", new File("src/main/resources/bindingoverride/").toURI().toURL().toString()));
            node.start();
            targetClient = node.getService(Target.class, "OuterClientComponent");
        } catch(Exception ex) {
            System.out.println(ex.toString());
View Full Code Here

     * @throws Exception Failed to initialise the SCADomain
     */
    @Before
    public void setUp() throws Exception {
       
  NodeFactory factory = NodeFactory.newInstance();
        node = factory.createNode(new File("src/main/resources/OneWayContribution/META-INF/sca-deployables/oneWay.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/OneWayContribution/META-INF/sca-deployables/").toURI().toURL().toString()));
        node.start();
       
    }
View Full Code Here

    /**
     * Runs before each test method
     */
    @BeforeClass
    public static void setUp() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();
        node = factory.createNode(new File("src/main/resources/wsdl/wrapped/primitivesservice.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
        node.start();
    }
View Full Code Here

    /**
     * Runs once before the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();
        node = factory.createNode(new File("src/main/resources/wsdl/wrapped/standard-types-service.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
        node.start();
    }
View Full Code Here

     * Runs before each test method
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/primitivesservice.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
            node.start();
        } catch(Throwable e) {
            e.printStackTrace();
            Assert.fail();
View Full Code Here

    public CustomCompositeBuilder(boolean nonWiring) {
        this.nonWiring = nonWiring;
    }
   
    public void loadContribution(String compositeURL, String sourceURI, String sourceURL) throws Exception {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        node = nodeFactory.createNode(compositeURL, new Contribution(sourceURI, sourceURL));
        node.start();
       
        // get some things out of the extension registry
        extensionPoints = ((NodeImpl)node).getExtensionPointRegistry();
       
View Full Code Here

     * Runs before each test method
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/standard-types-service.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
            node.start();
        } catch (Throwable e) {
            e.printStackTrace();
        }
View Full Code Here

    private static CalculatorService calculatorService;


    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
      NodeFactory factory = NodeFactory.newInstance();
        String contribution = ContributionLocationHelper.getContributionLocation(CalculatorClient.class);
        node = factory.createNode("Calculator.composite", new Contribution("calculator", contribution)).start();
        // node = factory.createNode().start();

        calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
View Full Code Here

            + " </component>"
            + " </composite>";

    @Test
    public void testNodeWithCompositeContent() {
        NodeFactory factory = new NodeFactoryImpl();
        Contribution contribution = new Contribution("c1", new File("target/test-classes").toURI().toString());
        Node node = factory.createNode(new StringReader(composite), contribution);
        testNode2(node);
    }
View Full Code Here

TOP

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

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.