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;
        }
}


David Blevins wrote:
> 
> Seems like a bug in the jaxb ri.  I guess from where you're at now  
> what I'd recommend is to see if you can replicate the issue in a test  
> case that doesn't use OpenEJB or web services (CXF).
> 
> Maybe create a JAXB class, 'MyDocument' or something, that has a  
> single field of type Date2 then create a test case that does a simple  
> JAXBContext.newInstance(MyDocument.class) and then attempts to  
> marshall and unmarshall an instance of MyDocument using the  
> jaxbContext.  That should allow you to get right to the issue and  
> potentially rule out anything OpenEJB or CXF related.
> 
> If it still fails then I'd send your test case to the JAXB RI as a bug  
> report.
> 
> -David
> 

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

Reply via email to