mercoledì 6 febbraio 2013

JAXBElement.isNil() returns confusing value

Actually, it doesn't, but we'll come to that later.

Take this example: you have to read an XML document (a SOAPMessage received as a response from a Web Service, for example) and to instantiate some objects accordingly. A certain element may be null, and in this case you have to skip the creation of that object.

 You're currently working using JAX-WS and its JAXBElement objects to manipulate data.