You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Armstrong, Jason" <JA...@MSA.com> on 2003/06/04 18:12:22 UTC

.NET and Apache Axis interop issue with xsd:date and xsd:dateTime

All,

I have an Apache Axis web service using document/literal encoding that
returns an object hierarchy (using the bean serializer/deserializer), one of
the attributes on this field is declared as an xsd:date (I also tried
xsd:dateTime).  The web service client is an .NET application.  The problem
I am having is that too much information is being sent back to the client
when the java.util.Date or java.util.Calendar object is being serialized.
In this particular case the value '2003-08-15T18:35:22.981Z' is being
returned.  In this particular web service I need to only send the date
portion back e.g. '2003-08-15'  Any recommendations?

Additionally, I do have requirements for other web services to be able to
include dates and times together, so I also need to be able to include a
date/time string that .NET can successfully parse.  Right now, I'm cheating
and sending the values back as xsd:string, but I'd like to be able to use a
more accurate type declaration.  I've thought about writing a custom
serializer/deserializer for xsd:date and xsd:dateTime, but I don't have any
great desire to reinvent the wheel if it's already been done.  Any advice
and recommendations would be appreciated.

Thanks in advance for any and all help!

Jason S. Armstrong
Applications Manager | Management Science Associates, Inc.
jarmstrong@msa.com