Business Data Catalog Configuration for WebService to use in the MOSS Enterprise Search.

The most examples for Business Data Catalog(BDC) used a database connection, this is an easy way to connect to a foreign system. In some cases a own Web Service has advantages, because the Web Service can prepare the data for the moss search, for example child entity data can be included in the main entity.

The crawler of MOSS needs two operations for the indexing.

The first method (called “Id Enumerator”) must return all IDs for the entities, which must be indexed. If the indexer should crawl incremental, it must also return the last modified date of each ID.

The second method (called “Specific Finder”) becomes the ID and returns the data of the entity. The Entity may only contains simple type properties, and entities with complex type are not indexed.

I create an example Customer Web Service and the service contains for the search the two methods (Example). The Web Service must use a BasicHttpBinding, because the BDC in MOSS does not use WCF to connect to the Web Service.

 

To create a Business Data Catalog Definitions Microsoft publishes in the MOSS SDK the “Business Data Catalog Definition Editor”, which I use to create the definition file.

The First Step is to create a new LOB (line-of-business) System in the Business Data Catalog Definition Editor, connect it to the Web Service and define the entity and all its methods.

1. Add LOB System and connect to Web Service with the Web Service URL.
image

2. Drag and Drop all Methods for an Entity to the “Design Surface”
image

3. Press “OK” and define a name for the LOB System. The Editor creates an BDC Entity and in it the methods with all the Web Service Parameters (Arguments /Return Value)

4. Rename the Entity (“Customer”) and create the Identifier (“Id”)
image

The next step is to create the “Id Enumerator”, which returns all Ids for the customer entities

1. Define the Identifier Property with “Id(Customer)” in the Return parameter, to show the crawler which is the Id in the result entity.
image image

2. Create the Instance with the name “GetCustomerIds” as an “Id Enumerator” and the Return type must be the “Ids” because the “Id Enumerator” must return a collection.
image

3. Execute the Method Instance “GetCustomerIds” to test the configuration. The result must be a list of Ids.
image

The next step is to create the “Specific Finder”, which returns one customer entity.

1. Define the Identifier Properties with “Id(Customer)” in the operation argument Id and in the Return parameter.
image

2. Create the Instance for the “GetCustomerById” as a “Specific Finder” and the Return type must be “Return”, which contains one Customer with all the entity properties, which must be indexed.
image

3. Execute the Method Instance “GetCustomerById” to test the configuration. The argument should be an existing id and then the result must the data of the entity.
image

Every BDC Entity should contain the “Title” property, which is used to define which Entity property is used as Title in the search result. If no title is defined, the title is the URL of the default action.

Open the Properties for the Entity (“Customer”) and add a property. The Property name must be “Title” and the property value must be the name of the TypeDescriptor in the Return Parameter of the “Specific Finder” method, which contains the title value.
image

If the crawler should support incremental crawling, and the Web Service returns a last modified date, the BDC Entity must contain the “__BdcLastModifiedTimestamp” property, which defines the name of his last modified property.

Open the Properties for the Entity (“Customer”) and add a property. The Property name must be “__BdcLastModifiedTimestamp” and the property value must be the name of the TypeDescriptor in the Return Parameter of the “Specific Finder” and “Id Enumerator” method, which contains the last modified date.
image


Posted Jan 16 2008, 09:25 AM by Rolf Nebhuth
Filed under: ,

Comments

Adis Jugo wrote Read BDC data from MOSS Object Model
on 04-16-2008 23:51

So, what do you do the first when you want to create a rock-solid BDC system with your SharePoint? If

developers.de is a .Net Community Blog powered by daenet GmbH.