You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/01/16 20:43:28 UTC

DO NOT REPLY [Bug 26204] New: - java.sql.Date Deserialization problem

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26204>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26204

java.sql.Date Deserialization problem

           Summary: java.sql.Date Deserialization problem
           Product: Axis
           Version: 1.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization/Deserialization
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: cfernando@virtusa.com


When tried to DeSerialize a "Date" of java.sql.Date this error occures.

Note. in the client_config.wsdd and in the server_config.wsdd the type mapping 
for the DATE is given as 

<typeMapping encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" 
serializer="org.apache.axis.encoding.ser.DateSerializerFactory" 
deserializer="org.apache.axis.encoding.ser.DateDeserializerFactory" 
type="java:java.sql.Date" qname="ns16:sqlDate" 
xmlns:ns16="http://www.Tester.com/"/>

and the serialization works fine, below is a part of the generated message

<creationDate xsi:type="xsd:date">2003-08-05</creationDate>
<deleteEnabled xsi:type="xsd:boolean">true</deleteEnabled>
<dirty xsi:type="xsd:boolean">true</dirty>
<distributionCenterId xsi:type="xsd:string" xsi:nil="true"/>
<email xsi:type="xsd:string">email@1.com</email>


The StackTrace

2004-01-17 01:36:29,290 ERROR org.apache.axis.encoding.ser.BeanPropertyTarget  -
 Could not convert java.util.Date to bean field 'creationDate', type 
java.sql.Date
2004-01-17 01:36:29,290 ERROR org.apache.axis.client.Call  - Exception:
java.lang.IllegalArgumentException: argument type mismatch
	at org.apache.axis.encoding.ser.BeanPropertyTarget.set
(BeanPropertyTarget.java:181)
	at org.apache.axis.encoding.DeserializerImpl.valueComplete
(DeserializerImpl.java:282)
	at org.apache.axis.encoding.DeserializerImpl.endElement
(DeserializerImpl.java:541)
	at org.apache.axis.encoding.DeserializationContextImpl.endElement
(DeserializationContextImpl.java:1015)
	at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:204)
	at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:722)
	at org.apache.axis.encoding.DeserializerImpl.startElement
(DeserializerImpl.java:404)
	at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextImpl.java:976)
	at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:198)
	at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:722)
	at org.apache.axis.encoding.DeserializerImpl.startElement
(DeserializerImpl.java:404)
	at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextImpl.java:976)
	at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:198)
	at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:722)
	at org.apache.axis.encoding.DeserializerImpl.startElement
(DeserializerImpl.java:404)
	at org.apache.axis.encoding.DeserializationContextImpl.startElement
(DeserializationContextImpl.java:976)
	at org.apache.axis.message.SAX2EventRecorder.replay
(SAX2EventRecorder.java:198)
	at org.apache.axis.message.MessageElement.publishToHandler
(MessageElement.java:722)
	at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:323)
	at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
	at org.apache.axis.client.Call.invoke(Call.java:2272)
	at org.apache.axis.client.Call.invoke(Call.java:2171)
	at org.apache.axis.client.Call.invoke(Call.java:2196)