奇妙なこと...
バインディング定義 user-wrapper.xml があります。
<binding>
<include path="core-wrapper.xml" />
<include path="user-composite-entity.xml" />
<mapping name="users" class="UserWrapper" extends="CoreWrapper">
<structure map-as="CoreWrapper" usage="optional" />
<collection field="users" usage="optional" item-type="UserCompositeEntity">
</collection>
</mapping>
</binding>
次に、このバインド定義 user-composite-entity.xml (上のファイルに含まれています) があります。
<binding>
<include path="core-composite-entity.xml" />
<include path="user-entity.xml" />
<mapping name="user" class="UserCompositeEntity" extends="CoreCompositeEntity">
<structure map-as="CoreCompositeEntity" />
<structure field="userEntity" usage="optional" />
<structure field="meta" marshaller="UserMetaHashMapper" unmarshaller="UserMetaHashMapper" usage="optional" />
</mapping>
</binding>
ここで、バインド user-wrapper.xml を使用する REST を呼び出すと、マッピングが正常に行われます。バインド user-composite-entity.xml を使用する REST を呼び出すと、次のエラーが発生します。
org.jibx.runtime.JiBXException: Multiple bindings defined for class UserCompositeEntity
さて、奇妙なこと(私にとって)。user-wrapper.xml から削除すると<include path="user-composite-entity.xml" />、次のようになります: - user-composite-entity.xml での呼び出しは成功です。
org.jibx.runtime.JiBXException: No marshaller defined for class UserCompositeEntity