November 4, 2010

Groovy: Adding JAXB to your Groovy Classes

I'm using spring to do some Groovy class marshalling to XML using JAXB and I got the following error:

After doing some research i found the following post on Groovy & JAXB.

The End Result was the following Groovy class

Note I only have to add @XmlElement where the XML does not match the property name. I hope this helps someone else.