From d49a1cbbd82b211b1ebb0e50fc23005959302e8a Mon Sep 17 00:00:00 2001 From: "harald.bratko" Date: Fri, 12 Aug 2005 12:59:11 +0000 Subject: Fixed bug when evaluating an XPath and no SecurityLayer prefix is set in the document. git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@439 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/id/auth/parser/CreateXMLSignatureResponseParser.java | 3 +-- .../src/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java | 4 ++-- .../gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'id.server/src/at/gv') diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java b/id.server/src/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java index 094fa091f..cae470cc4 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java @@ -6,7 +6,6 @@ import java.util.ArrayList; import java.util.List; import org.w3c.dom.Element; -import org.w3c.dom.Node; import org.w3c.dom.traversal.NodeIterator; import at.gv.egovernment.moa.id.AuthenticationException; @@ -116,7 +115,7 @@ public class CreateXMLSignatureResponseParser { CreateXMLSignatureResponse cResp; try { cResp = new CreateXMLSignatureResponse(); - String slPrefix = sigResponse.getPrefix(); + String slPrefix = XPathUtils.getSlPrefix(sigResponse); cResp.setSamlNameIdentifier(XPathUtils.getElementValue(sigResponse, "/" + slPrefix + SAML_SUBJECT_NAME_IDENTIFIER_XPATH, null)); cResp.setSamlAssertion((Element) XPathUtils.selectSingleNode(sigResponse, "/" + slPrefix + SAML_ASSERTION_XPATH)); NodeIterator attrIter = XPathUtils.selectNodeIterator(sigResponse, "/" + slPrefix + SAML_ATTRIBUTE_XPATH); diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java b/id.server/src/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java index a952b2066..7084faf1f 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/parser/ErrorResponseParser.java @@ -58,7 +58,7 @@ public class ErrorResponseParser { */ public String getErrorCode() { - String slPrefix = errorElement.getPrefix(); + String slPrefix = XPathUtils.getSlPrefix(errorElement); StringBuffer sb = new StringBuffer("/"); sb.append(slPrefix); sb.append(":ErrorResponse/"); @@ -75,7 +75,7 @@ public class ErrorResponseParser { */ public String getErrorInfo() { - String slPrefix = errorElement.getPrefix(); + String slPrefix = XPathUtils.getSlPrefix(errorElement); StringBuffer sb = new StringBuffer("/"); sb.append(slPrefix); sb.append(":ErrorResponse/"); diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java b/id.server/src/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java index 05272a695..ffb80aadd 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java @@ -87,7 +87,7 @@ public class InfoboxReadResponseParser { public String parseSAMLAssertion() throws ParseException { try { - String slPrefix = infoBoxElem.getPrefix(); + String slPrefix = XPathUtils.getSlPrefix(infoBoxElem); StringBuffer sb = new StringBuffer("/"); sb.append(slPrefix); sb.append(":InfoboxReadResponse/"); -- cgit v1.2.3