0

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.

dubbeat
  • 7,706
  • 18
  • 70
  • 122

1 Answers1

0

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

KensoDev
  • 3,285
  • 21
  • 38
  • 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." – KensoDev Jul 07 '10 at 14:56
  • Yup, for simple HTTP requests without configuring proxies it will not run – KensoDev Jul 08 '10 at 07:09