Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-754

XML-RPC storePage and NullPointers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 B2, 1.0 B3, 1.0 B4, 1.0 B5, 1.0 B6
    • Fix Version/s: 1.0 RC1
    • Component/s: {Unused} Web Services
    • Labels:
      None
    • Environment:
      xampp with tomcat under windows
    • keywords:
      patch,xml-rpc,rpc,storePage
    • Similar issues:

      Description

      I need to get some parts of xml-rpc working. And as a result of this, i found some bugs and later i will give you some patches.

      So whats all about... if we look at http://confluence.atlassian.com/display/DOC/Remote+API+Specification we will find this unter storePage:

      Page storePage(String token, Page page) - add or update a page. For adding, the Page given as an argument should have space, title and content fields at a minimum. For updating, the Page given should have id, space, title, content and version fields at a minimum. The parentId field is always optional. All other fields will be ignored.

      So if we want to create a new page, we only must set

      • space
      • title
      • content

      Now calls like this.setLocks(((Integer)pageht.get("locks")).intValue()) will fail, because will return null, if we are only setting the 3 values. The two pachtes will ffix this issue.

      Greets,
      Christian

      PS: I got storePage working, but will do some clean ups and will post a patch

        Attachments

          Activity

            People

            Assignee:
            vmassol Vincent Massol
            Reporter:
            austriancoder Christian Gmeiner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                Time Tracking

                Estimated:
                Original Estimate - 5 minutes
                5m
                Remaining:
                Remaining Estimate - 5 minutes
                5m
                Logged:
                Time Spent - Not Specified
                Not Specified