Make cannonical serialization the default
authorgilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 17 May 2005 00:28:33 +0000 (00:28 +0000)
committergilbert <gilbert@ab3bd59b-922f-494d-bb5f-6f0a3c29deca>
Tue, 17 May 2005 00:28:33 +0000 (00:28 +0000)
git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@1490 ab3bd59b-922f-494d-bb5f-6f0a3c29deca

src/edu/internet2/middleware/shibboleth/xml/Parser.java
tests/edu/internet2/middleware/shibboleth/aa/arp/ArpTests.java

index 8ae7d5b..94f76d5 100644 (file)
@@ -202,7 +202,7 @@ public class Parser {
      * @param dom The DOM tree to write
      * @return A string containing the XML in character form.
      */
-    public static String serialize(Node dom) {
+    public static String jaxpSerialize(Node dom) {
         String ret = null;
         
         TransformerFactory factory = TransformerFactory.newInstance();
@@ -231,7 +231,7 @@ public class Parser {
      * @exception  java.io.IOException  Raised if an I/O problem is detected
      * @exception  SAMLException Raised if the object is incompletely defined 
      */
-    public static String serializeC14N(Node root){
+    public static String serialize(Node root){
        byte[] bs = null;
         try
         {
index 823725b..d083c15 100755 (executable)
@@ -516,9 +516,9 @@ public class ArpTests extends TestCase {
 
                        InputStream inStream = new FileInputStream("data/arp.site.xml");
                        parser.parse(new InputSource(inStream));
-                       String directXML = Parser.serializeC14N(parser.getDocument().getDocumentElement());
+                       String directXML = Parser.serialize(parser.getDocument().getDocumentElement());
 
-                       String processedXML = Parser.serializeC14N(siteArp.unmarshall());
+                       String processedXML = Parser.serialize(siteArp.unmarshall());
 
                        assertTrue(
                                "File-based ARP Repository did not return the correct site ARP.",
@@ -529,9 +529,9 @@ public class ArpTests extends TestCase {
 
                        inStream = new FileInputStream("data/arp.user.test.xml");
                        parser.parse(new InputSource(inStream));
-                       directXML = Parser.serializeC14N(parser.getDocument().getDocumentElement());
+                       directXML = Parser.serialize(parser.getDocument().getDocumentElement());
 
-                       processedXML = Parser.serializeC14N(userArp.unmarshall());
+                       processedXML = Parser.serialize(userArp.unmarshall());
 
                        assertTrue(
                                "File-based ARP Repository did not return the correct user ARP.",
@@ -664,12 +664,12 @@ public class ArpTests extends TestCase {
 
                                InputStream inStream = new FileInputStream(arpExamples[i]);
                                parser.parse(new InputSource(inStream));
-                               String directXML = Parser.serializeC14N(parser.getDocument().getDocumentElement());
+                               String directXML = Parser.serialize(parser.getDocument().getDocumentElement());
 
                                Arp arp1 = new Arp();
                                arp1.marshall(parser.getDocument().getDocumentElement());
 
-                               String processedXML = Parser.serializeC14N(arp1.unmarshall());
+                               String processedXML = Parser.serialize(arp1.unmarshall());
 
                                assertTrue(
                                        "Round trip marshall/unmarshall failed for file (" + arpExamples[i] + ")",