users@jax-rpc.java.net

java.util.Calendar and java.util.Date

From: Michael Pellegrini <mpellegrini_at_KAYASOFTWARE.COM>
Date: Thu, 18 Jul 2002 10:04:23 -0400

Oliver,

This is how the specification defines the mapping of Java types to XML
data types and XML data types back to Java types.

When going from Java types to XML data types both java.util.Date and
java.util.Calendar map to xsd:dateTime. However, when going from XML
data types to Java types xsd:dateTime maps to java.util.Calendar.

Please see sections 4.2.1 and 5.3.2 of the JAX-RPC 1.0 specification.

Michael Pellegrini
SilverStream Software

-----Original Message-----
From: Public discussion on JAX-RPC [mailto:JAXRPC-INTEREST_at_JAVA.SUN.COM]
On Behalf Of Tanglin, Oliver
Sent: Thursday, July 18, 2002 9:22 AM
To: JAXRPC-INTEREST_at_JAVA.SUN.COM
Subject: java.util.Calendar and java.util.Date

I am using the version of JAXRPC that came bundled with JWSDP 1.0.

I'm experimenting with creating a web service from an existing web
application.
Both my web service interface and beans have several methods that take
java.util.Date parameters.

For example: Mission getMission(java.util.Date)
                        Mission.setMissionDate(java.util.Date)

However, when I generate my client side stubs, the method parameter is
converted to java.util.Calendar.

For example: Mission getMission(java.util.Calendar)
                    Mission.setMissionDate(java.util.Calendar)

Is there a bug in xrpcc that is either generating the wrong WSDL on the
server side
or generating the wrong stubs from the WSDL on the client side?
According to
the documentation both data types are supported by default. I don't
think this is
a configuration issue, since all other data types are working as
expected.

Any feedback on this issue would be appreciated.
Thanks,

Oliver Tanglin
SAIC - software engineer
304-284-9000 x215
otanglin_at_asset.com
oliver.tanglin_at_saic.com