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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:31:41+00:00 2026-05-15T18:31:41+00:00

According to this , you can make use of xs:key and xs:keyref when marshalling

  • 0

According to this, you can make use of xs:key and xs:keyref when marshalling and unmarshalling data in JAXB 2.x.

However, I can’t find a working example of this being done anywhere.

What we’re doing is setting a lookup section in each XML message containing the details for the reference/code values (id, name, description, etc), and then have the data elements later in the message refer back to these items using their key. XML schema defines and supports this through xs:keyref and xs:key (xs:IDREF is not an allowed option).

What I’d like to do is have my JAXB unmarshaller follow these refs dynamically, replacing the key with the referenced object.

Could anybody refer me to an example of this being done?

  • 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-15T18:31:41+00:00Added an answer on May 15, 2026 at 6:31 pm

    Are you talking about a compound key situtation?

    <directory>
       <employee>
          <eID>123</eID>
          <country>CA</country>
       </employee>
       <employee>
          <eID>123</eID>
          <country>US</country>
       </employee>
       <employee>
          <eID>456</eID>
          <country>US</country>
       </employee>
       <phone-number>
          <contact eID="123" country="US"/>
       </phone-number>
    </directory>
    

    If so EclipseLink JAXB (MOXy) could be used:

    • http://wiki.eclipse.org/EclipseLink/Examples/MOXy/JPA/CompoundPrimaryKeys
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

According to this answer , I can make C++ mode think that underscores are
I didnt find anything according this issue. Can jaas be used to secure my
According to this http://msdn.microsoft.com/en-us/library/cc849094(v=vs.85).aspx#OptInHighDPI you can make your web browser control use IE8-style zooming,
According to this question it seems like you can do this for Methods. What
http://www.frostjedi.com/terra/scripts/demo/jquery02.html According to this link elements can be moved around by doing $('#container1').append($('#container2')). Unfortunately,
according to this code if i want to access imageView1 and imageView2 how can
According to this post in Recursive Descent vs. LALR , any LALR(k) can be
According this article , generic JPA DAO(Data Access Object) is a pretty nice pattern.
I have made a custom suface button according this example: <Button> <Button.Template> <ControlTemplate TargetType=Button>
According to this post the Google C++ Testing Framework considers make install a bad

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.