0 Replies Latest reply on Jul 18, 2007 6:57 AM by alfanez

    SOAP encoding error

    alfanez
      Hi,

      I'm really stuck here with what looks like a Flex bug (eventually), the code below is throwing this error:

      [RPC Fault faultString="Unknown Property: 'Coordinates'." faultCode="EncodingError" faultDetail="null"]
      at mx.rpc.soap::Operation/ http://www.adobe.com/2006/flex/mx/internal::invokePendingCall()[C:\dev\enterprise_bali\fra meworks\mx\rpc\soap\Operation.as:582
      at mx.rpc.soap::Operation/send()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\Operation.as: 492]
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc.soap.mxml::Operation/send()[C:\dev\enterprise_bali\frameworks\mx\rpc\soap\mxml\Ope ration.as:140]
      at Function/ http://adobe.com/AS3/2006/builtin::apply()
      at mx.rpc::AbstractService/ http://www.adobe.com/2006/actionscript/flash/proxy::callProperty()[C:\dev\enterprise_bali\ frameworks\mx\rpc\AbstractService.as:287
      at OSR/getUserMapResultHandler()[D:\Flex\Flex Builder 2\OSR\magms.as:23]
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at mx.rpc::AbstractOperation/ http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\dev\enterprise_bali\fram eworks\mx\rpc\AbstractOperation.as:179
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\dev\enterprise_bali\framewo rks\mx\rpc\AbstractInvoker.as:168
      at mx.rpc::Responder/result()[C:\dev\enterprise_bali\frameworks\mx\rpc\Responder.as:48]
      at mx.rpc::AsyncRequest/acknowledge()[C:\dev\enterprise_bali\frameworks\mx\rpc\AsyncRequest. as:82]
      at DirectHTTPChannel.as$139::DirectHTTPMessageResponder/completeHandler()[C:\dev\enterprise_ bali\frameworks\mx\messaging\channels\DirectHTTPChannel.as:359]
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/flash.net:URLLoader::onComplete()





      Code:

      // ActionScript file

      import mx.controls.Image;
      import mx.rpc.events.ResultEvent;

      [Bindable]
      public var map:Object;
      public var ima:Object;
      public var magms:mx.rpc.soap.mxml.WebService;

      public function useRemoteObject():void {
      magms = new mx.rpc.soap.mxml.WebService();
      magms.wsdl = " http://pc128/MagMS/Service.asmx?wsdl";
      magms.getUserMap.addEventListener("result", getUserMapResultHandler);
      magms.getMapImage.addEventListener("result", getMapImageResultHandler);
      magms.loadWSDL();
      magms.getUserMap('public','VE_Gascogne');
      }

      public function getUserMapResultHandler(event:ResultEvent):void {
      // Do something
      map=event.result;
      magms.getMapImage(map); // HERE's WHERE THE ERROR HAPPENS
      }

      public function getMapImageResultHandler(event:ResultEvent):void {
      // Do something
      ima=event.result;
      }


      So I'm able to retrieve the map object from the first method call but when I try to pass it to the second method then it fails, am I doing something wrong ?