Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40344

/direct/site asks for id while creating

    XMLWordPrintable

    Details

    • Test Plan:
      Hide

      To reproduce the error:

      1. Open your web service testing application (like SoapUI).
      2. Create a request like this:
        1. Method: POST
        2. Endpoint: http://your.sakai.server
        3. Resource: /direct/site
        4. Parameters:
          1. _validateSession=true
          2. sakai.session=[place.a.valid.session.number.here]
          3. title=algorithms
          4. type=course
      3. The final URL should look like https://trunk-mysql.nightly.sakaiproject.org/direct/site?_validateSession=true&sakai.session=f0cb8366-efe5-42a3-9bca-fbbfa28d3679&title=algorithms&type=course 
      4. Submit the request.
      5. You should get: HTTP Status 400 - IllegalArgumentException: Unable to handle input request for format html for this path (/site) for prefix (site) for entity (/site), request url (/site): Cannot create site with given id: null:null

       

      To create the site:

      Repeat steps until 2.4.4 and add a 5th parameter like id=11112222 (or any site id that does not exist in the database).

      In the 5th step you should get an HTTP 201 with content 11112222. That means that the site has been created.

       

      Show
      To reproduce the error: Open your web service testing application (like SoapUI). Create a request like this: Method: POST Endpoint: http://your.sakai.server Resource: /direct/site Parameters: _validateSession=true sakai.session= [place.a.valid.session.number.here] title=algorithms type=course The final URL should look like  https://trunk-mysql.nightly.sakaiproject.org/direct/site?_validateSession=true&sakai.session=f0cb8366-efe5-42a3-9bca-fbbfa28d3679&title=algorithms&type=course   Submit the request. You should get:  HTTP Status 400 - IllegalArgumentException: Unable to handle input request for format html for this path (/site) for prefix (site) for entity (/site), request url (/site): Cannot create site with given id: null:null   To create the site: Repeat steps until 2.4.4 and add a 5th parameter like id=11112222 (or any site id that does not exist in the database). In the 5th step you should get an HTTP 201 with content  11112222 . That means that the site has been created.  

      Description

      /direct/site asks for the site id while creating the entity but instead it should return it after creation.

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                • Assignee:
                  sergioame Sergio Muriel
                  Reporter:
                  sergioame Sergio Muriel
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Git Integration