Fórum

json web services api - orderbycomparator

Sébastien B, modificado 1 Ano atrás.

json web services api - orderbycomparator

New Member Postagens: 17 Data de Entrada: 07/11/12 Postagens Recentes
Hello,

I try to use json web services api via http://localhost:8080/api/jsonws interface.

I've not managed to call web services which required an OrderByComparator (com.liferay.portal.kernel.util.OrderByComparator). I would like to set null as comparator, for example /journalarticle/get-articles-by-structure-id with url version :

http://localhost:8080/api/jsonws/journalarticle/get-articles-by-structure-id/group-id/12314/ddm-structure-key/123123/start/-1/end/-1/-obc

Anyone have an idea ?

Thanks a lot !

Sébastien Bihan
Lucian Alexandrescu, modificado 8 Anos atrás.

RE: json web services api - orderbycomparator

New Member Postagens: 10 Data de Entrada: 16/04/14 Postagens Recentes
Hi Sebastien,

Have you found a solution?
I want to order by "modifiedDate" : DESC, but I don't know what to add for the obc parameter.

Thanks!
Odaiah Chitukuri, modificado 6 Anos atrás.

RE: json web services api - orderbycomparator

New Member Mensagem: 1 Data de Entrada: 30/08/16 Postagens Recentes
I am also having the same issues,
I tried to call a webservice which will return file-entries, requires obc.

Thanks,
Odaiah
Razvan Coca, modificado 6 Anos atrás.

RE: json web services api - orderbycomparator

New Member Postagens: 3 Data de Entrada: 05/07/17 Postagens Recentes
Hello everybody,

I have same issue. Is any solution for this? I already tried everyway without success.

Thanks
thumbnail
alex alex, modificado 6 Anos atrás.

RE: json web services api - orderbycomparator

New Member Postagens: 24 Data de Entrada: 15/02/17 Postagens Recentes
Call the webservice --> Save it in ArrayList --> then you can order it as you want ! emoticon
Razvan Coca, modificado 6 Anos atrás.

RE: json web services api - orderbycomparator

New Member Postagens: 3 Data de Entrada: 05/07/17 Postagens Recentes
It's not useful for me. I want to call the web service from JSONWS Liferay interface (/api/jsonws), and i need to put orderbycomparator parameter (Capture 1).

If i set orderByComparator to null, 0, or other value it says: "Unable to convert to type: com.liferay.portal.kernel.util.OrderByComparator" (Capture 2).

What I have to put here to work?
Razvan Coca, modificado 6 Anos atrás.

RE: json web services api - orderbycomparator

New Member Postagens: 3 Data de Entrada: 05/07/17 Postagens Recentes
Solved emoticon

Here is a typo at URL call.

Added "o" to param and works fine.
Dz Q, modificado 6 Anos atrás.

RE: json web services api - orderbycomparator

New Member Mensagem: 1 Data de Entrada: 11/05/14 Postagens Recentes
Solved
Hi all, I found this solution and it worked fine.
I can fetch all JournalArticle and sort by dateCreate throws webservice by using this
url : http://mydomain:8080/api/jsonws/journalarticle/get-articles/group-id/20181/folder-id/65371/start/0/end/15/+obc:com.liferay.portlet.journal.util.comparator.ArticleCreateDateComparator
(I use Postman to submit that url)
You can search all subclass of com.liferay.portlet.journal.util.comparator here
Hope this help!