WCF Web Service and BCS Meta Man

Many organizations are now making use of Service Orientated Architectures. The SOA web service layers they create can also be used with the Business Connectivity Services. In this walkthrough we will demonstrate how to integrate web services with Microsoft SharePoint 2010 and display the data on SharePoint 2010 page. In order to do that we will describe how to create a new external content type by means of BCS Meta Man.

To configure web services with BCS Meta Man you’ll need to download BCS Meta Man from the downloads page:

https://www.lightningtools.com/downloads/bcsmetaman-download.aspx

Prerequisites:

  • Microsoft SharePoint Server 2010
  • Microsoft Visual Studio 2010 Professional or higher
  • BCS Meta Man
  • WCF Web Service with Finder, Specific Finder and Id Enumerator web methods – A version of the service used can be downloaded here.

Walkthrough

  1. Open Visual Studio 2010
  2. Add a New Project
  3. Expand the “SharePoint” node, select “Lightning Tools (2010)” node and then the “BCS Meta Man” project type
  4. Give your project a name i.e WcfBcsMetaManDemo and click “OK”

    image 

    [Please click the images for a larger view]

  5. On the next dialog box, enter the name of where you want to deploy your model, and click “Finish” button

    Deploy as a farm solution

  6. In order to add the Sercvice Reference right-click WcfBcsMetaManDemo project node in the “Solution Explorer” pane and choose “Add Service Reference…”  You will get the “Add Service Reference” dialog.
  7. Enter the Address of your Service and click ‘Go’   – (A version of this service will be available soon at the following Lightning Tools URL),  click ‘OK’

    image

  8. To show the “BCS Meta Man Data Source Explorer” we need to enable it from the Menu item, this new window can be docked so it doesn’t get in your way

    Open the BCS Meta Man Data Source Explorer

  9. Click the “Add Connection” button to show the “Connection Dialog”, select “Web service” tab and click “Connect” button

    BCS Meta Man connection dialog

  10. The Data Source Explorer will now be populated with your web service methods

    image

  11. Drag and drop your Finder Web Method onto the design surface and enter External Content type name, i.e TestData, click “OK”

    image

  12. Choose the Finder as the method type and click “OK”

    Choose the Finder as the method type

  13. The External Content Type will be created on the Diagram

    image

  14. From the “BCS Meta Man Data Source Explorer” drag and drop your Specific Finder Web Method onto the existing External Content Type

    image

  15. The “Method Configuration” dialog will be displayed. Select “SpecificFinder” as the Method Type. Select the first Parameter used by Specific Finder method – customerID and map it to your unique identifier selected from the available columns. Click “OK”.

    image

  16. The External Content Type will update with the new Specific Finder Method

    image

  17. Next drag and drop the Id Enumerator Web Method onto the existing External Content Type

     

  18. image

  19. Select “IdEnumerator” as the Method Type, Click “OK”

    Configuring Id Enumerator web method

  20. Again, the External Content Type will update with the new Id Enumerator Method

    External Content Type with the new Id Enumerator Method

  21. Press F5 to deploy The External Content Type, this will load up your SharePoint Page once deployed
  22. Add a new External list by selection on SharePoint page “Site Action”->“More Options…”->“External List”

    Add a new external list

  23. Give your External List a name and Click on the icon to show the available External Content Types

    Select the available External Content Type

  24. Select created External Content Type, click “OK”. Click “Create” button then.

    image

  25. The external data provided by web service is now displayed in the SharePoint External List

    BCS Meta Man created External Content Type in SharePoint

We hope this walkthrough will be useful for you. If you have any questions feel free to email them to support@lightningtools.com