axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <dava...@gmail.com>
Subject Re: CDATA Events in STAX parser
Date Tue, 30 Aug 2005 12:52:57 GMT
Alek,

unfortunately does not work. I DID TRY latest SVN before opening the
bug report and i actually created the bug report with a patch :(

thanks,
dims

Testsuite: org.apache.axis2.om.SpacesTest
Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 0.412 sec

------------- Standard Output ---------------
SPACE: [
]
START_ELEMENT: foo:foo
CHARACTERS: [
    ]
START_ELEMENT: bar:bar
CHARACTERS: [baz
        ]
START_ELEMENT: cheese:cheese
END_ELEMENT: cheese:cheese
CHARACTERS: [
        baz
        ]
START_ELEMENT: cheese:cheese
END_ELEMENT: cheese:cheese
CHARACTERS: [
        baz
    ]
END_ELEMENT: bar:bar
CHARACTERS: [
    ]
START_ELEMENT: doc:doc
CHARACTERS: [<foo>]
END_ELEMENT: doc:doc
CHARACTERS: [
]
END_ELEMENT: foo:foo
END_DOCUMENT: 
XML = <?xml version='1.0' encoding='UTF-8'?><foo>
    <bar>baz
        <cheese id="3"></cheese>
        baz
        <cheese></cheese>
        baz
    </bar>
    <doc>&lt;foo&gt;</doc>
</foo>
------------- ---------------- ---------------
Testcase: testCData(org.apache.axis2.om.SpacesTest):	FAILED
org.custommonkey.xmlunit.Diff
[different] Expected node type '4' but was '3' - comparing
<![CDATA[<foo>]]> at /foo[1]/doc[1]/text()[1] to <doc ...><foo></doc>
at /foo[1]/doc[1]/text()[1]

junit.framework.AssertionFailedError: org.custommonkey.xmlunit.Diff
[different] Expected node type '4' but was '3' - comparing
<![CDATA[<foo>]]> at /foo[1]/doc[1]/text()[1] to <doc ...><foo></doc>
at /foo[1]/doc[1]/text()[1]

	at org.custommonkey.xmlunit.XMLAssert.assertXMLEqual(XMLAssert.java:111)
	at org.custommonkey.xmlunit.XMLTestCase.assertXMLEqual(XMLTestCase.java:180)
	at org.apache.axis2.om.SpacesTest.checkOMConformance(SpacesTest.java:82)
	at org.apache.axis2.om.SpacesTest.testCData(SpacesTest.java:49)




On 8/30/05, Aleksander Slominski <aslom@cs.indiana.edu> wrote:
> Dims,
> 
> pelase check with lates StAX RI - i have built new JAR and dropped to
> http://dist.codehaus.org/stax/jars/
> (and that should propagte later ot other maven repos)
> 
> best,
> 
> alek
> 
> Davanum Srinivas wrote:
> 
> >Added a bug report with stax folks (http://jira.codehaus.org/browse/STAX-14)
> >
> >-- dims
> >
> >On 8/29/05, dims@apache.org <dims@apache.org> wrote:
> >
> >
> >>Author: dims
> >>Date: Mon Aug 29 19:38:04 2005
> >>New Revision: 264675
> >>
> >>URL: http://svn.apache.org/viewcvs?rev=264675&view=rev
> >>Log:
> >>- sjsxp is no good :( as we can't re-distribute it (http://java.sun.com/webservices/docs/1.6/ReleaseNotes.html)
> >>- Get all the tests working again. EXCEPT SpacesTest (we're not getting the cdata
events)
> >>- Get rid of unused Random member
> >>
> >>
> >>Modified:
> >>    webservices/axis/trunk/java/modules/addressing/project.xml
> >>    webservices/axis/trunk/java/modules/core/project.xml
> >>    webservices/axis/trunk/java/modules/integration/project.xml
> >>    webservices/axis/trunk/java/modules/saaj/project.xml
> >>    webservices/axis/trunk/java/modules/samples/project.xml
> >>    webservices/axis/trunk/java/modules/security/project.xml
> >>    webservices/axis/trunk/java/modules/wsdl/project.xml
> >>    webservices/axis/trunk/java/modules/xml/project.xml
> >>    webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
> >>    webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/builder/StAXBuilder.java
> >>
> >>Modified: webservices/axis/trunk/java/modules/addressing/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/addressing/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/addressing/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/addressing/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -66,17 +66,17 @@
> >>             <url>http://dist.codehaus.org/stax/jars/</url>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/core/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/core/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/core/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -62,17 +62,17 @@
> >>             <url>http://dist.codehaus.org/stax/jars/</url>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/integration/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/integration/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/integration/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/integration/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -116,17 +116,17 @@
> >>             <url>http://dist.codehaus.org/stax/jars/</url>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/saaj/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/saaj/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/saaj/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/saaj/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -110,17 +110,17 @@
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/samples/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/samples/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/samples/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -103,17 +103,17 @@
> >>             <url>http://dist.codehaus.org/stax/jars/</url>
> >>         </dependency>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/security/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/security/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/security/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/security/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -74,17 +74,17 @@
> >>             <url>http://dist.codehaus.org/stax/jars/</url>
> >>         </dependency>
> >>         <dependency>
> >>-            <groupId>sjsxp</groupId>
> >>-            <artifactId>sjsxp</artifactId>
> >>-            <version>1.6</version>
> >>+            <groupId>stax</groupId>
> >>+            <artifactId>stax</artifactId>
> >>+            <version>1.1.1-dev</version>
> >>             <properties>
> >>                 <module>true</module>
> >>             </properties>
> >>         </dependency>
> >>         <dependency>
> >>-            <groupId>sjsxp</groupId>
> >>-            <artifactId>jsr173_api</artifactId>
> >>-            <version>1.6</version>
> >>+            <groupId>stax</groupId>
> >>+            <artifactId>stax-api</artifactId>
> >>+            <version>1.0</version>
> >>             <properties>
> >>                 <module>true</module>
> >>             </properties>
> >>
> >>Modified: webservices/axis/trunk/java/modules/wsdl/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/wsdl/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/wsdl/project.xml Mon Aug 29 19:38:04
2005
> >>@@ -61,17 +61,17 @@
> >>             <url>http://dist.codehaus.org/stax/jars/</url>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/xml/project.xml
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/project.xml?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/xml/project.xml (original)
> >>+++ webservices/axis/trunk/java/modules/xml/project.xml Mon Aug 29 19:38:04 2005
> >>@@ -32,6 +32,7 @@
> >>
> >>
> >>         <unitTest>
> >>
> >>             <excludes>
> >>
> >>+                <exclude>**/*SpacesTest.java</exclude>
> >>
> >>             </excludes>
> >>
> >>             <includes>
> >>
> >>                 <include>**/*Test.java</include>
> >>
> >>@@ -95,17 +96,17 @@
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>sjsxp</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax</artifactId>
> >>
> >>+            <version>1.1.1-dev</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>         </dependency>
> >>
> >>         <dependency>
> >>
> >>-            <groupId>sjsxp</groupId>
> >>
> >>-            <artifactId>jsr173_api</artifactId>
> >>
> >>-            <version>1.6</version>
> >>
> >>+            <groupId>stax</groupId>
> >>
> >>+            <artifactId>stax-api</artifactId>
> >>
> >>+            <version>1.0</version>
> >>
> >>             <properties>
> >>
> >>                 <module>true</module>
> >>
> >>             </properties>
> >>
> >>
> >>Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
(original)
> >>+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
Mon Aug 29 19:38:04 2005
> >>@@ -40,8 +40,6 @@
> >>
> >>     protected boolean isBinary = false;
> >>
> >>-    private static Random rnd = new Random(new Date().getTime());
> >>-
> >>     /**
> >>      * Field contentID for the mime part used when serialising Binary stuff
as
> >>      * MTOM optimised
> >>
> >>Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/builder/StAXBuilder.java
> >>URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/builder/StAXBuilder.java?rev=264675&r1=264674&r2=264675&view=diff
> >>==============================================================================
> >>--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/builder/StAXBuilder.java
(original)
> >>+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/builder/StAXBuilder.java
Mon Aug 29 19:38:04 2005
> >>@@ -136,19 +136,16 @@
> >>      * @throws OMException
> >>
> >>      */
> >>
> >>     protected OMNode createOMText(int textType) throws OMException {
> >>
> >>+        OMNode node = null;
> >>
> >>         if (lastNode == null) {
> >>
> >>-            throw new OMException();
> >>
> >>+            return null;
> >>
> >>+        } else if (!lastNode.isComplete()) {
> >>
> >>+            node = omfactory.createText((OMElement) lastNode, parser.getText());
> >>
> >>+            node.setType(textType);
> >>
> >>+        } else if (!(lastNode.getParent() instanceof OMDocument)) {
> >>
> >>+            node = omfactory.createText((OMElement)lastNode.getParent(), parser.getText());
> >>
> >>+            node.setType(textType);
> >>
> >>         }
> >>
> >>-        OMNode node;
> >>
> >>-        if (lastNode.isComplete()) {
> >>
> >>-            node =
> >>
> >>-                    omfactory.createText((OMElement) lastNode.getParent(),
> >>
> >>-                            parser.getText());
> >>
> >>-        } else {
> >>
> >>-            OMElement e = (OMElement) lastNode;
> >>
> >>-            node = omfactory.createText(e, parser.getText());
> >>
> >>-        }
> >>
> >>-        node.setType(textType);
> >>
> >>         return node;
> >>
> >>     }
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> 
> 
> --
> The best way to predict the future is to invent it - Alan Kay
> 
> 


-- 
Davanum Srinivas : http://wso2.com/ - Oxygenating The Web Service Platform

Mime
View raw message