Hi Phil,

Here is an example,

<jaxws:bindings wsdlLocation="you 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/";>
<jaxws:bindings node="wsdl:definitions/wsdl:types/xs:[EMAIL PROTECTED]'http://date.fortest.tools.cxf.apache.org/']"> <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>


Cheers,
James

Thanks James,

I'll give this a go but I'm not familiar with the binding file format. This is what I've got from numerous web searches. Think I'm missing a node attribute with a xpath query but not sure what it should look like.

<jaxws:bindings wsdlLocation="http://192.168.81.129/Services/SalesOrderService.asmx?WSDL";
   xmlns:jaxb="http://java.sun.com/xml/ns/jaxb";
   xmlns:jaxws="http://java.sun.com/xml/ns/jaxws";
   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
   xmlns:xsd="http://www.w3.org/2001/XMLSchema";
   node="wsdl:definitions/wsdl:types/xsd:schema">
<jaxb:globalbindings version="2.0" node=?????> <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>
  </jaxws:bindings>

Would appreciate if someone could put me straight on what the binding file should look like.

thanks

Phil

James Mao wrote:
What about use the java.util.Calendar or java.util.Date? will that make any difference? I have not tried your testcase, but you can try add a jaxws binding file when you do wsdl2java to map the xsd:dataTime to java.util.Calendar

James

Reply via email to