Hello,
I'm worrying about how to use the jibx_bindings.txt declarations.
I'd hoped, that the '.txt' file approach (containing resources with bindings declarations)
would help JiBX (and me) to compose binding declarations for complex classes out of
the declarations for atomic classes.
For example:
public class Atom {
private String mValue;
}
has its binding definition in file pkg.atom_binding.xml
<binding>
<mapping name="Atom" ….>
<value name="value" field="mValue"/>
<mapping/>
</binding>
The following class has a collection of Atoms:
public class Container {
private List mAtoms = new ArrayList();
}
and of course ist binding definition pkg.container_binding.xml
<binding>
<mapping name="Container" ….>
<collection field="mAtoms" item-type="pkg.Atom"/>
<mapping/>
</binding>
Note that this declaration makes no assumptions about Atom representations/bindings.
Now I'd like to compose these two declarations in an jibx_bindings.txt file with the following content:
pkg.atom_binding.xml
pkg.container_binding.xml
in order to compose several binding declarations.
But this doesn't work for me.
I have to put the Atom <mapping> element into the Container binding file!
Does JiBx support these (composition) pattern/approach?
Regards
J�rgen Krey
--
J�rgen Krey mailto:[EMAIL PROTECTED]
sd&m AG
software design & management
M�lheimer Str. 9a, 53840 Troisdorf, Germany
Tel +49 2241 9737-432, Fax -222
