From 5166270383bd11faeaa484ab878844f9b9445527 Mon Sep 17 00:00:00 2001 From: kstranacher Date: Tue, 11 Aug 2009 08:11:40 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1127 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/spss/server/invoke/DataObjectFactory.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'spss/server/serverlib/src') 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 DataObjects 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 = ""; + String endS = "urn:publicid:gv.at:baseid"; + 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 = -- cgit v1.2.3