Sharepoint2010 系列:在Infopath 2010中调用Web Service(SharePoint Server 2010 -“User Profile Service We)
来源:互联网 发布:淘宝怎么做充值代理 编辑:程序博客网 时间:2024/05/04 22:11
刚刚和同事讨论了一个关于在InfoPath中调用Web Service的问题。
需求: 我需要在InfoPath表单中通过输入用户名来获得用户的其他信息,例如:部门, 上级等等。 并且通过无代码的方式实现。
环境: SharePoint Server 2010, InfoPath 2010.
技术:
1. 在SharePoint Server 2010 中有一个 “User Profile Service Web service” 可以用来调用用户数据;
2. Infopath中可以添加 数据来接来读取外部的数据。
步骤:
1. 创建一个空的InfoPath 2010表单;
2. 添加两个字段(字符串类型),然后把基于字段的控件添加到InfoPath表单上;
3. 添加一个按钮;
4. 添加数据连接;
5. 输入 User Profile Web Service的地址 http://servername/_vti_bin/userprofileservice.asmx
6. 选择 “GetUserPropertyByAccountName” 方法
7. 有两个参数需要输入: “accountName” and “propertyName”. 我们暂时只为“propertyName” 字段指定一个默认值“Department”
8. 完成。
到现在为止,完成所有的步骤了吗?没有!我们还没有把Web Service的参数和InfoPath的控件联系起来。 在我的例子中查询操作是由button控件的”Rules“完成的。 所有,有三件事情需要button控件去做: 为表Web Service的参数赋值;查询; 获得返回参数;
9. 为button控件添加三个Rules;
a. Set a field’s Value: Field: accountName; Value:UserName
b. Query for Data:
c. Set a field’s value: Field: Department; Value: Value
10. 保存模板。
11. 你可以预览或者发布到SharePoint的表单库进行测试。
请确保当前的应用程序”没有启用匿名登录“否则,你将会得到如下的错误” Server was unable to process request. ---> Attempted to perform an unauthorized operation.”
Good luck.
努力不一定成功,但放弃一定失败!
- Sharepoint2010 系列:在Infopath 2010中调用Web Service(SharePoint Server 2010 -“User Profile Service We)
- SharePoint 2010 User Profile Service
- [SharePoint 2010– InfoPath]通过REST Web Service在表单中嵌入地图
- 在Sharepoint中使用Infopath form service
- Configuring the User Profile Service in SharePoint 2010
- Enable InfoPath service in SharePoint 2010
- Configure User Profile Service Application on SharePoint Server 2013
- SharePoint User Profile Service之(五)-Audience
- InfoPath 通过Web Service 访问Sql Server
- 在User Profile Service中配置AD的同步连接
- Infopath Form Service示例:如何在InfoPath表单中引用SQL SERVER 中的数据?
- 在SQL SERVER 2005中调用Web Service
- 在SQL SERVER 2005中调用Web Service
- 在SQL SERVER 2005中调用Web Service
- 在SQL SERVER 2005中调用Web Service
- 在SQL SERVER 2005中调用Web Service
- 图文SharePoint 2013 中创建、配置、编辑或删除 User Profile Service 应用程序
- SharePoint 2013 User Profile Synchronization Service无法开启的解决方案
- Raphaël 学习
- ServiceMix - JBI - 2.WSDL messaging model
- 揭开linux内核中container_of的神秘面纱
- 与文字相拥 舞尽人间芳华
- 【Java语言】Java 字符替换效率比较
- Sharepoint2010 系列:在Infopath 2010中调用Web Service(SharePoint Server 2010 -“User Profile Service We)
- Nexus(maven仓库) linux简易安装和相关配置
- 判断整数序列是不是二元查找树的后序遍历结果
- android导入项目错误处理
- (转)_beginthread还是CreateThread
- Android实现导航菜单左右滑动效果
- 多线程线程间通信的三种方法
- 我的软件测试宣言
- `uint32_t' undeclared here (not in a function)