Table of Contents

Search

  1. Preface
  2. Web Services
  3. SOAP Web Services
  4. WSDL Data Object
  5. Schema Object
  6. How to Create a SOAP Web Service
  7. Operation Mappings
  8. Parsing Web Service SOAP Messages
  9. Generating Web Service SOAP Messages
  10. Web Service Consumer Transformation
  11. REST Web Services
  12. How to Create a REST Web Service
  13. REST Web Service Consumer Transformation
  14. REST and SOAP Web Service Administration
  15. Datatype Compatibility

Web Services Guide

Web Services Guide

Example JSON Response Message

Example JSON Response Message

You have the following schema where the complex type element xmlRoot has element name Likes whose maximum occurrence is unbounded:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="xmlRoot"> <xs:complexType> <xs:all> <xs:element type="xs:byte" name="Age"/> <xs:element type="xs:string" name="FirstName"/> <xs:element type="xs:string" name="Likes" maxOccurs="unbounded" minOccurs="0"/> <xs:element type="xs:string" name="FamilyName"/> </xs:all> </xs:complexType> </xs:element> </xs:schema>
You can change the JSON response in the following format:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="xmlRoot"> <xs:complexType> <xs:choice maxOccurs="unbounded"> <xs:element type="xs:byte" name="Age"/> <xs:element type="xs:string" name="FirstName"/> <xs:element type="xs:string" name="Likes" /> <xs:element type="xs:string" name="FamilyName"/> </xs:choice> </xs:complexType> </xs:element> </xs:schema>
<xs:choice maxOccurs="unbounded">
allows the contents to be repeated one or more times, in any order.