Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2363

Re: Structure of parameters in POST

$
0
0
by Jackie Smile.  

Thanks for your reply Hubert. Actually it was how I thought it should be. I was just putting the data in another array before and that caused the error.
However my real problem is still not solved. I want to use a structure similar to the create_users function so I'm posting that instead. From examples I found this should work but I don't manage to accomplish that...

client:

...
$user = new stdClass();
$user->username = 'testusername';
$users = array( $user );
$params = array( 'users' => $users );
...
$post = xmlrpc_encode_request($functionname, $params);

That should relate to the parameter description in externallib.php: 

...
return new external_function_parameters(
    array(
        'users' => new external_multiple_structure(
            new external_single_structure(
                array(
                    'username' => new external_value(PARAM_RAW, 'Username'),
...


and the parameter validation:

...
$params = self::validate_parameters(self::create_users_parameters(), array('users'=>$users));
...


I still get the "Calling parameters do not match signature" error. What is wrong here? I'm using the XML-RPC if that is of concern


Viewing all articles
Browse latest Browse all 2363

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>