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 3392204
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:53:36+00:00 2026-05-18T03:53:36+00:00

Is there a way to tell JAXB to not remove underscores when creating getter/setter

  • 0

Is there a way to tell JAXB to not remove underscores when creating getter/setter names from XML Schema?
Reason: this causes loss of information and it is harder to trip between XML and Java; e.g. in written communications where one participant might be confused about “different names”.

Example: NR_ROR should not become getNRROR but getNR_ROR.

Note: I believe that the less-mangled names are worth the “violation” of Java naming convention.
TIA
karolrvn

  • 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-18T03:53:36+00:00Added an answer on May 18, 2026 at 3:53 am

    Create a custom binding and set “underscoreBinding” to “asCharInWord”. One approach is to create a file called binding.xjb and use the -b flag to tell xjc where it is. Here’s an example of what you’d put in binding.xml:

    <jaxb:bindings
       xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       version="1.0">
       <jaxb:bindings schemaLocation="foobar.xsd">
          <jaxb:globalBindings underscoreBinding="asCharInWord"/>
       </jaxb:bindings>
    </jaxb:bindings>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a way to tell Visual Studio 2005 to not rearrange your SSIS
Is there a way to tell a MonoDevelop project to exclude from source control
Is there a way to tell Spring to load classes from a given URL
Is there a way to tell automake not to interpret part of the Makefile.am?
Is there any way to tell the Transformer (when serializing an XML document using
Is there a way to tell MS SQL that a query is not too
Is there a way to tell iOS that I do not want my app
Is there a way to tell .Net to search for a namespace from the
Is there a way to tell the compiler to not optimize selective portions of
Is there any way to tell visual studio to not include a project when

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.