Not logged in. · Lost password · Register
Forum: General Help and Support General Stuff RSS
XMLRPC Service Issue
Avatar
sandeep.bhutani #1
Member since Jul 2017 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: XMLRPC Service Issue
Hi All,

I was getting below error when using XMLRPC services in Postman. During trial I have observed all methods starting with dokuwiki.* works fine but wiki.* doesn't.

Validated all permissions and setup instructions mentioned in following link 

https://www.dokuwiki.org/devel:xmlrpc


Appreciate your help for this.

Method:-
wiki.putPage


Error:-
<?xml version="1.0"?>
<methodResponse>
    <fault>
        <value>
            <struct>
                <member>
                    <name>faultCode</name>
                    <value>
                        <int>-32604</int>
                    </value>
                </member>
                <member>
                    <name>faultString</name>
                    <value>
                        <string>server error. forbidden to call the method wiki.putPage</string>
                    </value>
                </member>
            </struct>
        </value>
    </fault>
</methodResponse>


But below method works fine

Method:-
dokuwiki.getVersion


Output:-
<?xml version="1.0"?>
<methodResponse>
    <params>
        <param>
            <value>
                <string>Release 2017-02-19b &quot;Frusterick Manners&quot;</string>
            </value>
        </param>
    </params>
</methodResponse>
This post was edited on 2017-07-13, 09:08 by sandeep.bhutani.
Avatar
jchprj #2
Member since Dec 2018 · 1 post
Group memberships: Members
Show profile · Link to this post
Hi,

From the code, there is only one position return 'forbidden to call the method'. It's because 'remoteuser' is set in the settings.

I encoutered this problem today. In my case I found the reason is: a group name is set in 'remoteuser' setting, but the syntax is wrong. The right syntax for a group name is insert a '@' before group name.


The original code is:

    public function call($methodname, $args){
        try {
            $result = $this->remote->call($methodname, $args);
            return $result;
        } catch (RemoteAccessDeniedException $e) {
            if (!isset($_SERVER['REMOTE_USER'])) {
                http_status(401);
                return new IXR_Error(-32603, "server error. not authorized to call method $methodname");
            } else {
                http_status(403);
                return new IXR_Error(-32604, "server error. forbidden to call the method $methodname");
            }
        } catch (RemoteException $e) {
            return new IXR_Error($e->getCode(), $e->getMessage());
        }
    }
Avatar
turnermm (Moderator) #3
Member since Oct 2009 · 4598 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post #1
There is most likely an error in your request.  I have tested this successfully in Greebo with the xcom plugin which uses the php interface.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-04-20, 00:37:09 (UTC +02:00)