Foren

Create user via REST

thumbnail
Aritz Galdos, geändert vor 12 Jahren.

Create user via REST

Expert Beiträge: 416 Beitrittsdatum: 15.05.07 Neueste Beiträge
Hi guys:

I am implementing a kind of interface for Liferay and Android communication via REST. By now, I am able to get data from Lferay server via REST. But, does anyone know whether it is possible to create, i.e. users via REST? Can I invoke addUser method?

Regards,
Aritz Galdos
thumbnail
Thiago Leão Moreira, geändert vor 12 Jahren.

RE: Create user via REST

Liferay Legend Beiträge: 1449 Beitrittsdatum: 10.10.07 Neueste Beiträge
I never tried but I think it is. If you check the list of operations available through Web Services you can see the addUser operation at http://localhost:8080/tunnel-web/axis, so I think you can call it as a REST as well.
thumbnail
Aritz Galdos, geändert vor 12 Jahren.

RE: Create user via REST

Expert Beiträge: 416 Beitrittsdatum: 15.05.07 Neueste Beiträge
Hi Thiago:

I just made a try. And after some debigging I found that It cannot be done. At least in 6.0.6

When de call is launched, some checks are done in JSONServiceAction class.

Among other things, it tries to find whether exists the selected method with the provided params.

After that, "getArgValue" is called for each parameter. And when it reached locale, I breaks the execution as Locale is not accepted. I guess that the same would happen with contextService parameter and so...

I had a look t the source of trung in gitHub. Al it looks like some improvements have been done. In case it does not match any data type, It tries to do a loose parsing.

I will have to wait for 6.1 o work against trunk emoticon

Regards!!

And thanks for answering Thiago!!