如何:为返回复杂参数的 Web 方法建模

以下示例演示了如何为返回名为 Customers 的复杂参数的 Web 方法建模。

示例

<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>