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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:13:23+00:00 2026-06-03T20:13:23+00:00

I have a project that does JAXB generation with framework.xsd. This generates a jar

  • 0

I have a project that does JAXB generation with framework.xsd. This generates a jar with the xsd and the jaxb objects and other classes around that stuff.

Then another group(two different groups) will be extending framework.xsd and subxmling using the schema extends stuff to extend objects in framework.xsd. They also want to generate jaxb objects BUT they want their SomeClass.java to obviously extend my Framework.java and don’t want to end up with a whole new heirarchy.

  1. Is this even possible?
  2. How to do something like this? as the solution would need to
    1. tell the jaxb compiler that the namespace yy is already generated so do not generate
    2. tell the jaxb compiler that it needs to refer to the classes in the package zzzzzz or to look at the xjb file from the framework jar file or something.

Is this possible?
thanks,
Dean

  • 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-06-03T20:13:24+00:00Added an answer on June 3, 2026 at 8:13 pm

    You want to use an episode file : http://weblogs.java.net/blog/kohsuke/archive/2006/09/separate_compil.html when generating JAXB classes for your first schema.

    $ xjc -episode framework.episode framework.xsd
    

    Then the other group that consumes your framework.jar should:

    1) import your schema in their own schema e.g.:

    <xsd:import namespace="http://www.myorg.com/framework" schemaLocation="framework.xsd"/>
    

    2) generate their JAXB classes

    $ xjc extend.xsd -b framework.episode
    

    (they’ll need a copy of your xsd and episode file at xjc time, as well as the framework.jar in the classpath)

    Note that according to the blog post above, you can also place the framework.episode file inside your jar (e.g. /META-INF/sun-jaxb.episode for JAXB RI at least – other JAXB impl may have other ways of accomplishing the same thing), so that the -b framework.episode option can be omitted. I personally find it a bit impractical, you still need the XSD anyway.

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

Sidebar

Related Questions

I have a large project that runs on an application server. It does pipelined
I finished my little project that does some heavy lifting. i realized in this
I am working a project that does not have a trunk / branches /
I have a core project that does not run as an application, its only
I have a deploy.launch file that I checked out with a project that does
I have this large C++ project that I need to build on a platform
I have project that uses Hibernate: hibernate-core-3.6.7.Final.jar In its POM I found: <dependency> <groupId>org.hibernate.javax.persistence</groupId>
I have a grails project that contains a few domain objects. I am using
I have a project that is supposed to run on different (at least 2)
I have a project that uses two third party libraries, both of which make

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.