diff options
author | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2009-08-11 08:11:40 +0000 |
---|---|---|
committer | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2009-08-11 08:11:40 +0000 |
commit | 5166270383bd11faeaa484ab878844f9b9445527 (patch) | |
tree | 6b1b646e1cf82b94faaeb991dbb98d35e2b36cfa /spss/server/serverlib/src/main/java/at/gv/egovernment | |
parent | 2628b4fe3d06aa0d083f5edc8377536bd3c73eac (diff) | |
download | moa-id-spss-5166270383bd11faeaa484ab878844f9b9445527.tar.gz moa-id-spss-5166270383bd11faeaa484ab878844f9b9445527.tar.bz2 moa-id-spss-5166270383bd11faeaa484ab878844f9b9445527.zip |
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1127 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss/server/serverlib/src/main/java/at/gv/egovernment')
-rw-r--r-- | spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java index 37a5c09eb..fab8a6dd7 100644 --- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java +++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java @@ -65,6 +65,7 @@ import at.gv.egovernment.moa.util.MOAEntityResolver; import at.gv.egovernment.moa.util.MOAErrorHandler; import at.gv.egovernment.moa.util.StreamEntityResolver; import at.gv.egovernment.moa.util.StreamUtils; +import at.gv.egovernment.moa.util.XPathUtils; /** * A class to create <code>DataObject</code>s contained in different @@ -194,10 +195,12 @@ public class DataObjectFactory { Element element = checkForSingleElement(((ContentXML) content).getXMLContent()); contentBytes = DOMUtils.serializeNode(element, "UTF-8"); + break; } - default : + default : { contentBytes = null; // this will not happen + } } } catch (MOAApplicationException e) { throw e; @@ -205,8 +208,23 @@ public class DataObjectFactory { throw new MOAApplicationException("2219", null); } + // For logging in Debug-Mode: Mask baseid with xxx + String logString = new String(contentBytes); + String startS = "<pr:Identification><pr:Value>"; + String endS = "</pr:Value><pr:Type>urn:publicid:gv.at:baseid</pr:Type>"; + String logWithMaskedBaseid; + int start = logString.indexOf(startS); + if (start > -1) { + int end = logString.indexOf(endS); + logWithMaskedBaseid = logString.substring(0, start); + logWithMaskedBaseid += startS; + logWithMaskedBaseid += "xxxxxxxxxxxxxxxxxxxxxxxx"; + logWithMaskedBaseid += logString.substring(end, logString.length()); + } + else + logWithMaskedBaseid = logString; // try to parse validating - Logger.trace(">>> parsing the following content: \n" + new String(contentBytes)); + Logger.trace(">>> parsing the following content: \n" + logWithMaskedBaseid); try { ByteArrayInputStream is = new ByteArrayInputStream(contentBytes); Document doc = |