use of org.apache.header_test.SOAPHeaderService in project cxf by apache.
the class HeaderClientServerTest method testHeader4.
@Test
public void testHeader4() {
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 {
proxy.testHeader4("cxf");
} catch (Exception e) {
// REVISIT
// fail("No exception should happen in testHeader4");
}
}
use of org.apache.header_test.SOAPHeaderService 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();
}
}
use of org.apache.header_test.SOAPHeaderService in project cxf by apache.
the class HeaderClientServerTest method testInOutHeader.
@Test
public void testInOutHeader() 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 {
TestHeader3 in = new TestHeader3();
String val = new String(TestHeader3.class.getSimpleName());
Holder<TestHeader3> inoutHeader = new Holder<TestHeader3>();
for (int idx = 0; idx < 2; idx++) {
val += idx;
in.setRequestType(val);
inoutHeader.value = new TestHeader3();
TestHeader3Response returnVal = proxy.testHeader3(in, inoutHeader);
// inoutHeader copied to return
// in copied to inoutHeader
assertNotNull(returnVal);
assertNull(returnVal.getResponseType());
assertEquals(val, inoutHeader.value.getRequestType());
in.setRequestType(null);
inoutHeader.value.setRequestType(val);
returnVal = proxy.testHeader3(in, inoutHeader);
assertNotNull(returnVal);
assertEquals(val, returnVal.getResponseType());
assertNull(inoutHeader.value.getRequestType());
}
} catch (UndeclaredThrowableException ex) {
throw (Exception) ex.getCause();
}
}
Aggregations