Monthly Archives: March 2012

Marshalling an object without @XmlRootElement

You would normally marshall an object to it’s XML String form by something similar to: This assumes that the object is annotated with @XmlRootElement. If it is not, then you have to create a root element for it, by something … Continue reading

Posted in Java, xml | Tagged , , , | Leave a comment

Spring 3.1 Caching abstraction with Ehcache

The premise is simple enough. Add @Cacheable to a method that I want cached. Add the name of the cache to my existing ehcache.xml file, paste the three lines that they give you into my applicationContext.xml and away you go. … Continue reading

Posted in Java, Spring | Tagged , , , | 27 Comments

XML API Hell

Maven works great and solves lots of conflicting API problems for you.  The one case when it can’t help and usually hurts is when APIs change groupId or artifactId.  I recently had a case where I needed a CXF generated … Continue reading

Posted in Java, xml | 1 Comment