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