Search in sources :

Example 1 with RefSplitName

use of org.apache.cxf.anonymous_complex_type.RefSplitName 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();
    }
}
Also used : QName(javax.xml.namespace.QName) AnonymousComplexType(org.apache.cxf.anonymous_complex_type.AnonymousComplexType) UndeclaredThrowableException(java.lang.reflect.UndeclaredThrowableException) RefSplitNameResponse(org.apache.cxf.anonymous_complex_type.RefSplitNameResponse) RefSplitName(org.apache.cxf.anonymous_complex_type.RefSplitName) SplitName(org.apache.cxf.anonymous_complex_type.SplitName) AnonymousComplexTypeService(org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeService) RefSplitName(org.apache.cxf.anonymous_complex_type.RefSplitName) JaxbElementTest(org.apache.cxf.jaxb_element_test.JaxbElementTest) Test(org.junit.Test)

Aggregations

UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 QName (javax.xml.namespace.QName)1 AnonymousComplexType (org.apache.cxf.anonymous_complex_type.AnonymousComplexType)1 AnonymousComplexTypeService (org.apache.cxf.anonymous_complex_type.AnonymousComplexTypeService)1 RefSplitName (org.apache.cxf.anonymous_complex_type.RefSplitName)1 RefSplitNameResponse (org.apache.cxf.anonymous_complex_type.RefSplitNameResponse)1 SplitName (org.apache.cxf.anonymous_complex_type.SplitName)1 JaxbElementTest (org.apache.cxf.jaxb_element_test.JaxbElementTest)1 Test (org.junit.Test)1