User Guide

106 Cross-Product Extensions
RPC server XML replies
After the RPC server processes an XML request, it packages the result as an XML fragment
and sends it back to the client. If an error occurred during processing, the server returns an
error code in the result XML. Otherwise, the reply node contains a single data node with the
result of the operation. If the request doesnt require a return value, the reply node contains
either a single void data node or no children nodes.
For example, here is a successful reply:
<return><string value="file://hd/foo/stuff/mydoc.png" /></return>
Here is a successful reply with a server object:
<return><obj value="23467" class="FireworksDocument" /></return>
Error codes
If the server encounters an error when processing a request, the reply node (with the node
name
return) contains at most one error attribute, as in this example:
<return error="5" />
The error attribute can contain one of the values listed in the following table.
NOTE
When the server returns a server object, it automatically retains the object on the client's
behalf. That is, the object returned to the client is not destroyed until the client releases it
with a release request, or until the client disconnects from the server. Therefore, the
client should release a server object as soon as the client has finished sending requests
related to that object (when the client is done “using” the object).
Error
code
Description
0 No error occurred, and the request completed successfully. The client should
never receive an error attribute with this value. If no error occurred, then no error
attribute will be present.
1 An unknown, generic error occurred. The RPC server could not make enough
sense of the request to give a specific error. Check the name of the XML nodes
and attributes.
2 No such object, invalid object ID. The object specified by the client does not
exist or the object ID is invalid.
3 No such method. The method that the client requested does not exist on the
specified object.
4 No such property. The property that the client requested does not exist on the
specified object.