Hi John,

It sounds like you should be able to just define two separate bindings, and select the appropriate binding at runtime. You can separate portions of the binding you want to have in common into a third binding file, and use <include> to incorporate the shared bindings into each of the main binding definitions.

 - Dennis

Gibbons, John D wrote:

Hi Folks,

I have a project in which all of the classes rely on a heavy level of
inheritance, which led me to create custom marshaller and unmarshallers
for the base object and handle all of the object creation and data
population within it. I now have a user who insists on using a different
xml file format, and I am wondering if there is a way in which I can
tell jibx to use the same marshaller and unmarshallers that I have
already created. The two formats have different root elements, so when I
tried to create a binding that pointed to the unmarshaller I already
have in place, I receive the following error:

Multiple bindings defined for class books.apple.twaddle.BaseObject
at org.jibx.runtime.BindingDirectory.getFactory(Unknown Source)
at boeing.agps.commands.ResJBX.resJBX(ResJBX.java:26)   at
boeing.agps.commands.ResCmd.exec(ResCmd.java:439)       at
boeing.agps.language.CmdInterp.execCmd(CmdInterp.java:1382)     at
boeing.agps.language.CmdInterp.interpCmd(CmdInterp.java:775)    at
boeing.agps.Jagps.procCmd(Jagps.java:1440)      at
boeing.agps.Jagps.run(Jagps.java:1391)  at
java.lang.Thread.run(Thread.java:534)

All this seems reasonable enough to me, but I'm wondering if there is a
way to allow both root element types to be unmarshalled by the same
unmarshaller and let me take care of parsing everything myself.

Thanks,

John Gibbons


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to