aspose file tools*
The moose likes Web Services and the fly likes How to create arrays in WSDL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
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: 230
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
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
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: 230
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: 230
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: 230
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
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
What kind of error do you get and when?
Best wishes!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to create arrays in WSDL
 
Similar Threads
Non-static method cannot be refrenced from a static context
An object to hold several arrays
2 Dimmensional Array and asList
Dimensional Travel
How to input user values multi-dimensional arrays