The bean serializer maps the java Date type to the SOAP "xsd:date" type, which doesn't include time information. I assume this was intentional, although I don't particularly like it!
To send a date-time (xsd:dateTime), the only way I have found is to use the Calendar type. Note however that the time zone information is lost when serialized, and when deserialized is assumed to be GMT. I consider this to be a bug, as the serializer should either include time zone information or convert it to GMT, depending on what the RPC standard is capable of. The work-around is to make sure you create your Calendar objects in GMT before sending them through axis. I would prefer it if Date was mapped to xsd:date instead of xsd:dateTime. There could be a new class included with the axis distribution to represent an xsd:date type in java. ----- Original Message ----- From: "Christian Schmitz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 03, 2002 1:12 AM Subject: RE: How to use DateSerializer? > I found the answer. I have to use the Factory classes. > But the response is something like that "2002-07-02". Where is the time > stored in the Date Object? How can I get it? > > -----Original Message----- > From: Christian Schmitz [mailto:[EMAIL PROTECTED]] > Sent: Dienstag, 2. Juli 2002 17:01 > To: '[EMAIL PROTECTED]' > Subject: How to use DateSerializer? > > Hi, > > I've tried to use DateSerializer from axis to serialize java.util.Date, but > a NullPointerException was thrown. > > This is my mapping in the deployment file: > > <typeMapping > xmlns:ns="http://pirobase.pironet.de/xsd" > qname="ns:Date" > type="java:java.util.Date" > serializer="org.apache.axis.encoding.ser.DateSerializer" > deserializer="org.apache.axis.encoding.ser.DateSerializer" > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > /> > > Regards > Christian > > >
