2 * Copyright 2001-2006 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 * Implementation classes for SAML 2.0 Assertions schema
24 #include "exceptions.h"
25 #include "saml2/metadata/Metadata.h"
27 #include <xmltooling/AbstractChildlessElement.h>
28 #include <xmltooling/AbstractComplexElement.h>
29 #include <xmltooling/AbstractElementProxy.h>
30 #include <xmltooling/AbstractSimpleElement.h>
31 #include <xmltooling/impl/AnyElement.h>
32 #include <xmltooling/io/AbstractXMLObjectMarshaller.h>
33 #include <xmltooling/io/AbstractXMLObjectUnmarshaller.h>
34 #include <xmltooling/util/XMLHelper.h>
35 #include <xmltooling/validation/AbstractValidatingXMLObject.h>
38 #include <xercesc/util/XMLUniDefs.hpp>
40 using namespace opensaml::saml2md;
41 using namespace opensaml::saml2;
42 using namespace opensaml;
43 using namespace xmlencryption;
44 using namespace xmlsignature;
45 using namespace xmltooling;
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 class SAML_DLLLOCAL localizedNameTypeImpl : public virtual localizedNameType,
66 public AbstractSimpleElement,
67 public AbstractChildlessElement,
68 public AbstractDOMCachingXMLObject,
69 public AbstractValidatingXMLObject,
70 public AbstractXMLObjectMarshaller,
71 public AbstractXMLObjectUnmarshaller
78 localizedNameTypeImpl() {
83 virtual ~localizedNameTypeImpl() {
84 XMLString::release(&m_Lang);
87 localizedNameTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
88 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
92 localizedNameTypeImpl(const localizedNameTypeImpl& src)
93 : AbstractXMLObject(src), AbstractSimpleElement(src),
94 AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
96 setLang(src.getLang());
99 IMPL_XMLOBJECT_CLONE(localizedNameType);
100 IMPL_XMLOBJECT_CONTENT;
101 IMPL_STRING_ATTRIB(Lang);
104 void marshallAttributes(DOMElement* domElement) const {
105 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
108 void processAttribute(const DOMAttr* attribute) {
109 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
110 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
114 class SAML_DLLLOCAL localizedURITypeImpl : public virtual localizedURIType,
115 public AbstractSimpleElement,
116 public AbstractChildlessElement,
117 public AbstractDOMCachingXMLObject,
118 public AbstractValidatingXMLObject,
119 public AbstractXMLObjectMarshaller,
120 public AbstractXMLObjectUnmarshaller
127 localizedURITypeImpl() {
132 virtual ~localizedURITypeImpl() {
133 XMLString::release(&m_Lang);
136 localizedURITypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
137 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
141 localizedURITypeImpl(const localizedURITypeImpl& src)
142 : AbstractXMLObject(src), AbstractSimpleElement(src),
143 AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
145 setLang(src.getLang());
148 IMPL_XMLOBJECT_CLONE(localizedURIType);
149 IMPL_XMLOBJECT_CONTENT;
150 IMPL_STRING_ATTRIB(Lang);
153 void marshallAttributes(DOMElement* domElement) const {
154 MARSHALL_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
157 void processAttribute(const DOMAttr* attribute) {
158 PROC_STRING_ATTRIB(Lang,LANG,XMLConstants::XML_NS);
159 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
163 class SAML_DLLLOCAL OrganizationNameImpl : public virtual OrganizationName, public localizedNameTypeImpl
166 virtual ~OrganizationNameImpl() {}
168 OrganizationNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
169 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
171 OrganizationNameImpl(const OrganizationNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
173 IMPL_XMLOBJECT_CLONE(OrganizationName);
174 localizedNameType* clonelocalizedNameType() const {
175 return new OrganizationNameImpl(*this);
179 class SAML_DLLLOCAL OrganizationDisplayNameImpl : public virtual OrganizationDisplayName, public localizedNameTypeImpl
182 virtual ~OrganizationDisplayNameImpl() {}
184 OrganizationDisplayNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
185 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
187 OrganizationDisplayNameImpl(const OrganizationDisplayNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
189 IMPL_XMLOBJECT_CLONE(OrganizationDisplayName);
190 localizedNameType* clonelocalizedNameType() const {
191 return new OrganizationDisplayNameImpl(*this);
195 class SAML_DLLLOCAL OrganizationURLImpl : public virtual OrganizationURL, public localizedURITypeImpl
198 virtual ~OrganizationURLImpl() {}
200 OrganizationURLImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
201 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
203 OrganizationURLImpl(const OrganizationURLImpl& src) : AbstractXMLObject(src), localizedURITypeImpl(src) {}
205 IMPL_XMLOBJECT_CLONE(OrganizationURL);
206 localizedURIType* clonelocalizedURIType() const {
207 return new OrganizationURLImpl(*this);
211 class SAML_DLLLOCAL ServiceNameImpl : public virtual ServiceName, public localizedNameTypeImpl
214 virtual ~ServiceNameImpl() {}
216 ServiceNameImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
217 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
219 ServiceNameImpl(const ServiceNameImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
221 IMPL_XMLOBJECT_CLONE(ServiceName);
222 localizedNameType* clonelocalizedNameType() const {
223 return new ServiceNameImpl(*this);
227 class SAML_DLLLOCAL ServiceDescriptionImpl : public virtual ServiceDescription, public localizedNameTypeImpl
230 virtual ~ServiceDescriptionImpl() {}
232 ServiceDescriptionImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
233 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
235 ServiceDescriptionImpl(const ServiceDescriptionImpl& src) : AbstractXMLObject(src), localizedNameTypeImpl(src) {}
237 IMPL_XMLOBJECT_CLONE(ServiceDescription);
238 localizedNameType* clonelocalizedNameType() const {
239 return new ServiceDescriptionImpl(*this);
243 class SAML_DLLLOCAL ExtensionsImpl : public virtual Extensions,
244 public AbstractDOMCachingXMLObject,
245 public AbstractElementProxy,
246 public AbstractValidatingXMLObject,
247 public AbstractXMLObjectMarshaller,
248 public AbstractXMLObjectUnmarshaller
251 virtual ~ExtensionsImpl() {}
253 ExtensionsImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
254 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
257 ExtensionsImpl(const ExtensionsImpl& src)
258 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractElementProxy(src),
259 AbstractValidatingXMLObject(src) {
260 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
262 getXMLObjects().push_back((*i)->clone());
267 IMPL_XMLOBJECT_CLONE(Extensions);
270 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
272 const XMLCh* nsURI=root->getNamespaceURI();
273 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
274 getXMLObjects().push_back(childXMLObject);
278 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
282 class SAML_DLLLOCAL OrganizationImpl : public virtual Organization,
283 public AbstractComplexElement,
284 public AbstractAttributeExtensibleXMLObject,
285 public AbstractDOMCachingXMLObject,
286 public AbstractValidatingXMLObject,
287 public AbstractXMLObjectMarshaller,
288 public AbstractXMLObjectUnmarshaller
290 list<XMLObject*>::iterator m_pos_OrganizationDisplayName;
291 list<XMLObject*>::iterator m_pos_OrganizationURL;
294 m_children.push_back(NULL);
295 m_children.push_back(NULL);
296 m_children.push_back(NULL);
298 m_pos_Extensions=m_children.begin();
299 m_pos_OrganizationDisplayName=m_pos_Extensions;
300 ++m_pos_OrganizationDisplayName;
301 m_pos_OrganizationURL=m_pos_OrganizationDisplayName;
302 ++m_pos_OrganizationURL;
305 virtual ~OrganizationImpl() {}
307 OrganizationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
308 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
312 OrganizationImpl(const OrganizationImpl& src)
313 : AbstractXMLObject(src),
314 AbstractAttributeExtensibleXMLObject(src),
315 AbstractDOMCachingXMLObject(src),
316 AbstractValidatingXMLObject(src) {
318 if (src.getExtensions())
319 setExtensions(src.getExtensions()->cloneExtensions());
320 VectorOf(OrganizationName) v=getOrganizationNames();
321 for (vector<OrganizationName*>::const_iterator i=src.m_OrganizationNames.begin(); i!=src.m_OrganizationNames.end(); i++) {
323 v.push_back((*i)->cloneOrganizationName());
326 VectorOf(OrganizationDisplayName) w=getOrganizationDisplayNames();
327 for (vector<OrganizationDisplayName*>::const_iterator j=src.m_OrganizationDisplayNames.begin(); j!=src.m_OrganizationDisplayNames.end(); j++) {
329 w.push_back((*j)->cloneOrganizationDisplayName());
332 VectorOf(OrganizationURL) x=getOrganizationURLs();
333 for (vector<OrganizationURL*>::const_iterator k=src.m_OrganizationURLs.begin(); k!=src.m_OrganizationURLs.end(); k++) {
335 x.push_back((*k)->cloneOrganizationURL());
340 IMPL_XMLOBJECT_CLONE(Organization);
341 IMPL_TYPED_CHILD(Extensions);
342 IMPL_TYPED_CHILDREN(OrganizationName,m_pos_OrganizationDisplayName);
343 IMPL_TYPED_CHILDREN(OrganizationDisplayName,m_pos_OrganizationURL);
344 IMPL_TYPED_CHILDREN(OrganizationURL,m_children.end());
347 void marshallAttributes(DOMElement* domElement) const {
348 // Take care of wildcard.
349 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
350 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
351 if (i->first.hasPrefix())
352 attr->setPrefix(i->first.getPrefix());
353 attr->setNodeValue(i->second);
354 domElement->setAttributeNode(attr);
358 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
359 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
360 PROC_TYPED_CHILDREN(OrganizationName,SAMLConstants::SAML20MD_NS,false);
361 PROC_TYPED_CHILDREN(OrganizationDisplayName,SAMLConstants::SAML20MD_NS,false);
362 PROC_TYPED_CHILDREN(OrganizationURL,SAMLConstants::SAML20MD_NS,false);
363 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
366 void processAttribute(const DOMAttr* attribute) {
367 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
368 setAttribute(q,attribute->getNodeValue());
372 class SAML_DLLLOCAL ContactPersonImpl : public virtual ContactPerson,
373 public AbstractComplexElement,
374 public AbstractAttributeExtensibleXMLObject,
375 public AbstractDOMCachingXMLObject,
376 public AbstractValidatingXMLObject,
377 public AbstractXMLObjectMarshaller,
378 public AbstractXMLObjectUnmarshaller
380 list<XMLObject*>::iterator m_pos_TelephoneNumber;
384 m_children.push_back(NULL);
385 m_children.push_back(NULL);
386 m_children.push_back(NULL);
387 m_children.push_back(NULL);
388 m_children.push_back(NULL);
393 m_pos_Extensions=m_children.begin();
394 m_pos_Company=m_pos_Extensions;
396 m_pos_GivenName=m_pos_Company;
398 m_pos_SurName=m_pos_GivenName;
400 m_pos_TelephoneNumber=m_pos_SurName;
401 ++m_pos_TelephoneNumber;
404 virtual ~ContactPersonImpl() {}
406 ContactPersonImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
407 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
411 ContactPersonImpl(const ContactPersonImpl& src)
412 : AbstractXMLObject(src),
413 AbstractAttributeExtensibleXMLObject(src),
414 AbstractDOMCachingXMLObject(src),
415 AbstractValidatingXMLObject(src) {
417 if (src.getExtensions())
418 setExtensions(src.getExtensions()->cloneExtensions());
419 if (src.getCompany())
420 setCompany(src.getCompany()->cloneCompany());
421 if (src.getGivenName())
422 setGivenName(src.getGivenName()->cloneGivenName());
423 if (src.getSurName())
424 setSurName(src.getSurName()->cloneSurName());
426 VectorOf(EmailAddress) v=getEmailAddresss();
427 for (vector<EmailAddress*>::const_iterator i=src.m_EmailAddresss.begin(); i!=src.m_EmailAddresss.end(); i++) {
429 v.push_back((*i)->cloneEmailAddress());
432 VectorOf(TelephoneNumber) w=getTelephoneNumbers();
433 for (vector<TelephoneNumber*>::const_iterator j=src.m_TelephoneNumbers.begin(); j!=src.m_TelephoneNumbers.end(); j++) {
435 w.push_back((*j)->cloneTelephoneNumber());
440 IMPL_XMLOBJECT_CLONE(ContactPerson);
441 IMPL_STRING_ATTRIB(ContactType);
442 IMPL_TYPED_CHILD(Extensions);
443 IMPL_TYPED_CHILD(Company);
444 IMPL_TYPED_CHILD(GivenName);
445 IMPL_TYPED_CHILD(SurName);
446 IMPL_TYPED_CHILDREN(EmailAddress,m_pos_TelephoneNumber);
447 IMPL_TYPED_CHILDREN(TelephoneNumber,m_children.end());
449 void setAttribute(QName& qualifiedName, const XMLCh* value) {
450 if (!qualifiedName.hasNamespaceURI()) {
451 if (XMLString::equals(qualifiedName.getLocalPart(),CONTACTTYPE_ATTRIB_NAME)) {
452 setContactType(value);
456 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
460 void marshallAttributes(DOMElement* domElement) const {
461 MARSHALL_STRING_ATTRIB(ContactType,CONTACTTYPE,NULL);
463 // Take care of wildcard.
464 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
465 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
466 if (i->first.hasPrefix())
467 attr->setPrefix(i->first.getPrefix());
468 attr->setNodeValue(i->second);
469 domElement->setAttributeNode(attr);
473 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
474 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
475 PROC_TYPED_CHILD(Company,SAMLConstants::SAML20MD_NS,false);
476 PROC_TYPED_CHILD(GivenName,SAMLConstants::SAML20MD_NS,false);
477 PROC_TYPED_CHILD(SurName,SAMLConstants::SAML20MD_NS,false);
478 PROC_TYPED_CHILDREN(EmailAddress,SAMLConstants::SAML20MD_NS,false);
479 PROC_TYPED_CHILDREN(TelephoneNumber,SAMLConstants::SAML20MD_NS,false);
480 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
483 void processAttribute(const DOMAttr* attribute) {
484 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
485 setAttribute(q,attribute->getNodeValue());
489 class SAML_DLLLOCAL AdditionalMetadataLocationImpl : public virtual AdditionalMetadataLocation,
490 public AbstractSimpleElement,
491 public AbstractChildlessElement,
492 public AbstractDOMCachingXMLObject,
493 public AbstractValidatingXMLObject,
494 public AbstractXMLObjectMarshaller,
495 public AbstractXMLObjectUnmarshaller
502 virtual ~AdditionalMetadataLocationImpl() {
503 XMLString::release(&m_Namespace);
506 AdditionalMetadataLocationImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
507 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
511 AdditionalMetadataLocationImpl(const AdditionalMetadataLocationImpl& src)
512 : AbstractXMLObject(src), AbstractSimpleElement(src),
513 AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
517 IMPL_XMLOBJECT_CLONE(AdditionalMetadataLocation);
518 IMPL_XMLOBJECT_CONTENT;
519 IMPL_STRING_ATTRIB(Namespace);
522 void marshallAttributes(DOMElement* domElement) const {
523 MARSHALL_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
526 void processAttribute(const DOMAttr* attribute) {
527 PROC_STRING_ATTRIB(Namespace,NAMESPACE,NULL);
528 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
532 class SAML_DLLLOCAL KeyDescriptorImpl : public virtual KeyDescriptor,
533 public AbstractComplexElement,
534 public AbstractDOMCachingXMLObject,
535 public AbstractValidatingXMLObject,
536 public AbstractXMLObjectMarshaller,
537 public AbstractXMLObjectUnmarshaller
542 m_children.push_back(NULL);
543 m_pos_KeyInfo=m_children.begin();
546 virtual ~KeyDescriptorImpl() {
547 XMLString::release(&m_Use);
550 KeyDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
551 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
555 KeyDescriptorImpl(const KeyDescriptorImpl& src)
556 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
558 setUse(src.getUse());
559 if (src.getKeyInfo())
560 setKeyInfo(src.getKeyInfo()->cloneKeyInfo());
561 VectorOf(EncryptionMethod) v=getEncryptionMethods();
562 for (vector<EncryptionMethod*>::const_iterator i=src.m_EncryptionMethods.begin(); i!=src.m_EncryptionMethods.end(); i++) {
564 v.push_back((*i)->cloneEncryptionMethod());
569 IMPL_XMLOBJECT_CLONE(KeyDescriptor);
570 IMPL_STRING_ATTRIB(Use);
571 IMPL_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature);
572 IMPL_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,m_children.end());
575 void marshallAttributes(DOMElement* domElement) const {
576 MARSHALL_STRING_ATTRIB(Use,USE,NULL);
579 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
580 PROC_TYPED_FOREIGN_CHILD(KeyInfo,xmlsignature,XMLConstants::XMLSIG_NS,false);
581 PROC_TYPED_FOREIGN_CHILDREN(EncryptionMethod,xmlencryption,SAMLConstants::SAML20MD_NS,false);
582 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
585 void processAttribute(const DOMAttr* attribute) {
586 PROC_STRING_ATTRIB(Use,USE,NULL);
587 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
591 class SAML_DLLLOCAL EndpointTypeImpl : public virtual EndpointType,
592 public AbstractDOMCachingXMLObject,
593 public AbstractElementProxy,
594 public AbstractAttributeExtensibleXMLObject,
595 public AbstractValidatingXMLObject,
596 public AbstractXMLObjectMarshaller,
597 public AbstractXMLObjectUnmarshaller
600 m_Binding=m_Location=m_ResponseLocation=NULL;
609 virtual ~EndpointTypeImpl() {
610 XMLString::release(&m_Binding);
611 XMLString::release(&m_Location);
612 XMLString::release(&m_ResponseLocation);
615 EndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
616 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
619 EndpointTypeImpl(const EndpointTypeImpl& src)
620 : AbstractXMLObject(src),
621 AbstractDOMCachingXMLObject(src),
622 AbstractElementProxy(src),
623 AbstractAttributeExtensibleXMLObject(src),
624 AbstractValidatingXMLObject(src) {
625 setBinding(src.getBinding());
626 setLocation(src.getLocation());
627 setResponseLocation(src.getResponseLocation());
628 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
630 getXMLObjects().push_back((*i)->clone());
635 IMPL_XMLOBJECT_CLONE(EndpointType);
636 IMPL_STRING_ATTRIB(Binding);
637 IMPL_STRING_ATTRIB(Location);
638 IMPL_STRING_ATTRIB(ResponseLocation);
640 void setAttribute(QName& qualifiedName, const XMLCh* value) {
641 if (!qualifiedName.hasNamespaceURI()) {
642 if (XMLString::equals(qualifiedName.getLocalPart(),BINDING_ATTRIB_NAME)) {
646 else if (XMLString::equals(qualifiedName.getLocalPart(),LOCATION_ATTRIB_NAME)) {
650 else if (XMLString::equals(qualifiedName.getLocalPart(),RESPONSELOCATION_ATTRIB_NAME)) {
651 setResponseLocation(value);
655 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
658 void marshallAttributes(DOMElement* domElement) const {
659 MARSHALL_STRING_ATTRIB(Binding,BINDING,NULL);
660 MARSHALL_STRING_ATTRIB(Location,LOCATION,NULL);
661 MARSHALL_STRING_ATTRIB(ResponseLocation,RESPONSELOCATION,NULL);
663 // Take care of wildcard.
664 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
665 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
666 if (i->first.hasPrefix())
667 attr->setPrefix(i->first.getPrefix());
668 attr->setNodeValue(i->second);
669 domElement->setAttributeNode(attr);
673 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
675 const XMLCh* nsURI=root->getNamespaceURI();
676 if (!XMLString::equals(nsURI,SAMLConstants::SAML20MD_NS) && nsURI && *nsURI) {
677 getXMLObjects().push_back(childXMLObject);
681 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
684 void processAttribute(const DOMAttr* attribute) {
685 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
686 setAttribute(q,attribute->getNodeValue());
690 class SAML_DLLLOCAL IndexedEndpointTypeImpl : public virtual IndexedEndpointType, public EndpointTypeImpl
694 m_isDefault=XMLConstants::XML_BOOL_NULL;
698 IndexedEndpointTypeImpl() {
702 virtual ~IndexedEndpointTypeImpl() {
703 XMLString::release(&m_Index);
706 IndexedEndpointTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
707 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
709 IndexedEndpointTypeImpl(const IndexedEndpointTypeImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {
710 setIndex(src.m_Index);
711 isDefault(src.m_isDefault);
714 IMPL_XMLOBJECT_CLONE(IndexedEndpointType);
715 EndpointType* cloneEndpointType() const {
716 return new IndexedEndpointTypeImpl(*this);
719 IMPL_INTEGER_ATTRIB(Index);
720 IMPL_BOOLEAN_ATTRIB(isDefault);
722 void setAttribute(QName& qualifiedName, const XMLCh* value) {
723 if (!qualifiedName.hasNamespaceURI()) {
724 if (XMLString::equals(qualifiedName.getLocalPart(),INDEX_ATTRIB_NAME)) {
728 else if (XMLString::equals(qualifiedName.getLocalPart(),ISDEFAULT_ATTRIB_NAME)) {
733 EndpointTypeImpl::setAttribute(qualifiedName, value);
737 void marshallAttributes(DOMElement* domElement) const {
738 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
739 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
740 EndpointTypeImpl::marshallAttributes(domElement);
744 class SAML_DLLLOCAL ArtifactResolutionServiceImpl : public virtual ArtifactResolutionService, public IndexedEndpointTypeImpl
747 virtual ~ArtifactResolutionServiceImpl() {}
749 ArtifactResolutionServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
750 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
752 ArtifactResolutionServiceImpl(const ArtifactResolutionServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
754 IMPL_XMLOBJECT_CLONE(ArtifactResolutionService);
755 IndexedEndpointType* cloneIndexedEndpointType() const {
756 return new ArtifactResolutionServiceImpl(*this);
758 EndpointType* cloneEndpointType() const {
759 return new ArtifactResolutionServiceImpl(*this);
763 class SAML_DLLLOCAL SingleLogoutServiceImpl : public virtual SingleLogoutService, public EndpointTypeImpl
766 virtual ~SingleLogoutServiceImpl() {}
768 SingleLogoutServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
769 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
771 SingleLogoutServiceImpl(const SingleLogoutServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
773 IMPL_XMLOBJECT_CLONE(SingleLogoutService);
774 EndpointType* cloneEndpointType() const {
775 return new SingleLogoutServiceImpl(*this);
779 class SAML_DLLLOCAL ManageNameIDServiceImpl : public virtual ManageNameIDService, public EndpointTypeImpl
782 virtual ~ManageNameIDServiceImpl() {}
784 ManageNameIDServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
785 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
787 ManageNameIDServiceImpl(const ManageNameIDServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
789 IMPL_XMLOBJECT_CLONE(ManageNameIDService);
790 EndpointType* cloneEndpointType() const {
791 return new ManageNameIDServiceImpl(*this);
795 class SAML_DLLLOCAL SingleSignOnServiceImpl : public virtual SingleSignOnService, public EndpointTypeImpl
798 virtual ~SingleSignOnServiceImpl() {}
800 SingleSignOnServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
801 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
803 SingleSignOnServiceImpl(const SingleSignOnServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
805 IMPL_XMLOBJECT_CLONE(SingleSignOnService);
806 EndpointType* cloneEndpointType() const {
807 return new SingleSignOnServiceImpl(*this);
811 class SAML_DLLLOCAL NameIDMappingServiceImpl : public virtual NameIDMappingService, public EndpointTypeImpl
814 virtual ~NameIDMappingServiceImpl() {}
816 NameIDMappingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
817 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
819 NameIDMappingServiceImpl(const NameIDMappingServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
821 IMPL_XMLOBJECT_CLONE(NameIDMappingService);
822 EndpointType* cloneEndpointType() const {
823 return new NameIDMappingServiceImpl(*this);
827 class SAML_DLLLOCAL AssertionIDRequestServiceImpl : public virtual AssertionIDRequestService, public EndpointTypeImpl
830 virtual ~AssertionIDRequestServiceImpl() {}
832 AssertionIDRequestServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
833 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
835 AssertionIDRequestServiceImpl(const AssertionIDRequestServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
837 IMPL_XMLOBJECT_CLONE(AssertionIDRequestService);
838 EndpointType* cloneEndpointType() const {
839 return new AssertionIDRequestServiceImpl(*this);
843 class SAML_DLLLOCAL AssertionConsumerServiceImpl : public virtual AssertionConsumerService, public IndexedEndpointTypeImpl
846 virtual ~AssertionConsumerServiceImpl() {}
848 AssertionConsumerServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
849 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
851 AssertionConsumerServiceImpl(const AssertionConsumerServiceImpl& src) : AbstractXMLObject(src), IndexedEndpointTypeImpl(src) {}
853 IMPL_XMLOBJECT_CLONE(AssertionConsumerService);
854 EndpointType* cloneEndpointType() const {
855 return new AssertionConsumerServiceImpl(*this);
857 IndexedEndpointType* cloneIndexedEndpointType() const {
858 return new AssertionConsumerServiceImpl(*this);
862 class SAML_DLLLOCAL AuthnQueryServiceImpl : public virtual AuthnQueryService, public EndpointTypeImpl
865 virtual ~AuthnQueryServiceImpl() {}
867 AuthnQueryServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
868 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
870 AuthnQueryServiceImpl(const AuthnQueryServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
872 IMPL_XMLOBJECT_CLONE(AuthnQueryService);
873 EndpointType* cloneEndpointType() const {
874 return new AuthnQueryServiceImpl(*this);
878 class SAML_DLLLOCAL AuthzServiceImpl : public virtual AuthzService, public EndpointTypeImpl
881 virtual ~AuthzServiceImpl() {}
883 AuthzServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
884 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
886 AuthzServiceImpl(const AuthzServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
888 IMPL_XMLOBJECT_CLONE(AuthzService);
889 EndpointType* cloneEndpointType() const {
890 return new AuthzServiceImpl(*this);
894 class SAML_DLLLOCAL AttributeServiceImpl : public virtual AttributeService, public EndpointTypeImpl
897 virtual ~AttributeServiceImpl() {}
899 AttributeServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
900 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {}
902 AttributeServiceImpl(const AttributeServiceImpl& src) : AbstractXMLObject(src), EndpointTypeImpl(src) {}
904 IMPL_XMLOBJECT_CLONE(AttributeService);
905 EndpointType* cloneEndpointType() const {
906 return new AttributeServiceImpl(*this);
910 class SAML_DLLLOCAL RoleDescriptorImpl : public virtual RoleDescriptor,
911 public virtual SignableObject,
912 public AbstractComplexElement,
913 public AbstractAttributeExtensibleXMLObject,
914 public AbstractDOMCachingXMLObject,
915 public AbstractValidatingXMLObject,
916 public AbstractXMLObjectMarshaller,
917 public AbstractXMLObjectUnmarshaller
920 m_ID=m_ProtocolSupportEnumeration=m_ErrorURL=NULL;
921 m_ValidUntil=m_CacheDuration=NULL;
922 m_children.push_back(NULL);
923 m_children.push_back(NULL);
924 m_children.push_back(NULL);
925 m_children.push_back(NULL);
929 m_pos_Signature=m_children.begin();
930 m_pos_Extensions=m_pos_Signature;
932 m_pos_Organization=m_pos_Extensions;
933 ++m_pos_Organization;
934 m_pos_ContactPerson=m_pos_Organization;
935 ++m_pos_ContactPerson;
939 list<XMLObject*>::iterator m_pos_ContactPerson;
941 RoleDescriptorImpl() {
946 virtual ~RoleDescriptorImpl() {
947 XMLString::release(&m_ID);
948 XMLString::release(&m_ProtocolSupportEnumeration);
949 XMLString::release(&m_ErrorURL);
951 delete m_CacheDuration;
954 RoleDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
955 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
959 RoleDescriptorImpl(const RoleDescriptorImpl& src)
960 : AbstractXMLObject(src),
961 AbstractAttributeExtensibleXMLObject(src),
962 AbstractDOMCachingXMLObject(src),
963 AbstractValidatingXMLObject(src) {
966 setProtocolSupportEnumeration(src.getProtocolSupportEnumeration());
967 setErrorURL(src.getErrorURL());
968 setValidUntil(src.getValidUntil());
969 setCacheDuration(src.getCacheDuration());
970 if (src.getSignature())
971 setSignature(src.getSignature()->cloneSignature());
972 if (src.getExtensions())
973 setExtensions(src.getExtensions()->cloneExtensions());
974 if (src.getOrganization())
975 setOrganization(src.getOrganization()->cloneOrganization());
977 VectorOf(KeyDescriptor) v=getKeyDescriptors();
978 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
980 v.push_back((*i)->cloneKeyDescriptor());
983 VectorOf(ContactPerson) w=getContactPersons();
984 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
986 w.push_back((*j)->cloneContactPerson());
991 const XMLCh* getId() const {
995 //IMPL_TYPED_CHILD(Signature);
996 // Need customized setter.
998 Signature* m_Signature;
999 list<XMLObject*>::iterator m_pos_Signature;
1001 Signature* getSignature() const {
1005 void setSignature(Signature* sig) {
1006 prepareForAssignment(m_Signature,sig);
1007 *m_pos_Signature=m_Signature=sig;
1008 // Sync content reference back up.
1010 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1013 IMPL_STRING_ATTRIB(ID);
1014 IMPL_STRING_ATTRIB(ProtocolSupportEnumeration);
1015 IMPL_STRING_ATTRIB(ErrorURL);
1016 IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
1017 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1018 IMPL_TYPED_CHILD(Extensions);
1019 IMPL_TYPED_CHILDREN(KeyDescriptor,m_pos_Organization);
1020 IMPL_TYPED_CHILD(Organization);
1021 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
1023 bool hasSupport(const XMLCh* protocol) const {
1024 if (m_ProtocolSupportEnumeration) {
1025 // Look for first character.
1026 unsigned int len=XMLString::stringLen(protocol);
1028 int index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1030 // Only possible match is if it's the first character or a space comes before it.
1031 if (index==0 || m_ProtocolSupportEnumeration[index-1]==chSpace) {
1032 // See if rest of protocol string is present.
1033 if (0==XMLString::compareNString(m_ProtocolSupportEnumeration+index+1,protocol+1,len-1)) {
1034 // Only possible match is if it's the last character or a space comes after it.
1035 if (m_ProtocolSupportEnumeration[index+len+1]==chNull || m_ProtocolSupportEnumeration[index+len+1]==chSpace)
1041 // Move past last search and start again.
1046 // Move past last search and start again.
1049 index=XMLString::indexOf(m_ProtocolSupportEnumeration,protocol[0],pos);
1055 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1056 if (!qualifiedName.hasNamespaceURI()) {
1057 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1061 else if (XMLString::equals(qualifiedName.getLocalPart(),PROTOCOLSUPPORTENUMERATION_ATTRIB_NAME)) {
1062 setProtocolSupportEnumeration(value);
1065 else if (XMLString::equals(qualifiedName.getLocalPart(),ERRORURL_ATTRIB_NAME)) {
1069 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1070 setValidUntil(value);
1073 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1074 setCacheDuration(value);
1078 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1082 void marshallAttributes(DOMElement* domElement) const {
1083 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1084 MARSHALL_STRING_ATTRIB(ProtocolSupportEnumeration,PROTOCOLSUPPORTENUMERATION,NULL);
1085 MARSHALL_STRING_ATTRIB(ErrorURL,ERRORURL,NULL);
1086 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1087 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1089 // Take care of wildcard.
1090 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1091 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1092 if (i->first.hasPrefix())
1093 attr->setPrefix(i->first.getPrefix());
1094 attr->setNodeValue(i->second);
1095 domElement->setAttributeNode(attr);
1099 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1100 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1101 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1102 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1103 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
1104 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
1105 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1108 void processAttribute(const DOMAttr* attribute) {
1109 PROC_ID_ATTRIB(ID,ID,NULL);
1110 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1111 setAttribute(q,attribute->getNodeValue());
1115 class SAML_DLLLOCAL SSODescriptorTypeImpl : public virtual SSODescriptorType, public RoleDescriptorImpl
1118 m_children.push_back(NULL);
1119 m_children.push_back(NULL);
1120 m_children.push_back(NULL);
1121 m_children.push_back(NULL);
1122 m_pos_ArtifactResolutionService=m_pos_ContactPerson;
1123 ++m_pos_ArtifactResolutionService;
1124 m_pos_SingleLogoutService=m_pos_ArtifactResolutionService;
1125 ++m_pos_SingleLogoutService;
1126 m_pos_ManageNameIDService=m_pos_SingleLogoutService;
1127 ++m_pos_ManageNameIDService;
1128 m_pos_NameIDFormat=m_pos_ManageNameIDService;
1129 ++m_pos_NameIDFormat;
1133 list<XMLObject*>::iterator m_pos_ArtifactResolutionService;
1134 list<XMLObject*>::iterator m_pos_SingleLogoutService;
1135 list<XMLObject*>::iterator m_pos_ManageNameIDService;
1136 list<XMLObject*>::iterator m_pos_NameIDFormat;
1138 SSODescriptorTypeImpl() {
1143 virtual ~SSODescriptorTypeImpl() {}
1145 SSODescriptorTypeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1146 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1150 SSODescriptorTypeImpl(const SSODescriptorTypeImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1152 VectorOf(ArtifactResolutionService) v=getArtifactResolutionServices();
1153 for (vector<ArtifactResolutionService*>::const_iterator i=src.m_ArtifactResolutionServices.begin(); i!=src.m_ArtifactResolutionServices.end(); i++) {
1155 v.push_back((*i)->cloneArtifactResolutionService());
1158 VectorOf(SingleLogoutService) w=getSingleLogoutServices();
1159 for (vector<SingleLogoutService*>::const_iterator j=src.m_SingleLogoutServices.begin(); j!=src.m_SingleLogoutServices.end(); j++) {
1161 w.push_back((*j)->cloneSingleLogoutService());
1164 VectorOf(ManageNameIDService) x=getManageNameIDServices();
1165 for (vector<ManageNameIDService*>::const_iterator k=src.m_ManageNameIDServices.begin(); k!=src.m_ManageNameIDServices.end(); k++) {
1167 x.push_back((*k)->cloneManageNameIDService());
1170 VectorOf(NameIDFormat) y=getNameIDFormats();
1171 for (vector<NameIDFormat*>::const_iterator m=src.m_NameIDFormats.begin(); m!=src.m_NameIDFormats.end(); m++) {
1173 y.push_back((*m)->cloneNameIDFormat());
1178 IMPL_TYPED_CHILDREN(ArtifactResolutionService,m_pos_ArtifactResolutionService);
1179 IMPL_TYPED_CHILDREN(SingleLogoutService,m_pos_SingleLogoutService);
1180 IMPL_TYPED_CHILDREN(ManageNameIDService,m_pos_ManageNameIDService);
1181 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1184 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1185 PROC_TYPED_CHILDREN(ArtifactResolutionService,SAMLConstants::SAML20MD_NS,false);
1186 PROC_TYPED_CHILDREN(SingleLogoutService,SAMLConstants::SAML20MD_NS,false);
1187 PROC_TYPED_CHILDREN(ManageNameIDService,SAMLConstants::SAML20MD_NS,false);
1188 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1189 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1193 class SAML_DLLLOCAL IDPSSODescriptorImpl : public virtual IDPSSODescriptor, public SSODescriptorTypeImpl
1195 list<XMLObject*>::iterator m_pos_SingleSignOnService;
1196 list<XMLObject*>::iterator m_pos_NameIDMappingService;
1197 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1198 list<XMLObject*>::iterator m_pos_AttributeProfile;
1201 m_WantAuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1202 m_children.push_back(NULL);
1203 m_children.push_back(NULL);
1204 m_children.push_back(NULL);
1205 m_children.push_back(NULL);
1206 m_pos_SingleSignOnService=m_pos_NameIDFormat;
1207 ++m_pos_SingleSignOnService;
1208 m_pos_NameIDMappingService=m_pos_SingleSignOnService;
1209 ++m_pos_NameIDMappingService;
1210 m_pos_AssertionIDRequestService=m_pos_NameIDMappingService;
1211 ++m_pos_AssertionIDRequestService;
1212 m_pos_AttributeProfile=m_pos_AssertionIDRequestService;
1213 ++m_pos_AttributeProfile;
1217 virtual ~IDPSSODescriptorImpl() {}
1219 IDPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1220 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1224 IDPSSODescriptorImpl(const IDPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1226 WantAuthnRequestsSigned(src.m_WantAuthnRequestsSigned);
1227 VectorOf(SingleSignOnService) v=getSingleSignOnServices();
1228 for (vector<SingleSignOnService*>::const_iterator i=src.m_SingleSignOnServices.begin(); i!=src.m_SingleSignOnServices.end(); i++) {
1230 v.push_back((*i)->cloneSingleSignOnService());
1233 VectorOf(NameIDMappingService) w=getNameIDMappingServices();
1234 for (vector<NameIDMappingService*>::const_iterator j=src.m_NameIDMappingServices.begin(); j!=src.m_NameIDMappingServices.end(); j++) {
1236 w.push_back((*j)->cloneNameIDMappingService());
1239 VectorOf(AssertionIDRequestService) x=getAssertionIDRequestServices();
1240 for (vector<AssertionIDRequestService*>::const_iterator k=src.m_AssertionIDRequestServices.begin(); k!=src.m_AssertionIDRequestServices.end(); k++) {
1242 x.push_back((*k)->cloneAssertionIDRequestService());
1245 VectorOf(AttributeProfile) y=getAttributeProfiles();
1246 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1248 y.push_back((*m)->cloneAttributeProfile());
1251 VectorOf(Attribute) z=getAttributes();
1252 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1254 z.push_back((*n)->cloneAttribute());
1259 IMPL_XMLOBJECT_CLONE(IDPSSODescriptor);
1260 SSODescriptorType* cloneSSODescriptorType() const {
1261 return new IDPSSODescriptorImpl(*this);
1263 RoleDescriptor* cloneRoleDescriptor() const {
1264 return new IDPSSODescriptorImpl(*this);
1267 IMPL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned);
1268 IMPL_TYPED_CHILDREN(SingleSignOnService,m_pos_SingleSignOnService);
1269 IMPL_TYPED_CHILDREN(NameIDMappingService,m_pos_NameIDMappingService);
1270 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1271 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1272 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1274 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1275 if (!qualifiedName.hasNamespaceURI()) {
1276 if (XMLString::equals(qualifiedName.getLocalPart(),WANTAUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1277 setWantAuthnRequestsSigned(value);
1281 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1285 void marshallAttributes(DOMElement* domElement) const {
1286 MARSHALL_BOOLEAN_ATTRIB(WantAuthnRequestsSigned,WANTAUTHNREQUESTSSIGNED,NULL);
1287 RoleDescriptorImpl::marshallAttributes(domElement);
1290 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1291 PROC_TYPED_CHILDREN(SingleSignOnService,SAMLConstants::SAML20MD_NS,false);
1292 PROC_TYPED_CHILDREN(NameIDMappingService,SAMLConstants::SAML20MD_NS,false);
1293 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1294 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1295 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1296 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1300 class SAML_DLLLOCAL RequestedAttributeImpl : public virtual RequestedAttribute,
1301 public AbstractComplexElement,
1302 public AbstractAttributeExtensibleXMLObject,
1303 public AbstractDOMCachingXMLObject,
1304 public AbstractValidatingXMLObject,
1305 public AbstractXMLObjectMarshaller,
1306 public AbstractXMLObjectUnmarshaller
1309 m_Name=m_NameFormat=m_FriendlyName=NULL;
1310 m_isRequired=XMLConstants::XML_BOOL_NULL;
1313 virtual ~RequestedAttributeImpl() {
1314 XMLString::release(&m_Name);
1315 XMLString::release(&m_NameFormat);
1316 XMLString::release(&m_FriendlyName);
1319 RequestedAttributeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1320 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1324 RequestedAttributeImpl(const RequestedAttributeImpl& src)
1325 : AbstractXMLObject(src),
1326 AbstractAttributeExtensibleXMLObject(src),
1327 AbstractDOMCachingXMLObject(src),
1328 AbstractValidatingXMLObject(src) {
1330 setName(src.getName());
1331 setNameFormat(src.getNameFormat());
1332 setFriendlyName(src.getFriendlyName());
1333 isRequired(src.m_isRequired);
1334 VectorOf(XMLObject) v=getAttributeValues();
1335 for (vector<XMLObject*>::const_iterator i=src.m_AttributeValues.begin(); i!=src.m_AttributeValues.end(); i++) {
1337 v.push_back((*i)->clone());
1342 IMPL_XMLOBJECT_CLONE(RequestedAttribute);
1343 Attribute* cloneAttribute() const {
1344 return new RequestedAttributeImpl(*this);
1347 IMPL_STRING_ATTRIB(Name);
1348 IMPL_STRING_ATTRIB(NameFormat);
1349 IMPL_STRING_ATTRIB(FriendlyName);
1350 IMPL_BOOLEAN_ATTRIB(isRequired);
1351 IMPL_XMLOBJECT_CHILDREN(AttributeValue,m_children.end());
1353 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1354 if (!qualifiedName.hasNamespaceURI()) {
1355 if (XMLString::equals(qualifiedName.getLocalPart(),NAME_ATTRIB_NAME)) {
1359 else if (XMLString::equals(qualifiedName.getLocalPart(),NAMEFORMAT_ATTRIB_NAME)) {
1360 setNameFormat(value);
1363 else if (XMLString::equals(qualifiedName.getLocalPart(),FRIENDLYNAME_ATTRIB_NAME)) {
1364 setFriendlyName(value);
1367 else if (XMLString::equals(qualifiedName.getLocalPart(),ISREQUIRED_ATTRIB_NAME)) {
1368 setisRequired(value);
1372 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1376 void marshallAttributes(DOMElement* domElement) const {
1377 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
1378 MARSHALL_STRING_ATTRIB(NameFormat,NAMEFORMAT,NULL);
1379 MARSHALL_STRING_ATTRIB(FriendlyName,FRIENDLYNAME,NULL);
1380 MARSHALL_BOOLEAN_ATTRIB(isRequired,ISREQUIRED,NULL);
1382 // Take care of wildcard.
1383 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1384 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1385 if (i->first.hasPrefix())
1386 attr->setPrefix(i->first.getPrefix());
1387 attr->setNodeValue(i->second);
1388 domElement->setAttributeNode(attr);
1392 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1393 getAttributeValues().push_back(childXMLObject);
1396 void processAttribute(const DOMAttr* attribute) {
1397 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1398 setAttribute(q,attribute->getNodeValue());
1402 class SAML_DLLLOCAL AttributeConsumingServiceImpl : public virtual AttributeConsumingService,
1403 public AbstractComplexElement,
1404 public AbstractDOMCachingXMLObject,
1405 public AbstractValidatingXMLObject,
1406 public AbstractXMLObjectMarshaller,
1407 public AbstractXMLObjectUnmarshaller
1409 list<XMLObject*>::iterator m_pos_ServiceDescription;
1410 list<XMLObject*>::iterator m_pos_RequestedAttribute;
1414 m_isDefault=XMLConstants::XML_BOOL_NULL;
1415 m_children.push_back(NULL);
1416 m_children.push_back(NULL);
1417 m_pos_ServiceDescription=m_children.begin();
1418 m_pos_RequestedAttribute=m_pos_ServiceDescription;
1419 ++m_pos_RequestedAttribute;
1423 virtual ~AttributeConsumingServiceImpl() {
1424 XMLString::release(&m_Index);
1427 AttributeConsumingServiceImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1428 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1432 AttributeConsumingServiceImpl(const AttributeConsumingServiceImpl& src)
1433 : AbstractXMLObject(src), AbstractDOMCachingXMLObject(src), AbstractValidatingXMLObject(src) {
1435 setIndex(src.m_Index);
1436 isDefault(src.m_isDefault);
1437 VectorOf(ServiceName) v=getServiceNames();
1438 for (vector<ServiceName*>::const_iterator i=src.m_ServiceNames.begin(); i!=src.m_ServiceNames.end(); i++) {
1440 v.push_back((*i)->cloneServiceName());
1443 VectorOf(ServiceDescription) w=getServiceDescriptions();
1444 for (vector<ServiceDescription*>::const_iterator j=src.m_ServiceDescriptions.begin(); j!=src.m_ServiceDescriptions.end(); j++) {
1446 w.push_back((*j)->cloneServiceDescription());
1449 VectorOf(RequestedAttribute) x=getRequestedAttributes();
1450 for (vector<RequestedAttribute*>::const_iterator k=src.m_RequestedAttributes.begin(); k!=src.m_RequestedAttributes.end(); k++) {
1452 x.push_back((*k)->cloneRequestedAttribute());
1457 IMPL_XMLOBJECT_CLONE(AttributeConsumingService);
1458 IMPL_INTEGER_ATTRIB(Index);
1459 IMPL_BOOLEAN_ATTRIB(isDefault);
1460 IMPL_TYPED_CHILDREN(ServiceName,m_pos_ServiceDescription);
1461 IMPL_TYPED_CHILDREN(ServiceDescription,m_pos_RequestedAttribute);
1462 IMPL_TYPED_CHILDREN(RequestedAttribute,m_children.end());
1465 void marshallAttributes(DOMElement* domElement) const {
1466 MARSHALL_INTEGER_ATTRIB(Index,INDEX,NULL);
1467 MARSHALL_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1470 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1471 PROC_TYPED_CHILDREN(ServiceName,SAMLConstants::SAML20MD_NS,false);
1472 PROC_TYPED_CHILDREN(ServiceDescription,SAMLConstants::SAML20MD_NS,false);
1473 PROC_TYPED_CHILDREN(RequestedAttribute,SAMLConstants::SAML20MD_NS,false);
1474 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1477 void processAttribute(const DOMAttr* attribute) {
1478 PROC_INTEGER_ATTRIB(Index,INDEX,NULL);
1479 PROC_BOOLEAN_ATTRIB(isDefault,ISDEFAULT,NULL);
1480 AbstractXMLObjectUnmarshaller::processAttribute(attribute);
1484 class SAML_DLLLOCAL SPSSODescriptorImpl : public virtual SPSSODescriptor, public SSODescriptorTypeImpl
1486 list<XMLObject*>::iterator m_pos_AssertionConsumerService;
1489 m_AuthnRequestsSigned=XMLConstants::XML_BOOL_NULL;
1490 m_WantAssertionsSigned=XMLConstants::XML_BOOL_NULL;
1491 m_children.push_back(NULL);
1492 m_pos_AssertionConsumerService=m_pos_NameIDFormat;
1493 ++m_pos_AssertionConsumerService;
1497 virtual ~SPSSODescriptorImpl() {}
1499 SPSSODescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1500 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1504 SPSSODescriptorImpl(const SPSSODescriptorImpl& src) : AbstractXMLObject(src), SSODescriptorTypeImpl(src) {
1506 AuthnRequestsSigned(src.m_AuthnRequestsSigned);
1507 WantAssertionsSigned(src.m_WantAssertionsSigned);
1508 VectorOf(AssertionConsumerService) v=getAssertionConsumerServices();
1509 for (vector<AssertionConsumerService*>::const_iterator i=src.m_AssertionConsumerServices.begin(); i!=src.m_AssertionConsumerServices.end(); i++) {
1511 v.push_back((*i)->cloneAssertionConsumerService());
1514 VectorOf(AttributeConsumingService) w=getAttributeConsumingServices();
1515 for (vector<AttributeConsumingService*>::const_iterator j=src.m_AttributeConsumingServices.begin(); j!=src.m_AttributeConsumingServices.end(); j++) {
1517 w.push_back((*j)->cloneAttributeConsumingService());
1522 IMPL_XMLOBJECT_CLONE(SPSSODescriptor);
1523 SSODescriptorType* cloneSSODescriptorType() const {
1524 return cloneSPSSODescriptor();
1526 RoleDescriptor* cloneRoleDescriptor() const {
1527 return cloneSPSSODescriptor();
1530 IMPL_BOOLEAN_ATTRIB(AuthnRequestsSigned);
1531 IMPL_BOOLEAN_ATTRIB(WantAssertionsSigned);
1532 IMPL_TYPED_CHILDREN(AssertionConsumerService,m_pos_AssertionConsumerService);
1533 IMPL_TYPED_CHILDREN(AttributeConsumingService,m_children.end());
1535 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1536 if (!qualifiedName.hasNamespaceURI()) {
1537 if (XMLString::equals(qualifiedName.getLocalPart(),AUTHNREQUESTSSIGNED_ATTRIB_NAME)) {
1538 setAuthnRequestsSigned(value);
1541 else if (XMLString::equals(qualifiedName.getLocalPart(),WANTASSERTIONSSIGNED_ATTRIB_NAME)) {
1542 setWantAssertionsSigned(value);
1546 RoleDescriptorImpl::setAttribute(qualifiedName, value);
1550 void marshallAttributes(DOMElement* domElement) const {
1551 MARSHALL_BOOLEAN_ATTRIB(AuthnRequestsSigned,AUTHNREQUESTSSIGNED,NULL);
1552 MARSHALL_BOOLEAN_ATTRIB(WantAssertionsSigned,WANTASSERTIONSSIGNED,NULL);
1553 RoleDescriptorImpl::marshallAttributes(domElement);
1556 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1557 PROC_TYPED_CHILDREN(AssertionConsumerService,SAMLConstants::SAML20MD_NS,false);
1558 PROC_TYPED_CHILDREN(AttributeConsumingService,SAMLConstants::SAML20MD_NS,false);
1559 SSODescriptorTypeImpl::processChildElement(childXMLObject,root);
1563 class SAML_DLLLOCAL AuthnAuthorityDescriptorImpl : public virtual AuthnAuthorityDescriptor, public RoleDescriptorImpl
1565 list<XMLObject*>::iterator m_pos_AuthnQueryService;
1566 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1569 m_children.push_back(NULL);
1570 m_children.push_back(NULL);
1571 m_pos_AuthnQueryService=m_pos_ContactPerson;
1572 ++m_pos_AuthnQueryService;
1573 m_pos_AssertionIDRequestService=m_pos_AuthnQueryService;
1574 ++m_pos_AssertionIDRequestService;
1578 virtual ~AuthnAuthorityDescriptorImpl() {}
1580 AuthnAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1581 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1585 AuthnAuthorityDescriptorImpl(const AuthnAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1587 VectorOf(AuthnQueryService) v=getAuthnQueryServices();
1588 for (vector<AuthnQueryService*>::const_iterator i=src.m_AuthnQueryServices.begin(); i!=src.m_AuthnQueryServices.end(); i++) {
1590 v.push_back((*i)->cloneAuthnQueryService());
1593 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1594 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1596 w.push_back((*j)->cloneAssertionIDRequestService());
1599 VectorOf(NameIDFormat) x=getNameIDFormats();
1600 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1602 x.push_back((*k)->cloneNameIDFormat());
1607 IMPL_XMLOBJECT_CLONE(AuthnAuthorityDescriptor);
1608 RoleDescriptor* cloneRoleDescriptor() const {
1609 return cloneAuthnAuthorityDescriptor();
1612 IMPL_TYPED_CHILDREN(AuthnQueryService,m_pos_AuthnQueryService);
1613 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1614 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1617 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1618 PROC_TYPED_CHILDREN(AuthnQueryService,SAMLConstants::SAML20MD_NS,false);
1619 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1620 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1621 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1625 class SAML_DLLLOCAL PDPDescriptorImpl : public virtual PDPDescriptor, public RoleDescriptorImpl
1627 list<XMLObject*>::iterator m_pos_AuthzService;
1628 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1631 m_children.push_back(NULL);
1632 m_children.push_back(NULL);
1633 m_pos_AuthzService=m_pos_ContactPerson;
1634 ++m_pos_AuthzService;
1635 m_pos_AssertionIDRequestService=m_pos_AuthzService;
1636 ++m_pos_AssertionIDRequestService;
1640 virtual ~PDPDescriptorImpl() {}
1642 PDPDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1643 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1647 PDPDescriptorImpl(const PDPDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1649 VectorOf(AuthzService) v=getAuthzServices();
1650 for (vector<AuthzService*>::const_iterator i=src.m_AuthzServices.begin(); i!=src.m_AuthzServices.end(); i++) {
1652 v.push_back((*i)->cloneAuthzService());
1655 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1656 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1658 w.push_back((*j)->cloneAssertionIDRequestService());
1661 VectorOf(NameIDFormat) x=getNameIDFormats();
1662 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1664 x.push_back((*k)->cloneNameIDFormat());
1669 IMPL_XMLOBJECT_CLONE(PDPDescriptor);
1670 RoleDescriptor* cloneRoleDescriptor() const {
1671 return clonePDPDescriptor();
1674 IMPL_TYPED_CHILDREN(AuthzService,m_pos_AuthzService);
1675 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1676 IMPL_TYPED_CHILDREN(NameIDFormat,m_children.end());
1679 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1680 PROC_TYPED_CHILDREN(AuthzService,SAMLConstants::SAML20MD_NS,false);
1681 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1682 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1683 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1687 class SAML_DLLLOCAL AttributeAuthorityDescriptorImpl : public virtual AttributeAuthorityDescriptor, public RoleDescriptorImpl
1689 list<XMLObject*>::iterator m_pos_AttributeService;
1690 list<XMLObject*>::iterator m_pos_AssertionIDRequestService;
1691 list<XMLObject*>::iterator m_pos_NameIDFormat;
1692 list<XMLObject*>::iterator m_pos_AttributeProfile;
1695 m_children.push_back(NULL);
1696 m_children.push_back(NULL);
1697 m_children.push_back(NULL);
1698 m_children.push_back(NULL);
1699 m_pos_AttributeService=m_pos_ContactPerson;
1700 ++m_pos_AttributeService;
1701 m_pos_AssertionIDRequestService=m_pos_AttributeService;
1702 ++m_pos_AssertionIDRequestService;
1703 m_pos_NameIDFormat=m_pos_AssertionIDRequestService;
1704 ++m_pos_NameIDFormat;
1705 m_pos_AttributeProfile=m_pos_NameIDFormat;
1706 ++m_pos_AttributeProfile;
1710 virtual ~AttributeAuthorityDescriptorImpl() {}
1712 AttributeAuthorityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1713 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1717 AttributeAuthorityDescriptorImpl(const AttributeAuthorityDescriptorImpl& src) : AbstractXMLObject(src), RoleDescriptorImpl(src) {
1719 VectorOf(AttributeService) v=getAttributeServices();
1720 for (vector<AttributeService*>::const_iterator i=src.m_AttributeServices.begin(); i!=src.m_AttributeServices.end(); i++) {
1722 v.push_back((*i)->cloneAttributeService());
1725 VectorOf(AssertionIDRequestService) w=getAssertionIDRequestServices();
1726 for (vector<AssertionIDRequestService*>::const_iterator j=src.m_AssertionIDRequestServices.begin(); j!=src.m_AssertionIDRequestServices.end(); j++) {
1728 w.push_back((*j)->cloneAssertionIDRequestService());
1731 VectorOf(NameIDFormat) x=getNameIDFormats();
1732 for (vector<NameIDFormat*>::const_iterator k=src.m_NameIDFormats.begin(); k!=src.m_NameIDFormats.end(); k++) {
1734 x.push_back((*k)->cloneNameIDFormat());
1737 VectorOf(AttributeProfile) y=getAttributeProfiles();
1738 for (vector<AttributeProfile*>::const_iterator m=src.m_AttributeProfiles.begin(); m!=src.m_AttributeProfiles.end(); m++) {
1740 y.push_back((*m)->cloneAttributeProfile());
1743 VectorOf(Attribute) z=getAttributes();
1744 for (vector<Attribute*>::const_iterator n=src.m_Attributes.begin(); n!=src.m_Attributes.end(); n++) {
1746 z.push_back((*n)->cloneAttribute());
1751 IMPL_XMLOBJECT_CLONE(AttributeAuthorityDescriptor);
1752 RoleDescriptor* cloneRoleDescriptor() const {
1753 return cloneAttributeAuthorityDescriptor();
1756 IMPL_TYPED_CHILDREN(AttributeService,m_pos_AttributeService);
1757 IMPL_TYPED_CHILDREN(AssertionIDRequestService,m_pos_AssertionIDRequestService);
1758 IMPL_TYPED_CHILDREN(NameIDFormat,m_pos_NameIDFormat);
1759 IMPL_TYPED_CHILDREN(AttributeProfile,m_pos_AttributeProfile);
1760 IMPL_TYPED_FOREIGN_CHILDREN(Attribute,saml2,m_children.end());
1763 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1764 PROC_TYPED_CHILDREN(AttributeService,SAMLConstants::SAML20MD_NS,false);
1765 PROC_TYPED_CHILDREN(AssertionIDRequestService,SAMLConstants::SAML20MD_NS,false);
1766 PROC_TYPED_CHILDREN(NameIDFormat,SAMLConstants::SAML20MD_NS,false);
1767 PROC_TYPED_CHILDREN(AttributeProfile,SAMLConstants::SAML20MD_NS,false);
1768 PROC_TYPED_FOREIGN_CHILDREN(Attribute,saml2,SAMLConstants::SAML20_NS,false);
1769 RoleDescriptorImpl::processChildElement(childXMLObject,root);
1773 class SAML_DLLLOCAL AffiliationDescriptorImpl : public virtual AffiliationDescriptor,
1774 public virtual SignableObject,
1775 public AbstractComplexElement,
1776 public AbstractAttributeExtensibleXMLObject,
1777 public AbstractDOMCachingXMLObject,
1778 public AbstractValidatingXMLObject,
1779 public AbstractXMLObjectMarshaller,
1780 public AbstractXMLObjectUnmarshaller
1782 list<XMLObject*>::iterator m_pos_AffiliateMember;
1785 m_ID=m_AffiliationOwnerID=NULL;
1786 m_ValidUntil=m_CacheDuration=NULL;
1787 m_children.push_back(NULL);
1788 m_children.push_back(NULL);
1789 m_children.push_back(NULL);
1792 m_pos_Signature=m_children.begin();
1793 m_pos_Extensions=m_pos_Signature;
1795 m_pos_AffiliateMember=m_pos_Extensions;
1796 ++m_pos_AffiliateMember;
1800 virtual ~AffiliationDescriptorImpl() {
1801 XMLString::release(&m_ID);
1802 XMLString::release(&m_AffiliationOwnerID);
1803 delete m_ValidUntil;
1804 delete m_CacheDuration;
1807 AffiliationDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1808 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1812 AffiliationDescriptorImpl(const AffiliationDescriptorImpl& src)
1813 : AbstractXMLObject(src),
1814 AbstractAttributeExtensibleXMLObject(src),
1815 AbstractDOMCachingXMLObject(src),
1816 AbstractValidatingXMLObject(src) {
1819 setAffiliationOwnerID(src.getAffiliationOwnerID());
1820 setValidUntil(src.getValidUntil());
1821 setCacheDuration(src.getCacheDuration());
1822 if (src.getSignature())
1823 setSignature(src.getSignature()->cloneSignature());
1824 if (src.getExtensions())
1825 setExtensions(src.getExtensions()->cloneExtensions());
1827 VectorOf(KeyDescriptor) v=getKeyDescriptors();
1828 for (vector<KeyDescriptor*>::const_iterator i=src.m_KeyDescriptors.begin(); i!=src.m_KeyDescriptors.end(); i++) {
1830 v.push_back((*i)->cloneKeyDescriptor());
1833 VectorOf(AffiliateMember) w=getAffiliateMembers();
1834 for (vector<AffiliateMember*>::const_iterator j=src.m_AffiliateMembers.begin(); j!=src.m_AffiliateMembers.end(); j++) {
1836 w.push_back((*j)->cloneAffiliateMember());
1841 IMPL_XMLOBJECT_CLONE(AffiliationDescriptor);
1843 const XMLCh* getId() const {
1847 //IMPL_TYPED_CHILD(Signature);
1848 // Need customized setter.
1850 Signature* m_Signature;
1851 list<XMLObject*>::iterator m_pos_Signature;
1853 Signature* getSignature() const {
1857 void setSignature(Signature* sig) {
1858 prepareForAssignment(m_Signature,sig);
1859 *m_pos_Signature=m_Signature=sig;
1860 // Sync content reference back up.
1862 m_Signature->setContentReference(new opensaml::ContentReference(*this));
1865 IMPL_STRING_ATTRIB(ID);
1866 IMPL_STRING_ATTRIB(AffiliationOwnerID);
1867 IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
1868 IMPL_DATETIME_ATTRIB(CacheDuration,0);
1869 IMPL_TYPED_CHILD(Extensions);
1870 IMPL_TYPED_CHILDREN(AffiliateMember,m_pos_AffiliateMember);
1871 IMPL_TYPED_CHILDREN(KeyDescriptor,m_children.end());
1873 void setAttribute(QName& qualifiedName, const XMLCh* value) {
1874 if (!qualifiedName.hasNamespaceURI()) {
1875 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
1879 else if (XMLString::equals(qualifiedName.getLocalPart(),AFFILIATIONOWNERID_ATTRIB_NAME)) {
1880 setAffiliationOwnerID(value);
1883 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
1884 setValidUntil(value);
1887 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
1888 setCacheDuration(value);
1892 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
1896 void marshallAttributes(DOMElement* domElement) const {
1897 MARSHALL_ID_ATTRIB(ID,ID,NULL);
1898 MARSHALL_STRING_ATTRIB(AffiliationOwnerID,AFFILIATIONOWNERID,NULL);
1899 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
1900 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
1902 // Take care of wildcard.
1903 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
1904 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
1905 if (i->first.hasPrefix())
1906 attr->setPrefix(i->first.getPrefix());
1907 attr->setNodeValue(i->second);
1908 domElement->setAttributeNode(attr);
1912 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
1913 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
1914 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
1915 PROC_TYPED_CHILDREN(AffiliateMember,SAMLConstants::SAML20MD_NS,false);
1916 PROC_TYPED_CHILDREN(KeyDescriptor,SAMLConstants::SAML20MD_NS,false);
1917 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
1920 void processAttribute(const DOMAttr* attribute) {
1921 PROC_ID_ATTRIB(ID,ID,NULL);
1922 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
1923 setAttribute(q,attribute->getNodeValue());
1927 class SAML_DLLLOCAL EntityDescriptorImpl : public virtual EntityDescriptor,
1928 public virtual SignableObject,
1929 public AbstractComplexElement,
1930 public AbstractAttributeExtensibleXMLObject,
1931 public AbstractDOMCachingXMLObject,
1932 public AbstractValidatingXMLObject,
1933 public AbstractXMLObjectMarshaller,
1934 public AbstractXMLObjectUnmarshaller
1936 list<XMLObject*>::iterator m_pos_ContactPerson;
1939 m_ID=m_EntityID=NULL;
1940 m_ValidUntil=m_CacheDuration=NULL;
1941 m_children.push_back(NULL);
1942 m_children.push_back(NULL);
1943 m_children.push_back(NULL);
1944 m_children.push_back(NULL);
1945 m_children.push_back(NULL);
1948 m_AffiliationDescriptor=NULL;
1949 m_Organization=NULL;
1950 m_pos_Signature=m_children.begin();
1951 m_pos_Extensions=m_pos_Signature;
1953 m_pos_AffiliationDescriptor=m_pos_Extensions;
1954 ++m_pos_AffiliationDescriptor;
1955 m_pos_Organization=m_pos_AffiliationDescriptor;
1956 ++m_pos_Organization;
1957 m_pos_ContactPerson=m_pos_Organization;
1958 ++m_pos_ContactPerson;
1962 virtual ~EntityDescriptorImpl() {
1963 XMLString::release(&m_ID);
1964 XMLString::release(&m_EntityID);
1965 delete m_ValidUntil;
1966 delete m_CacheDuration;
1969 EntityDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
1970 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
1974 EntityDescriptorImpl(const EntityDescriptorImpl& src)
1975 : AbstractXMLObject(src),
1976 AbstractAttributeExtensibleXMLObject(src),
1977 AbstractDOMCachingXMLObject(src),
1978 AbstractValidatingXMLObject(src) {
1981 setEntityID(src.getEntityID());
1982 setValidUntil(src.getValidUntil());
1983 setCacheDuration(src.getCacheDuration());
1984 if (src.getSignature())
1985 setSignature(src.getSignature()->cloneSignature());
1986 if (src.getExtensions())
1987 setExtensions(src.getExtensions()->cloneExtensions());
1988 if (src.getAffiliationDescriptor())
1989 setAffiliationDescriptor(src.getAffiliationDescriptor()->cloneAffiliationDescriptor());
1990 if (src.getOrganization())
1991 setOrganization(src.getOrganization()->cloneOrganization());
1993 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
1995 IDPSSODescriptor* idp=dynamic_cast<IDPSSODescriptor*>(*i);
1997 getIDPSSODescriptors().push_back(idp->cloneIDPSSODescriptor());
2001 SPSSODescriptor* sp=dynamic_cast<SPSSODescriptor*>(*i);
2003 getSPSSODescriptors().push_back(sp->cloneSPSSODescriptor());
2007 AuthnAuthorityDescriptor* authn=dynamic_cast<AuthnAuthorityDescriptor*>(*i);
2009 getAuthnAuthorityDescriptors().push_back(authn->cloneAuthnAuthorityDescriptor());
2013 AttributeAuthorityDescriptor* attr=dynamic_cast<AttributeAuthorityDescriptor*>(*i);
2015 getAttributeAuthorityDescriptors().push_back(attr->cloneAttributeAuthorityDescriptor());
2019 PDPDescriptor* pdp=dynamic_cast<PDPDescriptor*>(*i);
2021 getPDPDescriptors().push_back(pdp->clonePDPDescriptor());
2025 RoleDescriptor* role=dynamic_cast<RoleDescriptor*>(*i);
2027 getRoleDescriptors().push_back(role->cloneRoleDescriptor());
2033 VectorOf(ContactPerson) v=getContactPersons();
2034 for (vector<ContactPerson*>::const_iterator j=src.m_ContactPersons.begin(); j!=src.m_ContactPersons.end(); j++) {
2036 v.push_back((*j)->cloneContactPerson());
2039 VectorOf(AdditionalMetadataLocation) w=getAdditionalMetadataLocations();
2040 for (vector<AdditionalMetadataLocation*>::const_iterator k=src.m_AdditionalMetadataLocations.begin(); k!=src.m_AdditionalMetadataLocations.end(); k++) {
2042 w.push_back((*k)->cloneAdditionalMetadataLocation());
2047 IMPL_XMLOBJECT_CLONE(EntityDescriptor);
2049 const XMLCh* getId() const {
2053 //IMPL_TYPED_CHILD(Signature);
2054 // Need customized setter.
2056 Signature* m_Signature;
2057 list<XMLObject*>::iterator m_pos_Signature;
2059 Signature* getSignature() const {
2063 void setSignature(Signature* sig) {
2064 prepareForAssignment(m_Signature,sig);
2065 *m_pos_Signature=m_Signature=sig;
2066 // Sync content reference back up.
2068 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2071 IMPL_STRING_ATTRIB(ID);
2072 IMPL_STRING_ATTRIB(EntityID);
2073 IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
2074 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2075 IMPL_TYPED_CHILD(Extensions);
2076 IMPL_TYPED_CHILDREN(RoleDescriptor,m_pos_AffiliationDescriptor);
2077 IMPL_TYPED_CHILDREN(IDPSSODescriptor,m_pos_AffiliationDescriptor);
2078 IMPL_TYPED_CHILDREN(SPSSODescriptor,m_pos_AffiliationDescriptor);
2079 IMPL_TYPED_CHILDREN(AuthnAuthorityDescriptor,m_pos_AffiliationDescriptor);
2080 IMPL_TYPED_CHILDREN(AttributeAuthorityDescriptor,m_pos_AffiliationDescriptor);
2081 IMPL_TYPED_CHILDREN(PDPDescriptor,m_pos_AffiliationDescriptor);
2082 IMPL_TYPED_CHILD(AffiliationDescriptor);
2083 IMPL_TYPED_CHILD(Organization);
2084 IMPL_TYPED_CHILDREN(ContactPerson,m_pos_ContactPerson);
2085 IMPL_TYPED_CHILDREN(AdditionalMetadataLocation,m_children.end());
2087 void setAttribute(QName& qualifiedName, const XMLCh* value) {
2088 if (!qualifiedName.hasNamespaceURI()) {
2089 if (XMLString::equals(qualifiedName.getLocalPart(),ID_ATTRIB_NAME)) {
2093 else if (XMLString::equals(qualifiedName.getLocalPart(),ENTITYID_ATTRIB_NAME)) {
2097 else if (XMLString::equals(qualifiedName.getLocalPart(),VALIDUNTIL_ATTRIB_NAME)) {
2098 setValidUntil(value);
2101 else if (XMLString::equals(qualifiedName.getLocalPart(),CACHEDURATION_ATTRIB_NAME)) {
2102 setCacheDuration(value);
2106 AbstractAttributeExtensibleXMLObject::setAttribute(qualifiedName, value);
2110 void marshallAttributes(DOMElement* domElement) const {
2111 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2112 MARSHALL_STRING_ATTRIB(EntityID,ENTITYID,NULL);
2113 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2114 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2116 // Take care of wildcard.
2117 for (map<QName,XMLCh*>::const_iterator i=m_attributeMap.begin(); i!=m_attributeMap.end(); i++) {
2118 DOMAttr* attr=domElement->getOwnerDocument()->createAttributeNS(i->first.getNamespaceURI(),i->first.getLocalPart());
2119 if (i->first.hasPrefix())
2120 attr->setPrefix(i->first.getPrefix());
2121 attr->setNodeValue(i->second);
2122 domElement->setAttributeNode(attr);
2126 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2127 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2128 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2129 PROC_TYPED_CHILDREN(RoleDescriptor,SAMLConstants::SAML20MD_NS,false);
2130 PROC_TYPED_CHILDREN(IDPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2131 PROC_TYPED_CHILDREN(SPSSODescriptor,SAMLConstants::SAML20MD_NS,false);
2132 PROC_TYPED_CHILDREN(AuthnAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2133 PROC_TYPED_CHILDREN(AttributeAuthorityDescriptor,SAMLConstants::SAML20MD_NS,false);
2134 PROC_TYPED_CHILDREN(PDPDescriptor,SAMLConstants::SAML20MD_NS,false);
2135 PROC_TYPED_CHILD(AffiliationDescriptor,SAMLConstants::SAML20MD_NS,false);
2136 PROC_TYPED_CHILD(Organization,SAMLConstants::SAML20MD_NS,false);
2137 PROC_TYPED_CHILDREN(ContactPerson,SAMLConstants::SAML20MD_NS,false);
2138 PROC_TYPED_CHILDREN(AdditionalMetadataLocation,SAMLConstants::SAML20MD_NS,false);
2139 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2142 void processAttribute(const DOMAttr* attribute) {
2143 PROC_ID_ATTRIB(ID,ID,NULL);
2144 QName q(attribute->getNamespaceURI(),attribute->getLocalName(),attribute->getPrefix());
2145 setAttribute(q,attribute->getNodeValue());
2149 class SAML_DLLLOCAL EntitiesDescriptorImpl : public virtual EntitiesDescriptor,
2150 public virtual SignableObject,
2151 public AbstractComplexElement,
2152 public AbstractDOMCachingXMLObject,
2153 public AbstractValidatingXMLObject,
2154 public AbstractXMLObjectMarshaller,
2155 public AbstractXMLObjectUnmarshaller
2159 m_ValidUntil=m_CacheDuration=NULL;
2160 m_children.push_back(NULL);
2161 m_children.push_back(NULL);
2164 m_pos_Signature=m_children.begin();
2165 m_pos_Extensions=m_pos_Signature;
2170 virtual ~EntitiesDescriptorImpl() {
2171 XMLString::release(&m_ID);
2172 XMLString::release(&m_Name);
2173 delete m_ValidUntil;
2174 delete m_CacheDuration;
2177 EntitiesDescriptorImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
2178 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
2182 EntitiesDescriptorImpl(const EntitiesDescriptorImpl& src)
2183 : AbstractXMLObject(src),
2184 AbstractDOMCachingXMLObject(src),
2185 AbstractValidatingXMLObject(src) {
2188 setName(src.getName());
2189 setValidUntil(src.getValidUntil());
2190 setCacheDuration(src.getCacheDuration());
2191 if (src.getSignature())
2192 setSignature(src.getSignature()->cloneSignature());
2193 if (src.getExtensions())
2194 setExtensions(src.getExtensions()->cloneExtensions());
2196 for (list<XMLObject*>::const_iterator i=src.m_children.begin(); i!=src.m_children.end(); i++) {
2198 EntityDescriptor* e=dynamic_cast<EntityDescriptor*>(*i);
2200 getEntityDescriptors().push_back(e->cloneEntityDescriptor());
2204 EntitiesDescriptor* es=dynamic_cast<EntitiesDescriptor*>(*i);
2206 getEntitiesDescriptors().push_back(es->cloneEntitiesDescriptor());
2213 IMPL_XMLOBJECT_CLONE(EntitiesDescriptor);
2215 const XMLCh* getId() const {
2219 //IMPL_TYPED_CHILD(Signature);
2220 // Need customized setter.
2222 Signature* m_Signature;
2223 list<XMLObject*>::iterator m_pos_Signature;
2225 Signature* getSignature() const {
2229 void setSignature(Signature* sig) {
2230 prepareForAssignment(m_Signature,sig);
2231 *m_pos_Signature=m_Signature=sig;
2232 // Sync content reference back up.
2234 m_Signature->setContentReference(new opensaml::ContentReference(*this));
2237 IMPL_STRING_ATTRIB(ID);
2238 IMPL_STRING_ATTRIB(Name);
2239 IMPL_DATETIME_ATTRIB(ValidUntil,LLONG_MAX);
2240 IMPL_DATETIME_ATTRIB(CacheDuration,0);
2241 IMPL_TYPED_CHILD(Extensions);
2242 IMPL_TYPED_CHILDREN(EntityDescriptor,m_children.end());
2243 IMPL_TYPED_CHILDREN(EntitiesDescriptor,m_children.end());
2246 void marshallAttributes(DOMElement* domElement) const {
2247 MARSHALL_ID_ATTRIB(ID,ID,NULL);
2248 MARSHALL_STRING_ATTRIB(Name,NAME,NULL);
2249 MARSHALL_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2250 MARSHALL_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2253 void processChildElement(XMLObject* childXMLObject, const DOMElement* root) {
2254 PROC_TYPED_FOREIGN_CHILD(Signature,xmlsignature,XMLConstants::XMLSIG_NS,false);
2255 PROC_TYPED_CHILD(Extensions,SAMLConstants::SAML20MD_NS,false);
2256 PROC_TYPED_CHILDREN(EntityDescriptor,SAMLConstants::SAML20MD_NS,false);
2257 PROC_TYPED_CHILDREN(EntitiesDescriptor,SAMLConstants::SAML20MD_NS,false);
2258 AbstractXMLObjectUnmarshaller::processChildElement(childXMLObject,root);
2261 void processAttribute(const DOMAttr* attribute) {
2262 PROC_ID_ATTRIB(ID,ID,NULL);
2263 PROC_STRING_ATTRIB(Name,NAME,NULL);
2264 PROC_DATETIME_ATTRIB(ValidUntil,VALIDUNTIL,NULL);
2265 PROC_DATETIME_ATTRIB(CacheDuration,CACHEDURATION,NULL);
2272 #if defined (_MSC_VER)
2273 #pragma warning( pop )
2276 // Builder Implementations
2278 IMPL_XMLOBJECTBUILDER(AdditionalMetadataLocation);
2279 IMPL_XMLOBJECTBUILDER(AffiliateMember);
2280 IMPL_XMLOBJECTBUILDER(AffiliationDescriptor);
2281 IMPL_XMLOBJECTBUILDER(ArtifactResolutionService);
2282 IMPL_XMLOBJECTBUILDER(AssertionConsumerService);
2283 IMPL_XMLOBJECTBUILDER(AssertionIDRequestService);
2284 IMPL_XMLOBJECTBUILDER(AttributeAuthorityDescriptor);
2285 IMPL_XMLOBJECTBUILDER(AttributeConsumingService);
2286 IMPL_XMLOBJECTBUILDER(AttributeProfile);
2287 IMPL_XMLOBJECTBUILDER(AttributeService);
2288 IMPL_XMLOBJECTBUILDER(AuthnAuthorityDescriptor);
2289 IMPL_XMLOBJECTBUILDER(AuthnQueryService);
2290 IMPL_XMLOBJECTBUILDER(AuthzService);
2291 IMPL_XMLOBJECTBUILDER(Company);
2292 IMPL_XMLOBJECTBUILDER(ContactPerson);
2293 IMPL_XMLOBJECTBUILDER(EmailAddress);
2294 IMPL_XMLOBJECTBUILDER(EndpointType);
2295 IMPL_XMLOBJECTBUILDER(EntitiesDescriptor);
2296 IMPL_XMLOBJECTBUILDER(EntityDescriptor);
2297 IMPL_XMLOBJECTBUILDER(Extensions);
2298 IMPL_XMLOBJECTBUILDER(GivenName);
2299 IMPL_XMLOBJECTBUILDER(IDPSSODescriptor);
2300 IMPL_XMLOBJECTBUILDER(IndexedEndpointType);
2301 IMPL_XMLOBJECTBUILDER(KeyDescriptor);
2302 IMPL_XMLOBJECTBUILDER(localizedNameType);
2303 IMPL_XMLOBJECTBUILDER(localizedURIType);
2304 IMPL_XMLOBJECTBUILDER(ManageNameIDService);
2305 IMPL_XMLOBJECTBUILDER(NameIDFormat);
2306 IMPL_XMLOBJECTBUILDER(NameIDMappingService);
2307 IMPL_XMLOBJECTBUILDER(Organization);
2308 IMPL_XMLOBJECTBUILDER(OrganizationName);
2309 IMPL_XMLOBJECTBUILDER(OrganizationDisplayName);
2310 IMPL_XMLOBJECTBUILDER(OrganizationURL);
2311 IMPL_XMLOBJECTBUILDER(PDPDescriptor);
2312 IMPL_XMLOBJECTBUILDER(RequestedAttribute);
2313 IMPL_XMLOBJECTBUILDER(ServiceDescription);
2314 IMPL_XMLOBJECTBUILDER(ServiceName);
2315 IMPL_XMLOBJECTBUILDER(SingleLogoutService);
2316 IMPL_XMLOBJECTBUILDER(SingleSignOnService);
2317 IMPL_XMLOBJECTBUILDER(SPSSODescriptor);
2318 IMPL_XMLOBJECTBUILDER(SurName);
2319 IMPL_XMLOBJECTBUILDER(TelephoneNumber);
2321 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);
2322 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);
2323 const XMLCh AdditionalMetadataLocation::NAMESPACE_ATTRIB_NAME[] = UNICODE_LITERAL_9(n,a,m,e,s,p,a,c,e);
2324 const XMLCh AffiliateMember::LOCAL_NAME[] = UNICODE_LITERAL_15(A,f,f,i,l,i,a,t,e,M,e,m,b,e,r);
2325 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);
2326 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);
2327 const XMLCh AffiliationDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2328 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);
2329 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);
2330 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);
2331 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);
2332 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);
2333 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);
2334 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);
2335 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);
2336 const XMLCh AttributeConsumingService::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2337 const XMLCh AttributeConsumingService::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2338 const XMLCh AttributeProfile::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,P,r,o,f,i,l,e);
2339 const XMLCh AttributeService::LOCAL_NAME[] = UNICODE_LITERAL_16(A,t,t,r,i,b,u,t,e,S,e,r,v,i,c,e);
2340 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);
2341 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);
2342 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);
2343 const XMLCh AuthzService::LOCAL_NAME[] = UNICODE_LITERAL_12(A,u,t,h,z,S,e,r,v,i,c,e);
2344 const XMLCh CacheableSAMLObject::CACHEDURATION_ATTRIB_NAME[] = UNICODE_LITERAL_13(c,a,c,h,e,D,u,r,a,t,i,o,n);
2345 const XMLCh Company::LOCAL_NAME[] = UNICODE_LITERAL_7(C,o,m,p,a,n,y);
2346 const XMLCh ContactPerson::LOCAL_NAME[] = UNICODE_LITERAL_13(C,o,n,t,a,c,t,P,e,r,s,o,n);
2347 const XMLCh ContactPerson::TYPE_NAME[] = UNICODE_LITERAL_11(C,o,n,t,a,c,t,T,y,p,e);
2348 const XMLCh ContactPerson::CONTACTTYPE_ATTRIB_NAME[] = UNICODE_LITERAL_11(c,o,n,t,a,c,t,T,y,p,e);
2349 const XMLCh ContactPerson::CONTACT_TECHNICAL[] = UNICODE_LITERAL_9(t,e,c,h,n,i,c,a,l);
2350 const XMLCh ContactPerson::CONTACT_SUPPORT[] = UNICODE_LITERAL_7(s,u,p,p,o,r,t);
2351 const XMLCh ContactPerson::CONTACT_ADMINISTRATIVE[] = UNICODE_LITERAL_14(a,d,m,i,n,i,s,t,r,a,t,i,v,e);
2352 const XMLCh ContactPerson::CONTACT_BILLING[] = UNICODE_LITERAL_7(b,i,l,l,i,n,g);
2353 const XMLCh ContactPerson::CONTACT_OTHER[] = UNICODE_LITERAL_5(o,t,h,e,r);
2354 const XMLCh EmailAddress::LOCAL_NAME[] = UNICODE_LITERAL_12(E,m,a,i,l,A,d,d,r,e,s,s);
2355 const XMLCh EndpointType::LOCAL_NAME[] = {chNull};
2356 const XMLCh EndpointType::TYPE_NAME[] = UNICODE_LITERAL_12(E,n,d,p,o,i,n,t,T,y,p,e);
2357 const XMLCh EndpointType::BINDING_ATTRIB_NAME[] = UNICODE_LITERAL_7(B,i,n,d,i,n,g);
2358 const XMLCh EndpointType::LOCATION_ATTRIB_NAME[] = UNICODE_LITERAL_8(L,o,c,a,t,i,o,n);
2359 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);
2360 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);
2361 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);
2362 const XMLCh EntitiesDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2363 const XMLCh EntitiesDescriptor::NAME_ATTRIB_NAME[] = UNICODE_LITERAL_4(N,a,m,e);
2364 const XMLCh EntityDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(E,n,t,i,t,y,D,e,s,c,r,i,p,t,o,r);
2365 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);
2366 const XMLCh EntityDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2367 const XMLCh EntityDescriptor::ENTITYID_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,n,t,i,t,y,I,D);
2368 const XMLCh Extensions::LOCAL_NAME[] = UNICODE_LITERAL_10(E,x,t,e,n,s,i,o,n,s);
2369 const XMLCh Extensions::TYPE_NAME[] = UNICODE_LITERAL_14(E,x,t,e,n,s,i,o,n,s,T,y,p,e);
2370 const XMLCh GivenName::LOCAL_NAME[] = UNICODE_LITERAL_9(G,i,v,e,n,N,a,m,e);
2371 const XMLCh IDPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_16(I,D,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2372 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);
2373 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);
2374 const XMLCh IndexedEndpointType::LOCAL_NAME[] = {chNull};
2375 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);
2376 const XMLCh IndexedEndpointType::INDEX_ATTRIB_NAME[] = UNICODE_LITERAL_5(i,n,d,e,x);
2377 const XMLCh IndexedEndpointType::ISDEFAULT_ATTRIB_NAME[] = UNICODE_LITERAL_9(i,s,D,e,f,a,u,l,t);
2378 const XMLCh KeyDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(K,e,y,D,e,s,c,r,i,p,t,o,r);
2379 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);
2380 const XMLCh KeyDescriptor::USE_ATTRIB_NAME[] = UNICODE_LITERAL_3(u,s,e);
2381 const XMLCh KeyDescriptor::KEYTYPE_ENCRYPTION[] = UNICODE_LITERAL_10(e,n,c,r,y,p,t,i,o,n);
2382 const XMLCh KeyDescriptor::KEYTYPE_SIGNING[] = UNICODE_LITERAL_7(s,i,g,n,i,n,g);
2383 const XMLCh localizedNameType::LOCAL_NAME[] = {chNull};
2384 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);
2385 const XMLCh localizedNameType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2386 const XMLCh localizedURIType::LOCAL_NAME[] = {chNull};
2387 const XMLCh localizedURIType::TYPE_NAME[] = UNICODE_LITERAL_16(l,o,c,a,l,i,z,e,d,U,R,I,T,y,p,e);
2388 const XMLCh localizedURIType::LANG_ATTRIB_NAME[] = UNICODE_LITERAL_4(l,a,n,g);
2389 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);
2390 const XMLCh NameIDFormat::LOCAL_NAME[] = UNICODE_LITERAL_12(N,a,m,e,I,D,F,o,r,m,a,t);
2391 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);
2392 const XMLCh Organization::LOCAL_NAME[] = UNICODE_LITERAL_12(O,r,g,a,n,i,z,a,t,i,o,n);
2393 const XMLCh Organization::TYPE_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,T,y,p,e);
2394 const XMLCh OrganizationName::LOCAL_NAME[] = UNICODE_LITERAL_16(O,r,g,a,n,i,z,a,t,i,o,n,N,a,m,e);
2395 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);
2396 const XMLCh OrganizationURL::LOCAL_NAME[] = UNICODE_LITERAL_15(O,r,g,a,n,i,z,a,t,i,o,n,U,R,L);
2397 const XMLCh PDPDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_13(P,D,P,D,e,s,c,r,i,p,t,o,r);
2398 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);
2399 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);
2400 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);
2401 const XMLCh RequestedAttribute::ISREQUIRED_ATTRIB_NAME[] = UNICODE_LITERAL_10(i,s,R,e,q,u,i,r,e,d);
2402 const XMLCh RoleDescriptor::LOCAL_NAME[] = UNICODE_LITERAL_14(R,o,l,e,D,e,s,c,r,i,p,t,o,r);
2403 const XMLCh RoleDescriptor::ID_ATTRIB_NAME[] = UNICODE_LITERAL_2(I,D);
2404 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);
2405 const XMLCh RoleDescriptor::ERRORURL_ATTRIB_NAME[] = UNICODE_LITERAL_8(e,r,r,o,r,U,R,L);
2406 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);
2407 const XMLCh ServiceName::LOCAL_NAME[] = UNICODE_LITERAL_11(S,e,r,v,i,c,e,N,a,m,e);
2408 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);
2409 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);
2410 const XMLCh SPSSODescriptor::LOCAL_NAME[] = UNICODE_LITERAL_15(S,P,S,S,O,D,e,s,c,r,i,p,t,o,r);
2411 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);
2412 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);
2413 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);
2414 const XMLCh SSODescriptorType::LOCAL_NAME[] = {chNull};
2415 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);
2416 const XMLCh SurName::LOCAL_NAME[] = UNICODE_LITERAL_7(S,u,r,N,a,m,e);
2417 const XMLCh TelephoneNumber::LOCAL_NAME[] = UNICODE_LITERAL_15(T,e,l,e,p,h,o,n,e,N,u,m,b,e,r);
2418 const XMLCh TimeBoundSAMLObject::VALIDUNTIL_ATTRIB_NAME[] = UNICODE_LITERAL_10(v,a,l,i,d,U,n,t,i,l);