Search code examples
apache-flexmagentocairngorm

Flex, Cairngorm and XML-RPC


I'm new to Flex, and Cairngorm so bear with me...

I need to integrate a Flex application with a Magento site. I prefer to do it with XML-RPC instead of web services because of speed and our other applications integrate via this method.

I'm using the as3-rpclib to do the XML-RPC communication. I can get things to talk, but timing is a real problem. I'm getting confused with Events, Services, Singletons, etc...

I (think I) want to have a singleton spin up the XML-RPC object, login and get the token and store it in the singleton. Then the delegates can get the service and call the Magento methods.

Thoughts??


Solution

  • I came up with a solution that seems to work well so far.

    I created a new class called MagentoService that extends XMLRPCObject. I setup the connection to Magento in the constructor and save the session ID to a property.

    I configured the session in the Services.xml file and everything spins up ok.

    Steve