什么是 Windows SharePoint Services 适配器?

适用于 Windows SharePoint Services 的 BizTalk Server 适配器提供与 Windows SharePoint Services 和 Microsoft Office InfoPath 的更紧密集成。 以下主题介绍 Windows SharePoint Services 适配器的工作原理的功能和概述。

Windows SharePoint Services 适配器的功能

以下列表描述了 Windows SharePoint Services 适配器的重要功能:

  • 能够将 BizTalk Server XML 和二进制消息发送到 SharePoint 文档库。

  • 与 InfoPath 集成:从 Windows SharePoint Services 网站打开时,可以将传出的 BizTalk Server XML 消息转换为在 InfoPath 中自动打开。

  • 用于进入 Windows SharePoint Services 的消息的属性提升。 最多可以使用 BizTalk Server 元数据更新最多 16 个 SharePoint 列,这些元数据与从消息中提取的类似消息的业务流程实例 ID、消息 ID 或值有关。

  • 基于消息内容和 BizTalk Server 属性的文件名定义。

  • 能够将文档发送到任意列表(而不是文档库):在这种情况下,文档本身不会存储在 Windows SharePoint Services 中,但属性提升仍发生,因此会创建一个新列表项,并从消息中检索列值。

  • 能够从任何文档库的任何视图中接收消息,并使用指定的文件名将其存档到指定的文档库。

  • 在 BizTalk Server 中提升 Windows SharePoint Services 适配器属性:BizTalk Server 将 Windows SharePoint Services 文件信息作为消息上下文属性提供。 可以从管道、编排等访问消息上下文属性。可以通过 WSS.InPropertiesXml 文档访问自定义 SharePoint 列。

  • 完全支持动态端口:发送适配器可以支持静态 URI 绑定(在创建发送端口时由用户定义)或动态 URI 绑定(在发送消息时由业务流程定义)。 可以通过消息上下文属性(例如 WSS.Filename 和 WSS.ConfigTimeout)定义所有配置信息,适用于动态发送端口和物理发送端口。

  • 性能计数器

Windows SharePoint Services 适配器的工作原理

适用于 Windows SharePoint 服务的 BizTalk Server 适配器由三个主要组件组成:

  • Windows SharePoint Services 适配器 Web 服务

  • Windows SharePoint Services 接收适配器

  • Windows SharePoint Services 发送适配器

    在 Windows SharePoint Services 服务器上,安装了 Web 服务(BTSharePointAdapterWS.asmx),以提供对 Windows SharePoint Services 库和列表的访问权限。 Web 服务公开从 SharePoint 库中获取、放置、删除和存档文档的方法。 接收适配器从 Web 服务检索文件,并发送适配器将文件发布到其中。

    下图显示了提供这些功能的 Windows SharePoint Services BizTalk Server 适配器的主要组件。

    显示提供这些功能的 Windows SharePoint Services BizTalk Server 适配器的主要组件的图像。

从 Windows SharePoint Services 接收文档

接收适配器轮询 Windows SharePoint Services 文档库视图。 它在 Windows SharePoint Services 服务器上调用 Web 方法,该方法使用 Windows SharePoint Services 对象模型浏览库、签出文件并将文件数据返回到适配器。 然后,适配器将文件提交到 BizTalk Server MessageBox,并调用另一个 Web 方法从 Windows SharePoint Services 中删除或存档文件。 为了筛选 Windows SharePoint Services 库中的文件,适配器通过 Windows SharePoint Services 视图轮询 Windows SharePoint Services 库。

集中式(轮询)方法提供简单的管理模型,可在 BizTalk 服务器上完成配置。 它还提供更好的性能,因为它允许对消息进行批处理。

由于平台级事务支持在 Windows SharePoint 服务、Web 服务和 BizTalk Server 中不可用,因此签出机制用于最大程度地减少与故障条件相关的错误。 在某些情况下(也就是说,文件已成功发送到 BizTalk Server MessageBox 数据库,但无法从 Windows SharePoint Services 中删除),即使文件已提交到 BizTalk Server,这些文件仍将在 Windows SharePoint Services 服务器上签出。 错误将记录到 BizTalk 服务器上的事件日志中。

将文档发送到 Windows SharePoint Services

适配器通过在 Windows SharePoint Services 服务器上调用 Web 方法将文档发送到 Windows SharePoint Services。 适配器指定 Windows SharePoint Services 网站的相对 URL、文档库或列表的 URL、文件或列表项名称,以及与该文件关联的推荐属性。

可以将文件名设置为固定字符串或从文档中的 XML 数据派生的名称。 得出名称对于加强标准命名约定非常有用。 适配器还可以将文件中的提升属性值设置为列值。 与文件名一样,升级的属性值可以固定,也可以派生自文档中的 XML 数据。

重要

Windows SharePoint Services 适配器中的提升属性与 BizTalk Server 中的提升属性或 Windows SharePoint Services 中的提升属性不同。

Windows SharePoint Services 的显示属性用于在浏览 Windows SharePoint Services 窗体库时使 XML 元素可见。 当 InfoPath 表单发布到 Windows SharePoint Services 表单库时,InfoPath 将配置表单库以提升关键元素,从而使此自动发生。 仅当使用 InfoPath 表单库(使用同一 XSD 架构和 InfoPath 解决方案存储 InfoPath 表单的文档库)时,Windows SharePoint Services 才提供此功能。

Windows SharePoint Services 适配器的属性提升功能使用户能够在将具有不同架构的文档存储于同一文档库时,将属性提升到 Windows SharePoint Services 中。

BizTalk Server 属性提升是一个类似的概念,只是属性在消息上对业务流程编排可见,而非 UI上的最终用户。 此外,BizTalk Server 还支持将属性值保存回文档中时的属性降级概念。

将 Windows SharePoint Services 适配器与 InfoPath 窗体和表单库(而不是任意 XML 和文档库)配合使用时,无需通过发送适配器设置提升的属性。 相反,文档可以在编排中更改(直接通过更改消息或通过将属性降低来间接更改)。 这些值将由 Windows SharePoint Services 自动提升。

Windows SharePoint Services 适配器的安全注意事项

Windows SharePoint Services 适配器由子系统、在 Windows SharePoint Services 网站上运行的 BTSharePointAdapterWS Web 服务以及 BizTalk Server 主机实例进程中在 BizTalk 服务器上运行的适配器运行时组成。 适配器运行时调用 BTSharePointAdapterWS Web 服务,该服务必须有权在 Windows SharePoint Services 中执行某些任务。 由于此组件作为调用方运行,因此需要向调用方授予权限。 这意味着 BizTalk 主机实例必须在 SharePoint 网站上成为 参与者 ,才能从该站点发送和接收消息。 BTSharePointAdapterWS Web 服务只能由 已启用 SharePoint 的主机 组的成员调用。 若要允许 BizTalk 主机实例(运行适配器运行时)与 Web 服务交互,主机实例 Windows 帐户必须成为 SharePoint 已启用主机 组的成员。 管理员有责任在本组中添加和删除帐户,并将主机实例帐户指定为 SharePoint 参与者角色的成员。

组件 进程标识 许可
BTSharePointAdapterWS Web 服务 来电者身份标识 调用授予 SharePoint 已启用主机组的权限
适配器运行时 BizTalk 主机的标识
Windows SharePoint Services 对象模型 启用 SharePoint 的主机组必须是 SharePoint Services 中 参与者 角色的成员。

BizTalk Server 安装程序配置 BTSharePointAdapterWS Web 服务的权限,以便只有属于 SharePoint 已启用主机 组的帐户才能访问此 Web 服务。 如果希望主机运行 Windows SharePoint Services 适配器,管理员必须向 SharePoint 启用主机 组添加与该主机关联的 NT 组,并将 SharePoint 启用主机 组添加到 Windows SharePoint Services 参与者 角色。

使用 Windows SharePoint Services 安全性限制对 Windows SharePoint Services 文件、列表和文档库的权限。 这些消息直接从 Windows SharePoint 服务发送到 BizTalk Server。 适配器运行时与 Web 服务之间的通信是通过 HTTP 或 HTTPS 完成的。

适配器假定 BTSharePointAdapterWS Web 服务使用与 Windows SharePoint Services 网站相同的 HTTP 方案(HTTP 或 HTTPS)。 这意味着,当 Windows SharePoint Services 网站在安全的 IIS 网站上创建时,适配器将使用 HTTPS 与 BTSSharePointAdapterWS Web 服务通信;而当在没有服务器证书的 IIS 网站上创建时,适配器将使用 HTTP 与 BTSharePointAdapterWS Web 服务通信。

另请参阅

设置和部署 Windows SharePoint Services 适配器
配置 Windows SharePoint Services 适配器
Windows SharePoint Services 适配器演练