Package org.codehaus.xfire.client

Examples of org.codehaus.xfire.client.XFireProxyFactory


       
        XmlBeansServiceFactory xsf = new XmlBeansServiceFactory();
        Service serviceModel = xsf.create(OrderService.class);
       
        OrderService client =
            (OrderService) new XFireProxyFactory().create(serviceModel, url);
       
        PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory.newInstance();
        PurchaseOrderType po = poDoc.addNewPurchaseOrder();
       
        Address add = Address.Factory.newInstance();
View Full Code Here


    }

    public void testClient() throws Exception
    {
        XFireNamespaceProblemInterface client = (XFireNamespaceProblemInterface)
            new XFireProxyFactory(getXFire()).create(service, "xfire.local://XFireNamespaceProblemService");
        assertEquals("foo", client.makeCall2());
    }
View Full Code Here

        getServiceRegistry().register(service);
    }
   
    public void testClient() throws Exception
    {
        WS1 client = (WS1) new XFireProxyFactory(getXFire()).create(service, "xfire.local://WS1");
       
        try
        {
            client.throwException(true);
        }
View Full Code Here

    }

    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

        // Create a service model for the client
        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

        getServiceRegistry().register(service);
    }

    public void testClient() throws Exception
    {
        IInterfaceService client = (IInterfaceService) new XFireProxyFactory(getXFire()).create(service, "xfire.local://IInterfaceService");
       
        IChild child = client.getChild();
        assertNotNull(child);
        assertEquals("child", child.getChildName());
        assertEquals("parent", child.getParentName());
View Full Code Here

        assertValid("//detail/f:AuthenticationFault/f:message[text()='Invalid username/password']", response);
    }
   
    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.");
        }
        catch (AuthenticationFault_Exception fault)
        {
            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

    public Object createClientProxy(Service service, String xfireServletUrl)
        throws MalformedURLException
    {
        xfireServletUrl += (xfireServletUrl.endsWith("/") ? "" : "/")
                + service.getName().getLocalPart();
        return new XFireProxyFactory().create(service, xfireServletUrl);
    }
View Full Code Here

        service.setInvoker(new BeanInvoker(new MyService()));
        getServiceRegistry().register(service);
        service.setProperty(IMyObject.class.getName() + ".implementation", MyObject.class.getName());
       
        IMyService client = (IMyService)
            new XFireProxyFactory(getXFire()).create(service, "xfire.local://IMyService");
        MyObject o = new MyObject();
        o.setName("foo");
        client.receive(o);
    }
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

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.