访问 SharePoint2007 Web 服务 [英] Accessing SharePoint2007 Web Services

查看:51
本文介绍了访问 SharePoint2007 Web 服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试访问共享点站点,以便可以在将用户添加到我们的 Active Directory 的同时添加用户.Active Directory 部分是小菜一碟,我认为 SP 部分也是如此.我已将 Web 引用添加到我的项目中,我可以访问它们,但我无法创建任何新实例来访问成员.

I am trying to access a share point site so users can be added at the same time they are added to our Active Directory. The Active Directory portion was a piece of cake, and I assumed the SP portion would be as well. I've added my web references to my project, and I can access them, but I cannot create any new instances to be able to reach the members.

我的 Service_Reference 名为 sp_UserGroup.

My Service_Reference is called sp_UserGroup.

sp_UserGroup UserGroup = new SP_UserGroup;

Error: "sp_UserGroup is a namespace but is used like a type"

我明白为什么我会收到错误消息,但我还没有看到任何文档提到这个事实.

I understand why I am getting the error, but I haven't seen any documentation that even brings this fact up.

我看到的所有示例都遵循这种模式,但我无法弄清楚为什么这对我不起作用.我可以访问 sp_UserGroup 中的方法,但是如果我不能设置成员,它们将毫无用处.

All of the examples I have seen follow this pattern, but I cannot figure out why this will not work for me. I can reach the methods within sp_UserGroup, but they are useless if I cannot set the members.

我指的是有关创建新用户的文档.
http://msdn.microsoft.com/en-us/library/ms412944%28v=office.12%29.aspx

I was referring to this document in regards to creating new users.
http://msdn.microsoft.com/en-us/library/ms412944%28v=office.12%29.aspx

我知道这是一个非常简单的问题,但我是个不幸的人!

I know this is a very simple problem, but I'm a hapless n00b!

推荐答案

声明应该是这样的(在 C# 中):

The declaration should be like this (in C#):

sp_UserGroup.UserGroup UserGroup = new SP_UserGroup.UserGroup();

其中 sp_UserGroup 是您的 Web 服务的名称.

where sp_UserGroup is the name of your web service.

这篇关于访问 SharePoint2007 Web 服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆