Danny,
Can you provide the schema for <j:Person>? My assumption (based on
this document snipet) is that <j:Person> is defined as an element
rather than a type. You need to look into the schema to find out what
type you should be returning. e.g.:
<x:element name="Person" type="the-type-name">
But given that you have the schema already defined, I recommend that
you use the schema elements and types rather than trying to define new
ones, e.g.:
<xs:element name="getNameList">
<xs:complexType>
<xs:sequence>
<xs:element ref="j:PersonSurName" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getNameListResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" maxOccurs="unbounded"/>
<xs:complexType>
<xs:sequence>
<xs:element ref="j:Person" />
<!-- alternatively define return element as
same type as "Person" element-->
</xs:sequence>
</xs:complexType>
</xs:sequence>
</xs:complexType>
</xs:element>
Anne
On 12/26/06, Danny Lin <[EMAIL PROTECTED]> wrote:
I have a schema that will validate something like this:
<j:Person>
<j:PersonName j:personNameCommentText="">
<j:PersonGivenName>John</j:PersonGivenName>
<j:PersonMiddleName>Middle</j:PersonMiddleName>
<j:PersonSurName>Doe</j:PersonSurName>
</j:PersonName>
</j:Person>
I want to be able to give a last name and receive a list of people with the
same last name. Please see the part of WSDL below in defining the
operations. Can I reference the <Person> type in my WSDL this way? How do I
allow a list of <Person> to be returned? Am I heading the right direction?
Thanks.
<xs:element name="getNameList">
<xs:complexType>
<xs:sequence>
<xs:element name="lastName" nillable="false" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getNameListResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" nillable="true" type="j:Person" />
</xs:sequence>
</xs:complexType>
</xs:element>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]