<?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>Liferay 7 JSONP implementation</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110357176" />
  <subtitle>Liferay 7 JSONP implementation</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=110357176</id>
  <updated>2026-04-06T23:54:10Z</updated>
  <dc:date>2026-04-06T23:54:10Z</dc:date>
  <entry>
    <title>Liferay 7 JSONP implementation</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110357175" />
    <author>
      <name>Pete Helgren</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=110357175</id>
    <updated>2018-06-27T14:10:59Z</updated>
    <published>2018-06-27T14:10:59Z</published>
    <summary type="html">&lt;p&gt;I have seen JSONP in a few examples of a remote client calling a LR
  JSONWS api from Javascript (jQuery $ajax call)  Curiously, those
  examples never show the callback parameter passed nor do they confirm
  that it works.  Confusing the issue further there are posts that say
  LR doesn't support JSONP and then some posts that say that they are
  supported after LR 6.1 + but I have yet to see a syntax example nor a
  confirmation that it actually works.&lt;/p&gt;
&lt;p&gt;My specific issue is that if I append ?callback=myCallName to an
  existing jsonws api and receive the following:&lt;/p&gt;
&lt;p&gt;&amp;quot;Refused to execute script from &amp;lt;my jsonws api url here&amp;gt;
  because its MIME type ('application/json') is not executable, and
  strict MIME type checking is enabled.&amp;quot;&lt;/p&gt;
&lt;p&gt;A couple of different approaches produces the usual CORS issues so
  JSONP is really the only option.&lt;/p&gt;
&lt;p&gt;Anybody have a working example of a JSONP call with an LR7 CE SB API
  call?  I have seen some references to adding servlet filters and other
  additional programming solutions but they are also incomplete.  I
  can't imagine that it would be THAT complex just to get JSONP to work...&lt;/p&gt;</summary>
    <dc:creator>Pete Helgren</dc:creator>
    <dc:date>2018-06-27T14:10:59Z</dc:date>
  </entry>
</feed>
