On Wednesday, May 18, 2011 1:59:47 AM Tanveer ul Islam wrote:
> Greetings,
>
> Do anyone know how a web service can return a complex type containing
> another complex type? For example i am unable to achieve following:
>
> public class Students {
> List<Student> studentList;
> int totalStudents;
> String bestStudentId;
> }
This should "just work". The one caveat is that the List likely should just
have a "getter" and should be defined as:
List<Student> studentList = new ArrayList<Student>()
or similar. JAXB normally calls something like:
students.getStudentList().add(student)
while unmarshalling.
--
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com