Written on Saturday, March 9, 2013 on http://sgros.blogspot.fr/
Now, I was trying all this on Fedora 18 as a client workstation, so if you also have Fedora 18 you’ll have to install manually LO4. So, if you didn’t already install it, I wrote a post about that so take a look at it and install LO4.
So, to use CMIS first you’ll have to enable LibreOffice’s native Load/Save dialog boxes. This is done viaOptions… dialog (found in Toos menu option). Then, select option General in the left pane and you’ll see in the main pane check box labeled Use LibreOffice dialogs under Open/Save dialogs section. Mark that check box and close the dialog. Finally, there is no need to restart LibreOffice:
Now, you need to add share from Alfresco where you have your documents stored. To do that, go to theOpen dialog (in File menu), and now you’ll see a button with three dots in the upper right corner. Click on it and new dialog appears:
Under the Type drop down box select CMIS, and then, under Server Details heading choose option Alfresco 4 as a Server Type. The dialog will have the following form:
Then Binding URL that has the following form:
has to be changed by filling in the host and port. When you fill URL, click on circular arrow beneath URL on the right hand side of Repository option. This will query repository for available URLs. You have also to type in name for this repository, and that’s basically it, click OK to close this dialog. You’ll be asked several times for username and password, so, provide it every time. This has to be username/password combination of a user that will access documents, not an administrator’s password. Also, during this process, if you clicked check box that LO should remember password, a dialog will appear that will ask you for a master password that will protect your saved password(s).
Now, each time you go to Open dialog to open a new file, you’ll have on the left pane this repository under the whatever name you’ve typed in Name text box.
There were several gotchas during this process. First, don’t expect some useful/meaningful error messages. Basically, when you press that circular arrow, and something isn’t right, you won’t receive any message at all. So, here are some things that might catch you.
First of, while setting up the LO4 I suggest that you start it from the command line. The reason is that you’ll see error messages on the console. Like the following ones I got:
http://your.server.name:8443/alfresco/cmisws/RepositoryService?wsdl:1: parser error : Start tag expected, ‘<‘ not found
that one was caused because I tried to use http protocol on https port (8443)! 😀
Secondly, try first with http, and when you set that up, then you should try to switch to https. The problem is that LibreOffice has to have installed CA that issued certificate for Alfresco. If it doesn’t have, then it will silently disconnect, and, as I said, it won’t tell you what happened.
Third, if the hostname is incorrect, you also won’t receive any error message. So, I suggest that you c/p the URL and try to retrieve wsdl using wget or curl:
wget –no-check-certificate ‘https://your.server.name:8443/alfresco/cmisws/RepositoryService?wsdl’
For the end of this setup part, I’ll mention that CMIS was introduced in LibreOffice 3.6 but it is marked as an experimental feature and those have to be explicitly enabled via Options dialog. Also, the dialog is different in LibreOffice 4 than in LibreOffice 3.6. Take a look at this blog post, but after several unsuccessful tries I decided to do it with LO4 because that was what I needed.
Functionality seems to be OK but access to Alfresco repository is slow. This has a big impact on autosave, i.e. when you type everything suddenly freezes. Also, now and then, LO4 freezes very shortly but noticeably, when editing file from Alfresco.