Share via


SampleWebService Metadata

This topic contains the complete XML metadata for the Sample Web Service. As you know, it illustrates several complex Web service-related concepts in the Business Data Catalog. To better understand the sample, follow the walkthrough steps and review the comments in the SampleWebService metadata XML.

The source for the SampleWebService Web service is also included in the Microsoft Office SharePoint Server 2007 SDK download. Before importing the metadata, publish it on a Web server and update the WSDLFetchURL property accordingly.

Metadata

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- This XML defines the metadata for the SampleWebService Web 
service defined in the SDK. This demonstrates several complex concepts 
related to metadata authoring.-->
<!-- The Business Data Catalog uses the LOB system name as the 
application name in the Administation user interface.-->
<LobSystem xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schemas.microsoft.com/office/2006/03/BusinessDataCatalog BDCMetadata.xsd" Type="WebService" Version="1.0.0.0" Name="SampleWebService" xmlns="https://schemas.microsoft.com/office/2006/03/BusinessDataCatalog">
  <Properties>
    <!-- The Web Service proxy namespace name you specify here 
     is used by the Business Data Catalog when it generates the 
     proxy.-->
    <Property Name="WebServiceProxyNamespace" Type="System.String">SampleWebServiceProxy</Property>
    <!-- Enter the wildcard character that your Web methods 
     support. The Business Data Catalog uses the wildcard 
     character with filters.-->
    <Property Name="WildcardCharacter" Type="System.String">$</Property>
    <!-- URL to WSDL or ASMX.-->
    <Property Name="WsdlFetchUrl" Type="System.String">http://YourWebServerName/Service.asmx</Property>
  </Properties>
  <LobSystemInstances>
    <!-- The LOB instance name is used by business data clients in the 
     entity picker, and so on.-->
    <LobSystemInstance Name="SampleWebServiceInstance">
      <Properties>
        <Property Name="LobSystemName" Type="System.String">SampleWebService</Property>
      </Properties>
    </LobSystemInstance>
  </LobSystemInstances>
  <Entities>
    <!-- Defines the entity called Address. The Address structure is 
    part of the customer structure returned by the GetCustomerByID Web 
    method.-->
    <!-- By defining an entity for Address, we can model an association 
    and return the addresses for each customer.-->
    <!-- Because this entity is used only in association methods, we 
    do not need any other methods.-->
    <!-- The association method reuses the GetCustomerByID method of 
    the Customer entity to return the address collection.-->
    <Entity EstimatedInstanceCount="10000" Name="Address">
      <Properties>
        <Property Name="Title" Type="System.String">StateProvince</Property>
      </Properties>
      <!--This entity does not have any identifier as we just want to 
      display a list of addresses for a customer. -->
      <!--This means that it's just a blob of data - you cannot run 
      actions on this entity, use the entity instance picker, relate 
      with it, cannot search or crawl it, and so on. -->
      <Methods>
        <!-- Dummy finder for Address entity. -->
        <Method Name="GetAddresses">
          <Parameters>
            <Parameter Direction="Return" Name="Addresses">
              <TypeDescriptor TypeName="SampleWebServiceProxy.CustomerAddress[], SampleWebService" IsCollection="true" Name="CustomerAddresses" >
                <TypeDescriptors>
                  <TypeDescriptor TypeName="SampleWebServiceProxy.CustomerAddress, SampleWebService" Name="CustomerAddress" >
                    <Properties>
                      <Property Name="ComplexFormatting" Type="System.String" />
                      <Property Name="FormatString" Type="System.String">{0}, {1}, {2}, {3} - PostalCode, {4}</Property>
                    </Properties>
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="SampleWebServiceProxy.CustomerStreet, SampleWebService" Name="Street">
                        <TypeDescriptors>
                          <TypeDescriptor TypeName="System.String" Name="BlockNumber" />
                          <TypeDescriptor TypeName="System.String" Name="Street" />
                        </TypeDescriptors>
                      </TypeDescriptor>
                      <TypeDescriptor TypeName="System.String" Name="City" />
                      <TypeDescriptor TypeName="System.String" Name="StateProvince" />
                      <TypeDescriptor TypeName="System.String" Name="CountryRegion" />
                      <TypeDescriptor TypeName="System.String" Name="PostalCode" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="Finder" ReturnParameterName="Addresses" ReturnTypeDescriptorName="CustomerAddresses" ReturnTypeDescriptorLevel="0" Name="GetAddressesInstance" />
          </MethodInstances>
        </Method>
      </Methods>
    </Entity>
    <!-- The Customer entity has IDEnumerator, 
    Finder, and SpecificFinder.-->
    <!-- The Customer return structure from the Web method 
    GetCustomerByID also contains an address collection that is used 
    to get addresses for a customer.-->
    <!-- The Customer entity also demonstrates the self-referential entity 
    association concept - cusomers have child customers. The 
    GetChildCustomersForCustomer method is the association method.-->
    <Entity EstimatedInstanceCount="10000" Name="Customer">
      <Properties>
        <Property Name="Title" Type="System.String">Name</Property>
      </Properties>
      <Identifiers>
        <Identifier TypeName="System.String" Name="CustomerID" />
      </Identifiers>
      <Methods>
        <!--Demonstrates the self-referential entity association 
        concept.-->
        <!--Each customer in the back-end data source has a 
        ParentCustomerID.-->
        <Method Name="GetChildCustomersForCustomer">
          <Parameters>
            <!--Parameter names are tokens used by the Business 
            Data Catalog. You can name them anything.-->
            <!--TypeDescriptor names must match the back-end input and 
            output structures' or fields' names.-->
            <Parameter Direction="In" Name="custid">
              <TypeDescriptor TypeName="System.String" IdentifierName="CustomerID" Name="custid" />
            </Parameter>
            <Parameter Direction="Return" Name="Customers">
              <!-- The TypeName attribute takes the type and the LOB 
              system name for complex types.-->
              <!-- The IsCollection is true here because the customer 
              array is a collection of customers.-->
              <!-- The TypeDescriptor with IsCollection= true can have 
              only one child.-->
              <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>
          </Parameters>
        </Method>
        <Method Name="GetCustomerIDs">
          <Parameters>
            <Parameter Direction="Return" Name="CustomerIDs">
              <TypeDescriptor TypeName="System.String[]" IsCollection="true" Name="ArrayOfString">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.String" IdentifierName="CustomerID" Name="CustomerID" />
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="IdEnumerator" ReturnParameterName="CustomerIDs" ReturnTypeDescriptorName="ArrayOfString" ReturnTypeDescriptorLevel="0" Name="GetCustomerIDsInstance" />
          </MethodInstances>
        </Method>
        <Method Name="GetCustomers">
          <FilterDescriptors>
            <FilterDescriptor Type="Wildcard" Name="Name" />
            <!-- Limit filter tells Business Data Catalog to bring back 
            only the specified number of rows back from the LOB 
            application.-->
            <!-- Notice that the back-end method should support this 
            functionality to return only the specified number of rows. 
            For a sample, see SampleWebService.-->
            <FilterDescriptor Type="Limit" Name="Limit" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Direction="In" Name="name">
              <TypeDescriptor TypeName="System.String" AssociatedFilter="Name" Name="name" />
            </Parameter>
            <Parameter Direction="In" Name="limit">
              <TypeDescriptor TypeName="System.Int32" AssociatedFilter="Limit" Name="limit" />
            </Parameter>
            <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>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="Finder" ReturnParameterName="Customers" ReturnTypeDescriptorName="ArrayOfCustomer" ReturnTypeDescriptorLevel="0" Name="FindCustomerInstances" />
          </MethodInstances>
        </Method>
        <Method Name="GetCustomerByID">
          <!--SpecificFinder for customer.-->
          <!--The GetCustomerByID is also reused as an association method for getting addresses of a customer.-->
          <Parameters>
            <Parameter Direction="In" Name="id">
              <TypeDescriptor TypeName="System.String" IdentifierName="CustomerID" Name="id" />
            </Parameter>
            <Parameter Direction="Return" Name="Customer">
              <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" />
                  <!--The Customer structure also contains a collection 
                  of addresses for the customer. -->
                  <!--Return parameters can have multiple TypeDescriptors with IsCollection=true. This is an example of that.-->
                  <!--When Business Data Caltalog executes the SpecificFinder, it ignores the addresses collection because it is a collection.-->
                  <!--When this same method is used to get addresses for a customer in an association, the return TypeDecriptor name is specified as CustomerAddresses.-->
                  <TypeDescriptor TypeName="SampleWebServiceProxy.CustomerAddress[], SampleWebService" IsCollection="true" Name="CustomerAddresses" >
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="SampleWebServiceProxy.CustomerAddress, SampleWebService" Name="CustomerAddress" >
                        <Properties>
                          <!--Business Data clients can display only primitives and flat structures by default.-->
                          <!--To display the Street structure that is part of the Address, we use ComplexFormatting.-->
                          <!--To use ComplexFormatting, you must 
                          enable it at the TypeDescriptor that 
                          contains the struct as shown below.-->
                          <Property Name="ComplexFormatting" Type="System.String" />
                        </Properties>
                        <TypeDescriptors>
                          <TypeDescriptor TypeName="SampleWebServiceProxy.CustomerStreet, SampleWebService" Name="Street">
                            <Properties>
                              <!--After ComplexFormatting is 
                              enabled in the container of this struct, 
                              define the format here.-->
                              <!--{0}, {1} stand for BlockNumber and Street of the Street struct. -->
                              <Property Name="FormatString" Type="System.String">{0}, {1}</Property>
                            </Properties>
                            <TypeDescriptors>
                              <TypeDescriptor TypeName="System.String" Name="BlockNumber" />
                              <TypeDescriptor TypeName="System.String" Name="Street" />
                            </TypeDescriptors>
                          </TypeDescriptor>
                          <TypeDescriptor TypeName="System.String" Name="City" />
                          <TypeDescriptor TypeName="System.String" Name="StateProvince" />
                          <TypeDescriptor TypeName="System.String" Name="CountryRegion" />
                          <TypeDescriptor TypeName="System.String" Name="PostalCode" />
                        </TypeDescriptors>
                      </TypeDescriptor>
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="SpecificFinder" ReturnParameterName="Customer" ReturnTypeDescriptorName="Customer" ReturnTypeDescriptorLevel="0" Name="FindCustomerInstance" />
            <!--Association is defined at the bottom.-->
          </MethodInstances>
        </Method>
      </Methods>
    </Entity>
    <Entity EstimatedInstanceCount="10000" Name="Region">
      <Properties>
        <Property Name="Title" Type="System.String">Name</Property>
      </Properties>
      <Identifiers>
        <Identifier TypeName="System.String" Name="RegionID" />
      </Identifiers>
      <Methods>
        <Method Name="GetRegions">
          <FilterDescriptors>
            <FilterDescriptor Type="Wildcard" Name="Name" />
          </FilterDescriptors>
          <Parameters>
            <Parameter Direction="In" Name="name">
              <TypeDescriptor TypeName="System.String" AssociatedFilter="Name" Name="name" />
            </Parameter>
            <Parameter Direction="Return" Name="Regions">
              <TypeDescriptor TypeName="SampleWebServiceProxy.Region[], SampleWebService" IsCollection="true" Name="ArrayOfRegion">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="SampleWebServiceProxy.Region, SampleWebService" Name="Region">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.String" IdentifierName="RegionID" Name="RegionID" />
                      <TypeDescriptor TypeName="System.String" Name="Name" />
                      <TypeDescriptor TypeName="System.String" Name="Group" />
                      <TypeDescriptor TypeName="System.Decimal" Name="SalesLastYear" />
                      <TypeDescriptor TypeName="System.Decimal" Name="SalesYTD" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="Finder" ReturnParameterName="Regions" ReturnTypeDescriptorName="ArrayOfRegion" ReturnTypeDescriptorLevel="0" Name="FindRegionInstances" />
          </MethodInstances>
        </Method>
        <Method Name="GetRegionByID">
          <Parameters>
            <Parameter Direction="In" Name="id">
              <TypeDescriptor TypeName="System.String" IdentifierName="RegionID" Name="id" />
            </Parameter>
            <Parameter Direction="Return" Name="Region">
              <TypeDescriptor TypeName="SampleWebServiceProxy.Region, SampleWebService" Name="Region">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.String" IdentifierName="RegionID" Name="RegionID" />
                  <TypeDescriptor TypeName="System.String" Name="Name" />
                  <TypeDescriptor TypeName="System.String" Name="Group" />
                  <TypeDescriptor TypeName="System.Decimal" Name="SalesLastYear" />
                  <TypeDescriptor TypeName="System.Decimal" Name="SalesYTD" />
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="SpecificFinder" ReturnParameterName="Region" ReturnTypeDescriptorName="Region" ReturnTypeDescriptorLevel="0" Name="FindRegionInstance" />
          </MethodInstances>
        </Method>
      </Methods>
    </Entity>
    <Entity EstimatedInstanceCount="10000" Name="Order">
      <Properties>
        <Property Name="Title" Type="System.String">OrderID</Property>
      </Properties>
      <Identifiers>
        <Identifier TypeName="System.String" Name="OrderID" />
      </Identifiers>
      <Methods>
        <!--Association method - Demonstrates an assoication that has 
        two sources - Customer and Region.-->
        <!--Also demonstrates that you can have filters in association 
        methods as well.-->
        <Method Name="GetOrdersForCustomerAndRegion">
          <FilterDescriptors>
            <FilterDescriptor Type="Comparison" Name="CurrencyCode" >
              <Properties>
                <Property Name="Comparator" Type="System.String">Equals</Property>
              </Properties>
            </FilterDescriptor>
          </FilterDescriptors>
          <Parameters>
            <Parameter Direction="In" Name="custid">
              <!--Specify the IdentifierEntityName when the identifier 
              you want to point to is not in the local entity. -->
              <!--In this case, the input parameters for this 
              association are the foreign keys from the Customer and 
              Region entities.-->
              <TypeDescriptor TypeName="System.String" IdentifierName="CustomerID" IdentifierEntityName="Customer" Name="custid" />
            </Parameter>
            <Parameter Direction="In" Name="regid">
              <TypeDescriptor TypeName="System.String" IdentifierName="RegionID" IdentifierEntityName="Region" Name="regid" />
            </Parameter>
            <Parameter Direction="In" Name="curcode">
              <TypeDescriptor TypeName="System.String" AssociatedFilter="CurrencyCode" Name="curcode" />
            </Parameter>
            <Parameter Direction="Return" Name="Orders">
              <TypeDescriptor TypeName="SampleWebServiceProxy.Order[], SampleWebService" IsCollection="true" Name="ArrayOfOrder">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="SampleWebServiceProxy.Order, SampleWebService" Name="Order">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="OrderID" />
                      <TypeDescriptor TypeName="System.String" Name="CustomerID" />
                      <TypeDescriptor TypeName="System.String" Name="RegionID" />
                      <TypeDescriptor TypeName="System.String" Name="CurrencyCode" />
                      <TypeDescriptor TypeName="System.Decimal" Name="SubTotal" />
                      <TypeDescriptor TypeName="System.String" Name="OrderDate" />
                      <TypeDescriptor TypeName="System.String" Name="ShipDate" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
        </Method>
        <Method Name="GetOrderByID">
          <Parameters>
            <Parameter Direction="In" Name="id">
              <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="id" />
            </Parameter>
            <Parameter Direction="Return" Name="Order">
              <TypeDescriptor TypeName="SampleWebServiceProxy.Order, SampleWebService" Name="Order">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="OrderID" />
                  <TypeDescriptor TypeName="System.String" Name="CustomerID" />
                  <TypeDescriptor TypeName="System.String" Name="RegionID" />
                  <TypeDescriptor TypeName="System.String" Name="CurrencyCode" />
                  <TypeDescriptor TypeName="System.Decimal" Name="SubTotal" />
                  <TypeDescriptor TypeName="System.String" Name="OrderDate" />
                  <TypeDescriptor TypeName="System.String" Name="ShipDate" />
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="SpecificFinder" ReturnParameterName="Order" ReturnTypeDescriptorName="Order" ReturnTypeDescriptorLevel="0" Name="FindOrderInstance" />
          </MethodInstances>
        </Method>
        <Method Name="GetOrders">
          <Parameters>
            <Parameter Direction="Return" Name="Orders">
              <TypeDescriptor TypeName="SampleWebServiceProxy.Order[], SampleWebService" IsCollection="true" Name="ArrayOfOrder">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="SampleWebServiceProxy.Order, SampleWebService" Name="Order">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="OrderID" />
                      <TypeDescriptor TypeName="System.String" Name="CustomerID" />
                      <TypeDescriptor TypeName="System.String" Name="RegionID" />
                      <TypeDescriptor TypeName="System.String" Name="CurrencyCode" />
                      <TypeDescriptor TypeName="System.Decimal" Name="SubTotal" />
                      <TypeDescriptor TypeName="System.String" Name="OrderDate" />
                      <TypeDescriptor TypeName="System.String" Name="ShipDate" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="Finder" ReturnParameterName="Orders" ReturnTypeDescriptorName="ArrayOfOrder" ReturnTypeDescriptorLevel="0" Name="FindOrderInstances" />
          </MethodInstances>
        </Method>
      </Methods>
    </Entity>
    <!--This entity demonstrates the use of multiple 
    identifiers.-->
    <!--OrderID is a foriegn key from Order.-->
    <Entity EstimatedInstanceCount="10000" Name="LineItem">
      <Properties>
        <Property Name="Title" Type="System.String">ProductName</Property>
      </Properties>
      <Identifiers>
        <Identifier TypeName="System.String" Name="OrderID" />
        <Identifier TypeName ="System.String" Name="ProductID" />
      </Identifiers>
      <Methods>
        <Method Name="GetLineItemsForOrder">
          <Parameters>
            <Parameter Direction="In" Name="ordid">
              <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" IdentifierEntityName="Order" Name="ordid" />
            </Parameter>
            <Parameter Direction="Return" Name="LineItems">
              <TypeDescriptor TypeName="SampleWebServiceProxy.LineItem[], SampleWebService" IsCollection="true" Name="ArrayOfLineItem">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="SampleWebServiceProxy.LineItem, SampleWebService" Name="LineItem">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="OrderID" />
                      <TypeDescriptor TypeName="System.String" IdentifierName="ProductID" Name="ProductID" />
                      <TypeDescriptor TypeName="System.String" Name="ProductName" />
                      <TypeDescriptor TypeName="System.Int32" Name="OrderQty" />
                      <TypeDescriptor TypeName="System.Decimal" Name="UnitPrice" />
                      <TypeDescriptor TypeName="System.Decimal" Name="LineTotal" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
        </Method>
        <Method Name="GetLineItemByID">
          <Parameters>
            <Parameter Direction="In" Name="ordid">
              <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="ordid" />
            </Parameter>
            <Parameter Direction="In" Name="prodid">
              <TypeDescriptor TypeName="System.String" IdentifierName="ProductID" Name="prodid" />
            </Parameter>
            <Parameter Direction="Return" Name="LineItem">
              <TypeDescriptor TypeName="SampleWebServiceProxy.LineItem, SampleWebService" Name="LineItem">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="OrderID" />
                  <TypeDescriptor TypeName="System.String" IdentifierName="ProductID" Name="ProductID" />
                  <TypeDescriptor TypeName="System.String" Name="ProductName" />
                  <TypeDescriptor TypeName="System.Int32" Name="OrderQty" />
                  <TypeDescriptor TypeName="System.Decimal" Name="UnitPrice" />
                  <TypeDescriptor TypeName="System.Decimal" Name="LineTotal" />
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="SpecificFinder" ReturnParameterName="LineItem" ReturnTypeDescriptorName="LineItem" ReturnTypeDescriptorLevel="0" Name="FindLineItemInstance" />
          </MethodInstances>
        </Method>
        <Method Name="GetLineItems">
          <Parameters>
            <Parameter Direction="Return" Name="LineItems">
              <TypeDescriptor TypeName="SampleWebServiceProxy.LineItem[], SampleWebService" IsCollection="true" Name="ArrayOfLineItem">
                <TypeDescriptors>
                  <TypeDescriptor TypeName="SampleWebServiceProxy.LineItem, SampleWebService" Name="LineItem">
                    <TypeDescriptors>
                      <TypeDescriptor TypeName="System.String" IdentifierName="OrderID" Name="OrderID" />
                      <TypeDescriptor TypeName="System.String" IdentifierName="ProductID" Name="ProductID" />
                      <TypeDescriptor TypeName="System.String" Name="ProductName" />
                      <TypeDescriptor TypeName="System.Int32" Name="OrderQty" />
                      <TypeDescriptor TypeName="System.Decimal" Name="UnitPrice" />
                      <TypeDescriptor TypeName="System.Decimal" Name="LineTotal" />
                    </TypeDescriptors>
                  </TypeDescriptor>
                </TypeDescriptors>
              </TypeDescriptor>
            </Parameter>
          </Parameters>
          <MethodInstances>
            <MethodInstance Type="Finder" ReturnParameterName="LineItems" ReturnTypeDescriptorName="ArrayOfLineItem" ReturnTypeDescriptorLevel="0" Name="FindLineItemInstances" />
          </MethodInstances>
        </Method>
      </Methods>
    </Entity>
  </Entities>
  <Associations>
    <!--Self-refential entity association.-->
    <Association Name="CustomerToChildCustomers" AssociationMethodEntityName="Customer" AssociationMethodName="GetChildCustomersForCustomer" AssociationMethodReturnParameterName="Customers" AssociationMethodReturnTypeDescriptorName="ArrayOfCustomer" AssociationMethodReturnTypeDescriptorLevel="0">
      <SourceEntity Name="Customer" />
      <DestinationEntity Name="Customer" />
    </Association>
    <!--Multiple source association.-->
    <Association Name="CustomerAndRegionToOrders" AssociationMethodEntityName="Order" AssociationMethodName="GetOrdersForCustomerAndRegion" AssociationMethodReturnParameterName="Orders" AssociationMethodReturnTypeDescriptorName="ArrayOfOrder" AssociationMethodReturnTypeDescriptorLevel="0">
      <SourceEntity Name="Customer" />
      <SourceEntity Name="Region" />
      <DestinationEntity Name="Order" />
    </Association>
    <Association Name="OrderToLineItems" AssociationMethodEntityName="LineItem" AssociationMethodName="GetLineItemsForOrder" AssociationMethodReturnParameterName="LineItems" AssociationMethodReturnTypeDescriptorName="ArrayOfLineItem" AssociationMethodReturnTypeDescriptorLevel="0">
      <SourceEntity Name="Order" />
      <DestinationEntity Name="LineItem" />
    </Association>
    <!--Reuses the Web method used for SpecificFinder, also an 
    association method. Uses only a part of the return structure by 
    using the optional AssociationMethodReturnTypeDescriptorName 
    attribute. ArrayOfCustomer is 0 and CustomerAddresses is 1. Only 
    useful to disambiguate same-named TypeDescriptors.-->
    <!--The AssociationMethodReturnTypeDescriptorLevel optional 
    attribute indicates the level of the TypeDescriptor in the 
    return structure. -->
    <Association Name="CustomerToAddresses" AssociationMethodEntityName="Customer" AssociationMethodName="GetCustomerByID" AssociationMethodReturnParameterName="Customer" AssociationMethodReturnTypeDescriptorName="CustomerAddresses" AssociationMethodReturnTypeDescriptorLevel="1">
      <SourceEntity Name="Customer" />
      <DestinationEntity Name="Address" />
    </Association>
  </Associations>
</LobSystem>

See Also

Tasks

AdventureWorks SQL Server 2000 Sample
AdventureWorksDW SQL Server 2005 Sample