Refactored Signature signing/validation, various Validator bugs fixed.
[shibboleth/cpp-xmltooling.git] / xmltooling / io / AbstractXMLObjectMarshaller.h
index f52ae1c..18d9056 100644 (file)
@@ -40,9 +40,19 @@ namespace xmltooling {
     public:\r
         virtual ~AbstractXMLObjectMarshaller() {}\r
 \r
-        DOMElement* marshall(DOMDocument* document=NULL, MarshallingContext* ctx=NULL) const;\r
+        DOMElement* marshall(\r
+            DOMDocument* document=NULL\r
+#ifndef XMLTOOLING_NO_XMLSEC\r
+            ,const std::vector<xmlsignature::Signature*>* sigs=NULL\r
+#endif\r
+            ) const;\r
 \r
-        DOMElement* marshall(DOMElement* parentElement, MarshallingContext* ctx=NULL) const;\r
+        DOMElement* marshall(\r
+            DOMElement* parentElement\r
+#ifndef XMLTOOLING_NO_XMLSEC\r
+            ,const std::vector<xmlsignature::Signature*>* sigs=NULL\r
+#endif\r
+            ) const;\r
         \r
     protected:\r
         AbstractXMLObjectMarshaller() {}\r
@@ -57,7 +67,7 @@ namespace xmltooling {
         void setDocumentElement(DOMDocument* document, DOMElement* element) const {\r
             DOMElement* documentRoot = document->getDocumentElement();\r
             if (documentRoot)\r
-                document->replaceChild(documentRoot, element);\r
+                document->replaceChild(element, documentRoot);\r
             else\r
                 document->appendChild(element);\r
         }\r
@@ -72,7 +82,12 @@ namespace xmltooling {
          * @throws MarshallingException thrown if there is a problem marshalling the object\r
          * @throws SignatureException thrown if a problem occurs during signature creation \r
          */\r
-        void marshallInto(DOMElement* targetElement, MarshallingContext* ctx) const;\r
+        void marshallInto(\r
+            DOMElement* targetElement\r
+#ifndef XMLTOOLING_NO_XMLSEC\r
+            ,const std::vector<xmlsignature::Signature*>* sigs\r
+#endif\r
+            ) const;\r
     \r
         /**\r
          * Creates an xsi:type attribute, corresponding to the given type of the XMLObject, on the DOM element.\r