Last Friday…10 minutes till quitting time, I come across some info on “Mapping Annotation”. I’ve been using the @XMLElement annotation for most of my bean properties, and sometimes they work…but not in this one particular bean. (yes, I’d been taking the Java to XML approach) First, you have to understand how I was using this annotation. My bean code looked like this:
Now, at some point, it seemed necessary to use a wrapper class so that I could return an Array of these beans. So a built this little guy:
Although this strategy was successful in another case, it failed at deserialization in the web service client application. Here’s a little bit of …
NEWS BREAK…I INTERRUPT THIS BLOG TO BRING YOU THIS IMPORTANT AND PERHAPS MEANINGLESS INFORMATION
ARRRRGG!!! In an attempt to reconstruct this crime scene, my old code worked! This is very frustrating. I was going to give you this cool little post about how I solved my little problem by adding the “name” attribute to the @XMLElement annotation, but when I removed the name attribute, redeployed to Glassfish, regenerated/recompiled/redeployed my client…it $@$%ING WORKED!
Despite this confusion, I believe I will continue annotating my bean properties like this:
…because it got things working.