Hi Thomas,

JiBX doesn't currently support simpleType restrictions other than
enumeration, though that may change in the future - my intention has
been to add support for all or at least most restrictions, and it's just
a matter of *when* this gets done.

You defininitely can use a class decorator to add hooks into the code.
See the
http://jibx.sourceforge.net/fromschema/codegen-extends.html#extend
discussion, and the "Extending a base class" part in particular.

  - Dennis

Dennis M. Sosnoski
XML 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


On 07/21/2010 11:12 PM, Thomas R. Hall wrote:
> Our team has an XSD with elements that have a maxLength attribute in
> order to handle some limitations in some backend mainframe systems. We
> were using hand-written bindings and data objects, but have moved to
> using codegen exclusively now to generate the JiBX bindings and data
> objects. When marshalling our objects, values that are too long are
> placed in the message, thus causing issues in our backend systems.
>
> I searched the list but was not able to find an existing suggestion
> for this, and didn't see any obvious options in the CodeGen
> customizations/extensions documentation. I'm wondering if the best
> approach is to somehow create a decorator that could truncate values
> and possibly perform other validation for the class as needed when
> using codegen. Maybe somehow setting a pre-get-name or pre-set-name
> method in the generated binding?
>
> I appreciate any insight you may have.
>
> Thanks,
>
> --Thomas
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________
> jibx-users mailing list
> jibx-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jibx-users
>
>   

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to