jQuery in Action, 2nd edition
The moose likes Web Services and the fly likes JAX-RPC and Calendar question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "JAX-RPC and Calendar question" Watch "JAX-RPC and Calendar question" New topic
Author

JAX-RPC and Calendar question

Ong Vua
Ranch Hand

Joined: Jan 24, 2008
Posts: 57
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

Joined: Jul 26, 2011
Posts: 299
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



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAX-RPC and Calendar question
 
Similar Threads
JAXB ObjectFactory to create an empty xml tag example
Error passing in a date object
JBoss WS client exception
How come there's no exceptions when use JAX-WS?
Extending java.util.Calendar()