Working with the BDC Definition Editor

I recently had the opportunity to work with a customer that wanted to consume SAP Enterprise Services web service into Office SharePoint Server 2007. It was the first chance I had to work extensively with the BDC Definition Editor that comes with the MOSS SDK (which you can download from here: Download details- SharePoint Server 2007 SDK- Software Development Kit). It's a free tool which makes it attractive but it definitely doesn't have all the bells and whistles of  some other commercial editors (e.g. BDC Metaman from Lightning Tools: https://www.lightningtools.com/bdc-meta-man/default.aspx).

Still, it's possible it may do the trick for you. However, I ran across a number of issues that required some workarounds to get the editor to work properly.

Handling Authenticated Web Services

The BDC Definition editor does not handle importing WSDL's from web services that use authentication. I worked around this by doing the following:

  1. Open up Internet Explorer (or your favorite browser) and type the path to the web service. Supply the user credentials when prompted
  2. Save the WSDL to a location on your hard drive
  3. Create a new web application in IIS that allows anonymous access and copy the WSDL file into the directory
  4. Open up the BDC metadata editor and click the Add Lob System link. When you click the "Connect to Webservice" link, specify the IIS web app and WSDL you set up in step#3

Handling updates to web methods

The BDC Definition editor will not pick up updates that are made to the web service once you import it. Since you are likely to make changes to the file after you import (like adding Finder methods or Identifiers), you probably don't want to have to redo all these changes if you need to get an updated web method. Here's what you can do to get around this limitation:

  1. Export both the new and the original LobSystem files in the Editor to XML files
  2. Cut and paste the changes from the new file into the original file using an editor like Visual Studio
  3. Re-import the updated file back into the editor

It's not exactly pretty but it works. :)

Executing Method Instances

One nice feature that the BDC Definition Editor has that BDC Metaman seems to lack is the ability to execute Method instances. This allows you to preview your BDC schema without having to deploy it to MOSS first. To do this:

  1. Assuming you have created your method instance (e.g. Finder, SpecificFinder), right click on it and select Execute.
  2. Type in a value for the method parameter and click Execute. If your method worked, you should see a data grid of values appear in the Results section.