0

actually i have a next binding:

<binding>
    <mapping name="Ciudad" class="general.Ciudad">
        <value name="id"  field="id" />
        <value name="nmCiudad" field="nmCiudad" />
        <value name="departamento" field="departamento" />
    </mapping>
</binding>

Over other classes i need use the class reading about that find the tag import, when copile with this tag all works, but when try to mapping an object over the binding say:

jibxexception : Multiple bindings defined for class

The tag used in the others binding is:

<binding>
    <include path="CiudadBinding.xml" precompiled="true" />
.....
</binding>

In other try to fix them find:

<binding>
    <include path="CiudadBinding.xml" precompiled="true" />
    <mapping name="Object" class="object.to.binding.class" >
        <structure field="ciudadExpedicion" map-as="general.Ciudad" />
...
    </mapping>
</binding>

and Didn't works!!

Thanks a lot

jthan24
  • 11
  • 1

1 Answers1

1

reading a little found the next thread: http://www.opensubscriber.com/message/jibx-users@lists.sourceforge.net/1704428.html

Then change my application and fix them,

In the binding add the attribute package="general":

<binding  package="general" >
    <include path="Ciudad.xml" />

So, the binding result magically in this folder jejejeje.

And now, to access only to binding

<binding package="general"  >
    <mapping name="Ciudad" class="general.Ciudad">

I need to change when call from java:

Before:

IBindingFactory bfact = BindingDirectory.getFactory(clazz);

After:

IBindingFactory bfact = BindingDirectory.getFactory(clazz.getSimpleName(), clazz);

That's it!!

jthan24
  • 11
  • 1