aboutsummaryrefslogtreecommitdiff
path: root/spss/server/serverlib/src/main/java/at
diff options
context:
space:
mode:
authorpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2008-01-25 12:45:02 +0000
committerpdanner <pdanner@d688527b-c9ab-4aba-bd8d-4036d912da1d>2008-01-25 12:45:02 +0000
commitc940b711f4358d07c5b58cd1f48f7d8d6889e2c7 (patch)
tree04dc63b2077a7d31efa5cce5446b320fec28aef5 /spss/server/serverlib/src/main/java/at
parentd80c2d33d88e0b7bcd88eb7fed0721d1a3235217 (diff)
downloadmoa-id-spss-c940b711f4358d07c5b58cd1f48f7d8d6889e2c7.tar.gz
moa-id-spss-c940b711f4358d07c5b58cd1f48f7d8d6889e2c7.tar.bz2
moa-id-spss-c940b711f4358d07c5b58cd1f48f7d8d6889e2c7.zip
Changed taking out of xml-request from soap message to be more robust again white spaces
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1061 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'spss/server/serverlib/src/main/java/at')
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
index 8e5c8a49b..3a7f13c48 100644
--- a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
@@ -1,7 +1,6 @@
package at.gv.egovernment.moa.spss.server.service;
import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -19,8 +18,6 @@ import org.apache.axis.handlers.BasicHandler;
import org.apache.axis.transport.http.HTTPConstants;
import org.apache.axis.utils.Messages;
import org.apache.axis.utils.XMLUtils;
-import org.apache.xml.serialize.OutputFormat;
-import org.apache.xml.serialize.XMLSerializer;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;
@@ -121,9 +118,10 @@ public class AxisHandler extends BasicHandler {
Element xmlRequest = null;
Element soapPart = DOMUtils.parseDocument(new ByteArrayInputStream(soapMessage.getSOAPPartAsBytes()), false, null, null).getDocumentElement();
if (soapPart!=null) {
+ //TODO: check if DOM Version is intolerant when white spaces are between tags (preceding normalization would be necessary)
NodeList soapBodies = soapPart.getElementsByTagNameNS(SOAP_NS_URI, "Body");
if (soapBodies!=null && soapBodies.getLength()>0) {
- xmlRequest = (Element) soapBodies.item(0).getFirstChild();
+ xmlRequest = DOMUtils.getElementFromNodeList(soapBodies.item(0).getChildNodes());
}
//oder TODO: Evaluierung ob XPATH schneller
/*
@@ -131,7 +129,7 @@ public class AxisHandler extends BasicHandler {
nSMap.put((String)SOAP_PREFIX, SOAP_NS_URI);
Element soapBody = (Element) XPathUtils.selectSingleNode(soapPart, nSMap, "/"+SOAP_PREFIX+":Envelope/"+SOAP_PREFIX+":Body");
if (soapBody!=null) {
- xmlRequest= (Element) soapBody.getFirstChild();
+ xmlRequest = DOMUtils.getElementFromNodeList(soapBody.getChildNodes());
}
*/
}