Examples of mapSchemaLocation()


Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

   public static SchemaBindingResolver initResolver() throws Exception
   {
      MultiClassSchemaResolver resolver = (MultiClassSchemaResolver) SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
      resolver.mapSchemaInitializer(ContainerInitializer.NS, ContainerInitializer.class.getName());
      String location = getSchemaLocation(SingletonSchemaBindingResolverUnitTestCase.class, "SchemaBindingInitializerUnitTestCaseContainer.xsd");
      resolver.mapSchemaLocation(ContainerInitializer.NS, location);
      return resolver;
   }

   public void testBean() throws Exception
   {
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

         name = name.substring(dot + 1);
      dot = name.lastIndexOf("UnitTestCase");
      if (dot != -1)
         name = name.substring(0, dot);
      String testXsd = packageName + '/' + name + ".xsd";
      resolver.mapSchemaLocation(nsURI, testXsd);
      resolver.mapSchemaInitializer(nsURI, JBossXBBuilder.newInitializer(expected));
     
      String testXml = findTestXml();
      Object o = unmarshal(testXml, expected, resolver);
      assertNotNull(o);
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

   public void testSchema1() throws Exception
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      MultiClassSchemaResolver resolver = new MultiClassSchemaResolver();
      resolver.mapSchemaLocation("urn:jboss:jbxb-minOccurs-schema1", "xml/jbxb/minOccurs/schema1.xsd");

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      URL testSchema1 = loader.getResource("xml/jbxb/minOccurs/testSchema1.xml");
      Object root = unmarshaller.unmarshal(testSchema1.toString(), resolver);
   }
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

   public void testSchema1v2() throws Exception
   {
      ClassLoader loader = Thread.currentThread().getContextClassLoader();
      MultiClassSchemaResolver resolver = new MultiClassSchemaResolver();
      resolver.mapSchemaLocation("urn:jboss:jbxb-minOccurs-schema1", "xml/jbxb/minOccurs/schema1v2.xsd");

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      URL testSchema1 = loader.getResource("xml/jbxb/minOccurs/testSchema1.xml");
      Object root = unmarshaller.unmarshal(testSchema1.toString(), resolver);
   }
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

   {
      Class<?> clazz = WildcardWrapperUnitTestCase.class;
      MultiClassSchemaResolver resolver = new MultiClassSchemaResolver();
      resolver.mapSchemaInitializer(PropertyInitializer.NS, PropertyInitializer.class.getName());
      String location = getSchemaLocation(clazz, "WildcardWrapperUnitTestCase.xsd");
      resolver.mapSchemaLocation(PropertyInitializer.NS, location);
      resolver.mapSchemaInitializer(SimpleInitializer.NS, SimpleInitializer.class.getName());
      location = getSchemaLocation(clazz, "SchemaBindingInitializerUnitTestCaseSimple.xsd");
      resolver.mapSchemaLocation(SimpleInitializer.NS, location);
      return resolver;
   }
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

      resolver.mapSchemaInitializer(PropertyInitializer.NS, PropertyInitializer.class.getName());
      String location = getSchemaLocation(clazz, "WildcardWrapperUnitTestCase.xsd");
      resolver.mapSchemaLocation(PropertyInitializer.NS, location);
      resolver.mapSchemaInitializer(SimpleInitializer.NS, SimpleInitializer.class.getName());
      location = getSchemaLocation(clazz, "SchemaBindingInitializerUnitTestCaseSimple.xsd");
      resolver.mapSchemaLocation(SimpleInitializer.NS, location);
      return resolver;
   }

   public void testSimple() throws Exception
   {
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

   public void testComplexInclude() throws Exception
   {
      MultiClassSchemaResolver resolver = new MultiClassSchemaResolver();
      URL url = getClass().getResource("/xml/SchemaIncludeUnitTestCase.xsd");
      assertNotNull(url);
      resolver.mapSchemaLocation("urn:jbosstest:schemainclude", url.toString());
      Util.loadSchema(url.toString(), resolver);
   }

   public SchemaIncludeUnitTestCase(String name)
   {
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

   {
      Class<?> clazz = SchemaBindingInitializerUnitTestCase.class;
      MultiClassSchemaResolver resolver = new MultiClassSchemaResolver();
      resolver.mapSchemaInitializer(SimpleInitializer.NS, SimpleInitializer.class.getName());
      String location = getSchemaLocation(clazz, "SchemaBindingInitializerUnitTestCaseSimple.xsd");
      resolver.mapSchemaLocation(SimpleInitializer.NS, location);
      resolver.mapSchemaInitializer(ContainerInitializer.NS, ContainerInitializer.class.getName());
      location = getSchemaLocation(clazz, "SchemaBindingInitializerUnitTestCaseContainer.xsd");
      resolver.mapSchemaLocation(ContainerInitializer.NS, location);
      return resolver;
   }
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

      resolver.mapSchemaInitializer(SimpleInitializer.NS, SimpleInitializer.class.getName());
      String location = getSchemaLocation(clazz, "SchemaBindingInitializerUnitTestCaseSimple.xsd");
      resolver.mapSchemaLocation(SimpleInitializer.NS, location);
      resolver.mapSchemaInitializer(ContainerInitializer.NS, ContainerInitializer.class.getName());
      location = getSchemaLocation(clazz, "SchemaBindingInitializerUnitTestCaseContainer.xsd");
      resolver.mapSchemaLocation(ContainerInitializer.NS, location);
      return resolver;
   }

   public void testSimple() throws Exception
   {
View Full Code Here

Examples of org.jboss.xb.binding.resolver.MultiClassSchemaResolver.mapSchemaLocation()

      {
         String testXsd = findXML(rootName + ".xsd");

         MultiClassSchemaResolver resolver = new MultiClassSchemaResolver();
         String xmimeXsd = getSchemaLocation(getClass(), "xmlmime.xsd");
         resolver.mapSchemaLocation("http://www.w3.org/2005/05/xmlmime", xmimeXsd);

         SCHEMA = XsdBinder.bind(testXsd, resolver);
         SCHEMA.setIgnoreUnresolvedFieldOrClass(false);

         TermBeforeSetParentCallback callback = new TermBeforeSetParentCallback()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.