gdaniels 2003/02/12 11:00:22
Modified: java/test/encoding TestDerivatedBeanSerializer.java
Log:
For some reason using the DOMParser API directly was causing weird
problems. Replacing with our XMLUtils class works like a charm.
Revision Changes Path
1.2 +2 -4 xml-axis/java/test/encoding/TestDerivatedBeanSerializer.java
Index: TestDerivatedBeanSerializer.java
===================================================================
RCS file: /home/cvs/xml-axis/java/test/encoding/TestDerivatedBeanSerializer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- TestDerivatedBeanSerializer.java 8 Jan 2003 16:06:29 -0000 1.1
+++ TestDerivatedBeanSerializer.java 12 Feb 2003 19:00:22 -0000 1.2
@@ -64,6 +64,7 @@
import org.apache.axis.Constants;
import org.apache.axis.MessageContext;
+import org.apache.axis.utils.XMLUtils;
import org.apache.axis.encoding.SerializationContext;
import org.apache.axis.encoding.SerializationContextImpl;
import org.apache.axis.encoding.TypeMapping;
@@ -72,7 +73,6 @@
import org.apache.axis.encoding.ser.BeanSerializer;
import org.apache.axis.encoding.ser.BeanSerializerFactory;
import org.apache.axis.server.AxisServer;
-import org.apache.xerces.parsers.DOMParser;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
@@ -177,9 +177,7 @@
// Check the result
String msgString = stringWriter.toString();
StringReader reader = new StringReader(msgString);
- DOMParser parser = new DOMParser();
- parser.parse(new InputSource(reader));
- Document doc = parser.getDocument();
+ Document doc = XMLUtils.newDocument(new InputSource(reader));
NodeList nodes = doc.getFirstChild().getChildNodes();
assertEquals("1st Attribute", "zero", nodes.item(0).getLocalName());