WOPI host implementation in Nodejs?
Asked Answered
M

3

1

I want to deploy Office Online which requires the implementation of WOPI protocol. I have seen the implementation of WOPI host in C# e.g. here. WOPI protocol requires to implement a bunch of endpoints. I was wondering If I implement WOPI host in Node.js, will it be compatible to work with Office Online Server?

Any thoughts?

Thanks in anticipation

Michiko answered 21/8, 2016 at 7:50 Comment(0)
S
6

Implementation of a WOPI host endpoint is not language-dependent. As long as your language/framework/platform can serve HTTP requests with application/json and application/octet-stream responses you should be good.

You need to implement at least the MS-WOPI protocol. Depending on your requirements you may also need to implement the MS-FSSHTTP protocol. This may be the case when you are integrating with Office Web Apps 2013 and you need to support Word editing, for instance. The necessity of using MS-FSSHTTP is indicated by COBALT in the discovery XML.

The new Office Online Server removed the requirement for implementing COBALT requests from most of the actions. It's only required for OneNote file format. You can see that in the discovery XML of Office Online.

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. Both can be downloaded via 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.

If you are about to integrate with the new OOS please refer to the newer and better documentation at http://wopi.readthedocs.io/.

Scour answered 27/8, 2016 at 22:19 Comment(0)
T
2

Here is a sample implementation of a WOPI server I wrote with node and express: https://github.com/mikeebowen/node-wopi-server

Tenderfoot answered 3/6, 2022 at 18:7 Comment(1)
Cascadia, the project (link) you had given is quit helpful. Thank you.Haemal
O
1

The language in question doesn't matter, it's just "REST". I wrote an implementation in Ruby a while ago.

Ophthalmoscope answered 23/8, 2016 at 12:2 Comment(2)
@Scour I'm trying to get Wopi host implementation in RoR application. My domain is whitelisted under CSPP. Trying to get the file contents in iframe, but I just see "Word Online" and a loading gif. But able to get the Wopi validation page in Iframe using .wopitest file. How should I proceed? Note: I'm using ngrok to make my local app server visible publicly with whitelisted domain.Hudgens
In some versions of chrome and firefox the iframe fails to load, because of various security issues. Please take a look at the "dev console" for any errors and try a different browser.Ophthalmoscope

© 2022 - 2024 — McMap. All rights reserved.