File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Setter method not generated in stub classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Setter method not generated in stub classes" Watch "Setter method not generated in stub classes" New topic
Author

Setter method not generated in stub classes

Nev Mehta
Greenhorn

Joined: Jan 09, 2007
Posts: 26
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

Joined: Nov 09, 2011
Posts: 1012
    
    5

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

Joined: Jan 09, 2007
Posts: 26
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Setter method not generated in stub classes
 
Similar Threads
Axis2 POJO web service - wsdl generating xs:anyType
XmlException on calling WSDL2Java
Is it possible to retrive multiple objects at one time ?
EJB3 WSException: Cannot obtain java type mapping
returning a 2-d array