Package org.apache.xml.security.signature

Examples of org.apache.xml.security.signature.XMLSignatureInput


    */
   public XMLSignatureInput performTransform(XMLSignatureInput input, OutputStream os)
   throws IOException, CanonicalizationException,
          InvalidCanonicalizerException, TransformationException {

         XMLSignatureInput result = null;

         try {
           result = transformSpi.enginePerformTransform(input,os);
         } catch (ParserConfigurationException ex) {
           Object exArgs[] = { this.getURI(), "ParserConfigurationException" };
View Full Code Here


           c14n.setWriter(os);
         }
         byte[] result = null;               
         input.setNeedsToBeExpanded(true);
         result=c14n.engineCanonicalize(input);                                
         XMLSignatureInput output=new XMLSignatureInput(result);
         if (os!=null) {
            output.setOutputStream(os);
         }
         return output;    
   }
View Full Code Here

           c14n.setWriter( os);
        }
        input.setNeedsToBeExpanded(true);
        byte []result; 
        result =c14n.engineCanonicalize(input, inclusiveNamespaces);
        XMLSignatureInput output=new XMLSignatureInput(result);
       
        return output;
     } catch (XMLSecurityException ex) {
        throw new CanonicalizationException("empty", ex);
     }
View Full Code Here

      org.apache.log4j.Category.getInstance(ResolverAnonymous.class.getName());

   private XMLSignatureInput _input = null;

   public ResolverAnonymous(String filename) throws FileNotFoundException, IOException {
      this._input = new XMLSignatureInput(new FileInputStream(filename));
   }
View Full Code Here

   public ResolverAnonymous(String filename) throws FileNotFoundException, IOException {
      this._input = new XMLSignatureInput(new FileInputStream(filename));
   }

   public ResolverAnonymous(InputStream is) throws IOException {
      this._input = new XMLSignatureInput(is);
   }
View Full Code Here

         throw new ResourceResolverException("generic.EmptyMessage", ex, uri,
                                             BaseURI);
      }

      Set resultSet = XMLUtils.convertNodelistToSet(resultNodes);
      XMLSignatureInput result = new XMLSignatureInput(resultSet, cXPathAPI);

      result.setMIMEType("text/xml");

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());

         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(BaseURI);
      }

      return result;
   }
View Full Code Here

         }

         cat.debug("Fetched " + summarized + " bytes from URI "
                   + uriNew.toString());

         XMLSignatureInput result = new XMLSignatureInput(baos.toByteArray());

         // XMLSignatureInput result = new XMLSignatureInput(inputStream);
         result.setSourceURI(uriNew.toString());
         result.setMIMEType(mimeType);

         // switch off proxy usage
         if (switchBackProxy) {
            System.getProperties().put("http.proxySet", oldProxySet);
            System.getProperties().put("http.proxyHost", oldProxyHost);
View Full Code Here

         String fileName =
            ResolverLocalFilesystem
               .translateUriToFilename(uriNewNoFrag.toString());
         FileInputStream inputStream = new FileInputStream(fileName);
         XMLSignatureInput result = new XMLSignatureInput(inputStream);

         result.setSourceURI(uriNew.toString());

         return result;
      } catch (Exception e) {
         throw new ResourceResolverException("generic.EmptyMessage", e, uri,
                                             BaseURI);
View Full Code Here

            }
         }
      }

      Set resultSet = XMLUtils.convertNodelistToSet(resultNodes);
      XMLSignatureInput result = new XMLSignatureInput(resultSet, cXPathAPI);

      // cat.debug("We return a nodeset with " + resultNodes.getLength() + " nodes");
      result.setMIMEType("text/xml");

      try {
         URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());

         result.setSourceURI(uriNew.toString());
      } catch (URI.MalformedURIException ex) {
         result.setSourceURI(BaseURI);
      }

      return result;
   }
View Full Code Here

                        BaseURI);
            }
        }

        Set resultSet = dereferenceSameDocumentURI(selectedElem);
        XMLSignatureInput result = new XMLSignatureInput(resultSet);
        result.setMIMEType("text/xml");
        try {
            URI uriNew = new URI(new URI(BaseURI), uri.getNodeValue());
            result.setSourceURI(uriNew.toString());
        } catch (URI.MalformedURIException ex) {
            result.setSourceURI(BaseURI);
        }
        if (tlog.isDebugEnabled()) {
            t1 = System.currentTimeMillis();
            tlog.debug("engineResolve= " + (t1 - t0));
        }
View Full Code Here

TOP

Related Classes of org.apache.xml.security.signature.XMLSignatureInput

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.