2 * Copyright 2001-2007 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/AbstractSimpleElement.h>
29 #include <xmltooling/impl/AnyElement.h>
30 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
31 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
32 #include <xmltooling/util/XMLHelper.h>
35 #include <xercesc/util/XMLUniDefs.hpp>
37 using namespace samlconstants;
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;
45 using xmlconstants::XMLSIG_NS;
46 using xmlconstants::XML_BOOL_NULL;
48 #if defined (_MSC_VER)
49 #pragma warning( push )
50 #pragma warning( disable : 4250 4251 )
56 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AffiliateMember);
57 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,AttributeProfile);
58 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,Company);
59 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,EmailAddress);
60 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,GivenName);
61 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,NameIDFormat);
62 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SurName);
63 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,TelephoneNumber);
65 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,ActionNamespace);
66 DECL_XMLOBJECTIMPL_SIMPLE(SAML_DLLLOCAL,SourceID);
68 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
69 public AbstractSimpleElement,
70 public AbstractDOMCachingXMLObject,
71 public AbstractXMLObjectMarshaller,
72 public AbstractXMLObjectUnmarshaller
79 localizedNameTypeImpl() {
84 virtual ~localizedNameTypeImpl() {
85 XMLString::release(&m_Lang);
88 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
89 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
93 localizedNameTypeImpl(const localizedNameTypeImpl& src)
94 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
96 setLang(src.getLang());
99 IMPL_XMLOBJECT_CLONE(localizedNameType);
100 IMPL_STRING_ATTRIB(Lang);
103 void marshallAttributes(DOMElement* domElement) const {
104 MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
107 void processAttribute(const DOMAttr* attribute) {
108 PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
109 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
113 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
114 public AbstractSimpleElement,
115 public AbstractDOMCachingXMLObject,
116 public AbstractXMLObjectMarshaller,
117 public AbstractXMLObjectUnmarshaller
124 localizedURITypeImpl() {
129 virtual ~localizedURITypeImpl() {
130 XMLString::release(&m_Lang);
133 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
134 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
138 localizedURITypeImpl(const localizedURITypeImpl& src)
139 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
141 setLang(src.getLang());
144 IMPL_XMLOBJECT_CLONE(localizedURIType);
145 IMPL_STRING_ATTRIB(Lang);
148 void marshallAttributes(DOMElement* domElement) const {
149 MARSHALL_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
152 void processAttribute(const DOMAttr* attribute) {
153 PROC_STRING_ATTRIB(Lang,LANG,xmlconstants::XML_NS);
154 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
158 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
161 virtual ~OrganizationNameImpl() {}
163 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
164 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
166 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
168 IMPL_XMLOBJECT_CLONE(OrganizationName);
169 localizedNameType* clonelocalizedNameType() const {
170 return new OrganizationNameImpl(*this);
174 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
177 virtual ~OrganizationDisplayNameImpl() {}
179 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
180 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
182 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
184 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
185 localizedNameType* clonelocalizedNameType() const {
186 return new OrganizationDisplayNameImpl(*this);
190 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
193 virtual ~OrganizationURLImpl() {}
195 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
196 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
198 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
200 IMPL_XMLOBJECT_CLONE(OrganizationURL);
201 localizedURIType* clonelocalizedURIType() const {
202 return new OrganizationURLImpl(*this);
206 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
209 virtual ~ServiceNameImpl() {}
211 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
212 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
214 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
216 IMPL_XMLOBJECT_CLONE(ServiceName);
217 localizedNameType* clonelocalizedNameType() const {
218 return new ServiceNameImpl(*this);
222 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
225 virtual ~ServiceDescriptionImpl() {}
227 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
228 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
230 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
232 IMPL_XMLOBJECT_CLONE(ServiceDescription);
233 localizedNameType* clonelocalizedNameType() const {
234 return new ServiceDescriptionImpl(*this);
238 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
239 public AbstractComplexElement,
240 public AbstractDOMCachingXMLObject,
241 public AbstractXMLObjectMarshaller,
242 public AbstractXMLObjectUnmarshaller
245 virtual ~ExtensionsImpl() {}
247 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
248 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
251 ExtensionsImpl(const ExtensionsImpl& src)
252 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
253 VectorOf(XMLObject) v=getUnknownXMLObjects();
254 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
255 v.push_back((*i)->clone());
258 IMPL_XMLOBJECT_CLONE(Extensions);
259 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
262 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
264 const XMLCh* nsURI=root->getNamespaceURI();
265 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
266 getUnknownXMLObjects().push_back(childXMLObject);
270 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
274 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
275 public AbstractComplexElement,
276 public AbstractAttributeExtensibleXMLObject,
277 public AbstractDOMCachingXMLObject,
278 public AbstractXMLObjectMarshaller,
279 public AbstractXMLObjectUnmarshaller
281 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
282 list<XMLObject*>::iterator m_pos_OrganizationURL;
285 m_children.push_back(NULL);
286 m_children.push_back(NULL);
287 m_children.push_back(NULL);
289 m_pos_Extensions=m_children.begin();
290 m_pos_OrganizationDisplayName=m_pos_Extensions;
291 ++m_pos_OrganizationDisplayName;
292 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
293 ++m_pos_OrganizationURL;
296 virtual ~OrganizationImpl() {}
298 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
299 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
303 OrganizationImpl(const OrganizationImpl& src)
304 : AbstractXMLObject(src), AbstractComplexElement(src),
305 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
307 if (src.getExtensions())
308 setExtensions(src.getExtensions()->cloneExtensions());
309 VectorOf(OrganizationName) v=getOrganizationNames();
310 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
312 v.push_back((*i)->cloneOrganizationName());
315 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
316 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
318 w.push_back((*j)->cloneOrganizationDisplayName());
321 VectorOf(OrganizationURL) x=getOrganizationURLs();
322 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
324 x.push_back((*k)->cloneOrganizationURL());
329 IMPL_XMLOBJECT_CLONE(Organization);
330 IMPL_TYPED_CHILD(Extensions);
331 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
332 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
333 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
336 void marshallAttributes(DOMElement* domElement) const {
337 marshallExtensionAttributes(domElement);
340 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
341 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
342 PROC_TYPED_CHILDREN(OrganizationName,SAML20MD_NS,false);
343 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAML20MD_NS,false);
344 PROC_TYPED_CHILDREN(OrganizationURL,SAML20MD_NS,false);
345 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
348 void processAttribute(const DOMAttr* attribute) {
349 unmarshallExtensionAttribute(attribute);
353 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
354 public AbstractComplexElement,
355 public AbstractAttributeExtensibleXMLObject,
356 public AbstractDOMCachingXMLObject,
357 public AbstractXMLObjectMarshaller,
358 public AbstractXMLObjectUnmarshaller
360 list<XMLObject*>::iterator m_pos_TelephoneNumber;
364 m_children.push_back(NULL);
365 m_children.push_back(NULL);
366 m_children.push_back(NULL);
367 m_children.push_back(NULL);
368 m_children.push_back(NULL);
373 m_pos_Extensions=m_children.begin();
374 m_pos_Company=m_pos_Extensions;
376 m_pos_GivenName=m_pos_Company;
378 m_pos_SurName=m_pos_GivenName;
380 m_pos_TelephoneNumber=m_pos_SurName;
381 ++m_pos_TelephoneNumber;
384 virtual ~ContactPersonImpl() {
385 XMLString::release(&m_ContactType);
388 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
389 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
393 ContactPersonImpl(const ContactPersonImpl& src)
394 : AbstractXMLObject(src), AbstractComplexElement(src),
395 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
397 if (src.getExtensions())
398 setExtensions(src.getExtensions()->cloneExtensions());
399 if (src.getCompany())
400 setCompany(src.getCompany()->cloneCompany());
401 if (src.getGivenName())
402 setGivenName(src.getGivenName()->cloneGivenName());
403 if (src.getSurName())
404 setSurName(src.getSurName()->cloneSurName());
406 VectorOf(EmailAddress) v=getEmailAddresss();
407 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
409 v.push_back((*i)->cloneEmailAddress());
412 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
413 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
415 w.push_back((*j)->cloneTelephoneNumber());
420 IMPL_XMLOBJECT_CLONE(ContactPerson);
421 IMPL_STRING_ATTRIB(ContactType);
422 IMPL_TYPED_CHILD(Extensions);
423 IMPL_TYPED_CHILD(Company);
424 IMPL_TYPED_CHILD(GivenName);
425 IMPL_TYPED_CHILD(SurName);
426 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
427 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
429 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
430 if (!qualifiedName.hasNamespaceURI()) {
431 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
432 setContactType(value);
436 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
440 void marshallAttributes(DOMElement* domElement) const {
441 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
442 marshallExtensionAttributes(domElement);
445 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
446 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
447 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
448 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
449 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
450 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
451 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
452 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
455 void processAttribute(const DOMAttr* attribute) {
456 unmarshallExtensionAttribute(attribute);
460 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
461 public AbstractSimpleElement,
462 public AbstractDOMCachingXMLObject,
463 public AbstractXMLObjectMarshaller,
464 public AbstractXMLObjectUnmarshaller
471 virtual ~AdditionalMetadataLocationImpl() {
472 XMLString::release(&m_Namespace);
475 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
476 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
480 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
481 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
485 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
486 IMPL_STRING_ATTRIB(Namespace);
489 void marshallAttributes(DOMElement* domElement) const {
490 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
493 void processAttribute(const DOMAttr* attribute) {
494 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
495 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
499 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
500 public AbstractComplexElement,
501 public AbstractDOMCachingXMLObject,
502 public AbstractXMLObjectMarshaller,
503 public AbstractXMLObjectUnmarshaller
508 m_children.push_back(NULL);
509 m_pos_KeyInfo=m_children.begin();
512 virtual ~KeyDescriptorImpl() {
513 XMLString::release(&m_Use);
516 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
517 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
521 KeyDescriptorImpl(const KeyDescriptorImpl& src)
522 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
524 setUse(src.getUse());
525 if (src.getKeyInfo())
526 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
527 VectorOf(EncryptionMethod) v=getEncryptionMethods();
528 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
530 v.push_back((*i)->cloneEncryptionMethod());
535 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
536 IMPL_STRING_ATTRIB(Use);
537 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
538 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
541 void marshallAttributes(DOMElement* domElement) const {
542 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
545 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
546 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
547 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
548 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
551 void processAttribute(const DOMAttr* attribute) {
552 PROC_STRING_ATTRIB(Use,USE,NULL);
553 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
557 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
558 public AbstractAttributeExtensibleXMLObject,
559 public AbstractComplexElement,
560 public AbstractDOMCachingXMLObject,
561 public AbstractXMLObjectMarshaller,
562 public AbstractXMLObjectUnmarshaller
565 m_Binding=m_Location=m_ResponseLocation=NULL;
574 virtual ~EndpointTypeImpl() {
575 XMLString::release(&m_Binding);
576 XMLString::release(&m_Location);
577 XMLString::release(&m_ResponseLocation);
580 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
581 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
584 EndpointTypeImpl(const EndpointTypeImpl& src)
585 : AbstractXMLObject(src),
586 AbstractAttributeExtensibleXMLObject(src),
587 AbstractComplexElement(src),
588 AbstractDOMCachingXMLObject(src) {
589 setBinding(src.getBinding());
590 setLocation(src.getLocation());
591 setResponseLocation(src.getResponseLocation());
592 VectorOf(XMLObject) v=getUnknownXMLObjects();
593 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
594 v.push_back((*i)->clone());
597 IMPL_XMLOBJECT_CLONE(EndpointType);
598 IMPL_STRING_ATTRIB(Binding);
599 IMPL_STRING_ATTRIB(Location);
600 IMPL_STRING_ATTRIB(ResponseLocation);
601 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
603 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
604 if (!qualifiedName.hasNamespaceURI()) {
605 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
609 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
613 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
614 setResponseLocation(value);
618 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
621 void marshallAttributes(DOMElement* domElement) const {
622 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
623 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
624 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
625 marshallExtensionAttributes(domElement);
628 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
630 const XMLCh* nsURI=root->getNamespaceURI();
631 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
632 getUnknownXMLObjects().push_back(childXMLObject);
635 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
638 void processAttribute(const DOMAttr* attribute) {
639 unmarshallExtensionAttribute(attribute);
643 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
647 m_isDefault=XML_BOOL_NULL;
651 IndexedEndpointTypeImpl() {
655 virtual ~IndexedEndpointTypeImpl() {
656 XMLString::release(&m_Index);
659 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
660 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
662 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
663 setIndex(src.m_Index);
664 isDefault(src.m_isDefault);
667 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
668 EndpointType* cloneEndpointType() const {
669 return new IndexedEndpointTypeImpl(*this);
672 IMPL_INTEGER_ATTRIB(Index);
673 IMPL_BOOLEAN_ATTRIB(isDefault);
675 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
676 if (!qualifiedName.hasNamespaceURI()) {
677 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
681 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
686 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
690 void marshallAttributes(DOMElement* domElement) const {
691 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
692 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
693 EndpointTypeImpl::marshallAttributes(domElement);
697 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
700 virtual ~ArtifactResolutionServiceImpl() {}
702 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
703 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
705 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
707 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
708 IndexedEndpointType* cloneIndexedEndpointType() const {
709 return new ArtifactResolutionServiceImpl(*this);
711 EndpointType* cloneEndpointType() const {
712 return new ArtifactResolutionServiceImpl(*this);
716 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
719 virtual ~SingleLogoutServiceImpl() {}
721 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
722 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
724 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
726 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
727 EndpointType* cloneEndpointType() const {
728 return new SingleLogoutServiceImpl(*this);
732 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
735 virtual ~ManageNameIDServiceImpl() {}
737 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
738 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
740 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
742 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
743 EndpointType* cloneEndpointType() const {
744 return new ManageNameIDServiceImpl(*this);
748 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
751 virtual ~SingleSignOnServiceImpl() {}
753 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
754 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
756 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
758 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
759 EndpointType* cloneEndpointType() const {
760 return new SingleSignOnServiceImpl(*this);
764 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
767 virtual ~NameIDMappingServiceImpl() {}
769 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
770 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
772 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
774 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
775 EndpointType* cloneEndpointType() const {
776 return new NameIDMappingServiceImpl(*this);
780 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
783 virtual ~AssertionIDRequestServiceImpl() {}
785 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
786 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
788 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
790 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
791 EndpointType* cloneEndpointType() const {
792 return new AssertionIDRequestServiceImpl(*this);
796 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
799 virtual ~AssertionConsumerServiceImpl() {}
801 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
802 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
804 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
806 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
807 EndpointType* cloneEndpointType() const {
808 return new AssertionConsumerServiceImpl(*this);
810 IndexedEndpointType* cloneIndexedEndpointType() const {
811 return new AssertionConsumerServiceImpl(*this);
815 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
818 virtual ~AuthnQueryServiceImpl() {}
820 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
821 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
823 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
825 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
826 EndpointType* cloneEndpointType() const {
827 return new AuthnQueryServiceImpl(*this);
831 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
834 virtual ~AuthzServiceImpl() {}
836 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
837 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
839 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
841 IMPL_XMLOBJECT_CLONE(AuthzService);
842 EndpointType* cloneEndpointType() const {
843 return new AuthzServiceImpl(*this);
847 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
850 virtual ~AttributeServiceImpl() {}
852 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
853 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
855 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
857 IMPL_XMLOBJECT_CLONE(AttributeService);
858 EndpointType* cloneEndpointType() const {
859 return new AttributeServiceImpl(*this);
863 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
864 public virtual SignableObject,
865 public AbstractComplexElement,
866 public AbstractAttributeExtensibleXMLObject,
867 public AbstractDOMCachingXMLObject,
868 public AbstractXMLObjectMarshaller,
869 public AbstractXMLObjectUnmarshaller
872 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
873 m_ValidUntil=m_CacheDuration=NULL;
874 m_children.push_back(NULL);
875 m_children.push_back(NULL);
876 m_children.push_back(NULL);
877 m_children.push_back(NULL);
881 m_pos_Signature=m_children.begin();
882 m_pos_Extensions=m_pos_Signature;
884 m_pos_Organization=m_pos_Extensions;
885 ++m_pos_Organization;
886 m_pos_ContactPerson=m_pos_Organization;
887 ++m_pos_ContactPerson;
891 list<XMLObject*>::iterator m_pos_ContactPerson;
893 RoleDescriptorImpl() {
898 virtual ~RoleDescriptorImpl() {
899 XMLString::release(&m_ID);
900 XMLString::release(&m_ProtocolSupportEnumeration);
901 XMLString::release(&m_ErrorURL);
903 delete m_CacheDuration;
906 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
907 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
911 RoleDescriptorImpl(const RoleDescriptorImpl& src)
912 : AbstractXMLObject(src), AbstractComplexElement(src),
913 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
916 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
917 setErrorURL(src.getErrorURL());
918 setValidUntil(src.getValidUntil());
919 setCacheDuration(src.getCacheDuration());
920 if (src.getSignature())
921 setSignature(src.getSignature()->cloneSignature());
922 if (src.getExtensions())
923 setExtensions(src.getExtensions()->cloneExtensions());
924 if (src.getOrganization())
925 setOrganization(src.getOrganization()->cloneOrganization());
927 VectorOf(KeyDescriptor) v=getKeyDescriptors();
928 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
930 v.push_back((*i)->cloneKeyDescriptor());
933 VectorOf(ContactPerson) w=getContactPersons();
934 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
936 w.push_back((*j)->cloneContactPerson());
941 //IMPL_TYPED_CHILD(Signature);
942 // Need customized setter.
944 Signature* m_Signature;
945 list<XMLObject*>::iterator m_pos_Signature;
947 Signature* getSignature() const {
951 void setSignature(Signature* sig) {
952 prepareForAssignment(m_Signature,sig);
953 *m_pos_Signature=m_Signature=sig;
954 // Sync content reference back up.
956 m_Signature->setContentReference(new opensaml::ContentReference(*this));
960 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
961 IMPL_STRING_ATTRIB(ErrorURL);
962 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
963 IMPL_DURATION_ATTRIB(CacheDuration,0);
964 IMPL_TYPED_CHILD(Extensions);
965 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
966 IMPL_TYPED_CHILD(Organization);
967 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
969 bool hasSupport(const XMLCh* protocol) const {
970 if (!protocol || !*protocol)
972 if (m_ProtocolSupportEnumeration) {
973 // Look for first character.
974 unsigned int len=XMLString::stringLen(protocol);
976 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
978 // Only possible match is if it's the first character or a space comes before it.
979 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
980 // See if rest of protocol string is present.
981 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
982 // Only possible match is if it's the last character or a space comes after it.
983 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
989 // Move past last search and start again.
994 // Move past last search and start again.
997 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1003 void addSupport(const XMLCh* protocol) {
1004 if (hasSupport(protocol))
1006 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1007 #ifdef HAVE_GOOD_STL
1008 xstring pse(m_ProtocolSupportEnumeration);
1009 pse = pse + chSpace + protocol;
1010 setProtocolSupportEnumeration(pse.c_str());
1012 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1013 auto_ptr_char temp2(protocol);
1014 string pse(temp.get());
1015 pse = pse + ' ' + temp2.get();
1016 auto_ptr_XMLCh temp3(pse.c_str());
1017 setProtocolSupportEnumeration(temp3.get());
1021 setProtocolSupportEnumeration(protocol);
1025 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1026 if (!qualifiedName.hasNamespaceURI()) {
1027 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1031 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1032 setProtocolSupportEnumeration(value);
1035 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1039 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1040 setValidUntil(value);
1043 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1044 setCacheDuration(value);
1048 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1052 void marshallAttributes(DOMElement* domElement) const {
1053 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1054 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1055 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1056 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1057 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1058 marshallExtensionAttributes(domElement);
1061 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1062 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1063 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1064 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1065 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1066 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1067 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1070 void processAttribute(const DOMAttr* attribute) {
1071 PROC_ID_ATTRIB(ID,ID,NULL);
1072 unmarshallExtensionAttribute(attribute);
1076 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1079 virtual ~RoleDescriptorTypeImpl() {}
1081 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1082 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1085 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1086 VectorOf(XMLObject) v=getUnknownXMLObjects();
1087 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1088 v.push_back((*i)->clone());
1091 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1092 RoleDescriptor* cloneRoleDescriptor() const {
1093 return new RoleDescriptorTypeImpl(*this);
1096 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1099 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1100 getUnknownXMLObjects().push_back(childXMLObject);
1104 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1107 m_children.push_back(NULL);
1108 m_children.push_back(NULL);
1109 m_children.push_back(NULL);
1110 m_children.push_back(NULL);
1111 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1112 ++m_pos_ArtifactResolutionService;
1113 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1114 ++m_pos_SingleLogoutService;
1115 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1116 ++m_pos_ManageNameIDService;
1117 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1118 ++m_pos_NameIDFormat;
1122 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1123 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1124 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1125 list<XMLObject*>::iterator m_pos_NameIDFormat;
1127 SSODescriptorTypeImpl() {
1132 virtual ~SSODescriptorTypeImpl() {}
1134 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1135 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1139 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1141 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1142 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1144 v.push_back((*i)->cloneArtifactResolutionService());
1147 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1148 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1150 w.push_back((*j)->cloneSingleLogoutService());
1153 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1154 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1156 x.push_back((*k)->cloneManageNameIDService());
1159 VectorOf(NameIDFormat) y=getNameIDFormats();
1160 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1162 y.push_back((*m)->cloneNameIDFormat());
1167 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1168 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1169 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1170 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1173 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1174 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1175 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1176 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1177 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1178 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1182 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1184 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1185 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1186 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1187 list<XMLObject*>::iterator m_pos_AttributeProfile;
1190 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1191 m_children.push_back(NULL);
1192 m_children.push_back(NULL);
1193 m_children.push_back(NULL);
1194 m_children.push_back(NULL);
1195 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1196 ++m_pos_SingleSignOnService;
1197 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1198 ++m_pos_NameIDMappingService;
1199 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1200 ++m_pos_AssertionIDRequestService;
1201 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1202 ++m_pos_AttributeProfile;
1206 virtual ~IDPSSODescriptorImpl() {}
1208 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1209 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1213 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1215 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1216 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1217 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1219 v.push_back((*i)->cloneSingleSignOnService());
1222 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1223 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1225 w.push_back((*j)->cloneNameIDMappingService());
1228 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1229 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1231 x.push_back((*k)->cloneAssertionIDRequestService());
1234 VectorOf(AttributeProfile) y=getAttributeProfiles();
1235 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1237 y.push_back((*m)->cloneAttributeProfile());
1240 VectorOf(Attribute) z=getAttributes();
1241 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1243 z.push_back((*n)->cloneAttribute());
1248 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1249 SSODescriptorType* cloneSSODescriptorType() const {
1250 return new IDPSSODescriptorImpl(*this);
1252 RoleDescriptor* cloneRoleDescriptor() const {
1253 return new IDPSSODescriptorImpl(*this);
1256 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1257 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1258 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1259 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1260 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1261 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1263 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1264 if (!qualifiedName.hasNamespaceURI()) {
1265 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1266 setWantAuthnRequestsSigned(value);
1270 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1274 void marshallAttributes(DOMElement* domElement) const {
1275 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1276 RoleDescriptorImpl::marshallAttributes(domElement);
1279 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1280 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1281 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1282 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1283 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1284 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1285 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1289 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1290 public AbstractComplexElement,
1291 public AbstractAttributeExtensibleXMLObject,
1292 public AbstractDOMCachingXMLObject,
1293 public AbstractXMLObjectMarshaller,
1294 public AbstractXMLObjectUnmarshaller
1297 m_Name=m_NameFormat=m_FriendlyName=NULL;
1298 m_isRequired=XML_BOOL_NULL;
1301 virtual ~RequestedAttributeImpl() {
1302 XMLString::release(&m_Name);
1303 XMLString::release(&m_NameFormat);
1304 XMLString::release(&m_FriendlyName);
1307 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1308 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1312 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1313 : AbstractXMLObject(src), AbstractComplexElement(src),
1314 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1316 setName(src.getName());
1317 setNameFormat(src.getNameFormat());
1318 setFriendlyName(src.getFriendlyName());
1319 isRequired(src.m_isRequired);
1320 VectorOf(XMLObject) v=getAttributeValues();
1321 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1323 v.push_back((*i)->clone());
1328 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1329 Attribute* cloneAttribute() const {
1330 return new RequestedAttributeImpl(*this);
1333 IMPL_STRING_ATTRIB(Name);
1334 IMPL_STRING_ATTRIB(NameFormat);
1335 IMPL_STRING_ATTRIB(FriendlyName);
1336 IMPL_BOOLEAN_ATTRIB(isRequired);
1337 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1339 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1340 if (!qualifiedName.hasNamespaceURI()) {
1341 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1345 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1346 setNameFormat(value);
1349 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1350 setFriendlyName(value);
1353 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1354 setisRequired(value);
1358 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1362 void marshallAttributes(DOMElement* domElement) const {
1363 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1364 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1365 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1366 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1367 marshallExtensionAttributes(domElement);
1370 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1371 getAttributeValues().push_back(childXMLObject);
1374 void processAttribute(const DOMAttr* attribute) {
1375 unmarshallExtensionAttribute(attribute);
1379 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1380 public AbstractComplexElement,
1381 public AbstractDOMCachingXMLObject,
1382 public AbstractXMLObjectMarshaller,
1383 public AbstractXMLObjectUnmarshaller
1385 list<XMLObject*>::iterator m_pos_ServiceDescription;
1386 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1390 m_isDefault=XML_BOOL_NULL;
1391 m_children.push_back(NULL);
1392 m_children.push_back(NULL);
1393 m_pos_ServiceDescription=m_children.begin();
1394 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1395 ++m_pos_RequestedAttribute;
1399 virtual ~AttributeConsumingServiceImpl() {
1400 XMLString::release(&m_Index);
1403 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1404 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1408 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1409 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1411 setIndex(src.m_Index);
1412 isDefault(src.m_isDefault);
1413 VectorOf(ServiceName) v=getServiceNames();
1414 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1416 v.push_back((*i)->cloneServiceName());
1419 VectorOf(ServiceDescription) w=getServiceDescriptions();
1420 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1422 w.push_back((*j)->cloneServiceDescription());
1425 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1426 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1428 x.push_back((*k)->cloneRequestedAttribute());
1433 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1434 IMPL_INTEGER_ATTRIB(Index);
1435 IMPL_BOOLEAN_ATTRIB(isDefault);
1436 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1437 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1438 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1441 void marshallAttributes(DOMElement* domElement) const {
1442 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1443 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1446 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1447 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1448 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1449 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1450 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1453 void processAttribute(const DOMAttr* attribute) {
1454 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1455 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1456 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1460 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1462 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1465 m_AuthnRequestsSigned=XML_BOOL_NULL;
1466 m_WantAssertionsSigned=XML_BOOL_NULL;
1467 m_children.push_back(NULL);
1468 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1469 ++m_pos_AssertionConsumerService;
1473 virtual ~SPSSODescriptorImpl() {}
1475 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1476 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1480 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1482 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1483 WantAssertionsSigned(src.m_WantAssertionsSigned);
1484 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1485 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1487 v.push_back((*i)->cloneAssertionConsumerService());
1490 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1491 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1493 w.push_back((*j)->cloneAttributeConsumingService());
1498 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1499 SSODescriptorType* cloneSSODescriptorType() const {
1500 return cloneSPSSODescriptor();
1502 RoleDescriptor* cloneRoleDescriptor() const {
1503 return cloneSPSSODescriptor();
1506 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1507 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1508 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1509 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1511 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1512 if (!qualifiedName.hasNamespaceURI()) {
1513 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1514 setAuthnRequestsSigned(value);
1517 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1518 setWantAssertionsSigned(value);
1522 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1526 void marshallAttributes(DOMElement* domElement) const {
1527 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1528 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1529 RoleDescriptorImpl::marshallAttributes(domElement);
1532 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1533 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1534 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1535 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1539 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1541 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1542 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1545 m_children.push_back(NULL);
1546 m_children.push_back(NULL);
1547 m_pos_AuthnQueryService=m_pos_ContactPerson;
1548 ++m_pos_AuthnQueryService;
1549 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1550 ++m_pos_AssertionIDRequestService;
1554 virtual ~AuthnAuthorityDescriptorImpl() {}
1556 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1557 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1561 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1563 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1564 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1566 v.push_back((*i)->cloneAuthnQueryService());
1569 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1570 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1572 w.push_back((*j)->cloneAssertionIDRequestService());
1575 VectorOf(NameIDFormat) x=getNameIDFormats();
1576 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1578 x.push_back((*k)->cloneNameIDFormat());
1583 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1584 RoleDescriptor* cloneRoleDescriptor() const {
1585 return cloneAuthnAuthorityDescriptor();
1588 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1589 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1590 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1593 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1594 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1595 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1596 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1597 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1601 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1603 list<XMLObject*>::iterator m_pos_AuthzService;
1604 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1607 m_children.push_back(NULL);
1608 m_children.push_back(NULL);
1609 m_pos_AuthzService=m_pos_ContactPerson;
1610 ++m_pos_AuthzService;
1611 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1612 ++m_pos_AssertionIDRequestService;
1616 virtual ~PDPDescriptorImpl() {}
1618 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1619 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1623 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1625 VectorOf(AuthzService) v=getAuthzServices();
1626 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1628 v.push_back((*i)->cloneAuthzService());
1631 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1632 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1634 w.push_back((*j)->cloneAssertionIDRequestService());
1637 VectorOf(NameIDFormat) x=getNameIDFormats();
1638 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1640 x.push_back((*k)->cloneNameIDFormat());
1645 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1646 RoleDescriptor* cloneRoleDescriptor() const {
1647 return clonePDPDescriptor();
1650 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1651 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1652 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1655 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1656 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1657 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1658 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1659 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1663 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1665 list<XMLObject*>::iterator m_pos_AttributeService;
1666 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1667 list<XMLObject*>::iterator m_pos_NameIDFormat;
1668 list<XMLObject*>::iterator m_pos_AttributeProfile;
1671 m_children.push_back(NULL);
1672 m_children.push_back(NULL);
1673 m_children.push_back(NULL);
1674 m_children.push_back(NULL);
1675 m_pos_AttributeService=m_pos_ContactPerson;
1676 ++m_pos_AttributeService;
1677 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1678 ++m_pos_AssertionIDRequestService;
1679 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1680 ++m_pos_NameIDFormat;
1681 m_pos_AttributeProfile=m_pos_NameIDFormat;
1682 ++m_pos_AttributeProfile;
1686 virtual ~AttributeAuthorityDescriptorImpl() {}
1688 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1689 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1693 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1695 VectorOf(AttributeService) v=getAttributeServices();
1696 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1698 v.push_back((*i)->cloneAttributeService());
1701 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1702 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1704 w.push_back((*j)->cloneAssertionIDRequestService());
1707 VectorOf(NameIDFormat) x=getNameIDFormats();
1708 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1710 x.push_back((*k)->cloneNameIDFormat());
1713 VectorOf(AttributeProfile) y=getAttributeProfiles();
1714 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1716 y.push_back((*m)->cloneAttributeProfile());
1719 VectorOf(Attribute) z=getAttributes();
1720 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1722 z.push_back((*n)->cloneAttribute());
1727 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1728 RoleDescriptor* cloneRoleDescriptor() const {
1729 return cloneAttributeAuthorityDescriptor();
1732 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1733 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1734 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1735 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1736 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1739 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1740 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1741 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1742 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1743 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1744 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1745 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1749 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1752 m_WantAssertionsSigned=XML_BOOL_NULL;
1753 m_children.push_back(NULL);
1754 m_pos_NameIDFormat=m_pos_ContactPerson;
1755 ++m_pos_NameIDFormat;
1759 list<XMLObject*>::iterator m_pos_NameIDFormat;
1761 QueryDescriptorTypeImpl() {
1766 virtual ~QueryDescriptorTypeImpl() {}
1768 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1773 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1775 WantAssertionsSigned(src.m_WantAssertionsSigned);
1776 VectorOf(NameIDFormat) y=getNameIDFormats();
1777 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1779 y.push_back((*m)->cloneNameIDFormat());
1784 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1785 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1787 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1788 if (!qualifiedName.hasNamespaceURI()) {
1789 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1790 setWantAssertionsSigned(value);
1794 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1798 void marshallAttributes(DOMElement* domElement) const {
1799 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1800 RoleDescriptorImpl::marshallAttributes(domElement);
1803 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1804 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1805 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1809 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1812 virtual ~AuthnQueryDescriptorTypeImpl() {}
1814 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1815 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1817 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1819 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1820 QueryDescriptorType* cloneQueryDescriptorType() const {
1821 return new AuthnQueryDescriptorTypeImpl(*this);
1823 RoleDescriptor* cloneRoleDescriptor() const {
1824 return new AuthnQueryDescriptorTypeImpl(*this);
1828 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1831 virtual ~AttributeQueryDescriptorTypeImpl() {}
1833 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1834 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1836 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1837 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1838 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1839 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1841 w.push_back((*j)->cloneAttributeConsumingService());
1846 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1847 QueryDescriptorType* cloneQueryDescriptorType() const {
1848 return new AttributeQueryDescriptorTypeImpl(*this);
1850 RoleDescriptor* cloneRoleDescriptor() const {
1851 return new AttributeQueryDescriptorTypeImpl(*this);
1854 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1857 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1858 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1859 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1863 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1866 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1868 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1869 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1871 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1872 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1873 VectorOf(ActionNamespace) w=getActionNamespaces();
1874 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1876 w.push_back((*j)->cloneActionNamespace());
1881 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1882 QueryDescriptorType* cloneQueryDescriptorType() const {
1883 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1885 RoleDescriptor* cloneRoleDescriptor() const {
1886 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1889 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1892 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1893 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1894 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1898 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1899 public virtual SignableObject,
1900 public AbstractComplexElement,
1901 public AbstractAttributeExtensibleXMLObject,
1902 public AbstractDOMCachingXMLObject,
1903 public AbstractXMLObjectMarshaller,
1904 public AbstractXMLObjectUnmarshaller
1906 list<XMLObject*>::iterator m_pos_AffiliateMember;
1909 m_ID=m_AffiliationOwnerID=NULL;
1910 m_ValidUntil=m_CacheDuration=NULL;
1911 m_children.push_back(NULL);
1912 m_children.push_back(NULL);
1913 m_children.push_back(NULL);
1916 m_pos_Signature=m_children.begin();
1917 m_pos_Extensions=m_pos_Signature;
1919 m_pos_AffiliateMember=m_pos_Extensions;
1920 ++m_pos_AffiliateMember;
1924 virtual ~AffiliationDescriptorImpl() {
1925 XMLString::release(&m_ID);
1926 XMLString::release(&m_AffiliationOwnerID);
1927 delete m_ValidUntil;
1928 delete m_CacheDuration;
1931 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1932 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1936 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1937 : AbstractXMLObject(src), AbstractComplexElement(src),
1938 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1941 setAffiliationOwnerID(src.getAffiliationOwnerID());
1942 setValidUntil(src.getValidUntil());
1943 setCacheDuration(src.getCacheDuration());
1944 if (src.getSignature())
1945 setSignature(src.getSignature()->cloneSignature());
1946 if (src.getExtensions())
1947 setExtensions(src.getExtensions()->cloneExtensions());
1949 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1950 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1952 v.push_back((*i)->cloneKeyDescriptor());
1955 VectorOf(AffiliateMember) w=getAffiliateMembers();
1956 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1958 w.push_back((*j)->cloneAffiliateMember());
1963 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1965 //IMPL_TYPED_CHILD(Signature);
1966 // Need customized setter.
1968 Signature* m_Signature;
1969 list<XMLObject*>::iterator m_pos_Signature;
1971 Signature* getSignature() const {
1975 void setSignature(Signature* sig) {
1976 prepareForAssignment(m_Signature,sig);
1977 *m_pos_Signature=m_Signature=sig;
1978 // Sync content reference back up.
1980 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1984 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1985 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1986 IMPL_DURATION_ATTRIB(CacheDuration,0);
1987 IMPL_TYPED_CHILD(Extensions);
1988 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1989 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1991 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1992 if (!qualifiedName.hasNamespaceURI()) {
1993 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1997 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1998 setAffiliationOwnerID(value);
2001 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2002 setValidUntil(value);
2005 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2006 setCacheDuration(value);
2010 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2014 void marshallAttributes(DOMElement* domElement) const {
2015 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2016 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
2017 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2018 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2019 marshallExtensionAttributes(domElement);
2022 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2023 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2024 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2025 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2026 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2027 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2030 void processAttribute(const DOMAttr* attribute) {
2031 PROC_ID_ATTRIB(ID,ID,NULL);
2032 unmarshallExtensionAttribute(attribute);
2036 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2037 public virtual SignableObject,
2038 public AbstractComplexElement,
2039 public AbstractAttributeExtensibleXMLObject,
2040 public AbstractDOMCachingXMLObject,
2041 public AbstractXMLObjectMarshaller,
2042 public AbstractXMLObjectUnmarshaller
2044 list<XMLObject*>::iterator m_pos_ContactPerson;
2047 m_ID=m_EntityID=NULL;
2048 m_ValidUntil=m_CacheDuration=NULL;
2049 m_children.push_back(NULL);
2050 m_children.push_back(NULL);
2051 m_children.push_back(NULL);
2052 m_children.push_back(NULL);
2053 m_children.push_back(NULL);
2056 m_AffiliationDescriptor=NULL;
2057 m_Organization=NULL;
2058 m_pos_Signature=m_children.begin();
2059 m_pos_Extensions=m_pos_Signature;
2061 m_pos_AffiliationDescriptor=m_pos_Extensions;
2062 ++m_pos_AffiliationDescriptor;
2063 m_pos_Organization=m_pos_AffiliationDescriptor;
2064 ++m_pos_Organization;
2065 m_pos_ContactPerson=m_pos_Organization;
2066 ++m_pos_ContactPerson;
2070 virtual ~EntityDescriptorImpl() {
2071 XMLString::release(&m_ID);
2072 XMLString::release(&m_EntityID);
2073 delete m_ValidUntil;
2074 delete m_CacheDuration;
2077 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2078 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2082 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2083 : AbstractXMLObject(src), AbstractComplexElement(src),
2084 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2087 setEntityID(src.getEntityID());
2088 setValidUntil(src.getValidUntil());
2089 setCacheDuration(src.getCacheDuration());
2090 if (src.getSignature())
2091 setSignature(src.getSignature()->cloneSignature());
2092 if (src.getExtensions())
2093 setExtensions(src.getExtensions()->cloneExtensions());
2094 if (src.getAffiliationDescriptor())
2095 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2096 if (src.getOrganization())
2097 setOrganization(src.getOrganization()->cloneOrganization());
2099 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2101 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2103 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2107 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2109 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2113 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2115 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2119 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2121 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2125 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2127 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2131 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2133 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2137 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2139 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2143 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2145 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2149 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2151 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2157 VectorOf(ContactPerson) v=getContactPersons();
2158 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2160 v.push_back((*j)->cloneContactPerson());
2163 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2164 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2166 w.push_back((*k)->cloneAdditionalMetadataLocation());
2171 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2173 //IMPL_TYPED_CHILD(Signature);
2174 // Need customized setter.
2176 Signature* m_Signature;
2177 list<XMLObject*>::iterator m_pos_Signature;
2179 Signature* getSignature() const {
2183 void setSignature(Signature* sig) {
2184 prepareForAssignment(m_Signature,sig);
2185 *m_pos_Signature=m_Signature=sig;
2186 // Sync content reference back up.
2188 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2192 IMPL_STRING_ATTRIB(EntityID);
2193 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2194 IMPL_DURATION_ATTRIB(CacheDuration,0);
2195 IMPL_TYPED_CHILD(Extensions);
2196 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2197 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2198 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2199 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2200 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2201 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2202 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2203 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2204 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2205 IMPL_TYPED_CHILD(AffiliationDescriptor);
2206 IMPL_TYPED_CHILD(Organization);
2207 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2208 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2210 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2211 if (!qualifiedName.hasNamespaceURI()) {
2212 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2216 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2220 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2221 setValidUntil(value);
2224 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2225 setCacheDuration(value);
2229 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2232 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2233 // Check for "known" elements/types.
2234 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2235 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2236 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2237 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2238 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2239 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2240 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2241 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2242 if (qname == PDPDescriptor::ELEMENT_QNAME)
2243 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2244 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2245 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2246 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2247 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2248 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2249 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2251 vector<RoleDescriptor*>::const_iterator i =
2252 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2253 return (i!=m_RoleDescriptors.end()) ? *i : NULL;
2257 void marshallAttributes(DOMElement* domElement) const {
2258 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2259 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2260 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2261 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2262 marshallExtensionAttributes(domElement);
2265 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2266 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2267 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2268 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2269 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2270 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2271 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2272 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2273 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2274 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2275 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2276 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2277 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2278 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2279 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2280 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2281 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2284 void processAttribute(const DOMAttr* attribute) {
2285 PROC_ID_ATTRIB(ID,ID,NULL);
2286 unmarshallExtensionAttribute(attribute);
2290 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2291 public virtual SignableObject,
2292 public AbstractComplexElement,
2293 public AbstractDOMCachingXMLObject,
2294 public AbstractXMLObjectMarshaller,
2295 public AbstractXMLObjectUnmarshaller
2299 m_ValidUntil=m_CacheDuration=NULL;
2300 m_children.push_back(NULL);
2301 m_children.push_back(NULL);
2304 m_pos_Signature=m_children.begin();
2305 m_pos_Extensions=m_pos_Signature;
2310 virtual ~EntitiesDescriptorImpl() {
2311 XMLString::release(&m_ID);
2312 XMLString::release(&m_Name);
2313 delete m_ValidUntil;
2314 delete m_CacheDuration;
2317 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2318 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2322 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2323 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2326 setName(src.getName());
2327 setValidUntil(src.getValidUntil());
2328 setCacheDuration(src.getCacheDuration());
2329 if (src.getSignature())
2330 setSignature(src.getSignature()->cloneSignature());
2331 if (src.getExtensions())
2332 setExtensions(src.getExtensions()->cloneExtensions());
2334 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2336 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2338 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2342 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2344 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2351 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2353 //IMPL_TYPED_CHILD(Signature);
2354 // Need customized setter.
2356 Signature* m_Signature;
2357 list<XMLObject*>::iterator m_pos_Signature;
2359 Signature* getSignature() const {
2363 void setSignature(Signature* sig) {
2364 prepareForAssignment(m_Signature,sig);
2365 *m_pos_Signature=m_Signature=sig;
2366 // Sync content reference back up.
2368 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2372 IMPL_STRING_ATTRIB(Name);
2373 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2374 IMPL_DURATION_ATTRIB(CacheDuration,0);
2375 IMPL_TYPED_CHILD(Extensions);
2376 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2377 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2380 void marshallAttributes(DOMElement* domElement) const {
2381 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2382 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2383 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2384 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2387 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2388 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2389 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2390 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2391 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2392 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2395 void processAttribute(const DOMAttr* attribute) {
2396 PROC_ID_ATTRIB(ID,ID,NULL);
2397 PROC_STRING_ATTRIB(Name,NAME,NULL);
2398 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2399 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2406 #if defined (_MSC_VER)
2407 #pragma warning( pop )
2410 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2411 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2412 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2413 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2414 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2415 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2416 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2417 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2419 // Builder Implementations
2421 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2422 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2423 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2424 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2425 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2426 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2427 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2428 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2429 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2430 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2431 IMPL_XMLOBJECTBUILDER(AttributeService);
2432 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2433 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2434 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2435 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2436 IMPL_XMLOBJECTBUILDER(AuthzService);
2437 IMPL_XMLOBJECTBUILDER(Company);
2438 IMPL_XMLOBJECTBUILDER(ContactPerson);
2439 IMPL_XMLOBJECTBUILDER(EmailAddress);
2440 IMPL_XMLOBJECTBUILDER(EndpointType);
2441 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2442 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2443 IMPL_XMLOBJECTBUILDER(Extensions);
2444 IMPL_XMLOBJECTBUILDER(GivenName);
2445 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2446 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2447 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2448 IMPL_XMLOBJECTBUILDER(localizedNameType);
2449 IMPL_XMLOBJECTBUILDER(localizedURIType);
2450 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2451 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2452 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2453 IMPL_XMLOBJECTBUILDER(Organization);
2454 IMPL_XMLOBJECTBUILDER(OrganizationName);
2455 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2456 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2457 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2458 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2459 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2460 IMPL_XMLOBJECTBUILDER(ServiceName);
2461 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2462 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2463 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2464 IMPL_XMLOBJECTBUILDER(SurName);
2465 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2467 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2468 IMPL_XMLOBJECTBUILDER(SourceID);
2470 #ifdef HAVE_COVARIANT_RETURNS
2471 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2473 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2475 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType
2478 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2481 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2482 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);
2483 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);
2484 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2485 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2486 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);
2487 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);
2488 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2489 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);
2490 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);
2491 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);
2492 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);
2493 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);
2494 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);
2495 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);
2496 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);
2497 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2498 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2499 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2500 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2501 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);
2502 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2503 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);
2504 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);
2505 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2506 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);
2507 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);
2508 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2509 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);
2510 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2511 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2512 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2513 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2514 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2515 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2516 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2517 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2518 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2519 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2520 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2521 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2522 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2523 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2524 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2525 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2526 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);
2527 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);
2528 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);
2529 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2530 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2531 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2532 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);
2533 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2534 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2535 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2536 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2537 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2538 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2539 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);
2540 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);
2541 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2542 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);
2543 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2544 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2545 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2546 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);
2547 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2548 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2549 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2550 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2551 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);
2552 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2553 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2554 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2555 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2556 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);
2557 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2558 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);
2559 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2560 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2561 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2562 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);
2563 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2564 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2565 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);
2566 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2567 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);
2568 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);
2569 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);
2570 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);
2571 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2572 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2573 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2574 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);
2575 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2576 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);
2577 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2578 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);
2579 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);
2580 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2581 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2582 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);
2583 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);
2584 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);
2585 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2586 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);
2587 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2588 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2589 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);