Package org.jboss.util.xml

Examples of org.jboss.util.xml.JBossEntityResolver


         InputStream stream = url.openStream();
         try
         {
            InputSource is = new InputSource(stream);
            is.setSystemId(url.toString());
            parser.setEntityResolver(new JBossEntityResolver());

            Document document = parser.parse(is);
            element = document.getDocumentElement();
         }
         finally
View Full Code Here


      try
      {
        
         InputSource is = new InputSource(reader);
//         is.setSystemId(url.toString());
         parser.setEntityResolver(new JBossEntityResolver());
  
         Document document = parser.parse(is);
         return document.getDocumentElement();
      }
      finally
View Full Code Here

      }

      boolean valid;
      try
      {
         parse(is, new JBossEntityResolver());
         valid = true;
      }
      catch (JBossXBRuntimeException e)
      {
         valid = false;
View Full Code Here

      available to the entity resolver via some other configuration.
      */
      final URL url = Thread.currentThread().getContextClassLoader().getResource("xml/naming/");

      Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
      unmarshaller.setEntityResolver(new JBossEntityResolver(){
         public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException
         {
            if(systemId.endsWith("custom-object-binding.xsd") ||
               systemId.endsWith("jndi-binding-service_1_0.xsd"))
            {
View Full Code Here

      URL url = Thread.currentThread().getContextClassLoader().getResource(resource);
      // The input source
      InputSource input = new InputSource(url.openStream());
      input.setSystemId(url.toURI().toString());
      XMLReader reader = XMLReaderFactory.createXMLReader();
      reader.setEntityResolver(new JBossEntityResolver());
      SAXSource source = new SAXSource(reader, input);
      // New JAXB context
      JAXBContext context = JAXBContext.newInstance(ManagedConnectionFactoryDeploymentGroup.class);
      Unmarshaller um = context.createUnmarshaller();
      // Unmarshal
View Full Code Here

   private String baseURI;
   private JBossEntityResolver resolver;

   public DefaultSchemaResolver()
   {
      this(new JBossEntityResolver());
   }
View Full Code Here

      parser.setFeature(SCHEMA_VALIDATION, true);
      parser.setFeature(SCHEMA_FULL_CHECKING, true);
      parser.setFeature(DYNAMIC_VALIDATION, true);
      parser.setFeature(NAMESPACES, true);

      parser.setEntityResolver(new JBossEntityResolver());
   }
View Full Code Here

         throw new JBossXBException("Failed to get parser's XMLReader", e);
      }

      reader.setContentHandler(new DelegatingContentHandler());
      reader.setErrorHandler(new MetaDataErrorHandler());
      reader.setEntityResolver(new JBossEntityResolver());

      setFeature(Unmarshaller.VALIDATION, true);
      setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
      setFeature(Unmarshaller.SCHEMA_FULL_CHECKING, true);
      setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
View Full Code Here

      parser.setFeature(SCHEMA_VALIDATION, true);
      parser.setFeature(SCHEMA_FULL_CHECKING, true);
      parser.setFeature(DYNAMIC_VALIDATION, true);
      parser.setFeature(NAMESPACES, true);

      parser.setEntityResolver(new JBossEntityResolver());
   }
View Full Code Here

         throw new JBossXBException("Failed to get parser's XMLReader", e);
      }

      reader.setContentHandler(new DelegatingContentHandler());
      reader.setErrorHandler(new MetaDataErrorHandler());
      reader.setEntityResolver(new JBossEntityResolver());

      setFeature(Unmarshaller.VALIDATION, true);
      setFeature(Unmarshaller.SCHEMA_VALIDATION, true);
      setFeature(Unmarshaller.SCHEMA_FULL_CHECKING, true);
      setFeature(Unmarshaller.DYNAMIC_VALIDATION, true);
View Full Code Here

TOP

Related Classes of org.jboss.util.xml.JBossEntityResolver

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.