use of org.apache.header_test.types.TestHeader5ResponseBody in project cxf by apache.
the class HeaderClientServerTest method testReturnHeader.
@Test
public void testReturnHeader() 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 {
Holder<TestHeader5ResponseBody> out = new Holder<TestHeader5ResponseBody>();
Holder<TestHeader5> outHeader = new Holder<TestHeader5>();
TestHeader5 in = new TestHeader5();
String val = new String(TestHeader5.class.getSimpleName());
for (int idx = 0; idx < 2; idx++) {
val += idx;
in.setRequestType(val);
proxy.testHeader5(out, outHeader, in);
assertEquals(1000, out.value.getResponseType());
assertEquals(val, outHeader.value.getRequestType());
}
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
}
use of org.apache.header_test.types.TestHeader5ResponseBody in project cxf by apache.
the class TestHeaderImpl method testHeader5.
public void testHeader5(Holder<TestHeader5ResponseBody> out, Holder<TestHeader5> outHeader, org.apache.header_test.types.TestHeader5 in) {
TestHeader5ResponseBody outVal = new TestHeader5ResponseBody();
outVal.setResponseType(1000);
out.value = outVal;
TestHeader5 outHeaderVal = new TestHeader5();
outHeaderVal.setRequestType(in.getRequestType());
outHeader.value = outHeaderVal;
}
Aggregations