Web services 使用SharePoint之外的用户配置文件中的信息

Web services 使用SharePoint之外的用户配置文件中的信息,web-services,sharepoint,web-applications,user-profile,Web Services,Sharepoint,Web Applications,User Profile,我正在创建一个网站,为我们部门的每个人创建一个包含他们联系信息的页面。然后可以通过名片上的二维码链接到该页面 从SharePoint配置文件中获取信息的最佳方式是什么 编辑:我不太熟悉在VisualStudio中创建东西。我在网站上使用Ruby on Rails,我读到SharePoint有REST服务,这将非常有用,但我似乎不知道如何访问用户配置文件信息。您可以使用SharePoint UserProfile Web服务来实现这一点 或者,如果您需要更具体的内容,您可以创建自己的Web服务,

我正在创建一个网站,为我们部门的每个人创建一个包含他们联系信息的页面。然后可以通过名片上的二维码链接到该页面

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


编辑:我不太熟悉在VisualStudio中创建东西。我在网站上使用Ruby on Rails,我读到SharePoint有REST服务,这将非常有用,但我似乎不知道如何访问用户配置文件信息。

您可以使用SharePoint UserProfile Web服务来实现这一点

或者,如果您需要更具体的内容,您可以创建自己的Web服务,该服务访问的UserProfile 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);
    }

您可以使用SharePoint UserProfile Web服务来实现这一点

或者,如果您需要更具体的内容,您可以创建自己的Web服务,该服务访问的UserProfile 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);
    }

您不需要使用VisualStudio。您只需要能够使用Ruby中基于SOAP的web服务。用户配置文件web服务的文档如下所示:
您不需要使用Visual Studio。您只需要能够使用Ruby中基于SOAP的web服务。用户配置文件web服务的文档如下所示:

有人这样做的例子吗?特别是带有ruby Savon gem的SharePoint Web Services,我似乎无法从Savon网站上的指示来运行它。我本人不是ruby或Savon用户,但请确保确定身份验证并使用某种代理工具来查看ruby和SharePoint之间的连接。很多SharePoint实现都使用NTLM作为其web身份验证技术,我知道对于某些没有明确针对Windows的语言,NTLM并不总是有效。有人这样做的例子吗?特别是带有ruby Savon gem的SharePoint Web Services,我似乎无法从Savon网站上的指示来运行它。我本人不是ruby或Savon用户,但请确保确定身份验证并使用某种代理工具来查看ruby和SharePoint之间的连接。许多SharePoint实现都使用NTLM作为其web身份验证技术,我知道,对于某些没有明确针对Windows的语言,NTLM并不总是能够正常工作。