[jboss-identity-commits] JBoss Identity SVN: r234 - identity-federation/trunk/identity-fed-model/src/test/java/org/jboss/test/identity/federation/ws/trust.

jboss-identity-commits at lists.jboss.org jboss-identity-commits at lists.jboss.org
Wed Jan 21 13:03:30 EST 2009


Author: anil.saldhana at jboss.com
Date: 2009-01-21 13:03:30 -0500 (Wed, 21 Jan 2009)
New Revision: 234

Modified:
   identity-federation/trunk/identity-fed-model/src/test/java/org/jboss/test/identity/federation/ws/trust/UnmarshallingTestCase.java
Log:
unused

Modified: identity-federation/trunk/identity-fed-model/src/test/java/org/jboss/test/identity/federation/ws/trust/UnmarshallingTestCase.java
===================================================================
--- identity-federation/trunk/identity-fed-model/src/test/java/org/jboss/test/identity/federation/ws/trust/UnmarshallingTestCase.java	2009-01-20 16:53:59 UTC (rev 233)
+++ identity-federation/trunk/identity-fed-model/src/test/java/org/jboss/test/identity/federation/ws/trust/UnmarshallingTestCase.java	2009-01-21 18:03:30 UTC (rev 234)
@@ -25,15 +25,9 @@
 import java.net.URI;
 import java.util.List;
 
-import javax.xml.XMLConstants;
 import javax.xml.bind.JAXBContext;
 import javax.xml.bind.JAXBElement;
 import javax.xml.bind.Unmarshaller;
-import javax.xml.bind.ValidationEvent;
-import javax.xml.bind.ValidationEventHandler;
-import javax.xml.bind.ValidationEventLocator;
-import javax.xml.validation.Schema;
-import javax.xml.validation.SchemaFactory;
 
 import junit.framework.TestCase;
 
@@ -134,38 +128,4 @@
       assertNotNull("Unexpected null value for the request contents", contents);
       assertEquals("Unexpected number of contents", 4, contents.size());
    }
-
-   /**
-    * <p>
-    * Enable schema validation for the specified {@code Unmarshaller}.
-    * </p>
-    * 
-    * @param schemaFile the location of the schema file.
-    * @param unmarshaller the {@code Unmarshaller} where schema validation will be enabled.
-    * @throws Exception if an error occurs while setting the schema.
-    */
-   private void setValidatingSchema(String schemaFile, Unmarshaller unmarshaller) throws Exception
-   {
-      // create the schema based on the schema file.
-      URI schemaURI = this.getClass().getResource(schemaFile).toURI();
-      SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
-      Schema schema = factory.newSchema(new File(schemaURI));
-
-      // set the schema and the event handler.
-      unmarshaller.setSchema(schema);
-      unmarshaller.setEventHandler(new ValidationEventHandler()
-      {
-         // allow unmarshalling to continue even if there are errors.
-         public boolean handleEvent(ValidationEvent ve)
-         {
-            if (ve.getSeverity() != ValidationEvent.WARNING)
-            {
-               ValidationEventLocator vel = ve.getLocator();
-               System.out.println("Line:Col[" + vel.getLineNumber() + ":" + vel.getColumnNumber() + "]:"
-                     + ve.getMessage());
-            }
-            return true;
-         }
-      });
-   }
-}
+}
\ No newline at end of file




More information about the jboss-identity-commits mailing list