![MACROMEDIA FLASH REMOTING MX Use Manual Download Page 37](http://html1.mh-extra.com/html/macromedia/flash-remoting-mx/flash-remoting-mx_use-manual_687566037.webp)
Configuring Flash Remoting
37
Establishing the Flash Remoting gateway connection
The specific format of the URL that you use to specify the gateway depends on the application
server to which you are connecting:
•
If you are connecting to a Java server or to Macromedia ColdFusion MX, use the following
format:
http://webServer[:port]/flashservices/gateway
In this URL,
flashservices
is the name of the Java application context, and
gateway
is the
servlet mapping. If you do not use the default Flash Remoting deployment configuration,
replace
flashservices
with the application context, and replace
gateway
with the servlet
mapping.
•
If you are connecting to a .NET server, use the following format:
http://webServer[:port]/flashremoting/gateway.aspx
In this URL,
flashremoting
is the logical directory used for Flash Remoting, and
gateway.
aspx
is an intentionally blank file installed with Flash Remoting; the
aspx
suffix identifies this
as a .NET request. If you do not use the standard installation configuration for Flash
Remoting, you might need to change these values to reflect your configuration.
You can establish a gateway connection in Flash Remoting in one of the following ways:
•
If you use Flash Professional, create an instance of a RemotingConnector component. For
more information, see
“Flash Remoting ActionScript classes” on page 32
.
•
Create a Service object, creating a gateway at the same time that you create a reference to a
remote service and its methods. Macromedia recommends this technique.
•
Identify a remote gateway and create a Connection object that enables Flash Remoting to
connect to it. For information on this technique, see <<<xref Connection class>>> and
Appendix A, “Using NetServices and Connection Classes,” on page 163
.
Note:
This technique has been deprecated in Macromedia Flash Remoting for Flash MX 2004
ActionScript 2.0.
•
Specify the gateway in a web page.
Note:
Although using NetServices to establish a connection object is still supported, Macromedia no
longer recommends it. Macromedia instead recommends that you establish a gateway connection
using the Service object. For information on using NetServices to establish a gateway connection,
see
Appendix A, “Using NetServices and Connection Classes,” on page 163
.
The remainder of this section describes how to establish a gateway connection using a Service
object or a web page.
Creating a gateway connection using the Service class
To create a gateway connection in ActionScript, Macromedia recommends that you create a
Service object, creating the gateway connection at the same time that you create a reference to a
remote service and its methods.