[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 610
  • Last Modified:

XSD: Return array

I am writing an XSD, in which I need to define an operation which would return all the IDs. since the no. of IDs can be more than one, this operation needs to return an array. For this I need to define a type. If I do this

<xsd:complexType name="getResumeIdsResponse">
                              <xsd:sequence>      
                              <xsd:element name="resumeIds" type="xsd:string" />                                
                        </xsd:sequence>                      
                  </xsd:complexType>
It would be able to return only 1 ID. Is there a way to return a String array?

Thank you
0
ank9
Asked:
ank9
2 Solutions
 
shaheedhaCommented:
Try this:
<xsd:complexType name="getResumeIdsResponse">
  <xsd:sequence>      
    <xsd:element name="resumeIds" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />                                
  </xsd:sequence>                      
</xsd:complexType>
0
 
Geert BormansInformation ArchitectCommented:
Depends on what you need...

a list of resumeIds elements, would be like this
        <xsd:sequence>      
            <xsd:element name="resumeIds" type="xsd:string" maxOccurs="unbounded"/>                                
        </xsd:sequence>                      

or a resumeIds element that contains a list (space seperated that would be)
            <xsd:element name="resumeIds" maxOccurs="unbounded">
                <xsd:simpleType>
                    <xsd:list itemType="xsd:token"></xsd:list>
                </xsd:simpleType>
            </xsd:element>                                
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now