servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lh...@apache.org
Subject svn commit: r704819 - /servicemix/components/engines/servicemix-validation/trunk/src/main/java/org/apache/servicemix/validation/ValidationEndpoint.java
Date Wed, 15 Oct 2008 09:25:24 GMT
Author: lhein
Date: Wed Oct 15 02:25:23 2008
New Revision: 704819

URL: http://svn.apache.org/viewvc?rev=704819&view=rev
Log:
fixed SM-1633

Modified:
    servicemix/components/engines/servicemix-validation/trunk/src/main/java/org/apache/servicemix/validation/ValidationEndpoint.java

Modified: servicemix/components/engines/servicemix-validation/trunk/src/main/java/org/apache/servicemix/validation/ValidationEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-validation/trunk/src/main/java/org/apache/servicemix/validation/ValidationEndpoint.java?rev=704819&r1=704818&r2=704819&view=diff
==============================================================================
--- servicemix/components/engines/servicemix-validation/trunk/src/main/java/org/apache/servicemix/validation/ValidationEndpoint.java
(original)
+++ servicemix/components/engines/servicemix-validation/trunk/src/main/java/org/apache/servicemix/validation/ValidationEndpoint.java
Wed Oct 15 02:25:23 2008
@@ -33,10 +33,9 @@
 import javax.xml.validation.SchemaFactory;
 import javax.xml.validation.Validator;
 
-import org.xml.sax.SAXException;
-
 import org.apache.servicemix.common.endpoints.ProviderEndpoint;
 import org.apache.servicemix.common.util.MessageUtil;
+import org.apache.servicemix.jbi.exception.FaultException;
 import org.apache.servicemix.jbi.jaxp.SourceTransformer;
 import org.apache.servicemix.jbi.jaxp.StringSource;
 import org.apache.servicemix.validation.handler.CountingErrorHandlerFactory;
@@ -44,6 +43,8 @@
 import org.apache.servicemix.validation.handler.MessageAwareErrorHandlerFactory;
 import org.springframework.core.io.Resource;
 
+import org.xml.sax.SAXException;
+
 /**
  * @org.apache.xbean.XBean element="endpoint"
  * @author lhein
@@ -258,8 +259,7 @@
 
                 if (!handlingErrorMethod.equalsIgnoreCase(FAULT_FLOW)) {
                     // HANDLE AS JBI FAULT
-                    throw new JBIException(
-                            "Failed to validate against schema: " + schema + "\n" + new SourceTransformer().toString(fault.getContent()));
+                    throw new FaultException("Failed to validate against schema: " + schema,
exchange, fault);
                 } else {
                     MessageUtil.transfer(fault, out);
                 }



Mime
View raw message