Configuring Flash Remoting
39
Note:
If you specify the Flash Remoting gateway in the web page, the ActionScript
import mx.
remoting.Service;
directive must be on the Flash Timeline, not in a SWF file.
When you specify the gateway connection in a Web page, you specify the
gatewayUrl
parameter
as an empty string in the Service constructor that you create to access the service. For example, the
following HTML
flashvars
parameter creates the gateway connection and the subsequent
Service parameter, which accesses the
customerData
service, submits an empty string for the
gatewayUrl
parameter.
<param name="flashvars" value="gatewayUrl=http://localhost:8300/flashservices/
gateway/"/>
// Service constructor
custService = new Service(
"", // set using flashvars to http://localhost:8300/flashservices/
null,
"customerData",
null,
null);
Specifying a service
The service name format depends on the type of service you are using. The following table lists
the ways that you can specify service names for the supported service types:
Service type
Service name
Example
Web services (accessed
through ColdFusion or .NET
servers)
URL of the WSDL file for the
service.
http://www.xmethods.net/sd/
2001/BabelFishService.wsdl
ASP.NET pages (.aspx)
Logical directory path from the web
root. Replace all slash or backslash
characters in the path with periods.
FlashGateway.Samples.
WeatherService
DLL files (.dll)
Fully qualified class name.
Flashgateway.Samples.
WeatherService
EJBs
JNDI name of the EJBHome
binding.
com.mycompany.samples.
WeatherService
Java classes, including
JavaBeans
Fully qualified Java class name.
com.mycompany.samples.
WeatherService
Java servlets
Web application context root.
WeatherService
JMX (JRun 4 only)
MBean object name.
DefaultDomain:service=
DeployerService
ColdFusion pages (.cfm)
Path from the web root to the page’s
directory. Replace all forward slash
or backward slash characters in the
path with periods.
Flashgateway.samples.
WeatherService
ColdFusion components (.cfc) Qualified ColdFusion component
name starting from the web root.
Flashgateway.samples.
WeatherService
Содержание FLASH REMOTING MX
Страница 1: ...Using Flash Remoting for Flash MX 2004 ActionScript 2 0...
Страница 8: ...8 Contents...
Страница 62: ...62 Chapter 3 Using the RemotingConnector component Flash Professional only...
Страница 142: ...142 Chapter 7 Using Flash Remoting for Java...