Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
7.1 - Forms - data provider not working
Mirto Silvio Busico, modified 7 Years ago.
Regular Member
Posts: 240
Join Date: 1/18/12
Recent Posts
Hi all,
I'm trying Forms and I'm stuck with data providers.
Documentation page: https://dev.liferay.com/discover/portal/-/knowledge_base/7-1/data-providers
Created a data provider for "Countries of the world", using it in a form gives a "Forbidden" error message.
I discovered that the webservice at http://localhost:8080/api/jsonws/country/get-countries/ is accessible only if you don't login
Step to reproduce:
- Close and reopen the browser
- go to http://localhost:8080/api/jsonws/country/get-countries/ - SUCCESS you receive a json page
- open a new tab and go to http://localhost:8080
- login as an administrator (as the default user test@liferay.com)
- go to the first browser tab and reload the http://localhost:8080/api/jsonws/country/get-countries/ page - ERROR you receive a "Forbidden" error
What can I do to use data providers that require authentication (btw how to avoid to expose webservices to everyone excluded the authorized users) :-) ?