Thursday, November 15, 2007

XmlAdapter, or what you are looking for it you are missing custom serializers from JAX-RPC

JAX-B 2.0 has a nice little pattern to deal with hard to serialize types. Rather than forcing the user to create xml elements you instead just have to convert your java object into another set of java objects it does know how to persist. There is a clear example of using XmlAdapter here on java.net.

No comments: