Hi all.

I am having an issue trying to get the retriever to talk to the distributor service.

Namely, it can't seem to call the methods offered by the distributor service. As an example, if I try to test code below (taken from content_retriever.admin.inc), $connect contains a session ID and user object for anonymous, while $fields is NULL.

The fact that calling system.connect returns the proper response indicates to me that the client is set up correctly - it hits the proper endpoint, and has a proper API key.

I've double checked that all permissions are set as instructed in the README.txt file in the module. Thanks in advance for any help.

// retrieve array of content types for distribution from web service
$endpoint = variable_get('content_retriever_endpoint', 'http://cms.defaqto.com/services/xmlrpc');
$api_key = variable_get('content_retriever_api_key', '');

// connect to the system service to get a session id
$connect = content_retriever_xmlrpc($endpoint, 'system.connect', $api_key);
$session_id = $connect['sessid'];

//retrieve content types   
$fields  = content_retriever_xmlrpc($endpoint, 'node.getAllTypes', $api_key, $session_id);

Comments

joachim’s picture

I had this problem for ages while setting this module up, and I'm afraid I can't tell you exactly what fixed it :(

You should have a user login in your test code after the system.connect call.

brianV’s picture

@joachim:

Thanks for replying, and happy new year!

I have the exact same issue with the user.login call - the result of the call is NULL.

I've tried disabling session IDs and the API keys in the settings, and I get the exact same result - system.connect works, but the other methods return NULL.

Come Monday, I will start dissecting the code a little further to see what exactly is blowing up here.

joachim’s picture

One thing I tried was giving the Retriever site the user and password for account uid 1 on the Distributor -- mind you, I was testing this with both sites on localhost so there were no security considerations.

brianV’s picture

Status: Active » Closed (works as designed)

The two servers were off by 52 seconds, so the key expiry time needed to be bumped.

Closing.