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));