Foros de discusión

Making a remote JSON call to /assettag/get-tags

Zenobia L, modificado hace 10 años.

Making a remote JSON call to /assettag/get-tags

Junior Member Mensajes: 28 Fecha de incorporación: 8/04/11 Mensajes recientes
just want to share may experience

Liferay 6.1 GA2

I am writing an Android App and is making lots of JSON web service client calls to Liferay, 6.1 GA2

mostly is working.. I was having problems when calling the "/assettag/get-tags" web-service

I was following the samples at api/jsonws,
and I was using the parameter names: className and classPK

in the api/jsonws GUI, the call to this JSON web service work but not the URL given in the "URL example" tab

I got the same errors when trying to run my code

Error #1:
No JSON web service action associated with path /assettag/get-tags and method GET for /

I solved this by adding a hint to the method name: "/assettag/get-tags.2"

but then I got the next error message

Error #2:
{"exception":"java.lang.IllegalArgumentException

after debugging the code in the server.. I decided to change my client's JSON call, I changed the name of the field from "classPK" to "classPk"..
and that made it work!

so,, the JSON call uses a hint in the method "/assettag/get-tags.2" and parameters: "className" and "classPk"