Adobe 65011817 Extended User Guide - Page 288
Data node, Parameters
UPC - 883919157368
View all Adobe 65011817 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 288 highlights
Last updated 12/8/2009 EXTENDING FIREWORKS 284 Cross-Product Extensions Data node The data node is the most important type of XML node in RPC. Methods called through the func operation need to act on actual data or references to server objects identified in data nodes. The data nodes are used as parameters and parts of replies. There are several types of data nodes, as described in the following table. Data type Node name Example Description array array An array data type. It is simply a container node for the other data nodes. There are no restrictions on how many subelements it can contain or which types it can contain. The contained data nodes may be of the same type or of different types. No additional attributes have to be added to the contained nodes. Boolean bool The Boolean data type. It can contain either true or false and nothing else. Note that the values are case sensitive. dictionary dict A dictionary data type. Like the array data type, it is simply a container for other data nodes. Each direct child node of a dictionary node must contain an additional key attribute. The key attribute is a string and must be unique for the given dictionary node. The key string must start with a letter or an underscore (_) and may followed by numbers, letters, or underscores. Dictionary nodes can be used to pass objects by value. float double The floating-point data type. It can contain any floating-point (real) number within the range 1.7e +/- 308. integer int The integer data type. It can contain any signed integer in the range -2,147,483,648 through 2,147,483,647. null null The null type has only one value: null. The null type automatically coerces into the string type, array type, dictionary type, and the server object type. The null type cannot have any attributes or sub-elements. server object obj The server object data type. The value attribute is set to the object ID. The class attribute is optional. The server always specifies the object class when sending replies to the client. The client, however, is not required to specify the class when sending server object nodes to the server. The class attribute tells the client what properties and methods are available on an object. string string A string data type. It can contain a UTF-8-encoded string. If you include special characters, you must "escape" them (indicate that they are part of the string) according to the method described in the XML Data Model (from http://www.w3.org/XML/Datamodel.html). Most XML writing packages automatically do this. void void No value; no type. Cannot have any attributes or subelements. Parameters Parameters are simply data nodes with an order attribute. The order attribute identifies the order in which the parameters should be processed for the server. In this way, the RPC client can use any XML client library to build parameters in any order, and the RPC server retains the correct parameter order. The first parameter should have the order attribute set to 0; the second, to 1; and so on, as in this example: