1 Reply Latest reply on Dec 28, 2009 7:54 AM by Gregory Lafrance

    An ActionScript Error

    re-Flexing

      Hi, I'm creating an Adobe Air Application.

       

      Why does everytime I click a button which calls the HTTPService an ActionScript Error displays, it says

       

      [RPC Fault faultString="Default decoder could not decode result" faultCode="Client.CouldNotDecode" faultDetail="null"]
          at mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal::processResult()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\http\HTTPService.as:881]
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:188]
          at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
          at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
          at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flash.net::URLLoader/onComplete()

       

      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

       

      This is my code

       

      <mx:Button y="169" label="Save Project" horizontalCenter="-524" id="saveProj_btn" click="propProjhttp.send()" enabled="true"/>

       

      After I click this Button it will call the HTTPService

       

      <mx:HTTPService id="propProjhttp" url="propProj.php" useProxy="false" method="POST" showBusyCursor="true">
              <mx:request xmlns="">
              <projNameTI>
                  {projNameTI.text}
              </projNameTI>   
              <locationTI>
                  {locationTI.text}
              </locationTI>
              <ownerTI>
                  {ownerTI.text}
              </ownerTI>
              <materialCostTI>
                  {materialCostTI.text}
              </materialCostTI>
              <contCostTI>
                  {contCostTI.text}
              </contCostTI>
              <laborCostTI>
                  {laborCostTI.text}
              </laborCostTI>
              <totalCostTI>
                  {totalCostTI.text}
              </totalCostTI>
              </mx:request>
          </mx:HTTPService>

      ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

      Can someone please tell me how to solve this... thank you!

        • 1. Re: An ActionScript Error
          Gregory Lafrance Level 6

          How is the data returned formatted, as XML? If so is it well formatted? Perhaps you need to use the HTTPService resultFormat property, setting it to e4x for XML return data or to something else if the data returned is not XML.

           

          If this post answers your question or helps, please mark it as such.


          Greg Lafrance
          www.ChikaraDev.com

          Flex Development, Training, and Support Services