Package org.jacorb.test.listenendpoints.echo_corbaloc

Examples of org.jacorb.test.listenendpoints.echo_corbaloc.EchoMessage


    }

    @Test
    public void test_ping()
    {
        EchoMessage server = null;
        try
        {
            String ior = setup.getServerIOR();
            assertTrue("test_ping: couldn't pickup server IOR", ior != null && ior.length() > 0);

            int slash = ior.trim().indexOf("/");
            String corbalocObjId = ior.trim().substring(slash);
            assertTrue("test_ping: corbaloc objectID is null", corbalocObjId != null);
            assertTrue("test_ping: corbaloc objID is malformed", corbalocObjId.equals("/EchoServer/EchoPOAP/EchoID") );

            server =
                    EchoMessageHelper.narrow (setup.getServerObject());

            server.ping();

        }
        catch (Exception e)
        {
            fail("test_ping: got an unexpected exception: <" + e.getMessage() + ">");
View Full Code Here


    }

    @Test
    public void test_echo_simple()
    {
        EchoMessage server = null;
        try
        {
            server =
                    EchoMessageHelper.narrow (setup.getServerObject());
            String result = server.echo_simple();
            TestUtils.getLogger().debug("AlternateEndpointTest: " + "test_echo_simple: got resp from server: <" + result + ">");
            assertTrue("test_echo_simple: result is null", result != null);
            assertTrue("test_echo_simple: unexpected result <" + result + ">",
                    result.startsWith("Simple greeting from"));
        }
View Full Code Here

    }

    @Test
    public void test_echo_string()
    {
        EchoMessage server = null;
        try
        {
            String ior = setup.getServerIOR();
            assertTrue("test_ping: couldn't pickup server IOR", ior != null && ior.length() > 0);

            int slash = ior.trim().indexOf("/");
            String corbalocObjId = ior.trim().substring(slash);
            assertTrue("test_ping: corbaloc objectID is null", corbalocObjId != null);
            assertTrue("test_ping: corbaloc objID is malformed", corbalocObjId.equals("/EchoServer/EchoPOAP/EchoID") );

            server =
                    EchoMessageHelper.narrow (setup.getServerObject());

            String outMsg = new String(Integer.toString(1)
                    + "test_echo_string is hailing server with IOR <" + ior + ">");
            long tms_out = System.currentTimeMillis();
            String inMsg = server.echo_string(outMsg);
            long tms_in = System.currentTimeMillis();
            long tms_dif = tms_in - tms_out;
            if (outMsg.equals(inMsg))
            {
                assertTrue("OK: " + tms_dif + "mSec <" + inMsg + ">", true);
View Full Code Here

    }

    @Test
    public void test_echo_wide()
    {
        EchoMessage server = null;
        try
        {
            String ior = setup.getServerIOR();
            assertTrue("test_ping: couldn't pickup server IOR", ior != null && ior.length() > 0);

            int slash = ior.trim().indexOf("/");
            String corbalocObjId = ior.trim().substring(slash);
            assertTrue("test_ping: corbaloc objectID is null", corbalocObjId != null);
            assertTrue("test_ping: corbaloc objID is malformed", corbalocObjId.equals("/EchoServer/EchoPOAP/EchoID") );

            server =
                    EchoMessageHelper.narrow (setup.getServerObject());

            String outMsg = new String(Integer.toString(1) + "test_echo_wide is hailing server with IOR <" + ior + ">");
            long tms_out = System.currentTimeMillis();
            String inMsg = server.echo_string(outMsg);
            long tms_in = System.currentTimeMillis();
            long tms_dif = tms_in - tms_out;
            if (outMsg.equals(inMsg))
            {
                assertTrue("OK: " + tms_dif + "mSec <" + inMsg + ">", true);
View Full Code Here

                Properties props = new Properties();
                props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

                org.omg.CORBA.ORB orb = setup.getAnotherORB(props);
                EchoMessage server = null;
                try
                {
                    assertTrue(orb instanceof org.jacorb.orb.ORB);

                    server =
View Full Code Here

                Properties props = new Properties();
                props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

                org.omg.CORBA.ORB orb = setup.getAnotherORB(props);
                EchoMessage server = null;
                try
                {
                    assertTrue(orb instanceof org.jacorb.orb.ORB);

                    server =
View Full Code Here

                Properties props = new Properties();
                props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

                org.omg.CORBA.ORB orb = setup.getAnotherORB(props);
                EchoMessage server = null;
                try
                {
                    assertTrue(orb instanceof org.jacorb.orb.ORB);

                    server =
View Full Code Here

                Properties props = new Properties();
                props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

                org.omg.CORBA.ORB orb = setup.getAnotherORB(props);
                EchoMessage server = null;

                try
                {
                    assertTrue(orb instanceof org.jacorb.orb.ORB);
View Full Code Here

                Properties props = new Properties();
                props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

                org.omg.CORBA.ORB orb = setup.getAnotherORB(props);
                EchoMessage server = null;

                try
                {
                    assertTrue(orb instanceof org.jacorb.orb.ORB);
View Full Code Here

                Properties props = new Properties();
                props.setProperty("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
                props.setProperty("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");

                org.omg.CORBA.ORB orb = setup.getAnotherORB(props);
                EchoMessage server = null;

                try
                {
                    assertTrue(orb instanceof org.jacorb.orb.ORB);
View Full Code Here

TOP

Related Classes of org.jacorb.test.listenendpoints.echo_corbaloc.EchoMessage

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.