Index: java/modules/extensions/src/org/apache/synapse/config/xml/ValidateMediatorFactory.java
===================================================================
--- java/modules/extensions/src/org/apache/synapse/config/xml/ValidateMediatorFactory.java	(revision 417504)
+++ java/modules/extensions/src/org/apache/synapse/config/xml/ValidateMediatorFactory.java	(working copy)
@@ -31,22 +31,31 @@
 /**
  * Creates a validation mediator from the XML configuration
  * <p/>
- * <validate schema="url" [source="xpath"]>
- * <on-fail>
- * mediator+
- * </on-fail>
+ * <validate schema="url" [source="xpath"] [schema-full-checking="boolean"] [honour-all-schemaLocations="boolean"]>
+ *   <on-fail>
+ *     mediator+
+ *   </on-fail>
  * </validate>
  */
 public class ValidateMediatorFactory extends AbstractListMediatorFactory {
 
     private static final Log log = LogFactory.getLog(TransformMediatorFactory.class);
+
     private static final QName VALIDATE_Q = new QName(Constants.SYNAPSE_NAMESPACE, "validate");
+    private static final QName ON_FAIL_Q = new QName(Constants.SYNAPSE_NAMESPACE, "on-fail");
+    private static final QName SCHEMA_Q = new QName(Constants.NULL_NAMESPACE, "schema");
+    private static final QName SOURCE_Q = new QName(Constants.NULL_NAMESPACE, "source");
+    private static final QName SCHEMA_FULL_CHECKING_Q = new QName(Constants.NULL_NAMESPACE, "schema-full-checking");
+    private static final QName HONOUR_ALL_SCHEMA_LOCATIONS_Q = new QName(Constants.NULL_NAMESPACE, "honour-all-schemaLocations");
 
-    public Mediator createMediator(OMElement elem) {
+    public Mediator createMediator(OMElement elem) 
+    {
 
         ValidateMediator validateMediator = new ValidateMediator();
-        OMAttribute attSchema = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "schema"));
-        OMAttribute attSource = elem.getAttribute(new QName(Constants.NULL_NAMESPACE, "source"));
+        OMAttribute attSchema = elem.getAttribute(SCHEMA_Q);
+        OMAttribute attSource = elem.getAttribute(SOURCE_Q);
+        OMAttribute attSchemaFullChecking = elem.getAttribute(SCHEMA_FULL_CHECKING_Q);
+        OMAttribute attHonourAllSchemaLocations = elem.getAttribute(HONOUR_ALL_SCHEMA_LOCATIONS_Q);
 
         if (attSchema != null) {
             validateMediator.setSchemaUrl(attSchema.getAttributeValue());
@@ -61,7 +70,6 @@
                 AXIOMXPath xp = new AXIOMXPath(attSource.getAttributeValue());
                 validateMediator.setSource(xp);
                 Util.addNameSpaces(xp, elem, log);
-
             } catch (JaxenException e) {
                 String msg = "Invalid XPath expression specified for attribute 'source'";
                 log.error(msg);
@@ -69,13 +77,19 @@
             }
         }
 
+        if (attSchemaFullChecking != null) {
+            validateMediator.setSchemaFullChecking("true".equals(attSchemaFullChecking.getAttributeValue()));
+        }
+
+        if (attHonourAllSchemaLocations != null) {
+            validateMediator.setHonourAllSchemaLocations("true".equals(attHonourAllSchemaLocations.getAttributeValue()));
+        }
+
         OMElement onFail = elem.getFirstElement();
-        if (new QName(Constants.SYNAPSE_NAMESPACE, "on-fail").equals(onFail.getQName()) &&
-            onFail.getChildElements().hasNext()) {
+        if (ON_FAIL_Q.equals(onFail.getQName()) && onFail.getChildElements().hasNext()) {
             super.addChildren(onFail, validateMediator);
-
         } else {
-            String msg = "A non-empty on-fail element is required for the validate mediator";
+            String msg = "A non-empty <on-fail> childe element is required for the <validate> mediator";
             log.error(msg);
             throw new SynapseException(msg);
         }
Index: java/modules/extensions/src/org/apache/synapse/mediators/ValidateMediator.java
===================================================================
--- java/modules/extensions/src/org/apache/synapse/mediators/ValidateMediator.java	(revision 417504)
+++ java/modules/extensions/src/org/apache/synapse/mediators/ValidateMediator.java	(working copy)
@@ -54,8 +54,11 @@
 
     private static final Log log = LogFactory.getLog(ValidateMediator.class);
 
-    /** A space or comma delimitered list of schemas to validate the source element against */
+    /** 
+     * A space or comma delimitered list of schemas to validate the source element against 
+     */
     private String schemaUrl = null;
+
     /**
      * An XPath expression to be evaluated against the message to find the element to be validated.
      * If this is not specified, the validation will occur against the first child element of the SOAP body
@@ -63,6 +66,16 @@
     private AXIOMXPath source = null;
 
     /**
+     * Flag for enabling the schema full checking validator feature
+     */
+    private boolean schemaFullChecking = true;
+
+    /**
+     * Flag for enabling the honour all schema locations validator feature
+     */
+    private boolean honourAllSchemaLocations = true;
+
+    /**
      * Schema full checking feature id (http://apache.org/xml/features/validation/schema-full-checking).
      */
     private static final String SCHEMA_FULL_CHECKING_FEATURE_ID = "http://apache.org/xml/features/validation/schema-full-checking";
@@ -94,13 +107,30 @@
         this.source = source;
     }
 
+    public boolean getSchemaFullChecking() {
+        return schemaFullChecking;
+    }
+
+    public void setSchemaFullChecking(boolean enable) {
+        schemaFullChecking = enable;
+    }
+
+    public boolean getHonourAllSchemaLocations() {
+        return honourAllSchemaLocations;
+    }
+
+    public void setHonourAllSchemaLocations(boolean enable) {
+        honourAllSchemaLocations = enable;
+    }
+
     /**
      * Return the node to be validated. If a source XPath is not specified, this will
      * default to the first child of the SOAP body
      * @param synCtx the message context
      * @return the OMNode against which validation should be performed
      */
-    private OMNode getValidateSource(MessageContext synCtx) {
+    private OMNode getValidateSource(MessageContext synCtx) 
+    {
 
         AXIOMXPath sourceXPath = source;
         // do not change the source XPath if not specified, as it is shared..
@@ -164,8 +194,8 @@
             // Create SchemaFactory and configure
             SchemaFactory factory = SchemaFactory.newInstance(DEFAULT_SCHEMA_LANGUAGE);
             factory.setErrorHandler(handler);
-            factory.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
-            factory.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, true);
+            factory.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
+            factory.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
 
             // Build Schema from schemaUrl
             Schema schema = null;
@@ -191,8 +221,8 @@
             // Setup validator and input source.
             Validator validator = schema.newValidator();
             validator.setErrorHandler(handler);
-            validator.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, true);
-            validator.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, true);
+            validator.setFeature(SCHEMA_FULL_CHECKING_FEATURE_ID, schemaFullChecking);
+            validator.setFeature(HONOUR_ALL_SCHEMA_LOCATIONS_ID, honourAllSchemaLocations);
 
             XMLReader reader = XMLReaderFactory.createXMLReader();
             SAXSource source = new SAXSource(reader, new InputSource(baisFromSource));
Index: java/modules/extensions/test/org/apache/synapse/ValidateMediatorTest.java
===================================================================
--- java/modules/extensions/test/org/apache/synapse/ValidateMediatorTest.java	(revision 417504)
+++ java/modules/extensions/test/org/apache/synapse/ValidateMediatorTest.java	(working copy)
@@ -15,15 +15,21 @@
 */
 package org.apache.synapse;
 
+import java.io.ByteArrayInputStream;
+import javax.xml.stream.XMLStreamException;
 import junit.framework.TestCase;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.xpath.AXIOMXPath;
 import org.apache.synapse.MessageContext;
 import org.apache.synapse.TestMediateHandler;
 import org.apache.synapse.TestMediator;
 import org.apache.synapse.mediators.TestUtils;
 import org.apache.synapse.mediators.ValidateMediator;
+import org.apache.synapse.config.xml.ValidateMediatorFactory;
 
-public class ValidateMediatorTest extends TestCase {
+public class ValidateMediatorTest extends TestCase 
+{
 
     private static final String VALID_ENVELOPE_TWO_SCHEMAS =
             "<Outer xmlns=\"http://www.apache-synapse.org/test2\">" +
@@ -65,6 +71,29 @@
             "<Codes>String</Codes>\n" +
             "</CheckPriceRequest>\n";
 
+    private static final String DEFAULT_FEATURES_MEDIATOR_CONFIG = 
+            "<validate xmlns=\"http://ws.apache.org/ns/synapse\" " +
+            "       schema=\"file:synapse_repository/conf/sample/validate.xsd\">" + 
+            "   <on-fail>" +
+            "       <makefault>" +
+            "           <code value=\"tns:Receiver\" xmlns:tns=\"http://www.w3.org/2003/05/soap-envelope\"/>" +
+            "           <reason value=\"Invalid request\"/>" +
+            "       </makefault>" +
+            "   </on-fail>" +
+            "</validate>";
+
+    private static final String CUSTOM_FEATURES_MEDIATOR_CONFIG = 
+            "<validate xmlns=\"http://ws.apache.org/ns/synapse\" " +
+            "       schema=\"file:synapse_repository/conf/sample/validate.xsd\" " + 
+            "       schema-full-checking=\"false\" honour-all-schemaLocations=\"false\">" + 
+            "   <on-fail>" +
+            "       <makefault>" +
+            "           <code value=\"tns:Receiver\" xmlns:tns=\"http://www.w3.org/2003/05/soap-envelope\"/>" +
+            "           <reason value=\"Invalid request\"/>" +
+            "       </makefault>" +
+            "   </on-fail>" +
+            "</validate>";
+
     private boolean onFailInvoked = false;
     private TestMediator testMediator = null;
 
@@ -82,7 +111,7 @@
         this.onFailInvoked = onFailInvoked;
     }
 
-    public void testValidateMedaitorValidCase() throws Exception {
+    public void testValidateMediatorValidCase() throws Exception {
         setOnFailInvoked(false);
 
         // create a validate mediator
@@ -100,10 +129,10 @@
         // test validate mediator, with static enveope
         validate.mediate(TestUtils.getTestContext(VALID_ENVELOPE));
 
-        assertTrue(!onFailInvoked);
+        assertFalse(onFailInvoked);
     }
 
-    public void testValidateMedaitorValidCaseTwoSchemas() throws Exception {
+    public void testValidateMediatorValidCaseTwoSchemas() throws Exception {
         setOnFailInvoked(false);
 
         // create a validate mediator
@@ -121,10 +150,10 @@
         // test validate mediator, with static enveope
         validate.mediate(TestUtils.getTestContext(VALID_ENVELOPE_TWO_SCHEMAS));
 
-        assertTrue(!onFailInvoked);
+        assertFalse(onFailInvoked);
     }
 
-    public void testValidateMedaitorInvalidCaseTwoSchemas() throws Exception {
+    public void testValidateMediatorInvalidCaseTwoSchemas() throws Exception {
         setOnFailInvoked(false);
 
         // create a validate mediator
@@ -145,7 +174,7 @@
         assertTrue(onFailInvoked);
     }
 
-    public void testValidateMedaitorInvalidCase() throws Exception {
+    public void testValidateMediatorInvalidCase() throws Exception {
         setOnFailInvoked(false);
 
         // create a validate mediator
@@ -166,7 +195,7 @@
         assertTrue(onFailInvoked);
     }
 
-    public void testValidateMedaitorValidCaseNoNS() throws Exception {
+    public void testValidateMediatorValidCaseNoNS() throws Exception {
         setOnFailInvoked(false);
 
         // create a validate mediator
@@ -184,10 +213,10 @@
         // test validate mediator, with static enveope
         validate.mediate(TestUtils.getTestContext(VALID_ENVELOPE_NO_NS));
 
-        assertTrue(!onFailInvoked);
+        assertFalse(onFailInvoked);
     }
 
-    public void testValidateMedaitorInvalidCaseNoNS() throws Exception {
+    public void testValidateMediatorInvalidCaseNoNS() throws Exception {
         setOnFailInvoked(false);
 
         // create a validate mediator
@@ -207,4 +236,41 @@
 
         assertTrue(onFailInvoked);
     }
+
+    public void testValidateMediatorDefaultFeatures() throws Exception {
+        setOnFailInvoked(false);
+
+        ValidateMediatorFactory mf = new ValidateMediatorFactory();
+        ValidateMediator mediator = (ValidateMediator)mf.createMediator(
+            createOMElement(DEFAULT_FEATURES_MEDIATOR_CONFIG));
+
+        assertTrue(mediator.getSchemaFullChecking());
+        assertTrue(mediator.getHonourAllSchemaLocations());
+        assertFalse(onFailInvoked);
+    }
+
+    public void testValidateMediatorCustomFeatures() throws Exception 
+    {
+        setOnFailInvoked(false);
+
+        ValidateMediatorFactory mf = new ValidateMediatorFactory();
+        ValidateMediator mediator = (ValidateMediator)mf.createMediator(
+            createOMElement(CUSTOM_FEATURES_MEDIATOR_CONFIG));
+
+        assertFalse(mediator.getSchemaFullChecking());
+        assertFalse(mediator.getHonourAllSchemaLocations());
+        assertFalse(onFailInvoked);
+    }
+
+    private static OMElement createOMElement(String xml) 
+    {
+
+        try {
+            StAXOMBuilder builder = new StAXOMBuilder(new ByteArrayInputStream(xml.getBytes()));
+            OMElement omElement = builder.getDocumentElement();
+            return omElement;
+        } catch (XMLStreamException e) {
+            throw new RuntimeException(e);
+        }
+    }
 }
