File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes returning a 2-d array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "returning a 2-d array" Watch "returning a 2-d array" New topic

returning a 2-d array

archit thakur

Joined: Jul 10, 2010
Posts: 24
can a 2-d array be returned from the method of end point implementation class generated using annotations?
if not, what is the solution to the problem?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
With the following method in the endpoint implementation class:

If we then look at the generated WSDL, there is the following type declared for the reply of the above method:

The stringArray type is type predefined by JAXB that appears in a separate XML schema:

Thus the data returned from the method will be a list of stringArray-s.
Best wishes!

My free books and tutorials:
archit thakur

Joined: Jul 10, 2010
Posts: 24
thank you, but is it also applicable if i have to return any other datatype array
I agree. Here's the link:
subject: returning a 2-d array
jQuery in Action, 3rd edition