• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-RPC and Calendar question

 
Ong Vua
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

setStartDate(java.util.Calendar)

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

2009-10-09T17:00:00Z

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.

Thanks





 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks dude....it 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
<util:ebmTimestamp>2009-11-10T01:10:10.281Z</util:ebmTimestamp>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic