You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by rgavlin <rg...@yahoo.com> on 2008/10/15 10:35:33 UTC

servicemix-validation FAULT_JBI throws JBIException?

Greetings,

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. Do you
agree? If so, I will open a JIRA for this issue.

Ron

-- 
View this message in context: http://www.nabble.com/servicemix-validation-FAULT_JBI-throws-JBIException--tp19989151p19989151.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: servicemix-validation FAULT_JBI throws JBIException?

Posted by Lars Heinemann <la...@compart.net>.
Ron,

seems you are right. Open a JIRA please.

Regards
Lars


Am Mittwoch 15 Oktober 2008 10:35:33 schrieb rgavlin:
> Greetings,
>
> 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. Do you
> agree? If so, I will open a JIRA for this issue.
>
> Ron