jaxb2-maven-plugin generates XSD schema with elemen names in Decimal NCRs

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

jaxb2-maven-plugin generates XSD schema with elemen names in Decimal NCRs

Тарасевич Павел
Hello,

We have a problem with  using org.codehaus.mojo.jaxb2-maven-
plugin for schema generation. We try to integrate Russian words as xml element names but as a result of schema generation we have decimal NCRs instead of Russian in xml element names (e.g. <xs:element name="&#1042;&#1080;&#1076;&#1060;&#1086;&#1088;&#1084;&#1099;" type="xs:string" minOccurs="0"/>).

Maven use UTF-8 encoding and there is no encoding schema generator configuration. Element names in java classes are initialized by JAXB annotations (e.g. @XmlElement(name ="Имя")).

Thanks,
Pavel
Reply | Threaded
Open this post in threaded view
|

Re: jaxb2-maven-plugin generates XSD schema with elemen names in Decimal NCRs

Anders Hammar
Please file a bug report, see [1].
As I know there is very limited work on this plugin I strongly encourage you to provide a patch (with an integration test) if you need this fixed.

The problem could also be in the used JAXB toll. In that case upgrading as described in [2] could solve your problem.


/Anders


On Wed, Oct 9, 2013 at 11:36 AM, Тарасевич Павел <[hidden email]> wrote:
Hello,

We have a problem with  using org.codehaus.mojo.jaxb2-maven-
plugin for schema generation. We try to integrate Russian words as xml element names but as a result of schema generation we have decimal NCRs instead of Russian in xml element names (e.g. <xs:element name="&#1042;&#1080;&#1076;&#1060;&#1086;&#1088;&#1084;&#1099;" type="xs:string" minOccurs="0"/>).

Maven use UTF-8 encoding and there is no encoding schema generator configuration. Element names in java classes are initialized by JAXB annotations (e.g. @XmlElement(name ="Имя")).

Thanks,
Pavel

Reply | Threaded
Open this post in threaded view
|

Re: jaxb2-maven-plugin generates XSD schema with elemen names in Decimal NCRs

Тарасевич Павел
Hi Anders,

Thanks for you fast reply! I’m very appreciate that. I think changing of
JAXB version is imposible in our project, because we have to use JAXB
implementation which goes with our IBM WebSphere server. I think the best
solution will be your first proposal.

Best Regards,
Pavel


2013/10/9 Anders Hammar <[hidden email]>
Please file a bug report, see [1].
As I know there is very limited work on this plugin I strongly encourage you to provide a patch (with an integration test) if you need this fixed.

The problem could also be in the used JAXB toll. In that case upgrading as described in [2] could solve your problem.


/Anders


On Wed, Oct 9, 2013 at 11:36 AM, Тарасевич Павел <[hidden email]> wrote:
Hello,

We have a problem with  using org.codehaus.mojo.jaxb2-maven-
plugin for schema generation. We try to integrate Russian words as xml element names but as a result of schema generation we have decimal NCRs instead of Russian in xml element names (e.g. <xs:element name="&#1042;&#1080;&#1076;&#1060;&#1086;&#1088;&#1084;&#1099;" type="xs:string" minOccurs="0"/>).

Maven use UTF-8 encoding and there is no encoding schema generator configuration. Element names in java classes are initialized by JAXB annotations (e.g. @XmlElement(name ="Имя")).

Thanks,
Pavel


Reply | Threaded
Open this post in threaded view
|

Re: jaxb2-maven-plugin generates XSD schema with elemen names in Decimal NCRs

Anders Hammar
You can upgrade and still force the generation according to an older JAXB spec version. See the "target" param.

/Anders


On Wed, Oct 9, 2013 at 2:44 PM, Тарасевич Павел <[hidden email]> wrote:
Hi Anders,

Thanks for you fast reply! I’m very appreciate that. I think changing of
JAXB version is imposible in our project, because we have to use JAXB
implementation which goes with our IBM WebSphere server. I think the best
solution will be your first proposal.

Best Regards,
Pavel


2013/10/9 Anders Hammar <[hidden email]>
Please file a bug report, see [1].
As I know there is very limited work on this plugin I strongly encourage you to provide a patch (with an integration test) if you need this fixed.

The problem could also be in the used JAXB toll. In that case upgrading as described in [2] could solve your problem.


/Anders


On Wed, Oct 9, 2013 at 11:36 AM, Тарасевич Павел <[hidden email]> wrote:
Hello,

We have a problem with  using org.codehaus.mojo.jaxb2-maven-
plugin for schema generation. We try to integrate Russian words as xml element names but as a result of schema generation we have decimal NCRs instead of Russian in xml element names (e.g. <xs:element name="&#1042;&#1080;&#1076;&#1060;&#1086;&#1088;&#1084;&#1099;" type="xs:string" minOccurs="0"/>).

Maven use UTF-8 encoding and there is no encoding schema generator configuration. Element names in java classes are initialized by JAXB annotations (e.g. @XmlElement(name ="Имя")).

Thanks,
Pavel