use of org.apache.header_test.types.TestHeader2 in project cxf by apache.
the class HeaderClientServerTest method testOutHeader.
@Test
public void testOutHeader() 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 {
TestHeader2 in = new TestHeader2();
String val = new String(TestHeader2Response.class.getSimpleName());
Holder<TestHeader2Response> out = new Holder<TestHeader2Response>();
Holder<TestHeader2Response> outHeader = new Holder<TestHeader2Response>();
for (int idx = 0; idx < 2; idx++) {
val += idx;
in.setRequestType(val);
proxy.testHeader2(in, out, outHeader);
assertEquals(val, out.value.getResponseType());
assertEquals(val, outHeader.value.getResponseType());
}
} catch (UndeclaredThrowableException ex) {
ex.printStackTrace();
throw (Exception) ex.getCause();
}
}
Aggregations