This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
(See also the URL http://www.rekk.de/bloggy/?p=44 where it is described in detail) Problem:Create an XML Schema which will be binded by JAXB to a class structure following certain constrains. You have certain degrees of freedom for your schema design and later you might also use schema annotations provided by JAXB. Modularize your XML schemas, simplest example is: A.xsd uses <include> to include declarations from schema B.xsd. I want to try Netbeans’ excellent schema design features. Eventually I want to publish the schemas in a WAR deployed in a web container. That’s why I decided to put the files directly into the /web directory of the web-project. Trying to use Netbeans’ JAXB Wizard to create a JAXB Binding for A.xsd you will meet certain limitations: schema file changes won’t be visible to the “Regenerate” operation. You could edit the copy of A.xsd created by the JAXB Wizard in src/ conf/xml-resources/jaxb/name_of_the_binding to make changes visible to the task but that will not see changes in B.xsd. The reason is that the ant tasks created by the JAXB Wizard do not provide this kind of granularity.
When "clean and build" target is used, one does not have to modify the 'xml_binding_build' to add additional "depends" to make included Schema changes to be picked up by XJC. To illustrate this I have attached simple Web app which has a.xsd and b.xsd in 'web' folder. a.xsd includes b.xsd. Note class UsePerson uses elements from both a.xsd and b.xsd. Now modify original b.xsd using "Web pages/b.xsd", say Address1 to AddressOne. Click on a.xsd under JAXB bindings, select "refresh" action. Now do clean and build, you will compilation error for UsePerson at using Address1 "String ad1 = a.getAddress1();"
Created attachment 55871 [details] Sample web app with Schema including Schema
@gmpatil, thanks, I see , can confirm what you say. Ok, that is acceptable. But I would want to have in one click or action. It works know by just Clicking "Regenerate". Other propostions to make this work simpler in one click are welcome.
I think JAXB Wiz recognizing binding for internal schema file and using it always instead of local copy will remove unnecessary step of "refresh".
moving opened issues where TM != dev to TM=TBD