Package org.jboss.xb.binding.sunday.unmarshalling

Examples of org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver


         Method method = clazz.getMethod("initResolver", null);
         defaultResolver = (SchemaBindingResolver) method.invoke(null, null);
      }
      catch (NoSuchMethodException ignored)
      {
         defaultResolver = new DefaultSchemaResolver();
      }
   }
View Full Code Here


         log.trace("assertEquivalent: " + xsdName + ", " + cls);
     
      URL xsdUrl = Thread.currentThread().getContextClassLoader().getResource("schema/" + xsdName);
      assertNotNull(xsdUrl);

      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
      resolver.addClassBindingForLocation(xsdName, cls);
      SchemaBinding binding = resolver.resolve("", null, xsdName);

      XSModel xsModel = Util.loadSchema(xsdUrl.openStream(), null, resolver);

      assertEquivalent(xsModel, binding);
   }
View Full Code Here

      }
   }
  
   public static SchemaBindingResolver initResolverJavaEE(Class<?> clazz, String xsd)
   {
      DefaultSchemaResolver resolver = initResolverJavaEE(clazz);
      String xsdPath = findXSD(xsd);
      resolver.addSchemaLocation(JavaEEMetaDataConstants.JAVAEE_NS, xsdPath);
      return resolver;
   }
View Full Code Here

      return resolver;
   }

   public static DefaultSchemaResolver initResolverJavaEE(Class<?> clazz)
   {
      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
      SchemaBindingInitializer initializer = JBossXBBuilder.newInitializer(clazz);
      resolver.addSchemaInitializer(JavaEEMetaDataConstants.JAVAEE_NS, initializer);
      resolver.addSchemaParseAnnotations(JavaEEMetaDataConstants.JAVAEE_NS, Boolean.FALSE);
      return resolver;
   }
View Full Code Here

      return resolver;
   }

   public static DefaultSchemaResolver initResolverJ2EE(Class<?> clazz)
   {
      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
      SchemaBindingInitializer initializer = JBossXBBuilder.newInitializer(clazz);
      resolver.addSchemaInitializer(JavaEEMetaDataConstants.J2EE_NS, initializer);
      resolver.addSchemaParseAnnotations(JavaEEMetaDataConstants.J2EE_NS, Boolean.FALSE);
      return resolver;
   }
View Full Code Here

         Method method = clazz.getMethod("initResolver");
         defaultResolver = (SchemaBindingResolver) method.invoke(null);
      }
      catch (NoSuchMethodException ignored)
      {
         defaultResolver = new DefaultSchemaResolver();
      }
   }
View Full Code Here

         catch (NoSuchMethodException ignored)
         {
         }
         test = test.getSuperclass();
      }
      defaultResolver = new DefaultSchemaResolver();
   }
View Full Code Here

      super(name);
   }

   public void testJavaBeanSchemaInitializerInterceptor() throws Exception
   {
      DefaultSchemaResolver resolver = new DefaultSchemaResolver();
      JavaBeanSchemaInitializer si = new JavaBeanSchemaInitializer();
      resolver.addSchemaInitializer("urn:jboss:simplejavabean:1.0", si);
      resolver.addSchemaLocation("urn:jboss-test:xmbean:2.0", "xml/mbeanserver/jboss_xmbean_2_0.xsd");
      resolver.addSchemaLocation("urn:jboss:simplejavabean:1.0", "xml/mbeanserver/simplejavabean_1_0.xsd");

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      String xmlPath = getResourcePath("xml/mbeanserver/testXMBean2.xml");
      Object root = unmarshaller.unmarshal(xmlPath, resolver);
View Full Code Here

         Method method = clazz.getMethod("initResolver", null);
         defaultResolver = (SchemaBindingResolver) method.invoke(null, null);
      }
      catch (NoSuchMethodException ignored)
      {
         defaultResolver = new DefaultSchemaResolver();
      }
   }
View Full Code Here

         Method method = clazz.getMethod("initResolver", (Class[]) null);
         defaultResolver = (SchemaBindingResolver) method.invoke(null, (Object[]) null);
      }
      catch (NoSuchMethodException ignored)
      {
         defaultResolver = new DefaultSchemaResolver();
      }
   }
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver

Copyright © 2018 www.massapicom. 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.