Hi,

I have two questions regarding how to use the xs:date type (not xs:dateTime).

How we can generate an wsdl file with the date type and not the dateTime? Eg. 
in my DTO object I have just used:
        public Date myDate;
But it translates into the DateTime format in the wsdl - how should I do to 
generate a date?

If I change(hardcode) the xs:dateTime to xs:date, eg:
        <xs:element minOccurs="0" name="myDate" type="xs:date"/>

And also add the following to the .xjb file:
   <jxb:javaType name="java.util.Date" xmlType="xs:date"
                
parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
            
printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>

I still get the dateTime format in the return from the server:
   <myDate>2002-01-29T00:00:00+01:00</myDate>  

Have I done something wrong? Any suggestions? CXF 2.0.2 is used btw.

Thanks,
 Lennart

Reply via email to