You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "McMullin, Gregg E." <GR...@saic.com> on 2006/05/05 02:42:08 UTC

axis 1.2.1 and xsd:dateTime Help!

I appear to be having an issue with the deserialization of dateTime
elements.
 
My schema defines an element like so...
 
<xsd:element name="beginDateTime" type"xsd:dateTime"/>
 
I turned on axis level debugging to see the following...
 
        <ns1:temporalExtent seasonal="false">
                <ns1:dateTimeRange>
 
<ns1:beginDateTime>1997-05-01T00:00:00</ns1:beginDateTime>
 
<ns1:endDateTime>1997-06-01T00:00:00</ns1:endDateTime>
                        <ns1:increment>PT6H</ns1:increment>
                </ns1:dateTimeRange>
        </ns1:temporalExtent>

 

This is the correct input.... but the beginDateTime and endDateTime change
after they go over the wire.  The month gets decremented by one.

Later in the log I see this....

2805626 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Exit:
DeserializationContext::startElement()
2805626 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Enter:
DeserializationContext::startElement(urn:esg, dateTimeRange)
2805626 [TP-Processor1] DEBUG org.apache.axis.i18n.ProjectResourceBundle  -
org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
2805626 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Pushing handler
org.apache.axis.encoding.ser.BeanDeserializer@b4b4bb
<ma...@b4b4bb> 
2805626 [TP-Processor1] DEBUG org.apache.axis.utils.NSStack  - NSPush (32)
2805627 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Exit:
DeserializationContext::startElement()
2805627 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Enter:
DeserializationContext::startElement(urn:esg, beginDateTime)
2805627 [TP-Processor1] DEBUG org.apache.axis.i18n.ProjectResourceBundle  -
org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
2805627 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Pushing handler
org.apache.axis.encoding.ser.CalendarDeserializer@1c596b1
<ma...@1c596b1> 
2805627 [TP-Processor1] DEBUG org.apache.axis.utils.NSStack  - NSPush (32)


2805627 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Exit:
DeserializationContext::startElement()
2805627 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Enter:
DeserializationContext::endElement(urn:esg, beginDateTime)
2805627 [TP-Processor1] DEBUG org.apache.axis.i18n.ProjectResourceBundle  -
org.apache.axis.i18n.resource::handleGetObject(popHandler00)
2805627 [TP-Processor1] DEBUG
org.apache.axis.encoding.DeserializationContext  - Popping handler
org.apache.axis.encoding.ser.CalendarDeserializer@1c596b1
<ma...@1c596b1> 
2805628 [TP-Processor1] DEBUG org.apache.axis.i18n.ProjectResourceBundle  -
org.apache.axis.i18n.resource::handleGetObject(setValueInTarget00)
2805628 [TP-Processor1] DEBUG org.apache.axis.encoding.DeserializerImpl  -
Set value
java.util.GregorianCalendar[time=862444800000,areFieldsSet=true,areAllFields
Set=true,lenient=true,zone=s
un.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,t
ransitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,
YEAR=1997,MONTH=4,WEEK_OF_YEAR=18,WEE
K_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=121,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MON
TH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSE
T=0,DST_OFFSET=0] in target org.apach
e.axis.encoding.ser.BeanPropertyTarget@12856f7
<ma...@12856f7> 


2805628 [TP-Processor1] DEBUG org.apache.axis.i18n.ProjectResourceBundle  -
org.apache.axis.i18n.resource::handleGetObject(setValueInTarget00)
2805628 [TP-Processor1] DEBUG org.apache.axis.encoding.DeserializerImpl  -
Set value
java.util.GregorianCalendar[time=862444800000,areFieldsSet=true,areAllFields
Set=true,lenient=true,zone=s
un.util.calendar.ZoneInfo[id="GMT",offset=0,dstSavings=0,useDaylight=false,t
ransitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,
YEAR=1997,MONTH=4,WEEK_OF_YEAR=18,WEE
K_OF_MONTH=1,DAY_OF_MONTH=1,DAY_OF_YEAR=121,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MON
TH=1,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSE
T=0,DST_OFFSET=0] in target org.apach
e.axis.encoding.CallbackTarget@1659dce
<ma...@1659dce> 
2805628 [TP-Processor1] DEBUG org.apache.axis.utils.NSStack  - NSPop (32)

Notice that the MONTH is being set to 4.   So when I get to the server the
value I see for beginDateTime is 1997-04-01 which is obviously not what I'd
expect.

Any idea what is happening here? 

         thanks,

            Gregg