FWIW, the "wsdl_first" sample in the CXF distribution uses a binding.xml
file:
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first/src/main/resources/binding.xml?revision=1306003&view=markup,
perhaps its setup is something you can use.
Glen
On 08/15/2012 02:08 AM, Freeman Fang wrote:
Hi,
I run a quick test with 2.5.0.fuse-7-061, and it can generate Calendar as
expected. When it generate XMLGregorianCalendar, it means somehow your binding
file isn't picked up, could you double check your binding file path, ensure it
could be picked up?
Btw, as 2.5.0.fuse-7-061 is fuse specific version, so you better post your
question on fuse forum[1] if it's fuse specific version.
[1]http://fusesource.com/forums/index.jspa?categoryID=1
Freeman
-------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042
On 2012-8-14, at 下午8:53, barthorre wrote:
Hi,
can anyone explain me why I get different results using cxf-codegen-plugin
version 2.4.2-fuse-00-08 and version 2.5.0.fuse-7-061?
With 2.4.2 I get objects of type Calendar where as with 2.5.0 I get objects
of XMLGregorianCalendar. Any reason for this?
My .xjb file is listed below:
<?xml version="1.0" encoding="UTF-8"?>
<bindings xmlns="http://java.sun.com/xml/ns/jaxb"
xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
xsi:schemaLocation="
http://java.sun.com/xml/ns/jaxb
http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
http://www.w3.org/2001/XMLSchema
http://www.w3.org/2001/XMLSchema.xsd"
version="2.0">
<bindings>
<globalBindings>
<javaType name="java.util.Calendar" xmlType="xsd:dateTime"
parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
printMethod="javax.xml.bind.DatatypeConverter.printDateTime"/>
<javaType name="java.util.Calendar" xmlType="xsd:date"
parseMethod="javax.xml.bind.DatatypeConverter.parseDate"
printMethod="javax.xml.bind.DatatypeConverter.printDate"/>
<serializable uid="1" />
</globalBindings>
</bindings>
</bindings>
--
View this message in context:
http://cxf.547215.n5.nabble.com/Date-format-issue-with-cxf-codegen-2-5-0-tp5712487.html
Sent from the cxf-user mailing list archive at Nabble.com.