I tried the solution of the question here JAXB Simplify plugin vs *.xjb.
but it failed with the following exception
" compiler was unable to honor this simplify:as-element-property customization. It is attached to a wrong place, or its inconsistent with other bindings. "
this is customization binding I used
<jaxb:bindings node="//xs:complexType[@name='Op']//xs:choice/xs:element[@name='Time']">
<simplify:as-element-property/>
</jaxb:bindings>
the jaxb simplify plugin confluence page is not accessible, so has anyone used this plugin and can give an example please?
Here is my updated schema according to the answer
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://www.amadeus.com/APT/FOM/00" targetNamespace="http://www.amadeus.com/APT/FOM/00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:simplify="http://jaxb2-commons.dev.java.net/basic/simplify" jaxb:extensionBindingPrefixes="simplify">
...
...
<xs:complexType>
<xs:sequence>
<xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="Time" type="xs:dateTime" minOccurs="1" maxOccurs="1">
<xs:annotation>
<xs:appinfo>
<simplify:as-element-property />
</xs:appinfo>
</xs:annotation>
</xs:element>
... ...
</xs:choice>
...
I got the exception during the maven build like "Unsupported binding namespace "http://jaxb2-commons.dev.java.net/basic/simplify". Perhaps you meant "http://jaxb.dev.java.net/plugin/code-injector"?"