
This is the Title of the Book, eMatter Edition
Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved.
8
|
Chapter 1: Introduction to Flash Remoting
Flash Remoting requires browser support for binary POST. Because
Netscape 6.x does not support binary
POST, Flash Remoting does not
work when the Flash Player is running within Netscape 6.x. The Flash
Remoting call has no effect and no error is returned. This bug is fixed
in Netscape 7. There are also issues with early versions of Safari and
Chimera on the Macintosh. You can use a browser-detecting script to
redirect users to an appropriate page that uses HTML or older Flash
formats if the user’s browser does not support your Flash Remoting
application.
An AMF packet consists of the following:
•Apacket header, which describes the AMF version information and includes
HTTP headers
• A count of context headers in the array that follows
•Thecontext headers array, which describes to the server the context in which the
information should be processed (on calls from the client) or describes to the cli-
ent what is coming from the server (a result or status) and its format (such as a
recordset or a string)
• A count of the messages in the array that follows
• The messages array, which is typically a method call coming from the client or a
status/result coming from the server
Following is the HTTP request and response generated by the Hello World exam-
ples shown later in this chapter. Because AMF is a binary format, the binary data is
shown as periods (
...). The ASCII text in the following excerpt, such as amf_server_
debug
, is part of the literal message:
POST /flashservices/gateway HTTP/1.1
Referer: http://192.168.0.5:8500/flashservices/gateway
Content-Type: application/x-amf
User-Agent: Shockwave Flash
Host: 127.0.0.1
Content-Length: 198
Cache-Control: no-cache
.......amf_server_debug....pNetDebugConfig
coldfusion...
amfheaders....amf....
httpheaders....recordset....error....trace...m_debug.........
....*com.oreilly.helloworld.HelloWorld.sayHello.../1....
And the response from the server back to the Flash Player is as follows:
HTTP/1.0 200 OK
Date: Thu, 23 May 2002 02:53:09 GMT
Content-Type: application/x-amf
Content-Length: 69
Server: JRun Web Server
Kommentare zu diesen Handbüchern