JAXB が一連の XSD からクラスを生成するときの衝突を修正しようとしています。XML は次のとおりです。
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
...
<xs:simpleType name="List_OfferDimensionUOM">
...
</xs:simpleType>
</xs:schema>
そして binding.xjb ファイル:
<jxb:bindings version="1.0"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<jxb:bindings schemaLocation="OTA_Lists.xsd" node="/xs:schema">
<jxb:bindings node="xs:simpleType[@name='List_OfferDistanceUOM']">
<jxb:property name="List_OfferDistanceUOMList"/>
</jxb:bindings>
</jxb:bindings>
</jxb:bindings>
XPath を目的の要素に定義するいくつかの異なる組み合わせを試しましたが、同じエラーが発生し続けます。
compiler was unable to honor this property customization. It is attached to a wrong place, or its inconsistent with other bindings.
答えを探して数時間検索しましたが、ほとんど助けが見つかりませんでした. XPath が有効であることは確かなので、間違った場所にあるというエラー メッセージは意味がありません。また、現時点では 1 つしかないため、「他のバインディング」は意味がありません。