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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:08:00+00:00 2026-05-12T17:08:00+00:00

Is even possible to bind an root object with super fields? I have quite

  • 0

Is even possible to bind an root object with super fields?

I have quite complicated entity (entities) to bind. I am already lost with it 🙂

This is my code situation:

public class CoreRestWrapper {
    private Integer page;
    private Integer perPage;
}

public class UserWrapper extends CoreRestWrapper {
    private Collection<UserCVO> users;
}

public class UserCVO  {
    private UserVO userVO;
    private Map<String, UserMeta> meta;
}

public class UserVO extends BaseVO {
    //nothing here
}

public class BaseVO {
    private Integer id;
    private String mainName;
}

public class UserMeta extends Meta {
    //nothing here
}

public class Meta {
    private String key;
    private Object value;
    private String type; //String, Integer, Boolean, Date
}

UserWrapper is my root object. I would like to have my response xml look like this:

<users>
    <page>1</page>
    <perPage>2</perPage>
    <user>
        <id>1</id>
        <main>test</main>
        <meta type="String" key="wtf">just for fun</meta>
        <meta type="Integer" key="age">99</meta>
    </user>
    <user>
        <id>2</id>
        <main>test</main>
        <meta type="String" key="wtf">fooooo</meta>
        <meta type="Integer" key="age">101</meta>
    </user>
</users>

Or maybe even <users page="1" perPage="2"> and then just user tags…

Is this even possible (for a beginner in JiBX to handle)?

  • 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-12T17:08:00+00:00Added an answer on May 12, 2026 at 5:08 pm

    You can, but you have to define mappings for everything in the hierarchy. I ran into the same thing. It ended up complex enough that I found it simpler to just create a JIBX wrapper object to map to (e.g. UserJibxWrapper), then write a little code to map that into the internal objects.

    In your case though, the object themselves are fairly simple, so you might be able to generate all the mappings needed. I’d work top down. Take the base class and map it, get that mapping work, then add in a subclass and alter your mappings as needed, and keep working down that way. Since JIBX needs to know everything in the hierarchy to map, it’s easier to map top-down than bottom-up.

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

Sidebar

Ask A Question

Stats

  • Questions 433k
  • Answers 433k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Why wouldn't <%=Html.ValidationSummary()?> work? May 15, 2026 at 2:53 pm
  • Editorial Team
    Editorial Team added an answer You can use: min-height:Value; on the outer element to force… May 15, 2026 at 2:53 pm
  • Editorial Team
    Editorial Team added an answer What, exactly, is wrong with using std::rotate()? For example, std::vector<int>… May 15, 2026 at 2:53 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.