|
That's true I couldn't because the class I am using
is not developed by me.
But What I don't understand is that when the WSDL
is generated the java2wsdl tool in Axis doesn't warn about this
fact.
I mean it converts date to xsd:dateTime and then
after the wsdl2java tool create a Calendar in the client. If this would
work is perfect by me, but It seems that the server is trying to serialize a
date class.
----- Original Message -----
Sent: Wednesday, July 07, 2004 5:26
PM
Subject: RE: Axis 1.1 doesn't support
java.util.Date?
I'm fairly new to
Web services, but I'm wondering if this could have something to do with
it:
The user manual
says that the Standard mappings from WSDL to Java is:
| xsd:dateTime |
java.util.Calendar |
So it looks like
you could resolve the problem by using the Calendar class instead of
Date?
Is it correct to say that Axis 1.1 doesn't
support the Serialization of java.util.Date?? I mean I have some problem
doing it and I can not figure why
What should i be doing wrong...
I have already post this:
I am Serializing a Bean with a java.util.Date
attribute ie:
public Persona{
java.util.Date
bitrthday;
public
setBirthday(Date date..)
..
}
In the client in the generated stubs When
I recieve from the server a an object of Person I get the next
error:
- Could not convert java.util.Date to bean
field 'birthday', type java.util.Calendar -
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.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)
....
The genereted class Persona has a
Calendar...
Anybody knows what is going here if I can't use
Date as bean properties or something like
that?
|