cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r661766 - in /cxf/branches/2.0.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java
Date Fri, 30 May 2008 15:44:03 GMT
Author: dkulp
Date: Fri May 30 08:44:03 2008
New Revision: 661766

URL: http://svn.apache.org/viewvc?rev=661766&view=rev
Log:
Merged revisions 661418 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r661418 | dkulp | 2008-05-29 13:44:36 -0400 (Thu, 29 May 2008) | 2 lines
  
  [CXF-1595] Skip over whitespace in logical message
........

Modified:
    cxf/branches/2.0.x-fixes/   (props changed)
    cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java

Propchange: cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=661766&r1=661765&r2=661766&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
(original)
+++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
Fri May 30 08:44:03 2008
@@ -182,6 +182,20 @@
             throw new RuntimeException("Couldn't parse stream.", e);
         }
     }
+    public static boolean toNextTag(XMLStreamReader reader) {
+        try {
+            // advance to first tag.
+            int x = reader.getEventType();
+            while (x != XMLStreamReader.START_ELEMENT
+                && x != XMLStreamReader.END_ELEMENT
+                && reader.hasNext()) {
+                x = reader.next();
+            }
+        } catch (XMLStreamException e) {
+            throw new RuntimeException("Couldn't parse stream.", e);
+        }
+        return true;
+    }
 
     public static boolean toNextTag(DepthXMLStreamReader reader, QName endTag) {
         try {

Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java?rev=661766&r1=661765&r2=661766&view=diff
==============================================================================
--- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java
(original)
+++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalMessageImpl.java
Fri May 30 08:44:03 2008
@@ -98,6 +98,8 @@
                     try {
                         W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
                         reader = message.getContent(XMLStreamReader.class);
+                        //content must be an element thing, skip over any whitespace
+                        StaxUtils.toNextTag(reader);
                         StaxUtils.copy(reader, writer);
                         source = new DOMSource(writer.getDocument().getDocumentElement());
                         reader = StaxUtils.createXMLStreamReader(writer.getDocument());



Mime
View raw message