Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 45971 invoked from network); 10 Jul 2008 13:46:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Jul 2008 13:46:35 -0000 Received: (qmail 5930 invoked by uid 500); 10 Jul 2008 13:45:36 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 5897 invoked by uid 500); 10 Jul 2008 13:45:35 -0000 Mailing-List: contact issues-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 issues@cxf.apache.org Received: (qmail 5874 invoked by uid 99); 10 Jul 2008 13:45:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 06:45:35 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jul 2008 13:44:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0E569234C161 for ; Thu, 10 Jul 2008 06:44:33 -0700 (PDT) Message-ID: <321121581.1215697473057.JavaMail.jira@brutus> Date: Thu, 10 Jul 2008 06:44:33 -0700 (PDT) From: "Wojtek (JIRA)" To: issues@cxf.apache.org Subject: [jira] Created: (CXF-1697) Problem with converting to Calendar MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Problem with converting to Calendar ----------------------------------- Key: CXF-1697 URL: https://issues.apache.org/jira/browse/CXF-1697 Project: CXF Issue Type: Bug Affects Versions: 2.0.4 Environment: CXF 2.0.4 Reporter: Wojtek Fix For: 2.0.4 'm receiving following error: "Unmarshalling Error: unexpected element (uri:"", local:"from"). Expected elements are (none)". It occurs when xs:dateTime is mapped to java.util.Calendar. Here is the part of WSDL: Here is the service interface: List getDownloadHistory( @WebParam(name = "application") final String applicationID, @WebParam(name = "id") final String userID, @WebParam(name = "type") final HistoryType type, @WebParam(name = "from") final Calendar from, @WebParam(name = "to") final Calendar to); I'm using following SOAP binding: @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) Here is a SOAP request: 111:222:op 666 ACTIVE 2007-02-17T14:40:32.000Z 2008-07-08T12:10:00.000Z And SOAP response: soap:Server Unmarshalling Error: unexpected element (uri:"", local:"from"). Expected elements are (none) It seems that everything is correctly configured but I still have the same error. I've found that in JAXBEncoderDecoder#unmarshall, in case of abstract class (like java.util.Calendar), is unmarshalled without class by JAXB what causes in result mentioned error: "Unmarshalling Error: unexpected element (uri:"", local:"from"). Expected elements are (none)". Here is the "if" statement checking if class is abstract. if (clazz == null || (!clazz.isPrimitive() && !clazz.isArray() && !clazz.isEnum() && (Modifier.isAbstract(clazz.getModifiers()) || Modifier.isInterface(clazz.getModifiers())))) { unmarshalWithClass = false; } Is it correct "Modifier.isAbstract(clazz.getModifiers())"? Can someone confirm if it is a bug and real cause of problem? If I remove "Modifier.isAbstract(clazz.getModifiers())" everything works fine. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.