Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 57066 invoked from network); 22 Aug 2005 20:22:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2005 20:22:13 -0000 Received: (qmail 15916 invoked by uid 500); 22 Aug 2005 20:22:10 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 15881 invoked by uid 500); 22 Aug 2005 20:22:10 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 15868 invoked by uid 99); 22 Aug 2005 20:22:10 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=SPF_FAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Aug 2005 13:22:09 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id C152A122 for ; Mon, 22 Aug 2005 22:22:08 +0200 (CEST) Message-ID: <1310603862.1124742128790.JavaMail.jira@ajax.apache.org> Date: Mon, 22 Aug 2005 22:22:08 +0200 (CEST) From: "Michael Ward (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS-2115) axis 1.2.1 fails to deserialize xs:date in responses In-Reply-To: <1815081260.1121202986171.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/AXIS-2115?page=comments#action_12319643 ] Michael Ward commented on AXIS-2115: ------------------------------------ diff -u JavaBeanHelperWriter.java.orig JavaBeanHelperWriter.java --- JavaBeanHelperWriter.java.orig 2005-08-22 15:18:05.000000000 -0500 +++ JavaBeanHelperWriter.java 2005-08-22 15:18:05.000000000 -0500 @@ -360,8 +360,15 @@ + Utils.getNewQNameWithLastLocalPart(xmlName) + ");"); if (xmlType != null) { - pw.println(" elemField.setXmlType(" + if (elemType != null && + elemType.getRefType() != null && + elemType.getRefType().getQName() != null) { + pw.println(" elemField.setXmlType(" + + Utils.getNewQName(elemType.getRefType().getQName()) + ");"); + } else { + pw.println(" elemField.setXmlType(" + Utils.getNewQName(xmlType) + ");"); + } } if (elem.getMinOccursIs0()) { > axis 1.2.1 fails to deserialize xs:date in responses > ---------------------------------------------------- > > Key: AXIS-2115 > URL: http://issues.apache.org/jira/browse/AXIS-2115 > Project: Apache Axis > Type: Bug > Components: WSDL processing > Versions: 1.2, 1.2.1 > Environment: windows xp pro > Reporter: Michael Ward > Priority: Critical > > Axis 1.2.1, as a client, seems to be failing to deserialize responses properly and completely fails when parsing a date returned from an Axis 1.1 document/literal service. Listed below are 3 scenarios where the same WSDL was used to generate the client and serverside bindings using WSDL2Java. I ended up making a change to one of the WSDL2Java classes to get this working. This may or may not need to be filed as a bug and I'm not sure if the change I made is safe or if it just solves my problem. > > I found through debugging that during deserialization that axis 1.2.1 would always end up stepping into lines 291-297 of the BeanDeserializer where the comment states that it is an error if the deserializer is not found at this point. After comparing the generated 1.1 and 1.2.1 binding classes I found that making the following change fixed my problem. I've also attached the WSDL used below. > > $ diff ./axis-1_2_1/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java ./axis-1_2_1/src/org/apache/axis/wsdl/toJava/JavaBeanHelperWriter.java.orig > 363,369c363 > < if (elemType != null && > < elemType.getRefType() != null && > < elemType.getRefType().getQName() != null) { > < pw.println(" elemField.setXmlType(" > < + Utils.getNewQName(elemType.getRefType().getQName()) + ");"); > < } else { > < pw.println(" elemField.setXmlType(" > --- > > pw.println(" elemField.setXmlType(" > 371d364 > < } > > If someone could take a look and let me know if I should be doing something else I would appreciate it. Unfortunately having everyone upgrade to 1.2.1 is not an option right now so I really need this type of interoperability to work. > > thanks, > -mike > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Axis 1.1 Client --> Axis 1.1 Service > Request: > > > > > Test String > > > > > Response: > > > > > 2005-07-12 > > > > > Result: works!! > > > > Axis 1.2.1 Client --> Axis 1.1 Service > Request: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > Test String > > > > > Response: > > > > > 2005-07-12 > > > > > Result: Client fails to deserialize with `java.lang.NumberFormatException: Invalid date/time` > > > > Axis 1.2.1-fix Client --> Axis 1.1 Service > Request: > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > > > Test String > > > > > Response: > > > > > 2005-07-12 > > > > > Result: works!! -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira