Author: thomas.diesler(a)jboss.com
Date: 2008-03-18 10:32:23 -0400 (Tue, 18 Mar 2008)
New Revision: 6001
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentParser.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentSerializer.java
Removed:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentParser.java
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentSerializer.java
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageMarshaller.java
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/json/JsonAPITestCase.java
Log:
[JBWS-1165] Add initial JSON support
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageMarshaller.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageMarshaller.java 2008-03-18
14:31:26 UTC (rev 6000)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageMarshaller.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -34,7 +34,7 @@
import org.jboss.remoting.marshal.Marshaller;
import org.jboss.ws.core.soap.SOAPBodyImpl;
import org.jboss.ws.core.soap.SOAPMessageImpl;
-import org.jboss.ws.extensions.json.DOMDocumentSerializer;
+import org.jboss.ws.extensions.json.BadgerFishDOMDocumentSerializer;
/**
* @author Thomas.Diesler(a)jboss.org
@@ -71,7 +71,7 @@
SOAPMessage soapMessage = (SOAPMessage)dataObject;
SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
SOAPBodyElement payload = soapBody.getBodyElement();
- new DOMDocumentSerializer(output).serialize(payload);
+ new BadgerFishDOMDocumentSerializer(output).serialize(payload);
}
catch (SOAPException ex)
{
Modified:
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java 2008-03-18
14:31:26 UTC (rev 6000)
+++
stack/native/trunk/src/main/java/org/jboss/ws/core/jaxws/binding/JsonMessageUnMarshaller.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -36,7 +36,7 @@
import org.jboss.logging.Logger;
import org.jboss.remoting.marshal.UnMarshaller;
import org.jboss.ws.core.soap.MessageFactoryImpl;
-import org.jboss.ws.extensions.json.DOMDocumentParser;
+import org.jboss.ws.extensions.json.BadgerFishDOMDocumentParser;
import org.w3c.dom.Document;
/**
@@ -60,7 +60,7 @@
{
MessageFactoryImpl factory = new MessageFactoryImpl();
SOAPMessage soapMsg = factory.createMessage();
- Document doc = new DOMDocumentParser().parse(inputStream);
+ Document doc = new BadgerFishDOMDocumentParser().parse(inputStream);
soapMsg.getSOAPBody().addDocument(doc);
return soapMsg;
}
Added:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentParser.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentParser.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentParser.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.json;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.codehaus.jettison.badgerfish.BadgerFishXMLInputFactory;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
+
+/**
+ * An JSON BadgerFish DOM parser
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 12-Mar-2008
+ */
+public class BadgerFishDOMDocumentParser
+{
+ public Document parse(InputStream input) throws IOException
+ {
+ try
+ {
+ BadgerFishXMLInputFactory inputFactory = new BadgerFishXMLInputFactory();
+ XMLStreamReader streamReader = inputFactory.createXMLStreamReader(input);
+ XMLInputFactory readerFactory = XMLInputFactory.newInstance();
+ XMLEventReader eventReader = readerFactory.createXMLEventReader(streamReader);
+
+ // Can not create a STaX writer for a DOMResult in woodstox-3.1.1
+ // DOMResult result = new DOMResult();
+ // XMLEventWriter eventWriter = outputFactory.createXMLEventWriter(result);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
+ XMLEventWriter eventWriter = outputFactory.createXMLEventWriter(baos);
+ eventWriter.add(eventReader);
+ eventWriter.close();
+
+ // This parsing step should not be necessary, if we could output to a DOMResult
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ return getDocumentBuilder().parse(bais);
+ }
+ catch (XMLStreamException ex)
+ {
+ IOException ioex = new IOException("Cannot parse input stream");
+ ioex.initCause(ex);
+ throw ioex;
+ }
+ catch (SAXException ex)
+ {
+ IOException ioex = new IOException("Cannot import in target
document");
+ ioex.initCause(ex);
+ throw ioex;
+ }
+ }
+
+ private DocumentBuilder getDocumentBuilder()
+ {
+ try
+ {
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ return builder;
+ }
+ catch (ParserConfigurationException e)
+ {
+ throw new RuntimeException("Failed to create DocumentBuilder", e);
+ }
+ }
+}
\ No newline at end of file
Property changes on:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentParser.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentSerializer.java
(from rev 5988,
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentSerializer.java)
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentSerializer.java
(rev 0)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/BadgerFishDOMDocumentSerializer.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.ws.extensions.json;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.xml.stream.XMLEventReader;
+import javax.xml.stream.XMLEventWriter;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.dom.DOMSource;
+
+import org.codehaus.jettison.badgerfish.BadgerFishXMLOutputFactory;
+import org.w3c.dom.Element;
+
+/**
+ * An JSON BadgerFish DOM serializer
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 12-Mar-2008
+ */
+public class BadgerFishDOMDocumentSerializer
+{
+ private OutputStream output;
+
+ public BadgerFishDOMDocumentSerializer(OutputStream output)
+ {
+ this.output = output;
+ }
+
+ public void serialize(Element el) throws IOException
+ {
+ if (output == null)
+ throw new IllegalStateException("OutputStream cannot be null");
+
+ try
+ {
+ DOMSource source = new DOMSource(el);
+ XMLInputFactory readerFactory = XMLInputFactory.newInstance();
+ XMLStreamReader streamReader = readerFactory.createXMLStreamReader(source);
+ XMLEventReader eventReader = readerFactory.createXMLEventReader(streamReader);
+
+ BadgerFishXMLOutputFactory writerFactory = new BadgerFishXMLOutputFactory();
+ XMLStreamWriter streamWriter = writerFactory.createXMLStreamWriter(output);
+ // Not implemented in jettison-1.0-RC2
+ // XMLEventWriter eventWriter = writerFactory.createXMLEventWriter(output);
+ XMLEventWriter eventWriter = new BadgerFishXMLEventWriter(streamWriter);
+ eventWriter.add(eventReader);
+ eventWriter.close();
+ }
+ catch (XMLStreamException ex)
+ {
+ IOException ioex = new IOException("Cannot serialize: " + el);
+ ioex.initCause(ex);
+ throw ioex;
+ }
+ }
+}
\ No newline at end of file
Deleted:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentParser.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentParser.java 2008-03-18
14:31:26 UTC (rev 6000)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentParser.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.extensions.json;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import org.codehaus.jettison.badgerfish.BadgerFishXMLInputFactory;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-/**
- * An JSON BadgerFish DOM parser
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 12-Mar-2008
- */
-public class DOMDocumentParser
-{
- public Document parse(InputStream input) throws IOException
- {
- try
- {
- BadgerFishXMLInputFactory inputFactory = new BadgerFishXMLInputFactory();
- XMLStreamReader streamReader = inputFactory.createXMLStreamReader(input);
- XMLInputFactory readerFactory = XMLInputFactory.newInstance();
- XMLEventReader eventReader = readerFactory.createXMLEventReader(streamReader);
-
- // Can not create a STaX writer for a DOMResult in woodstox-3.1.1
- // DOMResult result = new DOMResult();
- // XMLEventWriter eventWriter = outputFactory.createXMLEventWriter(result);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
- XMLEventWriter eventWriter = outputFactory.createXMLEventWriter(baos);
- eventWriter.add(eventReader);
- eventWriter.close();
-
- // This parsing step should not be necessary, if we could output to a DOMResult
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- return getDocumentBuilder().parse(bais);
- }
- catch (XMLStreamException ex)
- {
- IOException ioex = new IOException("Cannot parse input stream");
- ioex.initCause(ex);
- throw ioex;
- }
- catch (SAXException ex)
- {
- IOException ioex = new IOException("Cannot import in target
document");
- ioex.initCause(ex);
- throw ioex;
- }
- }
-
- private DocumentBuilder getDocumentBuilder()
- {
- try
- {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
- factory.setValidating(false);
- factory.setNamespaceAware(true);
- DocumentBuilder builder = factory.newDocumentBuilder();
- return builder;
- }
- catch (ParserConfigurationException e)
- {
- throw new RuntimeException("Failed to create DocumentBuilder", e);
- }
- }
-}
\ No newline at end of file
Deleted:
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentSerializer.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentSerializer.java 2008-03-18
14:31:26 UTC (rev 6000)
+++
stack/native/trunk/src/main/java/org/jboss/ws/extensions/json/DOMDocumentSerializer.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.extensions.json;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-import javax.xml.stream.XMLEventReader;
-import javax.xml.stream.XMLEventWriter;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.dom.DOMSource;
-
-import org.codehaus.jettison.badgerfish.BadgerFishXMLOutputFactory;
-import org.w3c.dom.Element;
-
-/**
- * An JSON BadgerFish DOM serializer
- *
- * @author Thomas.Diesler(a)jboss.com
- * @since 12-Mar-2008
- */
-public class DOMDocumentSerializer
-{
- private OutputStream output;
-
- public DOMDocumentSerializer(OutputStream output)
- {
- this.output = output;
- }
-
- public void serialize(Element el) throws IOException
- {
- if (output == null)
- throw new IllegalStateException("OutputStream cannot be null");
-
- try
- {
- DOMSource source = new DOMSource(el);
- XMLInputFactory readerFactory = XMLInputFactory.newInstance();
- XMLStreamReader streamReader = readerFactory.createXMLStreamReader(source);
- XMLEventReader eventReader = readerFactory.createXMLEventReader(streamReader);
-
- BadgerFishXMLOutputFactory writerFactory = new BadgerFishXMLOutputFactory();
- XMLStreamWriter streamWriter = writerFactory.createXMLStreamWriter(output);
- // Not implemented in jettison-1.0-RC2
- // XMLEventWriter eventWriter = writerFactory.createXMLEventWriter(output);
- XMLEventWriter eventWriter = new BadgerFishXMLEventWriter(streamWriter);
- eventWriter.add(eventReader);
- eventWriter.close();
- }
- catch (XMLStreamException ex)
- {
- IOException ioex = new IOException("Cannot serialize: " + el);
- ioex.initCause(ex);
- throw ioex;
- }
- }
-}
\ No newline at end of file
Modified:
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java
===================================================================
---
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2008-03-18
14:31:26 UTC (rev 6000)
+++
stack/native/trunk/src/main/java/org/jboss/wsf/stack/jbws/RequestHandlerImpl.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -80,7 +80,8 @@
import org.jboss.ws.core.soap.SOAPMessageImpl;
import org.jboss.ws.core.utils.ThreadLocalAssociation;
import org.jboss.ws.extensions.addressing.AddressingConstantsImpl;
-import org.jboss.ws.extensions.json.DOMDocumentParser;
+import org.jboss.ws.extensions.json.BadgerFishDOMDocumentParser;
+import org.jboss.ws.extensions.json.BadgerFishDOMDocumentSerializer;
import org.jboss.ws.extensions.wsrm.RMConstant;
import org.jboss.ws.extensions.xop.XOPContext;
import org.jboss.ws.feature.FastInfosetFeature;
@@ -102,6 +103,8 @@
import org.jboss.wsf.common.IOUtils;
import org.w3c.dom.Document;
+import com.sun.xml.fastinfoset.dom.DOMDocumentSerializer;
+
/**
* A request handler
*
@@ -369,7 +372,7 @@
throw new IllegalStateException("Attachments not supported with
FastInfoset");
SOAPEnvelope soapEnv = soapMessage.getSOAPPart().getEnvelope();
- com.sun.xml.fastinfoset.dom.DOMDocumentSerializer serializer = new
com.sun.xml.fastinfoset.dom.DOMDocumentSerializer();
+ DOMDocumentSerializer serializer = new DOMDocumentSerializer();
serializer.setOutputStream(output);
serializer.serialize(soapEnv);
}
@@ -381,8 +384,8 @@
throw new IllegalStateException("Attachments not supported with
JSON");
SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
- SOAPBodyElement payload = soapBody.getBodyElement();
- new
org.jboss.ws.extensions.json.DOMDocumentSerializer(output).serialize(payload);
+ BadgerFishDOMDocumentSerializer serializer = new
BadgerFishDOMDocumentSerializer(output);
+ serializer.serialize(soapBody.getBodyElement());
}
else
{
@@ -431,7 +434,7 @@
{
MessageFactoryImpl factory = new MessageFactoryImpl();
SOAPMessageImpl soapMsg = (SOAPMessageImpl)factory.createMessage();
- Document doc = new DOMDocumentParser().parse(inputStream);
+ Document doc = new BadgerFishDOMDocumentParser().parse(inputStream);
soapMsg.getSOAPBody().addDocument(doc);
reqMessage = soapMsg;
}
Modified:
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/json/JsonAPITestCase.java
===================================================================
---
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/json/JsonAPITestCase.java 2008-03-18
14:31:26 UTC (rev 6000)
+++
stack/native/trunk/src/test/java/org/jboss/test/ws/jaxws/json/JsonAPITestCase.java 2008-03-18
14:32:23 UTC (rev 6001)
@@ -24,8 +24,8 @@
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
-import org.jboss.ws.extensions.json.DOMDocumentParser;
-import org.jboss.ws.extensions.json.DOMDocumentSerializer;
+import org.jboss.ws.extensions.json.BadgerFishDOMDocumentParser;
+import org.jboss.ws.extensions.json.BadgerFishDOMDocumentSerializer;
import org.jboss.wsf.common.DOMUtils;
import org.jboss.wsf.common.DOMWriter;
import org.jboss.wsf.test.JBossWSTest;
@@ -98,14 +98,14 @@
private String toJSON(Element srcDOM) throws Exception
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- new DOMDocumentSerializer(baos).serialize(srcDOM);
+ new BadgerFishDOMDocumentSerializer(baos).serialize(srcDOM);
return new String(baos.toByteArray());
}
private String toXML(String jsonStr) throws Exception
{
ByteArrayInputStream bais = new ByteArrayInputStream(jsonStr.getBytes());
- Document resDOM = new DOMDocumentParser().parse(bais);
+ Document resDOM = new BadgerFishDOMDocumentParser().parse(bais);
return DOMWriter.printNode(resDOM, false);
}
}