16 years ago
Form-Editor: Sequence is shown as a single element
Hi,
I have set up a WCF web service with help of an XSD from the OpenTravel Alliance. The XSD and off course also the corresponding WSDL is very big and complex.
Usually SoapUI has no problems dealing with sequences, but there is one message where SoapUI seems to fail. Within it an element is defined with maxOccurs="unbounded", so it should be displayed as an Array within the Form-Editor. Instead it is displayed as a single element, as if maxOccours would be 1.
Writing the sequence into the XML Editor directly works perfectly to create valid requests, just the Form Editor doesn't work correctly. When I switch back to the Form Editor just the first element of the sequence is shown.
Here an extract of the WSDL:
Here HotelRef is defined with maxOccur="unbounded", so it should appear as a sequence within SoapUI, but like CodeRef it's just shown as a single element and there is no way to add a new element, like it is possible for a Criterion.
As you can see, the definition is quite complex: HotelRef is an element with unbounded occurences within a sequence of ItemSearchCriterionType, which is defined as a base for HotelSearchCriterionType, which is again a base for Criterion. Actually also Criterion is again an element of a sequence of a superior structure, but I hope this extract is enough for understanding the issue.
Whats going wrong here? Why is the array of elements just shown as one element?
Thanks for your help,
Dante
I have set up a WCF web service with help of an XSD from the OpenTravel Alliance. The XSD and off course also the corresponding WSDL is very big and complex.
Usually SoapUI has no problems dealing with sequences, but there is one message where SoapUI seems to fail. Within it an element is defined with maxOccurs="unbounded", so it should be displayed as an Array within the Form-Editor. Instead it is displayed as a single element, as if maxOccours would be 1.
Writing the sequence into the XML Editor directly works perfectly to create valid requests, just the Form Editor doesn't work correctly. When I switch back to the Form Editor just the first element of the sequence is shown.
Here an extract of the WSDL:
<xs:element minOccurs="0" maxOccurs="unbounded" name="Criterion">
<xs:complexType>
<xs:complexContent mixed="false">
<xs:extension base="tns:HotelSearchCriterionType">
[...]
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="HotelSearchCriterionType">
<xs:complexContent mixed="false">
<xs:extension base="tns:ItemSearchCriterionType">
[...]
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ItemSearchCriterionType">
<xs:sequence>
[...]
<xs:element minOccurs="0" maxOccurs="1" name="CodeRef">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="tns:LocationType">
<xs:attribute name="VicinityCode" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded" name="HotelRef">
<xs:complexType>
<xs:attribute name="ChainCode" type="xs:string"/>
[...]
<xs:attribute name="ExtendedCitySearchIndicator" type="xs:boolean"/>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Radius">
<xs:complexType>
[...]
</xs:complexType>
</xs:element>
[...]
</xs:sequence>
<xs:attribute name="Ranking" type="xs:integer"/>
[...]
</xs:complexType>
Here HotelRef is defined with maxOccur="unbounded", so it should appear as a sequence within SoapUI, but like CodeRef it's just shown as a single element and there is no way to add a new element, like it is possible for a Criterion.
As you can see, the definition is quite complex: HotelRef is an element with unbounded occurences within a sequence of ItemSearchCriterionType, which is defined as a base for HotelSearchCriterionType, which is again a base for Criterion. Actually also Criterion is again an element of a sequence of a superior structure, but I hope this extract is enough for understanding the issue.
Whats going wrong here? Why is the array of elements just shown as one element?
Thanks for your help,
Dante