2 * Copyright 2001-2006 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 2.0 Assertions schema
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
26 #include "saml2/metadata/MetadataKeyInfoIterator.h"
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractElementProxy.h>
30 #include <xmltooling/AbstractSimpleElement.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/util/XMLHelper.h>
37 #include <xercesc/util/XMLUniDefs.hpp>
39 using namespace opensaml::saml2md;
40 using namespace opensaml::saml2;
41 using namespace opensaml;
42 using namespace xmlencryption;
43 using namespace xmlsignature;
44 using namespace xmltooling;
46 using xmlconstants::XMLSIG_NS;
47 using xmlconstants::XML_BOOL_NULL;
48 using samlconstants::SAML20_NS;
49 using samlconstants::SAML20MD_NS;
51 #if defined (_MSC_VER)
52 #pragma warning( push )
53 #pragma warning( disable : 4250 4251 )
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
68 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
69 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
71 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
72 public AbstractSimpleElement,
73 public AbstractDOMCachingXMLObject,
74 public AbstractXMLObjectMarshaller,
75 public AbstractXMLObjectUnmarshaller
82 localizedNameTypeImpl() {
87 virtual ~localizedNameTypeImpl() {
88 XMLString::release(&m_Lang);
91 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
92 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
96 localizedNameTypeImpl(const localizedNameTypeImpl& src)
97 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
99 setLang(src.getLang());
102 IMPL_XMLOBJECT_CLONE(localizedNameType);
103 IMPL_STRING_ATTRIB(Lang);
106 void marshallAttributes(DOMElement* domElement) const {
107 MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
110 void processAttribute(const DOMAttr* attribute) {
111 PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
112 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
116 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
117 public AbstractSimpleElement,
118 public AbstractDOMCachingXMLObject,
119 public AbstractXMLObjectMarshaller,
120 public AbstractXMLObjectUnmarshaller
127 localizedURITypeImpl() {
132 virtual ~localizedURITypeImpl() {
133 XMLString::release(&m_Lang);
136 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
137 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
141 localizedURITypeImpl(const localizedURITypeImpl& src)
142 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
144 setLang(src.getLang());
147 IMPL_XMLOBJECT_CLONE(localizedURIType);
148 IMPL_STRING_ATTRIB(Lang);
151 void marshallAttributes(DOMElement* domElement) const {
152 MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
155 void processAttribute(const DOMAttr* attribute) {
156 PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
157 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
161 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
164 virtual ~OrganizationNameImpl() {}
166 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
167 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
169 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
171 IMPL_XMLOBJECT_CLONE(OrganizationName);
172 localizedNameType* clonelocalizedNameType() const {
173 return new OrganizationNameImpl(*this);
177 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
180 virtual ~OrganizationDisplayNameImpl() {}
182 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
183 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
185 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
187 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
188 localizedNameType* clonelocalizedNameType() const {
189 return new OrganizationDisplayNameImpl(*this);
193 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
196 virtual ~OrganizationURLImpl() {}
198 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
199 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
201 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
203 IMPL_XMLOBJECT_CLONE(OrganizationURL);
204 localizedURIType* clonelocalizedURIType() const {
205 return new OrganizationURLImpl(*this);
209 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
212 virtual ~ServiceNameImpl() {}
214 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
215 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
217 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
219 IMPL_XMLOBJECT_CLONE(ServiceName);
220 localizedNameType* clonelocalizedNameType() const {
221 return new ServiceNameImpl(*this);
225 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
228 virtual ~ServiceDescriptionImpl() {}
230 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
231 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
233 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
235 IMPL_XMLOBJECT_CLONE(ServiceDescription);
236 localizedNameType* clonelocalizedNameType() const {
237 return new ServiceDescriptionImpl(*this);
241 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
242 public AbstractElementProxy,
243 public AbstractDOMCachingXMLObject,
244 public AbstractXMLObjectMarshaller,
245 public AbstractXMLObjectUnmarshaller
248 virtual ~ExtensionsImpl() {}
250 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
251 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
254 ExtensionsImpl(const ExtensionsImpl& src)
255 : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
256 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
258 getXMLObjects().push_back((*i)->clone());
263 IMPL_XMLOBJECT_CLONE(Extensions);
266 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
268 const XMLCh* nsURI=root->getNamespaceURI();
269 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
270 getXMLObjects().push_back(childXMLObject);
274 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
278 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
279 public AbstractComplexElement,
280 public AbstractAttributeExtensibleXMLObject,
281 public AbstractDOMCachingXMLObject,
282 public AbstractXMLObjectMarshaller,
283 public AbstractXMLObjectUnmarshaller
285 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
286 list<XMLObject*>::iterator m_pos_OrganizationURL;
289 m_children.push_back(NULL);
290 m_children.push_back(NULL);
291 m_children.push_back(NULL);
293 m_pos_Extensions=m_children.begin();
294 m_pos_OrganizationDisplayName=m_pos_Extensions;
295 ++m_pos_OrganizationDisplayName;
296 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
297 ++m_pos_OrganizationURL;
300 virtual ~OrganizationImpl() {}
302 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
303 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
307 OrganizationImpl(const OrganizationImpl& src)
308 : AbstractXMLObject(src), AbstractComplexElement(src),
309 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
311 if (src.getExtensions())
312 setExtensions(src.getExtensions()->cloneExtensions());
313 VectorOf(OrganizationName) v=getOrganizationNames();
314 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
316 v.push_back((*i)->cloneOrganizationName());
319 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
320 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
322 w.push_back((*j)->cloneOrganizationDisplayName());
325 VectorOf(OrganizationURL) x=getOrganizationURLs();
326 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
328 x.push_back((*k)->cloneOrganizationURL());
333 IMPL_XMLOBJECT_CLONE(Organization);
334 IMPL_TYPED_CHILD(Extensions);
335 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
336 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
337 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
340 void marshallAttributes(DOMElement* domElement) const {
341 marshallExtensionAttributes(domElement);
344 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
345 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
346 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
347 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
348 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
349 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
352 void processAttribute(const DOMAttr* attribute) {
353 unmarshallExtensionAttribute(attribute);
357 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
358 public AbstractComplexElement,
359 public AbstractAttributeExtensibleXMLObject,
360 public AbstractDOMCachingXMLObject,
361 public AbstractXMLObjectMarshaller,
362 public AbstractXMLObjectUnmarshaller
364 list<XMLObject*>::iterator m_pos_TelephoneNumber;
368 m_children.push_back(NULL);
369 m_children.push_back(NULL);
370 m_children.push_back(NULL);
371 m_children.push_back(NULL);
372 m_children.push_back(NULL);
377 m_pos_Extensions=m_children.begin();
378 m_pos_Company=m_pos_Extensions;
380 m_pos_GivenName=m_pos_Company;
382 m_pos_SurName=m_pos_GivenName;
384 m_pos_TelephoneNumber=m_pos_SurName;
385 ++m_pos_TelephoneNumber;
388 virtual ~ContactPersonImpl() {}
390 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
391 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
395 ContactPersonImpl(const ContactPersonImpl& src)
396 : AbstractXMLObject(src), AbstractComplexElement(src),
397 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
399 if (src.getExtensions())
400 setExtensions(src.getExtensions()->cloneExtensions());
401 if (src.getCompany())
402 setCompany(src.getCompany()->cloneCompany());
403 if (src.getGivenName())
404 setGivenName(src.getGivenName()->cloneGivenName());
405 if (src.getSurName())
406 setSurName(src.getSurName()->cloneSurName());
408 VectorOf(EmailAddress) v=getEmailAddresss();
409 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
411 v.push_back((*i)->cloneEmailAddress());
414 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
415 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
417 w.push_back((*j)->cloneTelephoneNumber());
422 IMPL_XMLOBJECT_CLONE(ContactPerson);
423 IMPL_STRING_ATTRIB(ContactType);
424 IMPL_TYPED_CHILD(Extensions);
425 IMPL_TYPED_CHILD(Company);
426 IMPL_TYPED_CHILD(GivenName);
427 IMPL_TYPED_CHILD(SurName);
428 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
429 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
431 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
432 if (!qualifiedName.hasNamespaceURI()) {
433 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
434 setContactType(value);
438 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
442 void marshallAttributes(DOMElement* domElement) const {
443 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
444 marshallExtensionAttributes(domElement);
447 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
448 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
449 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
450 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
451 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
452 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
453 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
454 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
457 void processAttribute(const DOMAttr* attribute) {
458 unmarshallExtensionAttribute(attribute);
462 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
463 public AbstractSimpleElement,
464 public AbstractDOMCachingXMLObject,
465 public AbstractXMLObjectMarshaller,
466 public AbstractXMLObjectUnmarshaller
473 virtual ~AdditionalMetadataLocationImpl() {
474 XMLString::release(&m_Namespace);
477 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
478 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
482 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
483 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
487 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
488 IMPL_STRING_ATTRIB(Namespace);
491 void marshallAttributes(DOMElement* domElement) const {
492 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
495 void processAttribute(const DOMAttr* attribute) {
496 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
497 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
501 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
502 public AbstractComplexElement,
503 public AbstractDOMCachingXMLObject,
504 public AbstractXMLObjectMarshaller,
505 public AbstractXMLObjectUnmarshaller
510 m_children.push_back(NULL);
511 m_pos_KeyInfo=m_children.begin();
514 virtual ~KeyDescriptorImpl() {
515 XMLString::release(&m_Use);
518 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
519 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
523 KeyDescriptorImpl(const KeyDescriptorImpl& src)
524 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
526 setUse(src.getUse());
527 if (src.getKeyInfo())
528 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
529 VectorOf(EncryptionMethod) v=getEncryptionMethods();
530 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
532 v.push_back((*i)->cloneEncryptionMethod());
537 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
538 IMPL_STRING_ATTRIB(Use);
539 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
540 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
543 void marshallAttributes(DOMElement* domElement) const {
544 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
547 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
548 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
549 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
550 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
553 void processAttribute(const DOMAttr* attribute) {
554 PROC_STRING_ATTRIB(Use,USE,NULL);
555 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
559 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
560 public AbstractElementProxy,
561 public AbstractAttributeExtensibleXMLObject,
562 public AbstractDOMCachingXMLObject,
563 public AbstractXMLObjectMarshaller,
564 public AbstractXMLObjectUnmarshaller
567 m_Binding=m_Location=m_ResponseLocation=NULL;
576 virtual ~EndpointTypeImpl() {
577 XMLString::release(&m_Binding);
578 XMLString::release(&m_Location);
579 XMLString::release(&m_ResponseLocation);
582 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
583 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
586 EndpointTypeImpl(const EndpointTypeImpl& src)
587 : AbstractXMLObject(src), AbstractElementProxy(src),
588 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
589 setBinding(src.getBinding());
590 setLocation(src.getLocation());
591 setResponseLocation(src.getResponseLocation());
592 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
594 getXMLObjects().push_back((*i)->clone());
599 IMPL_XMLOBJECT_CLONE(EndpointType);
600 IMPL_STRING_ATTRIB(Binding);
601 IMPL_STRING_ATTRIB(Location);
602 IMPL_STRING_ATTRIB(ResponseLocation);
604 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
605 if (!qualifiedName.hasNamespaceURI()) {
606 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
610 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
614 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
615 setResponseLocation(value);
619 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
622 void marshallAttributes(DOMElement* domElement) const {
623 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
624 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
625 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
626 marshallExtensionAttributes(domElement);
629 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
631 const XMLCh* nsURI=root->getNamespaceURI();
632 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
633 getXMLObjects().push_back(childXMLObject);
636 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
639 void processAttribute(const DOMAttr* attribute) {
640 unmarshallExtensionAttribute(attribute);
644 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
648 m_isDefault=XML_BOOL_NULL;
652 IndexedEndpointTypeImpl() {
656 virtual ~IndexedEndpointTypeImpl() {
657 XMLString::release(&m_Index);
660 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
661 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
663 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
664 setIndex(src.m_Index);
665 isDefault(src.m_isDefault);
668 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
669 EndpointType* cloneEndpointType() const {
670 return new IndexedEndpointTypeImpl(*this);
673 IMPL_INTEGER_ATTRIB(Index);
674 IMPL_BOOLEAN_ATTRIB(isDefault);
676 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
677 if (!qualifiedName.hasNamespaceURI()) {
678 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
682 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
687 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
691 void marshallAttributes(DOMElement* domElement) const {
692 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
693 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
694 EndpointTypeImpl::marshallAttributes(domElement);
698 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
701 virtual ~ArtifactResolutionServiceImpl() {}
703 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
704 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
706 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
708 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
709 IndexedEndpointType* cloneIndexedEndpointType() const {
710 return new ArtifactResolutionServiceImpl(*this);
712 EndpointType* cloneEndpointType() const {
713 return new ArtifactResolutionServiceImpl(*this);
717 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
720 virtual ~SingleLogoutServiceImpl() {}
722 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
723 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
725 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
727 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
728 EndpointType* cloneEndpointType() const {
729 return new SingleLogoutServiceImpl(*this);
733 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
736 virtual ~ManageNameIDServiceImpl() {}
738 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
739 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
741 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
743 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
744 EndpointType* cloneEndpointType() const {
745 return new ManageNameIDServiceImpl(*this);
749 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
752 virtual ~SingleSignOnServiceImpl() {}
754 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
755 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
757 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
759 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
760 EndpointType* cloneEndpointType() const {
761 return new SingleSignOnServiceImpl(*this);
765 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
768 virtual ~NameIDMappingServiceImpl() {}
770 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
771 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
773 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
775 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
776 EndpointType* cloneEndpointType() const {
777 return new NameIDMappingServiceImpl(*this);
781 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
784 virtual ~AssertionIDRequestServiceImpl() {}
786 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
787 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
789 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
791 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
792 EndpointType* cloneEndpointType() const {
793 return new AssertionIDRequestServiceImpl(*this);
797 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
800 virtual ~AssertionConsumerServiceImpl() {}
802 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
803 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
805 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
807 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
808 EndpointType* cloneEndpointType() const {
809 return new AssertionConsumerServiceImpl(*this);
811 IndexedEndpointType* cloneIndexedEndpointType() const {
812 return new AssertionConsumerServiceImpl(*this);
816 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
819 virtual ~AuthnQueryServiceImpl() {}
821 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
822 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
824 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
826 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
827 EndpointType* cloneEndpointType() const {
828 return new AuthnQueryServiceImpl(*this);
832 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
835 virtual ~AuthzServiceImpl() {}
837 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
838 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
840 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
842 IMPL_XMLOBJECT_CLONE(AuthzService);
843 EndpointType* cloneEndpointType() const {
844 return new AuthzServiceImpl(*this);
848 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
851 virtual ~AttributeServiceImpl() {}
853 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
854 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
856 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
858 IMPL_XMLOBJECT_CLONE(AttributeService);
859 EndpointType* cloneEndpointType() const {
860 return new AttributeServiceImpl(*this);
864 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
865 public virtual SignableObject,
866 public AbstractComplexElement,
867 public AbstractAttributeExtensibleXMLObject,
868 public AbstractDOMCachingXMLObject,
869 public AbstractXMLObjectMarshaller,
870 public AbstractXMLObjectUnmarshaller
873 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
874 m_ValidUntil=m_CacheDuration=NULL;
875 m_children.push_back(NULL);
876 m_children.push_back(NULL);
877 m_children.push_back(NULL);
878 m_children.push_back(NULL);
882 m_pos_Signature=m_children.begin();
883 m_pos_Extensions=m_pos_Signature;
885 m_pos_Organization=m_pos_Extensions;
886 ++m_pos_Organization;
887 m_pos_ContactPerson=m_pos_Organization;
888 ++m_pos_ContactPerson;
892 list<XMLObject*>::iterator m_pos_ContactPerson;
894 RoleDescriptorImpl() {
899 virtual ~RoleDescriptorImpl() {
900 XMLString::release(&m_ID);
901 XMLString::release(&m_ProtocolSupportEnumeration);
902 XMLString::release(&m_ErrorURL);
904 delete m_CacheDuration;
907 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
908 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
912 RoleDescriptorImpl(const RoleDescriptorImpl& src)
913 : AbstractXMLObject(src), AbstractComplexElement(src),
914 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
917 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
918 setErrorURL(src.getErrorURL());
919 setValidUntil(src.getValidUntil());
920 setCacheDuration(src.getCacheDuration());
921 if (src.getSignature())
922 setSignature(src.getSignature()->cloneSignature());
923 if (src.getExtensions())
924 setExtensions(src.getExtensions()->cloneExtensions());
925 if (src.getOrganization())
926 setOrganization(src.getOrganization()->cloneOrganization());
928 VectorOf(KeyDescriptor) v=getKeyDescriptors();
929 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
931 v.push_back((*i)->cloneKeyDescriptor());
934 VectorOf(ContactPerson) w=getContactPersons();
935 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
937 w.push_back((*j)->cloneContactPerson());
942 //IMPL_TYPED_CHILD(Signature);
943 // Need customized setter.
945 Signature* m_Signature;
946 list<XMLObject*>::iterator m_pos_Signature;
948 Signature* getSignature() const {
952 void setSignature(Signature* sig) {
953 prepareForAssignment(m_Signature,sig);
954 *m_pos_Signature=m_Signature=sig;
955 // Sync content reference back up.
957 m_Signature->setContentReference(new opensaml::ContentReference(*this));
960 KeyInfoIterator* getKeyInfoIterator() const {
961 return new MetadataKeyInfoIterator(*this);
964 std::string getName() const {
965 const EntityDescriptor* parent = dynamic_cast<const EntityDescriptor*>(getParent());
967 char* ch = toUTF8(parent->getEntityID());
978 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
979 IMPL_STRING_ATTRIB(ErrorURL);
980 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
981 IMPL_DATETIME_ATTRIB(CacheDuration,0);
982 IMPL_TYPED_CHILD(Extensions);
983 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
984 IMPL_TYPED_CHILD(Organization);
985 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
987 bool hasSupport(const XMLCh* protocol) const {
988 if (m_ProtocolSupportEnumeration) {
989 // Look for first character.
990 unsigned int len=XMLString::stringLen(protocol);
992 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
994 // Only possible match is if it's the first character or a space comes before it.
995 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
996 // See if rest of protocol string is present.
997 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
998 // Only possible match is if it's the last character or a space comes after it.
999 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
1005 // Move past last search and start again.
1010 // Move past last search and start again.
1013 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1019 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1020 if (!qualifiedName.hasNamespaceURI()) {
1021 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1025 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1026 setProtocolSupportEnumeration(value);
1029 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1033 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1034 setValidUntil(value);
1037 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1038 setCacheDuration(value);
1042 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1046 void marshallAttributes(DOMElement* domElement) const {
1047 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1048 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1049 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1050 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1051 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1052 marshallExtensionAttributes(domElement);
1055 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1056 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1057 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1058 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1059 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1060 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1061 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1064 void processAttribute(const DOMAttr* attribute) {
1065 PROC_ID_ATTRIB(ID,ID,NULL);
1066 unmarshallExtensionAttribute(attribute);
1070 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1073 m_children.push_back(NULL);
1074 m_children.push_back(NULL);
1075 m_children.push_back(NULL);
1076 m_children.push_back(NULL);
1077 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1078 ++m_pos_ArtifactResolutionService;
1079 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1080 ++m_pos_SingleLogoutService;
1081 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1082 ++m_pos_ManageNameIDService;
1083 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1084 ++m_pos_NameIDFormat;
1088 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1089 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1090 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1091 list<XMLObject*>::iterator m_pos_NameIDFormat;
1093 SSODescriptorTypeImpl() {
1098 virtual ~SSODescriptorTypeImpl() {}
1100 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1101 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1105 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1107 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1108 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1110 v.push_back((*i)->cloneArtifactResolutionService());
1113 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1114 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1116 w.push_back((*j)->cloneSingleLogoutService());
1119 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1120 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1122 x.push_back((*k)->cloneManageNameIDService());
1125 VectorOf(NameIDFormat) y=getNameIDFormats();
1126 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1128 y.push_back((*m)->cloneNameIDFormat());
1133 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1134 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1135 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1136 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1139 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1140 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1141 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1142 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1143 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1144 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1148 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1150 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1151 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1152 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1153 list<XMLObject*>::iterator m_pos_AttributeProfile;
1156 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1157 m_children.push_back(NULL);
1158 m_children.push_back(NULL);
1159 m_children.push_back(NULL);
1160 m_children.push_back(NULL);
1161 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1162 ++m_pos_SingleSignOnService;
1163 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1164 ++m_pos_NameIDMappingService;
1165 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1166 ++m_pos_AssertionIDRequestService;
1167 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1168 ++m_pos_AttributeProfile;
1172 virtual ~IDPSSODescriptorImpl() {}
1174 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1175 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1179 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1181 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1182 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1183 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1185 v.push_back((*i)->cloneSingleSignOnService());
1188 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1189 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1191 w.push_back((*j)->cloneNameIDMappingService());
1194 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1195 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1197 x.push_back((*k)->cloneAssertionIDRequestService());
1200 VectorOf(AttributeProfile) y=getAttributeProfiles();
1201 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1203 y.push_back((*m)->cloneAttributeProfile());
1206 VectorOf(Attribute) z=getAttributes();
1207 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1209 z.push_back((*n)->cloneAttribute());
1214 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1215 SSODescriptorType* cloneSSODescriptorType() const {
1216 return new IDPSSODescriptorImpl(*this);
1218 RoleDescriptor* cloneRoleDescriptor() const {
1219 return new IDPSSODescriptorImpl(*this);
1222 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1223 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1224 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1225 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1226 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1227 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1229 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1230 if (!qualifiedName.hasNamespaceURI()) {
1231 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1232 setWantAuthnRequestsSigned(value);
1236 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1240 void marshallAttributes(DOMElement* domElement) const {
1241 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1242 RoleDescriptorImpl::marshallAttributes(domElement);
1245 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1246 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1247 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1248 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1249 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1250 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1251 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1255 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1256 public AbstractComplexElement,
1257 public AbstractAttributeExtensibleXMLObject,
1258 public AbstractDOMCachingXMLObject,
1259 public AbstractXMLObjectMarshaller,
1260 public AbstractXMLObjectUnmarshaller
1263 m_Name=m_NameFormat=m_FriendlyName=NULL;
1264 m_isRequired=XML_BOOL_NULL;
1267 virtual ~RequestedAttributeImpl() {
1268 XMLString::release(&m_Name);
1269 XMLString::release(&m_NameFormat);
1270 XMLString::release(&m_FriendlyName);
1273 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1274 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1278 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1279 : AbstractXMLObject(src), AbstractComplexElement(src),
1280 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1282 setName(src.getName());
1283 setNameFormat(src.getNameFormat());
1284 setFriendlyName(src.getFriendlyName());
1285 isRequired(src.m_isRequired);
1286 VectorOf(XMLObject) v=getAttributeValues();
1287 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1289 v.push_back((*i)->clone());
1294 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1295 Attribute* cloneAttribute() const {
1296 return new RequestedAttributeImpl(*this);
1299 IMPL_STRING_ATTRIB(Name);
1300 IMPL_STRING_ATTRIB(NameFormat);
1301 IMPL_STRING_ATTRIB(FriendlyName);
1302 IMPL_BOOLEAN_ATTRIB(isRequired);
1303 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1305 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1306 if (!qualifiedName.hasNamespaceURI()) {
1307 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1311 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1312 setNameFormat(value);
1315 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1316 setFriendlyName(value);
1319 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1320 setisRequired(value);
1324 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1328 void marshallAttributes(DOMElement* domElement) const {
1329 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1330 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1331 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1332 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1333 marshallExtensionAttributes(domElement);
1336 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1337 getAttributeValues().push_back(childXMLObject);
1340 void processAttribute(const DOMAttr* attribute) {
1341 unmarshallExtensionAttribute(attribute);
1345 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1346 public AbstractComplexElement,
1347 public AbstractDOMCachingXMLObject,
1348 public AbstractXMLObjectMarshaller,
1349 public AbstractXMLObjectUnmarshaller
1351 list<XMLObject*>::iterator m_pos_ServiceDescription;
1352 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1356 m_isDefault=XML_BOOL_NULL;
1357 m_children.push_back(NULL);
1358 m_children.push_back(NULL);
1359 m_pos_ServiceDescription=m_children.begin();
1360 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1361 ++m_pos_RequestedAttribute;
1365 virtual ~AttributeConsumingServiceImpl() {
1366 XMLString::release(&m_Index);
1369 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1370 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1374 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1375 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1377 setIndex(src.m_Index);
1378 isDefault(src.m_isDefault);
1379 VectorOf(ServiceName) v=getServiceNames();
1380 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1382 v.push_back((*i)->cloneServiceName());
1385 VectorOf(ServiceDescription) w=getServiceDescriptions();
1386 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1388 w.push_back((*j)->cloneServiceDescription());
1391 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1392 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1394 x.push_back((*k)->cloneRequestedAttribute());
1399 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1400 IMPL_INTEGER_ATTRIB(Index);
1401 IMPL_BOOLEAN_ATTRIB(isDefault);
1402 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1403 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1404 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1407 void marshallAttributes(DOMElement* domElement) const {
1408 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1409 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1412 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1413 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1414 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1415 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1416 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1419 void processAttribute(const DOMAttr* attribute) {
1420 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1421 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1422 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1426 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1428 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1431 m_AuthnRequestsSigned=XML_BOOL_NULL;
1432 m_WantAssertionsSigned=XML_BOOL_NULL;
1433 m_children.push_back(NULL);
1434 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1435 ++m_pos_AssertionConsumerService;
1439 virtual ~SPSSODescriptorImpl() {}
1441 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1442 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1446 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1448 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1449 WantAssertionsSigned(src.m_WantAssertionsSigned);
1450 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1451 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1453 v.push_back((*i)->cloneAssertionConsumerService());
1456 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1457 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1459 w.push_back((*j)->cloneAttributeConsumingService());
1464 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1465 SSODescriptorType* cloneSSODescriptorType() const {
1466 return cloneSPSSODescriptor();
1468 RoleDescriptor* cloneRoleDescriptor() const {
1469 return cloneSPSSODescriptor();
1472 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1473 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1474 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1475 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1477 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1478 if (!qualifiedName.hasNamespaceURI()) {
1479 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1480 setAuthnRequestsSigned(value);
1483 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1484 setWantAssertionsSigned(value);
1488 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1492 void marshallAttributes(DOMElement* domElement) const {
1493 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1494 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1495 RoleDescriptorImpl::marshallAttributes(domElement);
1498 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1499 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1500 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1501 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1505 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1507 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1508 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1511 m_children.push_back(NULL);
1512 m_children.push_back(NULL);
1513 m_pos_AuthnQueryService=m_pos_ContactPerson;
1514 ++m_pos_AuthnQueryService;
1515 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1516 ++m_pos_AssertionIDRequestService;
1520 virtual ~AuthnAuthorityDescriptorImpl() {}
1522 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1523 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1527 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1529 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1530 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1532 v.push_back((*i)->cloneAuthnQueryService());
1535 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1536 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1538 w.push_back((*j)->cloneAssertionIDRequestService());
1541 VectorOf(NameIDFormat) x=getNameIDFormats();
1542 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1544 x.push_back((*k)->cloneNameIDFormat());
1549 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1550 RoleDescriptor* cloneRoleDescriptor() const {
1551 return cloneAuthnAuthorityDescriptor();
1554 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1555 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1556 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1559 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1560 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1561 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1562 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1563 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1567 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1569 list<XMLObject*>::iterator m_pos_AuthzService;
1570 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1573 m_children.push_back(NULL);
1574 m_children.push_back(NULL);
1575 m_pos_AuthzService=m_pos_ContactPerson;
1576 ++m_pos_AuthzService;
1577 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1578 ++m_pos_AssertionIDRequestService;
1582 virtual ~PDPDescriptorImpl() {}
1584 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1585 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1589 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1591 VectorOf(AuthzService) v=getAuthzServices();
1592 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1594 v.push_back((*i)->cloneAuthzService());
1597 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1598 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1600 w.push_back((*j)->cloneAssertionIDRequestService());
1603 VectorOf(NameIDFormat) x=getNameIDFormats();
1604 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1606 x.push_back((*k)->cloneNameIDFormat());
1611 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1612 RoleDescriptor* cloneRoleDescriptor() const {
1613 return clonePDPDescriptor();
1616 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1617 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1618 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1621 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1622 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1623 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1624 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1625 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1629 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1631 list<XMLObject*>::iterator m_pos_AttributeService;
1632 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1633 list<XMLObject*>::iterator m_pos_NameIDFormat;
1634 list<XMLObject*>::iterator m_pos_AttributeProfile;
1637 m_children.push_back(NULL);
1638 m_children.push_back(NULL);
1639 m_children.push_back(NULL);
1640 m_children.push_back(NULL);
1641 m_pos_AttributeService=m_pos_ContactPerson;
1642 ++m_pos_AttributeService;
1643 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1644 ++m_pos_AssertionIDRequestService;
1645 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1646 ++m_pos_NameIDFormat;
1647 m_pos_AttributeProfile=m_pos_NameIDFormat;
1648 ++m_pos_AttributeProfile;
1652 virtual ~AttributeAuthorityDescriptorImpl() {}
1654 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1655 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1659 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1661 VectorOf(AttributeService) v=getAttributeServices();
1662 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1664 v.push_back((*i)->cloneAttributeService());
1667 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1668 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1670 w.push_back((*j)->cloneAssertionIDRequestService());
1673 VectorOf(NameIDFormat) x=getNameIDFormats();
1674 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1676 x.push_back((*k)->cloneNameIDFormat());
1679 VectorOf(AttributeProfile) y=getAttributeProfiles();
1680 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1682 y.push_back((*m)->cloneAttributeProfile());
1685 VectorOf(Attribute) z=getAttributes();
1686 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1688 z.push_back((*n)->cloneAttribute());
1693 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1694 RoleDescriptor* cloneRoleDescriptor() const {
1695 return cloneAttributeAuthorityDescriptor();
1698 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1699 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1700 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1701 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1702 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1705 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1706 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1707 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1708 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1709 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1710 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1711 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1715 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1718 m_WantAssertionsSigned=XML_BOOL_NULL;
1719 m_children.push_back(NULL);
1720 m_pos_NameIDFormat=m_pos_ContactPerson;
1721 ++m_pos_NameIDFormat;
1725 list<XMLObject*>::iterator m_pos_NameIDFormat;
1727 QueryDescriptorTypeImpl() {
1732 virtual ~QueryDescriptorTypeImpl() {}
1734 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1735 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1739 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1741 WantAssertionsSigned(src.m_WantAssertionsSigned);
1742 VectorOf(NameIDFormat) y=getNameIDFormats();
1743 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1745 y.push_back((*m)->cloneNameIDFormat());
1750 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1751 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1753 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1754 if (!qualifiedName.hasNamespaceURI()) {
1755 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1756 setWantAssertionsSigned(value);
1760 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1764 void marshallAttributes(DOMElement* domElement) const {
1765 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1766 RoleDescriptorImpl::marshallAttributes(domElement);
1769 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1770 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1771 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1775 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1778 virtual ~AuthnQueryDescriptorTypeImpl() {}
1780 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1781 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1783 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1785 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1786 QueryDescriptorType* cloneQueryDescriptorType() const {
1787 return new AuthnQueryDescriptorTypeImpl(*this);
1789 RoleDescriptor* cloneRoleDescriptor() const {
1790 return new AuthnQueryDescriptorTypeImpl(*this);
1794 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1797 virtual ~AttributeQueryDescriptorTypeImpl() {}
1799 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1800 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1802 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1803 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1804 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1805 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1807 w.push_back((*j)->cloneAttributeConsumingService());
1812 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1813 QueryDescriptorType* cloneQueryDescriptorType() const {
1814 return new AttributeQueryDescriptorTypeImpl(*this);
1816 RoleDescriptor* cloneRoleDescriptor() const {
1817 return new AttributeQueryDescriptorTypeImpl(*this);
1820 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1823 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1824 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1825 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1829 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1832 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1834 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1835 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1837 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1838 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1839 VectorOf(ActionNamespace) w=getActionNamespaces();
1840 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1842 w.push_back((*j)->cloneActionNamespace());
1847 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1848 QueryDescriptorType* cloneQueryDescriptorType() const {
1849 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1851 RoleDescriptor* cloneRoleDescriptor() const {
1852 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1855 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1858 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1859 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1860 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1864 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1865 public virtual SignableObject,
1866 public AbstractComplexElement,
1867 public AbstractAttributeExtensibleXMLObject,
1868 public AbstractDOMCachingXMLObject,
1869 public AbstractXMLObjectMarshaller,
1870 public AbstractXMLObjectUnmarshaller
1872 list<XMLObject*>::iterator m_pos_AffiliateMember;
1875 m_ID=m_AffiliationOwnerID=NULL;
1876 m_ValidUntil=m_CacheDuration=NULL;
1877 m_children.push_back(NULL);
1878 m_children.push_back(NULL);
1879 m_children.push_back(NULL);
1882 m_pos_Signature=m_children.begin();
1883 m_pos_Extensions=m_pos_Signature;
1885 m_pos_AffiliateMember=m_pos_Extensions;
1886 ++m_pos_AffiliateMember;
1890 virtual ~AffiliationDescriptorImpl() {
1891 XMLString::release(&m_ID);
1892 XMLString::release(&m_AffiliationOwnerID);
1893 delete m_ValidUntil;
1894 delete m_CacheDuration;
1897 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1898 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1902 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1903 : AbstractXMLObject(src), AbstractComplexElement(src),
1904 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1907 setAffiliationOwnerID(src.getAffiliationOwnerID());
1908 setValidUntil(src.getValidUntil());
1909 setCacheDuration(src.getCacheDuration());
1910 if (src.getSignature())
1911 setSignature(src.getSignature()->cloneSignature());
1912 if (src.getExtensions())
1913 setExtensions(src.getExtensions()->cloneExtensions());
1915 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1916 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1918 v.push_back((*i)->cloneKeyDescriptor());
1921 VectorOf(AffiliateMember) w=getAffiliateMembers();
1922 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1924 w.push_back((*j)->cloneAffiliateMember());
1929 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1931 //IMPL_TYPED_CHILD(Signature);
1932 // Need customized setter.
1934 Signature* m_Signature;
1935 list<XMLObject*>::iterator m_pos_Signature;
1937 Signature* getSignature() const {
1941 void setSignature(Signature* sig) {
1942 prepareForAssignment(m_Signature,sig);
1943 *m_pos_Signature=m_Signature=sig;
1944 // Sync content reference back up.
1946 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1950 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1951 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1952 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1953 IMPL_TYPED_CHILD(Extensions);
1954 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1955 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1957 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1958 if (!qualifiedName.hasNamespaceURI()) {
1959 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1963 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1964 setAffiliationOwnerID(value);
1967 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1968 setValidUntil(value);
1971 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1972 setCacheDuration(value);
1976 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1980 void marshallAttributes(DOMElement* domElement) const {
1981 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1982 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
1983 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1984 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1985 marshallExtensionAttributes(domElement);
1988 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1989 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1990 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1991 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
1992 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1993 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1996 void processAttribute(const DOMAttr* attribute) {
1997 PROC_ID_ATTRIB(ID,ID,NULL);
1998 unmarshallExtensionAttribute(attribute);
2002 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2003 public virtual SignableObject,
2004 public AbstractComplexElement,
2005 public AbstractAttributeExtensibleXMLObject,
2006 public AbstractDOMCachingXMLObject,
2007 public AbstractXMLObjectMarshaller,
2008 public AbstractXMLObjectUnmarshaller
2010 list<XMLObject*>::iterator m_pos_ContactPerson;
2013 m_ID=m_EntityID=NULL;
2014 m_ValidUntil=m_CacheDuration=NULL;
2015 m_children.push_back(NULL);
2016 m_children.push_back(NULL);
2017 m_children.push_back(NULL);
2018 m_children.push_back(NULL);
2019 m_children.push_back(NULL);
2022 m_AffiliationDescriptor=NULL;
2023 m_Organization=NULL;
2024 m_pos_Signature=m_children.begin();
2025 m_pos_Extensions=m_pos_Signature;
2027 m_pos_AffiliationDescriptor=m_pos_Extensions;
2028 ++m_pos_AffiliationDescriptor;
2029 m_pos_Organization=m_pos_AffiliationDescriptor;
2030 ++m_pos_Organization;
2031 m_pos_ContactPerson=m_pos_Organization;
2032 ++m_pos_ContactPerson;
2036 virtual ~EntityDescriptorImpl() {
2037 XMLString::release(&m_ID);
2038 XMLString::release(&m_EntityID);
2039 delete m_ValidUntil;
2040 delete m_CacheDuration;
2043 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2044 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2048 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2049 : AbstractXMLObject(src), AbstractComplexElement(src),
2050 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2053 setEntityID(src.getEntityID());
2054 setValidUntil(src.getValidUntil());
2055 setCacheDuration(src.getCacheDuration());
2056 if (src.getSignature())
2057 setSignature(src.getSignature()->cloneSignature());
2058 if (src.getExtensions())
2059 setExtensions(src.getExtensions()->cloneExtensions());
2060 if (src.getAffiliationDescriptor())
2061 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2062 if (src.getOrganization())
2063 setOrganization(src.getOrganization()->cloneOrganization());
2065 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2067 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2069 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2073 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2075 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2079 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2081 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2085 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2087 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2091 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2093 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2097 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2099 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2103 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2105 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2109 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2111 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2115 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2117 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2123 VectorOf(ContactPerson) v=getContactPersons();
2124 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2126 v.push_back((*j)->cloneContactPerson());
2129 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2130 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2132 w.push_back((*k)->cloneAdditionalMetadataLocation());
2137 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2139 //IMPL_TYPED_CHILD(Signature);
2140 // Need customized setter.
2142 Signature* m_Signature;
2143 list<XMLObject*>::iterator m_pos_Signature;
2145 Signature* getSignature() const {
2149 void setSignature(Signature* sig) {
2150 prepareForAssignment(m_Signature,sig);
2151 *m_pos_Signature=m_Signature=sig;
2152 // Sync content reference back up.
2154 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2158 IMPL_STRING_ATTRIB(EntityID);
2159 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2160 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2161 IMPL_TYPED_CHILD(Extensions);
2162 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2163 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2164 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2165 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2166 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2167 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2168 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2169 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2170 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2171 IMPL_TYPED_CHILD(AffiliationDescriptor);
2172 IMPL_TYPED_CHILD(Organization);
2173 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2174 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2176 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2177 if (!qualifiedName.hasNamespaceURI()) {
2178 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2182 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2186 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2187 setValidUntil(value);
2190 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2191 setCacheDuration(value);
2195 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2198 const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
2199 for (vector<IDPSSODescriptor*>::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) {
2200 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2206 const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const {
2207 for (vector<SPSSODescriptor*>::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) {
2208 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2214 const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const {
2215 for (vector<AuthnAuthorityDescriptor*>::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) {
2216 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2222 const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const {
2223 for (vector<AttributeAuthorityDescriptor*>::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) {
2224 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2230 const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const {
2231 for (vector<PDPDescriptor*>::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) {
2232 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2238 const AuthnQueryDescriptorType* getAuthnQueryDescriptorType(const XMLCh* protocol) const {
2239 for (vector<AuthnQueryDescriptorType*>::const_iterator i=m_AuthnQueryDescriptorTypes.begin(); i!=m_AuthnQueryDescriptorTypes.end(); i++) {
2240 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2246 const AttributeQueryDescriptorType* getAttributeQueryDescriptorType(const XMLCh* protocol) const {
2247 for (vector<AttributeQueryDescriptorType*>::const_iterator i=m_AttributeQueryDescriptorTypes.begin(); i!=m_AttributeQueryDescriptorTypes.end(); i++) {
2248 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2254 const AuthzDecisionQueryDescriptorType* getAuthzDecisionQueryDescriptorType(const XMLCh* protocol) const {
2255 for (vector<AuthzDecisionQueryDescriptorType*>::const_iterator i=m_AuthzDecisionQueryDescriptorTypes.begin(); i!=m_AuthzDecisionQueryDescriptorTypes.end(); i++) {
2256 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2262 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2263 // Check for "known" elements/types.
2265 q.setNamespaceURI(SAML20MD_NS);
2266 q.setLocalPart(IDPSSODescriptor::LOCAL_NAME);
2268 return getIDPSSODescriptor(protocol);
2269 q.setLocalPart(SPSSODescriptor::LOCAL_NAME);
2271 return getSPSSODescriptor(protocol);
2272 q.setLocalPart(AuthnAuthorityDescriptor::LOCAL_NAME);
2274 return getAuthnAuthorityDescriptor(protocol);
2275 q.setLocalPart(AttributeAuthorityDescriptor::LOCAL_NAME);
2277 return getAttributeAuthorityDescriptor(protocol);
2278 q.setLocalPart(PDPDescriptor::LOCAL_NAME);
2280 return getPDPDescriptor(protocol);
2281 q.setNamespaceURI(samlconstants::SAML20MD_QUERY_EXT_NS);
2282 q.setLocalPart(AuthnQueryDescriptorType::TYPE_NAME);
2284 return getAuthnQueryDescriptorType(protocol);
2285 q.setLocalPart(AttributeQueryDescriptorType::TYPE_NAME);
2287 return getAttributeQueryDescriptorType(protocol);
2288 q.setLocalPart(AuthzDecisionQueryDescriptorType::TYPE_NAME);
2290 return getAuthzDecisionQueryDescriptorType(protocol);
2292 for (vector<RoleDescriptor*>::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) {
2293 if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid())
2300 void marshallAttributes(DOMElement* domElement) const {
2301 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2302 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2303 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2304 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2305 marshallExtensionAttributes(domElement);
2308 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2309 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2310 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2311 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2312 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2313 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2314 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2315 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2316 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2317 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2318 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2319 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2320 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2321 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2322 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2323 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2324 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2327 void processAttribute(const DOMAttr* attribute) {
2328 PROC_ID_ATTRIB(ID,ID,NULL);
2329 unmarshallExtensionAttribute(attribute);
2333 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2334 public virtual SignableObject,
2335 public AbstractComplexElement,
2336 public AbstractDOMCachingXMLObject,
2337 public AbstractXMLObjectMarshaller,
2338 public AbstractXMLObjectUnmarshaller
2342 m_ValidUntil=m_CacheDuration=NULL;
2343 m_children.push_back(NULL);
2344 m_children.push_back(NULL);
2347 m_pos_Signature=m_children.begin();
2348 m_pos_Extensions=m_pos_Signature;
2353 virtual ~EntitiesDescriptorImpl() {
2354 XMLString::release(&m_ID);
2355 XMLString::release(&m_Name);
2356 delete m_ValidUntil;
2357 delete m_CacheDuration;
2360 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2361 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2365 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2366 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2369 setName(src.getName());
2370 setValidUntil(src.getValidUntil());
2371 setCacheDuration(src.getCacheDuration());
2372 if (src.getSignature())
2373 setSignature(src.getSignature()->cloneSignature());
2374 if (src.getExtensions())
2375 setExtensions(src.getExtensions()->cloneExtensions());
2377 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2379 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2381 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2385 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2387 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2394 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2396 //IMPL_TYPED_CHILD(Signature);
2397 // Need customized setter.
2399 Signature* m_Signature;
2400 list<XMLObject*>::iterator m_pos_Signature;
2402 Signature* getSignature() const {
2406 void setSignature(Signature* sig) {
2407 prepareForAssignment(m_Signature,sig);
2408 *m_pos_Signature=m_Signature=sig;
2409 // Sync content reference back up.
2411 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2415 IMPL_STRING_ATTRIB(Name);
2416 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2417 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2418 IMPL_TYPED_CHILD(Extensions);
2419 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2420 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2423 void marshallAttributes(DOMElement* domElement) const {
2424 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2425 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2426 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2427 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2430 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2431 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2432 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2433 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2434 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2435 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2438 void processAttribute(const DOMAttr* attribute) {
2439 PROC_ID_ATTRIB(ID,ID,NULL);
2440 PROC_STRING_ATTRIB(Name,NAME,NULL);
2441 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2442 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2449 #if defined (_MSC_VER)
2450 #pragma warning( pop )
2453 // Builder Implementations
2455 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2456 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2457 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2458 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2459 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2460 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2461 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2462 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2463 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2464 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2465 IMPL_XMLOBJECTBUILDER(AttributeService);
2466 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2467 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2468 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2469 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2470 IMPL_XMLOBJECTBUILDER(AuthzService);
2471 IMPL_XMLOBJECTBUILDER(Company);
2472 IMPL_XMLOBJECTBUILDER(ContactPerson);
2473 IMPL_XMLOBJECTBUILDER(EmailAddress);
2474 IMPL_XMLOBJECTBUILDER(EndpointType);
2475 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2476 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2477 IMPL_XMLOBJECTBUILDER(Extensions);
2478 IMPL_XMLOBJECTBUILDER(GivenName);
2479 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2480 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2481 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2482 IMPL_XMLOBJECTBUILDER(localizedNameType);
2483 IMPL_XMLOBJECTBUILDER(localizedURIType);
2484 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2485 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2486 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2487 IMPL_XMLOBJECTBUILDER(Organization);
2488 IMPL_XMLOBJECTBUILDER(OrganizationName);
2489 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2490 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2491 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2492 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2493 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2494 IMPL_XMLOBJECTBUILDER(ServiceName);
2495 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2496 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2497 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2498 IMPL_XMLOBJECTBUILDER(SurName);
2499 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2501 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2502 IMPL_XMLOBJECTBUILDER(SourceID);
2504 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2505 const XMLCh AdditionalMetadataLocation::LOCAL_NAME[] = UNICODE_LITERAL_26(A,d,d,i,t,i,o,n,a,l,M,e,t,a,d,a,t,a,L,o,c,a,t,i,o,n);
2506 const XMLCh AdditionalMetadataLocation::TYPE_NAME[] = UNICODE_LITERAL_30(A,d,d,i,t,i,o,n,a,l,M,e,t,a,d,a,t,a,L,o,c,a,t,i,o,n,T,y,p,e);
2507 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2508 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2509 const XMLCh AffiliationDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_21(A,f,f,i,l,i,a,t,i,o,n,D,e,s,c,r,i,p,t,o,r);
2510 const XMLCh AffiliationDescriptor::TYPE_NAME[] = UNICODE_LITERAL_25(A,f,f,i,l,i,a,t,i,o,n,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2511 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2512 const XMLCh AffiliationDescriptor::AFFILIATIONOWNERID_ATTRIB_NAME[] = UNICODE_LITERAL_18(a,f,f,i,l,i,a,t,i,o,n,O,w,n,e,r,I,D);
2513 const XMLCh ArtifactResolutionService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,r,t,i,f,a,c,t,R,e,s,o,l,u,t,i,o,n,S,e,r,v,i,c,e);
2514 const XMLCh AssertionConsumerService::LOCAL_NAME[] = UNICODE_LITERAL_24(A,s,s,e,r,t,i,o,n,C,o,n,s,u,m,e,r,S,e,r,v,i,c,e);
2515 const XMLCh AssertionIDRequestService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,s,s,e,r,t,i,o,n,I,D,R,e,q,u,e,s,t,S,e,r,v,i,c,e);
2516 const XMLCh AttributeAuthorityDescriptor::LOCAL_NAME[] =UNICODE_LITERAL_28(A,t,t,r,i,b,u,t,e,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r);
2517 const XMLCh AttributeAuthorityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_32(A,t,t,r,i,b,u,t,e,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2518 const XMLCh AttributeConsumingService::LOCAL_NAME[] = UNICODE_LITERAL_25(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e);
2519 const XMLCh AttributeConsumingService::TYPE_NAME[] = UNICODE_LITERAL_29(A,t,t,r,i,b,u,t,e,C,o,n,s,u,m,i,n,g,S,e,r,v,i,c,e,T,y,p,e);
2520 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2521 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2522 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2523 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2524 const XMLCh AttributeQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_28(A,t,t,r,i,b,u,t,e,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2525 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2526 const XMLCh AuthnAuthorityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_24(A,u,t,h,n,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r);
2527 const XMLCh AuthnAuthorityDescriptor::TYPE_NAME[] = UNICODE_LITERAL_28(A,u,t,h,n,A,u,t,h,o,r,i,t,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2528 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2529 const XMLCh AuthnQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_24(A,u,t,h,n,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2530 const XMLCh AuthnQueryService::LOCAL_NAME[] = UNICODE_LITERAL_17(A,u,t,h,n,Q,u,e,r,y,S,e,r,v,i,c,e);
2531 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2532 const XMLCh AuthzDecisionQueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_32(A,u,t,h,z,D,e,c,i,s,i,o,n,Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2533 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2534 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2535 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2536 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2537 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2538 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2539 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2540 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2541 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2542 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2543 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2544 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2545 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2546 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2547 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2548 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2549 const XMLCh EndpointType::RESPONSELOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_16(R,e,s,p,o,n,s,e,L,o,c,a,t,i,o,n);
2550 const XMLCh EntitiesDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_18(E,n,t,i,t,i,e,s,D,e,s,c,r,i,p,t,o,r);
2551 const XMLCh EntitiesDescriptor::TYPE_NAME[] = UNICODE_LITERAL_22(E,n,t,i,t,i,e,s,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2552 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2553 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2554 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2555 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);
2556 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2557 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2558 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2559 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2560 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2561 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2562 const XMLCh IDPSSODescriptor::TYPE_NAME[] = UNICODE_LITERAL_20(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2563 const XMLCh IDPSSODescriptor::WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_23(W,a,n,t,A,u,t,h,n,R,e,q,u,e,s,t,s,S,i,g,n,e,d);
2564 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2565 const XMLCh IndexedEndpointType::TYPE_NAME[] = UNICODE_LITERAL_19(I,n,d,e,x,e,d,E,n,d,p,o,i,n,t,T,y,p,e);
2566 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2567 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2568 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2569 const XMLCh KeyDescriptor::TYPE_NAME[] = UNICODE_LITERAL_17(K,e,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2570 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2571 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2572 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2573 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2574 const XMLCh localizedNameType::TYPE_NAME[] = UNICODE_LITERAL_17(l,o,c,a,l,i,z,e,d,N,a,m,e,T,y,p,e);
2575 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2576 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2577 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2578 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2579 const XMLCh ManageNameIDService::LOCAL_NAME[] = UNICODE_LITERAL_19(M,a,n,a,g,e,N,a,m,e,I,D,S,e,r,v,i,c,e);
2580 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2581 const XMLCh NameIDMappingService::LOCAL_NAME[] = UNICODE_LITERAL_20(N,a,m,e,I,D,M,a,p,p,i,n,g,S,e,r,v,i,c,e);
2582 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2583 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2584 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2585 const XMLCh OrganizationDisplayName::LOCAL_NAME[] = UNICODE_LITERAL_23(O,r,g,a,n,i,z,a,t,i,o,n,D,i,s,p,l,a,y,N,a,m,e);
2586 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2587 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2588 const XMLCh PDPDescriptor::TYPE_NAME[] = UNICODE_LITERAL_17(P,D,P,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2589 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2590 const XMLCh QueryDescriptorType::TYPE_NAME[] = UNICODE_LITERAL_19(Q,u,e,r,y,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2591 const XMLCh QueryDescriptorType::WANTASSERTIONSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_20(W,a,n,t,A,s,s,e,r,t,i,o,n,s,S,i,g,n,e,d);
2592 const XMLCh RequestedAttribute::LOCAL_NAME[] = UNICODE_LITERAL_18(R,e,q,u,e,s,t,e,d,A,t,t,r,i,b,u,t,e);
2593 const XMLCh RequestedAttribute::TYPE_NAME[] = UNICODE_LITERAL_22(R,e,q,u,e,s,t,e,d,A,t,t,r,i,b,u,t,e,T,y,p,e);
2594 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2595 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2596 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2597 const XMLCh RoleDescriptor::PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME[] = UNICODE_LITERAL_26(p,r,o,t,o,c,o,l,S,u,p,p,o,r,t,E,n,u,m,e,r,a,t,i,o,n);
2598 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2599 const XMLCh ServiceDescription::LOCAL_NAME[] = UNICODE_LITERAL_18(S,e,r,v,i,c,e,D,e,s,c,r,i,p,t,i,o,n);
2600 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2601 const XMLCh SingleLogoutService::LOCAL_NAME[] = UNICODE_LITERAL_19(S,i,n,g,l,e,L,o,g,o,u,t,S,e,r,v,i,c,e);
2602 const XMLCh SingleSignOnService::LOCAL_NAME[] = UNICODE_LITERAL_19(S,i,n,g,l,e,S,i,g,n,O,n,S,e,r,v,i,c,e);
2603 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2604 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2605 const XMLCh SPSSODescriptor::TYPE_NAME[] = UNICODE_LITERAL_19(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2606 const XMLCh SPSSODescriptor::AUTHNREQUESTSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_19(A,u,t,h,n,R,e,q,u,e,s,t,s,S,i,g,n,e,d);
2607 const XMLCh SPSSODescriptor::WANTASSERTIONSSIGNED_ATTRIB_NAME[] = UNICODE_LITERAL_20(W,a,n,t,A,s,s,e,r,t,i,o,n,s,S,i,g,n,e,d);
2608 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2609 const XMLCh SSODescriptorType::TYPE_NAME[] = UNICODE_LITERAL_17(S,S,O,D,e,s,c,r,i,p,t,o,r,T,y,p,e);
2610 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2611 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2612 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);