Examples of Echo


Examples of org.codehaus.xfire.service.Echo

    }
   
    public void testHandleEquals()
            throws Exception
    {
        Echo echoProxy1 = (Echo) factory.create(service, transport, "");

        assertEquals(echoProxy1, echoProxy1);
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

    }

    public void testHandleHashCode()
            throws Exception
    {
        Echo echoProxy = (Echo) factory.create(service, transport, "");
       
        assertTrue(echoProxy.hashCode() != 0);
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

    {
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(service, transport, "xfire.local://Echo");
       
        Element e = echo.echo(root);
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.service.Echo

        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Service serviceModel = new ObjectServiceFactory(new MessageBindingProvider()).create(Echo.class);
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "xfire.local://Echo");
       
        Element e = echo.echo(root);
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

Examples of org.codehaus.xfire.test.Echo

        ObjectServiceFactory serviceFactory = new ObjectServiceFactory();
        Service serviceModel = serviceFactory.create(Echo.class);

        // Create a client proxy
        XFireProxyFactory proxyFactory = new XFireProxyFactory();
        Echo echo = (Echo) proxyFactory.create(serviceModel, "http://localhost:8191/Echo");
       
        System.out.println(echo.echo("Hello World"));
       
        starter.stop();
        // END SNIPPET: service
    }
View Full Code Here

Examples of org.codehaus.xfire.test.Echo

        // Create the service model
        Service serviceModel = sf.create(Echo.class);
       
        // Create a proxy for the service
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "jms://Echo");
       
        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Peer1");
       
        // run the client!
        String resString = echo.echo("hello");
        assertEquals("hello", resString);
    }
View Full Code Here

Examples of org.codehaus.xfire.test.Echo

        // Create the service model
        Service serviceModel = sf.create(Echo.class);
       
        // Create a proxy for the service
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "jms://GenericQueue?queue=Echo");
       
        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://Peer1");
       
        // run the client!
        String resString = echo.echo("hello");
        assertEquals("hello", resString);
    }
View Full Code Here

Examples of org.codehaus.xfire.test.Echo

        // Create the service model
        Service serviceModel = sf.create(Echo.class);
       
        // Create a proxy for the service
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) factory.create(serviceModel, "jms://GenericTopic?topic=Echo");
       
        // Since JMS doesn't really have a concept of anonymous endpoints, we need
        // need to let xfire know what JMS endpoint we should use
        ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient().setEndpointUri("jms://GenericTopic?topic=Echo");
       
        // run the client!
        String resString = echo.echo("hello");
        assertEquals("hello", resString);
    }
View Full Code Here

Examples of org.codehaus.xfire.test.Echo

    public void setUp()
            throws Exception
    {
        super.setUp();
        Echo echoBean = new EchoImpl();
        exporter = new XFireExporter();
        exporter.setXfire(getXFire());
        exporter.setServiceInterface(Echo.class);
        exporter.setServiceBean(echoBean);
        ServiceFactory serviceFactory = new ObjectServiceFactory(getXFire().getTransportManager(),
View Full Code Here

Examples of org.codehaus.xfire.test.Echo

        throws Exception
    {
        Object client = getContext().getBean("echoClient");
        assertNotNull(client);

        Echo echo = (Echo) client;
        String response = echo.echo("bleh");
        assertNotNull(response);
        assertEquals("bleh", response);
    }
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.