Fórum

Document Library web service: how to simply read a file's content?

Ozan Ayyüce, modificado 11 Anos atrás.

Document Library web service: how to simply read a file's content?

New Member Mensagem: 1 Data de Entrada: 17/11/12 Postagens Recentes
I also posted this question on Stackoverflow.

I'm trying to access Liferay's document library via web service. To do this I used Eclipse to create a web client from Liferay's Portlet_DL_DLAppService wsdl. It all went well and I think I can easily create a file remotely, but the generated Classes do not seem to have any functionality to read back a file's content.

DLAppService has methods to get FileEntries, but while the Interface FileEntry has the method getContentStream(), but the proxy class in the generated web client (FileEntrySoap) does not.

I feel like I'm missing something fundamentally, since I think I'm not the first one to use Liferay's document library via web service?

Any hint or pointer would be welcome.
thumbnail
Olaf Kock, modificado 11 Anos atrás.

RE: Document Library web service: how to simply read a file's content?

Liferay Legend Postagens: 6403 Data de Entrada: 23/09/08 Postagens Recentes
copied from Stackoverflow

Sorry, I can't provide the full solution right now, but if everything else fails, you could try to use a workaround through WebDAV: DLUtil.getWebDavURL()

InputStream is something that is not good to transport through SOAP, but if you just get a URL and then open the file through this means, you'll most likely be able to get what you need. This will also enable you to update the file.

There probably is a bunch of WebDAV implementations out there - depends on the environment (programming language) you need to access the doclib from.