Summary

Using XMLRPC server all existing resources are abled to call, but not configured (checked) only. (Like REST server).

Detailed description

It is configured 'node.retrieve' resource only.
XMLRPC server configuration

And method 'node.retrieve' works. But all other unchecked methods (LIKE taxonomy_term.retrieve) work also!

Call to method 'system.listMethods' returns full methods list, including unchecked:

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string>system.multicall</string>
            </value>
            <value>
              <string>system.methodSignature</string>
            </value>
            <value>
              <string>system.getCapabilities</string>
            </value>
            <value>
              <string>system.listMethods</string>
            </value>
            <value>
              <string>system.methodHelp</string>
            </value>
            <value>
              <string>file.create</string>
            </value>
            <value>
              <string>file.retrieve</string>
            </value>
            <value>
              <string>file.delete</string>
            </value>
            <value>
              <string>file.index</string>
            </value>
            <value>
              <string>file.create_raw</string>
            </value>
            <value>
              <string>node.retrieve</string>
            </value>
            <value>
              <string>node.create</string>
            </value>
            <value>
              <string>node.update</string>
            </value>
            <value>
              <string>node.delete</string>
            </value>
            <value>
              <string>node.index</string>
            </value>
            <value>
              <string>node.files</string>
            </value>
            <value>
              <string>node.attach_file</string>
            </value>
            <value>
              <string>system.connect</string>
            </value>
            <value>
              <string>system.get_variable</string>
            </value>
            <value>
              <string>system.set_variable</string>
            </value>
            <value>
              <string>system.del_variable</string>
            </value>
            <value>
              <string>taxonomy_term.retrieve</string>
            </value>
            <value>
              <string>taxonomy_term.create</string>
            </value>
            <value>
              <string>taxonomy_term.update</string>
            </value>
            <value>
              <string>taxonomy_term.delete</string>
            </value>
            <value>
              <string>taxonomy_term.index</string>
            </value>
            <value>
              <string>taxonomy_term.selectNodes</string>
            </value>
            <value>
              <string>taxonomy_vocabulary.retrieve</string>
            </value>
            <value>
              <string>taxonomy_vocabulary.create</string>
            </value>
            <value>
              <string>taxonomy_vocabulary.update</string>
            </value>
            <value>
              <string>taxonomy_vocabulary.delete</string>
            </value>
            <value>
              <string>taxonomy_vocabulary.index</string>
            </value>
            <value>
              <string>taxonomy_vocabulary.getTree</string>
            </value>
            <value>
              <string>user.retrieve</string>
            </value>
            <value>
              <string>user.create</string>
            </value>
            <value>
              <string>user.update</string>
            </value>
            <value>
              <string>user.delete</string>
            </value>
            <value>
              <string>user.index</string>
            </value>
            <value>
              <string>user.login</string>
            </value>
            <value>
              <string>user.logout</string>
            </value>
            <value>
              <string>user.token</string>
            </value>
            <value>
              <string>user.request_new_password</string>
            </value>
            <value>
              <string>user.register</string>
            </value>
            <value>
              <string>user.cancel</string>
            </value>
            <value>
              <string>user.password_reset</string>
            </value>
            <value>
              <string>user.resend_welcome_email</string>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodResponse>
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dewalt created an issue. See original summary.

dewalt’s picture

Title: All resorses (including unchecked) abled to call with XMLRPC server. » All resources (including unchecked) abled to call with XMLRPC server.
Issue summary: View changes
dewalt’s picture

Status: Active » Needs review
FileSize
948 bytes

Seems the next patch solves an issue.

Method 'system.listMethods' output on patched code with configuration above:

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string>system.multicall</string>
            </value>
            <value>
              <string>system.methodSignature</string>
            </value>
            <value>
              <string>system.getCapabilities</string>
            </value>
            <value>
              <string>system.listMethods</string>
            </value>
            <value>
              <string>system.methodHelp</string>
            </value>
            <value>
              <string>node.retrieve</string>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodResponse>

Answer trying to call 'taxonomy_term.retrieve' method:

<?xml version="1.0"?>
<methodResponse>
  <fault>
    <value>
      <struct>
        <member>
          <name>faultCode</name>
          <value>
            <int>-32601</int>
          </value>
        </member>
        <member>
          <name>faultString</name>
          <value>
            <string>Server error. Requested method taxonomy_term.retrieve not specified.</string>
          </value>
        </member>
      </struct>
    </value>
  </fault>
</methodResponse>
kylebrowning’s picture

Status: Needs review » Reviewed & tested by the community
marcingy’s picture

Status: Reviewed & tested by the community » Fixed

Merged thanks

  • marcingy committed 46d0729 on 7.x-3.x authored by dewalt
    Issue #2566979 by dewalt: All resources (including unchecked) abled to...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

jibees’s picture

Hi there !
Since I've updated to .14 (I previously was on .12), I can't request any XMLRPC methods since I've correctly checked the right resources inside the configuration panel of the Services module: http://i.imgur.com/LoeS0wu.png
And when I request XMLRPC, I have:

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data>
            <value>
              <string>
                system.multicall
              </string>
            </value>
            <value>
              <string>
                system.methodSignature
              </string>
            </value>
            <value>
              <string>
                system.getCapabilities
              </string>
            </value>
            <value>
              <string>
                system.listMethods
              </string>
            </value>
            <value>
              <string>
                system.methodHelp
              </string>
            </value>
          </data>
        </array>
      </value>
    </param>
  </params>
</methodResponse>

When I comment the lign 45 of xmlrpc_server.module :
_services_apply_endpoint($resources, $endpoint, TRUE);
everything is ok, I can access the blogger xmlrpc resources:

<?xml version="1.0"?>
<methodResponse>
  <params>
    <param>
      <value>
        <array>
          <data>
            [...]
            <value>
              <string>
                blogger.getUsersBlogs
              </string>
            </value>
            <value>
              <string>
                blogger.getUserInfo
              </string>
            </value>
            <value>
              <string>
                blogger.newPost
              </string>
            </value>
            <value>
              <string>
                blogger.editPost
              </string>
            </value>
            <value>
              <string>
                blogger.getPost
              </string>
            </value>
            <value>
              <string>
                blogger.deletePost
              </string>
            </value>
            <value>
              <string>
                blogger.getRecentPosts
              </string>
            </value>
            [...]
          </data>
        </array>
      </value>
    </param>
  </params>
</methodResponse>

Any idea on what's going wrong?
Many thanks!