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 <[email protected]>
Authored: Wed Nov 26 10:51:25 2014 -0500
Committer: Daniel Kulp <[email protected]>
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);
         }

Reply via email to