Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
servicemix-validation-2008.01
-
None
Description
The old lightweight validation component used to throw a org.apache.servicemix.jbi.FaultException in the following code snippet:
if (!handlingErrorMethod.equalsIgnoreCase(FAULT_FLOW))
{ // HANDLE AS JBI FAULT throw new FaultException("Failed to validate against schema: " + schema, exchange, fault); }else
{ MessageUtil.transfer(fault, out); return true; }In the new servicemix-validation component, a JBIException is thrown instead of a FaultException. The relevant code snippet follows:
if (!handlingErrorMethod.equalsIgnoreCase(FAULT_FLOW))
{ // HANDLE AS JBI FAULT throw new JBIException( "Failed to validate against schema: " + schema + "\n" + new SourceTransformer().toString(fault.getContent())); }else
{ MessageUtil.transfer(fault, out); }The new servicemix-validation component does not seem correct to me. It should throw a FaultException rather than a JBIException. I would suggest a unit test be written to verify this behavior.
Ron