Adobe 65011817 Extended User Guide - Page 286
RPC client XML requests
UPC - 883919157368
View all Adobe 65011817 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 286 highlights
Last updated 12/8/2009 EXTENDING FIREWORKS 282 Cross-Product Extensions Fireworks RPC transactions pass XML between an RPC client and the Fireworks RPC server built in to Fireworks. The RPC client is any supported program that connects to Fireworks through a TCP stream on port 12124. The Fireworks RPC server is the internal code that listens on TCP port 12124 and then handles client requests. During the RPC transaction, information flows from client to server: Client 1 Estabrish TCP connection on port 12124 3 Send XML request Server 2 Accept TCP connection 4 Process XML request 6 Process XML reply 5 Send XML reply 7 Disconnect TCP connection 8 Accept TCP disconnect Note: The RPC client is not required to disconnect after each XML request. The RPC client can keep the connection open and send additional XML requests (the TCP resubmission timeout is 30 seconds). However, only one XML request can be outstanding at a time. In other words, the RPC client cannot send a second request until it receives a reply to the first request, because there is no queueing mechanism to hold pending requests. RPC client XML requests The XML request contains the following four pieces of information for Fireworks: • The type of operation to perform • The name of the operation to perform • The object on which the operation is performed • Any parameters the operation needs 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 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: The RPC client sends the following four types of requests, specified in the XML tag name of the envelope: • The 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: