• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Web Service - List vs Array

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic