Package org.apache.cxf.jaxws.service

Examples of org.apache.cxf.jaxws.service.AddNumbers


        factory.setBus(SpringBusFactory.getDefaultBus());
        factory.setServiceClass(AddNumbers.class);
       

        factory.setAddress(address);
        AddNumbers proxy = (AddNumbers)factory.create();
        StringWriter strWriter = new StringWriter();
        LoggingOutInterceptor log = new LoggingOutInterceptor(new PrintWriter(strWriter));
        ClientProxy.getClient(proxy).getOutInterceptors().add(log);
       
        List<String> args = new ArrayList<String>();
        args.add("str1");
        args.add("str2");
        args.add("str3");
        List<Integer> result = proxy.addNumbers(args);
        String expected = "<ns2:addNumbers xmlns:ns2=\"http://service.jaxws.cxf.apache.org/\">"
            + "<arg0>str1 str2 str3</arg0></ns2:addNumbers>";
        assertTrue("Client does not use the generated wrapper class to marshal request parameters",
                     strWriter.toString().indexOf(expected) > -1);
        assertEquals("Get the wrong result", 100, (int)result.get(0));
View Full Code Here


        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setBus(SpringBusFactory.getDefaultBus());
        factory.setServiceClass(AddNumbers.class);

        factory.setAddress(address);
        AddNumbers proxy = (AddNumbers)factory.create();
        StringWriter strWriter = new StringWriter();
        LoggingOutInterceptor log = new LoggingOutInterceptor(new PrintWriter(strWriter));
        ClientProxy.getClient(proxy).getOutInterceptors().add(log);
       
        List<String> args = new ArrayList<String>();
        args.add("str1");
        args.add("str2");
        args.add("str3");
        List<Integer> result = proxy.addNumbers(args);
        String expected = "<arg0>str1 str2 str3</arg0>";
        assertTrue("Client does not use the generated wrapper class to marshal request parameters",
                     strWriter.toString().indexOf(expected) > -1);
        assertEquals("Get the wrong result", 100, (int)result.get(0));
       
View Full Code Here

        factory.setBus(SpringBusFactory.getDefaultBus());
        factory.setServiceClass(AddNumbers.class);
       

        factory.setAddress(address);
        AddNumbers proxy = (AddNumbers)factory.create();
        StringWriter strWriter = new StringWriter();
        LoggingOutInterceptor log = new LoggingOutInterceptor(new PrintWriter(strWriter));
        factory.getClientFactoryBean().getClient().getOutInterceptors().add(log);
       
        List<String> args = new ArrayList<String>();
        args.add("str1");
        args.add("str2");
        args.add("str3");
        List<Integer> result = proxy.addNumbers(args);
        String expected = "<ns2:addNumbers xmlns:ns2=\"http://service.jaxws.cxf.apache.org/\">"
            + "<arg0>str1 str2 str3</arg0></ns2:addNumbers>";
        assertTrue("Client does not use the generated wrapper class to marshal request parameters",
                     strWriter.toString().indexOf(expected) > -1);
        assertEquals("Get the wrong result", 100, (int)result.get(0));
View Full Code Here

TOP

Related Classes of org.apache.cxf.jaxws.service.AddNumbers

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.