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() {}
386 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
387 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
391 ContactPersonImpl(const ContactPersonImpl& src)
392 : AbstractXMLObject(src), AbstractComplexElement(src),
393 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
395 if (src.getExtensions())
396 setExtensions(src.getExtensions()->cloneExtensions());
397 if (src.getCompany())
398 setCompany(src.getCompany()->cloneCompany());
399 if (src.getGivenName())
400 setGivenName(src.getGivenName()->cloneGivenName());
401 if (src.getSurName())
402 setSurName(src.getSurName()->cloneSurName());
404 VectorOf(EmailAddress) v=getEmailAddresss();
405 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
407 v.push_back((*i)->cloneEmailAddress());
410 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
411 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
413 w.push_back((*j)->cloneTelephoneNumber());
418 IMPL_XMLOBJECT_CLONE(ContactPerson);
419 IMPL_STRING_ATTRIB(ContactType);
420 IMPL_TYPED_CHILD(Extensions);
421 IMPL_TYPED_CHILD(Company);
422 IMPL_TYPED_CHILD(GivenName);
423 IMPL_TYPED_CHILD(SurName);
424 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
425 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
427 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
428 if (!qualifiedName.hasNamespaceURI()) {
429 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
430 setContactType(value);
434 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
438 void marshallAttributes(DOMElement* domElement) const {
439 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
440 marshallExtensionAttributes(domElement);
443 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
444 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
445 PROC_TYPED_CHILD(Company,SAML20MD_NS,false);
446 PROC_TYPED_CHILD(GivenName,SAML20MD_NS,false);
447 PROC_TYPED_CHILD(SurName,SAML20MD_NS,false);
448 PROC_TYPED_CHILDREN(EmailAddress,SAML20MD_NS,false);
449 PROC_TYPED_CHILDREN(TelephoneNumber,SAML20MD_NS,false);
450 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
453 void processAttribute(const DOMAttr* attribute) {
454 unmarshallExtensionAttribute(attribute);
458 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
459 public AbstractSimpleElement,
460 public AbstractDOMCachingXMLObject,
461 public AbstractXMLObjectMarshaller,
462 public AbstractXMLObjectUnmarshaller
469 virtual ~AdditionalMetadataLocationImpl() {
470 XMLString::release(&m_Namespace);
473 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
474 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
478 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
479 : AbstractXMLObject(src), AbstractSimpleElement(src), AbstractDOMCachingXMLObject(src) {
483 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
484 IMPL_STRING_ATTRIB(Namespace);
487 void marshallAttributes(DOMElement* domElement) const {
488 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
491 void processAttribute(const DOMAttr* attribute) {
492 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
493 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
497 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
498 public AbstractComplexElement,
499 public AbstractDOMCachingXMLObject,
500 public AbstractXMLObjectMarshaller,
501 public AbstractXMLObjectUnmarshaller
506 m_children.push_back(NULL);
507 m_pos_KeyInfo=m_children.begin();
510 virtual ~KeyDescriptorImpl() {
511 XMLString::release(&m_Use);
514 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
515 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
519 KeyDescriptorImpl(const KeyDescriptorImpl& src)
520 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
522 setUse(src.getUse());
523 if (src.getKeyInfo())
524 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
525 VectorOf(EncryptionMethod) v=getEncryptionMethods();
526 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
528 v.push_back((*i)->cloneEncryptionMethod());
533 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
534 IMPL_STRING_ATTRIB(Use);
535 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
536 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
539 void marshallAttributes(DOMElement* domElement) const {
540 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
543 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
544 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLSIG_NS,false);
545 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAML20MD_NS,false);
546 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
549 void processAttribute(const DOMAttr* attribute) {
550 PROC_STRING_ATTRIB(Use,USE,NULL);
551 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
555 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
556 public AbstractAttributeExtensibleXMLObject,
557 public AbstractComplexElement,
558 public AbstractDOMCachingXMLObject,
559 public AbstractXMLObjectMarshaller,
560 public AbstractXMLObjectUnmarshaller
563 m_Binding=m_Location=m_ResponseLocation=NULL;
572 virtual ~EndpointTypeImpl() {
573 XMLString::release(&m_Binding);
574 XMLString::release(&m_Location);
575 XMLString::release(&m_ResponseLocation);
578 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
579 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
582 EndpointTypeImpl(const EndpointTypeImpl& src)
583 : AbstractXMLObject(src),
584 AbstractAttributeExtensibleXMLObject(src),
585 AbstractComplexElement(src),
586 AbstractDOMCachingXMLObject(src) {
587 setBinding(src.getBinding());
588 setLocation(src.getLocation());
589 setResponseLocation(src.getResponseLocation());
590 VectorOf(XMLObject) v=getUnknownXMLObjects();
591 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
592 v.push_back((*i)->clone());
595 IMPL_XMLOBJECT_CLONE(EndpointType);
596 IMPL_STRING_ATTRIB(Binding);
597 IMPL_STRING_ATTRIB(Location);
598 IMPL_STRING_ATTRIB(ResponseLocation);
599 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
601 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
602 if (!qualifiedName.hasNamespaceURI()) {
603 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
607 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
611 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
612 setResponseLocation(value);
616 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
619 void marshallAttributes(DOMElement* domElement) const {
620 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
621 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
622 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
623 marshallExtensionAttributes(domElement);
626 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
628 const XMLCh* nsURI=root->getNamespaceURI();
629 if (!XMLString::equals(nsURI,SAML20MD_NS) && nsURI && *nsURI) {
630 getUnknownXMLObjects().push_back(childXMLObject);
633 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
636 void processAttribute(const DOMAttr* attribute) {
637 unmarshallExtensionAttribute(attribute);
641 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
645 m_isDefault=XML_BOOL_NULL;
649 IndexedEndpointTypeImpl() {
653 virtual ~IndexedEndpointTypeImpl() {
654 XMLString::release(&m_Index);
657 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
658 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
660 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
661 setIndex(src.m_Index);
662 isDefault(src.m_isDefault);
665 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
666 EndpointType* cloneEndpointType() const {
667 return new IndexedEndpointTypeImpl(*this);
670 IMPL_INTEGER_ATTRIB(Index);
671 IMPL_BOOLEAN_ATTRIB(isDefault);
673 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
674 if (!qualifiedName.hasNamespaceURI()) {
675 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
679 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
684 EndpointTypeImpl::setAttribute(qualifiedName, value, ID);
688 void marshallAttributes(DOMElement* domElement) const {
689 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
690 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
691 EndpointTypeImpl::marshallAttributes(domElement);
695 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
698 virtual ~ArtifactResolutionServiceImpl() {}
700 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
701 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
703 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
705 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
706 IndexedEndpointType* cloneIndexedEndpointType() const {
707 return new ArtifactResolutionServiceImpl(*this);
709 EndpointType* cloneEndpointType() const {
710 return new ArtifactResolutionServiceImpl(*this);
714 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
717 virtual ~SingleLogoutServiceImpl() {}
719 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
720 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
722 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
724 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
725 EndpointType* cloneEndpointType() const {
726 return new SingleLogoutServiceImpl(*this);
730 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
733 virtual ~ManageNameIDServiceImpl() {}
735 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
736 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
738 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
740 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
741 EndpointType* cloneEndpointType() const {
742 return new ManageNameIDServiceImpl(*this);
746 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
749 virtual ~SingleSignOnServiceImpl() {}
751 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
752 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
754 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
756 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
757 EndpointType* cloneEndpointType() const {
758 return new SingleSignOnServiceImpl(*this);
762 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
765 virtual ~NameIDMappingServiceImpl() {}
767 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
768 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
770 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
772 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
773 EndpointType* cloneEndpointType() const {
774 return new NameIDMappingServiceImpl(*this);
778 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
781 virtual ~AssertionIDRequestServiceImpl() {}
783 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
784 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
786 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
788 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
789 EndpointType* cloneEndpointType() const {
790 return new AssertionIDRequestServiceImpl(*this);
794 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
797 virtual ~AssertionConsumerServiceImpl() {}
799 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
800 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
802 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
804 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
805 EndpointType* cloneEndpointType() const {
806 return new AssertionConsumerServiceImpl(*this);
808 IndexedEndpointType* cloneIndexedEndpointType() const {
809 return new AssertionConsumerServiceImpl(*this);
813 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
816 virtual ~AuthnQueryServiceImpl() {}
818 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
819 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
821 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
823 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
824 EndpointType* cloneEndpointType() const {
825 return new AuthnQueryServiceImpl(*this);
829 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
832 virtual ~AuthzServiceImpl() {}
834 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
835 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
837 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
839 IMPL_XMLOBJECT_CLONE(AuthzService);
840 EndpointType* cloneEndpointType() const {
841 return new AuthzServiceImpl(*this);
845 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
848 virtual ~AttributeServiceImpl() {}
850 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
851 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
853 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
855 IMPL_XMLOBJECT_CLONE(AttributeService);
856 EndpointType* cloneEndpointType() const {
857 return new AttributeServiceImpl(*this);
861 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
862 public virtual SignableObject,
863 public AbstractComplexElement,
864 public AbstractAttributeExtensibleXMLObject,
865 public AbstractDOMCachingXMLObject,
866 public AbstractXMLObjectMarshaller,
867 public AbstractXMLObjectUnmarshaller
870 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
871 m_ValidUntil=m_CacheDuration=NULL;
872 m_children.push_back(NULL);
873 m_children.push_back(NULL);
874 m_children.push_back(NULL);
875 m_children.push_back(NULL);
879 m_pos_Signature=m_children.begin();
880 m_pos_Extensions=m_pos_Signature;
882 m_pos_Organization=m_pos_Extensions;
883 ++m_pos_Organization;
884 m_pos_ContactPerson=m_pos_Organization;
885 ++m_pos_ContactPerson;
889 list<XMLObject*>::iterator m_pos_ContactPerson;
891 RoleDescriptorImpl() {
896 virtual ~RoleDescriptorImpl() {
897 XMLString::release(&m_ID);
898 XMLString::release(&m_ProtocolSupportEnumeration);
899 XMLString::release(&m_ErrorURL);
901 delete m_CacheDuration;
904 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
905 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
909 RoleDescriptorImpl(const RoleDescriptorImpl& src)
910 : AbstractXMLObject(src), AbstractComplexElement(src),
911 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
914 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
915 setErrorURL(src.getErrorURL());
916 setValidUntil(src.getValidUntil());
917 setCacheDuration(src.getCacheDuration());
918 if (src.getSignature())
919 setSignature(src.getSignature()->cloneSignature());
920 if (src.getExtensions())
921 setExtensions(src.getExtensions()->cloneExtensions());
922 if (src.getOrganization())
923 setOrganization(src.getOrganization()->cloneOrganization());
925 VectorOf(KeyDescriptor) v=getKeyDescriptors();
926 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
928 v.push_back((*i)->cloneKeyDescriptor());
931 VectorOf(ContactPerson) w=getContactPersons();
932 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
934 w.push_back((*j)->cloneContactPerson());
939 //IMPL_TYPED_CHILD(Signature);
940 // Need customized setter.
942 Signature* m_Signature;
943 list<XMLObject*>::iterator m_pos_Signature;
945 Signature* getSignature() const {
949 void setSignature(Signature* sig) {
950 prepareForAssignment(m_Signature,sig);
951 *m_pos_Signature=m_Signature=sig;
952 // Sync content reference back up.
954 m_Signature->setContentReference(new opensaml::ContentReference(*this));
958 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
959 IMPL_STRING_ATTRIB(ErrorURL);
960 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
961 IMPL_DURATION_ATTRIB(CacheDuration,0);
962 IMPL_TYPED_CHILD(Extensions);
963 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
964 IMPL_TYPED_CHILD(Organization);
965 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
967 bool hasSupport(const XMLCh* protocol) const {
968 if (!protocol || !*protocol)
970 if (m_ProtocolSupportEnumeration) {
971 // Look for first character.
972 unsigned int len=XMLString::stringLen(protocol);
974 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
976 // Only possible match is if it's the first character or a space comes before it.
977 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
978 // See if rest of protocol string is present.
979 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
980 // Only possible match is if it's the last character or a space comes after it.
981 if (m_ProtocolSupportEnumeration[index+len]==chNull || m_ProtocolSupportEnumeration[index+len]==chSpace)
987 // Move past last search and start again.
992 // Move past last search and start again.
995 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1001 void addSupport(const XMLCh* protocol) {
1002 if (hasSupport(protocol))
1004 if (m_ProtocolSupportEnumeration && *m_ProtocolSupportEnumeration) {
1005 #ifdef HAVE_GOOD_STL
1006 xstring pse(m_ProtocolSupportEnumeration);
1007 pse = pse + chSpace + protocol;
1008 setProtocolSupportEnumeration(pse.c_str());
1010 auto_ptr_char temp(m_ProtocolSupportEnumeration);
1011 auto_ptr_char temp2(protocol);
1012 string pse(temp.get());
1013 pse = pse + ' ' + temp2.get();
1014 auto_ptr_XMLCh temp3(pse.c_str());
1015 setProtocolSupportEnumeration(temp3.get());
1019 setProtocolSupportEnumeration(protocol);
1023 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1024 if (!qualifiedName.hasNamespaceURI()) {
1025 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1029 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1030 setProtocolSupportEnumeration(value);
1033 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1037 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1038 setValidUntil(value);
1041 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1042 setCacheDuration(value);
1046 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1050 void marshallAttributes(DOMElement* domElement) const {
1051 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1052 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1053 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1054 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1055 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1056 marshallExtensionAttributes(domElement);
1059 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1060 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
1061 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
1062 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
1063 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
1064 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
1065 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1068 void processAttribute(const DOMAttr* attribute) {
1069 PROC_ID_ATTRIB(ID,ID,NULL);
1070 unmarshallExtensionAttribute(attribute);
1074 class SAML_DLLLOCAL RoleDescriptorTypeImpl : public virtual RoleDescriptorType, public RoleDescriptorImpl
1077 virtual ~RoleDescriptorTypeImpl() {}
1079 RoleDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1080 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1083 RoleDescriptorTypeImpl(const RoleDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1084 VectorOf(XMLObject) v=getUnknownXMLObjects();
1085 for (vector<XMLObject*>::const_iterator i=src.m_UnknownXMLObjects.begin(); i!=src.m_UnknownXMLObjects.end(); ++i)
1086 v.push_back((*i)->clone());
1089 IMPL_XMLOBJECT_CLONE(RoleDescriptorType);
1090 RoleDescriptor* cloneRoleDescriptor() const {
1091 return new RoleDescriptorTypeImpl(*this);
1094 IMPL_XMLOBJECT_CHILDREN(UnknownXMLObject,m_children.end());
1097 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1098 getUnknownXMLObjects().push_back(childXMLObject);
1102 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1105 m_children.push_back(NULL);
1106 m_children.push_back(NULL);
1107 m_children.push_back(NULL);
1108 m_children.push_back(NULL);
1109 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1110 ++m_pos_ArtifactResolutionService;
1111 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1112 ++m_pos_SingleLogoutService;
1113 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1114 ++m_pos_ManageNameIDService;
1115 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1116 ++m_pos_NameIDFormat;
1120 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1121 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1122 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1123 list<XMLObject*>::iterator m_pos_NameIDFormat;
1125 SSODescriptorTypeImpl() {
1130 virtual ~SSODescriptorTypeImpl() {}
1132 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1133 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1137 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1139 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1140 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1142 v.push_back((*i)->cloneArtifactResolutionService());
1145 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1146 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1148 w.push_back((*j)->cloneSingleLogoutService());
1151 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1152 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1154 x.push_back((*k)->cloneManageNameIDService());
1157 VectorOf(NameIDFormat) y=getNameIDFormats();
1158 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1160 y.push_back((*m)->cloneNameIDFormat());
1165 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1166 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1167 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1168 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1171 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1172 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAML20MD_NS,false);
1173 PROC_TYPED_CHILDREN(SingleLogoutService,SAML20MD_NS,false);
1174 PROC_TYPED_CHILDREN(ManageNameIDService,SAML20MD_NS,false);
1175 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1176 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1180 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1182 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1183 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1184 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1185 list<XMLObject*>::iterator m_pos_AttributeProfile;
1188 m_WantAuthnRequestsSigned=XML_BOOL_NULL;
1189 m_children.push_back(NULL);
1190 m_children.push_back(NULL);
1191 m_children.push_back(NULL);
1192 m_children.push_back(NULL);
1193 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1194 ++m_pos_SingleSignOnService;
1195 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1196 ++m_pos_NameIDMappingService;
1197 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1198 ++m_pos_AssertionIDRequestService;
1199 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1200 ++m_pos_AttributeProfile;
1204 virtual ~IDPSSODescriptorImpl() {}
1206 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1207 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1211 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1213 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1214 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1215 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1217 v.push_back((*i)->cloneSingleSignOnService());
1220 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1221 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1223 w.push_back((*j)->cloneNameIDMappingService());
1226 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1227 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1229 x.push_back((*k)->cloneAssertionIDRequestService());
1232 VectorOf(AttributeProfile) y=getAttributeProfiles();
1233 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1235 y.push_back((*m)->cloneAttributeProfile());
1238 VectorOf(Attribute) z=getAttributes();
1239 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1241 z.push_back((*n)->cloneAttribute());
1246 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1247 SSODescriptorType* cloneSSODescriptorType() const {
1248 return new IDPSSODescriptorImpl(*this);
1250 RoleDescriptor* cloneRoleDescriptor() const {
1251 return new IDPSSODescriptorImpl(*this);
1254 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1255 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1256 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1257 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1258 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1259 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1261 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1262 if (!qualifiedName.hasNamespaceURI()) {
1263 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1264 setWantAuthnRequestsSigned(value);
1268 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1272 void marshallAttributes(DOMElement* domElement) const {
1273 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1274 RoleDescriptorImpl::marshallAttributes(domElement);
1277 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1278 PROC_TYPED_CHILDREN(SingleSignOnService,SAML20MD_NS,false);
1279 PROC_TYPED_CHILDREN(NameIDMappingService,SAML20MD_NS,false);
1280 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1281 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1282 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1283 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1287 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1288 public AbstractComplexElement,
1289 public AbstractAttributeExtensibleXMLObject,
1290 public AbstractDOMCachingXMLObject,
1291 public AbstractXMLObjectMarshaller,
1292 public AbstractXMLObjectUnmarshaller
1295 m_Name=m_NameFormat=m_FriendlyName=NULL;
1296 m_isRequired=XML_BOOL_NULL;
1299 virtual ~RequestedAttributeImpl() {
1300 XMLString::release(&m_Name);
1301 XMLString::release(&m_NameFormat);
1302 XMLString::release(&m_FriendlyName);
1305 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1306 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1310 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1311 : AbstractXMLObject(src), AbstractComplexElement(src),
1312 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1314 setName(src.getName());
1315 setNameFormat(src.getNameFormat());
1316 setFriendlyName(src.getFriendlyName());
1317 isRequired(src.m_isRequired);
1318 VectorOf(XMLObject) v=getAttributeValues();
1319 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1321 v.push_back((*i)->clone());
1326 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1327 Attribute* cloneAttribute() const {
1328 return new RequestedAttributeImpl(*this);
1331 IMPL_STRING_ATTRIB(Name);
1332 IMPL_STRING_ATTRIB(NameFormat);
1333 IMPL_STRING_ATTRIB(FriendlyName);
1334 IMPL_BOOLEAN_ATTRIB(isRequired);
1335 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1337 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1338 if (!qualifiedName.hasNamespaceURI()) {
1339 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1343 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1344 setNameFormat(value);
1347 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1348 setFriendlyName(value);
1351 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1352 setisRequired(value);
1356 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
1360 void marshallAttributes(DOMElement* domElement) const {
1361 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1362 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1363 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1364 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1365 marshallExtensionAttributes(domElement);
1368 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1369 getAttributeValues().push_back(childXMLObject);
1372 void processAttribute(const DOMAttr* attribute) {
1373 unmarshallExtensionAttribute(attribute);
1377 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1378 public AbstractComplexElement,
1379 public AbstractDOMCachingXMLObject,
1380 public AbstractXMLObjectMarshaller,
1381 public AbstractXMLObjectUnmarshaller
1383 list<XMLObject*>::iterator m_pos_ServiceDescription;
1384 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1388 m_isDefault=XML_BOOL_NULL;
1389 m_children.push_back(NULL);
1390 m_children.push_back(NULL);
1391 m_pos_ServiceDescription=m_children.begin();
1392 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1393 ++m_pos_RequestedAttribute;
1397 virtual ~AttributeConsumingServiceImpl() {
1398 XMLString::release(&m_Index);
1401 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1402 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1406 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1407 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
1409 setIndex(src.m_Index);
1410 isDefault(src.m_isDefault);
1411 VectorOf(ServiceName) v=getServiceNames();
1412 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1414 v.push_back((*i)->cloneServiceName());
1417 VectorOf(ServiceDescription) w=getServiceDescriptions();
1418 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1420 w.push_back((*j)->cloneServiceDescription());
1423 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1424 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1426 x.push_back((*k)->cloneRequestedAttribute());
1431 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1432 IMPL_INTEGER_ATTRIB(Index);
1433 IMPL_BOOLEAN_ATTRIB(isDefault);
1434 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1435 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1436 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1439 void marshallAttributes(DOMElement* domElement) const {
1440 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1441 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1444 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1445 PROC_TYPED_CHILDREN(ServiceName,SAML20MD_NS,false);
1446 PROC_TYPED_CHILDREN(ServiceDescription,SAML20MD_NS,false);
1447 PROC_TYPED_CHILDREN(RequestedAttribute,SAML20MD_NS,false);
1448 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1451 void processAttribute(const DOMAttr* attribute) {
1452 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1453 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1454 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1458 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1460 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1463 m_AuthnRequestsSigned=XML_BOOL_NULL;
1464 m_WantAssertionsSigned=XML_BOOL_NULL;
1465 m_children.push_back(NULL);
1466 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1467 ++m_pos_AssertionConsumerService;
1471 virtual ~SPSSODescriptorImpl() {}
1473 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1474 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1478 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1480 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1481 WantAssertionsSigned(src.m_WantAssertionsSigned);
1482 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1483 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1485 v.push_back((*i)->cloneAssertionConsumerService());
1488 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1489 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1491 w.push_back((*j)->cloneAttributeConsumingService());
1496 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1497 SSODescriptorType* cloneSSODescriptorType() const {
1498 return cloneSPSSODescriptor();
1500 RoleDescriptor* cloneRoleDescriptor() const {
1501 return cloneSPSSODescriptor();
1504 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1505 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1506 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1507 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1509 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1510 if (!qualifiedName.hasNamespaceURI()) {
1511 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1512 setAuthnRequestsSigned(value);
1515 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1516 setWantAssertionsSigned(value);
1520 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1524 void marshallAttributes(DOMElement* domElement) const {
1525 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1526 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1527 RoleDescriptorImpl::marshallAttributes(domElement);
1530 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1531 PROC_TYPED_CHILDREN(AssertionConsumerService,SAML20MD_NS,false);
1532 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1533 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1537 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1539 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1540 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1543 m_children.push_back(NULL);
1544 m_children.push_back(NULL);
1545 m_pos_AuthnQueryService=m_pos_ContactPerson;
1546 ++m_pos_AuthnQueryService;
1547 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1548 ++m_pos_AssertionIDRequestService;
1552 virtual ~AuthnAuthorityDescriptorImpl() {}
1554 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1555 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1559 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1561 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1562 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1564 v.push_back((*i)->cloneAuthnQueryService());
1567 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1568 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1570 w.push_back((*j)->cloneAssertionIDRequestService());
1573 VectorOf(NameIDFormat) x=getNameIDFormats();
1574 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1576 x.push_back((*k)->cloneNameIDFormat());
1581 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1582 RoleDescriptor* cloneRoleDescriptor() const {
1583 return cloneAuthnAuthorityDescriptor();
1586 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1587 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1588 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1591 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1592 PROC_TYPED_CHILDREN(AuthnQueryService,SAML20MD_NS,false);
1593 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1594 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1595 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1599 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1601 list<XMLObject*>::iterator m_pos_AuthzService;
1602 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1605 m_children.push_back(NULL);
1606 m_children.push_back(NULL);
1607 m_pos_AuthzService=m_pos_ContactPerson;
1608 ++m_pos_AuthzService;
1609 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1610 ++m_pos_AssertionIDRequestService;
1614 virtual ~PDPDescriptorImpl() {}
1616 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1617 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1621 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1623 VectorOf(AuthzService) v=getAuthzServices();
1624 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1626 v.push_back((*i)->cloneAuthzService());
1629 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1630 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1632 w.push_back((*j)->cloneAssertionIDRequestService());
1635 VectorOf(NameIDFormat) x=getNameIDFormats();
1636 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1638 x.push_back((*k)->cloneNameIDFormat());
1643 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1644 RoleDescriptor* cloneRoleDescriptor() const {
1645 return clonePDPDescriptor();
1648 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1649 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1650 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1653 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1654 PROC_TYPED_CHILDREN(AuthzService,SAML20MD_NS,false);
1655 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1656 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1657 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1661 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1663 list<XMLObject*>::iterator m_pos_AttributeService;
1664 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1665 list<XMLObject*>::iterator m_pos_NameIDFormat;
1666 list<XMLObject*>::iterator m_pos_AttributeProfile;
1669 m_children.push_back(NULL);
1670 m_children.push_back(NULL);
1671 m_children.push_back(NULL);
1672 m_children.push_back(NULL);
1673 m_pos_AttributeService=m_pos_ContactPerson;
1674 ++m_pos_AttributeService;
1675 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1676 ++m_pos_AssertionIDRequestService;
1677 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1678 ++m_pos_NameIDFormat;
1679 m_pos_AttributeProfile=m_pos_NameIDFormat;
1680 ++m_pos_AttributeProfile;
1684 virtual ~AttributeAuthorityDescriptorImpl() {}
1686 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1687 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1691 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1693 VectorOf(AttributeService) v=getAttributeServices();
1694 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1696 v.push_back((*i)->cloneAttributeService());
1699 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1700 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1702 w.push_back((*j)->cloneAssertionIDRequestService());
1705 VectorOf(NameIDFormat) x=getNameIDFormats();
1706 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1708 x.push_back((*k)->cloneNameIDFormat());
1711 VectorOf(AttributeProfile) y=getAttributeProfiles();
1712 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1714 y.push_back((*m)->cloneAttributeProfile());
1717 VectorOf(Attribute) z=getAttributes();
1718 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1720 z.push_back((*n)->cloneAttribute());
1725 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1726 RoleDescriptor* cloneRoleDescriptor() const {
1727 return cloneAttributeAuthorityDescriptor();
1730 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1731 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1732 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1733 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1734 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1737 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1738 PROC_TYPED_CHILDREN(AttributeService,SAML20MD_NS,false);
1739 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAML20MD_NS,false);
1740 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1741 PROC_TYPED_CHILDREN(AttributeProfile,SAML20MD_NS,false);
1742 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAML20_NS,false);
1743 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1747 class SAML_DLLLOCAL QueryDescriptorTypeImpl : public virtual QueryDescriptorType, public RoleDescriptorImpl
1750 m_WantAssertionsSigned=XML_BOOL_NULL;
1751 m_children.push_back(NULL);
1752 m_pos_NameIDFormat=m_pos_ContactPerson;
1753 ++m_pos_NameIDFormat;
1757 list<XMLObject*>::iterator m_pos_NameIDFormat;
1759 QueryDescriptorTypeImpl() {
1764 virtual ~QueryDescriptorTypeImpl() {}
1766 QueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1767 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1771 QueryDescriptorTypeImpl(const QueryDescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1773 WantAssertionsSigned(src.m_WantAssertionsSigned);
1774 VectorOf(NameIDFormat) y=getNameIDFormats();
1775 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1777 y.push_back((*m)->cloneNameIDFormat());
1782 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1783 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1785 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1786 if (!qualifiedName.hasNamespaceURI()) {
1787 if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1788 setWantAssertionsSigned(value);
1792 RoleDescriptorImpl::setAttribute(qualifiedName, value, ID);
1796 void marshallAttributes(DOMElement* domElement) const {
1797 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1798 RoleDescriptorImpl::marshallAttributes(domElement);
1801 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1802 PROC_TYPED_CHILDREN(NameIDFormat,SAML20MD_NS,false);
1803 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1807 class SAML_DLLLOCAL AuthnQueryDescriptorTypeImpl : public virtual AuthnQueryDescriptorType, public QueryDescriptorTypeImpl
1810 virtual ~AuthnQueryDescriptorTypeImpl() {}
1812 AuthnQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1813 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1815 AuthnQueryDescriptorTypeImpl(const AuthnQueryDescriptorTypeImpl& src) : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {}
1817 IMPL_XMLOBJECT_CLONE(AuthnQueryDescriptorType);
1818 QueryDescriptorType* cloneQueryDescriptorType() const {
1819 return new AuthnQueryDescriptorTypeImpl(*this);
1821 RoleDescriptor* cloneRoleDescriptor() const {
1822 return new AuthnQueryDescriptorTypeImpl(*this);
1826 class SAML_DLLLOCAL AttributeQueryDescriptorTypeImpl : public virtual AttributeQueryDescriptorType, public QueryDescriptorTypeImpl
1829 virtual ~AttributeQueryDescriptorTypeImpl() {}
1831 AttributeQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1832 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1834 AttributeQueryDescriptorTypeImpl(const AttributeQueryDescriptorTypeImpl& src)
1835 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1836 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1837 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1839 w.push_back((*j)->cloneAttributeConsumingService());
1844 IMPL_XMLOBJECT_CLONE(AttributeQueryDescriptorType);
1845 QueryDescriptorType* cloneQueryDescriptorType() const {
1846 return new AttributeQueryDescriptorTypeImpl(*this);
1848 RoleDescriptor* cloneRoleDescriptor() const {
1849 return new AttributeQueryDescriptorTypeImpl(*this);
1852 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1855 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1856 PROC_TYPED_CHILDREN(AttributeConsumingService,SAML20MD_NS,false);
1857 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1861 class SAML_DLLLOCAL AuthzDecisionQueryDescriptorTypeImpl : public virtual AuthzDecisionQueryDescriptorType, public QueryDescriptorTypeImpl
1864 virtual ~AuthzDecisionQueryDescriptorTypeImpl() {}
1866 AuthzDecisionQueryDescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1867 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
1869 AuthzDecisionQueryDescriptorTypeImpl(const AuthzDecisionQueryDescriptorTypeImpl& src)
1870 : AbstractXMLObject(src), QueryDescriptorTypeImpl(src) {
1871 VectorOf(ActionNamespace) w=getActionNamespaces();
1872 for (vector<ActionNamespace*>::const_iterator j=src.m_ActionNamespaces.begin(); j!=src.m_ActionNamespaces.end(); j++) {
1874 w.push_back((*j)->cloneActionNamespace());
1879 IMPL_XMLOBJECT_CLONE(AuthzDecisionQueryDescriptorType);
1880 QueryDescriptorType* cloneQueryDescriptorType() const {
1881 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1883 RoleDescriptor* cloneRoleDescriptor() const {
1884 return new AuthzDecisionQueryDescriptorTypeImpl(*this);
1887 IMPL_TYPED_CHILDREN(ActionNamespace,m_children.end());
1890 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1891 PROC_TYPED_CHILDREN(ActionNamespace,samlconstants::SAML20MD_QUERY_EXT_NS,false);
1892 QueryDescriptorTypeImpl::processChildElement(childXMLObject,root);
1896 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1897 public virtual SignableObject,
1898 public AbstractComplexElement,
1899 public AbstractAttributeExtensibleXMLObject,
1900 public AbstractDOMCachingXMLObject,
1901 public AbstractXMLObjectMarshaller,
1902 public AbstractXMLObjectUnmarshaller
1904 list<XMLObject*>::iterator m_pos_AffiliateMember;
1907 m_ID=m_AffiliationOwnerID=NULL;
1908 m_ValidUntil=m_CacheDuration=NULL;
1909 m_children.push_back(NULL);
1910 m_children.push_back(NULL);
1911 m_children.push_back(NULL);
1914 m_pos_Signature=m_children.begin();
1915 m_pos_Extensions=m_pos_Signature;
1917 m_pos_AffiliateMember=m_pos_Extensions;
1918 ++m_pos_AffiliateMember;
1922 virtual ~AffiliationDescriptorImpl() {
1923 XMLString::release(&m_ID);
1924 XMLString::release(&m_AffiliationOwnerID);
1925 delete m_ValidUntil;
1926 delete m_CacheDuration;
1929 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1930 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1934 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1935 : AbstractXMLObject(src), AbstractComplexElement(src),
1936 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
1939 setAffiliationOwnerID(src.getAffiliationOwnerID());
1940 setValidUntil(src.getValidUntil());
1941 setCacheDuration(src.getCacheDuration());
1942 if (src.getSignature())
1943 setSignature(src.getSignature()->cloneSignature());
1944 if (src.getExtensions())
1945 setExtensions(src.getExtensions()->cloneExtensions());
1947 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1948 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1950 v.push_back((*i)->cloneKeyDescriptor());
1953 VectorOf(AffiliateMember) w=getAffiliateMembers();
1954 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1956 w.push_back((*j)->cloneAffiliateMember());
1961 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1963 //IMPL_TYPED_CHILD(Signature);
1964 // Need customized setter.
1966 Signature* m_Signature;
1967 list<XMLObject*>::iterator m_pos_Signature;
1969 Signature* getSignature() const {
1973 void setSignature(Signature* sig) {
1974 prepareForAssignment(m_Signature,sig);
1975 *m_pos_Signature=m_Signature=sig;
1976 // Sync content reference back up.
1978 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1982 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1983 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
1984 IMPL_DURATION_ATTRIB(CacheDuration,0);
1985 IMPL_TYPED_CHILD(Extensions);
1986 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1987 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1989 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
1990 if (!qualifiedName.hasNamespaceURI()) {
1991 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1995 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1996 setAffiliationOwnerID(value);
1999 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2000 setValidUntil(value);
2003 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2004 setCacheDuration(value);
2008 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2012 void marshallAttributes(DOMElement* domElement) const {
2013 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2014 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
2015 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2016 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2017 marshallExtensionAttributes(domElement);
2020 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2021 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2022 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2023 PROC_TYPED_CHILDREN(AffiliateMember,SAML20MD_NS,false);
2024 PROC_TYPED_CHILDREN(KeyDescriptor,SAML20MD_NS,false);
2025 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2028 void processAttribute(const DOMAttr* attribute) {
2029 PROC_ID_ATTRIB(ID,ID,NULL);
2030 unmarshallExtensionAttribute(attribute);
2034 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
2035 public virtual SignableObject,
2036 public AbstractComplexElement,
2037 public AbstractAttributeExtensibleXMLObject,
2038 public AbstractDOMCachingXMLObject,
2039 public AbstractXMLObjectMarshaller,
2040 public AbstractXMLObjectUnmarshaller
2042 list<XMLObject*>::iterator m_pos_ContactPerson;
2045 m_ID=m_EntityID=NULL;
2046 m_ValidUntil=m_CacheDuration=NULL;
2047 m_children.push_back(NULL);
2048 m_children.push_back(NULL);
2049 m_children.push_back(NULL);
2050 m_children.push_back(NULL);
2051 m_children.push_back(NULL);
2054 m_AffiliationDescriptor=NULL;
2055 m_Organization=NULL;
2056 m_pos_Signature=m_children.begin();
2057 m_pos_Extensions=m_pos_Signature;
2059 m_pos_AffiliationDescriptor=m_pos_Extensions;
2060 ++m_pos_AffiliationDescriptor;
2061 m_pos_Organization=m_pos_AffiliationDescriptor;
2062 ++m_pos_Organization;
2063 m_pos_ContactPerson=m_pos_Organization;
2064 ++m_pos_ContactPerson;
2068 virtual ~EntityDescriptorImpl() {
2069 XMLString::release(&m_ID);
2070 XMLString::release(&m_EntityID);
2071 delete m_ValidUntil;
2072 delete m_CacheDuration;
2075 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2076 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2080 EntityDescriptorImpl(const EntityDescriptorImpl& src)
2081 : AbstractXMLObject(src), AbstractComplexElement(src),
2082 AbstractAttributeExtensibleXMLObject(src), AbstractDOMCachingXMLObject(src) {
2085 setEntityID(src.getEntityID());
2086 setValidUntil(src.getValidUntil());
2087 setCacheDuration(src.getCacheDuration());
2088 if (src.getSignature())
2089 setSignature(src.getSignature()->cloneSignature());
2090 if (src.getExtensions())
2091 setExtensions(src.getExtensions()->cloneExtensions());
2092 if (src.getAffiliationDescriptor())
2093 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
2094 if (src.getOrganization())
2095 setOrganization(src.getOrganization()->cloneOrganization());
2097 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2099 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
2101 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2105 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2107 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2111 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2113 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2117 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2119 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2123 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2125 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2129 AuthnQueryDescriptorType* authnq=dynamic_cast<AuthnQueryDescriptorType*>(*i);
2131 getAuthnQueryDescriptorTypes().push_back(authnq->cloneAuthnQueryDescriptorType());
2135 AttributeQueryDescriptorType* attrq=dynamic_cast<AttributeQueryDescriptorType*>(*i);
2137 getAttributeQueryDescriptorTypes().push_back(attrq->cloneAttributeQueryDescriptorType());
2141 AuthzDecisionQueryDescriptorType* authzq=dynamic_cast<AuthzDecisionQueryDescriptorType*>(*i);
2143 getAuthzDecisionQueryDescriptorTypes().push_back(authzq->cloneAuthzDecisionQueryDescriptorType());
2147 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2149 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2155 VectorOf(ContactPerson) v=getContactPersons();
2156 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2158 v.push_back((*j)->cloneContactPerson());
2161 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2162 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2164 w.push_back((*k)->cloneAdditionalMetadataLocation());
2169 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2171 //IMPL_TYPED_CHILD(Signature);
2172 // Need customized setter.
2174 Signature* m_Signature;
2175 list<XMLObject*>::iterator m_pos_Signature;
2177 Signature* getSignature() const {
2181 void setSignature(Signature* sig) {
2182 prepareForAssignment(m_Signature,sig);
2183 *m_pos_Signature=m_Signature=sig;
2184 // Sync content reference back up.
2186 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2190 IMPL_STRING_ATTRIB(EntityID);
2191 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2192 IMPL_DURATION_ATTRIB(CacheDuration,0);
2193 IMPL_TYPED_CHILD(Extensions);
2194 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2195 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2196 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2197 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2198 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2199 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2200 IMPL_TYPED_CHILDREN(AuthnQueryDescriptorType,m_pos_AffiliationDescriptor);
2201 IMPL_TYPED_CHILDREN(AttributeQueryDescriptorType,m_pos_AffiliationDescriptor);
2202 IMPL_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,m_pos_AffiliationDescriptor);
2203 IMPL_TYPED_CHILD(AffiliationDescriptor);
2204 IMPL_TYPED_CHILD(Organization);
2205 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2206 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2208 void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
2209 if (!qualifiedName.hasNamespaceURI()) {
2210 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2214 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2218 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2219 setValidUntil(value);
2222 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2223 setCacheDuration(value);
2227 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value, ID);
2230 const RoleDescriptor* getRoleDescriptor(const xmltooling::QName& qname, const XMLCh* protocol) const {
2231 // Check for "known" elements/types.
2232 if (qname == IDPSSODescriptor::ELEMENT_QNAME)
2233 return find_if(m_IDPSSODescriptors, isValidForProtocol(protocol));
2234 if (qname == SPSSODescriptor::ELEMENT_QNAME)
2235 return find_if(m_SPSSODescriptors, isValidForProtocol(protocol));
2236 if (qname == AuthnAuthorityDescriptor::ELEMENT_QNAME)
2237 return find_if(m_AuthnAuthorityDescriptors, isValidForProtocol(protocol));
2238 if (qname == AttributeAuthorityDescriptor::ELEMENT_QNAME)
2239 return find_if(m_AttributeAuthorityDescriptors, isValidForProtocol(protocol));
2240 if (qname == PDPDescriptor::ELEMENT_QNAME)
2241 return find_if(m_PDPDescriptors, isValidForProtocol(protocol));
2242 if (qname == AuthnQueryDescriptorType::TYPE_QNAME)
2243 return find_if(m_AuthnQueryDescriptorTypes, isValidForProtocol(protocol));
2244 if (qname == AttributeQueryDescriptorType::TYPE_QNAME)
2245 return find_if(m_AttributeQueryDescriptorTypes, isValidForProtocol(protocol));
2246 if (qname == AuthzDecisionQueryDescriptorType::TYPE_QNAME)
2247 return find_if(m_AuthzDecisionQueryDescriptorTypes, isValidForProtocol(protocol));
2249 vector<RoleDescriptor*>::const_iterator i =
2250 find_if(m_RoleDescriptors.begin(), m_RoleDescriptors.end(), ofTypeValidForProtocol(qname,protocol));
2251 return (i!=m_RoleDescriptors.end()) ? *i : NULL;
2255 void marshallAttributes(DOMElement* domElement) const {
2256 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2257 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2258 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2259 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2260 marshallExtensionAttributes(domElement);
2263 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2264 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2265 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2266 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAML20MD_NS,false);
2267 PROC_TYPED_CHILDREN(SPSSODescriptor,SAML20MD_NS,false);
2268 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAML20MD_NS,false);
2269 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAML20MD_NS,false);
2270 PROC_TYPED_CHILDREN(PDPDescriptor,SAML20MD_NS,false);
2271 PROC_TYPED_CHILDREN(AuthnQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2272 PROC_TYPED_CHILDREN(AttributeQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2273 PROC_TYPED_CHILDREN(AuthzDecisionQueryDescriptorType,samlconstants::SAML20MD_QUERY_EXT_NS,false);
2274 PROC_TYPED_CHILDREN(RoleDescriptor,SAML20MD_NS,false);
2275 PROC_TYPED_CHILD(AffiliationDescriptor,SAML20MD_NS,false);
2276 PROC_TYPED_CHILD(Organization,SAML20MD_NS,false);
2277 PROC_TYPED_CHILDREN(ContactPerson,SAML20MD_NS,false);
2278 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAML20MD_NS,false);
2279 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2282 void processAttribute(const DOMAttr* attribute) {
2283 PROC_ID_ATTRIB(ID,ID,NULL);
2284 unmarshallExtensionAttribute(attribute);
2288 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2289 public virtual SignableObject,
2290 public AbstractComplexElement,
2291 public AbstractDOMCachingXMLObject,
2292 public AbstractXMLObjectMarshaller,
2293 public AbstractXMLObjectUnmarshaller
2297 m_ValidUntil=m_CacheDuration=NULL;
2298 m_children.push_back(NULL);
2299 m_children.push_back(NULL);
2302 m_pos_Signature=m_children.begin();
2303 m_pos_Extensions=m_pos_Signature;
2308 virtual ~EntitiesDescriptorImpl() {
2309 XMLString::release(&m_ID);
2310 XMLString::release(&m_Name);
2311 delete m_ValidUntil;
2312 delete m_CacheDuration;
2315 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2316 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2320 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2321 : AbstractXMLObject(src), AbstractComplexElement(src), AbstractDOMCachingXMLObject(src) {
2324 setName(src.getName());
2325 setValidUntil(src.getValidUntil());
2326 setCacheDuration(src.getCacheDuration());
2327 if (src.getSignature())
2328 setSignature(src.getSignature()->cloneSignature());
2329 if (src.getExtensions())
2330 setExtensions(src.getExtensions()->cloneExtensions());
2332 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2334 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2336 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2340 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2342 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2349 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2351 //IMPL_TYPED_CHILD(Signature);
2352 // Need customized setter.
2354 Signature* m_Signature;
2355 list<XMLObject*>::iterator m_pos_Signature;
2357 Signature* getSignature() const {
2361 void setSignature(Signature* sig) {
2362 prepareForAssignment(m_Signature,sig);
2363 *m_pos_Signature=m_Signature=sig;
2364 // Sync content reference back up.
2366 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2370 IMPL_STRING_ATTRIB(Name);
2371 IMPL_DATETIME_ATTRIB(ValidUntil,SAMLTIME_MAX);
2372 IMPL_DURATION_ATTRIB(CacheDuration,0);
2373 IMPL_TYPED_CHILD(Extensions);
2374 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2375 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2378 void marshallAttributes(DOMElement* domElement) const {
2379 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2380 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2381 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2382 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2385 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2386 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLSIG_NS,false);
2387 PROC_TYPED_CHILD(Extensions,SAML20MD_NS,false);
2388 PROC_TYPED_CHILDREN(EntityDescriptor,SAML20MD_NS,false);
2389 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAML20MD_NS,false);
2390 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2393 void processAttribute(const DOMAttr* attribute) {
2394 PROC_ID_ATTRIB(ID,ID,NULL);
2395 PROC_STRING_ATTRIB(Name,NAME,NULL);
2396 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2397 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2404 #if defined (_MSC_VER)
2405 #pragma warning( pop )
2408 IMPL_ELEMENT_QNAME(IDPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2409 IMPL_ELEMENT_QNAME(SPSSODescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2410 IMPL_ELEMENT_QNAME(AuthnAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2411 IMPL_ELEMENT_QNAME(AttributeAuthorityDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2412 IMPL_ELEMENT_QNAME(PDPDescriptor, SAML20MD_NS, SAML20MD_PREFIX);
2413 IMPL_TYPE_QNAME(AuthnQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2414 IMPL_TYPE_QNAME(AttributeQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2415 IMPL_TYPE_QNAME(AuthzDecisionQueryDescriptorType, SAML20MD_QUERY_EXT_NS, SAML20MD_QUERY_EXT_PREFIX);
2417 // Builder Implementations
2419 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2420 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2421 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2422 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2423 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2424 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2425 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2426 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2427 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2428 IMPL_XMLOBJECTBUILDER(AttributeQueryDescriptorType);
2429 IMPL_XMLOBJECTBUILDER(AttributeService);
2430 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2431 IMPL_XMLOBJECTBUILDER(AuthnQueryDescriptorType);
2432 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2433 IMPL_XMLOBJECTBUILDER(AuthzDecisionQueryDescriptorType);
2434 IMPL_XMLOBJECTBUILDER(AuthzService);
2435 IMPL_XMLOBJECTBUILDER(Company);
2436 IMPL_XMLOBJECTBUILDER(ContactPerson);
2437 IMPL_XMLOBJECTBUILDER(EmailAddress);
2438 IMPL_XMLOBJECTBUILDER(EndpointType);
2439 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2440 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2441 IMPL_XMLOBJECTBUILDER(Extensions);
2442 IMPL_XMLOBJECTBUILDER(GivenName);
2443 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2444 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2445 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2446 IMPL_XMLOBJECTBUILDER(localizedNameType);
2447 IMPL_XMLOBJECTBUILDER(localizedURIType);
2448 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2449 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2450 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2451 IMPL_XMLOBJECTBUILDER(Organization);
2452 IMPL_XMLOBJECTBUILDER(OrganizationName);
2453 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2454 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2455 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2456 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2457 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2458 IMPL_XMLOBJECTBUILDER(ServiceName);
2459 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2460 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2461 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2462 IMPL_XMLOBJECTBUILDER(SurName);
2463 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2465 IMPL_XMLOBJECTBUILDER(ActionNamespace);
2466 IMPL_XMLOBJECTBUILDER(SourceID);
2468 #ifdef HAVE_COVARIANT_RETURNS
2469 RoleDescriptor* RoleDescriptorBuilder::buildObject(
2471 xmltooling::XMLObject* RoleDescriptorBuilder::buildObject(
2473 const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType
2476 return new RoleDescriptorTypeImpl(nsURI,localName,prefix,schemaType);
2479 const XMLCh ActionNamespace::LOCAL_NAME[] = UNICODE_LITERAL_15(A,c,t,i,o,n,N,a,m,e,s,p,a,c,e);
2480 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);
2481 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);
2482 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2483 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2484 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);
2485 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);
2486 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2487 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);
2488 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);
2489 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);
2490 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);
2491 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);
2492 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);
2493 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);
2494 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);
2495 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2496 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2497 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2498 const XMLCh AttributeQueryDescriptorType::LOCAL_NAME[] =UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2499 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);
2500 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2501 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);
2502 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);
2503 const XMLCh AuthnQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2504 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);
2505 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);
2506 const XMLCh AuthzDecisionQueryDescriptorType::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2507 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);
2508 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2509 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2510 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2511 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2512 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2513 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2514 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2515 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2516 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2517 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2518 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2519 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2520 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2521 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2522 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2523 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2524 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);
2525 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);
2526 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);
2527 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2528 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2529 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2530 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);
2531 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2532 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2533 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2534 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2535 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2536 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2537 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);
2538 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);
2539 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2540 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);
2541 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2542 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2543 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2544 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);
2545 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2546 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2547 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2548 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2549 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);
2550 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2551 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2552 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2553 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2554 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);
2555 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2556 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);
2557 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2558 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2559 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2560 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);
2561 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2562 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2563 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);
2564 const XMLCh QueryDescriptorType::LOCAL_NAME[] = {chNull};
2565 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);
2566 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);
2567 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);
2568 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);
2569 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2570 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2571 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2572 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);
2573 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2574 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);
2575 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2576 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);
2577 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);
2578 const XMLCh SourceID::LOCAL_NAME[] = UNICODE_LITERAL_8(S,o,u,r,c,e,I,D);
2579 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2580 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);
2581 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);
2582 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);
2583 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2584 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);
2585 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2586 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2587 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);