Search in sources :

Example 1 with OrderedParamHolder_Service

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();
    }
}
Also used : BigInteger(java.math.BigInteger) OrderedParamHolder_Service(org.apache.cxf.ordered_param_holder.OrderedParamHolder_Service) OrderedParamHolder(org.apache.cxf.ordered_param_holder.OrderedParamHolder) OrderedParamHolder(org.apache.cxf.ordered_param_holder.OrderedParamHolder) Holder(javax.xml.ws.Holder) UndeclaredThrowableException(java.lang.reflect.UndeclaredThrowableException) ComplexStruct(org.apache.cxf.ordered_param_holder.ComplexStruct) JaxbElementTest(org.apache.cxf.jaxb_element_test.JaxbElementTest) Test(org.junit.Test)

Aggregations

UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 BigInteger (java.math.BigInteger)1 Holder (javax.xml.ws.Holder)1 JaxbElementTest (org.apache.cxf.jaxb_element_test.JaxbElementTest)1 ComplexStruct (org.apache.cxf.ordered_param_holder.ComplexStruct)1 OrderedParamHolder (org.apache.cxf.ordered_param_holder.OrderedParamHolder)1 OrderedParamHolder_Service (org.apache.cxf.ordered_param_holder.OrderedParamHolder_Service)1 Test (org.junit.Test)1