Author: jason.greene(a)jboss.com
Date: 2007-03-30 17:02:28 -0400 (Fri, 30 Mar 2007)
New Revision: 2733
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
Log:
Fix multiple writes of Source on SOAPBody.
Fixes Response and Async CTS tests
Modified: trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java
===================================================================
--- trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-03-30
17:33:56 UTC (rev 2732)
+++ trunk/jbossws-core/src/java/org/jboss/ws/core/soap/SOAPBodyImpl.java 2007-03-30
21:02:28 UTC (rev 2733)
@@ -38,6 +38,7 @@
import javax.xml.soap.SOAPFault;
import javax.xml.soap.Text;
import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
import org.jboss.logging.Logger;
@@ -372,12 +373,9 @@
private Element getBodyElementFromSource()
{
Element child = EnvelopeBuilderDOM.getElementFromSource(source);
- if (source instanceof StreamSource)
- {
- // reset the excausted input stream
- String xmlStr = DOMWriter.printNode(child, false);
- source = new StreamSource(new ByteArrayInputStream(xmlStr.getBytes()));
- }
+ // Allow multiple writing
+ source = new DOMSource(child);
+
return child;
}
Show replies by date