The XML request contains the following four pieces of information for Fireworks:
Note: XML requests are specially formatted XML document fragments, not full XML documents. XML requests are sent to the server in UTF-8 encoding and terminated with the null (0) character.
Logically, requests contain two parts: the envelope and the parameters. The envelope specifies the the requested operation (for instance, get or set) and the object that the operation is performed on. The parameters (strings, integers, arrays, and so on) specify how the operation happens. The envelope tag contains the parameter tag, as follows:
<envelope><parameter/></envelope>
The RPC client sends the following four types of requests, specified in the XML tag name of the envelope:
get operation retrieves the current object properties. The get operation can contain only the obj and name attributes and no subelements. In the following example, the client requests the value of the appDir property of the object whose ID is 1:
<get obj="1" name="appDir" />
set operation sets the object properties. The set operation can contain only the obj and name attributes and exactly one parameter. The parameter must be the same data type as the data type of the property being set, or Fireworks will return an error. In the following example, the client sets the property of "name" (a string providing a directory path) to the value file://hd/foo/stuff:
<set obj="1" name="appDir"><string order="1" value="file://foo/stuff" /></ set>
func operation calls a method that operates on the specified object. The number and type of parameters vary according to the method called by the func operation. In the following example, the client calls the undo method to operate on the object with object ID 1:
<func obj="1" name="undo" />
release operation informs the server that the client has finished working on the specified object. A release request must specify only an obj attribute and no subelements. In the following example, the client tells the server that it is has finished working on the object with ID 1:
<release obj="1" />
Note: Each type of request requires an obj attribute, and all but the release request require a name attribute. Requests can be only of types get, set, func, or release. The RPC server rejects all other types.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fireworks/8/fwextending/fw_03_c4.htm