Search in sources :

Example 1 with TestHeader1Response

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

the class TestHeaderImpl method testHeader1.

public TestHeader1Response testHeader1(TestHeader1 in, TestHeader1 inHeader) {
    if (in == null || inHeader == null) {
        throw new IllegalArgumentException("TestHeader1 part not found.");
    }
    TestHeader1Response returnVal = new TestHeader1Response();
    returnVal.setResponseType(inHeader.getClass().getSimpleName());
    return returnVal;
}
Also used : TestHeader1Response(org.apache.header_test.types.TestHeader1Response)

Example 2 with TestHeader1Response

use of org.apache.header_test.types.TestHeader1Response 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

TestHeader1Response (org.apache.header_test.types.TestHeader1Response)2 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 Test (org.junit.Test)1