Calling Service Functions - MACROMEDIA FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 Use Manual

Using flash remoting for flash mx 2004 actionscript 2.0
Table of Contents

Advertisement

Flash supplies the login credentials with each service request; therefore, your ActionScript should
log the user out of the application server and reset the credentials when the user logs out of your
Flash application.
To log out the user and reset the credentials:
Call a logout service function on the server that logs out the user.
1.
For example, for ColdFusion, call a method that uses the
Set the gateway connection credential information to empty strings.
2.
The following example shows these steps:
myService.logout();
gatewayConnection.setCredentials("", "");
The technique that you use to authenticate the user and to authorize access on the application
server depends on the application server you're using.
Using authentication in ColdFusion MX
If you use ColdFusion, the
ID and password in the ColdFusion page's CFLogin scope whenever you request a service. The
Application.cfm page for the ColdFusion page or ColdFusion component should process this
information as necessary in a
ColdFusion, see
Using authentication in JRun 4
Authentication in JRun 4 is only meaningful for EJBs, where you can use the
method to enable access to secured EJB methods. You must configure your application server for
single sign-on. The Flash gateway provides the security credentials to the login module. For more
information on authentication in JRun 4, see
on page
139.

Calling service functions

To call the functions exposed by a Service object, you use the object name followed by the service
function name. In the following example,
getCategories()
var temp_pc:PendingCall = petMarketService.getCategories("en_US");
The
getCategories()
page. The function also passes a string parameter,
function should return the categories. To pass multiple parameters to service functions, you
include a comma-separated list of values in the service function call. If the
function also allowed you to specify a type of category, for example, the parameters would look
like this:
petMarketService.getCategories("en_US", "Accessories");
setCredentials()
cflogin
"Securing access to ColdFusion from Flash Remoting" on page
is the name of the function that is called:
function exists in the application server as a public method or application
cflogout
method causes Flash Remoting to put the login
tag. For more information on implementing security in
"Using Flash Remoting with JRun security"
petMarketService
, to specify the language in which the
"en_US"
tag.
116.
setCredentials()
is the Service object name and
getCategories()

Calling service functions

41

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash remoting mx

Table of Contents