I can log in successfully with the following code but that is all I can do.

No matter what I try i can not do a node.get or node.save.

Here is some testing code I have been useing

function test_xml_function(){

$xmlrpc_url = 'http://www.mydomain.com/services/xmlrpc';

// Use anon session id to login with authentication
$user = 'xxxxx';
$password = 'xxxxxxn';
$authenticated_session = xmlrpc($xmlrpc_url, 'user.login', $user, $password );
$session = $authenticated_session['sessid'];
print_r($authenticated_session); // IT WORKS UP TO HERE
$xmlrpc_result = xmlrpc($xmlrpc_url ,'node.get', $session ,1361);
print_r($xmlrpc_result);

if ($xmlrpc_result === FALSE) {
print '

' . print_r(xmlrpc_error(), TRUE) . '
'; // this is where i get access denied
}
else {

  print '
' . print_r($xmlrpc_result, TRUE) . '
';
}

Comments

gweston’s picture

Status: Active » Fixed

I figured this out not quite sure want the problem was

svdhout’s picture

I am having the exact same problem, what did you do to solve it?

svdhout’s picture

I found my problem. Turns out i used the wrong syntax for the node object i wanted to insert.

Status: Fixed » Closed (fixed)

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