[ https://issues.apache.org/activemq/browse/SM-722?page=all ]

Guillaume Nodet resolved SM-722.
--------------------------------

    Fix Version/s: 3.1
       Resolution: Fixed
         Assignee: Guillaume Nodet

Author: gnodet
Date: Fri Oct 27 05:08:57 2006
New Revision: 468355

URL: http://svn.apache.org/viewvc?view=rev&rev=468355
Log:
SM-722: White spaces stripped during xml processing

Modified:
   
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
   
incubator/servicemix/trunk/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/StaxSourceTest.java


Author: gnodet
Date: Fri Oct 27 05:13:33 2006
New Revision: 468356

URL: http://svn.apache.org/viewvc?view=rev&rev=468356
Log:
SM-722: White spaces stripped during xml processing

Modified:
   
incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/main/java/org/apache/servicemix/jbi/jaxp/StaxSource.java
   
incubator/servicemix/branches/servicemix-3.0/servicemix-core/src/test/java/org/apache/servicemix/jbi/jaxp/StaxSourceTest.java


> ExtendedXMLStreamReader strips whitespaces, which breaks servicemix-http when 
> a SOAP invocation contains whitespace nodes
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SM-722
>                 URL: https://issues.apache.org/activemq/browse/SM-722
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-core
>    Affects Versions: 3.0
>            Reporter: Renaud Bruyeron
>         Assigned To: Guillaume Nodet
>             Fix For: 3.0.1, 3.1
>
>
> The problem is in the code below in ExtendedXMLStreamReader, which is used by 
> SoapMarshaler to extract the SOAP message from a http invocation, and put it 
> in a NormalizedMessage.
> I have a SOAP message that has things like this: <text>  </text>. The 
> whitespace is significant, and should not be trimmed, yet the message comes 
> out as <text/>.
> Is there a reason for explicitely doing this?
>     public int nextTag() throws XMLStreamException {
>       int eventType = next();
>        while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) 
> // skip whitespace
>                || (eventType == XMLStreamConstants.CDATA && isWhiteSpace()) 
>                // skip whitespace
>                || eventType == XMLStreamConstants.SPACE
>                || eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
>                || eventType == XMLStreamConstants.COMMENT
>                ) {
>                eventType = next();
>        }
>        if (eventType != XMLStreamConstants.START_ELEMENT && eventType != 
> XMLStreamConstants.END_ELEMENT) {
>               throw new XMLStreamException("expected start or end tag", 
> getLocation());
>        }
>        return eventType;
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to