BDC-App for Web Service with paging

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




Because not so many people blog about BDC somehow I feel responsible to post a bit about this MOSS feature. Today I will describe how to implement the web service which should be enabled for MOSS search crawler.
Interesting in this scenario is not how to create Lob system based on the web service. More over, the question is how to do this by using of service which retrieve millions of records.

Such service has to provide in general at least two BDC methods: IdEnumerator and FindSpecific. If you do not know what this mean I would recommend to read more about BDC.

Here is the code snippet which shows how to implement the operation GetCustomerPaged (of type IdEnumerator). This operation receives the ID of the last retrieved record and the size of the page which MOSS crawler will supply. After collecting of the data (implementation not described in this post) the operation returns the page of data which contains the list of identifiers in the page and corresponding timestamp. The timestamp information is required because of incremental crawling and not because of paging.

Here is the code:

GetCustomerIdsPaged(GetCustomerIdsPagedRequest request); 

public class GetCustomerIdsPagedRequest

       public int PageSize;

        public string Id;


public class GetCustomerIdsPagedResult
public CustomerId[] Ids;

public class CustomerId
   public CustomerId(string id, DateTime lastModified)

     Id = id;
LastModified = lastModified;

public string Id;

public DateTime LastModified;


Creating method
In the BDC editor we need to create the method of type IdEnumerator.


After the method is created it should look like shown at the next picture:



Create Identifier

Now we need to create the identifier. This is one of properties which service returns in the list of elements of type CustomerId . In this case this is property Id.



Creating Filter

Now we have to create the filter type descriptor of type LastIdFilter and with the name LastIdSeen.



Creating Parameters

Next picture shows all automatically created parameters. We have to bind now the parameter Id to the filter LastIdSeen. All other parameters remain as they are.



Returning parameter
The returning parameter Id has to be mapped to the property Id. This is because the crawler has to know which returning property is identifier.



Testing the method

This is all you have to do. Now you can test the method without of deploying the XML described LobSystem. Select method instance GetPaged and press „Collection“ button.
To do that first set
Testing Arguments and then execute the method.



Goto execute and press next.





Posted Jan 08 2008, 12:27 AM by Damir Dobric


Damir Dobric Posts wrote Indexing and filtering files with IFilter and .NET (C#)
on 01-19-2008 16:30

Indexing of files based on IFilter interface is pretty old Windows technology, which is today still important

kfybasvbp wrote re: BDC-App for Web Service with paging
on 06-26-2009 16:36

sKu0f2  <a href=">, [url=]cpjpkwvkdrtu[/url], [link=]kqksuojqifyr[/link], is a .Net Community Blog powered by daenet GmbH.