11 Replies Latest reply on Jan 9, 2012 7:55 AM by MSPMarathon

    HTTPService over a network


      Has anyone experienced any problems accessing a file using a network location as the url?  Example: myHTTPService.url = \\\\winstorage\\SERVER\\USER\\My Documents\\..."; I have used this exact same code and it works fine on a local location like "C:\\Users\\USER\\Documents", but failes on the network location.  Thank you for your time and I look forward to hearing back.



        • 1. Re: HTTPService over a network
          UbuntuPenguin Level 4

          Are you getting an error of some kind ?  Whenever you use the network for Flex development or Flex deployment you have to be very aware of security sandbox issues.

          • 2. Re: HTTPService over a network
            MSPMarathon Level 1

            yes the error is


              faultDetail = "Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032" errorID=2032]. URL: \\winstorage\SERVER\USER\My Documents\...myFile.xml"

              faultString = "HTTP request error"


            Would I need to add the crossdomain file in the root of the \\winstorage?


            • 3. Re: HTTPService over a network
              UbuntuPenguin Level 4

              Usually a crossdomain error is the famed 2048.  I think it is saying it can't find the resource.  Copy and paste the suspected link of the xml document into your browser.

              1 person found this helpful
              • 4. Re: HTTPService over a network
                MSPMarathon Level 1

                I copied the whole path into IE and it displays the XML file so it is the correct location.  This is the location to the logged in user's documents folder so it shouldn't be blocked by sandbox issues I wouldn't think.

                • 5. Re: HTTPService over a network
                  oldMster Level 3

                  Could it be as simple as the space in 'My Documents'?


                  • 6. Re: HTTPService over a network
                    MSPMarathon Level 1

                    I moved the xml file to another location with no spaces in the path and it is giving the same error.  I believe it has something to do with starting with "\\" instead of "C:\"(or another mapped network drive)  Can anyone else replicate the issue by setting an HTTPService variable's URL to a network location pointing to an xml file.  Maybe there is something we could set in the header of the service or something else to force it to know its looking for this resource?

                    • 7. Re: HTTPService over a network
                      UbuntuPenguin Level 4

                      Would you mind showing us your complete HTTPService code.  That should have been the first thing I asked.

                      • 8. Re: HTTPService over a network
                        oldMster Level 3

                        Have you tried defining the URL with 'file://' at the beginning?  Perhaps the browser is smart enough to know not to try http if it is on a local drive, but not if it is a network drive?


                        • 9. Re: HTTPService over a network
                          MSPMarathon Level 1

                          That was it.  When using a mapped drive it knew to add file:// at the front, but not when starting with a network location(\\myNetworkLocation).  Thanks a lot for the help guys!

                          • 10. Re: HTTPService over a network



                            I am building a mobile employee directory and for that I am using Flash Builder 4.6/AIR 3.1.0. I am using RESTful web service to get XML results and to display on my mobile application. I am getting the same below error when accessing the webservice from mobile app (Android - Galaxy Tab 7 inch).


                            Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error # 2032"] URL: http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co">http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabhttp://adfdevp.alshaya.com:7013/RESTEmployeeDetails-http://adfdevp.als haya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlabEmployeeDetails-context-root/jersey/restlab


                            The same code is working in Flash Builder 4.6. I have checked Network Monitor to "Disabled" before deploying to mobile. What am i doing wrong here? I am pasting my code below-



                            <?xml version="1.0" encoding="utf-8"?>

                            <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                               xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView" xmlns:dao="dao.*"





                                import mx.collections.ArrayCollection;

                                import mx.collections.IList;

                                import mx.collections.XMLListCollection;

                                import mx.events.FlexEvent;

                                import mx.rpc.events.FaultEvent;

                                import mx.rpc.events.ResultEvent;

                                import mx.rpc.xml.SimpleXMLDecoder;

                                import mx.utils.ArrayUtil;


                                import valueObjects.EmployeeDetail;


                                private var myXml:XML;



                                public var resultCollection:IList;

                                public function handleXml(event:ResultEvent):void


                                 var xmlListCollection:XMLListCollection = new XMLListCollection(event.result.children());

                                 var xmlListCollectionValues:XMLListCollection = new XMLListCollection(event.result.emp.children());

                                 var resultArray:Array = xmlListCollection.toArray();

                                 var resultArrayValues:Array = xmlListCollectionValues.toArray();



                                 var objEmployeeDetails:EmployeeDetail;

                                 var resultCollection:ArrayCollection = new ArrayCollection();


                                 var j:int = 0;

                                 for(var i:int=0;i<resultArray.length;i++){


                                  objEmployeeDetails = new EmployeeDetail();

                                  objEmployeeDetails.brand = resultArrayValues[j];

                                  objEmployeeDetails.division = resultArrayValues[j+1];

                                  objEmployeeDetails.email = resultArrayValues[j+2];

                                  objEmployeeDetails.employee_name = resultArrayValues[j+3];

                                  objEmployeeDetails.employee_number = resultArrayValues[j+4];

                                  objEmployeeDetails.grade = resultArrayValues[j+5];

                                  objEmployeeDetails.mobile = resultArrayValues[j+6];

                                  objEmployeeDetails.position = resultArrayValues[j+7];


                                  j = j + 8;




                                 list.dataProvider = resultCollection;

                                 //return resultCollection;



                                public function handleFault(event:FaultEvent):void


                                 //Alert.show(event.fault.faultDetail, "Error");             



                                protected function sesrchEmployee():void









                               <dao:EmployeeDAO id="srv"/>


                               <mx:HTTPService id="xmlRpc"

                                   url="http://adfdevp.alshaya.com:7013/RESTEmployeeDetails-EmployeeDetails-co ntext-root/jersey/restlab"



                                   resultFormat="e4x" showBusyCursor="true">

                                <mx:request xmlns="">












                               <s:VGroup width="100%">

                               <s:HGroup width="100%">

                                <s:Label top="40" paddingTop="10" paddingRight="13" height="29" text="Employee Name:"/>

                                <s:TextInput id="key" width="559"/>


                               <s:HGroup width="100%">

                                <s:Label height="30" paddingTop="10" text="Employee Number:"/>

                                <s:TextInput id="key1" width="100%"/>







                               <s:Button icon="@Embed('assets/search.png')" click="sesrchEmployee()"/> 



                            <s:List id="list" top="0" bottom="0" left="0" right="0" 

                                change="navigator.pushView(EmployeeDetails, list.selectedItem)">



                                 <s:IconItemRenderer label="{data.employee_name}"









                            Please help me to resolve this issue as soon as possible. Appreciate your quick response in this regard.




                            Murtaza Ghodawala

                            Mobile: +965 97180549


                            • 11. Re: HTTPService over a network
                              MSPMarathon Level 1

                              You should probably put this in a new post since this one has already been answered.