<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>7.1 - Forms - data provider not working</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110760569" />
  <subtitle>7.1 - Forms - data provider not working</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110760569</id>
  <updated>2026-04-03T23:24:37Z</updated>
  <dc:date>2026-04-03T23:24:37Z</dc:date>
  <entry>
    <title>7.1 - Forms - data provider not working</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110760568" />
    <author>
      <name>Mirto Silvio Busico</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110760568</id>
    <updated>2018-08-22T10:23:42Z</updated>
    <published>2018-08-22T10:23:42Z</published>
    <summary type="html">&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;I'm trying Forms and I'm stuck with data providers.&lt;/p&gt;
&lt;p&gt;Documentation page: &lt;a href="https://dev.liferay.com/discover/portal/-/knowledge_base/7-1/data-providers"&gt;https://dev.liferay.com/discover/portal/-/knowledge_base/7-1/data-providers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Created a data provider for &amp;quot;Countries of the world&amp;quot;, using
  it in a form gives a &amp;quot;Forbidden&amp;quot; error message.&lt;/p&gt;
&lt;p&gt;I discovered that the webservice at &lt;a
  href="http://localhost:8080/api/jsonws/country/get-countries/"&gt;http://localhost:8080/api/jsonws/country/get-countries/&lt;/a&gt; is
  accessible only if you don't login&lt;/p&gt;
&lt;p&gt;Step to reproduce:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Close and reopen the browser&lt;/li&gt;
  &lt;li&gt;go to &lt;a
    href="http://localhost:8080/api/jsonws/country/get-countries/"&gt;http://localhost:8080/api/jsonws/country/get-countries/&lt;/a&gt; -
    &lt;strong&gt;SUCCESS&lt;/strong&gt; you receive a json page&lt;/li&gt;
  &lt;li&gt;open a new tab and go to &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;login as an administrator (as the default user test@liferay.com)&lt;/li&gt;
  &lt;li&gt;go to the first browser tab and reload the &lt;a
    href="http://localhost:8080/api/jsonws/country/get-countries/"&gt;http://localhost:8080/api/jsonws/country/get-countries/&lt;/a&gt; page
    - &lt;strong&gt;ERROR&lt;/strong&gt; you receive a &amp;quot;Forbidden&amp;quot; error&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;What can I do to use data providers that require authentication (btw
  how to avoid to expose webservices to everyone excluded the authorized
  users) :-) ?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Mirto Silvio Busico</dc:creator>
    <dc:date>2018-08-22T10:23:42Z</dc:date>
  </entry>
</feed>
