Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Sub Classes not getting generated in Jar

Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I am using top-down approach of webservices. I have written wsdl to generate sub-class of a main-class. main class is Account and sub-classes are DomesticAccount and InternationalAccount using <xs:extension base="tns:Account">. When I generate java code from wsdl, sub-classes are getting generated. I have a method with return type of only main class. So when i deploy this service and try to generate jar by pointing to server, I am not getting sub-classes in the jar, may be because they are not part of In Parameters OR Out Parameters of any method. I can use dummy methods to have sub-classes as in parameters and get them generated in the jar. But is there any other way to get sub-classes in the jar, which is rather a refined/perfect approach. Please let me know on this.

Also I am facing the same issue in bottom-up approach. I have the sub-classes which are not part of in parameters or out parameters any method so not getting generated in the deployed service jar and wsdl.

I am using JDK1.5 compiler and IBMWebsphere 6.1 server. Please let me know on this as soon as possible. My work got stuck because of this.

Ranch Hand
Posts: 2198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are using JAXB, then you can use the following approach to define two XML schema types that will result in the JAXB generated classes having the relation parent-child class:

Best wishes!
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic