cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Ehrensberger <aehrensber...@docfinity.com>
Subject Preserve leading whitespace in XML
Date Wed, 10 Nov 2010 20:07:59 GMT
Hi,

Does CXF have an issue with preserving leading whitespace inside XML
responses?  Is there something special I need to be doing?

Basically, I'm searching a file for a specific word and want to return the
line of the file that contains the word EXACTLY AS IS.  However, the leading
whitespaces are being trimmed during the conversion process to stream back
the XML.

For example...search a document for the word Running....my file contains

$Id: RUNNING.txt 354430 2005-12-06 13:44:26Z yoavs $
            ===================================================
            Running The Apache Tomcat 6.0 Servlet/JSP Container
            ===================================================
Apache Tomcat 6.0 requires the Java 2 Standard Edition Runtime
Environment (JRE) version 5.0 or later.

In the java code during debug, I find that
"            Running The Apache Tomcat 6.0 Servlet/JSP Container"
is found as my string.  It preserves the leading whitespace through the
DTO's and webservices until I "return" from the webservice.  But, the XML
response contains
<searchHitRange>
               <context>Running The Apache Tomcat 6.0 Servlet/JSP
Container</context>
</searchHitRange>

...with the whitespace gone.  Is there a way to preserve it?  I'm currently
running CXF 2.2.3.

I'd appreciate any help,

Aaron

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message