다음을 통해 공유


XML Snippet: Model of a Web Service That Returns an Array

Applies to: SharePoint Server 2010

The following example shows how you can model a Web method that returns an array.

Example

<Entities>
 <Entity EstimatedInstanceCount="10000" Name="MyCustomers">
   <Properties>
    <Property Name="Key" Type="System.String">Key</Property>
   </Properties>
   <Identifiers>
    <Identifier TypeName="System.String" Name="Key" />
   </Identifiers>
   <Methods>
    <Method Name="GetMyCustomers">
     <Parameters>
      <Parameter Direction="Return" Name="Customers">
       <TypeDescriptor TypeName="MyWebServiceProxy.Customers[], 
MyWebService" IsCollection="true" Name="ArrayOfCustomers">
        <TypeDescriptors>
         <TypeDescriptor TypeName="MyWebServiceProxy.Customers, MyWebService" Name="Customers">
          <TypeDescriptors>
           <TypeDescriptor TypeName="System.String" IdentifierName="Key" Name="Key" />
           <TypeDescriptor TypeName="System.String" Name="Value" />
          </TypeDescriptors>
         </TypeDescriptor>
        </TypeDescriptors>
       </TypeDescriptor>
      </Parameter>
     </Parameters>
     <MethodInstances>
      <MethodInstance Type="Finder" ReturnParameterName="Customers" ReturnTypeDescriptorName="ArrayOfCustomers" 
ReturnTypeDescriptorLevel="0" Name="GetMyCustomersInstance" />
     </MethodInstances>
    </Method>
   </Methods>
  </Entity>
 </Entities>
</LobSystem>