Announcement Announcement Module
Collapse
No announcement yet.
List in an xsd Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • List in an xsd

    Hi,

    I need an xml response like this:

    <GetPersonListResponse>
    <FullName>
    <FirstName>Arun</FirstName>
    <LastName>Sharma</LastName>
    </FullName>
    <FullName>
    <FirstName>Tarun</FirstName>
    <LastName>Sharma</LastName>
    </FullName>
    </GetPersonListResponse>

    I have created an xsd something like this:

    <element name="GetPersonListRequest">
    <complexType>
    <sequence>
    <element name="activeStatus" type="int"/>
    </sequence>
    </complexType>
    </element>

    <element name="GetPersonListResponse">
    <complexType>
    <sequence>
    <element name="nameList" type="foo:FullName"
    maxOccurs="unbounded"/>
    </sequence>
    </complexType>
    </element>

    <complexType name="FullName">
    <sequence>
    <element name="firstName" type="string"/>
    <element name="lastName" type="string"/>
    </sequence>
    </complexType>

    An integer will be passed on as request and the webService will return a list of FullNames based on that integer. I am using a jaxb marshaller with annotations. I know that the xsd is not written correctly. Kindly help.
Working...
X