just to clarify this was fixed with Bug 25012. revision 1.50 of org.apache.axis.wsdl.toJava.JavaBeanWriter, but is a bug in release 1.1
-----Original Message----- From: Zach Hensley [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 5:14 PM To: [EMAIL PROTECTED] Subject: xs:timeDate to Calendar Object So if I am understanding this correctly than there is a bug in axis 1.1, since it returns the toString() of GregorianCalendar as shown below for the value of an xs:dateTime. I have seen nothing in the code generator that would do any kind of formatting when creating the soap response. How do I get axis to use the ISO 8601 standard to format the Calendar object? Zach java.util.GregorianCalendar[time=1083099978421,areFieldsSet=true,areAllField sSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="America/Denver",o ffset=-25200000,dstSavings=3600000,useDaylight=true,transitions=157,lastRule =java.util.SimpleTimeZone[id=America/Denver,offset=-25200000,dstSavings=3600 000,useDaylight=true,startYear=0,startMode=3,startMonth=3,startDay=1,startDa yOfWeek=1,startTime=7200000,startTimeMode=0,endMode=2,endMonth=9,endDay=-1,e ndDayOfWeek=1,endTime=7200000,endTimeMode=0]],firstDayOfWeek=1,minimalDaysIn FirstWeek=1,ERA=1,YEAR=2004,MONTH=3,WEEK_OF_YEAR=18,WEEK_OF_MONTH=5,DAY_OF_M ONTH=27,DAY_OF_YEAR=118,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=4,AM_PM=1,HOUR=3, HOUR_OF_DAY=15,MINUTE=6,SECOND=18,MILLISECOND=421,ZONE_OFFSET=-25200000,DST_ OFFSET=3600000] ps. I just signed up for the list. Shouldn't I be getting all the posts as emails in the email address that I registered with? ------------------- The xsd:timeDate format is specified in the XML Schema Part 2: Datatypes specification, in Appendix D [1]. It's based on ISO 8601. Per the JAX-RPC spec, xsd:timeDate should map to java.util.Calendar rather than String. [1] http://www.w3.org/TR/xmlschema-2/#isoformats Anne -----Original Message----- From: Zach Hensley [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27, 2004 3:51 PM To: [EMAIL PROTECTED] Subject: xs:timeDate to Calendar Object It appears as though that there is no clear definition in any spec, be it JAX-RPC, or WSDL, as to how xs:timeDate should be formatted. I am using axis 1.1 release, and my client will not necessarily be a java client. As a result I think that there is an inefficiency in the wsdl2Java generation. The client try's to parse the String with the getLocaDateTimeInstance() via the String constructor yet the server returns a Calendar.toString() representation of the dateTime instance. If I am correct I only see the following options as a solution. 1. Override the Gregorian.toString() method and return the default DateFormat and hope that the client is using the same locale. 2. Change the type from xs:dateTime to String and enforce the format constraints on the server side, or in the schema. Will Axis recognize regular expressions in the schema, that would probably be the best option. 3. Change the type class so that it will always use the same format. This would mean that the client would have to use an already defined/non-generated type class though. Any comments are greatly appreciated. Whether I am missing something or if there is a solution that I have not seen, or just some random comment is fine too. --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.667 / Virus Database: 429 - Release Date: 4/23/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.667 / Virus Database: 429 - Release Date: 4/23/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.667 / Virus Database: 429 - Release Date: 4/23/2004
