tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maaku <>
Subject Re: Problem with Dates in web service
Date Wed, 27 May 2009 06:02:32 GMT

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();
	    marshaller.marshal( date2, System.out );

public class Date2 extends Date {
	public Date2() {
	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:
Sent from the OpenEJB User mailing list archive at

View raw message