From 16b20c7620d1361093c5aa06e8fa1c99ca9e647b Mon Sep 17 00:00:00 2001 From: cantor Date: Sat, 8 Mar 2008 03:12:44 +0000 Subject: [PATCH] Log AA endpoint during errors. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2762 cb58f699-b61c-0410-a6fe-9272a202ed29 --- .../attribute/resolver/impl/QueryAttributeResolver.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp b/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp index 8a594cb..04ad7bd 100644 --- a/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp +++ b/shibsp/attribute/resolver/impl/QueryAttributeResolver.cpp @@ -273,10 +273,10 @@ bool QueryResolver::SAML1Query(QueryContext& ctx) const saml1p::Response* response=NULL; const vector& endpoints=AA->getAttributeServices(); for (vector::const_iterator ep=endpoints.begin(); !response && ep!=endpoints.end(); ++ep) { + if (!XMLString::equals((*ep)->getBinding(),binding.get())) + continue; + auto_ptr_char loc((*ep)->getLocation()); try { - if (!XMLString::equals((*ep)->getBinding(),binding.get())) - continue; - auto_ptr_char loc((*ep)->getLocation()); NameIdentifier* nameid = NameIdentifierBuilder::buildNameIdentifier(); nameid->setName(ctx.getNameID()->getName()); nameid->setFormat(ctx.getNameID()->getFormat()); @@ -297,7 +297,7 @@ bool QueryResolver::SAML1Query(QueryContext& ctx) const response = client.receiveSAML(); } catch (exception& ex) { - m_log.error("exception making SAML query: %s", ex.what()); + m_log.error("exception during SAML query to %s: %s", loc.get(), ex.what()); soaper.reset(); } } @@ -407,10 +407,10 @@ bool QueryResolver::SAML2Query(QueryContext& ctx) const saml2p::StatusResponseType* srt=NULL; const vector& endpoints=AA->getAttributeServices(); for (vector::const_iterator ep=endpoints.begin(); !srt && ep!=endpoints.end(); ++ep) { + if (!XMLString::equals((*ep)->getBinding(),binding.get())) + continue; + auto_ptr_char loc((*ep)->getLocation()); try { - if (!XMLString::equals((*ep)->getBinding(),binding.get())) - continue; - auto_ptr_char loc((*ep)->getLocation()); auto_ptr subject(saml2::SubjectBuilder::buildSubject()); // Encrypt the NameID? @@ -443,7 +443,7 @@ bool QueryResolver::SAML2Query(QueryContext& ctx) const srt = client.receiveSAML(); } catch (exception& ex) { - m_log.error("exception making SAML query: %s", ex.what()); + m_log.error("exception during SAML query to %s: %s", loc.get(), ex.what()); soaper.reset(); } } -- 2.1.4