diff --git a/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HandleResponseInterceptor.java b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HandleResponseInterceptor.java index 89550369..0ca42610 100755 --- a/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HandleResponseInterceptor.java +++ b/ipp-v3-java-devkit/src/main/java/com/intuit/ipp/interceptors/HandleResponseInterceptor.java @@ -106,6 +106,8 @@ public void execute(IntuitMessage intuitMessage) throws FMSException { if ("Validation".equalsIgnoreCase(fault.getType())) { throw new ValidationException(fault.getError()); + } else if ("ValidationFault".equalsIgnoreCase(fault.getType())) { + throw new ValidationException(fault.getError()); } else if ("Service".equalsIgnoreCase(fault.getType())) { throw new ServiceException(fault.getError()); } else if ("AuthenticationFault".equalsIgnoreCase(fault.getType())) { diff --git a/ipp-v3-java-devkit/src/test/java/com/intuit/ipp/interceptors/HandleResponseInterceptorTest.java b/ipp-v3-java-devkit/src/test/java/com/intuit/ipp/interceptors/HandleResponseInterceptorTest.java index d5dd4de4..88a56be6 100755 --- a/ipp-v3-java-devkit/src/test/java/com/intuit/ipp/interceptors/HandleResponseInterceptorTest.java +++ b/ipp-v3-java-devkit/src/test/java/com/intuit/ipp/interceptors/HandleResponseInterceptorTest.java @@ -95,6 +95,23 @@ public void testHandleResponseInterceptor_Validation() { Assert.assertTrue(isValid); } + @Test (enabled = false) + public void testHandleResponseInterceptor_ValidationFault() { + boolean isValid = false; + IntuitResponse intuitResponse = (IntuitResponse) intuitMessage.getResponseElements().getResponse(); + intuitResponse.getFault().setType("ValidationFault"); + HandleResponseInterceptor interceptor = new HandleResponseInterceptor(); + try { + interceptor.execute(intuitMessage); + } catch (FMSException e) { + if (e instanceof ValidationException) { + isValid = true; + } + } + + Assert.assertTrue(isValid); + } + @Test (enabled = false) public void testHandleResponseInterceptor_Service() { boolean isValid = false;