user3799186
user3799186

Reputation: 51

Jaxb Removing the suffix "Type" when generating classes from XSD

We just upgraded to the below Jaxb version and started noticing that it strips off the "Type" suffix when the classes are generated. This is causing issues as the schema we got from 3'rd party is now having two classes with the same name. Can someone tell us how to get around this and keep the "Type" suffix as is?

  jaxbVersion = '2.2.11'
  jaxwsVersion = '2.2.10'
  jaxwsrsVersion = '2.0.1'

Thanks

Upvotes: 5

Views: 2643

Answers (1)

lexicore
lexicore

Reputation: 43651

Use the following schema bindings declaration:

<schemaBindings>
  <nameXmlTransform>
    <typeName suffix="Type"/>
  </nameXmlTransform>
</schemaBindings>

See:

Upvotes: 1

Related Questions