1

Being completely new to the whole SharePoint environment, I am having trouble understanding exactly how to crawl external data into a SharePoint index.

What I need to accomplish is that a user can use SP search to search an external data source. The results will show the external data which should (ideally) be clickable and redirect the user to the external source(such as a web page).

So far what I understand is that you use BCS and import a BDC Model. WCF is used to "give" the information through to SharePoint from the external data source.

My question is now, how exactly does one deploy/execute a WCF Service?

I have searched for ways to do this but the material I'm finding does not really clear anything up

This is what I have so far in IService.cs but I'm battling to understand exactly what to do with it.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfServiceLibrary1
{
    [ServiceContract]
public interface IService1
{
    [OperationContract]
    List<string> GetData(int value);

    [OperationContract]
    CompositeType GetDataUsingDataContract(CompositeType composite);

      }

    [DataContract]
public class CompositeType
{
    bool boolValue = true;
    string stringValue = "Hello ";

    [DataMember]
    public bool BoolValue
    {
        get { return boolValue; }
        set { boolValue = value; }
    }

    [DataMember]
    public string StringValue
    {
        get { return stringValue; }
        set { stringValue = value; }
    }
}
}

and this is in Service.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

namespace WcfServiceLibrary1
{    public class Service1 : IService1
{
    public List<string> GetData(int value)
    {
        List<string> list = new List<string>();
        list.Add(string.Format("Order1", value));
        list.Add(string.Format("Order2", value));
        list.Add(string.Format("Order3", value));
        list.Add(string.Format("Order4", value));
        list.Add(string.Format("Order5", value));
        return list;
    }

    public CompositeType GetDataUsingDataContract(CompositeType composite)
    {
        if (composite == null)
        {
            throw new ArgumentNullException("composite");
        }
        if (composite.BoolValue)
        {
            composite.StringValue += "Suffix";
        }
        return composite;
    }
}
}

Thanks in Advance

  • what version and edition of SharePoint are you using? – Supriyo SB Chatterjee Dec 13 '13 at 14:09
  • SharePoint Online – Scubacode Dec 13 '13 at 14:11
0

The creation of WCF based web service is independent of its consumption in SharePoint via BCS. The Search mechanism of the External list (sourced from WCF services) is more complex (using Hybrid).There are other items that need to be addressed - Secured Stored Service, etc. To learn more, I'd suggest starting with some examples from Fabian Williams -

Using WCF and BCS to bring your Enterprise Data to the Cloud [PDF presentation]

Several BCS-related blog postings

Using SharePoint BCS in the Cloud – Surfacing CRUD Data with WCF and Office 365 [excellent series]

0

I would also recommend Scot Hillier's excellent book on the topic of BCS Professional Business Connectivity Services for SharePoint 2010. Even though it's 2010 it is still a very viable reference. It does not address the cloud, but does provide great depth on the topic.

I'd paste a link but it looks like this is not allowed.

  • I'm sure google can assist me in that matter. thank you – Scubacode Dec 15 '13 at 18:12
  • That's an excellent book by Scott Hiller - it saved me a lot of time in one of my SharePoint projects. I mentioned it when I met him at a SharePoint event. His blog site contains other excellent SharePoint posts - shillier.com/default.aspx – Supriyo SB Chatterjee Jul 9 '14 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.