Foren
REST WS
Ehsan Rashidy, geändert vor 9 Jahren.
REST WS
New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste Beiträge
Hi
I'm going to develope a RESTful ws,
and I'm wondering how can I implement it, so I made some questions:
Which one is better, using a third party framework(such as spring framework) or liferay built-in api? and
Which one is the better solution, Portal Web Service or Plugin Portlet Web service?
regards.
I'm going to develope a RESTful ws,
and I'm wondering how can I implement it, so I made some questions:
Which one is better, using a third party framework(such as spring framework) or liferay built-in api? and
Which one is the better solution, Portal Web Service or Plugin Portlet Web service?
regards.
David H Nebinger, geändert vor 9 Jahren.
RE: REST WS
Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Question - Which is better, hot or code, dog or cat, horse or donkey?
Answer - They are each better in different circumstances. Without some contextual background, 'better' has no meaning.
Answer - They are each better in different circumstances. Without some contextual background, 'better' has no meaning.
Ehsan Rashidy, geändert vor 9 Jahren.
RE: REST WS
New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste Beiträge
ok, you are right, my question was not enough obvious,
I'm new to liferay, so I'm looking for the easiest way to implement the service also I have to implement it as soon as possible.
so the "time" and the "way of implementation" are important to me.
regards.
I'm new to liferay, so I'm looking for the easiest way to implement the service also I have to implement it as soon as possible.
so the "time" and the "way of implementation" are important to me.
regards.
David H Nebinger, geändert vor 9 Jahren.
RE: REST WS
Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
Right, but there's still not enough context...
Will your web service be exposing liferay entities, or is it a plain rest implementation?
Me, I like using a straight spring rest servlet and invoke whatever I want (liferay or otherwise), but it comes with caveats that may or may not be appropriate for you.
Will your web service be exposing liferay entities, or is it a plain rest implementation?
Me, I like using a straight spring rest servlet and invoke whatever I want (liferay or otherwise), but it comes with caveats that may or may not be appropriate for you.
Pier Paolo Ramon, geändert vor 9 Jahren.
R: REST WS
Junior Member Beiträge: 90 Beitrittsdatum: 25.05.10 Neueste Beiträge
Given the use of the Service Builder or builtin entities, I'd go with JSON WS and forget about a real REST API. My two cents, cost aware.
Sent from my iPhone with Liferay.com Forums
Sent from my iPhone with Liferay.com Forums
Ehsan Rashidy, geändert vor 9 Jahren.
RE:REST WS
New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste Beiträge
Thank you for your replies David and Paolo,
We have a portlet which has a seperate database resides next to liferay portal's one
(in the production enviroment they should reside in the same DB server, but now in development enviroment they are in two different servers)
and the service will expose the data of one of the tables.
The service should only gets an id and returns the associated row,
in addition, it should be a secured service so that the client should be authenticated to use it.
regards
We have a portlet which has a seperate database resides next to liferay portal's one
(in the production enviroment they should reside in the same DB server, but now in development enviroment they are in two different servers)
and the service will expose the data of one of the tables.
The service should only gets an id and returns the associated row,
in addition, it should be a secured service so that the client should be authenticated to use it.
regards
Nitesh Kr Sahay, geändert vor 9 Jahren.
RE: REST WS
Junior Member Beiträge: 58 Beitrittsdatum: 28.11.11 Neueste Beiträge
I think you should create a seperate web service using Rest or Soap and call from liferay plugin as a client.
I am not getting anything in your provided scenario where liferay 'll be best suited to create and publish web service for your outer service.
I am not getting anything in your provided scenario where liferay 'll be best suited to create and publish web service for your outer service.
Ehsan Rashidy, geändert vor 9 Jahren.
RE: REST WS
New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste BeiträgeNitesh Kr Sahay:
I think you should create a seperate web service using Rest or Soap and call from liferay plugin as a client.
I am not getting anything in your provided scenario where liferay 'll be best suited to create and publish web service for your outer service.
Nitesh, What's the point of creating a seperate service?
I prefer to create the service inside the portlet, because I can use the existing SessionFactoy Object which I have in there,
if I create a seperate service I have to create an additional Object.
Pier Paolo Ramon, geändert vor 9 Jahren.
R: REST WS
Junior Member Beiträge: 90 Beitrittsdatum: 25.05.10 Neueste Beiträge
Ehsan Rashidy, geändert vor 9 Jahren.
RE: R: REST WS
New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste BeiträgePier Paolo Ramon:
Is the portlet developed using the ServiceBuilder?
Sent from my iPhone with Liferay.com Forums
No, Portlet is not developed by ServiceBuilder.
Ehsan Rashidy, geändert vor 9 Jahren.
RE: R: REST WS
New Member Beiträge: 17 Beitrittsdatum: 24.04.13 Neueste Beiträge
I was following this tutorial and finally I implemented the service with the help of Spring and Liferay PorletDelegateServlet class.
regards.
regards.