フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド数 [ 前へ | 次へ ]
toggle
Tina Agrawal
JSON Service without service.xml
2012/04/27 13:23
答え

Tina Agrawal

ランク: Regular Member

投稿数: 190

参加年月日: 2008/01/02

最近の投稿

Hi All,

Any clues how can we develop a Custom JSON Service in a portlet which lists down all the social activities.

We dont have a service.xml since internally the service will be invoking liferay services for retrieving activities.
From our portlet we want to invoke this Custom JSON Service through Ajax and display the result.

We dont want to use serveResource.


Regards,
Tina
David H Nebinger
RE: JSON Service without service.xml
2012/04/27 13:34
答え

David H Nebinger

ランク: Liferay Legend

投稿数: 4496

参加年月日: 2006/09/01

最近の投稿

That doesn't make any sense...

You want to expose a web service to make one of the Liferay APIs visible, yet you're going to invoke the web service from a portlet to get to the Liferay API?

Why not just access the service directly and skip the web service stuff?
Tina Agrawal
RE: JSON Service without service.xml
2012/04/27 13:42
答え

Tina Agrawal

ランク: Regular Member

投稿数: 190

参加年月日: 2008/01/02

最近の投稿

Hi David,

To explain you - I want to display the list of all the activities for all the sites user is a member of in a dashboard.
Also I want to bypass the interpreter since I want to format the links that are shown.

Liferay doesnt have any API for doing that. And we dont want to use serveResource and directly invoke the service from JSP.

Is there any other way of doing it?

Tina
David H Nebinger
RE: JSON Service without service.xml
2012/04/27 14:20
答え

David H Nebinger

ランク: Liferay Legend

投稿数: 4496

参加年月日: 2006/09/01

最近の投稿

Well, for ajax support you'll typically issue a resource request to your portlet. The resource request handler should invoke the Liferay service to get whatever it needs, and it can then build the JSON result to return.