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.

0 Condivisioni

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.

Potrebbero interessarti anche...

Cos'è il progetto CIE/CNS Apache Docker - Developers Italia

In questo video introdurrò il progetto CIE/CNS Apache Docker di Developers Italia ( nato circa due anni fa.

L'obiettivo di questo progetto è quello di fornire un template pronto all'uso che realizza un sistema di autenticazione tramite la Smart Card TS-CNS (o CNS) e la CIE (Carta d'Identità Elettronica) basato su Apache HTTP. Ognuno può poi modificare o specializzare questo progetto sulla base delle proprie esigenze Si tratta di un progetto docker per la creazione di un container che implementa un sistema di mutua autenticazione o autenticazione bilaterale SSL/TLS.

Questo meccanismo di autenticazione richiede anche il certificato digitale da parte del client, certificato che in questo caso risiede all'interno della TS-CNS o della CIE. La particolarità del sistema implementato (attraverso questo container) è quella di consentire l'autenticazione tramite:

  • La TS-CNS (Tessera Sanitaria - Carta Nazionale Servizi), rilasciata dalla regione di appartenenza;
  • La CIE (Carta d'Identità Elettronica), rilasciata dal comune di residenza.

Nella versione 2.0.0 il progetto è stato aggiornato per essere uniforme alle linee guida di Bootstrap Italia. A seguire alcune risorse che possono essere utili.

  • Cos’è il progetto CIE/CNS Apache Docker (
  • CIE Carta d'Identità Elettronica (
  • Carta Nazionale dei Servizi (
  • Raspberry Pi – Un esempio di applicazione della TS-CNS (
  • Pubblicare il servizio CIE/CNS Apache Docker su Azure Cloud (
  • Come accedere al portale VETINFO tramite TS-CNS e Mac OS (