The code actually fails when using JAXB 2.0.5 and it occurs for JAXB classes
that extend java.util.Date.

Maaku wrote:
> 
> I was able to marshal successfully, so the problem might be in cxf?
> 
> public class Tester {
>       public static void main(String[] args) throws JAXBException {
>            JAXBContext jaxbContext = JAXBContext.newInstance(Date2.class);
>           // Marshal to System.out
>           Marshaller marshaller = jaxbContext.createMarshaller();
>           marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
> Boolean.TRUE);
>           Date2 date2 = new Date2();
>           date2.setTest("testing...");
>           marshaller.marshal( date2, System.out );
>       }
> }
> 
> @XmlRootElement
> public class Date2 extends Date {
>       public Date2() {
>               super();
>       }
>       private String test;
>       public String getTest() {
>               return test;
>       }
>       public void setTest(String test) {
>               this.test = test;
>       }
> }
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-Dates-in-web-service-tp23716455p23973847.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to