cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1036222 - in /cxf/branches/2.3.x-fixes: ./ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/ systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/
Date Wed, 17 Nov 2010 21:01:17 GMT
Author: dkulp
Date: Wed Nov 17 21:01:17 2010
New Revision: 1036222

URL: http://svn.apache.org/viewvc?rev=1036222&view=rev
Log:
Merged revisions 1035861 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1035861 | dkulp | 2010-11-16 18:35:53 -0500 (Tue, 16 Nov 2010) | 2 lines
  
  [CXF-2868] Undo the changes for CXF-2868 as it looks like it was a bug
  in JAXB that is now fixed.
........

Modified:
    cxf/branches/2.3.x-fixes/   (props changed)
    cxf/branches/2.3.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java
    cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java

Propchange: cxf/branches/2.3.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.3.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.3.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java?rev=1036222&r1=1036221&r2=1036222&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
(original)
+++ cxf/branches/2.3.x-fixes/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java
Wed Nov 17 21:01:17 2010
@@ -131,25 +131,6 @@ public class DataReaderImpl<T> extends J
                                                               getAttachmentUnmarshaller());
             }
         }
-        //The jaxb class contains XMLGregorianCalendar field also needs JAXB Bridge
-        if (part != null && part.getTypeClass() != null) {
-            boolean useJAXBBridge = false;
-            for (Field field : part.getTypeClass().getDeclaredFields()) {
-                if (field.getType().equals(XMLGregorianCalendar.class)) {
-                    useJAXBBridge = true;
-                    break;
-                }
-            }
-            if (useJAXBBridge) {
-                return JAXBEncoderDecoder.unmarshalWithBridge(part.getConcreteName(), 
-                                                              part.getTypeClass(),
-                                                              part.getTypeClass().getAnnotations(),
-                                                              databinding.getContextClasses(),

-                                                              reader,
-                                                              getAttachmentUnmarshaller());
-            }
-        }
-        
         
         return JAXBEncoderDecoder.unmarshall(createUnmarshaller(), reader, part, 
                                              unwrapJAXBElement);

Modified: cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1036222&r1=1036221&r2=1036222&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java
Wed Nov 17 21:01:17 2010
@@ -33,6 +33,8 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.XMLGregorianCalendar;
 import javax.xml.namespace.QName;
 import javax.xml.ws.BindingProvider;
 import javax.xml.ws.Holder;
@@ -64,6 +66,7 @@ import org.apache.cxf.jaxws.endpoint.dyn
 import org.apache.cxf.ordered_param_holder.ComplexStruct;
 import org.apache.cxf.ordered_param_holder.OrderedParamHolder;
 import org.apache.cxf.ordered_param_holder.OrderedParamHolder_Service;
+import org.apache.cxf.systest.jaxws.DocLitBareCodeFirstService.GMonthTest;
 import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.CXF2411Result;
 import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.CXF2411SubClass;
 import org.apache.cxf.systest.jaxws.DocLitWrappedCodeFirstService.Foo;
@@ -222,6 +225,14 @@ public class ClientServerMiscTest extend
         } catch (SOAPFaultException ex) {
             assertFalse(ex.getFault().hasDetail());
         }
+        
+        GMonthTest gm = new GMonthTest();
+        XMLGregorianCalendar dt = DatatypeFactory.newInstance().newXMLGregorianCalendarDate(2010,
11, 16, 0);
+        gm.setValue(dt);
+        GMonthTest gm2 = port.echoGMonthTest(gm);
+        
+        assertEquals(gm.getValue().getMonth(), gm2.getValue().getMonth());
+        
     } 
     
 

Modified: cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java?rev=1036222&r1=1036221&r2=1036222&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java
Wed Nov 17 21:01:17 2010
@@ -26,9 +26,12 @@ import javax.jws.soap.SOAPBinding;
 
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlList;
 import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
 import javax.xml.bind.annotation.XmlType;
+import javax.xml.datatype.XMLGregorianCalendar;
 
 
 @WebService(name = "DocLitBareCodeFirstService",
@@ -115,4 +118,27 @@ public interface DocLitBareCodeFirstServ
             return name;
         }
     }
+    @WebResult(name = "GMonthResult",
+               targetNamespace = "http://namespace/result", partName = "parameter")
+    @WebMethod
+    GMonthTest echoGMonthTest(
+        @WebParam(name = "GMonthRequest", targetNamespace = "http://namespace/result", 
+                  partName = "parameter")                              
+        GMonthTest input);
+    
+    @XmlAccessorType(XmlAccessType.FIELD)
+    @XmlType(name = "GMonthTest", propOrder = { "value" })
+    public class GMonthTest {
+        @XmlElement(required = true, nillable = true)
+        @XmlSchemaType(name = "gMonth")
+        protected XMLGregorianCalendar value;
+
+        public XMLGregorianCalendar getValue() { 
+            return value; 
+        }
+
+        public void setValue(XMLGregorianCalendar value) {
+            this.value = value;
+        }
+    }
 }

Modified: cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java?rev=1036222&r1=1036221&r2=1036222&view=diff
==============================================================================
--- cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java
(original)
+++ cxf/branches/2.3.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java
Wed Nov 17 21:01:17 2010
@@ -65,4 +65,8 @@ public class DocLitBareCodeFirstServiceI
         };
     }
 
+    public GMonthTest echoGMonthTest(GMonthTest input) {
+        return input;
+    }
+
 }



Mime
View raw message