Liferay Portal Client Example

In the past and recently I got to be among two systems, one of which Liferay. The system in the middle, was Mule ESB, the mediator between the two systems. The first of the two systems published a series of messages on a JMS queue, these messages were consumed by ESB Mule and after a series of elaborations shipped to the second system (Liferay).

At that time, Liferay had just SOAP services (services rest, would come later), based on the old framework Apache Axis 1.4 and style rpc / encoded. The SOAP component of Mule ESB based on Apache CXF is not compatible with the model rpc / encoded. The first solution was to create the client (to be done later use in Mule ESB) for services of Liferay, starting from the WSDL of the service with which it was necessary to communicate, many of you will know how boring it can be this activity.

In Liferay someone to “good heart” had decided to make available the Liferay Portal Client, this has made the happiness of myself first and foremost and secundis halved the time development of the flow of Mule ESB. Later I realized that the Liferay Portal Client is known by a handful of insiders around, even Liferay itself does not mention the existence in their own documentation SOAP Web Services, is usually discussed the process of creating the client via the WSDL.

Last week I found myself in a similar situation where the Liferay Portal Client has been useful in an integration, by halving the time of development. I made the decision to publish on my GitHub repository a complete example of use of the Liferay Portal Client. The sample project liferay-portal-client-example, based on Maven that performs the following tasks:

  • Performs login on Liferay;
  • Retrieves the CompanyID based on the virtualhost;
  • Retrieve UserId of the user to ScreenName and CompanyID;
  • Retrieves the GroupId of the site Guest;
  • Performs the upload of a document on the Document Library site Guest.

Following an extract of the logs that show the execution of the main class UploadDocumentOnDL. The services used are:

  • Portal_UserService
  • Portal_CompanyService
  • Portal_GroupService
  • Portlet_DL_DLAppService

WSDL documents of all the services exposed by the portal can be reached at http://${HOST|FQDN|IP}:${TCP/IP PORT}/api/axis

The advantage of using the Liferay Portal Client is more than obvious and hopefully always someone “good heart” to do the same for RESTful services.

Antonio Musarra

I began my journey into the world of computing from an Olivetti M24 PC ( bought by my father for his work. Day after day, quickly taking control until … Now doing business consulting for projects in the enterprise application development using web-oriented technologies such as J2EE, Web Services, ESB, TIBCO, PHP.

You may also like...

TIBCO JasperReports Server & JBoss EAP 7.2Come installare Liferay 7.2 GA2 su WildFly 16 + Oracle Database 19c

In questo video tutorial vi mostrerò come installare step-by-step TIBCO Jasper Reports Server 7.5 Community Edition su RedHat JBoss EAP 7.2, utilizzando CentOS 8.1 come sistema operativo e PostgreSQL come database server.

Vedremo come affrontare l'installazione di Jasper Reports Server senza l'ausilio dell'installer; questa è l'opzione solitamente adottata in ambiti enterprise. I punti salienti di questo tutorial sono:

  • Quali sono i requisiti software
  • Quali sono i requisiti hardware
  • Download del software
  • Layout d’installazione
  • Installazione di OpenJDK 11
  • Installazione di PostgreSQL 10
  • Installazione di JBoss EAP 7.2.0
  • Configurazione & Installazione di Jasper Reports Server
  • Configurazione di JBoss EAP 7.2.0
  • Start di Jasper Reports Server