I am trying add deprecated annotation on my xjb generated stubs.
<jaxb:bindings schemaLocation="../../../../../server/target/schemas/schema2.xsd">
<jaxb:bindings node="xs:complexType[@name='someForms']/xs:all/xs:element[@name='detailsForm']">
<annox:annotate target="getter">@java.lang.Deprecated</annox:annotate>
</jaxb:bindings>
</jaxb:bindings>
It does not fail but does not put xml attribute on the field. This is how xsd looks -
<xs:complexType name="approvalForms">
<xs:all>
<xs:element name="detailsForm" type="formRef" minOccurs="0"/>
</xs:all>
</xs:complexType>
But, the following works
<jaxb:bindings schemaLocation="../../../../../server/target/schemas/schema2.xsd">
<jaxb:bindings node="xs:complexType[@name='someForms']">
<annox:annotate>
<annox:annotate annox:class="org.codehaus.jackson.annotate.JsonTypeName"
value="SomeForm" />
</annox:annotate>
</jaxb:bindings>
Am I missing something ? How can I add @Deprecated on getDetailsForm() in stub ?