Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 71450 invoked from network); 30 May 2008 15:44:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2008 15:44:27 -0000 Received: (qmail 74581 invoked by uid 500); 30 May 2008 15:44:29 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 74531 invoked by uid 500); 30 May 2008 15:44:29 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 74522 invoked by uid 99); 30 May 2008 15:44:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 08:44:29 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 15:43:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 038402388A15; Fri, 30 May 2008 08:44:04 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080530154404.038402388A15@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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());