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

  • SEARCH
  • Home
  • 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 6146893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:01:27+00:00 2026-05-23T19:01:27+00:00

I am requesting links to sources/material that will help me with the following problem

  • 0

I am requesting links to sources/material that will help me with the following problem (a problem because I am novice to Java/JAXB and coming from a PHP background).

I am supplied with a complex XSD that is created & maintained by an organization. I created the java object model using JAXB 2.1. I need to map database fields to the java/jaxb derived classes. The database fields/elements are rendered via simple XML output. Example of the XML database record output is as follows:

<PROBLEM>
<PID>262</ID>
<PROBLEM_DATE>14-DEC-10</PROBLEM_DATE>
<PROBLEM_TYPE>T</PROBLEM_TYPE>
<PROBLEM_CODE>244.9</PROBLEM_CODE>
</PROBLEM>

Example of of the JAXB derived class:

protected IvlTs problemDate;

public IvlTs getProblemDate() {
            return problemDate;
        }

public void setProblemDate(IvlTs value) {
            this.problemDate = value;
        }

How would I map the xml element <PROBLEM_DATE> to problemDate? Please advise of an article/tutorial that can help me get started. Also, the XML database extract is large, having nearly 500 fields/xml elements, is there a way to automate the mapping or must this all be done by hand?

  • 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-23T19:01:29+00:00Added an answer on May 23, 2026 at 7:01 pm

    You’ll want to read up on JAXB annotations. For this particular problem, you want to annotate the getProblemDate() method with

    @XmlElement(name="PROBLEM_DATE")
    

    If there’s a common pattern, like problemDate -> PROBLEM_DATE and in general fooBar -> FOO_BAR, then it should be pretty easy to write a regex find/replace to get what you need.

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

Sidebar

Related Questions

I'm making an app that is requesting data from a Web Service (implementing Soap).
Client is requesting a Lightbox gallery which will, on click, provide image, description and
My client is requesting that each simple product within a bundled product they are
I'm trying to test that requesting the root path ( / ) routes to
I have an app that sometimes links to imdb. I can do this with
Requesting the following URL as POST https://graph.facebook.com/155718697782591/events?&name=Gamblers%2C+H%C3%B6gslogen%2C+H%C3%B6g%2C+Hudiksvall&start_time=2011-09-17+21%3A00&end_time=2011-09-18+01%3A00&location=H%C3%B6gslogen%2C+H%C3%B6g%2C+Hudiksvall&privacy=PUBLIC&access_token=<token> creates the following error {error:{message:An unknown error
I have an OSGi plugin with an activator that I am requesting to start
I'm requesting data from a server and when I echo the response out onto
I am requesting a html5 web page it contains images and sound files. Once
I'm requesting an internal API with lots of different interface, each is REST :

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.