Package org.apache.xml.security.utils.resolver

Examples of org.apache.xml.security.utils.resolver.ResourceResolver


    * @param resolverSpi the implemenatin subclass of {@link ResourceResolverSpi} for retrieving resource.
    */
   public void addResourceResolver(ResourceResolverSpi resolverSpi) {

      if (resolverSpi != null) {
         this._perManifestResolvers.add(new ResourceResolver(resolverSpi));
      }
   }
View Full Code Here


         Attr uri = rm.getURIAttr();

         // type can be null because it's optional
         String type = rm.getType();
         Transforms transforms = rm.getTransforms();
         ResourceResolver resRes = ResourceResolver.getInstance(uri, BaseURI);

         if (resRes != null) {
            XMLSignatureInput resource = resRes.resolve(uri, BaseURI);

            log.debug("Before applying Transforms, resource has "
                      + resource.getBytes().length + "bytes");

            if (transforms != null) {
View Full Code Here

         Attr uri = rm.getURIAttr();
         Transforms transforms = rm.getTransforms();

         log.debug("Asked to resolve URI " + uri);

         ResourceResolver resRes = ResourceResolver.getInstance(uri, BaseURI);

         if (resRes != null) {
            XMLSignatureInput resource = resRes.resolve(uri, BaseURI);

            log.debug("Before applying Transforms, resource has "
                      + resource.getBytes().length + "bytes");

            if (transforms != null) {
View Full Code Here

      Attr uriAttr = cr.getURIAsAttr();
      XMLSignatureInput input = null;

      try {
        ResourceResolver resolver =
          ResourceResolver.getInstance(uriAttr, null);
        input = resolver.resolve(uriAttr, null);
      } catch (ResourceResolverException ex) {
        throw new XMLEncryptionException("empty", ex);
      } catch (XMLSecurityException ex) {
        throw new XMLEncryptionException("empty", ex);
      }
View Full Code Here

        Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        Attr uri = doc.createAttribute("id");
        uri.setNodeValue("urn:ddd:uuu");
        ((Element) doc.createElement("test")).setAttributeNode(uri);
        try {
            ResourceResolver resolver = ResourceResolver.getInstance(uri, null);
            fail("No exception thrown, but resolver found: " + resolver);
        } catch (ResourceResolverException e) {
            //
        }
    }
View Full Code Here

        throws ReferenceNotInitializedException {
        try {
            Attr uriAttr =
                this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

            ResourceResolver resolver =
                ResourceResolver.getInstance(
                    uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
                );
            resolver.addProperties(this.manifest.getResolverProperties());

            return resolver.resolve(uriAttr, this.baseURI);
        catch (ResourceResolverException ex) {
            throw new ReferenceNotInitializedException("empty", ex);
        }
    }
View Full Code Here

        RetrievalMethod rm, String baseURI, boolean secureValidation
    ) throws XMLSecurityException {
        Attr uri = rm.getURIAttr();
        // Apply the transforms
        Transforms transforms = rm.getTransforms();
        ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
        XMLSignatureInput resource = resRes.resolve(uri, baseURI);
        if (transforms != null) {
            if (log.isDebugEnabled()) {
                log.debug("We have Transforms");
            }
            resource = transforms.performTransforms(resource);
View Full Code Here

     * @return
     * @throws XMLSecurityException
     */
   private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
        throws XMLSecurityException {
        ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
        XMLSignatureInput resource = resRes.resolve(uri, baseURI);
        return resource;
    }
View Full Code Here

     * @return
     * @throws XMLSecurityException
     */
    private XMLSignatureInput resolveInput(Attr uri, String baseURI, boolean secureValidation)
        throws XMLSecurityException {
        ResourceResolver resRes = ResourceResolver.getInstance(uri, baseURI, secureValidation);
        XMLSignatureInput resource = resRes.resolve(uri, baseURI);
        return resource;
    }
View Full Code Here

        throws ReferenceNotInitializedException {
        try {
            Attr uriAttr =
                this.constructionElement.getAttributeNodeNS(null, Constants._ATT_URI);

            ResourceResolver resolver =
                ResourceResolver.getInstance(
                    uriAttr, this.baseURI, this.manifest.getPerManifestResolvers(), secureValidation
                );
            resolver.addProperties(this.manifest.getResolverProperties());

            return resolver.resolve(uriAttr, this.baseURI);
        catch (ResourceResolverException ex) {
            throw new ReferenceNotInitializedException("empty", ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.utils.resolver.ResourceResolver

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.