axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Raddatz (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-4370) Time portion of java.util.Date is missing from SOAP response in Axis2 1.5
Date Thu, 08 Oct 2009 13:36:31 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-4370?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12763496#action_12763496
] 

Thomas Raddatz commented on AXIS2-4370:
---------------------------------------

Mauro, I completely agree with you. Given that someone specifies xs:date in a WSDL file he
most likely what to transport a date without a time portion. However there seems to be an
error when Axis 2 v1.5 receives a xs:date. In that case it complains that a "date string can
not be less than 19 charactors".

Axis2 version information:

Found Apache-Axis (org.apache.axis2.transport.http.AxisServlet)
  at C:\Jako 2009\Tomcat\webapps\axis2\WEB-INF\lib\axis2-transport-http-1.5.jar
Found Jakarta-Commons Logging (org.apache.commons.logging.Log)
  at C:\Jako 2009\Tomcat\webapps\axis2\WEB-INF\lib\commons-logging-1.1.1.jar
Found Streaming API for XML (javax.xml.stream.XMLStreamReader)
  at C:\Jako 2009\Tomcat\webapps\axis2\WEB-INF\lib\geronimo-stax-api_1.0_spec-1.0.1.jar
Found Streaming API for XML implementation (org.codehaus.stax2.XMLStreamWriter2)
  at C:\Jako 2009\Tomcat\webapps\axis2\WEB-INF\lib\wstx-asl-3.2.4.jar

Date sent:   <xsd:date>2009-10-08</xsd:date>

On the fly WSDL file:

            <xs:complexType name="DataTypesResponse">
                <xs:sequence>
                    <xs:element minOccurs="0" name="bigInteger" nillable="true" type="xs:long"/>
                    <xs:element minOccurs="0" name="bool" nillable="true" type="xs:boolean"/>
                    <xs:element minOccurs="0" name="date" nillable="true" type="xs:date"/>
                    <xs:element minOccurs="0" name="doubleFloat" nillable="true" type="xs:double"/>
                    <xs:element minOccurs="0" name="integer" nillable="true" type="xs:int"/>
                    <xs:element minOccurs="0" name="packed" nillable="true" type="xs:decimal"/>
                    <xs:element minOccurs="0" name="singleFloat" nillable="true" type="xs:float"/>
                    <xs:element minOccurs="0" name="smallInteger" nillable="true" type="xs:short"/>
                    <xs:element minOccurs="0" name="string" nillable="true" type="xs:string"/>
                    <xs:element minOccurs="0" name="time" nillable="true" type="xs:dateTime"/>
                    <xs:element minOccurs="0" name="timestamp" nillable="true" type="xs:dateTime"/>

                    <xs:element minOccurs="0" name="zoned" nillable="true" type="xs:decimal"/>
                </xs:sequence>
            </xs:complexType>
            <xs:complexType name="DataTypesRequest">
                <xs:complexContent>
                    <xs:extension base="ax21:DataTypesResponse">
                        <xs:sequence/>
                    </xs:extension>
                </xs:complexContent>

            </xs:complexType>

Stack trace:

[ERROR] date string can not be less than 19 charactors
java.lang.NumberFormatException: date string can not be less than 19 charactors
	at org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(ConverterUtil.java:993)
	at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeCalendar(SimpleTypeMapper.java:309)
	at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:112)
	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:397)
	at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:682)
	at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:630)
	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:562)
	at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:153)
	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:188)
	at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
	at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
	at java.lang.Thread.run(Thread.java:595)
[ERROR] date string can not be less than 19 charactors
org.apache.axis2.AxisFault: date string can not be less than 19 charactors
	at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
	at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:161)
	at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
	at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
	at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:173)
	at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:167)
	at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:142)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
	at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NumberFormatException: date string can not be less than 19 charactors
	at org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(ConverterUtil.java:993)
	at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.makeCalendar(SimpleTypeMapper.java:309)
	at org.apache.axis2.databinding.typemapping.SimpleTypeMapper.getSimpleTypeObject(SimpleTypeMapper.java:112)
	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:397)
	at org.apache.axis2.databinding.utils.BeanUtil.processObject(BeanUtil.java:682)
	at org.apache.axis2.databinding.utils.BeanUtil.ProcessElement(BeanUtil.java:630)
	at org.apache.axis2.databinding.utils.BeanUtil.deserialize(BeanUtil.java:562)
	at org.apache.axis2.rpc.receivers.RPCUtil.processRequest(RPCUtil.java:153)
	at org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:188)
	at org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:102)
	... 19 more

> Time portion of java.util.Date is missing from SOAP response in Axis2 1.5
> -------------------------------------------------------------------------
>
>                 Key: AXIS2-4370
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4370
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.5
>            Reporter: Pétur Runólfsson
>         Attachments: Server-1.4.1.wsdl, Server-1.5.wsdl, Server.java, services.xml
>
>
> When a method returns a java.util.Date (or an object containing a java.util.Date), only
the date portion is returned in Axis2 1.5:
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>    <soapenv:Body>
>       <ns:getCurrentTimeResponse xmlns:ns="http://ws.apache.org/axis2">
>          <ns:return>2009-06-10</ns:return>
>       </ns:getCurrentTimeResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
> In Axis2 1.4.1, the full date and time was returned:
> <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
>    <soapenv:Body>
>       <ns:getCurrentTimeResponse xmlns:ns="http://ws.apache.org/axis2">
>          <ns:return>2009-06-10T16:22:22.622Z</ns:return>
>       </ns:getCurrentTimeResponse>
>    </soapenv:Body>
> </soapenv:Envelope>
> This change breaks any application that requires the time portion to function correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message