Right, but that assumes you're compiling against a services-config.xml
file to automatically create you a ChannelSet. The endpoint attribute is
a short cut designed for CF users and allows you to avoid the
services-config.xml dependency at compile time... assuming that you're
using RPC services like RemoteObject.
 
(DataService, however, requires more info than just endpoints so you
must point mxmlc at the FDS services-config.xml in those cases).

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of maury.sword
Sent: Wednesday, March 21, 2007 6:02 PM
To: [email protected]
Subject: [flexcoders] Re: flash remoting



You shouldn't need to specify an endpoint when using the "ColdFusion" 
destination. I'm using flash remoting with Flex 2 and only use the 
destination parameter. The "ColdFusion" destination references a "my-
cfamf" channel that has an endpoint for the flex2gateway. This is 
defined in the services-config.xml file on your server under the WEB-
INF\flex folder. Here's a copy of the file from our development box:

<?xml version="1.0" encoding="UTF-8" ?> 
- <services-config>
- <services>
- <service id="coldfusion-flashremoting-service" 
class="flex.messaging.services.RemotingService" 
messageTypes="flex.messaging.messages.RemotingMessage">
- <adapters>
<adapter-definition id="cf-object" 
class="coldfusion.flash.messaging.ColdFusionAdapter" 
default="true" /> 
</adapters>
- <destination id="ColdFusion">
- <channels>
<channel ref="my-cfamf" /> 
</channels>
- <properties>
<source>*</source> 
- <!-- define the resolution rules and access level of the cfc being 
invoked 
--> 
- <access>
- <!-- Use the ColdFusion mappings to find CFCs, by default only CFC 
files under your webroot can be found. 
--> 
<use-mappings>false</use-mappings> 
- <!-- allow "public and remote" or just "remote" methods to be 
invoked 
--> 
<method-access-level>remote</method-access-level> 
</access>
- <property-case>
- <!-- cfc property names 
--> 
<force-cfc-lowercase>false</force-cfc-lowercase> 
- <!-- Query column names 
--> 
<force-query-lowercase>false</force-query-lowercase> 
- <!-- struct keys 
--> 
<force-struct-lowercase>false</force-struct-lowercase> 
</property-case>
</properties>
</destination>
</service>
</services>
- <channels>
- <channel-definition id="my-cfamf" 
class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://devserver.agkcm.bayer.com/flex2gateway/
<http://devserver.agkcm.bayer.com/flex2gateway/> " 
class="flex.messaging.endpoints.AMFEndpoint" /> 
- <properties>
<polling-enabled>false</polling-enabled> 
- <serialization>
<instantiate-types>false</instantiate-types> 
</serialization>
</properties>
</channel-definition>
</channels>
- <logging>
- <target class="flex.messaging.log.ConsoleTarget" level="Message">
- <properties>
<prefix>[Flex]</prefix> 
<includeDate>false</includeDate> 
<includeTime>false</includeTime> 
<includeLevel>false</includeLevel> 
<includeCategory>false</includeCategory> 
</properties>
- <filters>
<pattern>Endpoint.*</pattern> 
<pattern>Service.*</pattern> 
<pattern>Configuration</pattern> 
<pattern>Message.*</pattern> 
<pattern>DataService.coldfusion</pattern> 
</filters>
</target>
</logging>
<system /> 
</services-config>

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "rchadgray" <[EMAIL PROTECTED]> wrote:
>
> AH HA! after playing around some i found you need the trailing 
slash 
> after flex2gateway.
> 
> So now it works with this line:
> <mx:RemoteObject id="cfc_ro" destination="ColdFusion" 
> source="remotingExample" showBusyCursor="true" 
> endpoint="http://demo.dev/flex2gateway/
<http://demo.dev/flex2gateway/> ">
> 
> Thanks again Clint and Pete for all of the help!
> 
> 
> Adobe -- PS. isnt it a bad idea to use use flex2gateway? What 
> happens when Flex 3 comes out?
> 
> 
> 
> 
> 
> 
> 
> --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> , "rchadgray" <cgray@> wrote:
> >
> > hmmmm If i hit http://demo.dev/flex2gateway
<http://demo.dev/flex2gateway>  with a web browser i 
> get 
> > a 500 Internal Server error in my browser.
> > 
> > The apollo app spews a huge error if i set 
> > endpoint="http://demo.dev/flex2gateway
<http://demo.dev/flex2gateway> "
> > 
> > here is a part of it:
> > 
> > fault = (mx.rpc::Fault)#14
> > errorID = 0
> > faultCode = "Client.Error.MessageSend"
> > faultDetail = "Channel.Connect.Failed error 
> > NetConnection.Call.Failed: HTTP: Status 500: 
> > url: 'http://demo.dev/flex2gateway <http://demo.dev/flex2gateway> '"
> > faultString = "Send failed"
> > message = "faultCode:Client.Error.MessageSend 
faultString:'Send 
> > failed' faultDetail:'Channel.Connect.Failed error 
> > NetConnection.Call.Failed: HTTP: Status 500: 
> > url: 'http://demo.dev/flex2gateway <http://demo.dev/flex2gateway>
''"
> > name = "Error"
> > rootCause = (Object)#15
> > code = "NetConnection.Call.Failed"
> > description = "HTTP: Status 500"
> > details = "http://demo.dev/flex2gateway
<http://demo.dev/flex2gateway> "
> > level = "error"
> > 
> > 
> > --- In [email protected]
<mailto:flexcoders%40yahoogroups.com> , "Peter Farland" <pfarland@> 
> > wrote:
> > >
> > > There are two "remoting" technologies available in ColdFusion. 
> > > 
> > > There is Macromedia Flash Remoting which was also included in 
> > ColdFusion
> > > MX. This is retained today in CF for backwards compatibility 
for 
> > older
> > > Flash Remoting clients and Flex 1.0 and Flex 1.5 applications, 
> > although
> > > Flex 2 does not target this technology. In CF, the old Flash 
> > Remoting
> > > gateway is typically configured on the CF server at
> > > /flashservices/gateway.
> > > 
> > > Adobe Flex Data Services 2 includes a Remoting Service that is 
> also
> > > available in ColdFusion 7. Flex 2's RemoteObject is designed to 
> > talk to
> > > this new service and includes support for new data types made 
> > available
> > > in ActionScript 3.0. Flex Data Services is built on top of a 
> > messaging
> > > framework so it sends messages back and forth between the 
client 
> and
> > > server. The remoting service is provided by a message broker 
and 
> is
> > > typically configured on the CF server at /flex2gateway. I 
imagine 
> > that
> > > you've contacted a legacy endpoint such as the old Flash 
Remoting
> > > gateway and did not receive a message (but perhaps a raw 
> result)...
> > > hence the failure.
> > > 
> > > Pete
>



 

Reply via email to