Package org.codehaus.xfire.demo

Examples of org.codehaus.xfire.demo.IBook


        Service serviceModel = new ObjectServiceFactory().create(IBook.class,
                                                                 "BookService",
                                                                 SERVICE_NAMESPACE,
                                                                 null);

        IBook service = (IBook) new XFireProxyFactory().create(serviceModel, SERVICE_URL
                + serviceName);

        Client client = Client.getInstance(service);
       // Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient();
        client.addOutHandler(new DOMOutHandler());
        Properties outProperties = new Properties();
        configureOutProperties(outProperties);
        client.addOutHandler(new WSS4JOutHandler(outProperties));
       
        // Configure incoming secuirty
        client.addInHandler(new DOMInHandler());
        Properties inProperties = new Properties();
        configureInProperties(inProperties);
        client.addInHandler(new WSS4JInHandler(inProperties));
       
        System.out.print("Looking for isbn : 0123456789 ....");
        Book b = service.findBook("0123456789");
        System.out.print(b.getTitle() + " : " + b.getAuthor() + "\n");

    }
View Full Code Here


        Service serviceModel = new ObjectServiceFactory().create(IBook.class,
                                                                 "BookService",
                                                                 SERVICE_NAMESPACE,
                                                                 null);

        IBook service = (IBook) new XFireProxyFactory().create(serviceModel, SERVICE_URL
                + serviceName);

        Client client = ((XFireProxy) Proxy.getInvocationHandler(service)).getClient();
       
        client.addOutHandler(new DOMOutHandler());
        Properties properties = new Properties();
        configureOutProperties(properties);
        client.addOutHandler(new WSS4JOutHandler(properties));
       
        System.out.print("Looking for isbn : 0123456789 ....");
        Book b = service.findBook("0123456789");
        System.out.print(b.getTitle() + " : " + b.getAuthor() + "\n");

    }
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.demo.IBook

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.