Search in sources :

Example 1 with TestHeader1

use of org.apache.header_test.types.TestHeader1 in project cxf by apache.

the class HeaderClientServerTest method testInHeader.

@Test
public void testInHeader() throws Exception {
    URL wsdl = getClass().getResource("/wsdl/soapheader.wsdl");
    assertNotNull(wsdl);
    SOAPHeaderService service = new SOAPHeaderService(wsdl, serviceName);
    assertNotNull(service);
    TestHeader proxy = service.getPort(portName, TestHeader.class);
    try {
        TestHeader1 val = new TestHeader1();
        for (int idx = 0; idx < 2; idx++) {
            TestHeader1Response returnVal = proxy.testHeader1(val, val);
            assertNotNull(returnVal);
            assertEquals(TestHeader1.class.getSimpleName(), returnVal.getResponseType());
        }
    } catch (UndeclaredThrowableException ex) {
        throw (Exception) ex.getCause();
    }
}
Also used : TestHeader(org.apache.header_test.TestHeader) TestHeader1Response(org.apache.header_test.types.TestHeader1Response) UndeclaredThrowableException(java.lang.reflect.UndeclaredThrowableException) SOAPHeaderService(org.apache.header_test.SOAPHeaderService) TestHeader1(org.apache.header_test.types.TestHeader1) URL(java.net.URL) Endpoint(javax.xml.ws.Endpoint) Test(org.junit.Test) AbstractJaxWsTest(org.apache.cxf.jaxws.AbstractJaxWsTest)

Aggregations

UndeclaredThrowableException (java.lang.reflect.UndeclaredThrowableException)1 URL (java.net.URL)1 Endpoint (javax.xml.ws.Endpoint)1 AbstractJaxWsTest (org.apache.cxf.jaxws.AbstractJaxWsTest)1 SOAPHeaderService (org.apache.header_test.SOAPHeaderService)1 TestHeader (org.apache.header_test.TestHeader)1 TestHeader1 (org.apache.header_test.types.TestHeader1)1 TestHeader1Response (org.apache.header_test.types.TestHeader1Response)1 Test (org.junit.Test)1