Wait, does the service return the image itself or does it return a url to the image? If it returns the image itself you need to set the Image source to http://www.mydomain.com/services/restsvc?param1=val1¶m2=val2¶m3= val3 and forget the HTTPService (though if you don't have crossdomain.xml on that server (mydomain.com) you may not be able to download the image). If the restsvc returns the string with the url then you want to set resultFormat="text" and then you can use the result as the source to the image like you're doing now. If it returns XML that can be parsed then you'll want to have resultFormat="object" and you'll pick the right child node.
Matt -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Raheen M Shabbazz Sent: Saturday, January 21, 2006 11:48 PM To: [email protected] Subject: [flexcoders] Re: HTTPService -- Generic error code Thanks for the reply. I am using v1.5. I don't believe that I am using any proxy at all. This is the REST service that I have created :: ======================== <mx:HTTPService id="my_rest_ws" url="http://www.mydomain.com/services/restsvc" method="GET"> <mx:request> <param1>val1</param1> <param2>val2</param2> <param3>val3</param3> </mx:request> </mx:HTTPService> ========================= Below, I've got two simple controls :: ========================= <mx:Canvas width="550" height="400"> <mx:Image source="{my_rest_ws.result}" width="400" height="400" /> <mx:Button label="Button" click="my_rest_ws.send()"/> </mx:Canvas> ========================= The idea is to hit the button and have the mx:image dynamically load the image returned from call to the web service. The web service exists on a production server (a system completely seperate from my development machine and entirely out of my control). If I manually type the service URL with parameters into the address bar, I get the image that I expect. So, for example http://www.mydomain.com/services/restsvc?param1=val1¶m2=val2¶m3= val3 returns the image with no trouble. When trying the web service code above, however, I get the generic error mentioned before -- "Could Not Retrieve Data". (NOTE -- I thought that the problem may be with the mx:image tag loading the results, but the error remains even when I remove the mx:image tag altogether.) In the flex-config.xml file, I changed the HTTPServices section to read <url>http://*</url> That fixed the error I was getting before which said (paraphrased) that the URL was not legal and needed to be added to the allow list. I'm not sure about your crossdomain.xml question? I'm guessing the problem lies with either my code or my Flex settings as I believe the server gets hit with a number of service requests on a regular basis and can accomodate a wide variety of flavors and implementations. I'm totally stumped. For a simple example, it sure is giving me a run for my money! Been tinkering with it all night! I just keep getting that same generic and uninformative error. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

