use of org.apache.cxf.ordered_param_holder.OrderedParamHolder_Service in project cxf by apache.
the class ClientServerMiscTest method testOrderedParamHolder.
@Test
public void testOrderedParamHolder() throws Exception {
OrderedParamHolder_Service service = new OrderedParamHolder_Service();
OrderedParamHolder port = service.getOrderedParamHolderSOAP();
updateAddressPort(port, PORT);
try {
Holder<ComplexStruct> part3 = new Holder<ComplexStruct>();
part3.value = new ComplexStruct();
part3.value.setElem1("elem1");
part3.value.setElem2("elem2");
part3.value.setElem3(0);
Holder<Integer> part2 = new Holder<Integer>();
part2.value = 0;
Holder<String> part1 = new Holder<String>();
part1.value = "part1";
port.orderedParamHolder(part3, part2, part1);
assertNotNull(part3.value);
assertEquals("check value", "return elem1", part3.value.getElem1());
assertEquals("check value", "return elem2", part3.value.getElem2());
assertEquals("check value", 1, part3.value.getElem3());
assertNotNull(part2.value);
assertEquals("check value", 1, part2.value.intValue());
assertNotNull(part1.value);
assertEquals("check value", "return part1", part1.value);
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
}
Aggregations