Alternatively if you want to persist in using the DocumentType
class.
Then you could just add the following annotation on top of your DocumentType class.
@XmlRootElement(name="document")
Note: the String value "document"
refers to the name of the root tag of the xml message.