[flex_india:24716] Re: How to write the server side code for receiving image byte array?
could anyone help me ? I stuck by the question for a quite long time already. On Aug 18, 5:24 pm, HISSAM hissam.sher...@gmail.com wrote: U r taking the file stream :( rather use the Bitmap class and assign its data to the array(bytearray) and then save it to disk. It should work. 2009/8/18 kumar kumargandh...@gmail.com Hi, Using VB ??, i dont know, i did it using some PHP code it worked beautifully.Let me know if you need code in PHP. regards, kumar. On Aug 17, 7:32 pm, LDaneil leilin4...@hotmail.com wrote: hi,Ranji, thanks a lot for your reply. your way seems working, but still have some problems on save the image received to a folder of disk. The image I saved is not a valid image. can you help me to check it again. Thank you in advance. this is my code : Dim binaryData() As Byte = System.Web.HttpContext.Current.Request.BinaryRead (System.Web.HttpContext.Current.Request.TotalBytes) System.Web.HttpContext.Current.Response.ContentType = applicaiton/image System.Web.HttpContext.Current.Response.AddHeader(Content- Length(, binaryData.Length.ToString()) Dim path As String = c:\temp\Test.jpg ' Delete the file if it exists. If File.Exists(path) Then File.Delete(path) End If 'Create the file. Dim fs As FileStream = File.Create(path) For i As Integer = 0 To binaryData.Length - 1 fs.WriteByte(binaryData(i)) Next i fs.Close() System.Web.HttpContext.Current.Response.End() On Aug 13, 2:02 am, Ranjit ranjit.s...@gmail.com wrote: Hi, some thing like this will solve ur problem byte[] data = System.Web.HttpContext.Current.Request.BinaryRead (System.Web.HttpContext.Current.Request.TotalBytes); System.Web.HttpContext.Current.Response.ContentType = application/image; System.Web.HttpContext.Current.Response.AddHeader(Content- Length, data.Length.ToString()); System.Web.HttpContext.Current.Response.AddHeader(Content- disposition, method + ; filename= + name); System.Web.HttpContext.Current.Response.BinaryWrite(data); System.Web.HttpContext.Current.Response.End(); Regards, Ranjit sail On Jul 30, 6:21 am, LDaneil leilin4...@hotmail.com wrote: Hi,all. I want to send aimagetoserverside using HTTPService, I am using ASP.NET forserverside coding. I don't know how to writeserver side code to receive theimagesent as a byteArray, and I am also not sure if my client side code is correct or not。is there any IT PRO who could help me ? Thanks in advance. client side code: private function browseImageClicked():void { var f:FileFilter = new FileFilter(PNG,*.png); fileReference.browse([f]); fileReference.addEventListener(Event.SELECT,onFileSelect); fileReference.addEventListener(Event.COMPLETE,onFileComplete); } private function onFileSelect(event:Event):void { fileReference.load(); } private function onFileComplete(event:Event):void { var byArray:ByteArray = fileReference.data; varimage:Image= newImage(); image.source=byArray; var bmpData:BitmapData; bmpData = new BitmapData(48, 48, true, 0x00ff); bmpData.draw(image); var imageData:ByteArray = sdf.encode(bmpData); var encoder : Base64Encoder = new Base64Encoder(); encoder.encodeBytes(imageData); var params:Object = { image_data: encoder.flush() }; imageSend.send(params); }- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - -- Hissam, Flex Developer, Vantage Labs, Singapore-088806 (M)+65 90852194 --- Sent from Singapore --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:24549] Re: How to write the server side code for receiving image byte array?
hi,Ranji, thanks a lot for your reply. your way seems working, but still have some problems on save the image received to a folder of disk. The image I saved is not a valid image. can you help me to check it again. Thank you in advance. this is my code : Dim binaryData() As Byte = System.Web.HttpContext.Current.Request.BinaryRead (System.Web.HttpContext.Current.Request.TotalBytes) System.Web.HttpContext.Current.Response.ContentType = applicaiton/image System.Web.HttpContext.Current.Response.AddHeader(Content- Length(, binaryData.Length.ToString()) Dim path As String = c:\temp\Test.jpg ' Delete the file if it exists. If File.Exists(path) Then File.Delete(path) End If 'Create the file. Dim fs As FileStream = File.Create(path) For i As Integer = 0 To binaryData.Length - 1 fs.WriteByte(binaryData(i)) Next i fs.Close() System.Web.HttpContext.Current.Response.End() On Aug 13, 2:02 am, Ranjit ranjit.s...@gmail.com wrote: Hi, some thing like this will solve ur problem byte[] data = System.Web.HttpContext.Current.Request.BinaryRead (System.Web.HttpContext.Current.Request.TotalBytes); System.Web.HttpContext.Current.Response.ContentType = application/image; System.Web.HttpContext.Current.Response.AddHeader(Content- Length, data.Length.ToString()); System.Web.HttpContext.Current.Response.AddHeader(Content- disposition, method + ; filename= + name); System.Web.HttpContext.Current.Response.BinaryWrite(data); System.Web.HttpContext.Current.Response.End(); Regards, Ranjit sail On Jul 30, 6:21 am, LDaneil leilin4...@hotmail.com wrote: Hi,all. I want to send aimagetoserverside using HTTPService, I am using ASP.NET forserverside coding. I don't know how to writeserver side code to receive theimagesent as a byteArray, and I am also not sure if my client side code is correct or not。is there any IT PRO who could help me ? Thanks in advance. client side code: private function browseImageClicked():void { var f:FileFilter = new FileFilter(PNG,*.png); fileReference.browse([f]); fileReference.addEventListener(Event.SELECT,onFileSelect); fileReference.addEventListener(Event.COMPLETE,onFileComplete); } private function onFileSelect(event:Event):void { fileReference.load(); } private function onFileComplete(event:Event):void { var byArray:ByteArray = fileReference.data; varimage:Image= newImage(); image.source=byArray; var bmpData:BitmapData; bmpData = new BitmapData(48, 48, true, 0x00ff); bmpData.draw(image); var imageData:ByteArray = sdf.encode(bmpData); var encoder : Base64Encoder = new Base64Encoder(); encoder.encodeBytes(imageData); var params:Object = { image_data: encoder.flush() }; imageSend.send(params); }- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:24428] Re: How to write the server side code for receiving image byte array?
hi, Preetham Hegde. Thanks for your reply. I think the way you suggested may will solve my problem, but I still don't know how to write the code, can you give show me some coding? especially for the server side to receive the byte code and to recreate the image. Please use VB code, because I am using aspx.net to write the server side code. Thank you in advance. On Aug 11, 1:29 pm, Preetham Hegde preethamheg...@gmail.com wrote: why don't u encode image into base64String in client side and store that string in server and to display again u can decode string into image in client side. Don't know this may solve your problem On Mon, Aug 10, 2009 at 11:42 PM, LDaneil leilin4...@hotmail.com wrote: any one could help me ? On Jul 30, 9:21 am, LDaneil leilin4...@hotmail.com wrote: Hi,all. I want tosendaimagetoserversideusingHTTPService, I amusingASP.NET forserverside coding. I don't know how to writeserver side code to receive theimagesent as a byteArray, and I am also not sure if my client side code is correct or not。is there any IT PRO who could help me ? Thanks in advance. client side code: private function browseImageClicked():void { var f:FileFilter = new FileFilter(PNG,*.png); fileReference.browse([f]); fileReference.addEventListener(Event.SELECT,onFileSelect); fileReference.addEventListener(Event.COMPLETE,onFileComplete); } private function onFileSelect(event:Event):void { fileReference.load(); } private function onFileComplete(event:Event):void { var byArray:ByteArray = fileReference.data; varimage:Image= newImage();image.source=byArray; var bmpData:BitmapData; bmpData = new BitmapData(48, 48, true, 0x00ff); bmpData.draw(image); var imageData:ByteArray = sdf.encode(bmpData); var encoder : Base64Encoder = new Base64Encoder(); encoder.encodeBytes(imageData); var params:Object = { image_data: encoder.flush() }; imageSend.send(params); } -- Regards, Preetham Hegde ___ If you only have a hammer, you tend to see every problem as a nail. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:24410] Re: How to write the server side code for receiving image byte array?
any one could help me ? On Jul 30, 9:21 am, LDaneil leilin4...@hotmail.com wrote: Hi,all. I want tosendaimagetoserversideusingHTTPService, I amusingASP.NET forserverside coding. I don't know how to writeserver side code to receive theimagesent as a byteArray, and I am also not sure if my client side code is correct or not。is there any IT PRO who could help me ? Thanks in advance. client side code: private function browseImageClicked():void { var f:FileFilter = new FileFilter(PNG,*.png); fileReference.browse([f]); fileReference.addEventListener(Event.SELECT,onFileSelect); fileReference.addEventListener(Event.COMPLETE,onFileComplete); } private function onFileSelect(event:Event):void { fileReference.load(); } private function onFileComplete(event:Event):void { var byArray:ByteArray = fileReference.data; varimage:Image= newImage();image.source=byArray; var bmpData:BitmapData; bmpData = new BitmapData(48, 48, true, 0x00ff); bmpData.draw(image); var imageData:ByteArray = sdf.encode(bmpData); var encoder : Base64Encoder = new Base64Encoder(); encoder.encodeBytes(imageData); var params:Object = { image_data: encoder.flush() }; imageSend.send(params); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:24136] How to write the server side code for receiving image byte array?
Hi,all. I want to send a image to server side using HTTPService, I am using ASP.NET for server side coding. I don't know how to write server side code to receive the image sent as a byteArray, and I am also not sure if my client side code is correct or not。is there any IT PRO who could help me ? Thanks in advance. client side code: private function browseImageClicked():void { var f:FileFilter = new FileFilter(PNG,*.png); fileReference.browse([f]); fileReference.addEventListener(Event.SELECT,onFileSelect); fileReference.addEventListener(Event.COMPLETE,onFileComplete); } private function onFileSelect(event:Event):void { fileReference.load(); } private function onFileComplete(event:Event):void { var byArray:ByteArray = fileReference.data; var image:Image = new Image(); image.source=byArray; var bmpData:BitmapData; bmpData = new BitmapData(48, 48, true, 0x00ff); bmpData.draw(image); var imageData:ByteArray = sdf.encode(bmpData); var encoder : Base64Encoder = new Base64Encoder(); encoder.encodeBytes(imageData); var params:Object = { image_data: encoder.flush() }; imageSend.send(params); } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23960] Re: How to solve the Httpservice Responding Error ?
hi, everyone. Is there any professional IT Programmer who could solve my problem? Thank you。 On Jul 21, 11:14 pm, LDaneil leilin4...@hotmail.com wrote: Hi, Jaydeep Tank . Thanks for your reply. of course, I know how to get the IP address, but what kind of good idea you are trying to tell me to solve the problem ? On Jul 21, 5:09 am, Jaydeep Tank jaydeep.t...@gmail.com wrote: HI Follow the steps: On the toolbar Right click on local area network open network connection Right click on local area networkPropertyInternet Protocol(TCP/IP)Property. You will see the IP address Or Just Run *CMD *press OK type *ipconfig *press enter You will see the IP address Regards, Jaydeep Tank 2009/7/20 LDaneil leilin4...@hotmail.com Hi, HISSAM. Thanks for your reply. I am using the virtual directory, and the virtual directory address is : C:\Inetpub\S.A.M_Project according to situation, what exactly address should I use? can you explain more? On Jul 20, 2:56 pm, HISSAM hissam.sher...@gmail.com wrote: http://localhost/Database1/modifyAccessLevel.aspx; change to server address like this Its an example http://182.23.23.32/yoursitenameFolder/modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx orhttp://www. http://localhost/Database1/modifyAccessLevel.aspx yoursitename.com http://localhost/Database1/modifyAccessLevel.aspx /modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx - Regards, HISSAM, -- On Mon, Jul 20, 2009 at 10:03 AM, LDaneil leilin4...@hotmail.com wrote: Hi, Everyone . I have encountered a very strange error. When I just login my application, it works well, but when I use my website access server side to get data using HTTPService oftenly, my application will hang and stay in the loading cursor (the clock), and then a few second later, there will be an error message popup. the Error Message is : [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/Database1/modifyAccessLevel.aspx;]. URL:http://localhost/Database1/modifyAccessLevel.aspx;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/ internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild \3.2.0\frameworks\projects\rpc\src\mx\messaging\channels \DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Can anyone give me some ideas how to solve the problem? Thanks a lot in advance.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23864] Re: How to solve the Httpservice Responding Error ?
Yes, the virtual directory on the same local machine. We use IIS to create the virtual directory database1 On Jul 20, 6:44 pm, HISSAM hissam.sher...@gmail.com wrote: virtual directory on the same local machine?? - Regards, HISSAM, -- On Mon, Jul 20, 2009 at 3:07 PM, LDaneil leilin4...@hotmail.com wrote: Hi, HISSAM. Thanks for your reply. I am using the virtual directory, and the virtual directory address is : C:\Inetpub\S.A.M_Project according to situation, what exactly address should I use? can you explain more? On Jul 20, 2:56 pm, HISSAM hissam.sher...@gmail.com wrote: http://localhost/Database1/modifyAccessLevel.aspx; change to server address like this Its an example http://182.23.23.32/yoursitenameFolder/modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx orhttp://www. http://localhost/Database1/modifyAccessLevel.aspx yoursitename.com http://localhost/Database1/modifyAccessLevel.aspx /modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx - Regards, HISSAM, -- On Mon, Jul 20, 2009 at 10:03 AM, LDaneil leilin4...@hotmail.com wrote: Hi, Everyone . I have encountered a very strange error. When I just login my application, it works well, but when I use my website access server side to get data using HTTPService oftenly, my application will hang and stay in the loading cursor (the clock), and then a few second later, there will be an error message popup. the Error Message is : [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/Database1/modifyAccessLevel.aspx;]. URL:http://localhost/Database1/modifyAccessLevel.aspx;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/ internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild \3.2.0\frameworks\projects\rpc\src\mx\messaging\channels \DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Can anyone give me some ideas how to solve the problem? Thanks a lot in advance.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23885] Re: How to solve the Httpservice Responding Error ?
Hi, pradheap babu. thanks for your reply. it may be the server side error, but if I restart computer, it works well. do you have any idea how to solve the problem? it looks like the request time out . On Jul 21, 4:55 am, pradheap babu pradh...@gmail.com wrote: This is server side error. May be the request had been timed out. This has nothing to do with Flex. Thanks On Mon, Jul 20, 2009 at 7:33 AM, LDaneil leilin4...@hotmail.com wrote: Hi, Everyone . I have encountered a very strange error. When I just login my application, it works well, but when I use my website access server side to get data using HTTPService oftenly, my application will hang and stay in the loading cursor (the clock), and then a few second later, there will be an error message popup. the Error Message is : [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/Database1/modifyAccessLevel.aspx;]. URL:http://localhost/Database1/modifyAccessLevel.aspx;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/ internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild \3.2.0\frameworks\projects\rpc\src\mx\messaging\channels \DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Can anyone give me some ideas how to solve the problem? Thanks a lot in advance.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23886] Re: How to solve the Httpservice Responding Error ?
Hi, Jaydeep Tank . Thanks for your reply. of course, I know how to get the IP address, but what kind of good idea you are trying to tell me to solve the problem ? On Jul 21, 5:09 am, Jaydeep Tank jaydeep.t...@gmail.com wrote: HI Follow the steps: On the toolbar Right click on local area network open network connection Right click on local area networkPropertyInternet Protocol(TCP/IP)Property. You will see the IP address Or Just Run *CMD *press OK type *ipconfig *press enter You will see the IP address Regards, Jaydeep Tank 2009/7/20 LDaneil leilin4...@hotmail.com Hi, HISSAM. Thanks for your reply. I am using the virtual directory, and the virtual directory address is : C:\Inetpub\S.A.M_Project according to situation, what exactly address should I use? can you explain more? On Jul 20, 2:56 pm, HISSAM hissam.sher...@gmail.com wrote: http://localhost/Database1/modifyAccessLevel.aspx; change to server address like this Its an example http://182.23.23.32/yoursitenameFolder/modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx orhttp://www. http://localhost/Database1/modifyAccessLevel.aspx yoursitename.com http://localhost/Database1/modifyAccessLevel.aspx /modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx - Regards, HISSAM, -- On Mon, Jul 20, 2009 at 10:03 AM, LDaneil leilin4...@hotmail.com wrote: Hi, Everyone . I have encountered a very strange error. When I just login my application, it works well, but when I use my website access server side to get data using HTTPService oftenly, my application will hang and stay in the loading cursor (the clock), and then a few second later, there will be an error message popup. the Error Message is : [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/Database1/modifyAccessLevel.aspx;]. URL:http://localhost/Database1/modifyAccessLevel.aspx;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/ internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild \3.2.0\frameworks\projects\rpc\src\mx\messaging\channels \DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Can anyone give me some ideas how to solve the problem? Thanks a lot in advance.- Hide quoted text - - Show quoted text -- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23821] How to solve the Httpservice Responding Error ?
Hi, Everyone . I have encountered a very strange error. When I just login my application, it works well, but when I use my website access server side to get data using HTTPService oftenly, my application will hang and stay in the loading cursor (the clock), and then a few second later, there will be an error message popup. the Error Message is : [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/Database1/modifyAccessLevel.aspx;]. URL: http://localhost/Database1/modifyAccessLevel.aspx;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/ internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild \3.2.0\frameworks\projects\rpc\src\mx\messaging\channels \DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Can anyone give me some ideas how to solve the problem? Thanks a lot in advance. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23830] Re: How to solve the Httpservice Responding Error ?
Hi, HISSAM. Thanks for your reply. I am using the virtual directory, and the virtual directory address is : C:\Inetpub\S.A.M_Project according to situation, what exactly address should I use? can you explain more? On Jul 20, 2:56 pm, HISSAM hissam.sher...@gmail.com wrote: http://localhost/Database1/modifyAccessLevel.aspx; change to server address like this Its an example http://182.23.23.32/yoursitenameFolder/modifyAccessLevel.aspxhttp://localhost/Database1/modifyAccessLevel.aspx orhttp://www. http://localhost/Database1/modifyAccessLevel.aspx yoursitename.com http://localhost/Database1/modifyAccessLevel.aspx /modifyAccessLevel.aspx http://localhost/Database1/modifyAccessLevel.aspx - Regards, HISSAM, -- On Mon, Jul 20, 2009 at 10:03 AM, LDaneil leilin4...@hotmail.com wrote: Hi, Everyone . I have encountered a very strange error. When I just login my application, it works well, but when I use my website access server side to get data using HTTPService oftenly, my application will hang and stay in the loading cursor (the clock), and then a few second later, there will be an error message popup. the Error Message is : [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/Database1/modifyAccessLevel.aspx;]. URL:http://localhost/Database1/modifyAccessLevel.aspx;] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/ internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src \mx\rpc\AbstractInvoker.as:220] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects \rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild \3.2.0\frameworks\projects\rpc\src\mx\messaging\channels \DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/onComplete() Can anyone give me some ideas how to solve the problem? Thanks a lot in advance.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23654] How to parse the xml data and loop out all the xml data I want to use?
hi, all. I stucked by the xml problem, I want to read out the data and use the data to insert to database. now I use the code: Dim formName As String formName = XmlDoc.SelectSingleNode(formTemplate/ formTempName).InnerText I could get the formTemplate Name ‘abc’, but I also want to get the Component Name Button,Label and TextInput, and I also want to get all the properties value of the component. the xml data file I received is below. my question now is that I could not loop out all the component Name, and get all the properties values of the component accordingly.can anyone help me ? thanks in advance. becaue I get the xml data in the runtime in the client side(flex interface, design environment), I am using the editable region to design the form template page, and get all the components in the canvas and send it as xml data to server side to store it to the table. I basically want use a 'for' loop to loop out all the component Name (Button,Label) ,and their properties. what I am doing is the template design IDE, it's something like visual studio software development, the user could drag as many components (Button,Label,Image and so on) as he wants to the editable Canvas to form a page. So, I don't know exactly how many components are on the Canvas(which will be sent to server side as xml data) and different components have differenct properties(id,x,y and so on), so I use the code: Dim streamread As StreamReader Dim XmlDoc As XmlDocument = New XmlDocument() streamread = New StreamReader(Request.InputStream) XmlDoc.LoadXml(streamread.ReadToEnd) To get the xml data, the xml data looks like the one I listed above (but not fixed), but the xml data is not fixed data or properties, it depends on different user to drag different components ('buttons','labels','Images') to the editable Canvas to form a formTemplate page. so, I think I must use a something like 'for' loop to get the component Name and component properties. my code : //it does not work Dim id As String Dim xAxis As String Dim yAxis As String Dim width As String Dim height As String For Each node As XmlNodeList In XmlDoc.SelectNodes(formTemplate/ Component) id = node.Item(id).InnerText xAxis = node.Item(x).InnerText yAxis = node.Item(y).InnerText width = node.Item(width).InnerText height = node.Item(height).InnerText If (node.FirstChild.Name = Button) Then Dim label As String label = node.Item(label).InnerText End If if(node.FirstChild.Name=Image) Then Dim source As String source = node.Item(source).InnerText End If Next this is my Xml data look like: formTemplate formTempNameabc/formTempName Component Button labelButton/label idbtn1/id x141/x y49/y width65/width height23/height /Button Label textNew Label/text idlbl2/id x192/x y123/y width65/width height23/height /Label TextInput idtxtInput3/id x237/x y193/y width160/width height23/height /TextInput /Component /formTemplate --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---
[flex_india:23615] how to handle the xml data sent from Httpservice Request? parse/read the xml data
hi, all. I stucked by the question on how to handle the xml data sent from HTTPService request. simply how to receive the xml data, and read the xml data, then insert the xml data into database. I show you my code: can any professional programmer help me ? Thanks a lot in advance. httpservice in flex: var xmlFile:XML = new XML(createXML) ;//createXML is a xml String, covert to real xml file // testing.text=xmlFile; //it works fine. sendFormTempHttp.url = http://localhost/Database1/ XMLTesting.aspx; sendFormTempHttp.method = POST; sendFormTempHttp.contentType=application/xml; sendFormTempHttp.resultFormat=e4x sendFormTempHttp.addEventListener (ResultEvent.RESULT,sendFormTempHandler); sendFormTempHttp.addEventListener(FaultEvent.FAULT, sendFormTempFaultHandler); sendFormTempHttp.send(xmlFile);//send the xml data to server side XML File look like this formTemplate formTempNameabc/formTempName Component Button labelButton/label idbtn1/id x141/x y49/y width65/width height23/height /Button Label textNew Label/text idlbl2/id x192/x y123/y width65/width height23/height /Label TextInput idtxtInput3/id x237/x y193/y width160/width height23/height /TextInput /Component /formTemplate Server Side code:// I am using asp.net to write the htttpservic handler code. context.Request.Params(xmlFile) // all these codes are not working Dim XmlDoc As XmlDocument = New XmlDocument() XmlDoc.Load(http://localhost/Database1/XMLTesting.aspx;) Dim formName As String formName = XmlDoc.SelectSingleNode(formTemplate/ formTempName).InnerText --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Flex India Community group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~--~~~~--~~--~--~---