XMLRPC Server - Client

Permalink
Hi,

I am considering using C5 for few projects but the requirements are it must support XMLRPC web services. C5 is based on Zend FW and I am Zend developer but not familiar with internal workings of C5. With Zend FW I can create XMLRPC client or server with few lines of code. So... the questions:

* Can C5 be used as XMLRPC server and other instance of C5 as XMLRPC client?
* Can C5 expose user profiles (as XMLRPC API) to be used on multiple instances of C5 - one user DB but multiple web sites?
* Can I create custom user provider similar to Symfony2 or Zend FW, to create user object with all required permissions but user data (password, login, address...) to come from remote XMLRPC server (API) ?

I like what you guys have done and would be good to use C5 in my projects. Please provide some feedback.

Alex

 
jbx replied on at Permalink Reply
jbx
Hi Alex,

In short - yes.

But...

You would need to do some coding to get all of that to work!
You're correct in that C5 is based on the Zend FW in parts. By default it only ships with a few Zend modules, but you can simply add the full framework into libraries/3rdparty. That will give you access to the whole lot, using
Loader::library('3rdparty/Zend/ZendXmlrpc');
$xmlrpc = new ZendXmlrpc();

or something along those lines - I'm sure you get the idea...

A quick word of warning - if you have the Zend FW in your include path, it will cause issues with libraries loading twice, so ensure it is taken out of the include path on your server for C5.

You would need some kind of user object present on each system. I don't think you could move the entire user system out into an API, and still use them like a normal C5 user. Having said that, it depends what you need to do. I have a situation where I have a backend system written in Silex that maintains a list of users with a WSSE Auth Provider and the built in User Provider and I use C5 for the front end, mapping C5 users to the Silex API using an API key. You could also write a custom controller, so that when a user tries to login, C5 contacts your central C5 install or other API, authenticates the user, grabs some basic information (username, email, groups etc) and creates a C5 user for you in the background. That way, your user is now a native C5 user and has access to the full C5 permissions model etc.

Lots of different approaches for different situations. I've implemented a fair few in my time, so feel free to ask away with any questions - happy to help :)

Jon
alexomundo replied on at Permalink Reply
Hi Mark,

Thank you for info and explanation.
Yes, I have thought of creating a custom controller that will create user instance with all required data/info to create c5 user.

I've used WSSE with Symfony2 and I am sure I can apply the same principle here, except that API will be custom build.

Only wasnt sure if I can import extra Zend libs safely, which you have explaind.

Thank you very much, will talk if I need more help.

Kind regards
Alex
alexomundo replied on at Permalink Reply
Hi Jon,

Sorry, one more question.
Is anybody knows what C5 plans are for supporting ZF2 ?

Not sure why I have called you Mark in my previous post, sorry.

Thanmks
Alex
RadiantWeb replied on at Permalink Reply
RadiantWeb
ProBlog has XMLRPC included if this for blogging purposes. just an fyi.

ChadStrat
alexomundo replied on at Permalink Reply
Hi ChadStrat,

Thanks for tip, worth checking out to see how it is done.
This is custom made app to serve multiple web sites but need to have central user repo, so no need to register every time.

I wonder how much info you can get back from OpenID, if anybody knows?

Thanks
Alex