Search in sources :

Example 1 with JaxbElementTest

use of org.apache.cxf.jaxb_element_test.JaxbElementTest in project cxf by apache.

the class ClientServerMiscTest method testMinOccursAndNillableJAXBElement.

@Test
public void testMinOccursAndNillableJAXBElement() throws Exception {
    JaxbElementTest_Service service = new JaxbElementTest_Service();
    assertNotNull(service);
    JaxbElementTest port = service.getPort(JaxbElementTest.class);
    updateAddressPort(port, PORT);
    try {
        String response = port.newOperation("hello");
        assertNotNull(response);
        assertEquals("in=hello", response);
        response = port.newOperation(null);
        assertNotNull(response);
        assertEquals("in=null", response);
    } catch (UndeclaredThrowableException ex) {
        throw (Exception) ex.getCause();
    }
}
Also used : UndeclaredThrowableException(java.lang.reflect.UndeclaredThrowableException) JaxbElementTest(org.apache.cxf.jaxb_element_test.JaxbElementTest) JaxbElementTest_Service(org.apache.cxf.jaxb_element_test.JaxbElementTest_Service) JaxbElementTest(org.apache.cxf.jaxb_element_test.JaxbElementTest) Test(org.junit.Test)

Aggregations

UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 JaxbElementTest (org.apache.cxf.jaxb_element_test.JaxbElementTest)1 JaxbElementTest_Service (org.apache.cxf.jaxb_element_test.JaxbElementTest_Service)1 Test (org.junit.Test)1