简体   繁体   English

Nodejs中的WOPI主机实现?

[英]WOPI host implementation in Nodejs?

I want to deploy Office Online which requires the implementation of WOPI protocol.我想部署需要实现 WOPI 协议的 Office Online。 I have seen the implementation of WOPI host in C# eg here .我已经在 C# 中看到了 WOPI 主机的实现,例如这里 WOPI protocol requires to implement a bunch of endpoints. WOPI 协议需要实现一堆端点。 I was wondering If I implement WOPI host in Node.js, will it be compatible to work with Office Online Server?我想知道如果我在 Node.js 中实现 WOPI 主机,它将与 Office Online Server 兼容吗?

Any thoughts?有什么想法吗?

Thanks in anticipation感谢期待

Implementation of a WOPI host endpoint is not language-dependent. WOPI 主机端点的实现不依赖于语言。 As long as your language/framework/platform can serve HTTP requests with application/json and application/octet-stream responses you should be good.只要您的语言/框架/平台可以使用application/jsonapplication/octet-stream响应为 HTTP 请求提供服务,您就应该很好。

You need to implement at least the MS-WOPI protocol.您至少需要实现MS-WOPI协议。 Depending on your requirements you may also need to implement the MS-FSSHTTP protocol.根据您的要求,您可能还需要实现MS-FSSHTTP协议。 This may be the case when you are integrating with Office Web Apps 2013 and you need to support Word editing, for instance.例如,当您与Office Web Apps 2013集成并且您需要支持 Word 编辑时,可能会出现这种情况。 The necessity of using MS-FSSHTTP is indicated by COBALT in the discovery XML.使用 MS-FSSHTTP 的必要性由发现 XML 中的COBALT指示。

The new Office Online Server removed the requirement for implementing COBALT requests from most of the actions.新的Office Online Server从大多数操作中删除了实现 COBALT 请求的要求。 It's only required for OneNote file format.只有 OneNote 文件格式需要它。 You can see that in the discovery XML of Office Online .您可以在Office Online 的发现 XML 中看到。

The only way to test your WOPI implementation, unless you are an Office Online integration partner , is to install Office Online Server (or the older Office Web Apps) locally on your server.除非您是Office Online 集成合作伙伴,否则测试您的 WOPI 实施的唯一方法是在您的服务器上本地安装 Office Online Server(或较旧的 Office Web Apps)。 Both can be downloaded via MSDN.两者都可以通过 MSDN 下载。

If, by any chance, you are an integration partner then you can take advantage of the validator app they provide.如果您有机会成为集成合作伙伴,那么您可以利用他们提供的验证器应用程序 There is a CLI built in python available on GitHub . GitHub 上有一个内置于 python 的 CLI。

If you are about to integrate with the new OOS please refer to the newer and better documentation at http://wopi.readthedocs.io/ .如果您即将与新的 OOS 集成,请参阅http://wopi.readthedocs.io/上更新更好的文档。

The language in question doesn't matter, it's just "REST".有问题的语言无关紧要,它只是“REST”。 I wrote an implementation in Ruby a while ago.不久前,我用 Ruby 编写了一个实现。

这是我用 node 和 express 编写的 WOPI 服务器的示例实现: https ://github.com/mikeebowen/node-wopi-server

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM