Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Web Service for uploading/accessing documents in LifeRay Document Library Nitin Biniwale August 17, 2012 2:22 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Harish Kumar August 17, 2012 2:36 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 17, 2012 3:00 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 17, 2012 5:21 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Hitoshi Ozawa August 17, 2012 5:34 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 17, 2012 5:36 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 20, 2012 9:57 PM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Amit Doshi August 20, 2012 11:49 PM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 21, 2012 12:18 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 21, 2012 2:10 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Amit Doshi August 21, 2012 2:42 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 21, 2012 2:32 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Nitin Biniwale August 21, 2012 9:56 PM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Amit Doshi August 22, 2012 12:21 AM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Navin D Singh November 18, 2012 4:15 PM
RE: Web Service for uploading/accessing documents in LifeRay Document Libra Amit Doshi December 27, 2012 3:13 AM
Nitin Biniwale
Web Service for uploading/accessing documents in LifeRay Document Library
August 17, 2012 2:22 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Hi,

I want the Web Service which I can use to upload some documents in to the LifeRay Document Library from external java application. I want the methods to upload, serach, access, update, delete the documents which can be images or pdfs. Please help. [Is there any other service e.g Journal Article with which I can do the same thing]

Regards,
Nitin
Harish Kumar
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 17, 2012 2:36 AM
Answer

Harish Kumar

Rank: Expert

Posts: 474

Join Date: July 31, 2010

Recent Posts

Hi Nitin,

http://localhost:8080/api/axis

Use this link on your local machine to find all the services exposed by liferay portal


Regards,
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 17, 2012 3:00 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Thanks for your instant reply.

I have already used that URL to get all the services listed, but the problem is I need a web service which will help me to,
Upload a document
Search the documents
Access the contents of the document
delete/update the document

I have not found a method to add a document to the document library.
Which service shall I use to do the above mentioned jobs.[Where can I get the documentation regarding usage of each web service and its methods with some examples]

Thanks,
Nitin
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 17, 2012 5:21 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Hi,

Please reply. I have not found any method for addFileEntry or addFile etc.

Thanks,
Nitin
Hitoshi Ozawa
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 17, 2012 5:34 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

API changed in 6.0 and 6.1. Which version of liferay are you using?
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 17, 2012 5:36 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Hi Hitoshi
I am using LifeRay 6.1.0.

Nitin
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 20, 2012 9:57 PM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Please reply,
I am stuck.

Thanks,
Nitin
Amit Doshi
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 20, 2012 11:49 PM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Nitin Biniwale:
Please reply,
I am stuck.

Thanks,
Nitin


Hi Nitin,

Please check this link. Already your question has been answered.

Thanks & Regards,
Amit Doshi
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 21, 2012 12:18 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Hi Amit,

I am able to get the list of services. I am also able to test some services using the soapUI. I wanted to know the name of the service with which I will be able to upload documents in to the Document Library. I also need to search, download the documents. [I have used the url http://localhost:9980/api/axis]. Please help.

Thanks,
Nitin
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 21, 2012 2:10 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Please reply,

Nitin
Amit Doshi
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 21, 2012 2:42 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Nitin Biniwale:
Hi Amit,

I am able to get the list of services. I am also able to test some services using the soapUI. I wanted to know the name of the service with which I will be able to upload documents in to the Document Library. I also need to search, download the documents. [I have used the url http://localhost:9980/api/axis]. Please help.

Thanks,
Nitin



Generally working with portlets, we use DLFileEntryService.addFileEntry() and DLAppLocalServiceUtil.addFileEntry().
And now consider suppose you want to upload any document that what you will do basically, first you will create the folder when you upload the document first time. And after creating the folder with particular name in Document Library then you upload the file on it.

So for that you need to use the two services one for creating folder and other for file Entry.

Portlet_DL_DLFolderService for creating folder and I was wondering for fileEntry Portlet_DL_DLFileEntryService or DLAppService service in order to add file but unfortunately not able to find any webservice that will help to upload the file. I think in liferay inbuilt webservice they had not provided any facility or functions to upload the document.

Looking into it and let you know if find anything else on it.

Thanks & Regards,
Amit Doshi
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 21, 2012 2:32 AM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Please reply,

Nitin
Nitin Biniwale
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 21, 2012 9:56 PM
Answer

Nitin Biniwale

Rank: New Member

Posts: 12

Join Date: August 11, 2012

Recent Posts

Hi Amit,

Please reply.

Thanks,
Nitin
Amit Doshi
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
August 22, 2012 12:21 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Nitin Biniwale:
Hi Amit,

Please reply.

Thanks,
Nitin


As far my knowledge by going through the inbuilt webservice of Liferay, I don't think they had provided any function through which you can upload the document.

Because addFileEntry is the function which allow you to upload the document in the Document Library. But in external webservice they intentionally removed the addFileEntry function because that method cannot be safely wired in soap.

But if you want to give a try then you can do workaround with it :-
1) Create a remote webservice with service-builder of liferay and in that try to implement the addFileEntry method which was requried to upload the document in document library.
2) A Service jar will be created and put that jar file in tomcat/lib/ext, so it will be globally accessed through external webservice.

Hope it might help.

Thanks & Regards,
Amit Doshi
Navin D Singh
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
November 18, 2012 4:15 PM
Answer

Navin D Singh

Rank: Junior Member

Posts: 40

Join Date: July 15, 2008

Recent Posts

LifeRay 6.0 SP2 EE with Tomcat 6.0
Can anyone help me to get around the issue I am facing while creating message board entry through web services.
No problem when deleting, getting the information but when I try to create an entry this is what I get:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:HQ-10642-E4310

java.rmi.RemoteException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.liferay.portlet.messageboards.service.http.Portlet_MB_MBMessageServiceSoapBindingStub.addMessage(Portlet_MB_MBMessageServiceSoapBindingStub.java:554)
at MessageBoardBroker.main(MessageBoardBroker.java:64)
Amit Doshi
RE: Web Service for uploading/accessing documents in LifeRay Document Libra
December 27, 2012 3:13 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 549

Join Date: December 29, 2010

Recent Posts

Navin D Singh:
LifeRay 6.0 SP2 EE with Tomcat 6.0
Can anyone help me to get around the issue I am facing while creating message board entry through web services.
No problem when deleting, getting the information but when I try to create an entry this is what I get:

AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.rmi.RemoteException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:HQ-10642-E4310

java.rmi.RemoteException
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.liferay.portlet.messageboards.service.http.Portlet_MB_MBMessageServiceSoapBindingStub.addMessage(Portlet_MB_MBMessageServiceSoapBindingStub.java:554)
at MessageBoardBroker.main(MessageBoardBroker.java:64)


Please attach your client code here.

Thanks & Regards,
Amit Doshi