Xerces 3 revisions.
authorScott Cantor <cantor.2@osu.edu>
Mon, 29 Dec 2008 21:05:05 +0000 (21:05 +0000)
committerScott Cantor <cantor.2@osu.edu>
Mon, 29 Dec 2008 21:05:05 +0000 (21:05 +0000)
30 files changed:
config_win32.h
configure.ac
shibsp/attribute/Attribute.cpp
shibsp/attribute/NameIDFromScopedAttributeDecoder.cpp
shibsp/attribute/ScopedAttributeDecoder.cpp
shibsp/attribute/filtering/impl/AndMatchFunctor.cpp
shibsp/attribute/filtering/impl/MatchFunctor.cpp
shibsp/attribute/filtering/impl/NotMatchFunctor.cpp
shibsp/attribute/filtering/impl/OrMatchFunctor.cpp
shibsp/attribute/filtering/impl/XMLAttributeFilter.cpp
shibsp/attribute/resolver/impl/XMLAttributeExtractor.cpp
shibsp/binding/impl/ArtifactResolver.cpp
shibsp/handler/impl/AbstractHandler.cpp
shibsp/handler/impl/AssertionLookup.cpp
shibsp/handler/impl/ChainingLogoutInitiator.cpp
shibsp/handler/impl/ChainingSessionInitiator.cpp
shibsp/handler/impl/LogoutHandler.cpp
shibsp/handler/impl/MetadataGenerator.cpp
shibsp/handler/impl/SAML2ArtifactResolution.cpp
shibsp/handler/impl/SAML2Logout.cpp
shibsp/handler/impl/SAML2NameIDMgmt.cpp
shibsp/handler/impl/SAMLDSSessionInitiator.cpp
shibsp/handler/impl/SessionHandler.cpp
shibsp/handler/impl/StatusHandler.cpp
shibsp/handler/impl/TransformSessionInitiator.cpp
shibsp/impl/XMLRequestMapper.cpp
shibsp/impl/XMLServiceProvider.cpp
shibsp/lite/CommonDomainCookie.cpp
shibsp/metadata/MetadataExtImpl.cpp
shibsp/metadata/MetadataExtSchemaValidators.cpp

index 431f378..80f49d9 100644 (file)
 /* Define if Xerces-C library was found */
 #define HAVE_LIBXERCESC 1
 
+#include <xercesc/util/XercesVersion.hpp>
+
+#if (XERCES_VERSION_MAJOR < 3)
+# define SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE 1
+# define SHIBSP_XERCESC_SHORT_ACCEPTNODE 1
+#endif
+
 /* Define to 1 if you have the <memory.h> header file. */
 #define HAVE_MEMORY_H 1
 
index b3e9cff..6a8ef69 100644 (file)
@@ -222,6 +222,30 @@ AC_TRY_LINK(
         [AC_DEFINE(HAVE_LIBXERCESC,1,[Define if Xerces-C library was found])],
         [AC_MSG_ERROR([unable to link with Xerces])])
 
+AC_MSG_CHECKING([whether Xerces XMLString::release(XMLByte**) exists])
+AC_TRY_COMPILE([#include <xercesc/util/XMLString.hpp>],
+    [using namespace XERCES_CPP_NAMESPACE;
+      XMLByte* buf=NULL;
+      XMLString::release(&buf);
+    ],
+    [AC_MSG_RESULT([yes])]
+    [AC_DEFINE([SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE], [1], [Define to 1 if Xerces XMLString includes XMLByte release.])],
+    [AC_MSG_RESULT([no])])
+
+AC_MSG_CHECKING([whether Xerces DOMNodeFilter API returns a short])
+AC_TRY_COMPILE([#include <xercesc/dom/DOM.hpp>],
+    [using namespace XERCES_CPP_NAMESPACE;
+      class Blocker : public DOMNodeFilter {
+      public:
+        short acceptNode(const DOMNode* node) const {
+            return FILTER_REJECT;
+        }
+      };
+      static Blocker g_Blocker;
+    ],
+    [AC_MSG_RESULT([yes])]
+    [AC_DEFINE([SHIBSP_XERCESC_SHORT_ACCEPTNODE], [1], [Define to 1 if Xerces DOMNodeFilter API returns a short.])],
+    [AC_MSG_RESULT([no])])
 
 #XML-Tooling settings
 AC_ARG_WITH(xmltooling,
index d4301e4..7792677 100644 (file)
@@ -51,10 +51,10 @@ namespace shibsp {
     }
 
 #ifndef SHIBSP_LITE
-    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory StringAttributeDecoderFactory;
-    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory ScopedAttributeDecoderFactory;
-    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory NameIDAttributeDecoderFactory;
-    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,QName,const DOMElement*>::Factory NameIDFromScopedAttributeDecoderFactory;
+    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,xmltooling::QName,const DOMElement*>::Factory StringAttributeDecoderFactory;
+    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,xmltooling::QName,const DOMElement*>::Factory ScopedAttributeDecoderFactory;
+    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,xmltooling::QName,const DOMElement*>::Factory NameIDAttributeDecoderFactory;
+    SHIBSP_DLLLOCAL PluginManager<AttributeDecoder,xmltooling::QName,const DOMElement*>::Factory NameIDFromScopedAttributeDecoderFactory;
 
     static const XMLCh _StringAttributeDecoder[] = UNICODE_LITERAL_22(S,t,r,i,n,g,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
     static const XMLCh _ScopedAttributeDecoder[] = UNICODE_LITERAL_22(S,c,o,p,e,d,A,t,t,r,i,b,u,t,e,D,e,c,o,d,e,r);
@@ -66,10 +66,10 @@ namespace shibsp {
 };
 
 #ifndef SHIBSP_LITE
-QName shibsp::StringAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _StringAttributeDecoder);
-QName shibsp::ScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _ScopedAttributeDecoder);
-QName shibsp::NameIDAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDAttributeDecoder);
-QName shibsp::NameIDFromScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDFromScopedAttributeDecoder);
+xmltooling::QName shibsp::StringAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _StringAttributeDecoder);
+xmltooling::QName shibsp::ScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _ScopedAttributeDecoder);
+xmltooling::QName shibsp::NameIDAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDAttributeDecoder);
+xmltooling::QName shibsp::NameIDFromScopedAttributeDecoderType(shibspconstants::SHIB2ATTRIBUTEMAP_NS, _NameIDFromScopedAttributeDecoder);
 
 void shibsp::registerAttributeDecoders()
 {
index 7e807b9..5711419 100644 (file)
@@ -75,7 +75,7 @@ shibsp::Attribute* NameIDFromScopedAttributeDecoder::decode(
     char* val;
     char* scope;
     const XMLCh* xmlscope;
-    QName scopeqname(NULL,Scope);
+    xmltooling::QName scopeqname(NULL,Scope);
     auto_ptr<NameIDAttribute> nameid(
         new NameIDAttribute(ids, (m_formatter.get() && *m_formatter.get()) ? m_formatter.get() : DEFAULT_NAMEID_FORMATTER)
         );
index 2044d6b..da112b0 100644 (file)
@@ -69,7 +69,7 @@ shibsp::Attribute* ScopedAttributeDecoder::decode(
     char* val;
     char* scope;
     const XMLCh* xmlscope;
-    QName scopeqname(NULL,Scope);
+    xmltooling::QName scopeqname(NULL,Scope);
     auto_ptr<ScopedAttribute> scoped(new ScopedAttribute(ids, m_delimeter));
     scoped->setCaseSensitive(m_caseSensitive);
     vector< pair<string,string> >& dest = scoped->getValues();
index 857050d..35cea2c 100644 (file)
@@ -109,7 +109,7 @@ MatchFunctor* AndMatchFunctor::buildFunctor(const DOMElement* e, const FilterPol
     if (*id && functorMap->getMatchFunctors().count(id))
         id = "";
 
-    auto_ptr<QName> type(XMLHelper::getXSIType(e));
+    auto_ptr<xmltooling::QName> type(XMLHelper::getXSIType(e));
     if (!type.get())
         throw ConfigurationException("Child Rule found with no xsi:type.");
 
index 06fd7b2..1ba0ec6 100644 (file)
@@ -31,13 +31,13 @@ using namespace xmltooling;
 using namespace std;
 
 #define DECL_FACTORY(name) \
-    SHIBSP_DLLLOCAL PluginManager< MatchFunctor,QName,pair<const FilterPolicyContext*,const DOMElement*> >::Factory name##Factory
+    SHIBSP_DLLLOCAL PluginManager< MatchFunctor,xmltooling::QName,pair<const FilterPolicyContext*,const DOMElement*> >::Factory name##Factory
 
 #define DECL_BASIC_QNAME(name,lit) \
-    QName shibsp::name##Type(shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, lit)
+    xmltooling::QName shibsp::name##Type(shibspconstants::SHIB2ATTRIBUTEFILTER_MF_BASIC_NS, lit)
 
 #define DECL_SAML_QNAME(name,lit) \
-    QName shibsp::name##Type(shibspconstants::SHIB2ATTRIBUTEFILTER_MF_SAML_NS, lit)
+    xmltooling::QName shibsp::name##Type(shibspconstants::SHIB2ATTRIBUTEFILTER_MF_SAML_NS, lit)
 
 #define REGISTER_FACTORY(name) \
     mgr.registerFactory(name##Type, name##Factory)
@@ -104,7 +104,7 @@ DECL_SAML_QNAME(AttributeScopeMatchesShibMDScope, AttributeScopeMatchesShibMDSco
 
 void SHIBSP_API shibsp::registerMatchFunctors()
 {
-    PluginManager< MatchFunctor,QName,pair<const FilterPolicyContext*,const DOMElement*> >& mgr =
+    PluginManager< MatchFunctor,xmltooling::QName,pair<const FilterPolicyContext*,const DOMElement*> >& mgr =
         SPConfig::getConfig().MatchFunctorManager;
     REGISTER_FACTORY(AnyMatchFunctor);
     REGISTER_FACTORY(AndMatchFunctor);
index 0f79a84..9a22474 100644 (file)
@@ -99,7 +99,7 @@ MatchFunctor* NotMatchFunctor::buildFunctor(const DOMElement* e, const FilterPol
     if (*id && functorMap->getMatchFunctors().count(id))
         id = "";
 
-    auto_ptr<QName> type(XMLHelper::getXSIType(e));
+    auto_ptr<xmltooling::QName> type(XMLHelper::getXSIType(e));
     if (!type.get())
         throw ConfigurationException("Child Rule found with no xsi:type.");
 
index cd29548..2649f42 100644 (file)
@@ -105,7 +105,7 @@ MatchFunctor* OrMatchFunctor::buildFunctor(const DOMElement* e, const FilterPoli
     if (*id && functorMap->getMatchFunctors().count(id))
         id = "";
 
-    auto_ptr<QName> type(XMLHelper::getXSIType(e));
+    auto_ptr<xmltooling::QName> type(XMLHelper::getXSIType(e));
     if (!type.get())
         throw ConfigurationException("Child Rule found with no xsi:type.");
 
index 801ea57..afd10e1 100644 (file)
@@ -228,7 +228,7 @@ MatchFunctor* XMLFilterImpl::buildFunctor(
             id = "";
     }
 
-    auto_ptr<QName> type(XMLHelper::getXSIType(e));
+    auto_ptr<xmltooling::QName> type(XMLHelper::getXSIType(e));
     if (type.get()) {
         try {
             MatchFunctor* func = SPConfig::getConfig().MatchFunctorManager.newPlugin(*type.get(), make_pair(&functorMap,e));
index eeead9f..8f10d20 100644 (file)
@@ -176,7 +176,7 @@ XMLExtractorImpl::XMLExtractorImpl(const DOMElement* e, Category& log) : m_log(l
         try {
             DOMElement* dchild = XMLHelper::getFirstChildElement(child, shibspconstants::SHIB2ATTRIBUTEMAP_NS, _AttributeDecoder);
             if (dchild) {
-                auto_ptr<QName> q(XMLHelper::getXSIType(dchild));
+                auto_ptr<xmltooling::QName> q(XMLHelper::getXSIType(dchild));
                 if (q.get())
                     decoder = SPConfig::getConfig().AttributeDecoderManager.newPlugin(*q.get(), dchild);
             }
index 332549f..52e68fc 100644 (file)
@@ -87,7 +87,7 @@ saml1p::Response* ArtifactResolver::resolve(
         throw MetadataException("No compatible endpoint found in issuer's metadata.");
     else if (!response)
         throw BindingException("Unable to resolve artifact(s) into a SAML response.");
-    const QName* code = (response->getStatus() && response->getStatus()->getStatusCode()) ? response->getStatus()->getStatusCode()->getValue() : NULL;
+    const xmltooling::QName* code = (response->getStatus() && response->getStatus()->getStatusCode()) ? response->getStatus()->getStatusCode()->getValue() : NULL;
     if (!code || *code != saml1p::StatusCode::SUCCESS) {
         delete response;
         throw BindingException("Identity provider returned a SAML error in response to artifact(s).");
index 3f298df..3b3c0dc 100644 (file)
@@ -145,7 +145,7 @@ void AbstractHandler::checkError(const XMLObject* response, const saml2md::RoleD
         const saml1p::Status* status = r1->getStatus();
         if (status) {
             const saml1p::StatusCode* sc = status->getStatusCode();
-            const QName* code = sc ? sc->getValue() : NULL;
+            const xmltooling::QName* code = sc ? sc->getValue() : NULL;
             if (code && *code != saml1p::StatusCode::SUCCESS) {
                 FatalProfileException ex("SAML response contained an error.");
                 ex.addProperty("statusCode", code->toString().c_str());
index 7c795db..adeb711 100644 (file)
@@ -45,7 +45,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
index e8de4d6..4fc6776 100644 (file)
@@ -75,7 +75,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL LogoutInitiatorNodeFilter : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             if (XMLHelper::isNodeNamed(node,shibspconstants::SHIB2SPCONFIG_NS,_LogoutInitiator))
                 return FILTER_REJECT;
             return FILTER_ACCEPT;
index dcd29d6..1cbc45b 100644 (file)
@@ -71,7 +71,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL SessionInitiatorNodeFilter : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             if (XMLHelper::isNodeNamed(node,shibspconstants::SHIB2SPCONFIG_NS,_SessionInitiator))
                 return FILTER_REJECT;
             return FILTER_ACCEPT;
index f124283..0315928 100644 (file)
@@ -216,7 +216,7 @@ bool LogoutHandler::notifyBackChannel(
         env->setBody(body);
         ElementProxy* msg = new AnyElementImpl(shibspconstants::SHIB2SPNOTIFY_NS, LogoutNotification);
         body->getUnknownXMLObjects().push_back(msg);
-        msg->setAttribute(QName(NULL, _type), local ? _local : _global);
+        msg->setAttribute(xmltooling::QName(NULL, _type), local ? _local : _global);
         for (vector<string>::const_iterator s = sessions.begin(); s!=sessions.end(); ++s) {
             auto_ptr_XMLCh temp(s->c_str());
             ElementProxy* child = new AnyElementImpl(shibspconstants::SHIB2SPNOTIFY_NS, SessionID);
index 94f8485..2a847cb 100644 (file)
@@ -54,7 +54,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
index ef85778..6b98392 100644 (file)
@@ -90,7 +90,7 @@ namespace shibsp {
 
         MessageEncoder* m_encoder;
         MessageDecoder* m_decoder;
-        QName m_role;
+        xmltooling::QName m_role;
 #endif
     };
 
@@ -121,7 +121,7 @@ SAML2ArtifactResolution::SAML2ArtifactResolution(const DOMElement* e, const char
                 getString("Binding").second,pair<const DOMElement*,const XMLCh*>(e,NULL)
                 );
         }
-        catch (exception& ex) {
+        catch (exception&) {
             m_log.error("error building MessageEncoder/Decoder pair for binding (%s)", getString("Binding").second);
             delete m_encoder;
             delete m_decoder;
index d917407..f7f5c0b 100644 (file)
@@ -109,7 +109,7 @@ namespace shibsp {
             bool front
             ) const;
 
-        QName m_role;
+        xmltooling::QName m_role;
         MessageDecoder* m_decoder;
         XMLCh* m_outgoing;
         vector<const XMLCh*> m_bindings;
index 5ac6110..56b38eb 100644 (file)
@@ -110,7 +110,7 @@ namespace shibsp {
             bool front
             ) const;
 
-        QName m_role;
+        xmltooling::QName m_role;
         MessageDecoder* m_decoder;
         XMLCh* m_outgoing;
         vector<const XMLCh*> m_bindings;
index 6a7cbd1..9545420 100644 (file)
@@ -78,10 +78,10 @@ namespace shibsp {
             hurl += loc;
             auto_ptr_XMLCh widen(hurl.c_str());
             ElementProxy* ep = new AnyElementImpl(m_discoNS.get(), LOCAL_NAME);
-            ep->setAttribute(QName(NULL,EndpointType::LOCATION_ATTRIB_NAME), widen.get());
-            ep->setAttribute(QName(NULL,EndpointType::BINDING_ATTRIB_NAME), m_discoNS.get());
+            ep->setAttribute(xmltooling::QName(NULL,EndpointType::LOCATION_ATTRIB_NAME), widen.get());
+            ep->setAttribute(xmltooling::QName(NULL,EndpointType::BINDING_ATTRIB_NAME), m_discoNS.get());
             pair<bool,const XMLCh*> ix = getXMLString("index");
-            ep->setAttribute(QName(NULL,IndexedEndpointType::INDEX_ATTRIB_NAME), ix.first ? ix.second : xmlconstants::XML_ONE);
+            ep->setAttribute(xmltooling::QName(NULL,IndexedEndpointType::INDEX_ATTRIB_NAME), ix.first ? ix.second : xmlconstants::XML_ONE);
 
             Extensions* ext = role.getExtensions();
             if (!ext) {
index 5b60f52..813aad9 100644 (file)
@@ -45,7 +45,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
index f35b8c5..5886a91 100644 (file)
@@ -50,7 +50,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL Blocker : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
index 36759f3..390d3d8 100644 (file)
@@ -55,7 +55,12 @@ namespace shibsp {
     class SHIBSP_DLLLOCAL TransformSINodeFilter : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
index 9c5f294..7868887 100644 (file)
@@ -62,7 +62,12 @@ namespace shibsp {
         ~Override();
 
         // Provides filter to exclude special config elements.
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
 
index f9954d1..542ff4c 100644 (file)
@@ -168,7 +168,12 @@ namespace {
         }
 
         // Provides filter to exclude special config elements.
-        short acceptNode(const DOMNode* node) const;
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const;
 
     private:
         void cleanup();
@@ -244,7 +249,12 @@ namespace {
 #endif
 
         // Provides filter to exclude special config elements.
-        short acceptNode(const DOMNode* node) const;
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const;
 
         void setDocument(DOMDocument* doc) {
             m_document = doc;
@@ -440,7 +450,12 @@ namespace {
     class SHIBSP_DLLLOCAL PolicyNodeFilter : public DOMNodeFilter
     {
     public:
-        short acceptNode(const DOMNode* node) const {
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+        short
+#else
+        FilterAction
+#endif
+        acceptNode(const DOMNode* node) const {
             return FILTER_REJECT;
         }
     };
@@ -945,7 +960,12 @@ void XMLApplication::cleanup()
 #endif
 }
 
-short XMLApplication::acceptNode(const DOMNode* node) const
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+short
+#else
+DOMNodeFilter::FilterAction
+#endif
+XMLApplication::acceptNode(const DOMNode* node) const
 {
     const XMLCh* name=node->getLocalName();
     if (XMLString::equals(name,ApplicationOverride) ||
@@ -1201,7 +1221,12 @@ void XMLApplication::getHandlers(vector<const Handler*>& handlers) const
     }
 }
 
-short XMLConfigImpl::acceptNode(const DOMNode* node) const
+#ifdef SHIBSP_XERCESC_SHORT_ACCEPTNODE
+short
+#else
+DOMNodeFilter::FilterAction
+#endif
+XMLConfigImpl::acceptNode(const DOMNode* node) const
 {
     if (!XMLString::equals(node->getNamespaceURI(),shibspconstants::SHIB2SPCONFIG_NS))
         return FILTER_ACCEPT;
index fd3bfba..cb8ffc0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright 2001-2007 Internet2
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -16,8 +16,8 @@
 
 /**
  * CommonDomainCookie.cpp
- * 
- * Helper class for maintaining discovery cookie. 
+ *
+ * Helper class for maintaining discovery cookie.
  */
 
 #include "internal.h"
@@ -55,12 +55,16 @@ CommonDomainCookie::CommonDomainCookie(const char* cookie)
     free(b64);
 
     // Now Base64 decode the list.
-    unsigned int len;
+    xsecsize_t len;
     for (vector<string>::iterator i=templist.begin(); i!=templist.end(); ++i) {
         XMLByte* decoded=Base64::decode(reinterpret_cast<const XMLByte*>(i->c_str()),&len);
         if (decoded && *decoded) {
             m_list.push_back(reinterpret_cast<char*>(decoded));
+#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
             XMLString::release(&decoded);
+#else
+            XMLString::release((char**)&decoded);
+#endif
         }
     }
 }
@@ -74,27 +78,31 @@ const char* CommonDomainCookie::set(const char* entityID)
             break;
         }
     }
-    
+
     // Append it to the end.
     m_list.push_back(entityID);
-    
+
     // Now rebuild the delimited list.
-    unsigned int len;
+    xsecsize_t len;
     string delimited;
     for (vector<string>::const_iterator j=m_list.begin(); j!=m_list.end(); j++) {
         if (!delimited.empty()) delimited += ' ';
-        
+
         XMLByte* b64=Base64::encode(reinterpret_cast<const XMLByte*>(j->c_str()),j->length(),&len);
         XMLByte *pos, *pos2;
         for (pos=b64, pos2=b64; *pos2; pos2++)
             if (isgraph(*pos2))
                 *pos++=*pos2;
         *pos=0;
-        
+
         delimited += reinterpret_cast<char*>(b64);
+#ifdef SHIBSP_XERCESC_HAS_XMLBYTE_RELEASE
         XMLString::release(&b64);
+#else
+        XMLString::release((char**)&b64);
+#endif
     }
-    
+
     m_encoded=XMLToolingConfig::getConfig().getURLEncoder()->encode(delimited.c_str());
     return m_encoded.c_str();
 }
index 6188b46..71fb17a 100644 (file)
@@ -59,7 +59,7 @@ namespace shibsp {
 
     public:
 
-        ScopeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+        ScopeImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
             init();
         }
@@ -99,7 +99,7 @@ namespace shibsp {
             XMLString::release(&m_VerifyDepth);
         }
 
-        KeyAuthorityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const QName* schemaType)
+        KeyAuthorityImpl(const XMLCh* nsURI, const XMLCh* localName, const XMLCh* prefix, const xmltooling::QName* schemaType)
                 : AbstractXMLObject(nsURI, localName, prefix, schemaType) {
             init();
         }
@@ -119,7 +119,7 @@ namespace shibsp {
         IMPL_TYPED_CHILDREN(KeyInfo,m_children.end());
         
     public:
-        void setAttribute(const QName& qualifiedName, const XMLCh* value, bool ID=false) {
+        void setAttribute(const xmltooling::QName& qualifiedName, const XMLCh* value, bool ID=false) {
             if (!qualifiedName.hasNamespaceURI()) {
                 if (XMLString::equals(qualifiedName.getLocalPart(),VERIFYDEPTH_ATTRIB_NAME)) {
                     setVerifyDepth(value);
index d175ba4..f9b4472 100644 (file)
@@ -46,12 +46,12 @@ namespace shibsp {
 };
 
 #define REGISTER_ELEMENT(cname) \
-    q=QName(SHIBMD_NS,cname::LOCAL_NAME); \
+    q=xmltooling::QName(SHIBMD_NS,cname::LOCAL_NAME); \
     XMLObjectBuilder::registerBuilder(q,new cname##Builder()); \
     SchemaValidators.registerValidator(q,new cname##SchemaValidator())
     
 void shibsp::registerMetadataExtClasses() {
-    QName q;
+    xmltooling::QName q;
     REGISTER_ELEMENT(Scope);
     REGISTER_ELEMENT(KeyAuthority);