留言板
Using api/jsonws from javascript
Hi,
(Liferay 6.1.1 CE GA2)
Trying to get article content by using this jsonws-method:
This is the snippet I'm using:
When executing the code, I get the following response:
According to LPS-29265, there are some misstakes in the documentation of webservices but when checking the method signature for
, it seems I have the correct parameters so the method should be recognized. Feels a bit wierd to use the javascript-version of themeDisplay as a parameter but I guess it should work? Any ideas?
(Liferay 6.1.1 CE GA2)
Trying to get article content by using this jsonws-method:
/api/jsonws?signature=/journalarticle/get-article-content-4-groupId-articleId-languageId-themeDisplay
This is the snippet I'm using:
AUI().use('liferay-service', function(A) {
var params = {
groupId: Number(themeDisplay.getScopeGroupId()),
articleId: '12345',
languageId: themeDisplay.getLanguageId(),
themeDisplay: themeDisplay
};
Liferay.Service(
'/journalarticle/get-article-content',
params,
function(obj) {
console.log(obj);
}
);
});
When executing the code, I get the following response:
{"exception":"No JSON web service action associated with path /journalarticle/get-article-content and method GET for /"}
According to LPS-29265, there are some misstakes in the documentation of webservices but when checking the method signature for
com.liferay.portal.journal.service.JournalArticleServiceUtil#getArticleContent
, it seems I have the correct parameters so the method should be recognized. Feels a bit wierd to use the javascript-version of themeDisplay as a parameter but I guess it should work? Any ideas?
Adnan Yaqoob,修改在10 年前。
RE: Using api/jsonws from javascript
Junior Member 帖子: 36 加入日期: 14-3-24 最近的帖子
Any luck... I'm also stuck. I want to use the journalarticle/get-article-content JSON service not sure how to pass languageId and themeDisplay parameters
Krunal Kumar Patel,修改在7 年前。
RE: Using api/jsonws from javascript
New Member 帖子: 7 加入日期: 12-7-27 最近的帖子
Hi Thomas,
I am also trying to show content using /journalarticle/get-article-content but don't know how can i pass themeDisplay object.
Did you get any solution for this problem.?
Thanks,
Krunal Patel
I am also trying to show content using /journalarticle/get-article-content but don't know how can i pass themeDisplay object.
Did you get any solution for this problem.?
Thanks,
Krunal Patel