1 Reply Latest reply on Apr 26, 2010 11:46 PM by prksingh

    Unable to refresh browser after HTTPService Call

    mumcs01

      I"m having a very similar problem and I'm wondering if any resolution has come up. I use an Init() which goes off and uses httpservice to get XML to put int oan array collection. I then use it, and if the user makes a bunch of changes and them pushes a button to publish the changes, it uses httpservice to send the variables via POST back to a PHP script. Works great, except anytime AFTER the user presses publish if they happen to press the refresh button on the broswer I get:

       

      [RPC Fault faultString="Error #1088: The markup in the document following the root element must be well-formed." 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:924]
      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()

       

      Again, so long as the user avoids ever using the refresh button all is well. I"m using FLEX 3. Any understanding or reasoning would be really helpful.

      Below are my HTTPService calls

       

      This one is used to get XML data form the PHP script:

      <mx:HTTPService id="XMLdb" url="http://10.101.50.60/get_config.php"
      method="POST" showBusyCursor="true" resultFormat="e4x" result="phpresultHandler(event)"/>

       

      This one is used to send back changes values with a key from the array collection:
      <mx:HTTPService id="sendtophp" url="http://10.101.50.60/get_config.php" useProxy="false" method="POST">
          <mx:request xmlns="">
           <key>{keytoinsert}</key><value>{valuetoinsert}</value>
          </mx:request>
      </mx:HTTPService>