Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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:

  1. 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?
  2. 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.

share|improve this question

1 Answer

What I don't fully understand is why you've built a second webservice on top of the existing one. You could reuse that some code (a wrapper class as you might call it) and provide BCS with a .NET assembly instead. Adding a second webservice will only cause delay. The only scenario I could imagine is when the second webservice provides additional functionality which is used in multiple apps.

The WCF framework will need a (binding) configuration, but you can also create that in code. The only downside to that is that you need to recompile when something changes, like security settings. But with most webservices, that doesn't really happen that often. So code the configuration and provide the URL to the service (which is more likely to change) using SPPersistedObject (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.sppersistedobject.aspx) or property bag storage. Any credentials you might need can be stored in the secure store service app.

As for your question about the mappings; I don't think there's such a thing. If you provide two sources for the same property, the last import will win I guess. And since profile import is usually incremental, the last change in either one will prevail. But I must say this is just theory, haven't tested it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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