You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/11/26 17:19:20 UTC
cxf git commit: Write the prolog only if it hasn't already been
written
Repository: cxf
Updated Branches:
refs/heads/master 2d3ac551c -> c772783a0
Write the prolog only if it hasn't already been written
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c772783a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c772783a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c772783a
Branch: refs/heads/master
Commit: c772783a07409902b3153be1981c8b48a8e10e9d
Parents: 2d3ac55
Author: Daniel Kulp <dk...@apache.org>
Authored: Wed Nov 26 10:51:25 2014 -0500
Committer: Daniel Kulp <dk...@apache.org>
Committed: Wed Nov 26 10:51:25 2014 -0500
----------------------------------------------------------------------
.../java/org/apache/cxf/frontend/WSDLGetOutInterceptor.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/c772783a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetOutInterceptor.java b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetOutInterceptor.java
index 196981d..07f835f 100644
--- a/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetOutInterceptor.java
+++ b/rt/frontend/simple/src/main/java/org/apache/cxf/frontend/WSDLGetOutInterceptor.java
@@ -27,6 +27,7 @@ import org.w3c.dom.Document;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.StaxOutInterceptor;
import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageUtils;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.staxutils.StaxUtils;
@@ -52,7 +53,10 @@ public class WSDLGetOutInterceptor extends AbstractPhaseInterceptor<Message> {
}
message.put(Message.CONTENT_TYPE, "text/xml");
try {
- StaxUtils.writeNode(doc, writer, true);
+ StaxUtils.writeDocument(doc, writer, true,
+ !MessageUtils.getContextualBoolean(message,
+ StaxOutInterceptor.FORCE_START_DOCUMENT,
+ false));
} catch (XMLStreamException e) {
throw new Fault(e);
}