use of org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeService in project cxf by apache.
the class ClientServerMiscTest method testAnonymousComplexType.
@Test
public void testAnonymousComplexType() throws Exception {
AnonymousComplexTypeService actService = new AnonymousComplexTypeService();
assertNotNull(actService);
QName portName = new QName("http://cxf.apache.org/anonymous_complex_type/", "anonymous_complex_typeSOAP");
AnonymousComplexType act = actService.getPort(portName, AnonymousComplexType.class);
updateAddressPort(act, PORT);
try {
Names reply = act.splitName("Tom Li");
assertNotNull("no response received from service", reply);
assertEquals("Tom", reply.getFirst());
assertEquals("Li", reply.getSecond());
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
}
use of org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeService in project cxf by apache.
the class ClientServerMiscTest method testRefAnonymousComplexType.
@Test
public void testRefAnonymousComplexType() throws Exception {
AnonymousComplexTypeService actService = new AnonymousComplexTypeService();
assertNotNull(actService);
QName portName = new QName("http://cxf.apache.org/anonymous_complex_type/", "anonymous_complex_typeSOAP");
AnonymousComplexType act = actService.getPort(portName, AnonymousComplexType.class);
updateAddressPort(act, PORT);
try {
SplitName name = new SplitName();
name.setName("Tom Li");
RefSplitName refName = new RefSplitName();
refName.setSplitName(name);
RefSplitNameResponse reply = act.refSplitName(refName);
assertNotNull("no response received from service", reply);
assertEquals("Tom", reply.getSplitNameResponse().getNames().getFirst());
assertEquals("Li", reply.getSplitNameResponse().getNames().getSecond());
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
}
Aggregations