File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes JAX-RPC and Calendar question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "JAX-RPC and Calendar question" Watch "JAX-RPC and Calendar question" New topic

JAX-RPC and Calendar question

Ong Vua
Ranch Hand

Joined: Jan 24, 2008
Posts: 69
I generated JAX-RPC WS proxy from a WSDL using JDeveloper 11g. In the generated java class, the setter methods for Date fields accept java.util.Calendar as an input parameter. For example


I know I need to format my Calendar object as below because I'm using WS 2.0


But I kept getting this error message

"The value '09-10-09-17:00' cannot be converted to a date time value"

Has anyone tried this before? If you don't mind sharing your code on how to format the Calendar object to the above format, I really appreciate it.


H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 471
Not sure if I understand your issue correctly, but I did 1 quick test as below:

I used AXIS 1.4

Provider/Server side

Consumer/Client side

From the wsdl from the server, I generated client code and tested as below and see Soap request

Mayur Lanjwar

Joined: Jun 24, 2013
Posts: 2
thanks worked!!

--on client
Calendar ebmTimestamp = Calendar.getInstance();
ebmTimestamp.set(2009, 10,9 , 17, 10, 10);

--on xsd/wsdl
<xsd:element name="ebmTimestamp" type="xsd:dateTime"/>

--on soapuri in soap reponse
I agree. Here's the link:
subject: JAX-RPC and Calendar question
It's not a secret anymore!