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

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


      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);
      }

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


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

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

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

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

                return new ApacheNodeSetData(result);
            }
        }

        try {
            ResourceResolver apacheResolver =
                ResourceResolver.getInstance(uriAttr, baseURI, secVal);
            XMLSignatureInput in = apacheResolver.resolve(uriAttr, baseURI, secVal);
            if (in.isOctetStream()) {
                return new ApacheOctetStreamData(in);
            } else {
                return new ApacheNodeSetData(in);
            }
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);
        return resRes.resolve(uri, baseURI, secureValidation);
    }
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, secureValidation);
        if (transforms != null) {
            if (log.isDebugEnabled()) {
                log.debug("We have Transforms");
            }
            resource = transforms.performTransforms(resource);
View Full Code Here

            return;
        }
        if (perManifestResolvers == null) {
            perManifestResolvers = new ArrayList<ResourceResolver>();
        }
        perManifestResolvers.add(new ResourceResolver(resolverSpi));
    }
View Full Code Here

        throws ReferenceNotInitializedException {
        try {
            Attr uriAttr =
                getElement().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, secureValidation);
        catch (ResourceResolverException ex) {
            throw new ReferenceNotInitializedException("empty", ex);
        }
    }
View Full Code Here

            //to be signed too, that include role information.
            sig.appendObject(object);
            sig.addDocument("#prop", transforms,
                SignerConstants.DIGEST_METHOD_ALGORITHM);

            ResourceResolver offlineResolver = null;
            sig.addResourceResolver(offlineResolver);

            {
                X509Certificate cert = (X509Certificate) ks
                    .getCertificate(certificateAlias);
View Full Code Here

            URI = null;
         } else {
            URI = URIAttr.getNodeValue();
         }

         ResourceResolver resolver = ResourceResolver.getInstance(URIAttr,
            this._baseURI, this._manifest._perManifestResolvers);

         if (resolver == null) {
            Object exArgs[] = { URI };

            throw new ReferenceNotInitializedException(
               "signature.Verification.Reference.NoInput", exArgs);
         }

         resolver.addProperties(this._manifest._resolverProperties);

         XMLSignatureInput input = resolver.resolve(URIAttr, this._baseURI);

         this._transformsInput = new XMLSignatureInput(input.getBytes());

         this._transformsInput.setSourceURI(input.getSourceURI());
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.