Closed gamerson closed 10 years ago
Thanks Greg,
In 6.2, this line should had fixed the issue:
type.equals("object<com.liferay.portal.kernel.json.JSONArray> ")
In fact, I've just generated the services against 6.2 and getWarPortlets() returns JSONArray correctly.
Are you testing against portal trunk?
I'm testing against 6.2.0-ce-ga1 and the SDK jar I downloaded from github.
On Wed, Feb 19, 2014 at 6:31 PM, Bruno Farache notifications@github.comwrote:
Thanks Greg,
In 6.2, this line should had fixed the issue:
type.equals("object")
In fact, I've just generated the services against 6.2 and getWarPortlets() returns JSONArray correctly.
Are you testing against portal trunk?
Reply to this email directly or view it on GitHubhttps://github.com/liferay/liferay-mobile-sdk/pull/6#issuecomment-35485042 .
Greg Amerson Liferay Developer Tools Liferay, Inc. www.liferay.com
Not merging this PR as per our conversation, this has been fixed by this commit: 5a046b0416d5ee683b5c4737ea463840d084750a
Previously the PortletService.getWarPortlets() would through a ClassCastException because the generated API was expected the server to return a JSONObject but it returns a JSONArray instead.
This commit changes the code generation to generate PortletService.getWarPortlets() to have proper JSONArray return type.
However, I'm not sure what other methods would be selected. I did some research and there seemed to be 1 or 2 more methods that had type=="java.util.Collection..." but were returning JSONObject. Likely those APIs were also incorrect. Hopefully this change will fix those as well.