I might be wrong, but it's my understanding that a channelset is simply a collection of channels to use in the event of a network failure or similar, so the way you're currently setting it up, it won't actually ever use the secure channel, because the default channel is working fine. (Again, I could be wrong). From reading the docs, you could try something like the following:
var dataService:RemoteObject = new RemoteObject(); dataService.destination = "amfphp"; dataService.source = "TestService"; var channel:Channel = new SecureAMFChannel('my-amfphp-secure', " https://domain.com/amfphp/gateway.php"); var channelSet:ChannelSet = new ChannelSet(); channelSet.addChannel(channel); dataService.channelSet = channelSet; dataService.sendCommand.addEventListener( ResultEvent.RESULT, resultHandler ); dataService.addEventListener(FaultEvent.FAULT, errorHandler); dataService.sendCommand(postVars); Using the above, you essentially negate the need to define the channel in the services-config.xml file. In fact I've been using this technique for a while now, because I didn't like having to keep track of the services-config.xml. But then again, I'm only using it in apps with simple remoting needs. If you require more complex setups, the services-config might be the way to go. Christian. On Mon, Apr 7, 2008 at 6:35 AM, Aaron Miller < [EMAIL PROTECTED]> wrote: > So is this not possible then? Can any one recommend an alternative > solution? I could possibly create a standalone app that gets run in a pop up > window, but that would create some complications with communication back to > the main app. Any ideas? > > Thanks! > ~Aaron > > > On Mon, Mar 31, 2008 at 10:46 AM, Aaron Miller < > [EMAIL PROTECTED]> wrote: > > > Hello, > > > > My main SWF is run on an insecure channel, as well as the majority of > > the RemoteObject calls. However, I now have to send sensitive data to the > > server and would like to use a secure channel for those calls. I've tried a > > few different things and run myself into a dead end. Would any one mind > > looking at my setup and pointing me in the right direction? Thanks! > > > > Server Type: AMFPHP > > Service: TestService.sendCommand > > > > services-config.xml: > > ------------------------------------------------------------ > > <?xml version="1.0" encoding="UTF-8"?> > > <services-config> > > <services> > > <service id="amfphp-flashremoting-service" > > class="flex.messaging.services.RemotingService" > > messageTypes="flex.messaging.messages.RemotingMessage"> > > <destination id="amfphp"> > > <channels> > > <channel ref="my-amfphp"/> > > <channel ref="my-amfphp-secure"/> > > </channels> > > <properties> > > <source>*</source> > > </properties> > > </destination> > > </service> > > </services> > > <channels> > > <channel-definition id="my-amfphp" > > class="mx.messaging.channels.AMFChannel"> > > <endpoint uri="http://domain.com/amfphp/gateway.php" > > class="flex.messaging.endpoints.AMFEndpoint"/> > > </channel-definition> > > <channel-definition id="my-amfphp-secure" > > class="mx.messaging.channels.SecureAMFChannel"> > > <endpoint uri="https://domain.com/amfphp/gateway.php" > > class="flex.messaging.endpoints.SecureAMFEndpoint"/> > > </channel-definition> > > </channels> > > </services-config> > > ------------------------------------------------------------ > > > > I noticed in the documentation that you could specify the > > RemoteObject.channelSet property, so I tried making the call like this: > > > > var dataService:RemoteObject = new RemoteObject(); > > dataService.destination = "amfphp"; > > dataService.source = "TestService"; > > dataService.channelSet = new ChannelSet( ['my-amfphp-secure'] ); //use > > secure channel > > dataService.sendCommand.addEventListener( ResultEvent.RESULT, > > resultHandler ); > > dataService.addEventListener(FaultEvent.FAULT, errorHandler); > > dataService.sendCommand(postVars); > > > > I have no idea if I'm doing that right however. Also just a note, the > > service works fine over the insecure channel if I uncomment out the line > > setting channelSet. > > > > Any ideas? > > > > > > Thanks Again! > > ~Aaron > > > > > > -- > Aaron Miller > Chief Technology Officer > Open Base Interactive, LLC. > [EMAIL PROTECTED] > http://www.openbaseinteractive.com > > -- "Every child has many wishes. Some include a wallet, two chicks and a cigar, but that's another story."