From b6414c56a0dbbb2dbc3684e0ee434e0f711ad6ef Mon Sep 17 00:00:00 2001 From: "peter.danner" Date: Wed, 1 Aug 2007 11:11:30 +0000 Subject: Prepared Unix behaviour git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@873 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../moa/spss/server/service/AxisHandler.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'spss.server/src/at') 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)); -- cgit v1.2.3