Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setter method not generated in stub classes

 
Nev Mehta
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Created a HelloWorld webservice to try to learn how to use objects as input and return params. I created the webservice which had a method



Following are the HelloWorldIn and HelloWorldOut objects



WSDL was generated, following was the XSD representation of the objects



Problem is when i generate stub classes using wsimport the setters for the List variable are missing for HelloWorldIn and HelloWorldOut. Any clues why this maybe happening?
 
James Boswell
Bartender
Posts: 1051
5
Chrome Eclipse IDE Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your generated classes, do you see a comment along the lines of:

This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the XXX property.
 
Nev Mehta
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it does and the solution was in the comments itself. As far as the reason is concerned i guess google will suffice. Thanks for pointing out.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic