4.2 Retrieve FilterDescriptors Contained by a Method That Contains a Particular MethodInstance
In this scenario, the client finds a set of FilterDescriptors contained by the Method that contains a particular MethodInstance. This MethodInstance has a MetadataObjectId known by the client.
The following are the steps of this scenario:
The client issues a GetMethodForMethodInstance request (section 3.1.4.4) with the known MetadataObjectId of a MethodInstance to get the Method containing the MethodInstance.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetMethodForMethodInstance xmlns="http://schemas.microsoft.com/OfficeServer/BusinessDataCatalog/"> <methodInstanceId>214</methodInstanceId> </GetMethodForMethodInstance > </soap:Body> </soap:Envelope>
The response to this request contains the MetadataObjectId for that Method as well as other information about it.
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetMethodForMethodInstanceResponse xmlns="http://schemas.microsoft.com/OfficeServer/BusinessDataCatalog/"> <GetMethodForMethodInstanceResult> <id>195</id> <name>GetProducts</name> <entityId>193</entityId> <isStatic>true</isStatic> <lcids> <int>0</int> <int>1033</int> </lcids> <localizedNames> <string>Product</string> <string>Products</string> </localizedNames> <propertyNames> <string>RdbCommandText</string> <string>RdbCommandType</string> </propertyNames> <propertyTypes> <string>System.String</string> <string>System.Data.CommandType</string> </propertyTypes> <propertyValues> <string>SELECT * FROM DimProduct WHERE (ProductKey >= @MinProductKey) AND (ProductKey <= @MaxProductKey) AND (EnglishProductName LIKE @EnglishProductName) AND (EnglishDescription LIKE @EnglishDescription) AND (Status='Current')</string> <string>Text</string> </propertyValues> </GetMethodForMethodInstanceResult> </GetMethodForMethodInstanceResponse> </soap:Body> </soap:Envelope>
The client issues a GetFilterDescriptorsForMethod request (section 3.1.4.2) with the Method MetadataObjectId found in step 1.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetFilterDescriptorsForMethod xmlns="http://schemas.microsoft.com/OfficeServer/BusinessDataCatalog/"> <methodId>195</methodId> </GetFilterDescriptorsForMethod> </soap:Body> </soap:Envelope>
The response to this request contains a list of FilterDescriptors.
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <GetFilterDescriptorsForMethodResponse xmlns="http://schemas.microsoft.com/OfficeServer/BusinessDataCatalog/"> <GetFilterDescriptorsForMethodResult> <FilterDescriptorStruct> <id>354</id> <name>limtFilter</name> <typeName>Microsoft.Office.Server.ApplicationRegistry.Runtime.LimitFilter</typeName> <methodId>195</methodId> <lcids> <int>0</int> <int>1033</int> </lcids> <localizedNames> <string>name</string> <string>key</string> </localizedNames> <propertyNames> <string>limitComparator</string> </propertyNames> <propertyTypes> <string>System.String</string> </propertyTypes> <propertyValues> <string>limit</string> </propertyValues> </FilterDescriptorStruct> <FilterDescriptorStruct> <id>355</id> <name>WildcardFilter</name> <typeName>Microsoft.Office.Server.ApplicationRegistry.Runtime.WildcardFilter</typeName> <methodId>195</methodId> <lcids> <int>0</int> </lcids> <localizedNames> <string>name</string> </localizedNames> <propertyNames> <string>UsedForDisambiguation</string> </propertyNames> <propertyTypes> <string>System.Boolean</string> </propertyTypes> <propertyValues> <string>True</string> </propertyValues> </FilterDescriptorStruct> <FilterDescriptorStruct> <id>356</id> <name>equalFilter</name> <typeName>Microsoft.Office.Server.ApplicationRegistry.Runtime.ComparisonFilter</typeName> <methodId>195</methodId> <lcids> <int>0</int> <int>1033</int> </lcids> <localizedNames> <string>name</string> <string>key</string> </localizedNames> <propertyNames> <string>UsedForDisambiguation</string> <string>Comparator</string> </propertyNames> <propertyTypes> <string>System.Boolean</string> <string>System.String</string> </propertyTypes> <propertyValues> <string>True</string> <string>Equals</string> </propertyValues> </FilterDescriptorStruct> <FilterDescriptorStruct> <id>360</id> <name>lastIdFilter</name> <typeName>Microsoft.Office.Server.ApplicationRegistry.Runtime.LastIdFilter</typeName> <methodId>195</methodId> <lcids> <int>0</int> <int>1033</int> </lcids> <localizedNames> <string>name</string> <string>Id</string> </localizedNames> <propertyNames> <string>lastIdComparator</string> </propertyNames> <propertyTypes> <string>System.String</string> </propertyTypes> <propertyValues> <string>lastId</string> </propertyValues> </FilterDescriptorStruct> <FilterDescriptorStruct> <id>363</id> <name>comparisionFilter</name> <typeName>Microsoft.Office.Server.ApplicationRegistry.Runtime.ComparisonFilter</typeName> <methodId>353</methodId> <lcids> <int>0</int> <int>1033</int> </lcids> <localizedNames> <string>name</string> <string>compare</string> </localizedNames> <propertyNames> <string>comparator</string> </propertyNames> <propertyTypes> <string>System.String</string> </propertyTypes> <propertyValues> <string>comparator1</string> </propertyValues> </FilterDescriptorStruct> </GetFilterDescriptorsForMethodResult> </GetFilterDescriptorsForMethodResponse> </soap:Body> </soap:Envelope>