Mason Wheeler
Mason Wheeler

Reputation: 84590

How many elements go in a sequence if the schema doesn't specify?

I've got a WSDL that I'm trying to implement. The WSDL-reading tool I have had a bug in it that got corrected in the latest release, so I've re-imported it and re-run the codegen, and I've got a bit of a problem.

The schema contains a certain type with a sequence declaration that looks like this:

  <xs:sequence>
    <xs:element ref="ns2:Item"/>
  </xs:sequence>

The original version converted that as a single Item. This version converts it as an array of Item. There are some other types containing sequences, and they all say stuff like

<xs:element maxOccurs="unbounded" minOccurs="0" ref="ns2:SomeType"/>

Those get unambiguously interpreted as arrays. But when it doesn't give bounds like that, what's the correct interpretation? Is it an array or not?

Upvotes: 0

Views: 58

Answers (1)

John Saunders
John Saunders

Reputation: 161791

The default for minOccurs and maxOccurs is 1.

Upvotes: 1

Related Questions