Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 15084 invoked from network); 16 Nov 2010 23:36:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Nov 2010 23:36:36 -0000 Received: (qmail 99896 invoked by uid 500); 16 Nov 2010 23:37:08 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 99816 invoked by uid 500); 16 Nov 2010 23:37:08 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 99809 invoked by uid 99); 16 Nov 2010 23:37:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 23:37:08 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Nov 2010 23:37:07 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 908B823889E7; Tue, 16 Nov 2010 23:35:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1035861 - in /cxf/trunk: rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/ systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ Date: Tue, 16 Nov 2010 23:35:53 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20101116233553.908B823889E7@eris.apache.org> Author: dkulp Date: Tue Nov 16 23:35:53 2010 New Revision: 1035861 URL: http://svn.apache.org/viewvc?rev=1035861&view=rev Log: [CXF-2868] Undo the changes for CXF-2868 as it looks like it was a bug in JAXB that is now fixed. Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java?rev=1035861&r1=1035860&r2=1035861&view=diff ============================================================================== --- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java (original) +++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataReaderImpl.java Tue Nov 16 23:35:53 2010 @@ -131,25 +131,6 @@ public class DataReaderImpl 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/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java?rev=1035861&r1=1035860&r2=1035861&view=diff ============================================================================== --- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java (original) +++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/ClientServerMiscTest.java Tue Nov 16 23:35:53 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/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java?rev=1035861&r1=1035860&r2=1035861&view=diff ============================================================================== --- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java (original) +++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstService.java Tue Nov 16 23:35:53 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/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java?rev=1035861&r1=1035860&r2=1035861&view=diff ============================================================================== --- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java (original) +++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/jaxws/DocLitBareCodeFirstServiceImpl.java Tue Nov 16 23:35:53 2010 @@ -65,4 +65,8 @@ public class DocLitBareCodeFirstServiceI }; } + public GMonthTest echoGMonthTest(GMonthTest input) { + return input; + } + }