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 w开发者_运维知识库ith 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??
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
精彩评论