Liferay 7 GA4: What’s new about Apache CXF?

Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style
Liferay 7: Come realizzare un client SOAP con Apache CXF in OSGi Style

The last release of Liferay Portal 7 CE GA4 on June 28, 2017 was very significant regarding the Apache CXF framework that Liferay adopted for the AX-WS/JAX-RS stack. The most significant change is the upgrade from version 3.0.3 to 3.1.9 (December 2016). OSGi modules affected by the modification are part of the group apps:foundation:portal-remote:

Who has read the article Liferay 7: How to make a SOAP client with Apache CXF in OSGi Style will remind you that it was based on Liferay GA2 and the Apache CXF 3.1.6 bundles needed to develop the SOAP client.

On Liferay GA4, developing a SOAP client no longer requires the installation of all Apache CXF bundles on Liferay 7: How to build a SOAP client with Apache CXF in OSGi Style but it is more than enough to install the following bundles :

The first three bundles of the list are used by the portal-remote-soap-extender module but are not exported, so you need to install to ensure that the SOAP client is working properly. The last bundle in the list is required by Apache CXF Runtime Simple Frontend, the one exported from Liferay is version 2.1.0 incompatible (and I did a pull-request yesterday on Liferay’s repository). Figure 1 shows the Apache CXF bundles and the sample SOAP client installed on the Liferay 7 CE GA4 instance.

Liferay 7 CE GA4 Apache CXF & SOAP Client OSGi Bundle

Figura 1 – Liferay 7 CE GA4 Apache CXF & SOAP Client OSGi Bundle

If your Liferay installation resides on JBoss EAP or Wildfly, I recommend that you turn off the module to avoid common errors (such as following) caused by different versions of the Apache CXF framework loaded by the Class Loader

  • java.lang.ClassCastException: Cannot cast org.apache.cxf.wsdl11.WSDLManagerImpl to org.apache.cxf.wsdl.WSDLManager
  • java.lang.IllegalAccessError: tried to access class org.apache.cxf.BusFactory$BusHolder from class org.apache.cxf.BusFactory

The SOAP service that I have used on many occasions as an example (also in Article Liferay 7: How to make a SOAP client with Apache CXF in OSGi Style) is no longer available, so I will take advantage of shortly publishing an example of SOAP client with To integrate Liferay with the Salesforce CRM system.

For further information on JAX-WS and JAX-RS support you can follow my latest Symposium LIferay Italy 2016 (video + slide).

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