/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/**
* MetadataImpl.cpp
*
- * Implementation classes for SAML 2.0 Assertions schema
+ * Implementation classes for SAML 2.0 Metadata schema.
*/
#include "internal.h"
#include "exceptions.h"
#include "saml2/metadata/Metadata.h"
+#include "signature/ContentReference.h"
#include <xmltooling/AbstractComplexElement.h>
#include <xmltooling/AbstractSimpleElement.h>
+#include <xmltooling/encryption/Encryption.h>
#include <xmltooling/impl/AnyElement.h>
#include <xmltooling/io/AbstractXMLObjectMarshaller.h>
#include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
+#include <xmltooling/signature/KeyInfo.h>
+#include <xmltooling/signature/Signature.h>
+#include <xmltooling/util/DateTime.h>
#include <xmltooling/util/XMLHelper.h>
#include <ctime>
#include <xercesc/util/XMLUniDefs.hpp>
+#include <xsec/framework/XSECDefs.hpp>
using namespace samlconstants;
using namespace opensaml::saml2md;
using namespace opensaml::saml2;
-using namespace opensaml;
using namespace xmlencryption;
using namespace xmlsignature;
using namespace xmltooling;
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Lang=NULL;
+ m_Lang=nullptr;
+ m_LangPrefix=nullptr;
}
protected:
public:
virtual ~localizedNameTypeImpl() {
XMLString::release(&m_Lang);
+ XMLString::release(&m_LangPrefix);
}
- localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
: AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
init();
setLang(src.getLang());
+ if (src.m_LangPrefix)
+ m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
}
IMPL_XMLOBJECT_CLONE(localizedNameType);
- IMPL_STRING_ATTRIB(Lang);
+ IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
+ if (m_Lang && *m_Lang) {
+ DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
+ if (m_LangPrefix && *m_LangPrefix)
+ attr->setPrefix(m_LangPrefix);
+ attr->setNodeValue(m_Lang);
+ domElement->setAttributeNodeNS(attr);
+ }
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
+ if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
+ setLang(attribute->getValue());
+ const XMLCh* temp = attribute->getPrefix();
+ if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
+ m_LangPrefix = XMLString::replicate(temp);
+ return;
+ }
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Lang=NULL;
+ m_Lang=nullptr;
+ m_LangPrefix=nullptr;
}
protected:
public:
virtual ~localizedURITypeImpl() {
XMLString::release(&m_Lang);
+ XMLString::release(&m_LangPrefix);
}
- localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
: AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
init();
setLang(src.getLang());
+ if (src.m_LangPrefix)
+ m_LangPrefix = XMLString::replicate(src.m_LangPrefix);
}
IMPL_XMLOBJECT_CLONE(localizedURIType);
- IMPL_STRING_ATTRIB(Lang);
+ IMPL_XMLOBJECT_FOREIGN_ATTRIB(Lang,XMLCh);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
+ if (m_Lang && *m_Lang) {
+ DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(xmlconstants::XML_NS,LANG_ATTRIB_NAME);
+ if (m_LangPrefix && *m_LangPrefix)
+ attr->setPrefix(m_LangPrefix);
+ attr->setNodeValue(m_Lang);
+ domElement->setAttributeNodeNS(attr);
+ }
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
+ if (XMLHelper::isNodeNamed(attribute, xmlconstants::XML_NS, LANG_ATTRIB_NAME)) {
+ setLang(attribute->getValue());
+ const XMLCh* temp = attribute->getPrefix();
+ if (temp && *temp && !XMLString::equals(temp, xmlconstants::XML_NS))
+ m_LangPrefix = XMLString::replicate(temp);
+ return;
+ }
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public:
virtual ~OrganizationNameImpl() {}
- OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
public:
virtual ~OrganizationDisplayNameImpl() {}
- OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
public:
virtual ~OrganizationURLImpl() {}
- OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
public:
virtual ~ServiceNameImpl() {}
- ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
public:
virtual ~ServiceDescriptionImpl() {}
- ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
public:
virtual ~ExtensionsImpl() {}
- ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
}
list<XMLObject*>::iterator m_pos_OrganizationURL;
void init() {
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_Extensions=NULL;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_Extensions=nullptr;
m_pos_Extensions=m_children.begin();
m_pos_OrganizationDisplayName=m_pos_Extensions;
++m_pos_OrganizationDisplayName;
public:
virtual ~OrganizationImpl() {}
- OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
list<XMLObject*>::iterator m_pos_TelephoneNumber;
void init() {
- m_ContactType=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_Extensions=NULL;
- m_Company=NULL;
- m_GivenName=NULL;
- m_SurName=NULL;
+ m_ContactType=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_Extensions=nullptr;
+ m_Company=nullptr;
+ m_GivenName=nullptr;
+ m_SurName=nullptr;
m_pos_Extensions=m_children.begin();
m_pos_Company=m_pos_Extensions;
++m_pos_Company;
++m_pos_TelephoneNumber;
}
public:
- virtual ~ContactPersonImpl() {}
+ virtual ~ContactPersonImpl() {
+ XMLString::release(&m_ContactType);
+ }
- ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
setContactType(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
+ MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,nullptr);
marshallExtensionAttributes(domElement);
}
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Namespace=NULL;
+ m_Namespace=nullptr;
}
public:
XMLString::release(&m_Namespace);
}
- AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
+ MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
+ PROC_STRING_ATTRIB(Namespace,NAMESPACE,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Use=NULL;
- m_KeyInfo=NULL;
- m_children.push_back(NULL);
+ m_Use=nullptr;
+ m_KeyInfo=nullptr;
+ m_children.push_back(nullptr);
m_pos_KeyInfo=m_children.begin();
}
public:
XMLString::release(&m_Use);
}
- KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Use,USE,NULL);
+ MARSHALL_STRING_ATTRIB(Use,USE,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_STRING_ATTRIB(Use,USE,NULL);
+ PROC_STRING_ATTRIB(Use,USE,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Binding=m_Location=m_ResponseLocation=NULL;
+ m_Binding=m_Location=m_ResponseLocation=nullptr;
}
protected:
XMLString::release(&m_ResponseLocation);
}
- EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
}
IMPL_STRING_ATTRIB(ResponseLocation);
IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
setBinding(value);
}
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
- MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
- MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
+ MARSHALL_STRING_ATTRIB(Binding,BINDING,nullptr);
+ MARSHALL_STRING_ATTRIB(Location,LOCATION,nullptr);
+ MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,nullptr);
marshallExtensionAttributes(domElement);
}
class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
{
void init() {
- m_Index=NULL;
+ m_Index=nullptr;
m_isDefault=XML_BOOL_NULL;
}
XMLString::release(&m_Index);
}
- IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
IMPL_INTEGER_ATTRIB(Index);
IMPL_BOOLEAN_ATTRIB(isDefault);
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
setIndex(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
- MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
+ MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
+ MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
EndpointTypeImpl::marshallAttributes(domElement);
}
};
public:
virtual ~ArtifactResolutionServiceImpl() {}
- ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
public:
virtual ~SingleLogoutServiceImpl() {}
- SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~ManageNameIDServiceImpl() {}
- ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~SingleSignOnServiceImpl() {}
- SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~NameIDMappingServiceImpl() {}
- NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~AssertionIDRequestServiceImpl() {}
- AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~AssertionConsumerServiceImpl() {}
- AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
public:
virtual ~AuthnQueryServiceImpl() {}
- AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~AuthzServiceImpl() {}
- AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public:
virtual ~AttributeServiceImpl() {}
- AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
- m_ValidUntil=m_CacheDuration=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_Signature=NULL;
- m_Extensions=NULL;
- m_Organization=NULL;
+ m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=nullptr;
+ m_ValidUntil=m_CacheDuration=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_Signature=nullptr;
+ m_Extensions=nullptr;
+ m_Organization=nullptr;
m_pos_Signature=m_children.begin();
m_pos_Extensions=m_pos_Signature;
++m_pos_Extensions;
delete m_CacheDuration;
}
- RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_ID_ATTRIB(ID);
+ IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
IMPL_STRING_ATTRIB(ErrorURL);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
return true;
if (m_ProtocolSupportEnumeration) {
// Look for first character.
- unsigned int len=XMLString::stringLen(protocol);
- unsigned int pos=0;
+ xsecsize_t len=XMLString::stringLen(protocol);
+ xsecsize_t pos=0;
int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
while (index>=0) {
// Only possible match is if it's the first character or a space comes before it.
}
}
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
setID(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(ID,ID,NULL);
- MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
- MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
- MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
- MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
+ MARSHALL_ID_ATTRIB(ID,ID,nullptr);
+ MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,nullptr);
+ MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,nullptr);
+ MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
+ MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
marshallExtensionAttributes(domElement);
}
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(ID,ID,NULL);
+ PROC_ID_ATTRIB(ID,ID,nullptr);
unmarshallExtensionAttribute(attribute);
}
};
public:
virtual ~RoleDescriptorTypeImpl() {}
- RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
}
class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
{
void init() {
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_ArtifactResolutionService=m_pos_ContactPerson;
++m_pos_ArtifactResolutionService;
m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
public:
virtual ~SSODescriptorTypeImpl() {}
- SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
void init() {
m_WantAuthnRequestsSigned=XML_BOOL_NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_SingleSignOnService=m_pos_NameIDFormat;
++m_pos_SingleSignOnService;
m_pos_NameIDMappingService=m_pos_SingleSignOnService;
public:
virtual ~IDPSSODescriptorImpl() {}
- IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
setWantAuthnRequestsSigned(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
+ MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,nullptr);
RoleDescriptorImpl::marshallAttributes(domElement);
}
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_Name=m_NameFormat=m_FriendlyName=NULL;
+ m_Name=m_NameFormat=m_FriendlyName=nullptr;
m_isRequired=XML_BOOL_NULL;
}
public:
XMLString::release(&m_FriendlyName);
}
- RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
IMPL_BOOLEAN_ATTRIB(isRequired);
IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
setName(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
- MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
- MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
- MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
+ MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
+ MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,nullptr);
+ MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,nullptr);
+ MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,nullptr);
marshallExtensionAttributes(domElement);
}
list<XMLObject*>::iterator m_pos_RequestedAttribute;
void init() {
- m_Index=NULL;
+ m_Index=nullptr;
m_isDefault=XML_BOOL_NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_ServiceDescription=m_children.begin();
m_pos_RequestedAttribute=m_pos_ServiceDescription;
++m_pos_RequestedAttribute;
XMLString::release(&m_Index);
}
- AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
- MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
+ MARSHALL_INTEGER_ATTRIB(Index,INDEX,nullptr);
+ MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
- PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
+ PROC_INTEGER_ATTRIB(Index,INDEX,nullptr);
+ PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,nullptr);
AbstractXMLObjectUnmarshaller::processAttribute(attribute);
}
};
void init() {
m_AuthnRequestsSigned=XML_BOOL_NULL;
m_WantAssertionsSigned=XML_BOOL_NULL;
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
m_pos_AssertionConsumerService=m_pos_NameIDFormat;
++m_pos_AssertionConsumerService;
}
public:
virtual ~SPSSODescriptorImpl() {}
- SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
setAuthnRequestsSigned(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
- MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
+ MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,nullptr);
+ MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
RoleDescriptorImpl::marshallAttributes(domElement);
}
list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
void init() {
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_AuthnQueryService=m_pos_ContactPerson;
++m_pos_AuthnQueryService;
m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
public:
virtual ~AuthnAuthorityDescriptorImpl() {}
- AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
void init() {
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_AuthzService=m_pos_ContactPerson;
++m_pos_AuthzService;
m_pos_AssertionIDRequestService=m_pos_AuthzService;
public:
virtual ~PDPDescriptorImpl() {}
- PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
list<XMLObject*>::iterator m_pos_AttributeProfile;
void init() {
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
m_pos_AttributeService=m_pos_ContactPerson;
++m_pos_AttributeService;
m_pos_AssertionIDRequestService=m_pos_AttributeService;
public:
virtual ~AttributeAuthorityDescriptorImpl() {}
- AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
{
void init() {
m_WantAssertionsSigned=XML_BOOL_NULL;
- m_children.push_back(NULL);
+ m_children.push_back(nullptr);
m_pos_NameIDFormat=m_pos_ContactPerson;
++m_pos_NameIDFormat;
}
public:
virtual ~QueryDescriptorTypeImpl() {}
- QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
setWantAssertionsSigned(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
+ MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,nullptr);
RoleDescriptorImpl::marshallAttributes(domElement);
}
public:
virtual ~AuthnQueryDescriptorTypeImpl() {}
- AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
public:
virtual ~AttributeQueryDescriptorTypeImpl() {}
- AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
public:
virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
- AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
list<XMLObject*>::iterator m_pos_AffiliateMember;
void init() {
- m_ID=m_AffiliationOwnerID=NULL;
- m_ValidUntil=m_CacheDuration=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_Signature=NULL;
- m_Extensions=NULL;
+ m_ID=m_AffiliationOwnerID=nullptr;
+ m_ValidUntil=m_CacheDuration=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_Signature=nullptr;
+ m_Extensions=nullptr;
m_pos_Signature=m_children.begin();
m_pos_Extensions=m_pos_Signature;
++m_pos_Extensions;
delete m_CacheDuration;
}
- AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_ID_ATTRIB(ID);
+ IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
IMPL_STRING_ATTRIB(AffiliationOwnerID);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DURATION_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
setID(value);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(ID,ID,NULL);
- MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
- MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
- MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
+ MARSHALL_ID_ATTRIB(ID,ID,nullptr);
+ MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,nullptr);
+ MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
+ MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
marshallExtensionAttributes(domElement);
}
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(ID,ID,NULL);
+ PROC_ID_ATTRIB(ID,ID,nullptr);
unmarshallExtensionAttribute(attribute);
}
};
list<XMLObject*>::iterator m_pos_ContactPerson;
void init() {
- m_ID=m_EntityID=NULL;
- m_ValidUntil=m_CacheDuration=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_Signature=NULL;
- m_Extensions=NULL;
- m_AffiliationDescriptor=NULL;
- m_Organization=NULL;
+ m_ID=m_EntityID=nullptr;
+ m_ValidUntil=m_CacheDuration=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_Signature=nullptr;
+ m_Extensions=nullptr;
+ m_AffiliationDescriptor=nullptr;
+ m_Organization=nullptr;
m_pos_Signature=m_children.begin();
m_pos_Extensions=m_pos_Signature;
++m_pos_Extensions;
delete m_CacheDuration;
}
- EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_ID_ATTRIB(ID);
+ IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
IMPL_STRING_ATTRIB(EntityID);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DURATION_ATTRIB(CacheDuration,0);
IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
- void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+ void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
if (!qualifiedName.hasNamespaceURI()) {
if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
setID(value);
vector<RoleDescriptor*>::const_iterator i =
find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
- return (i!=m_RoleDescriptors.end()) ? *i : NULL;
+ return (i!=m_RoleDescriptors.end()) ? *i : nullptr;
}
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(ID,ID,NULL);
- MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
- MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
- MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
+ MARSHALL_ID_ATTRIB(ID,ID,nullptr);
+ MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,nullptr);
+ MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
+ MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
marshallExtensionAttributes(domElement);
}
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(ID,ID,NULL);
+ PROC_ID_ATTRIB(ID,ID,nullptr);
unmarshallExtensionAttribute(attribute);
}
};
public AbstractXMLObjectUnmarshaller
{
void init() {
- m_ID=m_Name=NULL;
- m_ValidUntil=m_CacheDuration=NULL;
- m_children.push_back(NULL);
- m_children.push_back(NULL);
- m_Signature=NULL;
- m_Extensions=NULL;
+ m_ID=m_Name=nullptr;
+ m_ValidUntil=m_CacheDuration=nullptr;
+ m_children.push_back(nullptr);
+ m_children.push_back(nullptr);
+ m_Signature=nullptr;
+ m_Extensions=nullptr;
m_pos_Signature=m_children.begin();
m_pos_Extensions=m_pos_Signature;
++m_pos_Extensions;
delete m_CacheDuration;
}
- EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+ EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
: AbstractXMLObject(nsURI, localName, prefix, schemaType) {
init();
}
m_Signature->setContentReference(new opensaml::ContentReference(*this));
}
- IMPL_ID_ATTRIB(ID);
+ IMPL_ID_ATTRIB_EX(ID,ID,nullptr);
IMPL_STRING_ATTRIB(Name);
IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
IMPL_DURATION_ATTRIB(CacheDuration,0);
protected:
void marshallAttributes(DOMElement* domElement) const {
- MARSHALL_ID_ATTRIB(ID,ID,NULL);
- MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
- MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
- MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
+ MARSHALL_ID_ATTRIB(ID,ID,nullptr);
+ MARSHALL_STRING_ATTRIB(Name,NAME,nullptr);
+ MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
+ MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
}
void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
}
void processAttribute(const DOMAttr* attribute) {
- PROC_ID_ATTRIB(ID,ID,NULL);
- PROC_STRING_ATTRIB(Name,NAME,NULL);
- PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
- PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
+ PROC_ID_ATTRIB(ID,ID,nullptr);
+ PROC_STRING_ATTRIB(Name,NAME,nullptr);
+ PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,nullptr);
+ PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,nullptr);
}
};
+ class SAML_DLLLOCAL EntityAttributesImpl : public virtual EntityAttributes,
+ public AbstractComplexElement,
+ public AbstractDOMCachingXMLObject,
+ public AbstractXMLObjectMarshaller,
+ public AbstractXMLObjectUnmarshaller
+ {
+ public:
+ virtual ~EntityAttributesImpl() {}
+
+ EntityAttributesImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
+ : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
+ }
+
+ EntityAttributesImpl(const EntityAttributesImpl& src)
+ : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
+ for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
+ if (*i) {
+ Attribute* a=dynamic_cast<Attribute*>(*i);
+ if (a) {
+ getAttributes().push_back(a->cloneAttribute());
+ continue;
+ }
+
+ saml2::Assertion* as=dynamic_cast<saml2::Assertion*>(*i);
+ if (as) {
+ getAssertions().push_back(as->cloneAssertion());
+ continue;
+ }
+ }
+ }
+ }
+
+ IMPL_XMLOBJECT_CLONE(EntityAttributes);
+
+ IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
+ IMPL_TYPED_FOREIGN_CHILDREN(Assertion,saml2,m_children.end());
+
+ protected:
+ void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
+ PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
+ PROC_TYPED_FOREIGN_CHILDREN(Assertion,saml2,SAML20_NS,false);
+ AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
+ }
+ };
};
};
IMPL_XMLOBJECTBUILDER(ActionNamespace);
IMPL_XMLOBJECTBUILDER(SourceID);
+IMPL_XMLOBJECTBUILDER(EntityAttributes);
#ifdef HAVE_COVARIANT_RETURNS
RoleDescriptor* RoleDescriptorBuilder::buildObject(
#else
xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
#endif
- const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType
+ const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType
) const
{
return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
const XMLCh EntityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
+const XMLCh EntityAttributes::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s);
+const XMLCh EntityAttributes::TYPE_NAME[] = UNICODE_LITERAL_20(E,n,t,i,t,y,A,t,t,r,i,b,u,t,e,s,T,y,p,e);
const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);