use of org.apache.intfault.SOAPService in project cxf by apache.
the class IntFaultClientServerTest method testBasicConnection.
@Test
public void testBasicConnection() throws Exception {
URL wsdl = getClass().getResource("/wsdl/hello_world_fault.wsdl");
assertNotNull("WSDL is null", wsdl);
SOAPService service = new SOAPService(wsdl, serviceName);
assertNotNull("Service is null", service);
Greeter greeter = service.getSoapPort();
ClientProxy.getClient(greeter).getInInterceptors().add(new LoggingInInterceptor());
ClientProxy.getClient(greeter).getOutInterceptors().add(new LoggingOutInterceptor());
updateAddressPort(greeter, PORT);
try {
greeter.testDocLitFault("fault");
} catch (BadRecordLitFault e) {
assertEquals(5, e.getFaultInfo());
assertSoapHeader((BindingProvider) greeter);
}
}
Aggregations