cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cord Awtry" <kip...@gmail.com>
Subject dateTime custom binding
Date Mon, 19 May 2008 18:49:29 GMT
Hello all,

  Wondering if someone can lend some advice on an issue I'm seeing (may not
even be an issue, I'm open to that as an answer ;) ). Essentially, I have a
WSDL being generated by CXF with all my types inline. I have a bunch of
xs:datetime objects which are being converted to XMLGregorianCalendar when I
run wsdlToJava. I've done a bunch of research on this, seen several
solutions and have yet to see anything work. I've copied the code from the
cwiki for solving this, but still no resolution. It's possible what I view
as the proper resolution may be incorrect. Essentially, I'd like to get rid
of all the instances of XMLGregorianCalendar in my generated java files and
have them be java.util.Date objects. Below is a copy of my bindings that I'm
using with CXF 2.1. If anyone has any thoughts as to why I'm still getting
XMLGregorianCalendar objects in my generated java files, I'd be more than
happy to hear it.

  Thanks,

    -C-

<jaxws:bindings wsdlLocation="
http://127.0.0.1:8080/ext/services/Extension?wsdl"
                xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
                xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <jaxws:bindings
node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='
http://www.tmu.com/services/Extension/2008/05']">
    <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <jxb:javaType name="java.util.Date" xmlType="xs:dateTime"

 parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"

 printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/>
    </jxb:globalBindings>
  </jaxws:bindings>
</jaxws:bindings>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message