Women in Technology

Hear us Roar



Article:
  Understanding JAXB: Java Binding Customization
Subject:   How to avoid duplicate bindings in multiple schema files
Date:   2004-05-29 22:47:12
From:   fla
Hi,


We are defining a couple of schema files that both contains element (digital signature) that refers to the w3c digital signature schema. The two schema files have different target namespace, and we'd like to put them in separate java packages too. When using default binding rules, duplicate class files appear in both packages. If I want the digital signature files in its own package, and let element in the two schema files refer to this package, how can I use custom bindings to achieve this? Thanks.


Frank

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • How to avoid duplicate bindings in multiple schema files
    2004-05-30 01:21:56  fla [View]

    I found out through other mailing list that if I specify a package name for xjc, it is applied to schemas imported as well. Using an external binding doesn't resolve this problem. There are a couple of options:
    a) Let xjc use derived package name from each schema's target namespace.
    b) Use inline binding for each schema file to specify desired package name.

    Frank