Examples of resolveEntity()


Examples of org.apache.ws.commons.schema.resolver.URIResolver.resolveEntity()

        return name; // Fot the time being
    }

    public ISchemaResolver resolve(String loc, String tns) throws IOException {
        URIResolver resolver = collection.getXmlSchemaCollection().getSchemaResolver();
        InputSource source = resolver.resolveEntity(tns, loc, id);
       
        SchemaCollection schemaCol = new SchemaCollection();
        schemaCol.setSchemaResolver(resolver);
        XmlSchema read = schemaCol.getXmlSchemaCollection().read(source);
       
View Full Code Here

Examples of org.apache.xerces.xni.parser.XMLEntityResolver.resolveEntity()

    while (entityResolverIter.hasNext())
    {
      XMLEntityResolver entityResolver = (XMLEntityResolver)entityResolverIter.next();
      try
      {
        is = entityResolver.resolveEntity(xmlResourceIdentifier);
      }
      catch (XNIException e)
      {
      }
      catch (IOException e)
View Full Code Here

Examples of org.apache.xerces.xni.parser.XMLEntityResolver.resolveEntity()

    while (entityResolverIter.hasNext())
    {
      XMLEntityResolver entityResolver = (XMLEntityResolver)entityResolverIter.next();
      try
      {
        is = entityResolver.resolveEntity(xmlResourceIdentifier);
      }
      catch (XNIException e)
      {
      }
      catch (IOException e)
View Full Code Here

Examples of org.apache.xml.resolver.Catalog.resolveEntity()

    } else if (resType == Catalog.ENTITY) {
      System.out.println("Resolve ENTITY (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveEntity(name, publicId, systemId);
    } else if (resType == Catalog.NOTATION) {
      System.out.println("Resolve NOTATION (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
View Full Code Here

Examples of org.apache.xml.resolver.Catalog.resolveEntity()

    } else if (resType == Catalog.ENTITY) {
      System.out.println("Resolve ENTITY (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveEntity(name, publicId, systemId);
    } else if (resType == Catalog.NOTATION) {
      System.out.println("Resolve NOTATION (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
View Full Code Here

Examples of org.apache.xml.resolver.Catalog.resolveEntity()

    } else if (resType == Catalog.ENTITY) {
      System.out.println("Resolve ENTITY (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
      result = resolver.resolveEntity(name, publicId, systemId);
    } else if (resType == Catalog.NOTATION) {
      System.out.println("Resolve NOTATION (name, publicid, systemid):");
      if (name != null) { System.out.println("       name: " + name); }
      if (publicId != null) { System.out.println("  public id: " + publicId); }
      if (systemId != null) { System.out.println("  system id: " + systemId); }
View Full Code Here

Examples of org.apache.xml.resolver.tools.CatalogResolver.resolveEntity()

    public static XMLResolver getXMLResolver(final String[] catalogs) {
        final CatalogResolver catalogResolver = XMLUtil.getEntityResolver(catalogs);
        final XMLResolver resolver = new XMLResolver() {
            public Object resolveEntity(final String publicID, final String systemID, final String baseURI,
                    final String namespace) throws XMLStreamException {
                final InputSource inputSource = catalogResolver.resolveEntity(publicID, systemID);
                return inputSource.getByteStream();
            }
        };
        return resolver;
    }
View Full Code Here

Examples of org.apache.xml.security.test.dom.resource.TestVectorResolver.resolveEntity()

        DocumentBuilder db = XMLUtils.createDocumentBuilder(false);
        org.xml.sax.EntityResolver resolver = new TestVectorResolver();

        db.setEntityResolver(resolver);

        Document doc = db.parse(resolver.resolveEntity(null, fileIn));

        String xpath = "(//. | //@* | //namespace::*)"
            + "[ "
            + "self::ietf:e1 or "
            + "(parent::ietf:e1 and not(self::text() or self::e2)) or "
View Full Code Here

Examples of org.apache.xml.security.test.dom.resource.TestVectorResolver.resolveEntity()

        NodeList nodes = (NodeList)xPath.evaluate(xpath, doc, XPathConstants.NODESET);
        Canonicalizer c14n =
            Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS);
        byte c14nBytes[] = c14n.canonicalizeXPathNodeSet(nodes);
        InputStream refStream = resolver.resolveEntity(null,
                                                       fileRef).getByteStream();
        byte refBytes[] = JavaUtils.getBytesFromStream(refStream);
        assertEquals(new String(refBytes),new String(c14nBytes));
    }
View Full Code Here

Examples of org.apache.xml.security.test.dom.resource.TestVectorResolver.resolveEntity()

        Canonicalizer c14n =
            Canonicalizer.getInstance(Canonicalizer.ALGO_ID_C14N_OMIT_COMMENTS);
        byte c14nBytes[] = c14n.canonicalize(utf16);
        org.xml.sax.EntityResolver resolver = new TestVectorResolver();
        InputStream refStream =
            resolver.resolveEntity(
                null, prefix + "/in/testTranslationFromUTF16toUTF8.xml").getByteStream();
        byte refBytes[] = JavaUtils.getBytesFromStream(refStream);
        boolean equal = java.security.MessageDigest.isEqual(refBytes, c14nBytes);

        assertTrue("Parser does not translate to UCS character domain", equal);
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.