views:

963

answers:

1

I am getting started with using apache CXF 2.1.5 and xmlbeans to generate a web service client. The FAQ page shows how to use jaxb bindings to have java.util.Date binding for xsd:dateTime:

<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; 
  <jaxws:bindings  node="wsdl:definitions/wsdl:types/xs:schema[@targetNamespace='THE_NAMESPACE_OF_YOUR_SCHEMA']"> 
      <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; 
        <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>

I want to use xmlBeans bindings instead but can't find a suitable example. I understand how to use xmlbeans to map an xml file to java object but I can't find the syntax to use cxf. Any pointers, code samples are welcome.

A: 

There is a sample project integrating XBean:

http://svn.apache.org/repos/asf/cxf/trunk/distribution/src/main/release/samples/wsdl_first_xmlbeans/