// need to set the same bus with service , so use the ServiceImpl
ServiceImpl service = new ServiceImpl(getBus(), (URL)null, serviceName, null);
service.addPort(portName, "http://schemas.xmlsoap.org/soap/", "local://localhost:9090/hello");
HelloInterface proxy = service.getPort(portName, HelloInterface.class, new LoggingFeature());
Client client = ClientProxy.getClient(proxy);
boolean found = false;
for (Interceptor<? extends Message> i : client.getOutInterceptors()) {
if (i instanceof LoggingOutInterceptor) {
found = true;
}
}
assertTrue(found);
assertEquals("Get the wrong result", "hello", proxy.sayHi("hello"));
String[] strInput = new String[2];
strInput[0] = "Hello";
strInput[1] = "Bonjour";
String[] strings = proxy.getStringArray(strInput);
assertEquals(strings.length, 2);
assertEquals(strings[0], "HelloHello");
assertEquals(strings[1], "BonjourBonjour");
List<String> listInput = new ArrayList<String>();
listInput.add("Hello");
listInput.add("Bonjour");
List<String> list = proxy.getStringList(listInput);
assertEquals(list.size(), 2);
assertEquals(list.get(0), "HelloHello");
assertEquals(list.get(1), "BonjourBonjour");
//now the client side can't unmarshal the complex type without binding types annoutation
List<String> result = proxy.getGreetings();
assertEquals(2, result.size());
}