Hi Peter,
Yes, I'm still assigning the myService.channelSet property with my
programmatically created ChannelSet.
Here's the code:
Services.mxml:
...
public function init():void {
var amfChannel:AMFChannel
= new AMFChannel("my-amf", getContextRootUrl()
+ "/messagebroker/amf");
amfChannel.pollingEnabled = false;
var myChannelSet:ChannelSet = new ChannelSet();
myChannelSet.addChannel(amfChannel);
myService.channelSet = myChannelSet;
}
private function getContextRootUrl():String {
var i:int = Application.application.url.lastIndexOf("/");
var contextRootUrl:String
= Application.application.url.substring(0, i);
return contextRootUrl;
}
...
<mx:RemoteObject
id="myService"
destination="MyService"
showBusyCursor="true"
result="event.token.resultHandler( event )"
fault="event.token.faultHandler( event )"
requestTimeout="30"/>
And my top-level MyApp.mxml file includes the following:
<mx:Application
...
creationComplete="creationCompleteHandler( event );">
<mx:Script>
<![CDATA[
...
private function creationCompleteHandler( event:FlexEvent ):void {
...
services.init();
}
...
]]>
</mx:Script>
...
<business:Services id="services"/>
...
</mx:Application>
Cheers,
Lawrie
--- In [email protected], "Peter Farland" <[EMAIL PROTECTED]> wrote:
>
> But you're still assigning the mService.channelSet property with your
> programmatically created ChannelSet, right?
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On
> Behalf Of lawriegallardo
> Sent: Monday, November 19, 2007 3:28 PM
> To: [email protected]
> Subject: [flexcoders] Re: Confused by context.root, services-config.xml
> and remoting-config.xml...
>
> As suggested, I removed the endpoint property from my mx:RemoteObject
> tag, removed the services property from my mxmlc Ant task and did a
> clean, build, deploy.
>
> <mx:RemoteObject
> id="mService"
> destination="MyService"
> showBusyCursor="true"
> result="event.token.resultHandler( event )"
> fault="event.token.faultHandler( event )"
> requestTimeout="30" />
>
> Now when I run the app I get a "Destination 'MyService' has no channels
> defined and the application does not define any default channels."
>
> Any thoughts?
>
> Cheers,
>
> Lawrie
>