7 Replies Latest reply on Nov 20, 2007 9:49 AM by MatthewOMeara

    How to use generated code from "Import Web Services" with Cairngorm Framework

      I recently downloaded Flex Builder 3 beta 2 and tried out the wizard that lets you import web services. The code that is auto-generated makes if fairly straight forward to consume web services using the object types defined in the WSDL. No longer does the developer need to decode the XML payload! The only problem I am having is how does you integrate the auto- generated code with the Cairngorm framework? This seems like a huge question for anyone who might want to leverage Cairngorm and the auto-generated proxy code in the same project (like me).

      Here are the problems that I see so far.

      1) How do you configure the generated service class to work with the Cairngorm service locator? The service constructor only accepts a “LCDS destination string” which implies that you must use Lifecycle data services. Unfortunately, the project I am trying to retrofit currently uses a WebService and does not use data services. All I really need to do is change the endpoint URL (ie from local to a development server). This issue is noted in the bug https://bugs.adobe.com/jira/browse/FB-8456. What I think is needed is a way to set the endpointURI in the Services.mxml file.
      2) Even if I come up with a hack around #1, I do not receive a callback to my IResponder even though I register it immediately after the method call. I can register and listener function within my business delegate and receive the callback, but my Command object, which implements IResponder, does not receive the call back even though it is registered. From what I read in the ASDocs it should but it doesn’t for me!

      These are the issues I have observed in 3 hours of messing with this. I hope this makes sense. I would love to integrate auto-generated web service proxies into Cairngorm but I don’t see a straight forward way without re-architecting Cairngorm. Has any one else run across this issue? If so, do you have any insights on how to proceed? Any help is appreciated.