aboutsummaryrefslogtreecommitdiff
path: root/spss/server/serverlib/src
diff options
context:
space:
mode:
Diffstat (limited to 'spss/server/serverlib/src')
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java22
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 =