Examples of SchemaBinding


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

   public EjbJar21MetaData getEJBMetaData(InputStream ejbJarXml)
      throws JBossXBException
   {
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      SchemaBinding schema = JBossXBBuilder.build(EjbJar21MetaData.class);
      JBossEntityResolver entityResolver = new JBossEntityResolver();
      unmarshaller.setEntityResolver(entityResolver);

      return (EjbJar21MetaData) unmarshaller.unmarshal(ejbJarXml, schema);
   }
View Full Code Here

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

   public WebMetaData getWebMetaData(InputStream webxml)
      throws JBossXBException
   {
      UnmarshallerFactory unmarshallerFactory = UnmarshallerFactory.newInstance();
      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
      SchemaBinding schema = JBossXBBuilder.build(Web24MetaData.class);
      JBossEntityResolver entityResolver = new JBossEntityResolver();
      unmarshaller.setEntityResolver(entityResolver);

      return (WebMetaData) unmarshaller.unmarshal(webxml, schema);
   }
View Full Code Here

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

public class ServerMetaDataUniTestCase extends TestCase
{

   public void test() throws Exception
   {
      SchemaBinding schema = JBossXBBuilder.build(ServerMetaData.class);
      Unmarshaller u = UnmarshallerFactory.newInstance().newUnmarshaller();
      u.setSchemaValidation(false);
      u.setValidation(false);
      u.setEntityResolver(new JBossEntityResolver());
View Full Code Here

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

      SecurityActions.setContextClassLoader(this.getClass().getClassLoader());
     
      ContextMetaData contextMetaData = null;
      try
      {
         SchemaBinding schema = JBossXBBuilder.build(ContextMetaData.class);
         Unmarshaller u = UnmarshallerFactory.newInstance().newUnmarshaller();
         u.setSchemaValidation(false);
         u.setValidation(false);
         u.setEntityResolver(new JBossEntityResolver());
        
View Full Code Here

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

      String objectNameS = tomcatDeployer.getDomain() + ":type=Catalina";
      ObjectName objectName = new ObjectName(objectNameS);

      // Parse main server.xml
      // FIXME: this could be done somewhere else
      SchemaBinding schema = JBossXBBuilder.build(ServerMetaData.class);
      Unmarshaller u = UnmarshallerFactory.newInstance().newUnmarshaller();
      u.setSchemaValidation(false);
      u.setValidation(false);
      u.setEntityResolver(new JBossEntityResolver());
      InputStream is = null;
View Full Code Here

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

   protected void processContextConfig(String resourceName, boolean local)
   {
      ContextMetaData contextMetaData = null;
      try
      {
         SchemaBinding schema = JBossXBBuilder.build(ContextMetaData.class);
         Unmarshaller u = UnmarshallerFactory.newInstance().newUnmarshaller();
         u.setSchemaValidation(false);
         u.setValidation(false);
         u.setEntityResolver(new JBossEntityResolver());
        
View Full Code Here

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

      String objectNameS = tomcatDeployer.getDomain() + ":type=Catalina";
      ObjectName objectName = new ObjectName(objectNameS);

      // Parse main server.xml
      // FIXME: this could be done somewhere else
      SchemaBinding schema = JBossXBBuilder.build(ServerMetaData.class);
      Unmarshaller u = UnmarshallerFactory.newInstance().newUnmarshaller();
      u.setSchemaValidation(false);
      u.setValidation(false);
      u.setEntityResolver(new JBossEntityResolver());
      InputStream is = null;
View Full Code Here

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

         webXml = this.getClass().getClassLoader().getResource("conf/web.xml");
      }
      if (webXml == null)
         throw new IllegalStateException("Unable to find shared web.xml or conf/web.xml");

      SchemaBinding schema = JBossXBBuilder.build(Web25MetaData.class);
      Web25MetaData confWebMD = (Web25MetaData) unmarshaller.unmarshal(webXml.toString(), schema);
      sharedMetaData = new JBoss50WebMetaData();
      sharedMetaData.merge(null, confWebMD);
   }
View Full Code Here

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

      assertEquals("\n      newline, 6 spaces, newline, 3 spaces\n   ", top.string.get(1));
   }

   public void testWhitespaceMarshalling() throws Exception
   {
      SchemaBinding schema = XsdBinder.bind(new StringReader(XSD), null);

      schema.setIgnoreUnresolvedFieldOrClass(false);
      schema.setIgnoreWhitespacesInMixedContent(false);

      ClassMetaData classMetaData = new ClassMetaData();
      classMetaData.setImpl(Top.class.getName());
      ElementBinding element = schema.getElement(new QName(NS, "top"));
      assertNotNull(element);
      element.setClassMetaData(classMetaData);
     
      Top top = new Top();
      top.string = new ArrayList();
View Full Code Here

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

   {
   }

   public void testUnmarshalling() throws Exception
   {
      SchemaBinding schema = XsdBinder.bind(new StringReader(PO_XSD), null, SCHEMA_RESOLVER);
      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      Object o = unmarshaller.unmarshal(new StringReader(PO_XML), schema);
      assertEquals(PurchaseOrder.INSTANCE, o);
   }
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.