You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@xml.apache.org by Thaer Hani Al-Ibaisi <th...@integrant.com.jo> on 2001/04/22 12:26:16 UTC

Return java.sql.Date object from RPC call

I face a problem when I want to return a java.sql.Date object from
the service, so the error "Fault= SOAP-ENV:Server,
java.lang.IllegalArgumentException: Unable to retrieve 'minutes' property
value: null." 
and I will attach the client code,the service code, and also my
DeploymentDescriptor.xml(which I called it dd.xml), so please tell me where
I should change in those files to fit the serialization and deserialization
of my Date object successfully.

thx.

 <<dd.xml>>  <<SuperClient.java>>  <<DateTimerClass.java>> 

Re: Return java.sql.Date object from RPC call

Posted by Scott Nichol <sn...@computer.org>.
You cannot use the BeanSerializer to [de]serialize a java.sql.Date.  This is because the
getters and setters for the hours, minutes, and seconds properties are specified (in the
JDK javadoc) to always throw IllegalArgumentException.  If you must return a
java.sql.Date, you must write your own [de]serializer.  On the other hand, if you can
instead return a java.util.Date, you can use the [de]serializer supplied with Apache
SOAP.

Scott

----- Original Message -----
From: "Thaer Hani Al-Ibaisi" <th...@integrant.com.jo>
To: <so...@xml.apache.org>
Sent: Sunday, April 22, 2001 6:26 AM
Subject: Return java.sql.Date object from RPC call


> I face a problem when I want to return a java.sql.Date object from
> the service, so the error "Fault= SOAP-ENV:Server,
> java.lang.IllegalArgumentException: Unable to retrieve 'minutes' property
> value: null."
> and I will attach the client code,the service code, and also my
> DeploymentDescriptor.xml(which I called it dd.xml), so please tell me where
> I should change in those files to fit the serialization and deserialization
> of my Date object successfully.
>
> thx.
>
>  <<dd.xml>>  <<SuperClient.java>>  <<DateTimerClass.java>>
>


Re: Return java.sql.Date object from RPC call

Posted by Scott Nichol <sn...@computer.org>.
Another alternative (I think): supply a BeanInfo for java.sql.Date that specifies only
time as a property.

Scott

----- Original Message -----
From: "Thaer Hani Al-Ibaisi" <th...@integrant.com.jo>
To: <so...@xml.apache.org>
Sent: Sunday, April 22, 2001 6:26 AM
Subject: Return java.sql.Date object from RPC call


> I face a problem when I want to return a java.sql.Date object from
> the service, so the error "Fault= SOAP-ENV:Server,
> java.lang.IllegalArgumentException: Unable to retrieve 'minutes' property
> value: null."
> and I will attach the client code,the service code, and also my
> DeploymentDescriptor.xml(which I called it dd.xml), so please tell me where
> I should change in those files to fit the serialization and deserialization
> of my Date object successfully.
>
> thx.
>
>  <<dd.xml>>  <<SuperClient.java>>  <<DateTimerClass.java>>
>