Completed SAML 1 assertion schema, started test cases.
authorScott Cantor <cantor.2@osu.edu>
Wed, 10 May 2006 03:12:31 +0000 (03:12 +0000)
committerScott Cantor <cantor.2@osu.edu>
Wed, 10 May 2006 03:12:31 +0000 (03:12 +0000)
90 files changed:
.cdtproject
cpp-opensaml2.sln
saml/SAMLConfig.h
saml/saml1/core/Assertions.h
saml/saml1/core/impl/AssertionsImpl.cpp
saml/saml1/core/impl/AssertionsSchemaValidators.cpp
samltest/.gitignore [new file with mode: 0644]
samltest/Makefile.am [new file with mode: 0644]
samltest/data/cert.pem [new file with mode: 0644]
samltest/data/key.pem [new file with mode: 0644]
samltest/data/saml1/core/impl/AdviceWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AssertionWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AttributeQueryWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AttributeWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AuthorizationDecisionQueryWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/ConditionsWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/EvidenceWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/FullStatus.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/FullStatusCode.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/FullStatusMessage.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/RequestWithQuery.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/ResponseWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/SubjectWithChildren.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAction.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleActionAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAdvice.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAssertion.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAssertionArtifact.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAssertionAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAssertionIDReference.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAssertionIDReferenceContents.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttribute.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeDesignator.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeQuery.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeStatement.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeValue.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAttributeValueContents.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAudience.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAudienceAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthenticationQuery.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthenticationStatement.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorityBinding.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorityBindingAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorizationDecisionQuery.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleConditions.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleConditionsAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleConfirmationMethod.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleDoNotCacheCondition.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleEvidence.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleNameIdentifier.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleNameIdentifierAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleRequest.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleRequestAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleResponse.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleResponseAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleStatus.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleStatusCode.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleStatusMessage.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleSubject.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleSubjectConfirmation.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleSubjectLocality.xml [new file with mode: 0644]
samltest/data/saml1/core/impl/singleSubjectLocalityAttributes.xml [new file with mode: 0644]
samltest/internal.h [new file with mode: 0644]
samltest/saml1/core/impl/ActionTest.cpp [new file with mode: 0644]
samltest/saml1/core/impl/ActionTest.h [new file with mode: 0644]
samltest/samltest.cpp [new file with mode: 0644]
samltest/samltest.h [new file with mode: 0644]
samltest/samltest.vcproj [new file with mode: 0644]

index 42e0853..abae0c2 100644 (file)
@@ -57,6 +57,7 @@
 <pathentry include="C:/xerces-c2_7_0-win32/include" kind="inc" path="" system="true"/>\r
 <pathentry include="C:/xml-security-c-1.2.0/include" kind="inc" path="" system="true"/>\r
 <pathentry include="C:/log4cpp-0.3.5rc1/include" kind="inc" path="" system="true"/>\r
+<pathentry include="C:/cxxtest" kind="inc" path="" system="true"/>\r
 <pathentry excluding="util/|saml1/core/|saml2/core/|saml2/metadata/|saml1/core/impl/" kind="src" path="saml"/>\r
 <pathentry kind="out" path=""/>\r
 <pathentry kind="con" path="org.eclipse.cdt.make.core.DISCOVERED_SCANNER_INFO"/>\r
@@ -65,6 +66,8 @@
 <pathentry kind="src" path="saml/saml2/core"/>\r
 <pathentry kind="src" path="saml/saml2/metadata"/>\r
 <pathentry kind="src" path="saml/saml1/core/impl"/>\r
+<pathentry excluding="saml1/core/impl/" kind="src" path="samltest"/>\r
+<pathentry kind="src" path="samltest/saml1/core/impl"/>\r
 </item>\r
 </data>\r
 </cdtproject>\r
index a6e1762..19f31bb 100644 (file)
@@ -3,6 +3,11 @@ Microsoft Visual Studio Solution File, Format Version 9.00
 # Visual Studio 2005\r
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "saml", "saml\saml.vcproj", "{34DE3EA5-EA05-4261-8B63-A850FFB91768}"\r
 EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "samltest", "samltest\samltest.vcproj", "{8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}"\r
+       ProjectSection(ProjectDependencies) = postProject\r
+               {34DE3EA5-EA05-4261-8B63-A850FFB91768} = {34DE3EA5-EA05-4261-8B63-A850FFB91768}\r
+       EndProjectSection\r
+EndProject\r
 Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                Debug|Win32 = Debug|Win32\r
@@ -13,6 +18,10 @@ Global
                {34DE3EA5-EA05-4261-8B63-A850FFB91768}.Debug|Win32.Build.0 = Debug|Win32\r
                {34DE3EA5-EA05-4261-8B63-A850FFB91768}.Release|Win32.ActiveCfg = Release|Win32\r
                {34DE3EA5-EA05-4261-8B63-A850FFB91768}.Release|Win32.Build.0 = Release|Win32\r
+               {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Debug|Win32.Build.0 = Debug|Win32\r
+               {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Release|Win32.ActiveCfg = Release|Win32\r
+               {8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}.Release|Win32.Build.0 = Release|Win32\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
index 2b3540f..cd9dfa1 100644 (file)
@@ -25,6 +25,8 @@
 \r
 #include <saml/base.h>\r
 #include <xmltooling/unicode.h>\r
+#include <xmltooling/XMLToolingConfig.h>\r
+\r
 #include <string>\r
 \r
 /**\r
index 23cb0ef..eb138ae 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <saml/exceptions.h>
 #include <saml/util/SAMLConstants.h>
+#include <xmltooling/AttributeExtensibleXMLObject.h>
 #include <xmltooling/ElementProxy.h>
 #include <xmltooling/SimpleElement.h>
 #include <xmltooling/XMLObjectBuilder.h>
@@ -44,6 +45,7 @@ namespace opensaml {
      */
     namespace saml1 {
         
+        // Forward references
         class SAML_API Assertion;
         
         DECL_XMLOBJECT_SIMPLE(SAML_API,AssertionIDReference,Reference,SAML 1.x AssertionIDReference element);
@@ -77,12 +79,25 @@ namespace opensaml {
         BEGIN_XMLOBJECT(SAML_API,NameIdentifier,xmltooling::SimpleElement,SAML 1.x NameIdentifier element);
             DECL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER);
             DECL_STRING_ATTRIB(Format,FORMAT);
+            DECL_XMLOBJECT_CONTENT(Name);
             /** NameIdentifierType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
-        BEGIN_XMLOBJECT(SAML_API,SubjectConfirmationData,xmltooling::ElementProxy,SAML 1.x SubjectConfirmationData element);
-        END_XMLOBJECT;
+        /** SAML 1.x SubjectConfirmationData element */
+        class SAML_API SubjectConfirmationData : public virtual xmltooling::ElementProxy,
+            public virtual xmltooling::AttributeExtensibleXMLObject,
+            public virtual xmltooling::ValidatingXMLObject
+        {
+        protected:
+            SubjectConfirmationData() {}
+        public:
+            virtual ~SubjectConfirmationData() {}
+            /** Type-specific clone method. */
+            virtual SubjectConfirmationData* cloneSubjectConfirmationData() const=0;
+            /** Element local name. */
+            static const XMLCh LOCAL_NAME[];
+        };
         
         BEGIN_XMLOBJECT(SAML_API,SubjectConfirmation,xmltooling::XMLObject,SAML 1.x SubjectConfirmation element);
             DECL_TYPED_CHILDREN(ConfirmationMethod);
@@ -109,7 +124,7 @@ namespace opensaml {
         BEGIN_XMLOBJECT(SAML_API,SubjectLocality,xmltooling::XMLObject,SAML 1.x SubjectLocality element);
             DECL_STRING_ATTRIB(IPAddress,IPADDRESS);
             DECL_STRING_ATTRIB(DNSAddress,DNSADDRESS);
-            /** SubjectLocality local name */
+            /** SubjectLocalityType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
@@ -117,7 +132,7 @@ namespace opensaml {
             DECL_XMLOBJECT_ATTRIB(AuthorityKind,AUTHORITYKIND,xmltooling::QName);
             DECL_STRING_ATTRIB(Location,LOCATION);
             DECL_STRING_ATTRIB(Binding,BINDING);
-            /** AuthorityBinding local name */
+            /** AuthorityBindingType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
@@ -126,7 +141,70 @@ namespace opensaml {
             DECL_DATETIME_ATTRIB(AuthenticationInstant,AUTHENTICATIONINSTANT);
             DECL_TYPED_CHILD(SubjectLocality);
             DECL_TYPED_CHILDREN(AuthorityBinding);
-            /** AuthenticationStatement local name */
+            /** AuthenticationStatementType local name */
+            static const XMLCh TYPE_NAME[];
+        END_XMLOBJECT;
+
+        BEGIN_XMLOBJECT(SAML_API,Action,xmltooling::SimpleElement,SAML 1.x Action element);
+            DECL_STRING_ATTRIB(Namespace,NAMESPACE);
+            DECL_XMLOBJECT_CONTENT(Value);
+            /** ActionType local name */
+            static const XMLCh TYPE_NAME[];
+        END_XMLOBJECT;
+
+        BEGIN_XMLOBJECT(SAML_API,Evidence,xmltooling::XMLObject,SAML 1.x Evidence element);
+            DECL_TYPED_CHILDREN(AssertionIDReference);
+            DECL_TYPED_CHILDREN(Assertion);
+            /** EvidenceType local name */
+            static const XMLCh TYPE_NAME[];
+        END_XMLOBJECT;
+
+        BEGIN_XMLOBJECT(SAML_API,AuthorizationDecisionStatement,SubjectStatement,SAML 1.x AuthorizationDecisionStatement element);
+            DECL_STRING_ATTRIB(Resource,RESOURCE);
+            DECL_STRING_ATTRIB(Decision,DECISION);
+            DECL_TYPED_CHILDREN(Action);
+            DECL_TYPED_CHILD(Evidence);
+            /** AuthorizationDecisionStatementType local name */
+            static const XMLCh TYPE_NAME[];
+            /** Permit Decision */
+            static const XMLCh DECISION_PERMIT[];
+            /** Deny Decision */
+            static const XMLCh DECISION_DENY[];
+            /** Indeterminate Decision */
+            static const XMLCh DECISION_INDETERMINATE[];
+        END_XMLOBJECT;
+
+        BEGIN_XMLOBJECT(SAML_API,AttributeDesignator,xmltooling::XMLObject,SAML 1.x AttributeDesignator element);
+            DECL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME);
+            DECL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE);
+            /** AttributeDesignatorType local name */
+            static const XMLCh TYPE_NAME[];
+        END_XMLOBJECT;
+
+        BEGIN_XMLOBJECT(SAML_API,Attribute,AttributeDesignator,SAML 1.x Attribute element);
+            DECL_XMLOBJECT_CHILDREN(AttributeValue);
+            /** AttributeType local name */
+            static const XMLCh TYPE_NAME[];
+        END_XMLOBJECT;
+
+        /** SAML 1.x AttributeValue element */
+        class SAML_API AttributeValue : public virtual xmltooling::ElementProxy,
+            public virtual xmltooling::AttributeExtensibleXMLObject,
+            public virtual xmltooling::ValidatingXMLObject
+        {
+        protected:
+            AttributeValue() {}
+        public:
+            virtual ~AttributeValue() {}
+            /** Type-specific clone method. */
+            virtual AttributeValue* cloneAttributeValue() const=0;
+            /** Element local name. */
+            static const XMLCh LOCAL_NAME[];
+        };
+
+        BEGIN_XMLOBJECT(SAML_API,AttributeStatement,SubjectStatement,SAML 1.x AttributeStatement element);
+            DECL_TYPED_CHILDREN(Attribute);
+            /** AttributeStatementType local name */
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
@@ -153,16 +231,23 @@ namespace opensaml {
             static const XMLCh TYPE_NAME[];
         END_XMLOBJECT;
 
+        DECL_SAML1OBJECTBUILDER(Action);
         DECL_SAML1OBJECTBUILDER(Advice);
         DECL_SAML1OBJECTBUILDER(Assertion);
         DECL_SAML1OBJECTBUILDER(AssertionIDReference);
+        DECL_SAML1OBJECTBUILDER(Attribute);
+        DECL_SAML1OBJECTBUILDER(AttributeDesignator);
+        DECL_SAML1OBJECTBUILDER(AttributeStatement);
+        DECL_SAML1OBJECTBUILDER(AttributeValue);
         DECL_SAML1OBJECTBUILDER(Audience);
         DECL_SAML1OBJECTBUILDER(AudienceRestrictionCondition);
         DECL_SAML1OBJECTBUILDER(AuthenticationStatement);
+        DECL_SAML1OBJECTBUILDER(AuthorizationDecisionStatement);
         DECL_SAML1OBJECTBUILDER(AuthorityBinding);
-        DECL_SAML1OBJECTBUILDER(DoNotCacheCondition);
         DECL_SAML1OBJECTBUILDER(Conditions);
         DECL_SAML1OBJECTBUILDER(ConfirmationMethod);
+        DECL_SAML1OBJECTBUILDER(DoNotCacheCondition);
+        DECL_SAML1OBJECTBUILDER(Evidence);
         DECL_SAML1OBJECTBUILDER(NameIdentifier);
         DECL_SAML1OBJECTBUILDER(Subject);
         DECL_SAML1OBJECTBUILDER(SubjectConfirmation);
index 0ec6f0d..faf6978 100644 (file)
@@ -28,6 +28,7 @@
 #include <xmltooling/AbstractComplexElement.h>
 #include <xmltooling/AbstractElementProxy.h>
 #include <xmltooling/AbstractSimpleElement.h>
+#include <xmltooling/impl/AnyElement.h>
 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
 #include <xmltooling/util/XMLHelper.h>
@@ -201,7 +202,10 @@ namespace opensaml {
             public AbstractXMLObjectUnmarshaller
         {
         public:
-            virtual ~NameIdentifierImpl() {}
+            virtual ~NameIdentifierImpl() {
+                XMLString::release(&m_Format);
+                XMLString::release(&m_NameQualifier);
+            }
     
             NameIdentifierImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
                     : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
@@ -226,43 +230,32 @@ namespace opensaml {
             IMPL_XMLOBJECT_CONTENT;
     
         protected:
+            void marshallAttributes(DOMElement* domElement) const {
+                MARSHALL_STRING_ATTRIB(Format,FORMAT,NULL);
+                MARSHALL_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
+            }
+
             void processAttribute(const DOMAttr* attribute) {
                 PROC_STRING_ATTRIB(Format,FORMAT,NULL);
                 PROC_STRING_ATTRIB(NameQualifier,NAMEQUALIFIER,NULL);
             }
         };
 
-        class SAML_DLLLOCAL SubjectConfirmationDataImpl : public virtual SubjectConfirmationData,
-            public AbstractDOMCachingXMLObject,
-            public AbstractElementProxy,
-            public AbstractValidatingXMLObject,
-            public AbstractXMLObjectMarshaller,
-            public AbstractXMLObjectUnmarshaller
+        class SAML_DLLLOCAL SubjectConfirmationDataImpl
+            : public virtual SubjectConfirmationData, public AnyElementImpl, public AbstractValidatingXMLObject
         {
         public:
             virtual ~SubjectConfirmationDataImpl() {}
     
             SubjectConfirmationDataImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
-                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+                : AnyElementImpl(nsURI, localName, prefix, schemaType) {
             }
                 
             SubjectConfirmationDataImpl(const SubjectConfirmationDataImpl& src)
-                    : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractElementProxy(src),
-                        AbstractValidatingXMLObject(src) {
-                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
-                    if (*i) {
-                        getXMLObjects().push_back((*i)->clone());
-                    }
-                }
+                : AnyElementImpl(src), AbstractValidatingXMLObject(src) {
             }
             
             IMPL_XMLOBJECT_CLONE(SubjectConfirmationData);
-            IMPL_XMLOBJECT_CONTENT;
-    
-        protected:
-            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
-                getXMLObjects().push_back(childXMLObject);
-            }
         };
 
         class SAML_DLLLOCAL SubjectConfirmationImpl : public virtual SubjectConfirmation,
@@ -411,6 +404,102 @@ namespace opensaml {
             }
         };
 
+        class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
+            public AbstractChildlessElement,
+            public AbstractDOMCachingXMLObject,
+            public AbstractValidatingXMLObject,
+            public AbstractXMLObjectMarshaller,
+            public AbstractXMLObjectUnmarshaller
+        {
+        public:
+            virtual ~SubjectLocalityImpl() {
+                XMLString::release(&m_IPAddress);
+                XMLString::release(&m_DNSAddress);
+            }
+    
+            SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+                init();
+            }
+                
+            SubjectLocalityImpl(const SubjectLocalityImpl& src)
+                    : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
+                init();
+                setIPAddress(src.getIPAddress());
+                setDNSAddress(src.getDNSAddress());
+            }
+            
+            void init() {
+                m_IPAddress=m_DNSAddress=NULL;
+            }
+            
+            IMPL_XMLOBJECT_CLONE(SubjectLocality);
+            IMPL_STRING_ATTRIB(IPAddress);
+            IMPL_STRING_ATTRIB(DNSAddress);
+    
+        protected:
+            void marshallAttributes(DOMElement* domElement) const {
+                MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
+                MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
+            }
+    
+            void processAttribute(const DOMAttr* attribute) {
+                PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
+                PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
+            }
+        };
+
+        class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
+            public AbstractChildlessElement,
+            public AbstractDOMCachingXMLObject,
+            public AbstractValidatingXMLObject,
+            public AbstractXMLObjectMarshaller,
+            public AbstractXMLObjectUnmarshaller
+        {
+        public:
+            virtual ~AuthorityBindingImpl() {
+                delete m_AuthorityKind;
+                XMLString::release(&m_Location);
+                XMLString::release(&m_Binding);
+            }
+    
+            AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+                init();
+            }
+                
+            AuthorityBindingImpl(const AuthorityBindingImpl& src)
+                    : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
+                init();
+                setAuthorityKind(src.getAuthorityKind());
+                setLocation(src.getLocation());
+                setBinding(src.getBinding());
+            }
+            
+            void init() {
+                m_AuthorityKind=NULL;
+                m_Location=m_Binding=NULL;
+            }
+            
+            IMPL_XMLOBJECT_CLONE(AuthorityBinding);
+            IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
+            IMPL_STRING_ATTRIB(Location);
+            IMPL_STRING_ATTRIB(Binding);
+    
+        protected:
+            void marshallAttributes(DOMElement* domElement) const {
+                MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
+                MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
+                MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
+            }
+    
+            void processAttribute(const DOMAttr* attribute) {
+                PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
+                PROC_STRING_ATTRIB(Location,LOCATION,NULL);
+                PROC_STRING_ATTRIB(Binding,BINDING,NULL);
+            }
+        };
+
         class SAML_DLLLOCAL AuthenticationStatementImpl : public virtual AuthenticationStatement, public SubjectStatementImpl
         {
         public:
@@ -480,7 +569,8 @@ namespace opensaml {
             }
         };
 
-        class SAML_DLLLOCAL SubjectLocalityImpl : public virtual SubjectLocality,
+        class SAML_DLLLOCAL ActionImpl : public virtual Action,
+            public AbstractSimpleElement,
             public AbstractChildlessElement,
             public AbstractDOMCachingXMLObject,
             public AbstractValidatingXMLObject,
@@ -488,44 +578,153 @@ namespace opensaml {
             public AbstractXMLObjectUnmarshaller
         {
         public:
-            virtual ~SubjectLocalityImpl() {
-                XMLString::release(&m_IPAddress);
-                XMLString::release(&m_DNSAddress);
+            virtual ~ActionImpl() {
+                XMLString::release(&m_Namespace);
             }
     
-            SubjectLocalityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+            ActionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                    : AbstractXMLObject(nsURI, localName, prefix, schemaType), m_Namespace(NULL) {
+            }
+                
+            ActionImpl(const ActionImpl& src)
+                    : AbstractXMLObject(src), AbstractSimpleElement(src),
+                        AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
+                setNamespace(src.getNamespace());
+            }
+            
+            IMPL_XMLOBJECT_CLONE(Action);
+            IMPL_STRING_ATTRIB(Namespace);
+            IMPL_XMLOBJECT_CONTENT;
+    
+        protected:
+            void marshallAttributes(DOMElement* domElement) const {
+                MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
+            }
+
+            void processAttribute(const DOMAttr* attribute) {
+                PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
+            }
+        };
+
+        class SAML_DLLLOCAL EvidenceImpl : public virtual Evidence,
+            public AbstractComplexElement,
+            public AbstractDOMCachingXMLObject,
+            public AbstractValidatingXMLObject,
+            public AbstractXMLObjectMarshaller,
+            public AbstractXMLObjectUnmarshaller
+        {
+        public:
+            virtual ~EvidenceImpl() {}
+    
+            EvidenceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+            }
+                
+            EvidenceImpl(const EvidenceImpl& src)
+                    : AbstractXMLObject(src),
+                        AbstractDOMCachingXMLObject(src),
+                        AbstractValidatingXMLObject(src) {
+    
+                for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
+                    if (*i) {
+                        AssertionIDReference* ref=dynamic_cast<AssertionIDReference*>(*i);
+                        if (ref) {
+                            getAssertionIDReferences().push_back(ref->cloneAssertionIDReference());
+                            continue;
+                        }
+    
+                        Assertion* assertion=dynamic_cast<Assertion*>(*i);
+                        if (assertion) {
+                            getAssertions().push_back(assertion->cloneAssertion());
+                            continue;
+                        }
+                    }
+                }
+            }
+            
+            IMPL_XMLOBJECT_CLONE(Evidence);
+            IMPL_TYPED_CHILDREN(AssertionIDReference,m_children.end());
+            IMPL_TYPED_CHILDREN(Assertion,m_children.end());
+    
+        protected:
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+                PROC_TYPED_CHILDREN(AssertionIDReference,SAMLConstants::SAML1_NS,false);
+                PROC_TYPED_CHILDREN(Assertion,SAMLConstants::SAML1_NS,true);
+                AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
+            }
+        };
+
+        class SAML_DLLLOCAL AuthorizationDecisionStatementImpl
+            : public virtual AuthorizationDecisionStatement, public SubjectStatementImpl
+        {
+        public:
+            virtual ~AuthorizationDecisionStatementImpl() {
+                XMLString::release(&m_Resource);
+                XMLString::release(&m_Decision);
+            }
+    
+            AuthorizationDecisionStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                : SubjectStatementImpl(nsURI, localName, prefix, schemaType) {
                 init();
             }
                 
-            SubjectLocalityImpl(const SubjectLocalityImpl& src)
-                    : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
+            AuthorizationDecisionStatementImpl(const AuthorizationDecisionStatementImpl& src) : SubjectStatementImpl(src) {
                 init();
-                setIPAddress(src.getIPAddress());
-                setDNSAddress(src.getDNSAddress());
+                setResource(src.getResource());
+                setDecision(src.getDecision());
+                if (src.getEvidence())
+                    setEvidence(src.getEvidence()->cloneEvidence());
+                VectorOf(Action) v=getActions();
+                for (vector<Action*>::const_iterator i=src.m_Actions.begin(); i!=src.m_Actions.end(); i++) {
+                    if (*i) {
+                        v.push_back((*i)->cloneAction());
+                    }
+                }
             }
             
             void init() {
-                m_IPAddress=m_DNSAddress=NULL;
+                SubjectStatementImpl::init();
+                m_Resource=NULL;
+                m_Decision=NULL;
+                m_Evidence=NULL;
+                m_children.push_back(NULL);
+                m_pos_Evidence=m_pos_Subject;
+                m_pos_Evidence++;
             }
             
-            IMPL_XMLOBJECT_CLONE(SubjectLocality);
-            IMPL_STRING_ATTRIB(IPAddress);
-            IMPL_STRING_ATTRIB(DNSAddress);
+            IMPL_XMLOBJECT_CLONE(AuthorizationDecisionStatement);
+            SubjectStatement* cloneSubjectStatement() const {
+                return cloneAuthorizationDecisionStatement();
+            }
+            Statement* cloneStatement() const {
+                return cloneAuthorizationDecisionStatement();
+            }
+            IMPL_STRING_ATTRIB(Resource);
+            IMPL_STRING_ATTRIB(Decision);
+            IMPL_TYPED_CHILD(Evidence);
+            IMPL_TYPED_CHILDREN(Action, m_pos_Evidence);
     
         protected:
             void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
-                MARSHALL_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
+                MARSHALL_STRING_ATTRIB(Resource,RESOURCE,NULL);
+                MARSHALL_STRING_ATTRIB(Decision,DECISION,NULL);
+                SubjectStatementImpl::marshallAttributes(domElement);
+            }
+    
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+                PROC_TYPED_CHILD(Evidence,SAMLConstants::SAML1_NS,false);
+                PROC_TYPED_CHILDREN(Action,SAMLConstants::SAML1_NS,false);
+                SubjectStatementImpl::processChildElement(childXMLObject,root);
             }
     
             void processAttribute(const DOMAttr* attribute) {
-                PROC_STRING_ATTRIB(IPAddress,IPADDRESS,NULL);
-                PROC_STRING_ATTRIB(DNSAddress,DNSADDRESS,NULL);
+                PROC_STRING_ATTRIB(Resource,RESOURCE,NULL);
+                PROC_STRING_ATTRIB(Decision,DECISION,NULL);
+                SubjectStatementImpl::processAttribute(attribute);
             }
         };
 
-        class SAML_DLLLOCAL AuthorityBindingImpl : public virtual AuthorityBinding,
+        class SAML_DLLLOCAL AttributeDesignatorImpl : public virtual AttributeDesignator,
             public AbstractChildlessElement,
             public AbstractDOMCachingXMLObject,
             public AbstractValidatingXMLObject,
@@ -533,46 +732,149 @@ namespace opensaml {
             public AbstractXMLObjectUnmarshaller
         {
         public:
-            virtual ~AuthorityBindingImpl() {
-                delete m_AuthorityKind;
-                XMLString::release(&m_Location);
-                XMLString::release(&m_Binding);
+            virtual ~AttributeDesignatorImpl() {
+                XMLString::release(&m_AttributeName);
+                XMLString::release(&m_AttributeNamespace);
             }
     
-            AuthorityBindingImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+            AttributeDesignatorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
                 init();
             }
                 
-            AuthorityBindingImpl(const AuthorityBindingImpl& src)
+            AttributeDesignatorImpl(const AttributeDesignatorImpl& src)
                     : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
                 init();
-                setAuthorityKind(src.getAuthorityKind());
-                setLocation(src.getLocation());
-                setBinding(src.getBinding());
+                setAttributeName(src.getAttributeName());
+                setAttributeNamespace(src.getAttributeNamespace());
             }
             
             void init() {
-                m_AuthorityKind=NULL;
-                m_Location=m_Binding=NULL;
+                m_AttributeName=m_AttributeNamespace=NULL;
             }
             
-            IMPL_XMLOBJECT_CLONE(AuthorityBinding);
-            IMPL_XMLOBJECT_ATTRIB(AuthorityKind,QName);
-            IMPL_STRING_ATTRIB(Location);
-            IMPL_STRING_ATTRIB(Binding);
+            IMPL_XMLOBJECT_CLONE(AttributeDesignator);
+            IMPL_STRING_ATTRIB(AttributeName);
+            IMPL_STRING_ATTRIB(AttributeNamespace);
     
         protected:
             void marshallAttributes(DOMElement* domElement) const {
-                MARSHALL_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
-                MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
-                MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
+                MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
+                MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
             }
     
             void processAttribute(const DOMAttr* attribute) {
-                PROC_QNAME_ATTRIB(AuthorityKind,AUTHORITYKIND,NULL);
-                PROC_STRING_ATTRIB(Location,LOCATION,NULL);
-                PROC_STRING_ATTRIB(Binding,BINDING,NULL);
+                PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
+                PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
+            }
+        };
+
+        class SAML_DLLLOCAL AttributeImpl : public virtual Attribute,
+            public AbstractComplexElement,
+            public AbstractDOMCachingXMLObject,
+            public AbstractValidatingXMLObject,
+            public AbstractXMLObjectMarshaller,
+            public AbstractXMLObjectUnmarshaller
+        {
+        public:
+            virtual ~AttributeImpl() {
+                XMLString::release(&m_AttributeName);
+                XMLString::release(&m_AttributeNamespace);
+            }
+    
+            AttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+                init();
+            }
+                
+            AttributeImpl(const AttributeImpl& src)
+                    : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
+                init();
+                setAttributeName(src.getAttributeName());
+                setAttributeNamespace(src.getAttributeNamespace());
+                VectorOf(XMLObject) v=getAttributeValues();
+                for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
+                    if (*i) {
+                        v.push_back((*i)->clone());
+                    }
+                }
+            }
+            
+            void init() {
+                m_AttributeName=m_AttributeNamespace=NULL;
+            }
+            
+            IMPL_XMLOBJECT_CLONE(Attribute);
+            AttributeDesignator* cloneAttributeDesignator() const {
+                return cloneAttribute();
+            }
+            IMPL_STRING_ATTRIB(AttributeName);
+            IMPL_STRING_ATTRIB(AttributeNamespace);
+            IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
+    
+        protected:
+            void marshallAttributes(DOMElement* domElement) const {
+                MARSHALL_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
+                MARSHALL_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
+            }
+
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+                getAttributeValues().push_back(childXMLObject);
+            }
+
+            void processAttribute(const DOMAttr* attribute) {
+                PROC_STRING_ATTRIB(AttributeName,ATTRIBUTENAME,NULL);
+                PROC_STRING_ATTRIB(AttributeNamespace,ATTRIBUTENAMESPACE,NULL);
+            }
+        };
+
+        class SAML_DLLLOCAL AttributeValueImpl
+            : public virtual AttributeValue, public AnyElementImpl, public AbstractValidatingXMLObject
+        {
+        public:
+            virtual ~AttributeValueImpl() {}
+    
+            AttributeValueImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                : AnyElementImpl(nsURI, localName, prefix, schemaType) {
+            }
+                
+            AttributeValueImpl(const AttributeValueImpl& src) : AnyElementImpl(src), AbstractValidatingXMLObject(src) {}
+            
+            IMPL_XMLOBJECT_CLONE(AttributeValue);
+        };
+
+        class SAML_DLLLOCAL AttributeStatementImpl : public virtual AttributeStatement, public SubjectStatementImpl
+        {
+        public:
+            virtual ~AttributeStatementImpl() {}
+    
+            AttributeStatementImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+                : SubjectStatementImpl(nsURI, localName, prefix, schemaType) {
+                init();
+            }
+                
+            AttributeStatementImpl(const AttributeStatementImpl& src) : SubjectStatementImpl(src) {
+                VectorOf(Attribute) v=getAttributes();
+                for (vector<Attribute*>::const_iterator i=src.m_Attributes.begin(); i!=src.m_Attributes.end(); i++) {
+                    if (*i) {
+                        v.push_back((*i)->cloneAttribute());
+                    }
+                }
+            }
+            
+            IMPL_XMLOBJECT_CLONE(AttributeStatement);
+            SubjectStatement* cloneSubjectStatement() const {
+                return cloneAttributeStatement();
+            }
+            Statement* cloneStatement() const {
+                return cloneAttributeStatement();
+            }
+            IMPL_TYPED_CHILDREN(Attribute, m_children.end());
+    
+        protected:
+            void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+                PROC_TYPED_CHILDREN(Attribute,SAMLConstants::SAML1_NS,true);
+                SubjectStatementImpl::processChildElement(childXMLObject,root);
             }
         };
 
@@ -767,16 +1069,23 @@ namespace opensaml {
 
 // Builder Implementations
 
+IMPL_XMLOBJECTBUILDER(Action);
 IMPL_XMLOBJECTBUILDER(Advice);
 IMPL_XMLOBJECTBUILDER(Assertion);
 IMPL_XMLOBJECTBUILDER(AssertionIDReference);
+IMPL_XMLOBJECTBUILDER(Attribute);
+IMPL_XMLOBJECTBUILDER(AttributeDesignator);
+IMPL_XMLOBJECTBUILDER(AttributeStatement);
+IMPL_XMLOBJECTBUILDER(AttributeValue);
 IMPL_XMLOBJECTBUILDER(Audience);
 IMPL_XMLOBJECTBUILDER(AudienceRestrictionCondition);
 IMPL_XMLOBJECTBUILDER(AuthenticationStatement);
+IMPL_XMLOBJECTBUILDER(AuthorizationDecisionStatement);
 IMPL_XMLOBJECTBUILDER(AuthorityBinding);
 IMPL_XMLOBJECTBUILDER(Conditions);
 IMPL_XMLOBJECTBUILDER(ConfirmationMethod);
 IMPL_XMLOBJECTBUILDER(DoNotCacheCondition);
+IMPL_XMLOBJECTBUILDER(Evidence);
 IMPL_XMLOBJECTBUILDER(NameIdentifier);
 IMPL_XMLOBJECTBUILDER(Subject);
 IMPL_XMLOBJECTBUILDER(SubjectConfirmation);
@@ -784,6 +1093,9 @@ IMPL_XMLOBJECTBUILDER(SubjectConfirmationData);
 IMPL_XMLOBJECTBUILDER(SubjectLocality);
 
 // Unicode literals
+const XMLCh Action::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,c,t,i,o,n);
+const XMLCh Action::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,c,t,i,o,n,T,y,p,e);
+const XMLCh Action::NAMESPACE_ATTRIB_NAME[] =       UNICODE_LITERAL_9(N,a,m,e,s,p,a,c,e);
 const XMLCh Advice::LOCAL_NAME[] =                  UNICODE_LITERAL_6(A,d,v,i,c,e);
 const XMLCh Advice::TYPE_NAME[] =                   UNICODE_LITERAL_10(A,d,v,i,c,e,T,y,p,e);
 const XMLCh Assertion::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,s,s,e,r,t,i,o,n);
@@ -793,6 +1105,15 @@ const XMLCh Assertion::ASSERTIONID_ATTRIB_NAME[] =  UNICODE_LITERAL_11(A,s,s,e,r
 const XMLCh Assertion::ISSUER_ATTRIB_NAME[] =       UNICODE_LITERAL_6(I,s,s,u,e,r);
 const XMLCh Assertion::ISSUEINSTANT_ATTRIB_NAME[] = UNICODE_LITERAL_12(I,s,s,u,e,I,n,s,t,a,n,t);
 const XMLCh AssertionIDReference::LOCAL_NAME[] =    UNICODE_LITERAL_20(A,s,s,e,r,t,i,o,n,I,D,R,e,f,e,r,e,n,c,e);
+const XMLCh Attribute::LOCAL_NAME[] =               UNICODE_LITERAL_9(A,t,t,r,i,b,u,t,e);
+const XMLCh Attribute::TYPE_NAME[] =                UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,T,y,p,e);
+const XMLCh AttributeDesignator::LOCAL_NAME[] =     UNICODE_LITERAL_19(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r);
+const XMLCh AttributeDesignator::TYPE_NAME[] =      UNICODE_LITERAL_23(A,t,t,r,i,b,u,t,e,D,e,s,i,g,n,a,t,o,r,T,y,p,e);
+const XMLCh AttributeDesignator::ATTRIBUTENAME_ATTRIB_NAME[] =              UNICODE_LITERAL_13(A,t,t,r,i,b,u,t,e,N,a,m,e);
+const XMLCh AttributeDesignator::ATTRIBUTENAMESPACE_ATTRIB_NAME[] =         UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,N,a,m,e,s,p,a,c,e);
+const XMLCh AttributeStatement::LOCAL_NAME[] =      UNICODE_LITERAL_18(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t);
+const XMLCh AttributeStatement::TYPE_NAME[] =       UNICODE_LITERAL_22(A,t,t,r,i,b,u,t,e,S,t,a,t,e,m,e,n,t,T,y,p,e);
+const XMLCh AttributeValue::LOCAL_NAME[] =          UNICODE_LITERAL_14(A,t,t,r,i,b,u,t,e,V,a,l,u,e);
 const XMLCh Audience::LOCAL_NAME[] =                UNICODE_LITERAL_8(A,u,d,i,e,n,c,e);
 const XMLCh AudienceRestrictionCondition::LOCAL_NAME[] =    UNICODE_LITERAL_28(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n);
 const XMLCh AudienceRestrictionCondition::TYPE_NAME[] =     UNICODE_LITERAL_32(A,u,d,i,e,n,c,e,R,e,s,t,r,i,c,t,i,o,n,C,o,n,d,i,t,i,o,n,T,y,p,e);
@@ -805,6 +1126,13 @@ const XMLCh AuthorityBinding::TYPE_NAME[] =         UNICODE_LITERAL_20(A,u,t,h,o
 const XMLCh AuthorityBinding::AUTHORITYKIND_ATTRIB_NAME[] = UNICODE_LITERAL_13(A,u,t,h,o,r,i,t,y,K,i,n,d);
 const XMLCh AuthorityBinding::LOCATION_ATTRIB_NAME[] =      UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
 const XMLCh AuthorityBinding::BINDING_ATTRIB_NAME[] =       UNICODE_LITERAL_7(B,i,n,d,i,n,g);
+const XMLCh AuthorizationDecisionStatement::LOCAL_NAME[] =  UNICODE_LITERAL_30(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t);
+const XMLCh AuthorizationDecisionStatement::TYPE_NAME[] =   UNICODE_LITERAL_34(A,u,t,h,o,r,i,z,a,t,i,o,n,D,e,c,i,s,i,o,n,S,t,a,t,e,m,e,n,t,T,y,p,e);
+const XMLCh AuthorizationDecisionStatement::RESOURCE_ATTRIB_NAME[] =        UNICODE_LITERAL_8(R,e,s,o,u,r,c,e);
+const XMLCh AuthorizationDecisionStatement::DECISION_ATTRIB_NAME[] =        UNICODE_LITERAL_8(D,e,c,i,s,i,o,n);
+const XMLCh AuthorizationDecisionStatement::DECISION_PERMIT[] =             UNICODE_LITERAL_6(P,e,r,m,i,t);
+const XMLCh AuthorizationDecisionStatement::DECISION_DENY[] =               UNICODE_LITERAL_4(D,e,n,y);
+const XMLCh AuthorizationDecisionStatement::DECISION_INDETERMINATE[] =      UNICODE_LITERAL_13(I,n,d,e,t,e,r,m,i,n,a,t,e);
 const XMLCh Condition::LOCAL_NAME[] =               UNICODE_LITERAL_9(C,o,n,d,i,t,i,o,n);
 const XMLCh Conditions::LOCAL_NAME[] =              UNICODE_LITERAL_10(C,o,n,d,i,t,i,o,n,s);
 const XMLCh Conditions::TYPE_NAME[] =               UNICODE_LITERAL_14(C,o,n,d,i,t,i,o,n,s,T,y,p,e);
@@ -813,6 +1141,8 @@ const XMLCh Conditions::NOTONORAFTER_ATTRIB_NAME[] =UNICODE_LITERAL_12(N,o,t,O,n
 const XMLCh ConfirmationMethod::LOCAL_NAME[] =      UNICODE_LITERAL_18(C,o,n,f,i,r,m,a,t,i,o,n,M,e,t,h,o,d);
 const XMLCh DoNotCacheCondition::LOCAL_NAME[] =     UNICODE_LITERAL_19(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n);
 const XMLCh DoNotCacheCondition::TYPE_NAME[] =      UNICODE_LITERAL_23(D,o,N,o,t,C,a,c,h,e,C,o,n,d,i,t,i,o,n,T,y,p,e);
+const XMLCh Evidence::LOCAL_NAME[] =                UNICODE_LITERAL_8(E,v,i,d,e,n,c,e);
+const XMLCh Evidence::TYPE_NAME[] =                 UNICODE_LITERAL_12(E,v,i,d,e,n,c,e,T,y,p,e);
 const XMLCh NameIdentifier::LOCAL_NAME[] =          UNICODE_LITERAL_14(N,a,m,e,I,d,e,n,t,i,f,i,e,r);
 const XMLCh NameIdentifier::TYPE_NAME[] =           UNICODE_LITERAL_18(N,a,m,e,I,d,e,n,t,i,f,i,e,r,T,y,p,e);
 const XMLCh NameIdentifier::NAMEQUALIFIER_ATTRIB_NAME[] =   UNICODE_LITERAL_13(N,a,m,e,Q,u,a,l,i,f,i,e,r);
index 7aed851..f789011 100644 (file)
@@ -31,10 +31,12 @@ using namespace std;
 
 namespace opensaml {
     namespace saml1 {
-    
+        
+        XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,Action);
         XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,AssertionIDReference);
         XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,Audience);
         XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,ConfirmationMethod);
+        XMLOBJECTVALIDATOR_SIMPLE(SAML_DLLLOCAL,NameIdentifier);
 
         BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AudienceRestrictionCondition);
             XMLOBJECTVALIDATOR_NONEMPTY(AudienceRestrictionCondition,Audience);
@@ -70,6 +72,37 @@ namespace opensaml {
             XMLOBJECTVALIDATOR_REQUIRE(AuthenticationStatement,Subject);
         END_XMLOBJECTVALIDATOR;
 
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Evidence);
+            if (!ptr->hasChildren())
+                throw ValidationException("Evidence must have at least one child element.");
+        END_XMLOBJECTVALIDATOR;
+
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AuthorizationDecisionStatement);
+            XMLOBJECTVALIDATOR_REQUIRE(AuthorizationDecisionStatement,Resource);
+            XMLOBJECTVALIDATOR_REQUIRE(AuthorizationDecisionStatement,Decision);
+            if (!XMLString::equals(ptr->getDecision(),AuthorizationDecisionStatement::DECISION_PERMIT) &&
+                !XMLString::equals(ptr->getDecision(),AuthorizationDecisionStatement::DECISION_DENY) &&
+                !XMLString::equals(ptr->getDecision(),AuthorizationDecisionStatement::DECISION_INDETERMINATE))
+                throw ValidationException("Decision must be one of Deny, Permit, or Indeterminate.");
+            XMLOBJECTVALIDATOR_REQUIRE(AuthorizationDecisionStatement,Subject);
+            XMLOBJECTVALIDATOR_NONEMPTY(AuthorizationDecisionStatement,Action);
+        END_XMLOBJECTVALIDATOR;
+
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AttributeDesignator);
+            XMLOBJECTVALIDATOR_REQUIRE(AttributeDesignator,AttributeName);
+            XMLOBJECTVALIDATOR_REQUIRE(AttributeDesignator,AttributeNamespace);
+        END_XMLOBJECTVALIDATOR;
+
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Attribute);
+            XMLOBJECTVALIDATOR_REQUIRE(Attribute,AttributeName);
+            XMLOBJECTVALIDATOR_REQUIRE(Attribute,AttributeNamespace);
+            XMLOBJECTVALIDATOR_NONEMPTY(Attribute,AttributeValue);
+        END_XMLOBJECTVALIDATOR;
+
+        BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,AttributeStatement);
+            XMLOBJECTVALIDATOR_NONEMPTY(AttributeStatement,Attribute);
+        END_XMLOBJECTVALIDATOR;
+
         BEGIN_XMLOBJECTVALIDATOR(SAML_DLLLOCAL,Assertion);
             XMLOBJECTVALIDATOR_REQUIRE(Assertion,AssertionID);
             XMLOBJECTVALIDATOR_REQUIRE(Assertion,Issuer);
@@ -121,26 +154,43 @@ namespace opensaml {
 
 void opensaml::saml1::registerAssertionClasses() {
     QName q;
+    REGISTER_ELEMENT(Action);
     REGISTER_ELEMENT(Advice);
     REGISTER_ELEMENT(Assertion);
     REGISTER_ELEMENT(AssertionIDReference);
+    REGISTER_ELEMENT(Attribute);
+    REGISTER_ELEMENT(AttributeDesignator);
+    REGISTER_ELEMENT(AttributeStatement);
+    REGISTER_ELEMENT_NOVAL(AttributeValue);
     REGISTER_ELEMENT(Audience);
     REGISTER_ELEMENT(AudienceRestrictionCondition);
     REGISTER_ELEMENT(AuthenticationStatement);
     REGISTER_ELEMENT(AuthorityBinding);
+    REGISTER_ELEMENT(AuthorizationDecisionStatement);
     REGISTER_ELEMENT(Conditions);
     REGISTER_ELEMENT(ConfirmationMethod);
     REGISTER_ELEMENT_NOVAL(DoNotCacheCondition);
+    REGISTER_ELEMENT(Evidence);
+    REGISTER_ELEMENT(NameIdentifier);
+    REGISTER_ELEMENT(Subject);
     REGISTER_ELEMENT(SubjectConfirmation);
     REGISTER_ELEMENT_NOVAL(SubjectConfirmationData);
     REGISTER_ELEMENT(SubjectLocality);
+    REGISTER_TYPE(Action);
     REGISTER_TYPE(Advice);
     REGISTER_TYPE(Assertion);
+    REGISTER_TYPE(Attribute);
+    REGISTER_TYPE(AttributeDesignator);
+    REGISTER_TYPE(AttributeStatement);
     REGISTER_TYPE(AudienceRestrictionCondition);
     REGISTER_TYPE(AuthenticationStatement);
     REGISTER_TYPE(AuthorityBinding);
+    REGISTER_TYPE(AuthorizationDecisionStatement);
     REGISTER_TYPE(Conditions);
     REGISTER_TYPE_NOVAL(DoNotCacheCondition);
+    REGISTER_TYPE(Evidence);
+    REGISTER_TYPE(NameIdentifier);
+    REGISTER_TYPE(Subject);
     REGISTER_TYPE(SubjectConfirmation);
     REGISTER_TYPE(SubjectLocality);
 }
diff --git a/samltest/.gitignore b/samltest/.gitignore
new file mode 100644 (file)
index 0000000..98bbc31
--- /dev/null
@@ -0,0 +1 @@
+/Debug
diff --git a/samltest/Makefile.am b/samltest/Makefile.am
new file mode 100644 (file)
index 0000000..d45c891
--- /dev/null
@@ -0,0 +1,33 @@
+AUTOMAKE_OPTIONS = foreign
+
+if BUILD_UNITTEST
+bin_PROGRAMS = samltest
+samltest_CXXFLAGS = $(CXXFLAGS) $(CXXTESTFLAGS)
+else
+bin_PROGRAMS = 
+endif
+
+samltest_h = \
+    samltest.h \
+    saml1/core/impl/ActionTest.h
+
+noinst_HEADERS = \
+    internal.h
+
+nodist_samltest_SOURCES = $(samltest_h:.h=.cpp)
+
+CLEANFILES = $(nodist_samltest_SOURCES)
+
+do-cxxtestgen:
+       if test $(HFILE) = "samltest.h"; then \
+               $(CXXTEST) --error-printer --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
+       else \
+               $(CXXTEST) --part --have-eh --have-std --abort-on-fail -o $(CPPFILE) $(HFILE); \
+       fi;
+
+$(nodist_samltest_SOURCES): %.cpp: %.h
+       $(MAKE) do-cxxtestgen HFILE=$< CPPFILE=$@
+
+samltest_LDADD = $(top_builddir)/saml/libsaml.la
+
+EXTRA_DIST = samltest.vcproj $(samltest_h) data
diff --git a/samltest/data/cert.pem b/samltest/data/cert.pem
new file mode 100644 (file)
index 0000000..e8261f3
--- /dev/null
@@ -0,0 +1,16 @@
+-----BEGIN CERTIFICATE-----
+MIICjzCCAfigAwIBAgIJAKk8t1hYcMkhMA0GCSqGSIb3DQEBBAUAMDoxCzAJBgNV
+BAYTAlVTMRIwEAYDVQQKEwlJbnRlcm5ldDIxFzAVBgNVBAMTDnNwLmV4YW1wbGUu
+b3JnMB4XDTA1MDYyMDE1NDgzNFoXDTMyMTEwNTE1NDgzNFowOjELMAkGA1UEBhMC
+VVMxEjAQBgNVBAoTCUludGVybmV0MjEXMBUGA1UEAxMOc3AuZXhhbXBsZS5vcmcw
+gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANlZ1L1mKzYbUVKiMQLhZlfGDyYa
+/jjCiaXP0WhLNgvJpOTeajvsrApYNnFX5MLNzuC3NeQIjXUNLN2Yo2MCSthBIOL5
+qE5dka4z9W9zytoflW1LmJ8vXpx8Ay/meG4z//J5iCpYVEquA0xl28HUIlownZUF
+7w7bx0cF/02qrR23AgMBAAGjgZwwgZkwHQYDVR0OBBYEFJZiO1qsyAyc3HwMlL9p
+JpN6fbGwMGoGA1UdIwRjMGGAFJZiO1qsyAyc3HwMlL9pJpN6fbGwoT6kPDA6MQsw
+CQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMRcwFQYDVQQDEw5zcC5leGFt
+cGxlLm9yZ4IJAKk8t1hYcMkhMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQAD
+gYEAMFq/UeSQyngE0GpZueyD2UW0M358uhseYOgGEIfm+qXIFQF6MYwNoX7WFzhC
+LJZ2E6mEvZZFHCHUtl7mGDvsRwgZ85YCtRbvleEpqfgNQToto9pLYe+X6vvH9Z6p
+gmYsTmak+kxO93JprrOd9xp8aZPMEprL7VCdrhbZEfyYER0=
+-----END CERTIFICATE-----
diff --git a/samltest/data/key.pem b/samltest/data/key.pem
new file mode 100644 (file)
index 0000000..5149449
--- /dev/null
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDZWdS9Zis2G1FSojEC4WZXxg8mGv44womlz9FoSzYLyaTk3mo7
+7KwKWDZxV+TCzc7gtzXkCI11DSzdmKNjAkrYQSDi+ahOXZGuM/Vvc8raH5VtS5if
+L16cfAMv5nhuM//yeYgqWFRKrgNMZdvB1CJaMJ2VBe8O28dHBf9Nqq0dtwIDAQAB
+AoGAKsaVKdlLs9BYhuzIvIpju+6M2LEDS2Rt9qYZzm7O6i77NtfXDIgdq8OEo3Xq
+3bPnfS5Retl8DYdURyBdN4Uh+WR/BUWQjBvOaJLEEdxvuAaLyAjniVREwkc2rXTZ
+xoYYFL/XMyAEt/ye2ZbTw2u5R2i7HCYdddZWMkP1+Vabg8ECQQD7VJXWy8KFiyeC
+thJiVqG/h5IO0y25dId/n81sW2B55eK0c4+IVsqc0a45/U/y2y1wtNBmIEQQn9yY
+pDtWwzVRAkEA3WOgmvxFGTI5V1K5CLCCZzQIUYpzQDQvBu2sKYuy8dK2BMEGe9Zw
+cKVyZJuDKHBvrVI5G6CqkHuFD2PwDvwAhwJBAPdfbM/q4/4/VddAz918uV1j2a2/
+y3yDJq7GIhHp6o5wZ3AHYhnmmyw48YxgOGWntxT80zYBwhy+zAhtdX5TStECQEKL
+drP/TfnD2e6Ag/Ozso642iNAXWIYDWakvBIE1rXPYzzMlFlW3JdPc7H/+I2INlk/
+lMDUK1CggB9fJ8IpRzMCQQDQmqpWZtH6eaMAN6b/9WBdVzqzpCeTWFlL/SwhVbzI
+s+k2zvC4HEAK9Y199g6SHVTQMEAE49wfhhCpY0JdCsQ/
+-----END RSA PRIVATE KEY-----
diff --git a/samltest/data/saml1/core/impl/AdviceWithChildren.xml b/samltest/data/saml1/core/impl/AdviceWithChildren.xml
new file mode 100644 (file)
index 0000000..eeab16c
Binary files /dev/null and b/samltest/data/saml1/core/impl/AdviceWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/AssertionWithChildren.xml b/samltest/data/saml1/core/impl/AssertionWithChildren.xml
new file mode 100644 (file)
index 0000000..85ec2b2
Binary files /dev/null and b/samltest/data/saml1/core/impl/AssertionWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/AttributeQueryWithChildren.xml b/samltest/data/saml1/core/impl/AttributeQueryWithChildren.xml
new file mode 100644 (file)
index 0000000..22ec6c9
--- /dev/null
@@ -0,0 +1,6 @@
+<samlp:AttributeQuery\r
+xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" \r
+><saml:Subject /><saml:AttributeDesignator\r
+/><saml:AttributeDesignator /><saml:AttributeDesignator\r
+/><saml:AttributeDesignator /></samlp:AttributeQuery>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml b/samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml
new file mode 100644 (file)
index 0000000..db4d7d4
Binary files /dev/null and b/samltest/data/saml1/core/impl/AttributeStatementWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/AttributeWithChildren.xml b/samltest/data/saml1/core/impl/AttributeWithChildren.xml
new file mode 100644 (file)
index 0000000..f52888f
Binary files /dev/null and b/samltest/data/saml1/core/impl/AttributeWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml b/samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml
new file mode 100644 (file)
index 0000000..f8a3d4d
Binary files /dev/null and b/samltest/data/saml1/core/impl/AudienceRestrictionConditionWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml b/samltest/data/saml1/core/impl/AuthenticationQueryWithChildren.xml
new file mode 100644 (file)
index 0000000..988ec02
--- /dev/null
@@ -0,0 +1,4 @@
+<samlp:AuthenticationQuery\r
+xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" \r
+><saml:Subject /></samlp:AuthenticationQuery>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml b/samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml
new file mode 100644 (file)
index 0000000..f63491b
Binary files /dev/null and b/samltest/data/saml1/core/impl/AuthenticationStatementWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/AuthorizationDecisionQueryWithChildren.xml b/samltest/data/saml1/core/impl/AuthorizationDecisionQueryWithChildren.xml
new file mode 100644 (file)
index 0000000..abcc409
--- /dev/null
@@ -0,0 +1,9 @@
+<samlp:AuthorizationDecisionQuery\r
+xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" \r
+><saml:Subject \r
+/><saml:Action\r
+/><saml:Action\r
+/><saml:Action\r
+/><saml:Evidence\r
+/></samlp:AuthorizationDecisionQuery>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml b/samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml
new file mode 100644 (file)
index 0000000..919637d
Binary files /dev/null and b/samltest/data/saml1/core/impl/AuthorizationDecisionStatementWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/ConditionsWithChildren.xml b/samltest/data/saml1/core/impl/ConditionsWithChildren.xml
new file mode 100644 (file)
index 0000000..393695d
--- /dev/null
@@ -0,0 +1,2 @@
+<saml:Conditions xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"\r
+><saml:AudienceRestrictionCondition /><saml:DoNotCacheCondition /><saml:AudienceRestrictionCondition /><saml:AudienceRestrictionCondition /></saml:Conditions>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/EvidenceWithChildren.xml b/samltest/data/saml1/core/impl/EvidenceWithChildren.xml
new file mode 100644 (file)
index 0000000..27f5278
Binary files /dev/null and b/samltest/data/saml1/core/impl/EvidenceWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/FullStatus.xml b/samltest/data/saml1/core/impl/FullStatus.xml
new file mode 100644 (file)
index 0000000..c4df510
--- /dev/null
@@ -0,0 +1 @@
+<samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" ><samlp:StatusCode Value="samlp:Sucess" /><samlp:StatusMessage  /></samlp:Status>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/FullStatusCode.xml b/samltest/data/saml1/core/impl/FullStatusCode.xml
new file mode 100644 (file)
index 0000000..760e44f
--- /dev/null
@@ -0,0 +1 @@
+<samlp:StatusCode xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" Value="samlp:Success"><samlp:StatusCode Value="samlp:VersionMismatch" /></samlp:StatusCode>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/FullStatusMessage.xml b/samltest/data/saml1/core/impl/FullStatusMessage.xml
new file mode 100644 (file)
index 0000000..b8539ac
--- /dev/null
@@ -0,0 +1 @@
+<samlp:StatusMessage xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol">Nibble a Happy Warthog</samlp:StatusMessage>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml b/samltest/data/saml1/core/impl/RequestWithAssertionArtifact.xml
new file mode 100644 (file)
index 0000000..fb013eb
--- /dev/null
@@ -0,0 +1,6 @@
+<samlp:Request xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+><samlp:AssertionArtifact\r
+/><samlp:AssertionArtifact\r
+/></samlp:Request>\r
diff --git a/samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml b/samltest/data/saml1/core/impl/RequestWithAssertionIDReference.xml
new file mode 100644 (file)
index 0000000..a9d1b48
--- /dev/null
@@ -0,0 +1,4 @@
+<samlp:Request xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+><saml:AssertionIDReference /><saml:AssertionIDReference /><saml:AssertionIDReference /></samlp:Request>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/RequestWithQuery.xml b/samltest/data/saml1/core/impl/RequestWithQuery.xml
new file mode 100644 (file)
index 0000000..97642b1
--- /dev/null
@@ -0,0 +1,4 @@
+<samlp:Request xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+><samlp:AttributeQuery/></samlp:Request>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/ResponseWithChildren.xml b/samltest/data/saml1/core/impl/ResponseWithChildren.xml
new file mode 100644 (file)
index 0000000..fdbd61e
--- /dev/null
@@ -0,0 +1,7 @@
+<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+><samlp:Status/><saml:Assertion\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+/></samlp:Response>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml b/samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml
new file mode 100644 (file)
index 0000000..38af8d2
Binary files /dev/null and b/samltest/data/saml1/core/impl/SubjectConfirmationWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/SubjectWithChildren.xml b/samltest/data/saml1/core/impl/SubjectWithChildren.xml
new file mode 100644 (file)
index 0000000..7c134ba
Binary files /dev/null and b/samltest/data/saml1/core/impl/SubjectWithChildren.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAction.xml b/samltest/data/saml1/core/impl/singleAction.xml
new file mode 100644 (file)
index 0000000..f6b3cf5
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAction.xml differ
diff --git a/samltest/data/saml1/core/impl/singleActionAttributes.xml b/samltest/data/saml1/core/impl/singleActionAttributes.xml
new file mode 100644 (file)
index 0000000..c7701ed
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleActionAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAdvice.xml b/samltest/data/saml1/core/impl/singleAdvice.xml
new file mode 100644 (file)
index 0000000..5bd3f6d
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAdvice.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAssertion.xml b/samltest/data/saml1/core/impl/singleAssertion.xml
new file mode 100644 (file)
index 0000000..4c6a67f
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAssertion.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAssertionArtifact.xml b/samltest/data/saml1/core/impl/singleAssertionArtifact.xml
new file mode 100644 (file)
index 0000000..84d0558
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAssertionArtifact.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml b/samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml
new file mode 100644 (file)
index 0000000..d576318
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAssertionArtifactAttribute.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAssertionAttributes.xml b/samltest/data/saml1/core/impl/singleAssertionAttributes.xml
new file mode 100644 (file)
index 0000000..7c83a38
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAssertionAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAssertionIDReference.xml b/samltest/data/saml1/core/impl/singleAssertionIDReference.xml
new file mode 100644 (file)
index 0000000..db3bef3
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAssertionIDReference.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAssertionIDReferenceContents.xml b/samltest/data/saml1/core/impl/singleAssertionIDReferenceContents.xml
new file mode 100644 (file)
index 0000000..f6dc2dc
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAssertionIDReferenceContents.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttribute.xml b/samltest/data/saml1/core/impl/singleAttribute.xml
new file mode 100644 (file)
index 0000000..4e81fad
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttribute.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttributeAttributes.xml b/samltest/data/saml1/core/impl/singleAttributeAttributes.xml
new file mode 100644 (file)
index 0000000..9fa828d
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttributeAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttributeDesignator.xml b/samltest/data/saml1/core/impl/singleAttributeDesignator.xml
new file mode 100644 (file)
index 0000000..22a4433
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttributeDesignator.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml b/samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml
new file mode 100644 (file)
index 0000000..0183cd6
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttributeDesignatorAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttributeQuery.xml b/samltest/data/saml1/core/impl/singleAttributeQuery.xml
new file mode 100644 (file)
index 0000000..20ea074
--- /dev/null
@@ -0,0 +1 @@
+<samlp:AttributeQuery xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" />
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml b/samltest/data/saml1/core/impl/singleAttributeQueryAttributes.xml
new file mode 100644 (file)
index 0000000..a5d3b7f
--- /dev/null
@@ -0,0 +1,3 @@
+<samlp:AttributeQuery xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+Resource="resource"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleAttributeStatement.xml b/samltest/data/saml1/core/impl/singleAttributeStatement.xml
new file mode 100644 (file)
index 0000000..2896710
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttributeStatement.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttributeValue.xml b/samltest/data/saml1/core/impl/singleAttributeValue.xml
new file mode 100644 (file)
index 0000000..4dff576
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttributeValue.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAttributeValueContents.xml b/samltest/data/saml1/core/impl/singleAttributeValueContents.xml
new file mode 100644 (file)
index 0000000..043d8ab
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAttributeValueContents.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAudience.xml b/samltest/data/saml1/core/impl/singleAudience.xml
new file mode 100644 (file)
index 0000000..9f6af4b
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAudience.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAudienceAttributes.xml b/samltest/data/saml1/core/impl/singleAudienceAttributes.xml
new file mode 100644 (file)
index 0000000..ce2e3b2
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAudienceAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml b/samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml
new file mode 100644 (file)
index 0000000..0326f65
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAudienceRestrictionCondition.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthenticationQuery.xml b/samltest/data/saml1/core/impl/singleAuthenticationQuery.xml
new file mode 100644 (file)
index 0000000..ae7fcc8
--- /dev/null
@@ -0,0 +1 @@
+<samlp:AuthenticationQuery xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" />
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml b/samltest/data/saml1/core/impl/singleAuthenticationQueryAttributes.xml
new file mode 100644 (file)
index 0000000..4d6a696
--- /dev/null
@@ -0,0 +1,3 @@
+<samlp:AuthenticationQuery xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+AuthenticationMethod="Trust Me"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleAuthenticationStatement.xml b/samltest/data/saml1/core/impl/singleAuthenticationStatement.xml
new file mode 100644 (file)
index 0000000..3676599
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthenticationStatement.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml b/samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml
new file mode 100644 (file)
index 0000000..663cf2d
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthenticationStatementAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthorityBinding.xml b/samltest/data/saml1/core/impl/singleAuthorityBinding.xml
new file mode 100644 (file)
index 0000000..caf8ac6
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthorityBinding.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthorityBindingAttributes.xml b/samltest/data/saml1/core/impl/singleAuthorityBindingAttributes.xml
new file mode 100644 (file)
index 0000000..648d3a7
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthorityBindingAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionQuery.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionQuery.xml
new file mode 100644 (file)
index 0000000..fcdc19d
--- /dev/null
@@ -0,0 +1 @@
+<samlp:AuthorizationDecisionQuery xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" />
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionQueryAttributes.xml
new file mode 100644 (file)
index 0000000..8ba5439
--- /dev/null
@@ -0,0 +1,3 @@
+<samlp:AuthorizationDecisionQuery xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+Resource="resource"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml
new file mode 100644 (file)
index 0000000..6740ddd
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatement.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml
new file mode 100644 (file)
index 0000000..57abc3d
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml
new file mode 100644 (file)
index 0000000..ca6c5f3
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleAuthorizationDecisionStatementAttributesInvalid.xml differ
diff --git a/samltest/data/saml1/core/impl/singleConditions.xml b/samltest/data/saml1/core/impl/singleConditions.xml
new file mode 100644 (file)
index 0000000..abc1df9
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleConditions.xml differ
diff --git a/samltest/data/saml1/core/impl/singleConditionsAttributes.xml b/samltest/data/saml1/core/impl/singleConditionsAttributes.xml
new file mode 100644 (file)
index 0000000..059c5b0
--- /dev/null
@@ -0,0 +1,3 @@
+<saml:Conditions xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"\r
+                       NotBefore="1970-01-01T01:00:00.123Z" \r
+            NotOnOrAfter="1970-01-01T00:00:01.000Z"/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleConfirmationMethod.xml b/samltest/data/saml1/core/impl/singleConfirmationMethod.xml
new file mode 100644 (file)
index 0000000..4e41930
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleConfirmationMethod.xml differ
diff --git a/samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml b/samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml
new file mode 100644 (file)
index 0000000..2852083
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleConfirmationMethodAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleDoNotCacheCondition.xml b/samltest/data/saml1/core/impl/singleDoNotCacheCondition.xml
new file mode 100644 (file)
index 0000000..74674f6
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleDoNotCacheCondition.xml differ
diff --git a/samltest/data/saml1/core/impl/singleEvidence.xml b/samltest/data/saml1/core/impl/singleEvidence.xml
new file mode 100644 (file)
index 0000000..e684990
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleEvidence.xml differ
diff --git a/samltest/data/saml1/core/impl/singleNameIdentifier.xml b/samltest/data/saml1/core/impl/singleNameIdentifier.xml
new file mode 100644 (file)
index 0000000..b8fea9e
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleNameIdentifier.xml differ
diff --git a/samltest/data/saml1/core/impl/singleNameIdentifierAttributes.xml b/samltest/data/saml1/core/impl/singleNameIdentifierAttributes.xml
new file mode 100644 (file)
index 0000000..cc84bc1
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleNameIdentifierAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleRequest.xml b/samltest/data/saml1/core/impl/singleRequest.xml
new file mode 100644 (file)
index 0000000..d22410c
--- /dev/null
@@ -0,0 +1,4 @@
+<samlp:Request xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleRequestAttributes.xml b/samltest/data/saml1/core/impl/singleRequestAttributes.xml
new file mode 100644 (file)
index 0000000..3cf7ba5
--- /dev/null
@@ -0,0 +1,6 @@
+<samlp:Request xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" \r
+RequestID="ident"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+IssueInstant="1970-01-01T00:00:00.100Z"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleResponse.xml b/samltest/data/saml1/core/impl/singleResponse.xml
new file mode 100644 (file)
index 0000000..c406605
--- /dev/null
@@ -0,0 +1,4 @@
+<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleResponseAttributes.xml b/samltest/data/saml1/core/impl/singleResponseAttributes.xml
new file mode 100644 (file)
index 0000000..fd48ee8
--- /dev/null
@@ -0,0 +1,6 @@
+<samlp:Response xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" ResponseID="ident" InResponseTo="inresponseto"\r
+MajorVersion="1"\r
+MinorVersion="1"\r
+IssueInstant="1970-01-01T00:00:00.100Z"\r
+Recipient="recipient"\r
+/>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleStatus.xml b/samltest/data/saml1/core/impl/singleStatus.xml
new file mode 100644 (file)
index 0000000..2b11e30
--- /dev/null
@@ -0,0 +1 @@
+<samlp:Status xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" ><samlp:StatusCode Value="samlp:Sucess" /></samlp:Status>
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleStatusCode.xml b/samltest/data/saml1/core/impl/singleStatusCode.xml
new file mode 100644 (file)
index 0000000..dd2926e
--- /dev/null
@@ -0,0 +1 @@
+<samlp:StatusCode xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" Value="samlp:Success" />
\ No newline at end of file
diff --git a/samltest/data/saml1/core/impl/singleStatusMessage.xml b/samltest/data/saml1/core/impl/singleStatusMessage.xml
new file mode 100644 (file)
index 0000000..f1629ba
--- /dev/null
@@ -0,0 +1 @@
+<samlp:StatusMessage xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" />\r
diff --git a/samltest/data/saml1/core/impl/singleSubject.xml b/samltest/data/saml1/core/impl/singleSubject.xml
new file mode 100644 (file)
index 0000000..7391b8b
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleSubject.xml differ
diff --git a/samltest/data/saml1/core/impl/singleSubjectConfirmation.xml b/samltest/data/saml1/core/impl/singleSubjectConfirmation.xml
new file mode 100644 (file)
index 0000000..3195cf7
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleSubjectConfirmation.xml differ
diff --git a/samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml b/samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml
new file mode 100644 (file)
index 0000000..beadd0b
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleSubjectConfirmationData.xml differ
diff --git a/samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml b/samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml
new file mode 100644 (file)
index 0000000..f44b980
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleSubjectConfirmationDataAttributes.xml differ
diff --git a/samltest/data/saml1/core/impl/singleSubjectLocality.xml b/samltest/data/saml1/core/impl/singleSubjectLocality.xml
new file mode 100644 (file)
index 0000000..eb86b5b
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleSubjectLocality.xml differ
diff --git a/samltest/data/saml1/core/impl/singleSubjectLocalityAttributes.xml b/samltest/data/saml1/core/impl/singleSubjectLocalityAttributes.xml
new file mode 100644 (file)
index 0000000..adb582c
Binary files /dev/null and b/samltest/data/saml1/core/impl/singleSubjectLocalityAttributes.xml differ
diff --git a/samltest/internal.h b/samltest/internal.h
new file mode 100644 (file)
index 0000000..6707e1f
--- /dev/null
@@ -0,0 +1,105 @@
+/*
+ *  Copyright 2001-2006 Internet2
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <cxxtest/TestSuite.h>
+
+#include <fstream>
+#include <saml/exceptions.h>
+#include <saml/SAMLConfig.h>
+#include <saml/util/SAMLConstants.h>
+#include <xmltooling/XMLObject.h>
+#include <xmltooling/XMLObjectBuilder.h>
+
+using namespace opensaml;
+using namespace xmltooling;
+using namespace std;
+
+extern string data_path;
+
+class SAMLObjectBaseTestCase
+{
+protected:
+    /** Location of file containing a single element with NO optional attributes */
+    string singleElementFile;
+
+    /** Location of file containing a single element with all optional attributes */
+    string singleElementOptionalAttributesFile;
+
+    /** Location of file containing a single element with child elements */
+    string childElementsFile;
+
+    /** The expected result of a marshalled single element with no optional attributes */
+    DOMDocument* expectedDOM;
+
+    /** The expected result of a marshalled single element with all optional attributes */
+    DOMDocument* expectedOptionalAttributesDOM;
+
+    /** The expected result of a marshalled single element with child elements */
+    DOMDocument* expectedChildElementsDOM;
+
+    /**
+     * Unmarshalls an element file into its SAML XMLObject.
+     * 
+     * @return the SAML XMLObject from the file
+     */
+    XMLObject* unmarshallElement(string elementFile) {
+        try {
+            ParserPool& p=XMLToolingConfig::getConfig().getParser();
+            ifstream fs(elementFile.c_str());
+            DOMDocument* doc = p.parse(fs);
+            const XMLObjectBuilder* b = XMLObjectBuilder::getBuilder(doc->getDocumentElement());
+            return b->buildFromDocument(doc);
+        }
+        catch (XMLToolingException& e) {
+            TS_TRACE(e.what());
+            throw;
+        }
+    }
+
+    void assertEquals(const char* failMessage, DOMDocument* expectedDOM, XMLObject* xmlObject) {
+        DOMElement* generatedDOM = xmlObject->marshall();
+        TSM_ASSERT(failMessage,generatedDOM->isEqualNode(expectedDOM->getDocumentElement()));
+    }
+
+    void assertEquals(DOMDocument* expectedDOM, XMLObject* xmlObject) {
+        assertEquals("Marshalled DOM was not the same as the expected DOM", expectedDOM, xmlObject);
+    }
+
+public:
+    void setUp() {
+        ParserPool& p=XMLToolingConfig::getConfig().getParser();
+        if (!singleElementFile.empty()) {
+            ifstream fs(singleElementFile.c_str());
+            expectedDOM = p.parse(fs);
+        }
+
+        if (!singleElementOptionalAttributesFile.empty()) {
+            ifstream fs(singleElementOptionalAttributesFile.c_str());
+            expectedOptionalAttributesDOM = p.parse(fs);
+        }
+
+        if (!childElementsFile.empty()) {
+            ifstream fs(childElementsFile.c_str());
+            expectedChildElementsDOM = p.parse(fs);
+        }
+    }
+    
+    void tearDown() {
+        if (expectedDOM) expectedDOM->release();
+        if (expectedOptionalAttributesDOM) expectedOptionalAttributesDOM->release();
+        if (expectedChildElementsDOM) expectedChildElementsDOM->release();
+    }
+};
diff --git a/samltest/saml1/core/impl/ActionTest.cpp b/samltest/saml1/core/impl/ActionTest.cpp
new file mode 100644 (file)
index 0000000..7fc76dc
--- /dev/null
@@ -0,0 +1,45 @@
+/* Generated file, do not edit */\r
+\r
+#ifndef CXXTEST_RUNNING\r
+#define CXXTEST_RUNNING\r
+#endif\r
+\r
+#define _CXXTEST_HAVE_STD\r
+#define _CXXTEST_HAVE_EH\r
+#define _CXXTEST_ABORT_TEST_ON_FAIL\r
+#include <cxxtest/TestListener.h>\r
+#include <cxxtest/TestTracker.h>\r
+#include <cxxtest/TestRunner.h>\r
+#include <cxxtest/RealDescriptions.h>\r
+\r
+#include "c:\cvs\cpp-opensaml2\samltest\saml1\core\impl\ActionTest.h"\r
+\r
+static ActionTest suite_ActionTest;\r
+\r
+static CxxTest::List Tests_ActionTest = { 0, 0 };\r
+CxxTest::StaticSuiteDescription suiteDescription_ActionTest( "c:\\cvs\\cpp-opensaml2\\samltest\\saml1\\core\\impl\\ActionTest.h", 22, "ActionTest", suite_ActionTest, Tests_ActionTest );\r
+\r
+static class TestDescription_ActionTest_testSingleElementUnmarshall : public CxxTest::RealTestDescription {\r
+public:\r
+ TestDescription_ActionTest_testSingleElementUnmarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 44, "testSingleElementUnmarshall" ) {}\r
+ void runTest() { suite_ActionTest.testSingleElementUnmarshall(); }\r
+} testDescription_ActionTest_testSingleElementUnmarshall;\r
+\r
+static class TestDescription_ActionTest_testSingleElementOptionalAttributesUnmarshall : public CxxTest::RealTestDescription {\r
+public:\r
+ TestDescription_ActionTest_testSingleElementOptionalAttributesUnmarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 52, "testSingleElementOptionalAttributesUnmarshall" ) {}\r
+ void runTest() { suite_ActionTest.testSingleElementOptionalAttributesUnmarshall(); }\r
+} testDescription_ActionTest_testSingleElementOptionalAttributesUnmarshall;\r
+\r
+static class TestDescription_ActionTest_testSingleElementMarshall : public CxxTest::RealTestDescription {\r
+public:\r
+ TestDescription_ActionTest_testSingleElementMarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 59, "testSingleElementMarshall" ) {}\r
+ void runTest() { suite_ActionTest.testSingleElementMarshall(); }\r
+} testDescription_ActionTest_testSingleElementMarshall;\r
+\r
+static class TestDescription_ActionTest_testSingleElementOptionalAttributesMarshall : public CxxTest::RealTestDescription {\r
+public:\r
+ TestDescription_ActionTest_testSingleElementOptionalAttributesMarshall() : CxxTest::RealTestDescription( Tests_ActionTest, suiteDescription_ActionTest, 64, "testSingleElementOptionalAttributesMarshall" ) {}\r
+ void runTest() { suite_ActionTest.testSingleElementOptionalAttributesMarshall(); }\r
+} testDescription_ActionTest_testSingleElementOptionalAttributesMarshall;\r
+\r
diff --git a/samltest/saml1/core/impl/ActionTest.h b/samltest/saml1/core/impl/ActionTest.h
new file mode 100644 (file)
index 0000000..26e4580
--- /dev/null
@@ -0,0 +1,71 @@
+/*\r
+ *  Copyright 2001-2006 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "internal.h"\r
+#include <saml/saml1/core/Assertions.h>\r
+\r
+using namespace opensaml::saml1;\r
+\r
+class ActionTest : public CxxTest::TestSuite, public SAMLObjectBaseTestCase {\r
+    XMLCh* expectedContents;\r
+    XMLCh* expectedNamespace;\r
+    QName* qname;\r
+\r
+public:\r
+    void setUp() {\r
+        singleElementFile = data_path + "saml1/core/impl/singleAction.xml";\r
+        singleElementOptionalAttributesFile  = data_path + "saml1/core/impl/singleActionAttributes.xml";    \r
+        expectedContents = XMLString::transcode("Action Contents");\r
+        expectedNamespace = XMLString::transcode("namespace");\r
+        qname = new QName(SAMLConstants::SAML1_NS, Action::LOCAL_NAME, SAMLConstants::SAML1_PREFIX);\r
+        SAMLObjectBaseTestCase::setUp();\r
+    }\r
+    \r
+    void tearDown() {\r
+        delete qname;\r
+        XMLString::release(&expectedContents);\r
+        XMLString::release(&expectedNamespace);\r
+        SAMLObjectBaseTestCase::tearDown();\r
+    }\r
+\r
+    void testSingleElementUnmarshall() {\r
+        auto_ptr<XMLObject> xo(unmarshallElement(singleElementFile));\r
+        Action* action = dynamic_cast<Action*>(xo.get());\r
+        TS_ASSERT(action!=NULL);\r
+        TSM_ASSERT("namespace attribute present", action->getNamespace()==NULL);\r
+        TSM_ASSERT("Contents present", action->getValue()==NULL);\r
+    }\r
+\r
+    void testSingleElementOptionalAttributesUnmarshall() {\r
+        auto_ptr<XMLObject> xo(unmarshallElement(singleElementOptionalAttributesFile));\r
+        Action* action = dynamic_cast<Action*>(xo.get());\r
+        TSM_ASSERT_SAME_DATA("namespace attribute ", expectedNamespace, action->getNamespace(), XMLString::stringLen(expectedNamespace));\r
+        TSM_ASSERT_SAME_DATA("Contents ", expectedContents, action->getValue(), XMLString::stringLen(expectedContents));\r
+    }\r
+\r
+    void testSingleElementMarshall() {\r
+        auto_ptr<Action> action(ActionBuilder::buildAction());\r
+        assertEquals(expectedDOM, action.get());\r
+    }\r
+\r
+    void testSingleElementOptionalAttributesMarshall() {\r
+        auto_ptr<Action> action(ActionBuilder::buildAction());\r
+        action->setNamespace(expectedNamespace);\r
+        action->setValue(expectedContents);\r
+        assertEquals(expectedOptionalAttributesDOM, action.get());\r
+    }\r
+\r
+};\r
diff --git a/samltest/samltest.cpp b/samltest/samltest.cpp
new file mode 100644 (file)
index 0000000..faa040e
--- /dev/null
@@ -0,0 +1,32 @@
+/* Generated file, do not edit */\r
+\r
+#ifndef CXXTEST_RUNNING\r
+#define CXXTEST_RUNNING\r
+#endif\r
+\r
+#define _CXXTEST_HAVE_STD\r
+#define _CXXTEST_HAVE_EH\r
+#define _CXXTEST_ABORT_TEST_ON_FAIL\r
+#include <cxxtest/TestListener.h>\r
+#include <cxxtest/TestTracker.h>\r
+#include <cxxtest/TestRunner.h>\r
+#include <cxxtest/RealDescriptions.h>\r
+#include <cxxtest/ErrorPrinter.h>\r
+\r
+int main() {\r
+ return CxxTest::ErrorPrinter().run();\r
+}\r
+#include "c:\cvs\cpp-opensaml2\samltest\samltest.h"\r
+\r
+static GlobalTest suite_GlobalTest;\r
+\r
+static CxxTest::List Tests_GlobalTest = { 0, 0 };\r
+CxxTest::StaticSuiteDescription suiteDescription_GlobalTest( "c:\\cvs\\cpp-opensaml2\\samltest\\samltest.h", 59, "GlobalTest", suite_GlobalTest, Tests_GlobalTest );\r
+\r
+static class TestDescription_GlobalTest_testGlobal : public CxxTest::RealTestDescription {\r
+public:\r
+ TestDescription_GlobalTest_testGlobal() : CxxTest::RealTestDescription( Tests_GlobalTest, suiteDescription_GlobalTest, 62, "testGlobal" ) {}\r
+ void runTest() { suite_GlobalTest.testGlobal(); }\r
+} testDescription_GlobalTest_testGlobal;\r
+\r
+#include <cxxtest/Root.cpp>\r
diff --git a/samltest/samltest.h b/samltest/samltest.h
new file mode 100644 (file)
index 0000000..4033914
--- /dev/null
@@ -0,0 +1,64 @@
+/*\r
+ *  Copyright 2001-2005 Internet2\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+#include "internal.h"\r
+\r
+#include <fstream>\r
+#include <cxxtest/GlobalFixture.h>\r
+\r
+//#define SAML_LEAKCHECK\r
+\r
+std::string data_path = "../samltest/data/";\r
+\r
+class SAMLFixture : public CxxTest::GlobalFixture\r
+{\r
+public:\r
+    bool setUpWorld() {\r
+        XMLToolingConfig::getConfig().log_config();\r
+        if (!SAMLConfig::getConfig().init())\r
+            return false;\r
+        if (getenv("SAMLTEST_DATA"))\r
+            data_path=std::string(getenv("SAMLTEST_DATA")) + "/";\r
+        //std::string catpath=data_path + "catalog.xml";\r
+        //auto_ptr_XMLCh temp(catpath.c_str());\r
+        //return XMLToolingConfig::getConfig().getValidatingParser().loadCatalog(temp.get());\r
+        return true;\r
+    }\r
+    bool tearDownWorld() {\r
+        SAMLConfig::getConfig().term();\r
+#if defined(_MSC_VER ) && defined(SAML_LEAKCHECK)\r
+       _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );\r
+       _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );\r
+       _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );\r
+       _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT );\r
+       _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );\r
+       _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );\r
+       _CrtDumpMemoryLeaks();\r
+#endif\r
+        return true;\r
+    }\r
+    //bool setUp() { printf( "</test>" ); return true; }\r
+    //bool tearDown() { printf( "</test>" ); return true; }\r
+};\r
+\r
+static SAMLFixture globalFixture;\r
+\r
+class GlobalTest : public CxxTest::TestSuite\r
+{\r
+public:\r
+    void testGlobal() {\r
+    }\r
+};\r
diff --git a/samltest/samltest.vcproj b/samltest/samltest.vcproj
new file mode 100644 (file)
index 0000000..bca3280
--- /dev/null
@@ -0,0 +1,277 @@
+<?xml version="1.0" encoding="Windows-1252"?>\r
+<VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="8.00"\r
+       Name="samltest"\r
+       ProjectGUID="{8BBB3B12-DBA1-4533-9C36-2CA95F1F1659}"\r
+       RootNamespace="samltest"\r
+       Keyword="Win32Proj"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Debug|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(ProjectDir)&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"\r
+                               MinimalRebuild="true"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="3"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="4"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\cpp-xmltooling\Debug\xmltooling_1D.lib xerces-c_2D.lib xsec_1D.lib"\r
+                               LinkIncremental="2"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Release|Win32"\r
+                       OutputDirectory="$(SolutionDir)$(ConfigurationName)"\r
+                       IntermediateDirectory="$(ConfigurationName)"\r
+                       ConfigurationType="1"\r
+                       CharacterSet="1"\r
+                       WholeProgramOptimization="1"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               AdditionalIncludeDirectories="&quot;$(SolutionDir)&quot;;&quot;$(ProjectDir)&quot;;&quot;..\..\cpp-xmltooling&quot;"\r
+                               PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"\r
+                               RuntimeLibrary="2"\r
+                               UsePrecompiledHeader="0"\r
+                               WarningLevel="3"\r
+                               Detect64BitPortabilityProblems="true"\r
+                               DebugInformationFormat="3"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalDependencies="..\..\cpp-xmltooling\Release\xmltooling_1.lib xerces-c_2.lib xsec_1.lib"\r
+                               LinkIncremental="1"\r
+                               GenerateDebugInformation="true"\r
+                               SubSystem="1"\r
+                               OptimizeReferences="2"\r
+                               EnableCOMDATFolding="2"\r
+                               TargetMachine="1"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebDeploymentTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Generated Files"\r
+                       Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"\r
+                       UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\samltest.cpp"\r
+                               >\r
+                       </File>\r
+                       <Filter\r
+                               Name="saml1"\r
+                               >\r
+                               <Filter\r
+                                       Name="core"\r
+                                       >\r
+                                       <Filter\r
+                                               Name="impl"\r
+                                               >\r
+                                               <File\r
+                                                       RelativePath=".\saml1\core\impl\ActionTest.cpp"\r
+                                                       >\r
+                                               </File>\r
+                                       </Filter>\r
+                               </Filter>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Unit Tests"\r
+                       Filter="h;hpp;hxx;hm;inl;inc;xsd"\r
+                       UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"\r
+                       >\r
+                       <File\r
+                               RelativePath=".\internal.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath=".\samltest.h"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                               CommandLine="\perl\bin\perl.exe -w \cxxtest\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o &quot;$(InputName)&quot;.cpp &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                               Outputs="$(Input).cpp"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCCustomBuildTool"\r
+                                               CommandLine="\perl\bin\perl.exe -w \cxxtest\cxxtestgen.pl --error-printer --have-eh --have-std --abort-on-fail -o &quot;$(InputName)&quot;.cpp &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                               Outputs="$(Input).cpp"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+                       <Filter\r
+                               Name="saml1"\r
+                               >\r
+                               <Filter\r
+                                       Name="core"\r
+                                       >\r
+                                       <Filter\r
+                                               Name="impl"\r
+                                               >\r
+                                               <File\r
+                                                       RelativePath=".\saml1\core\impl\ActionTest.h"\r
+                                                       >\r
+                                                       <FileConfiguration\r
+                                                               Name="Debug|Win32"\r
+                                                               >\r
+                                                               <Tool\r
+                                                                       Name="VCCustomBuildTool"\r
+                                                                       CommandLine="\perl\bin\perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o &quot;$(InputDir)$(InputName)&quot;.cpp &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                                                       Outputs="&quot;$(InputDir)$(InputName)&quot;.cpp"\r
+                                                               />\r
+                                                       </FileConfiguration>\r
+                                                       <FileConfiguration\r
+                                                               Name="Release|Win32"\r
+                                                               >\r
+                                                               <Tool\r
+                                                                       Name="VCCustomBuildTool"\r
+                                                                       CommandLine="\perl\bin\perl.exe -w \cxxtest\cxxtestgen.pl --part --have-eh --have-std --abort-on-fail -o &quot;$(InputDir)$(InputName)&quot;.cpp &quot;$(InputPath)&quot;&#x0D;&#x0A;"\r
+                                                                       Outputs="&quot;$(InputDir)$(InputName)&quot;.cpp"\r
+                                                               />\r
+                                                       </FileConfiguration>\r
+                                               </File>\r
+                                       </Filter>\r
+                               </Filter>\r
+                       </Filter>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"\r
+                       UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"\r
+                       >\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+</VisualStudioProject>\r