Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / January 2006



Tip: Looking for answers? Try searching our database.

Installing Flash Remoting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jhutchdublin - 13 Jan 2006 18:02 GMT
Installing on XP Pro IIS 5.1 with ColdFusion running on this server. I have
Flash 8.0 and have installed the Flash Remoting components.

However, I have no file folder called flashservices or one called gateway. How
do I check if this running / or get it to work.
danielp_c2k - 14 Jan 2006 23:23 GMT
import mx.remoting.Service; // import Service class
import mx.rpc.FaultEvent; // import FaultEvent class
import mx.remoting.PendingCall // import PendingCall clsas
import mx.rpc.ResultEvent // import ResultEvent class
import mx.rpc.RelayResponder // import RelayResponder class

mx.remoting.debug.NetDebug.initialize();
var myService:Service = new
Service("http://examples.macromedia.com/flashservices/gateway",null,"petmarket.a
pi.catalogservice",
  null, null); // connect to remote service
var pc:PendingCall = myService.getCatagories({locale:"en_US"}); // call
service method
pc.responder = new RelayResponder(this, "getData_Result", "getData_Fault");
trace( "no response from server yet." );

function getData_Result( re:ResultEvent ):Void { // receive result
trace( "got the response" );
}
function getData_Fault( fe:FaultEvent ):Void { // receive fault
trace( "got the response" );
}
try dumping this into a fla actionscript pane, save the fla and hit ctrl+Enter
- if you get something in your output window - you should be in business.
MX7 turns off some services by default - check
C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF\web.xml should contain
(uncommented) something like <init-param>
   <param-name>gateway.configuration.file</param-name>
   <param-value>/WEB-INF/gateway-config.xml</param-value>
      </init-param>
<init-param>
   <param-name>whitelist.configuration.file</param-name>
   <param-value>/WEB-INF/gateway-config.xml</param-value>
</init-param>
<init-param>
   <param-name>whitelist.parent.node</param-name>
   <param-value>gateway-config</param-value>
</init-param>

to point at gateway-config.xml
which should itself have something like

<service-adapters>

  <adapter>flashgateway.adapter.resultset.PageableResultSetAdapter

  </adapter>

  <adapter>coldfusion.flash.adapter.ColdFusionAdapter</adapter>

  <adapter>coldfusion.flash.adapter.CFCAdapter</adapter>

  <adapter>coldfusion.flash.adapter.CFSSASAdapter</adapter>

  <!-- <adapter type="stateful-class">flashgateway.adapter.java.

        JavaBeanAdapter</adapter> -->

  <!-- <adapter type="stateless-class">flashgateway.adapter.java.

        JavaAdapter</adapter> -->

  <!-- <adapter type="ejb">flashgateway.adapter.java.EJBAdapter

       </adapter> -->

  <!-- <adapter type="servlet">flashgateway.adapter.java.ServletAdapter

       </adapter> -->

  <!-- <adapter>coldfusion.flash.adapter.CFWSAdapter</adapter> -->

</service-adapters>
with the cf-flash elements uncommented.

Unfortunately the old http://localhost/flashservices/gateway test doesnt work
anymore -

The information in this post came from the flashremoting section of the
coldfusion mx7 documentation in your webroot/cfdocs directory and there is
fairly thorough (if mainly flash 2004) flashremoting support (including simple
demos) in the flash 8 help.

 Good Luck - Dan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.