in my project, i want to publish some webservice which has some datetime
property. I generate the client
code with the wsdl2java. the xs:dateTime in the schema just binding to the
XMLGregorianCalendar type. All i want is java.util.Date, so i add some thing
as follow in the wsdl file:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns="http://synchronous.arpoa.cn/"; jaxb="http://java.sun.com/xml/ns/jaxb";
version="2.0" attributeFormDefault="qualified"
elementFormDefault="unqualified"
targetNamespace="http://synchronous.arpoa.cn/";>
<xs:annotation>
  <xs:appinfo>
    <jaxb:globalbindings>
      <jaxb:javatype name="java.util.Date" xmltype="xs:dateTime"
parsemethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime"
printmethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime" />
    </jaxb:globalbindings>
  </xs:appinfo>
 </xs:annotation>

and run the wsdl2java to generate the client code, and there were some
errors like:

E:\tmp>wsdl2java synchronous.wsdl
[Fatal Error] synchronous.wsdl:6:26: The prefix "jaxb" for element
"jaxb:globalb
indings" is not bound.

WSDLToJava Error : java.lang.RuntimeException: Fail to create wsdl
definition fr
om : file:/E:/tmp/synchronous.wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing
'file:/E:/tmp
/synchronous.wsdl'.: org.xml.sax.SAXParseException: The prefix "jaxb" for
elemen
t "jaxb:globalbindings" is not bound.


Anything I configured wrong? thanks for your help!
-- 
View this message in context: 
http://www.nabble.com/date-type-binding-tf4222811.html#a12012522
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to