0 Replies Latest reply on May 19, 2010 10:38 PM by dasun1981

    Random httpservice error when connecting to asp.net server page

    dasun1981 Level 1

      I'm getting the following error when trying to access a file using 3 httpservice components. My requirement is to populate 3 drop down boxes in a form to show suppliers, freight and the states. So I send 3 requests with different parameters to the same asp.net file with 3 different parameters. However when I run this file, it randomly producing the following error and only populate 2 dropdowns randomly, and sometimes it does populate all three dropdowns as well. Sometimes even only one.

       

      [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://localhost:37813/wautomation/CreateBatch.aspx?hostport=localhost&https=N&id=5D1AE0FA -338B-5910-F661-A8C9B73ED72E"]. URL: http://localhost/wautomation/CreateBatch.aspx"]
          at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[E:\dev\4.0.0\frameworks\project s\rpc\src\mx\rpc\AbstractInvoker.as:345]
          at mx.rpc::Responder/fault()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:68 ]
          at mx.rpc::AsyncRequest/fault()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest .as:113]
          at DirectHTTPMessageResponder/errorHandler()[E:\dev\4.0.0\frameworks\projects\rpc\src\mx\mes saging\channels\DirectHTTPChannel.as:405]
          at flash.events::EventDispatcher/dispatchEventFunction()
          at flash.events::EventDispatcher/dispatchEvent()
          at flash.net::URLLoader/onComplete()

       

      The code I have is as follows,

       

              <mx:HTTPService
                  id="Service_GetSuppliers"
                  url="http://localhost/wautomation/CreateBatch.aspx"
                  method="POST"
                  useProxy="false">
                  <mx:request xmlns="">
                      <reqaction>getsupplier</reqaction>
                  </mx:request>
              </mx:HTTPService>
             
              <mx:HTTPService
                  id="Service_GetFreighters"
                  url="http://localhost/wautomation/CreateBatch.aspx"
                  method="POST"
                  useProxy="false" >
                  <mx:request xmlns="">
                      <reqaction>getfreight</reqaction>
                  </mx:request>
              </mx:HTTPService>
             
              <mx:HTTPService
                  id="Service_GetStates"
                  url="http://localhost/wautomation/CreateBatch.aspx"
                  method="POST"
                  useProxy="false">
                  <mx:request xmlns="">
                      <reqaction>getstate</reqaction>
                  </mx:request>
              </mx:HTTPService>

       

      And I send these functions using the following function which is triggered by the created completed event.


                  private function service_trigger():void
                  {
                      Service_GetSuppliers.send();
                      Service_GetFreighters.send();
                      Service_GetStates.send();
                  }

       

      I'm also thinking maybe this is not correct way to use 3 httpservice components to send request to same file with different parameters. If someone can help me to fix this issue it would be a great help. If this is a issue within flex, is there any work around for this? Please let me know, help is greatly appriciated.

       

       

       

      Thanks