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"
27 #include <xmltooling/AbstractComplexElement.h>
28 #include <xmltooling/AbstractElementProxy.h>
29 #include <xmltooling/AbstractSimpleElement.h>
30 #include <xmltooling/impl/AnyElement.h>
31 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
32 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
33 #include <xmltooling/util/XMLHelper.h>
36 #include <xercesc/util/XMLUniDefs.hpp>
38 using namespace opensaml::saml2md;
39 using namespace opensaml::saml2;
40 using namespace opensaml;
41 using namespace xmlencryption;
42 using namespace xmlsignature;
43 using namespace xmltooling;
46 #if defined (_MSC_VER)
47 #pragma warning( push )
48 #pragma warning( disable : 4250 4251 )
54 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
55 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
64 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
66 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
67 public AbstractSimpleElement,
68 public AbstractDOMCachingXMLObject,
69 public AbstractXMLObjectMarshaller,
70 public AbstractXMLObjectUnmarshaller
77 localizedNameTypeImpl() {
82 virtual ~localizedNameTypeImpl() {
83 XMLString::release(&m_Lang);
86 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
87 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
91 localizedNameTypeImpl(const localizedNameTypeImpl& src)
92 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
94 setLang(src.getLang());
97 IMPL_XMLOBJECT_CLONE(localizedNameType);
98 IMPL_STRING_ATTRIB(Lang);
101 void marshallAttributes(DOMElement* domElement) const {
102 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
105 void processAttribute(const DOMAttr* attribute) {
106 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
107 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
111 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
112 public AbstractSimpleElement,
113 public AbstractDOMCachingXMLObject,
114 public AbstractXMLObjectMarshaller,
115 public AbstractXMLObjectUnmarshaller
122 localizedURITypeImpl() {
127 virtual ~localizedURITypeImpl() {
128 XMLString::release(&m_Lang);
131 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
132 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
136 localizedURITypeImpl(const localizedURITypeImpl& src)
137 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
139 setLang(src.getLang());
142 IMPL_XMLOBJECT_CLONE(localizedURIType);
143 IMPL_STRING_ATTRIB(Lang);
146 void marshallAttributes(DOMElement* domElement) const {
147 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
150 void processAttribute(const DOMAttr* attribute) {
151 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
152 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
156 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
159 virtual ~OrganizationNameImpl() {}
161 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
162 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
164 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
166 IMPL_XMLOBJECT_CLONE(OrganizationName);
167 localizedNameType* clonelocalizedNameType() const {
168 return new OrganizationNameImpl(*this);
172 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
175 virtual ~OrganizationDisplayNameImpl() {}
177 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
178 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
180 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
182 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
183 localizedNameType* clonelocalizedNameType() const {
184 return new OrganizationDisplayNameImpl(*this);
188 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
191 virtual ~OrganizationURLImpl() {}
193 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
194 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
196 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
198 IMPL_XMLOBJECT_CLONE(OrganizationURL);
199 localizedURIType* clonelocalizedURIType() const {
200 return new OrganizationURLImpl(*this);
204 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
207 virtual ~ServiceNameImpl() {}
209 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
210 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
212 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
214 IMPL_XMLOBJECT_CLONE(ServiceName);
215 localizedNameType* clonelocalizedNameType() const {
216 return new ServiceNameImpl(*this);
220 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
223 virtual ~ServiceDescriptionImpl() {}
225 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
226 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
228 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
230 IMPL_XMLOBJECT_CLONE(ServiceDescription);
231 localizedNameType* clonelocalizedNameType() const {
232 return new ServiceDescriptionImpl(*this);
236 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
237 public AbstractElementProxy,
238 public AbstractDOMCachingXMLObject,
239 public AbstractXMLObjectMarshaller,
240 public AbstractXMLObjectUnmarshaller
243 virtual ~ExtensionsImpl() {}
245 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
246 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
249 ExtensionsImpl(const ExtensionsImpl& src)
250 : AbstractXMLObject(src), AbstractElementProxy(src), AbstractDOMCachingXMLObject(src) {
251 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
253 getXMLObjects().push_back((*i)->clone());
258 IMPL_XMLOBJECT_CLONE(Extensions);
261 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
263 const XMLCh* nsURI=root->getNamespaceURI();
264 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
265 getXMLObjects().push_back(childXMLObject);
269 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
273 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
274 public AbstractComplexElement,
275 public AbstractAttributeExtensibleXMLObject,
276 public AbstractDOMCachingXMLObject,
277 public AbstractXMLObjectMarshaller,
278 public AbstractXMLObjectUnmarshaller
280 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
281 list<XMLObject*>::iterator m_pos_OrganizationURL;
284 m_children.push_back(NULL);
285 m_children.push_back(NULL);
286 m_children.push_back(NULL);
288 m_pos_Extensions=m_children.begin();
289 m_pos_OrganizationDisplayName=m_pos_Extensions;
290 ++m_pos_OrganizationDisplayName;
291 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
292 ++m_pos_OrganizationURL;
295 virtual ~OrganizationImpl() {}
297 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
298 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
302 OrganizationImpl(const OrganizationImpl& src)
303 : AbstractXMLObject(src), AbstractComplexElement(src),
304 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
306 if (src.getExtensions())
307 setExtensions(src.getExtensions()->cloneExtensions());
308 VectorOf(OrganizationName) v=getOrganizationNames();
309 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
311 v.push_back((*i)->cloneOrganizationName());
314 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
315 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
317 w.push_back((*j)->cloneOrganizationDisplayName());
320 VectorOf(OrganizationURL) x=getOrganizationURLs();
321 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
323 x.push_back((*k)->cloneOrganizationURL());
328 IMPL_XMLOBJECT_CLONE(Organization);
329 IMPL_TYPED_CHILD(Extensions);
330 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
331 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
332 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
335 void marshallAttributes(DOMElement* domElement) const {
336 marshallExtensionAttributes(domElement);
339 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
340 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
341 PROC_TYPED_CHILDREN(OrganizationName,SAMLConstants::SAML20MD_NS,false);
342 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAMLConstants::SAML20MD_NS,false);
343 PROC_TYPED_CHILDREN(OrganizationURL,SAMLConstants::SAML20MD_NS,false);
344 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
347 void processAttribute(const DOMAttr* attribute) {
348 unmarshallExtensionAttribute(attribute);
352 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
353 public AbstractComplexElement,
354 public AbstractAttributeExtensibleXMLObject,
355 public AbstractDOMCachingXMLObject,
356 public AbstractXMLObjectMarshaller,
357 public AbstractXMLObjectUnmarshaller
359 list<XMLObject*>::iterator m_pos_TelephoneNumber;
363 m_children.push_back(NULL);
364 m_children.push_back(NULL);
365 m_children.push_back(NULL);
366 m_children.push_back(NULL);
367 m_children.push_back(NULL);
372 m_pos_Extensions=m_children.begin();
373 m_pos_Company=m_pos_Extensions;
375 m_pos_GivenName=m_pos_Company;
377 m_pos_SurName=m_pos_GivenName;
379 m_pos_TelephoneNumber=m_pos_SurName;
380 ++m_pos_TelephoneNumber;
383 virtual ~ContactPersonImpl() {}
385 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
386 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
390 ContactPersonImpl(const ContactPersonImpl& src)
391 : AbstractXMLObject(src), AbstractComplexElement(src),
392 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
394 if (src.getExtensions())
395 setExtensions(src.getExtensions()->cloneExtensions());
396 if (src.getCompany())
397 setCompany(src.getCompany()->cloneCompany());
398 if (src.getGivenName())
399 setGivenName(src.getGivenName()->cloneGivenName());
400 if (src.getSurName())
401 setSurName(src.getSurName()->cloneSurName());
403 VectorOf(EmailAddress) v=getEmailAddresss();
404 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
406 v.push_back((*i)->cloneEmailAddress());
409 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
410 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
412 w.push_back((*j)->cloneTelephoneNumber());
417 IMPL_XMLOBJECT_CLONE(ContactPerson);
418 IMPL_STRING_ATTRIB(ContactType);
419 IMPL_TYPED_CHILD(Extensions);
420 IMPL_TYPED_CHILD(Company);
421 IMPL_TYPED_CHILD(GivenName);
422 IMPL_TYPED_CHILD(SurName);
423 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
424 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
426 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
427 if (!qualifiedName.hasNamespaceURI()) {
428 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
429 setContactType(value);
433 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
437 void marshallAttributes(DOMElement* domElement) const {
438 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
439 marshallExtensionAttributes(domElement);
442 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
443 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
444 PROC_TYPED_CHILD(Company,SAMLConstants::SAML20MD_NS,false);
445 PROC_TYPED_CHILD(GivenName,SAMLConstants::SAML20MD_NS,false);
446 PROC_TYPED_CHILD(SurName,SAMLConstants::SAML20MD_NS,false);
447 PROC_TYPED_CHILDREN(EmailAddress,SAMLConstants::SAML20MD_NS,false);
448 PROC_TYPED_CHILDREN(TelephoneNumber,SAMLConstants::SAML20MD_NS,false);
449 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
452 void processAttribute(const DOMAttr* attribute) {
453 unmarshallExtensionAttribute(attribute);
457 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
458 public AbstractSimpleElement,
459 public AbstractDOMCachingXMLObject,
460 public AbstractXMLObjectMarshaller,
461 public AbstractXMLObjectUnmarshaller
468 virtual ~AdditionalMetadataLocationImpl() {
469 XMLString::release(&m_Namespace);
472 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
473 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
477 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
478 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
482 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
483 IMPL_STRING_ATTRIB(Namespace);
486 void marshallAttributes(DOMElement* domElement) const {
487 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
490 void processAttribute(const DOMAttr* attribute) {
491 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
492 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
496 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
497 public AbstractComplexElement,
498 public AbstractDOMCachingXMLObject,
499 public AbstractXMLObjectMarshaller,
500 public AbstractXMLObjectUnmarshaller
505 m_children.push_back(NULL);
506 m_pos_KeyInfo=m_children.begin();
509 virtual ~KeyDescriptorImpl() {
510 XMLString::release(&m_Use);
513 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
514 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
518 KeyDescriptorImpl(const KeyDescriptorImpl& src)
519 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
521 setUse(src.getUse());
522 if (src.getKeyInfo())
523 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
524 VectorOf(EncryptionMethod) v=getEncryptionMethods();
525 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
527 v.push_back((*i)->cloneEncryptionMethod());
532 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
533 IMPL_STRING_ATTRIB(Use);
534 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
535 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
538 void marshallAttributes(DOMElement* domElement) const {
539 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
542 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
543 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
544 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAMLConstants::SAML20MD_NS,false);
545 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
548 void processAttribute(const DOMAttr* attribute) {
549 PROC_STRING_ATTRIB(Use,USE,NULL);
550 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
554 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
555 public AbstractElementProxy,
556 public AbstractAttributeExtensibleXMLObject,
557 public AbstractDOMCachingXMLObject,
558 public AbstractXMLObjectMarshaller,
559 public AbstractXMLObjectUnmarshaller
562 m_Binding=m_Location=m_ResponseLocation=NULL;
571 virtual ~EndpointTypeImpl() {
572 XMLString::release(&m_Binding);
573 XMLString::release(&m_Location);
574 XMLString::release(&m_ResponseLocation);
577 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
578 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
581 EndpointTypeImpl(const EndpointTypeImpl& src)
582 : AbstractXMLObject(src), AbstractElementProxy(src),
583 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
584 setBinding(src.getBinding());
585 setLocation(src.getLocation());
586 setResponseLocation(src.getResponseLocation());
587 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
589 getXMLObjects().push_back((*i)->clone());
594 IMPL_XMLOBJECT_CLONE(EndpointType);
595 IMPL_STRING_ATTRIB(Binding);
596 IMPL_STRING_ATTRIB(Location);
597 IMPL_STRING_ATTRIB(ResponseLocation);
599 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
600 if (!qualifiedName.hasNamespaceURI()) {
601 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
605 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
609 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
610 setResponseLocation(value);
614 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
617 void marshallAttributes(DOMElement* domElement) const {
618 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
619 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
620 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
621 marshallExtensionAttributes(domElement);
624 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
626 const XMLCh* nsURI=root->getNamespaceURI();
627 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
628 getXMLObjects().push_back(childXMLObject);
631 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
634 void processAttribute(const DOMAttr* attribute) {
635 unmarshallExtensionAttribute(attribute);
639 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
643 m_isDefault=XMLConstants::XML_BOOL_NULL;
647 IndexedEndpointTypeImpl() {
651 virtual ~IndexedEndpointTypeImpl() {
652 XMLString::release(&m_Index);
655 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
656 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
658 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
659 setIndex(src.m_Index);
660 isDefault(src.m_isDefault);
663 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
664 EndpointType* cloneEndpointType() const {
665 return new IndexedEndpointTypeImpl(*this);
668 IMPL_INTEGER_ATTRIB(Index);
669 IMPL_BOOLEAN_ATTRIB(isDefault);
671 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
672 if (!qualifiedName.hasNamespaceURI()) {
673 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
677 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
682 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
686 void marshallAttributes(DOMElement* domElement) const {
687 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
688 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
689 EndpointTypeImpl::marshallAttributes(domElement);
693 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
696 virtual ~ArtifactResolutionServiceImpl() {}
698 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
699 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
701 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
703 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
704 IndexedEndpointType* cloneIndexedEndpointType() const {
705 return new ArtifactResolutionServiceImpl(*this);
707 EndpointType* cloneEndpointType() const {
708 return new ArtifactResolutionServiceImpl(*this);
712 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
715 virtual ~SingleLogoutServiceImpl() {}
717 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
718 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
720 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
722 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
723 EndpointType* cloneEndpointType() const {
724 return new SingleLogoutServiceImpl(*this);
728 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
731 virtual ~ManageNameIDServiceImpl() {}
733 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
734 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
736 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
738 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
739 EndpointType* cloneEndpointType() const {
740 return new ManageNameIDServiceImpl(*this);
744 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
747 virtual ~SingleSignOnServiceImpl() {}
749 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
750 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
752 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
754 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
755 EndpointType* cloneEndpointType() const {
756 return new SingleSignOnServiceImpl(*this);
760 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
763 virtual ~NameIDMappingServiceImpl() {}
765 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
766 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
768 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
770 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
771 EndpointType* cloneEndpointType() const {
772 return new NameIDMappingServiceImpl(*this);
776 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
779 virtual ~AssertionIDRequestServiceImpl() {}
781 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
782 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
784 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
786 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
787 EndpointType* cloneEndpointType() const {
788 return new AssertionIDRequestServiceImpl(*this);
792 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
795 virtual ~AssertionConsumerServiceImpl() {}
797 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
798 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
800 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
802 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
803 EndpointType* cloneEndpointType() const {
804 return new AssertionConsumerServiceImpl(*this);
806 IndexedEndpointType* cloneIndexedEndpointType() const {
807 return new AssertionConsumerServiceImpl(*this);
811 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
814 virtual ~AuthnQueryServiceImpl() {}
816 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
819 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
821 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
822 EndpointType* cloneEndpointType() const {
823 return new AuthnQueryServiceImpl(*this);
827 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
830 virtual ~AuthzServiceImpl() {}
832 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE(AuthzService);
838 EndpointType* cloneEndpointType() const {
839 return new AuthzServiceImpl(*this);
843 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
846 virtual ~AttributeServiceImpl() {}
848 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
849 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
851 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
853 IMPL_XMLOBJECT_CLONE(AttributeService);
854 EndpointType* cloneEndpointType() const {
855 return new AttributeServiceImpl(*this);
859 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
860 public virtual SignableObject,
861 public AbstractComplexElement,
862 public AbstractAttributeExtensibleXMLObject,
863 public AbstractDOMCachingXMLObject,
864 public AbstractXMLObjectMarshaller,
865 public AbstractXMLObjectUnmarshaller
868 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
869 m_ValidUntil=m_CacheDuration=NULL;
870 m_children.push_back(NULL);
871 m_children.push_back(NULL);
872 m_children.push_back(NULL);
873 m_children.push_back(NULL);
877 m_pos_Signature=m_children.begin();
878 m_pos_Extensions=m_pos_Signature;
880 m_pos_Organization=m_pos_Extensions;
881 ++m_pos_Organization;
882 m_pos_ContactPerson=m_pos_Organization;
883 ++m_pos_ContactPerson;
887 list<XMLObject*>::iterator m_pos_ContactPerson;
889 RoleDescriptorImpl() {
894 virtual ~RoleDescriptorImpl() {
895 XMLString::release(&m_ID);
896 XMLString::release(&m_ProtocolSupportEnumeration);
897 XMLString::release(&m_ErrorURL);
899 delete m_CacheDuration;
902 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
903 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
907 RoleDescriptorImpl(const RoleDescriptorImpl& src)
908 : AbstractXMLObject(src), AbstractComplexElement(src),
909 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
912 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
913 setErrorURL(src.getErrorURL());
914 setValidUntil(src.getValidUntil());
915 setCacheDuration(src.getCacheDuration());
916 if (src.getSignature())
917 setSignature(src.getSignature()->cloneSignature());
918 if (src.getExtensions())
919 setExtensions(src.getExtensions()->cloneExtensions());
920 if (src.getOrganization())
921 setOrganization(src.getOrganization()->cloneOrganization());
923 VectorOf(KeyDescriptor) v=getKeyDescriptors();
924 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
926 v.push_back((*i)->cloneKeyDescriptor());
929 VectorOf(ContactPerson) w=getContactPersons();
930 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
932 w.push_back((*j)->cloneContactPerson());
937 //IMPL_TYPED_CHILD(Signature);
938 // Need customized setter.
940 Signature* m_Signature;
941 list<XMLObject*>::iterator m_pos_Signature;
943 Signature* getSignature() const {
947 void setSignature(Signature* sig) {
948 prepareForAssignment(m_Signature,sig);
949 *m_pos_Signature=m_Signature=sig;
950 // Sync content reference back up.
952 m_Signature->setContentReference(new opensaml::ContentReference(*this));
956 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
957 IMPL_STRING_ATTRIB(ErrorURL);
958 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
959 IMPL_DATETIME_ATTRIB(CacheDuration,0);
960 IMPL_TYPED_CHILD(Extensions);
961 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
962 IMPL_TYPED_CHILD(Organization);
963 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
965 bool hasSupport(const XMLCh* protocol) const {
966 if (m_ProtocolSupportEnumeration) {
967 // Look for first character.
968 unsigned int len=XMLString::stringLen(protocol);
970 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
972 // Only possible match is if it's the first character or a space comes before it.
973 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
974 // See if rest of protocol string is present.
975 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
976 // Only possible match is if it's the last character or a space comes after it.
977 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
983 // Move past last search and start again.
988 // Move past last search and start again.
991 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
997 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
998 if (!qualifiedName.hasNamespaceURI()) {
999 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1003 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1004 setProtocolSupportEnumeration(value);
1007 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1011 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1012 setValidUntil(value);
1015 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1016 setCacheDuration(value);
1020 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1024 void marshallAttributes(DOMElement* domElement) const {
1025 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1026 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1027 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1028 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1029 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1030 marshallExtensionAttributes(domElement);
1033 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1034 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1035 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1036 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1037 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
1038 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
1039 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1042 void processAttribute(const DOMAttr* attribute) {
1043 PROC_ID_ATTRIB(ID,ID,NULL);
1044 unmarshallExtensionAttribute(attribute);
1048 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1051 m_children.push_back(NULL);
1052 m_children.push_back(NULL);
1053 m_children.push_back(NULL);
1054 m_children.push_back(NULL);
1055 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1056 ++m_pos_ArtifactResolutionService;
1057 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1058 ++m_pos_SingleLogoutService;
1059 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1060 ++m_pos_ManageNameIDService;
1061 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1062 ++m_pos_NameIDFormat;
1066 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1067 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1068 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1069 list<XMLObject*>::iterator m_pos_NameIDFormat;
1071 SSODescriptorTypeImpl() {
1076 virtual ~SSODescriptorTypeImpl() {}
1078 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1079 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1083 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1085 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1086 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1088 v.push_back((*i)->cloneArtifactResolutionService());
1091 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1092 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1094 w.push_back((*j)->cloneSingleLogoutService());
1097 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1098 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1100 x.push_back((*k)->cloneManageNameIDService());
1103 VectorOf(NameIDFormat) y=getNameIDFormats();
1104 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1106 y.push_back((*m)->cloneNameIDFormat());
1111 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1112 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1113 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1114 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1117 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1118 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAMLConstants::SAML20MD_NS,false);
1119 PROC_TYPED_CHILDREN(SingleLogoutService,SAMLConstants::SAML20MD_NS,false);
1120 PROC_TYPED_CHILDREN(ManageNameIDService,SAMLConstants::SAML20MD_NS,false);
1121 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1122 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1126 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1128 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1129 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1130 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1131 list<XMLObject*>::iterator m_pos_AttributeProfile;
1134 m_WantAuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1135 m_children.push_back(NULL);
1136 m_children.push_back(NULL);
1137 m_children.push_back(NULL);
1138 m_children.push_back(NULL);
1139 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1140 ++m_pos_SingleSignOnService;
1141 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1142 ++m_pos_NameIDMappingService;
1143 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1144 ++m_pos_AssertionIDRequestService;
1145 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1146 ++m_pos_AttributeProfile;
1150 virtual ~IDPSSODescriptorImpl() {}
1152 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1153 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1157 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1159 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1160 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1161 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1163 v.push_back((*i)->cloneSingleSignOnService());
1166 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1167 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1169 w.push_back((*j)->cloneNameIDMappingService());
1172 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1173 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1175 x.push_back((*k)->cloneAssertionIDRequestService());
1178 VectorOf(AttributeProfile) y=getAttributeProfiles();
1179 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1181 y.push_back((*m)->cloneAttributeProfile());
1184 VectorOf(Attribute) z=getAttributes();
1185 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1187 z.push_back((*n)->cloneAttribute());
1192 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1193 SSODescriptorType* cloneSSODescriptorType() const {
1194 return new IDPSSODescriptorImpl(*this);
1196 RoleDescriptor* cloneRoleDescriptor() const {
1197 return new IDPSSODescriptorImpl(*this);
1200 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1201 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1202 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1203 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1204 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1205 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1207 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1208 if (!qualifiedName.hasNamespaceURI()) {
1209 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1210 setWantAuthnRequestsSigned(value);
1214 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1218 void marshallAttributes(DOMElement* domElement) const {
1219 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1220 RoleDescriptorImpl::marshallAttributes(domElement);
1223 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1224 PROC_TYPED_CHILDREN(SingleSignOnService,SAMLConstants::SAML20MD_NS,false);
1225 PROC_TYPED_CHILDREN(NameIDMappingService,SAMLConstants::SAML20MD_NS,false);
1226 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1227 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1228 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1229 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1233 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1234 public AbstractComplexElement,
1235 public AbstractAttributeExtensibleXMLObject,
1236 public AbstractDOMCachingXMLObject,
1237 public AbstractXMLObjectMarshaller,
1238 public AbstractXMLObjectUnmarshaller
1241 m_Name=m_NameFormat=m_FriendlyName=NULL;
1242 m_isRequired=XMLConstants::XML_BOOL_NULL;
1245 virtual ~RequestedAttributeImpl() {
1246 XMLString::release(&m_Name);
1247 XMLString::release(&m_NameFormat);
1248 XMLString::release(&m_FriendlyName);
1251 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1252 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1256 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1257 : AbstractXMLObject(src), AbstractComplexElement(src),
1258 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1260 setName(src.getName());
1261 setNameFormat(src.getNameFormat());
1262 setFriendlyName(src.getFriendlyName());
1263 isRequired(src.m_isRequired);
1264 VectorOf(XMLObject) v=getAttributeValues();
1265 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1267 v.push_back((*i)->clone());
1272 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1273 Attribute* cloneAttribute() const {
1274 return new RequestedAttributeImpl(*this);
1277 IMPL_STRING_ATTRIB(Name);
1278 IMPL_STRING_ATTRIB(NameFormat);
1279 IMPL_STRING_ATTRIB(FriendlyName);
1280 IMPL_BOOLEAN_ATTRIB(isRequired);
1281 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1283 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1284 if (!qualifiedName.hasNamespaceURI()) {
1285 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1289 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1290 setNameFormat(value);
1293 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1294 setFriendlyName(value);
1297 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1298 setisRequired(value);
1302 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1306 void marshallAttributes(DOMElement* domElement) const {
1307 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1308 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1309 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1310 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1311 marshallExtensionAttributes(domElement);
1314 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1315 getAttributeValues().push_back(childXMLObject);
1318 void processAttribute(const DOMAttr* attribute) {
1319 unmarshallExtensionAttribute(attribute);
1323 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1324 public AbstractComplexElement,
1325 public AbstractDOMCachingXMLObject,
1326 public AbstractXMLObjectMarshaller,
1327 public AbstractXMLObjectUnmarshaller
1329 list<XMLObject*>::iterator m_pos_ServiceDescription;
1330 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1334 m_isDefault=XMLConstants::XML_BOOL_NULL;
1335 m_children.push_back(NULL);
1336 m_children.push_back(NULL);
1337 m_pos_ServiceDescription=m_children.begin();
1338 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1339 ++m_pos_RequestedAttribute;
1343 virtual ~AttributeConsumingServiceImpl() {
1344 XMLString::release(&m_Index);
1347 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1348 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1352 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1353 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1355 setIndex(src.m_Index);
1356 isDefault(src.m_isDefault);
1357 VectorOf(ServiceName) v=getServiceNames();
1358 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1360 v.push_back((*i)->cloneServiceName());
1363 VectorOf(ServiceDescription) w=getServiceDescriptions();
1364 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1366 w.push_back((*j)->cloneServiceDescription());
1369 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1370 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1372 x.push_back((*k)->cloneRequestedAttribute());
1377 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1378 IMPL_INTEGER_ATTRIB(Index);
1379 IMPL_BOOLEAN_ATTRIB(isDefault);
1380 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1381 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1382 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1385 void marshallAttributes(DOMElement* domElement) const {
1386 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1387 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1390 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1391 PROC_TYPED_CHILDREN(ServiceName,SAMLConstants::SAML20MD_NS,false);
1392 PROC_TYPED_CHILDREN(ServiceDescription,SAMLConstants::SAML20MD_NS,false);
1393 PROC_TYPED_CHILDREN(RequestedAttribute,SAMLConstants::SAML20MD_NS,false);
1394 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1397 void processAttribute(const DOMAttr* attribute) {
1398 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1399 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1400 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1404 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1406 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1409 m_AuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1410 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1411 m_children.push_back(NULL);
1412 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1413 ++m_pos_AssertionConsumerService;
1417 virtual ~SPSSODescriptorImpl() {}
1419 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1420 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1424 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1426 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1427 WantAssertionsSigned(src.m_WantAssertionsSigned);
1428 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1429 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1431 v.push_back((*i)->cloneAssertionConsumerService());
1434 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1435 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1437 w.push_back((*j)->cloneAttributeConsumingService());
1442 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1443 SSODescriptorType* cloneSSODescriptorType() const {
1444 return cloneSPSSODescriptor();
1446 RoleDescriptor* cloneRoleDescriptor() const {
1447 return cloneSPSSODescriptor();
1450 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1451 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1452 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1453 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1455 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1456 if (!qualifiedName.hasNamespaceURI()) {
1457 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1458 setAuthnRequestsSigned(value);
1461 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1462 setWantAssertionsSigned(value);
1466 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1470 void marshallAttributes(DOMElement* domElement) const {
1471 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1472 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1473 RoleDescriptorImpl::marshallAttributes(domElement);
1476 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1477 PROC_TYPED_CHILDREN(AssertionConsumerService,SAMLConstants::SAML20MD_NS,false);
1478 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1479 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1483 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1485 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1486 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1489 m_children.push_back(NULL);
1490 m_children.push_back(NULL);
1491 m_pos_AuthnQueryService=m_pos_ContactPerson;
1492 ++m_pos_AuthnQueryService;
1493 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1494 ++m_pos_AssertionIDRequestService;
1498 virtual ~AuthnAuthorityDescriptorImpl() {}
1500 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1501 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1505 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1507 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1508 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1510 v.push_back((*i)->cloneAuthnQueryService());
1513 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1514 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1516 w.push_back((*j)->cloneAssertionIDRequestService());
1519 VectorOf(NameIDFormat) x=getNameIDFormats();
1520 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1522 x.push_back((*k)->cloneNameIDFormat());
1527 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1528 RoleDescriptor* cloneRoleDescriptor() const {
1529 return cloneAuthnAuthorityDescriptor();
1532 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1533 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1534 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1537 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1538 PROC_TYPED_CHILDREN(AuthnQueryService,SAMLConstants::SAML20MD_NS,false);
1539 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1540 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1541 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1545 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1547 list<XMLObject*>::iterator m_pos_AuthzService;
1548 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1551 m_children.push_back(NULL);
1552 m_children.push_back(NULL);
1553 m_pos_AuthzService=m_pos_ContactPerson;
1554 ++m_pos_AuthzService;
1555 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1556 ++m_pos_AssertionIDRequestService;
1560 virtual ~PDPDescriptorImpl() {}
1562 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1563 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1567 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1569 VectorOf(AuthzService) v=getAuthzServices();
1570 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1572 v.push_back((*i)->cloneAuthzService());
1575 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1576 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1578 w.push_back((*j)->cloneAssertionIDRequestService());
1581 VectorOf(NameIDFormat) x=getNameIDFormats();
1582 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1584 x.push_back((*k)->cloneNameIDFormat());
1589 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1590 RoleDescriptor* cloneRoleDescriptor() const {
1591 return clonePDPDescriptor();
1594 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1595 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1596 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1599 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1600 PROC_TYPED_CHILDREN(AuthzService,SAMLConstants::SAML20MD_NS,false);
1601 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1602 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1603 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1607 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1609 list<XMLObject*>::iterator m_pos_AttributeService;
1610 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1611 list<XMLObject*>::iterator m_pos_NameIDFormat;
1612 list<XMLObject*>::iterator m_pos_AttributeProfile;
1615 m_children.push_back(NULL);
1616 m_children.push_back(NULL);
1617 m_children.push_back(NULL);
1618 m_children.push_back(NULL);
1619 m_pos_AttributeService=m_pos_ContactPerson;
1620 ++m_pos_AttributeService;
1621 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1622 ++m_pos_AssertionIDRequestService;
1623 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1624 ++m_pos_NameIDFormat;
1625 m_pos_AttributeProfile=m_pos_NameIDFormat;
1626 ++m_pos_AttributeProfile;
1630 virtual ~AttributeAuthorityDescriptorImpl() {}
1632 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1633 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1637 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1639 VectorOf(AttributeService) v=getAttributeServices();
1640 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1642 v.push_back((*i)->cloneAttributeService());
1645 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1646 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1648 w.push_back((*j)->cloneAssertionIDRequestService());
1651 VectorOf(NameIDFormat) x=getNameIDFormats();
1652 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1654 x.push_back((*k)->cloneNameIDFormat());
1657 VectorOf(AttributeProfile) y=getAttributeProfiles();
1658 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1660 y.push_back((*m)->cloneAttributeProfile());
1663 VectorOf(Attribute) z=getAttributes();
1664 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1666 z.push_back((*n)->cloneAttribute());
1671 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1672 RoleDescriptor* cloneRoleDescriptor() const {
1673 return cloneAttributeAuthorityDescriptor();
1676 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1677 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1678 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1679 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1680 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1683 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1684 PROC_TYPED_CHILDREN(AttributeService,SAMLConstants::SAML20MD_NS,false);
1685 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1686 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1687 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1688 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1689 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1693 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1696 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1697 m_children.push_back(NULL);
1698 m_pos_NameIDFormat=m_pos_ContactPerson;
1699 ++m_pos_NameIDFormat;
1703 list<XMLObject*>::iterator m_pos_NameIDFormat;
1705 QueryDescriptorTypeImpl() {
1710 virtual ~QueryDescriptorTypeImpl() {}
1712 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1713 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1717 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1719 WantAssertionsSigned(src.m_WantAssertionsSigned);
1720 VectorOf(NameIDFormat) y=getNameIDFormats();
1721 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1723 y.push_back((*m)->cloneNameIDFormat());
1728 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1729 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1731 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1732 if (!qualifiedName.hasNamespaceURI()) {
1733 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1734 setWantAssertionsSigned(value);
1738 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1742 void marshallAttributes(DOMElement* domElement) const {
1743 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1744 RoleDescriptorImpl::marshallAttributes(domElement);
1747 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1748 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1749 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1753 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1756 virtual ~AuthnQueryDescriptorTypeImpl() {}
1758 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1759 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1761 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1763 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1764 QueryDescriptorType* cloneQueryDescriptorType() const {
1765 return new AuthnQueryDescriptorTypeImpl(*this);
1767 RoleDescriptor* cloneRoleDescriptor() const {
1768 return new AuthnQueryDescriptorTypeImpl(*this);
1772 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1775 virtual ~AttributeQueryDescriptorTypeImpl() {}
1777 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1778 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1780 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1781 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1782 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1783 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1785 w.push_back((*j)->cloneAttributeConsumingService());
1790 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1791 QueryDescriptorType* cloneQueryDescriptorType() const {
1792 return new AttributeQueryDescriptorTypeImpl(*this);
1794 RoleDescriptor* cloneRoleDescriptor() const {
1795 return new AttributeQueryDescriptorTypeImpl(*this);
1798 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1801 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1802 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1803 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1807 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1810 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1812 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1813 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1815 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1816 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1817 VectorOf(ActionNamespace) w=getActionNamespaces();
1818 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1820 w.push_back((*j)->cloneActionNamespace());
1825 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1826 QueryDescriptorType* cloneQueryDescriptorType() const {
1827 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1829 RoleDescriptor* cloneRoleDescriptor() const {
1830 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1833 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1836 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1837 PROC_TYPED_CHILDREN(ActionNamespace,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
1838 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1842 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1843 public virtual SignableObject,
1844 public AbstractComplexElement,
1845 public AbstractAttributeExtensibleXMLObject,
1846 public AbstractDOMCachingXMLObject,
1847 public AbstractXMLObjectMarshaller,
1848 public AbstractXMLObjectUnmarshaller
1850 list<XMLObject*>::iterator m_pos_AffiliateMember;
1853 m_ID=m_AffiliationOwnerID=NULL;
1854 m_ValidUntil=m_CacheDuration=NULL;
1855 m_children.push_back(NULL);
1856 m_children.push_back(NULL);
1857 m_children.push_back(NULL);
1860 m_pos_Signature=m_children.begin();
1861 m_pos_Extensions=m_pos_Signature;
1863 m_pos_AffiliateMember=m_pos_Extensions;
1864 ++m_pos_AffiliateMember;
1868 virtual ~AffiliationDescriptorImpl() {
1869 XMLString::release(&m_ID);
1870 XMLString::release(&m_AffiliationOwnerID);
1871 delete m_ValidUntil;
1872 delete m_CacheDuration;
1875 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1876 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1880 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1881 : AbstractXMLObject(src), AbstractComplexElement(src),
1882 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1885 setAffiliationOwnerID(src.getAffiliationOwnerID());
1886 setValidUntil(src.getValidUntil());
1887 setCacheDuration(src.getCacheDuration());
1888 if (src.getSignature())
1889 setSignature(src.getSignature()->cloneSignature());
1890 if (src.getExtensions())
1891 setExtensions(src.getExtensions()->cloneExtensions());
1893 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1894 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1896 v.push_back((*i)->cloneKeyDescriptor());
1899 VectorOf(AffiliateMember) w=getAffiliateMembers();
1900 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1902 w.push_back((*j)->cloneAffiliateMember());
1907 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1909 //IMPL_TYPED_CHILD(Signature);
1910 // Need customized setter.
1912 Signature* m_Signature;
1913 list<XMLObject*>::iterator m_pos_Signature;
1915 Signature* getSignature() const {
1919 void setSignature(Signature* sig) {
1920 prepareForAssignment(m_Signature,sig);
1921 *m_pos_Signature=m_Signature=sig;
1922 // Sync content reference back up.
1924 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1928 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1929 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1930 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1931 IMPL_TYPED_CHILD(Extensions);
1932 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1933 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1935 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1936 if (!qualifiedName.hasNamespaceURI()) {
1937 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1941 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1942 setAffiliationOwnerID(value);
1945 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1946 setValidUntil(value);
1949 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1950 setCacheDuration(value);
1954 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1958 void marshallAttributes(DOMElement* domElement) const {
1959 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1960 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
1961 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1962 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1963 marshallExtensionAttributes(domElement);
1966 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1967 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1968 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1969 PROC_TYPED_CHILDREN(AffiliateMember,SAMLConstants::SAML20MD_NS,false);
1970 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1971 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1974 void processAttribute(const DOMAttr* attribute) {
1975 PROC_ID_ATTRIB(ID,ID,NULL);
1976 unmarshallExtensionAttribute(attribute);
1980 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
1981 public virtual SignableObject,
1982 public AbstractComplexElement,
1983 public AbstractAttributeExtensibleXMLObject,
1984 public AbstractDOMCachingXMLObject,
1985 public AbstractXMLObjectMarshaller,
1986 public AbstractXMLObjectUnmarshaller
1988 list<XMLObject*>::iterator m_pos_ContactPerson;
1991 m_ID=m_EntityID=NULL;
1992 m_ValidUntil=m_CacheDuration=NULL;
1993 m_children.push_back(NULL);
1994 m_children.push_back(NULL);
1995 m_children.push_back(NULL);
1996 m_children.push_back(NULL);
1997 m_children.push_back(NULL);
2000 m_AffiliationDescriptor=NULL;
2001 m_Organization=NULL;
2002 m_pos_Signature=m_children.begin();
2003 m_pos_Extensions=m_pos_Signature;
2005 m_pos_AffiliationDescriptor=m_pos_Extensions;
2006 ++m_pos_AffiliationDescriptor;
2007 m_pos_Organization=m_pos_AffiliationDescriptor;
2008 ++m_pos_Organization;
2009 m_pos_ContactPerson=m_pos_Organization;
2010 ++m_pos_ContactPerson;
2014 virtual ~EntityDescriptorImpl() {
2015 XMLString::release(&m_ID);
2016 XMLString::release(&m_EntityID);
2017 delete m_ValidUntil;
2018 delete m_CacheDuration;
2021 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2022 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2026 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2027 : AbstractXMLObject(src), AbstractComplexElement(src),
2028 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2031 setEntityID(src.getEntityID());
2032 setValidUntil(src.getValidUntil());
2033 setCacheDuration(src.getCacheDuration());
2034 if (src.getSignature())
2035 setSignature(src.getSignature()->cloneSignature());
2036 if (src.getExtensions())
2037 setExtensions(src.getExtensions()->cloneExtensions());
2038 if (src.getAffiliationDescriptor())
2039 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2040 if (src.getOrganization())
2041 setOrganization(src.getOrganization()->cloneOrganization());
2043 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2045 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2047 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2051 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2053 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2057 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2059 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2063 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2065 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2069 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2071 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2075 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2077 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2081 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2083 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2087 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2089 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2093 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2095 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2101 VectorOf(ContactPerson) v=getContactPersons();
2102 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2104 v.push_back((*j)->cloneContactPerson());
2107 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2108 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2110 w.push_back((*k)->cloneAdditionalMetadataLocation());
2115 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2117 //IMPL_TYPED_CHILD(Signature);
2118 // Need customized setter.
2120 Signature* m_Signature;
2121 list<XMLObject*>::iterator m_pos_Signature;
2123 Signature* getSignature() const {
2127 void setSignature(Signature* sig) {
2128 prepareForAssignment(m_Signature,sig);
2129 *m_pos_Signature=m_Signature=sig;
2130 // Sync content reference back up.
2132 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2136 IMPL_STRING_ATTRIB(EntityID);
2137 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2138 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2139 IMPL_TYPED_CHILD(Extensions);
2140 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2141 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2142 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2143 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2144 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2145 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2146 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2147 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2148 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2149 IMPL_TYPED_CHILD(AffiliationDescriptor);
2150 IMPL_TYPED_CHILD(Organization);
2151 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2152 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2154 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2155 if (!qualifiedName.hasNamespaceURI()) {
2156 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2160 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2164 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2165 setValidUntil(value);
2168 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2169 setCacheDuration(value);
2173 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2176 const IDPSSODescriptor* getIDPSSODescriptor(const XMLCh* protocol) const {
2177 for (vector<IDPSSODescriptor*>::const_iterator i=m_IDPSSODescriptors.begin(); i!=m_IDPSSODescriptors.end(); i++) {
2178 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2184 const SPSSODescriptor* getSPSSODescriptor(const XMLCh* protocol) const {
2185 for (vector<SPSSODescriptor*>::const_iterator i=m_SPSSODescriptors.begin(); i!=m_SPSSODescriptors.end(); i++) {
2186 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2192 const AuthnAuthorityDescriptor* getAuthnAuthorityDescriptor(const XMLCh* protocol) const {
2193 for (vector<AuthnAuthorityDescriptor*>::const_iterator i=m_AuthnAuthorityDescriptors.begin(); i!=m_AuthnAuthorityDescriptors.end(); i++) {
2194 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2200 const AttributeAuthorityDescriptor* getAttributeAuthorityDescriptor(const XMLCh* protocol) const {
2201 for (vector<AttributeAuthorityDescriptor*>::const_iterator i=m_AttributeAuthorityDescriptors.begin(); i!=m_AttributeAuthorityDescriptors.end(); i++) {
2202 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2208 const PDPDescriptor* getPDPDescriptor(const XMLCh* protocol) const {
2209 for (vector<PDPDescriptor*>::const_iterator i=m_PDPDescriptors.begin(); i!=m_PDPDescriptors.end(); i++) {
2210 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2216 const AuthnQueryDescriptorType* getAuthnQueryDescriptorType(const XMLCh* protocol) const {
2217 for (vector<AuthnQueryDescriptorType*>::const_iterator i=m_AuthnQueryDescriptorTypes.begin(); i!=m_AuthnQueryDescriptorTypes.end(); i++) {
2218 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2224 const AttributeQueryDescriptorType* getAttributeQueryDescriptorType(const XMLCh* protocol) const {
2225 for (vector<AttributeQueryDescriptorType*>::const_iterator i=m_AttributeQueryDescriptorTypes.begin(); i!=m_AttributeQueryDescriptorTypes.end(); i++) {
2226 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2232 const AuthzDecisionQueryDescriptorType* getAuthzDecisionQueryDescriptorType(const XMLCh* protocol) const {
2233 for (vector<AuthzDecisionQueryDescriptorType*>::const_iterator i=m_AuthzDecisionQueryDescriptorTypes.begin(); i!=m_AuthzDecisionQueryDescriptorTypes.end(); i++) {
2234 if ((*i)->hasSupport(protocol) && (*i)->isValid())
2240 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2241 // Check for "known" elements/types.
2243 q.setNamespaceURI(SAMLConstants::SAML20MD_NS);
2244 q.setLocalPart(IDPSSODescriptor::LOCAL_NAME);
2246 return getIDPSSODescriptor(protocol);
2247 q.setLocalPart(SPSSODescriptor::LOCAL_NAME);
2249 return getSPSSODescriptor(protocol);
2250 q.setLocalPart(AuthnAuthorityDescriptor::LOCAL_NAME);
2252 return getAuthnAuthorityDescriptor(protocol);
2253 q.setLocalPart(AttributeAuthorityDescriptor::LOCAL_NAME);
2255 return getAttributeAuthorityDescriptor(protocol);
2256 q.setLocalPart(PDPDescriptor::LOCAL_NAME);
2258 return getPDPDescriptor(protocol);
2259 q.setNamespaceURI(SAMLConstants::SAML20MD_QUERY_EXT_NS);
2260 q.setLocalPart(AuthnQueryDescriptorType::TYPE_NAME);
2262 return getAuthnQueryDescriptorType(protocol);
2263 q.setLocalPart(AttributeQueryDescriptorType::TYPE_NAME);
2265 return getAttributeQueryDescriptorType(protocol);
2266 q.setLocalPart(AuthzDecisionQueryDescriptorType::TYPE_NAME);
2268 return getAuthzDecisionQueryDescriptorType(protocol);
2270 for (vector<RoleDescriptor*>::const_iterator i=m_RoleDescriptors.begin(); i!=m_RoleDescriptors.end(); i++) {
2271 if ((*i)->getSchemaType() && qname==(*((*i)->getSchemaType())) && (*i)->hasSupport(protocol) && (*i)->isValid())
2278 void marshallAttributes(DOMElement* domElement) const {
2279 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2280 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2281 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2282 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2283 marshallExtensionAttributes(domElement);
2286 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2287 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2288 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2289 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2290 PROC_TYPED_CHILDREN(SPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2291 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2292 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2293 PROC_TYPED_CHILDREN(PDPDescriptor,SAMLConstants::SAML20MD_NS,false);
2294 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2295 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2296 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,SAMLConstants::SAML20MD_QUERY_EXT_NS,false);
2297 PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false);
2298 PROC_TYPED_CHILD(AffiliationDescriptor,SAMLConstants::SAML20MD_NS,false);
2299 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
2300 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
2301 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAMLConstants::SAML20MD_NS,false);
2302 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2305 void processAttribute(const DOMAttr* attribute) {
2306 PROC_ID_ATTRIB(ID,ID,NULL);
2307 unmarshallExtensionAttribute(attribute);
2311 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2312 public virtual SignableObject,
2313 public AbstractComplexElement,
2314 public AbstractDOMCachingXMLObject,
2315 public AbstractXMLObjectMarshaller,
2316 public AbstractXMLObjectUnmarshaller
2320 m_ValidUntil=m_CacheDuration=NULL;
2321 m_children.push_back(NULL);
2322 m_children.push_back(NULL);
2325 m_pos_Signature=m_children.begin();
2326 m_pos_Extensions=m_pos_Signature;
2331 virtual ~EntitiesDescriptorImpl() {
2332 XMLString::release(&m_ID);
2333 XMLString::release(&m_Name);
2334 delete m_ValidUntil;
2335 delete m_CacheDuration;
2338 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2339 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2343 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2344 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2347 setName(src.getName());
2348 setValidUntil(src.getValidUntil());
2349 setCacheDuration(src.getCacheDuration());
2350 if (src.getSignature())
2351 setSignature(src.getSignature()->cloneSignature());
2352 if (src.getExtensions())
2353 setExtensions(src.getExtensions()->cloneExtensions());
2355 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2357 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2359 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2363 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2365 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2372 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2374 //IMPL_TYPED_CHILD(Signature);
2375 // Need customized setter.
2377 Signature* m_Signature;
2378 list<XMLObject*>::iterator m_pos_Signature;
2380 Signature* getSignature() const {
2384 void setSignature(Signature* sig) {
2385 prepareForAssignment(m_Signature,sig);
2386 *m_pos_Signature=m_Signature=sig;
2387 // Sync content reference back up.
2389 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2393 IMPL_STRING_ATTRIB(Name);
2394 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2395 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2396 IMPL_TYPED_CHILD(Extensions);
2397 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2398 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2401 void marshallAttributes(DOMElement* domElement) const {
2402 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2403 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2404 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2405 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2408 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2409 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2410 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2411 PROC_TYPED_CHILDREN(EntityDescriptor,SAMLConstants::SAML20MD_NS,false);
2412 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAMLConstants::SAML20MD_NS,false);
2413 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2416 void processAttribute(const DOMAttr* attribute) {
2417 PROC_ID_ATTRIB(ID,ID,NULL);
2418 PROC_STRING_ATTRIB(Name,NAME,NULL);
2419 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2420 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2427 #if defined (_MSC_VER)
2428 #pragma warning( pop )
2431 // Builder Implementations
2433 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2434 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2435 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2436 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2437 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2438 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2439 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2440 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2441 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2442 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2443 IMPL_XMLOBJECTBUILDER(AttributeService);
2444 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2445 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2446 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2447 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2448 IMPL_XMLOBJECTBUILDER(AuthzService);
2449 IMPL_XMLOBJECTBUILDER(Company);
2450 IMPL_XMLOBJECTBUILDER(ContactPerson);
2451 IMPL_XMLOBJECTBUILDER(EmailAddress);
2452 IMPL_XMLOBJECTBUILDER(EndpointType);
2453 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2454 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2455 IMPL_XMLOBJECTBUILDER(Extensions);
2456 IMPL_XMLOBJECTBUILDER(GivenName);
2457 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2458 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2459 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2460 IMPL_XMLOBJECTBUILDER(localizedNameType);
2461 IMPL_XMLOBJECTBUILDER(localizedURIType);
2462 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2463 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2464 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2465 IMPL_XMLOBJECTBUILDER(Organization);
2466 IMPL_XMLOBJECTBUILDER(OrganizationName);
2467 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2468 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2469 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2470 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2471 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2472 IMPL_XMLOBJECTBUILDER(ServiceName);
2473 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2474 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2475 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2476 IMPL_XMLOBJECTBUILDER(SurName);
2477 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2479 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2480 IMPL_XMLOBJECTBUILDER(SourceID);
2482 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2483 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);
2484 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);
2485 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2486 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2487 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);
2488 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);
2489 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2490 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);
2491 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);
2492 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);
2493 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);
2494 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);
2495 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);
2496 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);
2497 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);
2498 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2499 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2500 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2501 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2502 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);
2503 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2504 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);
2505 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);
2506 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2507 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);
2508 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);
2509 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2510 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);
2511 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2512 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2513 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2514 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2515 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2516 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2517 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2518 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2519 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2520 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2521 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2522 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2523 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2524 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2525 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2526 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2527 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);
2528 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);
2529 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);
2530 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2531 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2532 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2533 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);
2534 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2535 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2536 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2537 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2538 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2539 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2540 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);
2541 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);
2542 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2543 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);
2544 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2545 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2546 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2547 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);
2548 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2549 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2550 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2551 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2552 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);
2553 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2554 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2555 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2556 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2557 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);
2558 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2559 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);
2560 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2561 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2562 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2563 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);
2564 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2565 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2566 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);
2567 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2568 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);
2569 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);
2570 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);
2571 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);
2572 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2573 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2574 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2575 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);
2576 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2577 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);
2578 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2579 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);
2580 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);
2581 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2582 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2583 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);
2584 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);
2585 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);
2586 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2587 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);
2588 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2589 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2590 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);