I feel like this should be pretty darn simple. But I can't seem to get it to
work. Trying to hit a URL that will return xml. But I'm getting a
FaultEvent:
faultCode:InvokeFailed faultString:'[MessagingError message='Destination
'null' either does not exist or the destination has no channels defined (and
the application does not define any default channels.)']'
faultDetail:'Couldn't establish a connection to 'null''
I have a class SearchService that extends a BaseService class that extends
HTTPService. BaseService doesn't do much right now but add some listeners
for ResultEvent and FaultEvent and call some protected functions.
Here is my SearchService class:
package foo.bar
{
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.HTTPService;
import foo.bar.constants.ServiceURLs;
/**
* ...
* @author
*/
public class SearchService extends BaseService
{
public function SearchService(showName:String)
{
super();
this.url = ServiceURLs.SEARCH;
this.method = "GET";
this.request = {
show:showName
}
this.resultFormat = HTTPService.RESULT_FORMAT_XML;
this.showBusyCursor = true;
this.send();
}
override protected function onResult(e:ResultEvent):void
{
super.onResult(e);
trace(SearchService(e.target).lastResult);
}
override protected function onFault(e:FaultEvent):void
{
super.onFault(e);
trace(e.fault.message);
}
}
}
--
View this message in context:
http://apache-flex-users.2333346.n4.nabble.com/Trying-to-get-simple-HTTPService-to-work-tp10861.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.