You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by aj...@apache.org on 2004/12/21 11:31:52 UTC
svn commit: r122959 - in webservices/axis/trunk/java/dev/scratch/prototype2/src: java/org/apache/axis/impl/llom/builder java/org/apache/axis/impl/llom/factory java/org/apache/axis/impl/llom/serialize java/org/apache/axis/impl/llom/util java/org/apache/axis/om test/org/apache/axis/om/builder test/org/apache/axis/om/builder/dummy
Author: ajith
Date: Tue Dec 21 02:31:50 2004
New Revision: 122959
URL: http://svn.apache.org/viewcvs?view=rev&rev=122959
Log:
Three new classes were added to fill in the ObjectOm builder and the serialiser. These are working but yet to be improved.
Added:
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/SimpleObjectOMSerializer.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java
Modified:
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java?view=diff&rev=122959&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java&r1=122958&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java&r2=122959
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/builder/ObjectToOMBuilder.java Tue Dec 21 02:31:50 2004
@@ -26,10 +26,13 @@
* <p/>`
*/
public class ObjectToOMBuilder implements OMXMLParserWrapper, ContentHandler {
+
private OutObject outObject;
private OMElement startElement;
private OMFactory omFactory;
private boolean buildStarted = false;
+ private boolean cache=true;
+ private ContentHandler externalContentHandler = null;
// ============= For content handler ============
private OMNode lastNode = null;
@@ -41,12 +44,25 @@
// ==============================================
+ /**
+ * This external content handler is used to switch between the actual stream and the
+ * object bulding content handler
+ */
+
+ public ContentHandler getExternalContentHandler() {
+ return externalContentHandler;
+ }
+
+ public void setExternalContentHandler(ContentHandler externalContentHandler) {
+ this.externalContentHandler = externalContentHandler;
+ }
/**
* @param startElement - this refers to the element the object should come under.
* Most of the time this will be a OMBodyBlock element
* @param outObject
*/
+
public ObjectToOMBuilder(OMElement startElement, OutObject outObject) {
startElement.setComplete(false);
this.outObject = outObject;
@@ -64,6 +80,13 @@
synchronized (this) {
if (!buildStarted) {
buildStarted = true;
+ //if not to be cached then switch the contenthandler
+ if (!cache){
+ if (externalContentHandler==null){
+ throw new IllegalStateException("Cannot have a cache with an empty content handler");
+ }
+ outObject.setContentHandler(externalContentHandler);
+ }
outObject.startBuilding();
this.startElement.setComplete(true);
}
@@ -89,7 +112,10 @@
* @throws OMException
*/
public void setCache(boolean b) throws OMException {
- throw new UnsupportedOperationException(); //TODO implement this
+ if (!cache && b){
+ throw new UnsupportedOperationException("cache cannot be reset once set");
+ }
+ cache=b;
}
public Object getParser() {
@@ -104,7 +130,7 @@
throw new UnsupportedOperationException(); //TODO implement this
}
-
+
// ==================== ContentHandler Implementations ========================
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java?view=diff&rev=122959&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java&r1=122958&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java&r2=122959
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/factory/OMLinkedListImplFactory.java Tue Dec 21 02:31:50 2004
@@ -1,7 +1,13 @@
package org.apache.axis.impl.llom.factory;
import org.apache.axis.impl.llom.*;
+import org.apache.axis.impl.llom.util.StreamWriterToContentHandlerConverter;
+import org.apache.axis.impl.llom.builder.ObjectToOMBuilder;
import org.apache.axis.om.*;
+import org.xml.sax.ContentHandler;
+
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLOutputFactory;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -20,6 +26,8 @@
* <p/>
*/
public class OMLinkedListImplFactory extends OMFactory {
+
+
public OMAttribute createOMAttribute(String localName, OMNamespace ns, String value) {
return new OMAttributeImpl(localName, ns, value);
}
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/SimpleObjectOMSerializer.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/SimpleObjectOMSerializer.java?view=auto&rev=122959
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/serialize/SimpleObjectOMSerializer.java Tue Dec 21 02:31:50 2004
@@ -0,0 +1,184 @@
+package org.apache.axis.impl.llom.serialize;
+
+import org.apache.axis.om.*;
+import org.apache.axis.impl.llom.OMNodeImpl;
+import org.apache.axis.impl.llom.OMElementImpl;
+import org.apache.axis.impl.llom.util.StreamWriterToContentHandlerConverter;
+import org.apache.axis.impl.llom.builder.ObjectToOMBuilder;
+import org.xml.sax.ContentHandler;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.Iterator;
+import java.util.Stack;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * todo - A pretty specific builder. To be improved!
+ */
+public class SimpleObjectOMSerializer {
+
+ private Stack prefixStack = new Stack();
+ private ObjectToOMBuilder builder;
+
+ public void serialize(Object omNode, XMLStreamWriter writer,boolean cache) throws XMLStreamException {
+
+ if (!(omNode instanceof OMElementImpl)) {
+ throw new UnsupportedOperationException("Unsupported input object. Must be of the the type OMElementImpl!!");
+ }
+
+ OMElementImpl node = (OMElementImpl) omNode;
+
+ if (!(node.getBuilder() instanceof ObjectToOMBuilder)){
+ throw new UnsupportedOperationException("Unsupported builder for this serializer");
+ }
+
+ this.builder = (ObjectToOMBuilder)node.getBuilder();
+ ContentHandler externalhandler = new StreamWriterToContentHandlerConverter(writer);
+ this.builder.setExternalContentHandler(externalhandler);
+ this.builder.setCache(cache);
+
+ serializeNode(node, writer);
+ }
+
+ protected void serializeNode(OMNode node, XMLStreamWriter writer) throws XMLStreamException {
+ short nodeType = node.getType();
+ if (nodeType == OMNode.ELEMENT_NODE) {
+ serializeElement((OMElement) node, writer);
+ } else if (nodeType == OMNode.ATTRIBUTE_NODE) {
+ serializeAttribute((OMAttribute) node, writer);
+ } else if (nodeType == OMNode.TEXT_NODE) {
+ serializeText((OMText) node, writer);
+ } else if (nodeType == OMNode.COMMENT_NODE) {
+ serializeComment((OMText) node, writer);
+ } else if (nodeType == OMNode.CDATA_SECTION_NODE) {
+ serializeCData((OMText) node, writer);
+ }
+ writer.flush();
+ }
+
+ /**
+ * @param element
+ */
+ protected void serializeElement(OMElement element, XMLStreamWriter writer) throws XMLStreamException {
+
+ int nsPushCount = 0;
+ OMNamespace ns = element.getNamespace();
+ String prefix = null;
+ String nameSpaceName = null;
+
+ if (ns != null) {
+ prefix = ns.getPrefix();
+ nameSpaceName = ns.getName();
+
+ if (prefix != null) {
+ writer.writeStartElement(prefix, element.getLocalName(), nameSpaceName);
+ if (serializeNamespace(ns, writer))
+ nsPushCount++;
+ } else {
+ writer.writeStartElement(nameSpaceName, element.getLocalName());
+ //add the own namespace
+ // writer.writeDefaultNamespace(nameSpaceName);
+ }
+ }
+
+ //add the elements attributes
+ Iterator attributes = element.getAttributes();
+ while (attributes.hasNext()) {
+ serializeAttribute((OMAttribute) attributes.next(), writer);
+ }
+
+ //add the namespaces
+ Iterator namespaces = element.getAllDeclaredNamespaces();
+ while (namespaces.hasNext()) {
+ if (serializeNamespace((OMNamespace) namespaces.next(), writer))
+ nsPushCount++;
+ }
+
+ //add the children
+ Iterator children = element.getChildren();
+ while (children.hasNext()) {
+ Object node = children.next();
+ if (node != null) {
+ serializeNode((OMNode) node, writer);
+ }
+ }
+
+ writer.writeEndElement();
+ //remove the namespace prefixes from the stack
+ for (int i=0;i<nsPushCount;i++){
+ prefixStack.pop();
+ }
+ }
+
+ /**
+ */
+ protected void serializeText(OMText text, XMLStreamWriter writer) throws XMLStreamException {
+ writer.writeCharacters(text.getValue());
+ }
+
+ protected void serializeCData(OMText text, XMLStreamWriter writer) throws XMLStreamException {
+ writer.writeCData(text.getValue());
+ }
+
+
+ protected void serializeComment(OMText text, XMLStreamWriter writer) throws XMLStreamException {
+ writer.writeComment(text.getValue());
+ }
+
+ /**
+ * @param attr
+ * @param writer
+ * @throws javax.xml.stream.XMLStreamException
+ */
+
+
+ protected void serializeAttribute(OMAttribute attr, XMLStreamWriter writer) throws XMLStreamException {
+
+ //first check whether the attribute is associated with a namespace
+ OMNamespace ns = attr.getNamespace();
+ String prefix = null;
+ String namespaceName = null;
+ if (ns != null) {
+ //add the prefix if it's availble
+ prefix = ns.getPrefix();
+ namespaceName = ns.getName();
+
+ if (prefix != null)
+ writer.writeAttribute(prefix, namespaceName, attr.getLocalName(), attr.getValue());
+ else
+ writer.writeAttribute(namespaceName, attr.getLocalName(), attr.getValue());
+ } else {
+ writer.writeAttribute(attr.getLocalName(), attr.getValue());
+ }
+
+ }
+
+ protected boolean serializeNamespace(OMNamespace namespace, XMLStreamWriter writer) throws XMLStreamException {
+ boolean nsWritten = false;
+ if (namespace != null) {
+ String prefix = namespace.getPrefix();
+ if (!prefixStack.contains(prefix)) {
+ writer.writeNamespace(prefix, namespace.getName());
+ prefixStack.push(prefix);
+ nsWritten = true;
+ }
+ }
+
+ return nsWritten;
+ }
+
+}
Added: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java?view=auto&rev=122959
==============================================================================
--- (empty file)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/impl/llom/util/StreamWriterToContentHandlerConverter.java Tue Dec 21 02:31:50 2004
@@ -0,0 +1,140 @@
+package org.apache.axis.impl.llom.util;
+
+import org.xml.sax.ContentHandler;
+import org.xml.sax.SAXException;
+import org.xml.sax.Locator;
+import org.xml.sax.Attributes;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLStreamException;
+
+/**
+ * Copyright 2001-2004 The Apache Software Foundation.
+ * <p/>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+public class StreamWriterToContentHandlerConverter implements ContentHandler {
+ private XMLStreamWriter writer;
+
+ public StreamWriterToContentHandlerConverter(XMLStreamWriter writer) {
+ this.writer = writer;
+ }
+
+ public void endDocument() throws SAXException {
+ //do nothing
+ }
+
+ public void startDocument() throws SAXException {
+ //
+ }
+
+ public void characters(char ch[], int start, int length) throws SAXException {
+ try {
+ writer.writeCharacters(ch, start, length);
+ writer.flush();
+ } catch (XMLStreamException e) {
+ throw new SAXException(e);
+ }
+ }
+
+ public void ignorableWhitespace(char ch[], int start, int length) throws SAXException {
+ //throw new UnsupportedOperationException();
+ }
+
+ public void endPrefixMapping(String prefix) throws SAXException {
+ //throw new UnsupportedOperationException();
+ }
+
+ public void skippedEntity(String name) throws SAXException {
+ //throw new UnsupportedOperationException();
+ }
+
+ public void setDocumentLocator(Locator locator) {
+ //throw new UnsupportedOperationException();
+ }
+
+ public void processingInstruction(String target, String data) throws SAXException {
+ // throw new UnsupportedOperationException();
+ }
+
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ //throw new UnsupportedOperationException();
+ }
+
+ public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
+ try {
+ writer.writeEndElement();
+ writer.flush();
+ } catch (XMLStreamException e) {
+ throw new SAXException(e);
+ }
+ }
+
+ private simpleQnameKeeper breakUpSaxQname(String qName){
+ simpleQnameKeeper qNk=new simpleQnameKeeper();
+ if (qName!=null){
+ String[] text = qName.split(":");
+ if (text.length>1){
+ qNk.setPrefix(text[0]);
+ qNk.setLocalName(text[1]);
+ }else{
+ qNk.setLocalName(text[0]);
+ }
+ }
+ return qNk;
+ }
+ public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
+ try {
+ simpleQnameKeeper qname = breakUpSaxQname(qName);
+
+ if (qname.getPrefix()==null)
+ writer.writeStartElement(namespaceURI,qname.getLocalName());
+ else
+ writer.writeStartElement(qname.getPrefix(), qname.getLocalName(),namespaceURI);
+
+ int attCount = atts.getLength();
+ for (int i = 0; i < attCount; i++) {
+ qname = breakUpSaxQname(atts.getQName(i));
+ writer.writeAttribute(atts.getURI(i),
+ qname.getLocalName(),
+ atts.getValue(i));
+ }
+ writer.flush();
+ } catch (XMLStreamException e) {
+ throw new SAXException(e);
+ }
+ }
+
+ private class simpleQnameKeeper{
+ private String prefix=null;
+ private String localName=null;
+
+ public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(String prefix) {
+ this.prefix = prefix;
+ }
+
+ public String getLocalName() {
+ return localName;
+ }
+
+ public void setLocalName(String localName) {
+ this.localName = localName;
+ }
+
+ }
+}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java?view=diff&rev=122959&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java&r1=122958&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java&r2=122959
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/java/org/apache/axis/om/OMFactory.java Tue Dec 21 02:31:50 2004
@@ -28,6 +28,14 @@
*/
public abstract OMAttribute createOMAttribute(String localName, OMNamespace ns, String value);
+// /**
+// * @param parent
+// * @param object
+// * This is used to construct the elements from an Object
+// * @return the parent itself
+// */
+// public abstract OMElement createOMElement(OMElement parent,Object object);
+
/**
* @param parent
* @return
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java?view=diff&rev=122959&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java&r1=122958&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java&r2=122959
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/ObjectToOMBuilderTest.java Tue Dec 21 02:31:50 2004
@@ -5,11 +5,14 @@
import junit.framework.TestCase;
import org.apache.axis.impl.llom.builder.ObjectToOMBuilder;
-import org.apache.axis.om.OMElement;
-import org.apache.axis.om.OMFactory;
-import org.apache.axis.om.OMNode;
-import org.apache.axis.om.OutObject;
+import org.apache.axis.impl.llom.util.StreamWriterToContentHandlerConverter;
+import org.apache.axis.impl.llom.serialize.SimpleObjectOMSerializer;
+import org.apache.axis.om.*;
import org.apache.axis.om.builder.dummy.DummyOutObject;
+import org.xml.sax.ContentHandler;
+
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.stream.XMLOutputFactory;
/**
* Copyright 2001-2004 The Apache Software Foundation.
@@ -30,28 +33,29 @@
* Date: Nov 19, 2004
* Time: 3:54:03 PM
*/
-public class ObjectToOMBuilderTest extends TestCase{
+public class ObjectToOMBuilderTest extends TestCase {
- OutObject outObject;
- ObjectToOMBuilder objectToOMBuilder;
- OMFactory omFactory;
+ private OutObject outObject;
+ private ObjectToOMBuilder objectToOMBuilder;
+ private OMFactory omFactory;
private OMElement element;
+ private SimpleObjectOMSerializer serializer;
protected void setUp() throws Exception {
super.setUp();
outObject = new DummyOutObject();
omFactory = OMFactory.newInstance();
- element = omFactory.createOMElement("Body", null);
- objectToOMBuilder = new ObjectToOMBuilder(element, outObject);
+ OMNamespace ns = omFactory.createOMNamespace(OMConstants.SOAP_ENVELOPE_NAMESPACE_URI, OMConstants.SOAPENVELOPE_NAMESPACE_PREFIX);
+ element = omFactory.createOMElement("Body", ns);
+ objectToOMBuilder = new ObjectToOMBuilder(element, outObject);
+ omFactory.createOMElement(null, null, element, objectToOMBuilder);
+ serializer = new SimpleObjectOMSerializer();
}
- public void testBuilding(){
-
-
+ public void testBuilding() {
objectToOMBuilder.next();
-
Iterator children = element.getChildren();
while (children.hasNext()) {
OMNode omNode = (OMNode) children.next();
@@ -61,5 +65,14 @@
}
+ public void testSerialization() throws Exception {
+ XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
+ serializer.serialize(element, writer, true);
+ }
+
+ public void testSerializationWithCacheOff() throws Exception {
+ XMLStreamWriter writer = XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
+ serializer.serialize(element, writer, false);
+ }
}
Modified: webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java
Url: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java?view=diff&rev=122959&p1=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java&r1=122958&p2=webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java&r2=122959
==============================================================================
--- webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java (original)
+++ webservices/axis/trunk/java/dev/scratch/prototype2/src/test/org/apache/axis/om/builder/dummy/DummyOutObject.java Tue Dec 21 02:31:50 2004
@@ -41,7 +41,10 @@
private void setup() {
try {
- parser = SAXParserFactory.newInstance().newSAXParser().getXMLReader();
+ SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+ saxParserFactory.setNamespaceAware(true);
+ parser = saxParserFactory.newSAXParser().getXMLReader();
+
} catch (Exception e) {
e.printStackTrace(); //TODO implement this
}