org.apache.xml.security.transforms.TransformationException Java Examples

The following examples show how to use org.apache.xml.security.transforms.TransformationException. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XmlSignatureBuilder.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private static Transforms transforms(List<String> tranformerList, Document doc) throws TransformationException {
   Transforms baseDocTransform = new Transforms(doc);
   Iterator i$ = tranformerList.iterator();

   while(i$.hasNext()) {
      String transform = (String)i$.next();
      baseDocTransform.addTransform(transform);
   }

   return baseDocTransform;
}
 
Example #2
Source File: XmlSignatureBuilder.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private static Transforms transforms(List<String> tranformerList, Document doc) throws TransformationException {
   Transforms baseDocTransform = new Transforms(doc);
   Iterator i$ = tranformerList.iterator();

   while(i$.hasNext()) {
      String transform = (String)i$.next();
      baseDocTransform.addTransform(transform);
   }

   return baseDocTransform;
}
 
Example #3
Source File: XmlSignatureBuilder.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private static Transforms transforms(List<String> tranformerList, Document doc) throws TransformationException {
   Transforms baseDocTransform = new Transforms(doc);
   Iterator i$ = tranformerList.iterator();

   while(i$.hasNext()) {
      String transform = (String)i$.next();
      baseDocTransform.addTransform(transform);
   }

   return baseDocTransform;
}
 
Example #4
Source File: XmlSignatureBuilder.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private static Transforms transforms(List<String> tranformerList, Document doc) throws TransformationException {
   Transforms baseDocTransform = new Transforms(doc);
   Iterator i$ = tranformerList.iterator();

   while(i$.hasNext()) {
      String transform = (String)i$.next();
      baseDocTransform.addTransform(transform);
   }

   return baseDocTransform;
}
 
Example #5
Source File: XmlSignatureBuilder.java    From freehealth-connector with GNU Affero General Public License v3.0 5 votes vote down vote up
private static Transforms transforms(List<String> tranformerList, Document doc) throws TransformationException {
   Transforms baseDocTransform = new Transforms(doc);
   Iterator i$ = tranformerList.iterator();

   while(i$.hasNext()) {
      String transform = (String)i$.next();
      baseDocTransform.addTransform(transform);
   }

   return baseDocTransform;
}
 
Example #6
Source File: TransformUtils.java    From xades4j with GNU Lesser General Public License v3.0 5 votes vote down vote up
/**
 * Creates a Transforms element for a given set of algorithms
 * @param document the target XML document
 * @param algorithmsParametersMarshaller algorithm parameters marshaller
 * @param algorithms algorithms
 * @return the Transforms
 * @throws UnsupportedAlgorithmException if an algorithm is not supported
 */
public static Transforms createTransforms(
        Document document,
        AlgorithmsParametersMarshallingProvider algorithmsParametersMarshaller,
        Iterable<Algorithm> algorithms) throws UnsupportedAlgorithmException
{
    Transforms transforms = new Transforms(document);

    for (Algorithm t : algorithms)
    {
        try
        {
            List<Node> params = algorithmsParametersMarshaller.marshalParameters(t, document);
            if (null == params)
            {
                transforms.addTransform(t.getUri());
            }
            else
            {
                transforms.addTransform(t.getUri(), DOMHelper.nodeList(params));
            }
        }
        catch (TransformationException ex)
        {
            throw new UnsupportedAlgorithmException(
                    "Unsupported transform on XML Signature provider",
                    t.getUri(), ex);
        }
    }
    return transforms;
}