Khuzema Dharwala wrote:
So apparently the unmarshal method doesn't directly return the object, but instead JAXBElement
wrapping the object. Cast to JAXBElement<EventMessageType>
instead, then retrieve its value.
To get rid of the unchecked cast warning you'll get, you can also use a StreamResource to get a more type-safe way: