aboutsummaryrefslogtreecommitdiff
path: root/spss.server/src/at/gv/egovernment/moa/spss
diff options
context:
space:
mode:
Diffstat (limited to 'spss.server/src/at/gv/egovernment/moa/spss')
-rw-r--r--spss.server/src/at/gv/egovernment/moa/spss/server/service/AxisHandler.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/spss.server/src/at/gv/egovernment/moa/spss/server/service/AxisHandler.java b/spss.server/src/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
index 236f7b311..befbd58dd 100644
--- a/spss.server/src/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
+++ b/spss.server/src/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
@@ -20,7 +20,6 @@ import org.apache.axis.utils.Messages;
import org.apache.axis.utils.XMLUtils;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import at.gv.egovernment.moa.logging.LogMsg;
@@ -222,6 +221,23 @@ public class AxisHandler extends BasicHandler {
if (xmlResponse!=null) {
try {
xmlResponseString = DOMUtils.serializeNode(xmlResponse, true);
+ /*
+ Soll die Antwort nur \n enthalten, so gibt es 2 Möglichkeiten:
+ 1.) höhere Xalan Version und
+ xmlResponseString = DOMUtils.serializeNode(xmlResponse, true, "\n");
+ 2.)
+ OutputFormat serializerFormat = new OutputFormat((Document) xmlResponse.getOwnerDocument());
+ serializerFormat.setLineSeparator("\n");
+ serializerFormat.setIndenting(false);
+ serializerFormat.setPreserveSpace(true);
+ serializerFormat.setOmitXMLDeclaration(true);
+ serializerFormat.setEncoding("UTF-8");
+ ByteArrayOutputStream serializedBytes = new ByteArrayOutputStream();
+ XMLSerializer serializer = new XMLSerializer(serializedBytes, serializerFormat);
+ serializer.serialize(xmlResponse);
+ serializedBytes.close();
+ xmlResponseString = serializedBytes.toString("UTF-8");
+ */
soapResponseString = SOAP_PART_PRE + xmlResponseString + SOAP_PART_POST;
//override axis response-message
msgContext.setResponseMessage(new Message(soapResponseString));