cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r799394 - in /cxf/trunk/rt: databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
Date Thu, 30 Jul 2009 18:12:38 GMT
Author: dkulp
Date: Thu Jul 30 18:12:38 2009
New Revision: 799394

URL: http://svn.apache.org/viewvc?rev=799394&view=rev
Log:
Fix SDO JAX-RS read test by making sure the START_DOCUMENT event is
skipped over

Modified:
    cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java

Modified: cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java?rev=799394&r1=799393&r2=799394&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java (original)
+++ cxf/trunk/rt/databinding/sdo/src/main/java/org/apache/cxf/sdo/DataReaderImpl.java Thu
Jul 30 18:12:38 2009
@@ -30,6 +30,7 @@
 import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Attachment;
 import org.apache.cxf.service.model.MessagePartInfo;
+import org.apache.cxf.staxutils.StaxUtils;
 
 import commonj.sdo.helper.HelperContext;
 
@@ -54,6 +55,9 @@
     public Object read(MessagePartInfo part, XMLStreamReader reader) {
         if (xmlStreamHelper != null) {
             try {
+                if (reader.getEventType() == XMLStreamReader.START_DOCUMENT) {
+                    StaxUtils.toNextTag(reader);
+                }
                 Object o = xmlStreamHelper.getClass().getMethod("loadObject", 
                                                      new Class[] {XMLStreamReader.class})
                                                          .invoke(xmlStreamHelper, reader);

Modified: cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java?rev=799394&r1=799393&r2=799394&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/DataBindingProviderTest.java
Thu Jul 30 18:12:38 2009
@@ -151,7 +151,6 @@
     
     @SuppressWarnings("unchecked")
     @Test
-    @Ignore
     public void testSDORead() throws Exception {
         String data = "<p0:Structure xmlns:p0=\"http://apache.org/structure/types\" "

             + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " 
@@ -167,7 +166,7 @@
                                       new Annotation[0], MediaType.APPLICATION_XML_TYPE,

                                       new MetadataMap<String, String>(), is);
         assertEquals("sdo", struct.getText());
-        assertEquals(123.5, struct.getDbl());
+        assertEquals(123.5, struct.getDbl(), 0.01);
         assertEquals(3, struct.getInt());
     }
     



Mime
View raw message