Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5955711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T18:09:10+00:00 2026-05-22T18:09:10+00:00

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

  • 0

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.XMLGregorianCalendar (all good so far).

When CXF renders an XML document containing this, it renders it in this form (where -06:00 represents the time zone):

2000-01-18-06:00

How can I configure CXF not to render the timezone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T18:09:10+00:00Added an answer on May 22, 2026 at 6:09 pm

    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:

    <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/">
      <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">
            <jxb:javaType name="java.util.Date" xmlType="xs:date"
                          parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDate"
                          printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDate"/>
          </jxb:globalBindings>
      </jaxws:bindings>
    </jaxws:bindings>
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a central WSDL file that describes a web service. We use CXF
I have this in some WSDL: <element name="startDate" type="xsd:dateTime"/> <element name="endDate" type="xsd:dateTime"/> Which results
I have five WSDL's that share namespaces, but not all of them. I generate
We have received a WSDL from our client that we use to communicate with
I am trying to run WSDL2Java (Apache CXF) on a WSDL that contains overloaded
I have a WSDL file defining a service that I have to implement in
I have to consume a WCF WebServices but the WSDL contains bindings that PHP
I have a .NET web-service client that has been autogenerated from a wsdl-file using
I have an WSDL / Web Service and I need to generate an set
I have a WSDL which contains 3 schemas inside it's types element. The schemas

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.