Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Ozan Ayyüce
Document Library web service: how to simply read a file's content?
November 16, 2012 5:25 PM

Ozan Ayyüce

Rank: New Member

Posts: 1

Join Date: November 16, 2012

Recent Posts

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.
Olaf Kock
RE: Document Library web service: how to simply read a file's content?
November 21, 2012 5:34 AM

Olaf Kock


Rank: Liferay Legend

Posts: 4132

Join Date: September 23, 2008

Recent Posts

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.

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!