Hi Johannes, There's no way to ignore the value during unmarshalling. For version 2 I've planned a <split> component of the binding that allows separate <input> and <output> branches, which would make this type of situation easier to handle.
You can make the added get/set methods you need for this private so they don't show up in the visible API, but I agree it's still ugly that you need to add them to your business objects. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Johannes Müller wrote: > Hello, > > is there a simple way to set a <value> element to a default value during > marshalling, but ignore the same <value> element's value during unmarshalling > without having to write separate input and output bindings and without having > to write dummy methods into the bound Java classes? > > The case is that the binding file is quite large so having to split them up > would double a huge amount of JiBX binding code. > > As the get/set-method attributes are restricted to pointing to the actual > Object type only, and I do not want to pollute my business objects with > methods generating unnecessary String values, and the custom > serializer/deserializer methods always need to have an appropriate method > signature, at the moment, I do not see an elegant solution to this issue. > > Unfortunately, when using the "constant" attribute, the value has to match > that value during unmarshalling. > > Thanks for your help, > > Johannes > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > jibx-users mailing list > jibx-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jibx-users > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users