views:

17

answers:

1

Hi all

I wondering whats the difference between url and destination using httpservice in flex.

I came across a httpservice example that looked something like this

        service.resultFormat="e4x"
        service.method="GET";
        service.destination="http://www.blash.com" // I used an actual page 
        service.addEventListener("result", httpResult);
        service.addEventListener("fault", httpFault);
        service.send(parameters);

When I tried this I got a fault error saying that the services "channel" was null.

I took out the destination parameter and set the url parameter instead and it worked fine.

What exactly are destinations and channels all about?

FYI The page I'm calling is a public API that returns results in XML format.

A: 

destination is a proxy which you have to configure in service-config.xml it's more related to remoting.

Avi Tzurel
from the docs "an HTTPService destination name in the services-config.xml file. When unspecified, Flex uses the DefaultHTTP destination. If you are using the url property, but want requests to reach the proxy over HTTPS, specify DefaultHTTPS."
Avi Tzurel
cool thanks. So it's a non runner for simple url requests
dubbeat
Yup, for simple HTTP requests without configuring proxies it will not run
Avi Tzurel