Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-25800

Example in JSON WebService api documentation fails on portlets

    Details

    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed

      Description

      When portlet example is invoked from json ws api doc pages, it fails. This happens because URL is wrongly created.

      The core issue is in this file: portal\portal-web\docroot\html\portal\api\jsonws\action.jsp
      in the following block (line #344):

      Liferay.Service(
      	'<%= jsonWebServiceActionMapping.getServletContextPath() + jsonWebServiceActionMapping.getPath() %>',
      	formEl,
      	function(obj) {
      ...
      

      As you see, context path and action path are joined, but this is wrong. For example, instead of the correct url:

      /sample-jsonws-portlet/api/jsonws/sampleasset/hello
      

      the wrong one is invoked:

      /api/jsonws/sample-jsonws-portlet/sampleasset/hello
      

      Liferay.Service should add support for context, i.e. for plugins.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.saechang Michael Saechang
              Reporter:
              igor.spasic Igor Spasic (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 24 weeks, 1 day ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2