Author: gnodet
Date: Mon Feb 5 07:46:44 2007
New Revision: 503730
URL: http://svn.apache.org/viewvc?view=rev&rev=503730
Log:
SM-832: Ws-Security signature does not work for outbound
Modified:
incubator/servicemix/trunk/common/servicemix-soap/src/main/java/org/apache/servicemix/soap/marshalers/SoapWriter.java
Modified:
incubator/servicemix/trunk/common/servicemix-soap/src/main/java/org/apache/servicemix/soap/marshalers/SoapWriter.java
URL:
http://svn.apache.org/viewvc/incubator/servicemix/trunk/common/servicemix-soap/src/main/java/org/apache/servicemix/soap/marshalers/SoapWriter.java?view=diff&rev=503730&r1=503729&r2=503730
==============================================================================
---
incubator/servicemix/trunk/common/servicemix-soap/src/main/java/org/apache/servicemix/soap/marshalers/SoapWriter.java
(original)
+++
incubator/servicemix/trunk/common/servicemix-soap/src/main/java/org/apache/servicemix/soap/marshalers/SoapWriter.java
Mon Feb 5 07:46:44 2007
@@ -39,6 +39,8 @@
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
import org.apache.servicemix.jbi.jaxp.W3CDOMStreamReader;
import org.apache.servicemix.jbi.jaxp.XMLStreamHelper;
@@ -93,6 +95,10 @@
}
private void writeSimpleMessage(OutputStream out) throws Exception {
+ if (message.getDocument() != null) {
+ marshaler.sourceTransformer.toResult(new
DOMSource(message.getDocument()), new StreamResult(out));
+ return;
+ }
XMLStreamWriter writer =
marshaler.getOutputFactory().createXMLStreamWriter(out);
writer.writeStartDocument();
if (marshaler.isSoap()) {