Share via


How to: Model a Web Method That Returns a Complex Parameter

This sample shows how you can model a Web method that returns a complex parameter called Customers.

Example

<Parameter Direction="Return" Name="Customers">
     <TypeDescriptor TypeName="SampleWebServiceProxy.Customer[],
        SampleWebService" IsCollection="true" Name="ArrayOfCustomer">
       <TypeDescriptors>
         <TypeDescriptor TypeName="SampleWebServiceProxy.Customer,
           SampleWebService" Name="Customer">
           <TypeDescriptors>
             <TypeDescriptor TypeName="System.String"
                IdentifierName="CustomerID" Name="CustomerID" />
             <TypeDescriptor TypeName="System.String" Name="Name" />
             <TypeDescriptor TypeName="System.Int64"
                  Name="WorkPhoneNumber" />
             <TypeDescriptor TypeName="System.Int64"
                  Name="MobilePhoneNumber" />
             <TypeDescriptor TypeName="System.String" Name="Industry" />
             <TypeDescriptor TypeName="System.String" Name="WebSite" />
           </TypeDescriptors>
         </TypeDescriptor>
       </TypeDescriptors>
    </TypeDescriptor>
   </Parameter>