File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create arrays in WSDL

 
Rajesh Khan
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Rajesh Khan
Ranch Hand
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 230
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
What kind of error do you get and when?
Best wishes!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic