On Oct 5, 2009, at 4:31 PM, Andy Spitzer wrote:

> Woof!
>
> On Mon, 05 Oct 2009 16:22:58 -0400, Marden Marshall  
> <[email protected]> wrote:
>
>> I prefer schema binding over annotations.  If automated as part of  
>> the
>> build process, it is easier to maintain and less error prone than
>> manual injection of annotations.
>
> Cool.  Can you show me some examples of this in action?
>
> --Woof!

I am not familiar with JAXB in particular, but I do believe that they  
cover schema binding in their tutorial (https://jaxb.dev.java.net/tutorial/ 
)

You can see a working example of schema binding using JiBX in the  
sipXcommons project.  Have a look at the reginfo and dialoginfo  
packages.  These are examples of binding fairly complex XML schemas to  
POJO's.  The ant build script shows how the bindings are generated and  
there are a couple of simple unit tests that follow.

The other thing to consider when comparing these techniques is  
performance.  It has been shown that using schema binding and the  
subsequent marshalling / unmarshalling code that is generated is much  
faster than using annotations.

-Mardy

_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to