0 Replies Latest reply on Nov 15, 2013 6:27 PM by Marco Maccio

    WADL+include XSD from another bundle, recreates the classes already gen.

    Marco Maccio Newbie

      Hi all,

      this my situation with two OSGI bundles.


      I've defined a xsd in bundleA/src/main/resources/META-INF/customers.xsd from which with maven-jaxb2-plugin I generate my classes with a proper package name based on the xsd namespace.

      Of course I've exported the package name in the bundleA manifest.

      Then in a bundleB i've the wadl with in its grammar


      $/src/main/resources/META-INF/wadl/PersonService.wadl</wadl>                                     <extraargs>                                         <extraarg>-interface</extraarg>                                         <!--                                         <extraarg>-impl</extraarg>                                         <extraarg>-nexclude</extraarg>                                         <extraarg>http://marmac.name/tutorials/myosgi/model/to/</extraarg>                                         -->                                         <extraarg>-verbose</extraarg>                                         <extraarg>-catalog</extraarg>                                         <extraarg>$/catalog1.xml


      The issue are the following:

      - the customer types defined in the xsd are generated even in the bundleB

      - when I deploy the 2 bundle in Karaf 2.3.3 I got an ClassNotFoundException of the customer type defined in the xsd so that the bundleB doesn't start.


      is there a way to avoid regenerating the customerType?

      I tried the option -noTypes but i'll generate the interface without the types and with response instead of the Customer type.


      isn't available an option that just exclude a package name from be regenerating ?


      The need for this is given by the fact that in this way i can share the types between a REST service with WADL and SOAP Service with WADL. and I can reuse the types.

      Thanks a lot