TestLogger.logger.debug("test: " + getName());
AddNumbersHandlerService service = new AddNumbersHandlerService();
setAxisConfigParameter(service, org.apache.axis2.jaxws.Constants.DISABLE_SOAPFAULT_FOR_LOCAL_EXCEPTION,
"true");
AddNumbersHandlerPortType proxy = service.getAddNumbersHandlerPort();
BindingProvider p = (BindingProvider)proxy;
// Force a local connection exception by using an invalid host/port
p.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, invalidAxisEndpoint);
List<Handler> handlers = p.getBinding().getHandlerChain();
if (handlers == null)
handlers = new ArrayList<Handler>();
handlers.add(new AddNumbersClientLogicalHandler4());
handlers.add(new AddNumbersClientLogicalHandler2());
p.getBinding().setHandlerChain(handlers);
int total = proxy.addNumbersHandler(1,2);
fail("Should have got an exception, but we didn't.");
} catch(Exception e) {
assertTrue("Exception should be WebServiceException.", e instanceof WebServiceException);
assertFalse("Exception should not be SOAPFaultException.", e instanceof SOAPFaultException);