use of org.apache.header_test.types.TestHeader2Response 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();
}
}
use of org.apache.header_test.types.TestHeader2Response in project cxf by apache.
the class TestHeaderImpl method testHeader2.
/**
* @param out
* @param outHeader
* @param in
*/
public void testHeader2(TestHeader2 in, Holder<TestHeader2Response> out, Holder<TestHeader2Response> outHeader) {
TestHeader2Response outVal = new TestHeader2Response();
outVal.setResponseType(in.getRequestType());
out.value = outVal;
TestHeader2Response outHeaderVal = new TestHeader2Response();
outHeaderVal.setResponseType(in.getRequestType());
outHeader.value = outHeaderVal;
}
Aggregations