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

One of our 'frontend' developers keeps requesting from us backend developers that the backend
If I have a resource that a requesting client doesn't have access to but
There are many techniques to enforce strong passwords on website: Requesting that passwords pass
Presently i have the following action to return files (images, PDF's, etc) from my
I have an app that sometimes links to imdb. I can do this with
I have an OSGi plugin with an activator that I am requesting to start
When requesting hardware for a WebLogic server, what hardware would best improve its performance?
I often have customer requesting changing properties, like the version history setting on all
I'm requesting an internal API with lots of different interface, each is REST :
I am requesting something with $.ajax and i am getting a 302 or 200

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.