• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAXB binding files

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I know this isn't strictly web service related, but this seems like the most appropriate forum since JAX-WS utilizes JAXB.

I am using JAXB to generate Java classes from a set of schemas that I have been given. The data types in these schemas reference each other frequently. Due to various reasons, I need to change the name of several fields in the generated code. To do this, I'm using bindings files to look for the nodes in question, and then to rename them in the Java code.

I'm running into issues, however, when a single schema may be processed by xjc multiple times. (As I mentioned, these schemas quite frequently reference each other.) Depending on the order that the schemas are processed, the Java code may be regenerated without the changed parameter names unless I duplicate all of the customization across all of the bindings files.

Is there any way to import/include one binding file in another? I want to do something like this:



I know that xjc allows any number of binding files to be specified, but I'm using ant to invoke the xjc task, and things get hairy when I have different numbers of bindings that are needed for different invocations.


Thanks!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic