Package org.apache.tuscany.sca.test.corba.generated

Examples of org.apache.tuscany.sca.test.corba.generated.ScenarioOne


            }
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(SERVICE_NAME, "");
            NameComponent path[] = {nc};
            ScenarioOne scenarioOne = new ScenarioOneServant();
            ncRef.rebind(path, scenarioOne);
            // obtain node
            node = NodeFactory.getInstance().createNode("ScenarioOne.composite", TestCorbaHost.class.getClassLoader()).start();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here


        try {
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(serviceName, "");
            NameComponent path[] = {nc};
            ScenarioOne so = ScenarioOneHelper.narrow(ncRef.resolve(path));

            RichStruct richStruct = getRichStruct();
            RichStruct result = so.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));

            try {
                richStruct.innerStruct.color = Color.red;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof WrongColor);
            }

            try {
                richStruct.innerStruct.color = Color.green;
                richStruct.longField = 0;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof UnexpectedException);
            }
View Full Code Here

            }
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(SERVICE_NAME, "");
            NameComponent path[] = {nc};
            ScenarioOne scenarioOne = new ScenarioOneServant();
            ncRef.rebind(path, scenarioOne);
            // obtain node
            node = NodeFactory.getInstance().createNode("ScenarioOne.composite", TestCorbaHost.class.getClassLoader()).start();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        try {
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(serviceName, "");
            NameComponent path[] = {nc};
            ScenarioOne so = ScenarioOneHelper.narrow(ncRef.resolve(path));

            RichStruct richStruct = getRichStruct();
            RichStruct result = so.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));

            try {
                richStruct.innerStruct.color = Color.red;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof WrongColor);
            }

            try {
                richStruct.innerStruct.color = Color.green;
                richStruct.longField = 0;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof UnexpectedException);
            }
View Full Code Here

            }
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(SERVICE_NAME, "");
            NameComponent path[] = {nc};
            ScenarioOne scenarioOne = new ScenarioOneServant();
            ncRef.rebind(path, scenarioOne);
            // obtain domain
            domain = SCADomain.newInstance("ScenarioOne.composite");
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        try {
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(serviceName, "");
            NameComponent path[] = {nc};
            ScenarioOne so = ScenarioOneHelper.narrow(ncRef.resolve(path));

            RichStruct richStruct = getRichStruct();
            RichStruct result = so.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));

            try {
                richStruct.innerStruct.color = Color.red;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof WrongColor);
            }

            try {
                richStruct.innerStruct.color = Color.green;
                richStruct.longField = 0;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof UnexpectedException);
            }
View Full Code Here

            }
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(SERVICE_NAME, "");
            NameComponent path[] = {nc};
            ScenarioOne scenarioOne = new ScenarioOneServant();
            ncRef.rebind(path, scenarioOne);
            // obtain node
            node = NodeFactory.getInstance().createNode("ScenarioOne.composite", TestCorbaHost.class.getClassLoader()).start();
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        try {
            org.omg.CORBA.Object objRef = orb.resolve_initial_references("NameService");
            NamingContext ncRef = NamingContextHelper.narrow(objRef);
            NameComponent nc = new NameComponent(serviceName, "");
            NameComponent path[] = {nc};
            ScenarioOne so = ScenarioOneHelper.narrow(ncRef.resolve(path));

            RichStruct richStruct = getRichStruct();
            RichStruct result = so.setRichStruct(richStruct);
            assertTrue(equalTo(result, richStruct));

            try {
                richStruct.innerStruct.color = Color.red;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof WrongColor);
            }

            try {
                richStruct.innerStruct.color = Color.green;
                richStruct.longField = 0;
                result = so.setRichStruct(richStruct);
                fail();
            } catch (Exception e) {
                assertTrue(e instanceof UnexpectedException);
            }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.test.corba.generated.ScenarioOne

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.