title: Using xmlbeans bindings for cxf wsdl2java
body: <p>I am getting started with using <em>apache CXF 2.1.5</em> and <em>xmlbeans</em> to generate a web service client. The FAQ page shows how to use jaxb bindings to have <code>java.util.Date</code> binding for <code>xsd:dateTime</code>:</p>
  
  <pre><code>&lt;jaxws:bindings wsdlLocation="YOUR_WSDL_LOCATION" 
            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/"&gt; 
    &lt;jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='THE_NAMESPACE_OF_YOUR_SCHEMA']"&gt; 
        &lt;jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; 
          &lt;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"/&gt; 
        &lt;/jxb:globalBindings&gt; 
    &lt;/jaxws:bindings&gt; 
  &lt;/jaxws:bindings&gt; 
  </code></pre>
  
  <p>I want to use <em>xmlBeans</em> bindings instead but can't find a suitable example. I understand how to use <em>xmlbeans</em> to map an xml file to java object but I can't find the syntax to use <code>cxf</code>. Any pointers, code samples are welcome.</p>