Package org.codehaus.xfire.client

Examples of org.codehaus.xfire.client.XFireProxyFactory.create()


    public void testClient()
        throws Exception
    {
        XFireProxyFactory xpf = getXFireProxyFactory();
        MultipleOutService client = (MultipleOutService) xpf.create(service, "xfire.local://MultipleOutService");
       
        Holder out = new Holder();
        Holder headerOut = new Holder();
        String response = client.echo("Yo Yo", out, headerOut);
       
View Full Code Here


        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

    }
   
    public void testClient() throws Exception
    {
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        AuthService echo = (AuthService) factory.create(service, "xfire.local://AuthService");
        try
        {
            echo.authenticate("yo", "yo");
            fail("Should have thrown custom fault.");
View Full Code Here

        {
            assertEquals("Invalid username/password", fault.getFaultInfo().getMessage());
            assertEquals("message", fault.getMessage());
        }
       
        echo = (AuthService) factory.create(soap12Binding, "xfire.local://AuthService");

        try
        {
            echo.authenticate("yo", "yo");
            fail("Should have thrown custom fault.");
View Full Code Here

        server = new XFireHttpServer(getXFire());
        server.setPort(8191);
        server.start();

        XFireProxyFactory xpf = new XFireProxyFactory();
        picClient = (PictureService) xpf.create(service, "http://localhost:8191/PictureService");
       
        client = ((XFireProxy) Proxy.getInvocationHandler(picClient)).getClient();
        client.setProperty(HttpTransport.CHUNKING_ENABLED, "true");
    }
View Full Code Here

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

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

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

        getServiceRegistry().register(service);

        service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, MapServiceImpl.class);
       
        XFireProxyFactory factory = new XFireProxyFactory(getXFire());
        MapService client = (MapService) factory.create(service, "xfire.local://MapService");

        // this fails when we do it... Woodstox bug?
//        Client xclient = Client.getInstance(client);
//        xclient.addOutHandler(new DOMOutHandler());
//        xclient.addOutHandler(new LoggingHandler());
View Full Code Here

    {
        Service serviceModel = getXFire().getServiceRegistry().getService("BookService");
        XFireProxyFactory serviceFactory = new XFireProxyFactory(getXFire());
       
        // Connect to web service.
        BookService service = (BookService) serviceFactory.create(serviceModel, "xfire.local://BookService");
        assertNotNull(service);
       
        // Call web service.
        Book[] books = service.getBooks();
        assertNotNull(books);
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.