Package org.codehaus.xfire.service

Examples of org.codehaus.xfire.service.Echo


        super.tearDown();
    }

    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8191/Echo");
       
        Client client = ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient();
        client.setProperty(Channel.USERNAME, "user");
        client.setProperty(Channel.PASSWORD, "pass");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here


        super.tearDown();
    }
   
    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "https://localhost:8443/Echo");

        Protocol protocol = new Protocol("https", (ProtocolSocketFactory) new EasySSLProtocolSocketFactory(), 8443);
        Protocol.registerProtocol("https", protocol);
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

        super.tearDown();
    }

    public void testGzip() throws Exception
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Client client = Client.getInstance(echo);
        client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, "true");
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

        assertEquals(root.getName(), e.getName());
    }
   
    public void testWithChunking() throws Exception
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Client client = Client.getInstance(echo);
        client.setProperty(CommonsHttpMessageSender.GZIP_ENABLED, "true");
        client.setProperty(HttpTransport.CHUNKING_ENABLED, "true");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

        assertNull(response);
    }

    public void testProxy() throws MalformedURLException, XFireFault
    {
        Echo echo = (Echo) new XFireProxyFactory().create(service, "http://localhost:8391/Echo");
       
        Element root = new Element("root", "a", "urn:a");
        root.addContent("hello");
       
        Element e = echo.echo(root);
       
        assertEquals(root.getName(), e.getName());
    }
View Full Code Here

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

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

    }

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

    {
        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

        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

TOP

Related Classes of org.codehaus.xfire.service.Echo

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.