IntelliJ Java IDE
The moose likes Web Services and the fly likes How to create arrays in WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "How to create arrays in WSDL" Watch "How to create arrays in WSDL" New topic
Author

How to create arrays in WSDL

Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 224
Hi i know we could make arrays in WSDL but i couldnt find an example online. Could you guys give a simple example on how an array string or an array of object be created in a WSDL.
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2186
Hi!
When you define an element, use the maxOccurs attribute and set it either to the maximum number you want the array to be able to hold or to "unbounded" for an array of unlimited size.
Example:

The above element can occur zero or more times and is of the string type.
Example use:

Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 224
Ivan Krizsan wrote:Hi!
When you define an element, use the maxOccurs attribute and set it either to the maximum number you want the array to be able to hold or to "unbounded" for an array of unlimited size.
Example:

The above element can occur zero or more times and is of the string type.
Example use:

Best wishes!


That definitely did the trick!!! Thank you
Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 224
I would appreciate if you could also tell me how an object would be created I tried the following


but that just gives me an error
Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 224
Narrowing it down i think the cmplier has a problem with the name of the complex type


Any suggestions why the object is not being created ???
Ivan Krizsan
Bartender

Joined: Oct 04, 2006
Posts: 2186
Hi!
What kind of error do you get and when?
Best wishes!
 
 
subject: How to create arrays in WSDL
 
Threads others viewed
Non-static method cannot be refrenced from a static context
How to input user values multi-dimensional arrays
Dimensional Travel
An object to hold several arrays
2 Dimmensional Array and asList
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com