2011-08-01 29 views
0

我正在创建网站,为我们部门中的每个人及其联系信息创建一个页面。该页面可以通过名片上的qr代码进行链接。使用来自SharePoint以外的用户配置文件的信息

从SharePoint配置文件中获取信息的最佳方式是什么?

编辑:我不是很熟悉在Visual Studio中创建的东西。我为网站使用了Ruby on Rails,并且我已经阅读了SharePoint提供的REST服务,它可以很好地工作,但我似乎无法弄清楚如何访问用户配置文件信息。

回答

2

你不需要使用Visual Studio。您只需要能够使用来自Ruby的基于SOAP的Web服务。用户配置文件Web服务的文档位于: http://msdn.microsoft.com/en-us/library/aa980957(office.12).aspx

+0

有人这样做的任何示例?具体来说,使用红宝石Savon Gem的SharePoint Web服务,我似乎无法从Savon网站上的指导中获得它。 – Jake

+0

我自己并没有太多的Ruby或Savon用户,但确保您确定身份验证并使用某种代理工具来查看Ruby和SharePoint之间的连线。许多SharePoint实现使用NTLM作为他们的Web身份验证技术,并且我知道对于某些未明确针对Windows的语言,OOTB并不总是正确。 –

2

您可以使用SharePoint UserProfile WebService来实现此目的。

http://msdn.microsoft.com/en-us/library/ms494053.aspx

或者,如果你需要更具体的东西,你可以创建自己的WebService其访问是在用户配置API这样的 -

using (var site = new SPSite("http://yourserver")) 
    { 
     var userProfileManager = 
      new UserProfileManager(SPServiceContext.GetContext(site)); 

     var userProfile = 
      userProfileManager.GetUserProfile("domain\accountName"); 

     //iterate the userprofile properties 
     foreach (UserProfileValueCollection prop in userProfile) 
      Console.WriteLine(prop.Value); 
    } 
相关问题