Package org.codehaus.xfire.client

Examples of org.codehaus.xfire.client.XFireProxyFactory


        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");
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");
       
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);
View Full Code Here

        assertValid("//e:out[text()='yoyo']", response);
    }
   
    public void testClient() throws Exception
    {
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        EchoOverload echo = (EchoOverload) factory.create(service, "xfire.local://EchoOverload");

        assertEquals("yo", echo.echo("yo"));
        assertEquals("yoyo", echo.echo("yo", "yo"));
    }
View Full Code Here

        assertValid("//s:Body/w:receiveUserResponse", response);
    }
   
    public void testClient() throws Exception {
        InheritanceService client = (InheritanceService)
        new XFireProxyFactory(getXFire()).create(endpoint, "xfire.local://InheritanceService");
       
        Client xc = Client.getInstance(client);

//        xc.addOutHandler(new LoggingHandler());
//        xc.addOutHandler(new DOMOutHandler());
View Full Code Here

    }

    public void testClientAndHeaders() throws Exception
    {
        AccountService client = (AccountService)
            new XFireProxyFactory(getXFire()).create(endpoint, "xfire.local://AccountService");
       
        client.auth("123", "text");
    }
View Full Code Here

    }
   
    public void testClient()
        throws Exception
    {
        XFireProxyFactory xpf = new XFireProxyFactory(getXFire());
        Echo echo = (Echo) xpf.create(service, "xfire.local://Echo");
       
        assertEquals("hi", echo.echo("hi"));
    }
View Full Code Here

    }

    public void testClient()
        throws Exception
    {
        XFireProxyFactory xpf = new XFireProxyFactory();
        PictureService picClient = (PictureService) xpf.create(service, "http://localhost:8081/PictureService");
       
        Client client = ((XFireProxy) Proxy.getInvocationHandler(picClient)).getClient();
        client.setProperty(SoapConstants.MTOM_ENABLED, "true");
       
        EchoPicture req = new EchoPicture();
View Full Code Here

                return bytes;
            }
        }));
        getServiceRegistry().register(service);
       
        ByteService client = (ByteService) new XFireProxyFactory(getXFire()).create(service, "xfire.local://ByteService");
       
        byte[] data1 = read("pom.xml");
        byte[] data2 = client.echo(data1);
        assertEquals(data1.length, data2.length);
    }
View Full Code Here

        service.addOutHandler(wsOut);
       
        getServiceRegistry().register(service);
       
        // Create the client
        XFireProxyFactory pFactory = new XFireProxyFactory(getXFire());
        echo = (Echo) pFactory.create(service, "xfire.local://Echo");
       
        client = ((XFireProxy) Proxy.getInvocationHandler(echo)).getClient();
        client.addInHandler(wsIn);
        client.addInHandler(new DOMInHandler());
        client.addOutHandler(wsOut);
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.client.XFireProxyFactory

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.