Fórum
Issue with Liferay6.2 Json webservice URL using Plugin context
Shahid Khan, modificado 8 Anos atrás.
Issue with Liferay6.2 Json webservice URL using Plugin context
Junior Member Postagens: 60 Data de Entrada: 30/01/13 Postagens Recentes
Hi
Is there any configuration changes required to consume webservice URL using Plugin Context in Liferay6.2??
http://localhost:8080/my-custom-portlet/api/jsonws/userentry/get-user-details/web-id/liferay.com/user-emails/testuser%40test.com
- Currently this gives error:
{"exception":"Authenticated access required"}
Upon investigation i got differences as below
For Liferay 6.1.1
---------------
plugin-context:
http://localhost:8080/my-custom-portlet/api/secure/jsonws/userentry/get-user-details/web-id/liferay.com/user-emails/testuser%40test.com
Portal-context:
http://localhost:8080/api/secure/jsonws/my-custom-portlet/get-user-details/web-id/liferay.com//user-emails/testuser%40test.com
Both URL works perfect in liferay611 version
But for Liferay 6.2.1
---------------
plugin-context:
http://localhost:8080/my-custom-portlet/api/jsonws/userentry/get-user-details/web-id/liferay.com/user-emails/testuser%40test.com
- This gives error:
{"exception":"Authenticated access required"}
Portal-context:
http://192.168.19.156:2280/api/jsonws/my-custom-portlet/get-user-details/web-id/liferay.com//user-emails/testuser%40test.com
- This works Perfect But needs a login to portal with admin credentials
Please suggest the solution for this because i want to consume service using Plugin-context way only.
I hope there is a way for this.
Regards
Shahid
Is there any configuration changes required to consume webservice URL using Plugin Context in Liferay6.2??
http://localhost:8080/my-custom-portlet/api/jsonws/userentry/get-user-details/web-id/liferay.com/user-emails/testuser%40test.com
- Currently this gives error:
{"exception":"Authenticated access required"}
Upon investigation i got differences as below
For Liferay 6.1.1
---------------
plugin-context:
http://localhost:8080/my-custom-portlet/api/secure/jsonws/userentry/get-user-details/web-id/liferay.com/user-emails/testuser%40test.com
Portal-context:
http://localhost:8080/api/secure/jsonws/my-custom-portlet/get-user-details/web-id/liferay.com//user-emails/testuser%40test.com
Both URL works perfect in liferay611 version
But for Liferay 6.2.1
---------------
plugin-context:
http://localhost:8080/my-custom-portlet/api/jsonws/userentry/get-user-details/web-id/liferay.com/user-emails/testuser%40test.com
- This gives error:
{"exception":"Authenticated access required"}
Portal-context:
http://192.168.19.156:2280/api/jsonws/my-custom-portlet/get-user-details/web-id/liferay.com//user-emails/testuser%40test.com
- This works Perfect But needs a login to portal with admin credentials
Please suggest the solution for this because i want to consume service using Plugin-context way only.
I hope there is a way for this.
Regards
Shahid
Andew Jardine, modificado 8 Anos atrás.
RE: Issue with Liferay6.2 Json webservice URL using Plugin context
Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
Hey Sahid,
Have you see this? https://www.liferay.com/web/tomas.polesovsky/blog/-/blogs/json-ws-security
Also, Tomas did a dev.life session which wasn't necessarily EXACTLY your topic, but he did cover accessing the JSON service api. He used 6.2 in the demo.. perhaps there is something helpful in it for you.
Check it out: https://www.liferay.com/community/dev.life/previous/-/asset_publisher/2wvNGOKWjJYi/content/20140923-tomas-polesovsky-securing-remote-json-web-services?redirect=https%3A%2F%2Fwww.liferay.com%2Fcommunity%2Fdev.life%2Fprevious%3Fp_p_id%3D101_INSTANCE_2wvNGOKWjJYi%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_pos%3D3%26p_p_col_count%3D5
Have you see this? https://www.liferay.com/web/tomas.polesovsky/blog/-/blogs/json-ws-security
Also, Tomas did a dev.life session which wasn't necessarily EXACTLY your topic, but he did cover accessing the JSON service api. He used 6.2 in the demo.. perhaps there is something helpful in it for you.
Check it out: https://www.liferay.com/community/dev.life/previous/-/asset_publisher/2wvNGOKWjJYi/content/20140923-tomas-polesovsky-securing-remote-json-web-services?redirect=https%3A%2F%2Fwww.liferay.com%2Fcommunity%2Fdev.life%2Fprevious%3Fp_p_id%3D101_INSTANCE_2wvNGOKWjJYi%26p_p_lifecycle%3D0%26p_p_state%3Dnormal%26p_p_mode%3Dview%26p_p_col_id%3Dcolumn-2%26p_p_col_pos%3D3%26p_p_col_count%3D5
Shahid Khan, modificado 8 Anos atrás.
RE: Issue with Liferay6.2 Json webservice URL using Plugin context
Junior Member Postagens: 60 Data de Entrada: 30/01/13 Postagens Recentes
Hello Andrew,
Thanks for these details - really helpful for me.
Regards
Shahid
Thanks for these details - really helpful for me.
Regards
Shahid