When generateElementProperty is false, the binding is changed as follows:
// set JAXB customization generateElementProperty="false" public class Person { String getName() {...} public void setName(String value) {...} }
The above binding is more natural to Java developer than JAXBElement<String>. However, it does not roundtrip the value of name.
JAXB 2.0 allows generateElementProperty to be set:
Globally in <jaxb:globalBindings>
Locally in <jaxb:property> customization
When processing a WCF service WSDL, it is recommended that the generateElementProperty customization be set in <jaxb:globalBindings>:
<jaxb:bindings version="2.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <jaxb:bindings schemaLocation="schema-importedby-wcfsvcwsdl" node="/xs:schema"> <jaxb:globalBindings generateElementProperty="false"/> </jaxb:bindings> ...
The generateElementProperty attribute was introduced in JAXB 2.1.