This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Web Services and the fly likes Java Web Service - List vs Array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Web Services
Bookmark "Java Web Service - List vs Array" Watch "Java Web Service - List vs Array" New topic
Author

Java Web Service - List vs Array

Aravind Jerubandi
Ranch Hand

Joined: Dec 17, 2006
Posts: 49
I'm new to web service. I'm using only Java SDK to create web services.

I'm writing some simple web services for testing and I have the following questions.

I have read that JAX-RPC supports array of primitive types. But when I write a simple web service.



and generate the client code from wsdl i get the following WS client interface.



It generates IntArray class having the member protected List


Is this how the arrays are supported in JAX-RPC? So, the only way to pass the array is to create an instance of IntArray and set List of Integers to it?

Also when i make the webservice to Document style

The WS client interface from WSDL has the following method:



The int[ ] array in the original service, became List< Integer>. Same is the case when i try using String array, it becomes List of String.

Does this mean that Array type in the web service is always converted to List in the client code generated from wsdl?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Web Service - List vs Array