JAXB generating JAXBElement instead of String

What I had to do is to wrap jaxb:globalBindings with another jaxb:bindings.

<jaxb:bindings version="2.0"
               xmlns:jaxb="http://java.sun.com/xml/ns/jaxb">
    <jaxb:bindings>
        <jaxb:globalBindings generateElementProperty="false"/>
    </jaxb:bindings>
</jaxb:bindings>

Now everything is working, there is no JAXBElement<String> generated anymore.

Leave a Comment