2 Replies Latest reply: Oct 13, 2008 9:26 AM by 807589 RSS

    axis xs:datetime wsdl element type

    807589
      Hi,

      Does any one know how to convert athe xs:datatime type into a jave Date/Calendar object?

      e.g. this is an example of what the web service returns for this field:

      2007-02-17T14:40:32.000Z

      thanks

      Manj
        • 1. Re: axis xs:datetime wsdl element type
          807589
          The [Practical XML|http://sourceforge.net/projects/practicalxml/] project provides XmlUtil.parseXsdDatetime(): http://practicalxml.svn.sourceforge.net/viewvc/practicalxml/trunk/src/main/java/net/sf/practicalxml/XmlUtil.java?revision=22&view=markup

          Full disclosure: I am the admin of this project. It has not yet been released as a JAR, so if you're going to use it you will need to download and build yourself. It is covered by the [Apache 2.0 license|http://www.apache.org/licenses/LICENSE-2.0.html], which means that you can extract the code for your own project, provided that you properly attribute the source.
          • 2. Re: axis xs:datetime wsdl element type
            807589
            suppose I could also use this:

            DatatypeFactory.newInstance().newDuration();


            http://www.gnu.org/software/classpathx/jaxp/apidoc/javax/xml/datatype/DatatypeFactory.html