掲示板

Consuming REST services (Beginner)

6年前 に Gasser M. Abdallah によって更新されました。

Consuming REST services (Beginner)

New Member 投稿: 3 参加年月日: 17/08/23 最新の投稿
One of the backends is exposing its API as RESTFUL services.
These services are needed by several portlets.
So we thought to consume them from a service builder module and use the module from the portlets (like we do in database access).

The problem is that, we see many recommendation to use spring RESTTemplate to consume the rest services, but we can't use them in our service builder, are we missing something?

We thought of using spring portlets directly, but I want the REST client to be exposed to any current of future portlet without repeating the code in each portlet.
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: Consuming REST services (Beginner)

Liferay Legend 投稿: 14917 参加年月日: 06/09/02 最新の投稿
Gasser M. Abdallah:
The problem is that, we see many recommendation to use spring RESTTemplate to consume the rest services, but we can't use them in our service builder, are we missing something?


Why not?

The biggest issue you face will be the use of "fake entities", a thing that I've blogged about and have championed in the past because it allows you to build out a "service layer" that is based on a general data sink instead of a specific database table.

That still applies in LR7/DXP, but you might also be able to leverage simple OSGi DS service implementations as well.
6年前 に Gasser M. Abdallah によって更新されました。

RE: Consuming REST services (Beginner)

New Member 投稿: 3 参加年月日: 17/08/23 最新の投稿
Hi David:

It turned out to be a spring version problem failing our SB, now its working and we can consume REST.

Thanks ,
5年前 に Teddy Kossoko によって更新されました。

RE: Consuming REST services (Beginner)

Junior Member 投稿: 42 参加年月日: 18/03/05 最新の投稿

Hi, I'm trying to consume my back end Rest services, but I don't know how to do.

What are the different steps to consume the rest web services ?

How did you do, to have the client exposed to all others portlets ?

Thanks in advance pour your answer.