call a method that does not exist and check if the correct exception
is thrown from the server.
Object result = null;
try {
Call call = getCall();
call.setSOAPVersion(SOAPConstants.SOAP12_CONSTANTS);
result = call.invoke("unknownFreakyMethod", null);
} catch (AxisFault fault){
assertEquals(Constants.FAULT_SOAP12_SENDER, fault.getFaultCode());
QName [] subCodes = fault.getFaultSubCodes();
assertNotNull(subCodes);
assertEquals(1, subCodes.length);
assertEquals(Constants.FAULT_SUBCODE_PROC_NOT_PRESENT, subCodes[0]);
return;
}
fail("Didn't catch expected fault");