Web services and the Business Connectivity Services in SharePoint 2010

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 the November beta from the downloads page:

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

  1. Prerequisites:
    • Microsoft SharePoint Server 2010
    • Microsoft Visual Studio 2010 Professional or higher
    • BCS Meta Man
    • Web Service with Finder, Specific Finder and Id Enumerator web methods
  2. Open Visual Studio 2010
  3. Add a New Project
  4. Expand the “SharePoint” node, select “Lightning Tools (2010)” node and then the “BCS Meta Man” project type
  5. Give your project a name i.e WebServiceBCSMetaManDemo and click “OK”

    Create WebServiceBCSMetaManDemo project 

    [Please click the images for a larger view]

  6. 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

  7. In order to add Web Reference right-click WebServiceBCSMetaManDemo project node in the “Solution Explorer” pane and choose “Add Service Reference…”  You will get the “Add Service Reference” dialog.  Click the “Advanced…” button at the bottom left

    Add Service Reference

  8. The next screen that appears is the “Service Reference Settings” dialog.  Click “Add Web Reference…” button at the bottom left

    Service Reference Settings

  9. Enter URL to your WSDL including “?wsdl” on the end and give your Web reference a name i.e BCSMetaManDemoWebReference and click “Add reference” button

    Add Web Reference

  10. 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

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

    BCS Meta Man connection dialog

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

    See the web methods available to use

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

    Drag and drop Finder Web Method onto existing External Content Type and Enter External Content type name

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

    Choose the Finder as the method type

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

    External Content Type created on diagram  

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

    Drag and drop Specific Finder Web Method onto existing External Content Type

  17. 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”.

    Configuring a Specific Finder web method

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

    External Content Type with Finder and Specific Finder methods

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

    Drag and drop Id Enumerator Web Method onto existing External Content Type

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

    Configuring Id Enumerator web method

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

    External Content Type with Finder, Specific Finder and ID Enumerator methods

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

    Add a new external list

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

    Select the available External Content Type

  25. Select created WebServiceBCSMetaManDemo.WebServiceCustomer External Content Type, click “OK”. Click “Create” button then.

    Select WebServiceCustomer External Content Type

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

    External data provided by web service is now shown within SharePoint 2010

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