I'm here because I'm trying to implement a scenario of user profile synchro with bcs connecting to wcf service.
Here is the context:
A remote web service is returning a full list of employee infos. The goal is to sync the profile DB with AD for certain properties and this web service for some others.
My Implementation:
Since the web service wasn't designed to be consumed by BCS, I recreated a WCF service that I deployed into SP 2010 ISAPI folder. This WCF service exposes a method to retrieve an employee by a uniqueID which is present in the AD properties and will allow the link between external source and AD. This WCF service connects to the remote webservice, retrieve the entire list of employees, transform it into datatable, put it in cache and then do a select on this datable with the unique employee id and return the entity as result. In the same time I created an external content type by using Visual Studio 2010 and not SP designer. The BDCModel connects in the readItem method to my WCF service to retrieve the good employee.
Here are my questions:
- I deployed everything and this is working fine except that I need to add into the app.config of the MIIServer.exe application the WCF service information so that the user profile synchronization service is able to connect to my WCF. On the web I see many examples where external content types are created by SPDesigner and it doesn't seems that the configuration of the WCF service needs to be added to the MIIServer.exe app.config since SPD stores the configuration as xml in BCS Metadata Store. Is there a way for not adding WCF service configuration info in MIIServer.exe when creating external content types with visual studio?
- When a user profile property is configured, there is a possibility to add multiple mappings. What I want to know is the behavior of SP when there is 2 mappings? for example: BCS source then AD source. Will SharePoint will connect to the 2nd source if the first one return an empty value?
Don't know if this is very clear but any help would be appreciated.