Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert JAXBElement<XMLGregorianCalendar> to String and Date??? and Viceversa???

925715Jun 23 2015 — edited Jun 24 2015

Hello Everyone,

My Jdeveloper version  is 11.1.1.7.0.

I have one SOA/CC&B web service which I call from ADF and the web service returns many values as reponse. One of the value I retrieve is date which is of type "JAXBElement<XMLGregorianCalendar>", as below:

JAXBElement<XMLGregorianCalendar> aa =  serviceResponseType.getlastDate();

I have tried many ways but could not able to convert java.util.Date and String.

Can anyone please give me simple steps to convert my response value in JAXBElement<XMLGregorianCalendar> to :

1. date

2. String

And also viceversa, from date and String to:

1. JAXBElement<XMLGregorianCalendar>

Please provide your valuable suggestions...

Thanks.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 22 2015
Added on Jun 23 2015
11 comments
4,827 views