How do I represent dates without the timezone using Apache CXF?

后端 未结 4 2006
暗喜
暗喜 2021-02-04 05:52

I have a WSDL that specifies an element\'s type to be xs:date.

When I use Apache CXF to generate the Java classes, it renders the variable as an javax.xml.datatype.XMLGr

4条回答
  •  迷失自我
    2021-02-04 06:24

    By default wsdl's xsd:date gets mapped to XMLGregorianCalendar. If this is not what you want then if you are using CXF's wsdl to java tool then you can provide a binding file to override this default mapping:

    
      
          
            
          
      
    
    

    You can refer to http://cxf.apache.org/docs/wsdl-to-java.html section "How to map xsd:dateTime to java.util.Date?" for more details.

提交回复
热议问题