For example, i have a getUsersOnline() method on a WebService that returns the users online at that time. The User object (and xml schema) will contain the name, age and location of each user.
So, can i retreive more than one User object ? Like an array of users ? Maybe 1 user, maybe 3, maybe 10.
Hi!
Yes, of course you can retrieve many Users.
If you do Java-first development and the return type of a method in the endpoint implementation class is String[], then the following XML complex type will be generated:
If you do WSDL-first development, then use the maxOccurs attribute, as seen above, to define an array of some type.
Best wishes!