jaxb2 plugin: schemagen has namespace prefix problem

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

jaxb2 plugin: schemagen has namespace prefix problem

stefan.albrecht

Hi all,

I use version 1.5 of the mojo jaxb2 maven plugin for generating schema files from annotated classes.
I seem to have found problems with the replacement of namespace prefixes as configured in the transformSchema configuration section.
What happens is that the plugin first creates a schema1.xsd file, with tns as prefix for the target namespace. Then the file is renamed, as configured in the transformSchema section and the appropriate prefix changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns prefix is untouched, thus the resulting schema file is invalid:

Example excerpts:
<xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>

 or:

  <xs:complexType name="someImportItem">
    <xs:complexContent>
      <xs:extension base="tns:importItem">
...

I attached an example project.

Cheers,
Stefan
  
InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Matthias Glück  
Aufsichtsratsvors.: Prof. Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Altrottstraße 31  
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

jaxb2-plugin-bug.tar.gz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: jaxb2 plugin: schemagen has namespace prefix problem

Anders Hammar
You should file a JIRA ticket [1] reporting this problem. Attach your test project as well.


/Anders


On Tue, Sep 10, 2013 at 8:52 AM, <[hidden email]> wrote:

Hi all,

I use version 1.5 of the mojo jaxb2 maven plugin for generating schema files from annotated classes.
I seem to have found problems with the replacement of namespace prefixes as configured in the transformSchema configuration section.
What happens is that the plugin first creates a schema1.xsd file, with tns as prefix for the target namespace. Then the file is renamed, as configured in the transformSchema section and the appropriate prefix changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns prefix is untouched, thus the resulting schema file is invalid:

Example excerpts:
<xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>

 or:

  <xs:complexType name="someImportItem">
    <xs:complexContent>
      <xs:extension base="tns:importItem">
...

I attached an example project.

Cheers,
Stefan
  
InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Matthias Glück
Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: jaxb2 plugin: schemagen has namespace prefix problem

stefan.albrecht

Hi,

Where do I get a JIRA account for that project or guest permissions to create issues ? Then I could create an issue for this problem.

Cheers,
Stefan


-----[hidden email] wrote: -----

To: Mojo Users List <[hidden email]>
From: Anders Hammar <[hidden email]>
Sent by: [hidden email]
Date: 09/10/2013 08:55
Subject: Re: [mojo-user] jaxb2 plugin: schemagen has namespace prefix problem

You should file a JIRA ticket [1] reporting this problem. Attach your test project as well.
[1] http://jira.codehaus.org/browse/MJAXB

/Anders

On Tue, Sep 10, 2013 at 8:52 AM,  <[hidden email]> wrote:



Hi all,


I use version 1.5 of the mojo jaxb2 maven plugin for generating schema files from annotated classes.

I seem to have found problems with the replacement of namespace prefixes as configured in the transformSchema configuration section.

What happens is that the plugin first creates a schema1.xsd file, with tns as prefix for the target namespace. Then the file is renamed, as configured in the transformSchema section and the appropriate prefix changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns prefix is untouched, thus the resulting schema file is invalid:



Example excerpts:

<xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>


 or:


  <xs:complexType name="someImportItem">

    <xs:complexContent>

      <xs:extension base="tns:importItem">

...


I attached an example project.


Cheers,

Stefan

  

InterComponentWare AG:

Vorstand: Peter Kirschbauer (Vors.), Matthias Glück

Aufsichtsratsvors.: Prof. Dr. Christof Hettich

Firmensitz: 69190 Walldorf, Altrottstraße 31

AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  


---------------------------------------------------------------------

To unsubscribe from this list, please visit:


    http://xircles.codehaus.org/manage_email



  
InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Matthias Glück  
Aufsichtsratsvors.: Prof. Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Altrottstraße 31  
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: jaxb2 plugin: schemagen has namespace prefix problem

Anders Hammar
There are instructions on the welcome screen for Codehaus's JIRA (the dashboard when not signed in). Look in the upper left box named "Introduction".

/Anders


On Tue, Sep 10, 2013 at 9:48 AM, <[hidden email]> wrote:

Hi,

Where do I get a JIRA account for that project or guest permissions to create issues ? Then I could create an issue for this problem.

Cheers,
Stefan


-----[hidden email] wrote: -----

To: Mojo Users List <[hidden email]>
From: Anders Hammar <[hidden email]>
Sent by: [hidden email]
Date: 09/10/2013 08:55
Subject: Re: [mojo-user] jaxb2 plugin: schemagen has namespace prefix problem

You should file a JIRA ticket [1] reporting this problem. Attach your test project as well.
[1] http://jira.codehaus.org/browse/MJAXB

/Anders

On Tue, Sep 10, 2013 at 8:52 AM,  <[hidden email]> wrote:



Hi all,


I use version 1.5 of the mojo jaxb2 maven plugin for generating schema files from annotated classes.

I seem to have found problems with the replacement of namespace prefixes as configured in the transformSchema configuration section.

What happens is that the plugin first creates a schema1.xsd file, with tns as prefix for the target namespace. Then the file is renamed, as configured in the transformSchema section and the appropriate prefix changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns prefix is untouched, thus the resulting schema file is invalid:



Example excerpts:

<xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>


 or:


  <xs:complexType name="someImportItem">

    <xs:complexContent>

      <xs:extension base="tns:importItem">

...


I attached an example project.


Cheers,

Stefan

  

InterComponentWare AG:

Vorstand: Peter Kirschbauer (Vors.), Matthias Glück

Aufsichtsratsvors.: Prof. Dr. Christof Hettich

Firmensitz: 69190 Walldorf, Altrottstraße 31

AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  


---------------------------------------------------------------------

To unsubscribe from this list, please visit:


    http://xircles.codehaus.org/manage_email



  
InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Matthias Glück
Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: jaxb2 plugin: schemagen has namespace prefix problem

Jörg Schaible-3
Anders Hammar wrote:

> There are instructions on the welcome screen for Codehaus's JIRA (the
> dashboard when not signed in). Look in the upper left box named
> "Introduction".

Very hard to find. See also
http://jira.codehaus.org/browse/HAUS-2323

>
> /Anders
>
>
> On Tue, Sep 10, 2013 at 9:48 AM, <[hidden email]> wrote:
>
>>
>> Hi,
>>
>> Where do I get a JIRA account for that project or guest permissions to
>> create issues ? Then I could create an issue for this problem.
>>
>> Cheers,
>> Stefan
>>
>>
>> -----[hidden email] wrote: -----
>>
>> To: Mojo Users List <[hidden email]>
>> From: Anders Hammar <[hidden email]>
>> Sent by: [hidden email]
>> Date: 09/10/2013 08:55
>> Subject: Re: [mojo-user] jaxb2 plugin: schemagen has namespace prefix
>> problem
>>
>> You should file a JIRA ticket [1] reporting this problem. Attach your
>> test project as well.
>> [1] http://jira.codehaus.org/browse/MJAXB
>>
>> /Anders
>>
>> On Tue, Sep 10, 2013 at 8:52 AM,  <[hidden email]> wrote:
>>
>>
>>
>> Hi all,
>>
>>
>> I use version 1.5 of the mojo jaxb2 maven plugin for generating schema
>> files from annotated classes.
>>
>> I seem to have found problems with the replacement of namespace prefixes
>> as configured in the transformSchema configuration section.
>>
>> What happens is that the plugin first creates a schema1.xsd file, with
>> tns as prefix for the target namespace. Then the file is renamed, as
>> configured in the transformSchema section and the appropriate prefix
>> changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns
>> prefix is untouched, thus the resulting schema file is invalid:
>>
>>
>>
>> Example excerpts:
>>
>> <xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>
>>
>>
>>  or:
>>
>>
>>   <xs:complexType name="someImportItem">
>>
>>     <xs:complexContent>
>>
>>       <xs:extension base="tns:importItem">
>>
>> ...
>>
>>
>> I attached an example project.
>>
>>
>> Cheers,
>>
>> Stefan
>>
>>
>>
>> InterComponentWare AG:
>>
>> Vorstand: Peter Kirschbauer (Vors.), Matthias Glück
>>
>> Aufsichtsratsvors.: Prof. Dr. Christof Hettich
>>
>> Firmensitz: 69190 Walldorf, Altrottstraße 31
>>
>> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
>>
>>
>> ---------------------------------------------------------------------
>>
>> To unsubscribe from this list, please visit:
>>
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>> InterComponentWare AG:
>> Vorstand: Peter Kirschbauer (Vors.), Matthias Glück
>> Aufsichtsratsvors.: Prof. Dr. Christof Hettich
>> Firmensitz: 69190 Walldorf, Altrottstraße 31
>> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: jaxb2 plugin: schemagen has namespace prefix problem

Anders Hammar
Yes, I know. Life isn't easy. :-)

Seriously speking though, if I point out where to find the info how to get access here in this thread maybe it will help someone later on if they search the archive. At least until HAUS-2323 is fixed (might not be possible due to a JIRA limitation).

/Anders


On Tue, Sep 10, 2013 at 10:19 AM, Jörg Schaible <[hidden email]> wrote:
Anders Hammar wrote:

> There are instructions on the welcome screen for Codehaus's JIRA (the
> dashboard when not signed in). Look in the upper left box named
> "Introduction".

Very hard to find. See also
http://jira.codehaus.org/browse/HAUS-2323

>
> /Anders
>
>
> On Tue, Sep 10, 2013 at 9:48 AM, <[hidden email]> wrote:
>
>>
>> Hi,
>>
>> Where do I get a JIRA account for that project or guest permissions to
>> create issues ? Then I could create an issue for this problem.
>>
>> Cheers,
>> Stefan
>>
>>
>> -----[hidden email] wrote: -----
>>
>> To: Mojo Users List <[hidden email]>
>> From: Anders Hammar <[hidden email]>
>> Sent by: [hidden email]
>> Date: 09/10/2013 08:55
>> Subject: Re: [mojo-user] jaxb2 plugin: schemagen has namespace prefix
>> problem
>>
>> You should file a JIRA ticket [1] reporting this problem. Attach your
>> test project as well.
>> [1] http://jira.codehaus.org/browse/MJAXB
>>
>> /Anders
>>
>> On Tue, Sep 10, 2013 at 8:52 AM,  <[hidden email]> wrote:
>>
>>
>>
>> Hi all,
>>
>>
>> I use version 1.5 of the mojo jaxb2 maven plugin for generating schema
>> files from annotated classes.
>>
>> I seem to have found problems with the replacement of namespace prefixes
>> as configured in the transformSchema configuration section.
>>
>> What happens is that the plugin first creates a schema1.xsd file, with
>> tns as prefix for the target namespace. Then the file is renamed, as
>> configured in the transformSchema section and the appropriate prefix
>> changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns
>> prefix is untouched, thus the resulting schema file is invalid:
>>
>>
>>
>> Example excerpts:
>>
>> <xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>
>>
>>
>>  or:
>>
>>
>>   <xs:complexType name="someImportItem">
>>
>>     <xs:complexContent>
>>
>>       <xs:extension base="tns:importItem">
>>
>> ...
>>
>>
>> I attached an example project.
>>
>>
>> Cheers,
>>
>> Stefan
>>
>>
>>
>> InterComponentWare AG:
>>
>> Vorstand: Peter Kirschbauer (Vors.), Matthias Glück
>>
>> Aufsichtsratsvors.: Prof. Dr. Christof Hettich
>>
>> Firmensitz: 69190 Walldorf, Altrottstraße 31
>>
>> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
>>
>>
>> ---------------------------------------------------------------------
>>
>> To unsubscribe from this list, please visit:
>>
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>> InterComponentWare AG:
>> Vorstand: Peter Kirschbauer (Vors.), Matthias Glück
>> Aufsichtsratsvors.: Prof. Dr. Christof Hettich
>> Firmensitz: 69190 Walldorf, Altrottstraße 31
>> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: jaxb2 plugin: schemagen has namespace prefix problem

stefan.albrecht

ok, thanks for the info, I created that issue: http://jira.codehaus.org/browse/MJAXB-80

Cheers,
Stefan

-----[hidden email] wrote: -----

To: Mojo Users List <[hidden email]>
From: Anders Hammar <[hidden email]>
Sent by: [hidden email]
Date: 09/10/2013 10:25
Subject: Re: [mojo-user] Re: jaxb2 plugin: schemagen has namespace prefix problem

Yes, I know. Life isn't easy. :-)
Seriously speking though, if I point out where to find the info how to get access here in this thread maybe it will help someone later on if they search the archive. At least until HAUS-2323 is fixed (might not be possible due to a JIRA limitation).


/Anders

On Tue, Sep 10, 2013 at 10:19 AM, Jörg Schaible <[hidden email]> wrote:

Anders Hammar wrote:


> There are instructions on the welcome screen for Codehaus's JIRA (the

> dashboard when not signed in). Look in the upper left box named

> "Introduction".


Very hard to find. See also

http://jira.codehaus.org/browse/HAUS-2323


>

> /Anders

>

>

> On Tue, Sep 10, 2013 at 9:48 AM, <[hidden email]> wrote:

>

>>

>> Hi,

>>

>> Where do I get a JIRA account for that project or guest permissions to

>> create issues ? Then I could create an issue for this problem.

>>

>> Cheers,

>> Stefan

>>

>>

>> -----[hidden email] wrote: -----

>>

>> To: Mojo Users List <[hidden email]>

>> From: Anders Hammar <[hidden email]>

>> Sent by: [hidden email]

>> Date: 09/10/2013 08:55

>> Subject: Re: [mojo-user] jaxb2 plugin: schemagen has namespace prefix

>> problem

>>

>> You should file a JIRA ticket [1] reporting this problem. Attach your

>> test project as well.

>> [1] http://jira.codehaus.org/browse/MJAXB

>>

>> /Anders

>>

>> On Tue, Sep 10, 2013 at 8:52 AM,  <[hidden email]> wrote:

>>

>>

>>

>> Hi all,

>>

>>

>> I use version 1.5 of the mojo jaxb2 maven plugin for generating schema

>> files from annotated classes.

>>

>> I seem to have found problems with the replacement of namespace prefixes

>> as configured in the transformSchema configuration section.

>>

>> What happens is that the plugin first creates a schema1.xsd file, with

>> tns as prefix for the target namespace. Then the file is renamed, as

>> configured in the transformSchema section and the appropriate prefix

>> changed as well - BUT NOT EVERYWHERE : for type / base attributes the tns

>> prefix is untouched, thus the resulting schema file is invalid:

>>

>>

>>

>> Example excerpts:

>>

>> <xs:element name="someOtherImportItem" type="tns:someOtherImportItem"/>

>>

>>

>>  or:

>>

>>

>>   <xs:complexType name="someImportItem">

>>

>>     <xs:complexContent>

>>

>>       <xs:extension base="tns:importItem">

>>

>> ...

>>

>>

>> I attached an example project.

>>

>>

>> Cheers,

>>

>> Stefan

>>

>>

>>

>> InterComponentWare AG:

>>

>> Vorstand: Peter Kirschbauer (Vors.), Matthias Glück

>>

>> Aufsichtsratsvors.: Prof. Dr. Christof Hettich

>>

>> Firmensitz: 69190 Walldorf, Altrottstraße 31

>>

>> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

>>

>>

>> ---------------------------------------------------------------------

>>

>> To unsubscribe from this list, please visit:

>>

>>

>>     http://xircles.codehaus.org/manage_email

>>

>>

>>

>>

>> InterComponentWare AG:

>> Vorstand: Peter Kirschbauer (Vors.), Matthias Glück

>> Aufsichtsratsvors.: Prof. Dr. Christof Hettich

>> Firmensitz: 69190 Walldorf, Altrottstraße 31

>> AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

>> ---------------------------------------------------------------------

>> To unsubscribe from this list, please visit:

>>

>>     http://xircles.codehaus.org/manage_email

>>

>>

>>




---------------------------------------------------------------------

To unsubscribe from this list, please visit:


    http://xircles.codehaus.org/manage_email





  
InterComponentWare AG:  
Vorstand: Peter Kirschbauer (Vors.), Matthias Glück  
Aufsichtsratsvors.: Prof. Dr. Christof Hettich  
Firmensitz: 69190 Walldorf, Altrottstraße 31  
AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516  
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email