axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Assigned: (AXIS-1381) deserialization exception when a specify an empty tag for a date field
Date Tue, 08 Jun 2004 17:25:27 GMT
Message:

   The following issue has been re-assigned.

   Assignee: Davanum Srinivas (mailto:dims@yahoo.com)
---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1381

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1381
    Summary: deserialization exception when a specify an empty tag for a date field
       Type: Bug

     Status: Open
   Priority: Major

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.2 Beta

   Assignee: Davanum Srinivas
   Reporter: Amish Shah

    Created: Thu, 3 Jun 2004 6:16 PM
    Updated: Tue, 8 Jun 2004 10:25 AM
Environment: unix 2.8, weblogic 7

Description:
I get an deserialization exception when a specify an empty tag for a date field. I looked
at the source code and think I have found the problem - 
 
The parse creates an empty string for the empty tag. But the deserializer doesn't take that
into account. 

class org.apache.axis.encoding.ser.CalendarDeserializer
************
 public Object makeValue(String source) {^M
        Calendar calendar = Calendar.getInstance();^M
        Date date;^M
        boolean bc = false;^M
^M
        // validate fixed portion of format^M
        if ( source != null ) {^M
            if (source.charAt(0) == '+')^M
                source = source.substring(1);^M
^M
            if (source.charAt(0) == '-') {^M
                source = source.substring(1);^M
                bc = true;^M
            }^M
^M
            


java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:516)
        at org.apache.axis.encoding.ser.CalendarDeserializer.makeValue(CalendarDeserializer.ja
va:63)
        at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.jav
a:175)
        at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:505)
        at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationConte
xtImpl.java:1053)
        at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
        at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1050)
        at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:196)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:310)
        at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:145)
        at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:290)
        at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
        at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
        at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
        at org.apache.axis.server.AxisServer.invoke(AxisServer.java:285)
        at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:623)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:301)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:275)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:199)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.j
ava:2702)
        at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2427)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:159)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:140)



---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message