use of org.apache.stringarray.SOAPServiceRPCLit in project cxf by apache.
the class StringArrayTest method testStringArrayList.
@Test
public void testStringArrayList() throws Exception {
SpringBusFactory factory = new SpringBusFactory();
Bus bus = factory.createBus();
BusFactory.setDefaultBus(bus);
setBus(bus);
StringWriter swin = new java.io.StringWriter();
java.io.PrintWriter pwin = new java.io.PrintWriter(swin);
LoggingInInterceptor logIn = new LoggingInInterceptor(new PrintWriterEventSender(pwin));
StringWriter swout = new java.io.StringWriter();
java.io.PrintWriter pwout = new java.io.PrintWriter(swout);
LoggingOutInterceptor logOut = new LoggingOutInterceptor(new PrintWriterEventSender(pwout));
getBus().getInInterceptors().add(logIn);
getBus().getOutInterceptors().add(logOut);
SOAPServiceRPCLit service = new SOAPServiceRPCLit();
StringListTest port = service.getSoapPortRPCLit();
updateAddressPort(port, PORT);
String[] strs = new String[] { "org", "apache", "cxf" };
String[] res = port.stringListTest(strs);
assertArrayEquals(strs, res);
assertTrue("Request message is not marshalled correctly and @XmlList does not take effect:\n" + swout.toString(), swout.toString().indexOf("<in>org apache cxf</in>") > -1);
assertTrue("Response message is not marshalled correctly and @XmlList does not take effect\n" + swin.toString(), swin.toString().indexOf("<out>org apache cxf</out>") > -1);
}
Aggregations