When I try do download a previous version of a document, I get a "Fault occurred whilst processing" error.
I can use the getVersions command fine to retrieve the metadata, it is the getContent command that throws the exception when I provide it with the Id for a previous version of a document.
The logs in LD record the following: org.apache.cxf.phase.PhaseInterceptorChain Application
{http://document.webservice.logicaldoc.c ... getContent has thrown exception, unwinding now: java.lang.NullPointerException: null
Is what I am trying to achieve possible - ie retrieving a specific version of a document?
Cheers
Shane
Versions
Moderator: car031
Post
Re: Versions
The getContent is able to retrieve just the actual document's file. So you must use the ID of an existing document (not version ID)
Post
Re: Versions
So - is it not possible to recover the previous versions of a document via webservices then?
Post
Re: Versions
Yes, correct.
Actually (LD version 6.4) using web-services you can get the information about the versions of a document but you can't get the content of an old version.
This is indeed a lack, but so far we still had not received requests regarding this aspect...
However this thing is not particularly complicated, so I think that we will put in the development stack very soon.
If you want you can also use our issue tracker to report the feature request.
Actually (LD version 6.4) using web-services you can get the information about the versions of a document but you can't get the content of an old version.
This is indeed a lack, but so far we still had not received requests regarding this aspect...
However this thing is not particularly complicated, so I think that we will put in the development stack very soon.
If you want you can also use our issue tracker to report the feature request.
Post
Re: Versions
I guess whilst it is desirable, there is a fairly straightforward workaround..
I can simply generate a link in the form "http://<servername:port>/logicaldoc/download?sid=<sessionId>&docId=<customID>&versionID=<ID>&open=true" and download the doc from there.
I can simply generate a link in the form "http://<servername:port>/logicaldoc/download?sid=<sessionId>&docId=<customID>&versionID=<ID>&open=true" and download the doc from there.
Post
Re: Versions
Actually I had not thought of this possibility.
Congratulations !
The URL address you suggested is the one of the download servlet that is always available and can be used to get the content of an old version of a document.
This is a really stable servlet as it's used primarily by the GUI of the software to download document content and also content of old versions.
Congratulations !
The URL address you suggested is the one of the download servlet that is always available and can be used to get the content of an old version of a document.
This is a really stable servlet as it's used primarily by the GUI of the software to download document content and also content of old versions.
Post
Re: Versions
Be aware only that the address composition is a little different:
you should use the documentID and not the customID cause they may be different and have different purposes.
Also you must use the proper versionId
"http://<servername:port>/logicaldoc/download?sid=<sessionId>&docId=<documentID>&versionId=<versionID>&open=true"
(You can get the version of a document from webservices using documentClient getVersions(String sid, long docId) method
http://wiki.logicaldoc.com/wiki/Documen ... g_docId.29
you should use the documentID and not the customID cause they may be different and have different purposes.
Also you must use the proper versionId
"http://<servername:port>/logicaldoc/download?sid=<sessionId>&docId=<documentID>&versionId=<versionID>&open=true"
(You can get the version of a document from webservices using documentClient getVersions(String sid, long docId) method
http://wiki.logicaldoc.com/wiki/Documen ... g_docId.29
Who is online
Users browsing this forum: No registered users and 20 guests