Ask Your Question
0

Connect libreoffice 5.3.4 with application using WebDAV

asked 2017-08-17 11:40:16 +0200

Vladimir Budnik gravatar image

updated 2017-08-17 11:43:18 +0200

We are trying to connect libreoffice 5.3.4 with our application using WebDAV.

When we open the document GET-request works, we transfer the required file, our document is opened correctly after editing.

If we try to save the document we expect PUT-request or POST-reguest with modified file data. But request doesn't come.

What should we write in addition?

edit retag flag offensive close merge delete

Comments

First of all, it's unclear from your description what opens what, and what sends what. "When we open" - what are "we"? "we transfer", "document is opened correctly" - where? - "after editing" - what editing? "If we try to save" - from what application? It's unclear where LibreOffice part is here, and where is your application's.

Mike Kaganski gravatar imageMike Kaganski ( 2017-08-17 11:47:04 +0200 )edit

Mike, there are some details, look the "1 Answer", please

Vladimir Budnik gravatar imageVladimir Budnik ( 2017-08-21 13:40:11 +0200 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-08-17 13:38:06 +0200

Vladimir Budnik gravatar image

updated 2017-08-17 13:38:42 +0200

Plugin opens Libreoffice after user's click. To say simply user opens the Libreoffice.

We have java-application (Spring framework). We try to realise the next functionality: User clicks on link (.../webdav/id/document_name.odt) and as the result system opens the document in Libreoffice. User can edit the document and save it in database (PostgreSQL).

Opening document functionality works correctly: We have written a simple servlet (https://www.mulesoft.com/tcat/tomcat-... step-1). The servlet handles the request from Libreoffice (PROPFIND,OPTIONS,GET)

When our application gets the PROPFIND-request from Libreoffice our server writes the next responce:

<multistatus xmlns="DAV:"> <response> <href>http://localhost:8080/julia/webdav/id/document_name.odt</href> <propstat> <prop> <resourcetype/> <getcontenttype>application/vnd.oasis.opendocument.text</getcontenttype> </prop> <status>HTTP/1.1 200 OK</status> </propstat> <propstat> <prop> <isreadonly/> <supportedlock/> </prop> <status>HTTP/1.1 404 Not Found</status> </propstat> </response> </multistatus>

When our application gets GET-request our server writes file data (byte[]) from database as the responce

When our application gets OPTIONS-request our server writes the next headers in the responce:

"DAV", "1, 2, ordered-collections" "Allow", "OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, ORDERPATCH" "MS-Author-Via", "DAV"

After all Libreoffice opens our document and user can edit it.

If user edits the document and tries to save, server will not get request with changes. So our application can't save the modified document in database. (PUT or POST). Server gets only PROPFIND-request, OPTIONS-request and HEAD-request.

Example: https://prnt.sc/g9kqby

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-08-17 11:40:16 +0200

Seen: 334 times

Last updated: Aug 17 '17