1 Reply Latest reply on Jul 11, 2007 12:53 PM by Newsgroup_User

    WDDX to XML Issue

      Hey everyone, I originally posted this in Gen Discussion, but then thought this was a better place. When I was strictly a "Flasher" I was able to use PHP to deserialize a WDDX and then reference the object in Flash. Now that I'm Flexing, I haven't come across another WDDX until now.

      Does Flex 2 have anything built into it maybe in the HTTPService resultFormat that will allow me to use the event.Result like an XML so I can do something like x:XML = event.result as XML?

      Thanks in advance!!!
        • 1. Re: WDDX to XML Issue
          Level 7
          Try resultFormat="e4x"... i.e.:

          <mx:HTTPService id="hs" url=" http://somewhere/something.wddx" resultFormat="e4x"
          result="handleResult(event)" fault="handleFault(event)" />


          import mx.rpc.events.FaultEvent;
          import mx.rpc.events.ResultEvent;

          private var wddxValue:XML;

          private function handleResult(event:ResultEvent):void
          wddxValue = event.result as XML;

          private function handleFault(event:FaultEvent):void
          trace("Error: " + event.fault.toString());