2 Replies Latest reply on Aug 21, 2007 12:16 PM by vtxr1300

    problem getting xml from web service

    vtxr1300 Level 1
      I have a web service set up to return xml to my flex app. When I debug, the lastResult comes back as a string of xml but I get an error when I run it that says "Type Coercion failed: cannot convert ...." followed by my xml string. I looked at the resultFormat and it's object so I tried making it e4x but when I do that I get another error 'Cannot assign operations into an RPC Service'. How can I read the xml from my web service and load it into an xmllistcollection? Here's the code I have right now. Thanks.


      <mx:WebService id="wsTopics" wsdl=" http://localhost/tenvideotraining/trainingsearch.asmx?WSDL"
      load="wsTopics.TrainingTopics()" resultFormat="e4x" showBusyCursor="true" result="LoadResults(event)" />

      <mx:Script>
      <![CDATA[
      [Bindable]
      var xlTopics:XMLListCollection = new XMLListCollection();

      private function LoadResults(event:ResultEvent):void{
      xlTopics.source = wsTopics.TrainingTopics.lastResult;
      }
      ]]>
      </mx:Script>