Action Message Format Vuser Functions (AMF) > Alphabetical List of Functions > amf_call


Example: amf_call Action Message Format Vuser Functions (AMF)

Sends an AMF request.

int amf_call( <StepName>, <List of Attributes>, MESSAGE, "Method=<method name>", "TargetObjectId=<target name>", ["EnvelopeHeaderSetId=<header set name>",] BEGIN_ARGUMENTS, <Argument List>, END_ARGUMENTS, [,MESSAGE, <message section 2>, ... MESSAGE, <message section n>,] LAST ); 
StepName A description of the action taken. Any text can be used. The step name is used as the transaction name for automatic transactions.
List of Attributes See below in this section: List of Attributes.
MESSAGE A marker that specifies the beginning of the data of a new message. At least one message must be specified.
Method The method to be remotely invoked.
TargetObjectId The URI that specifies the object to receive the server's response.
EnvelopeHeaderSetId Optional. The name of the envelope header set defined by an amf_define_envelope_header_set call that preceded this step. These headers are applied only to the MESSAGE in which they appear. To use the same envelope header set in more than one message, enter it in each message definition.
BEGIN_ARGUMENTS A marker that specifies the beginning of the argument list of the wrapping message.
Argument List The arguments to the remotely invoked function.
END_ARGUMENTS A marker that specifies the end of the argument list of the wrapping message.
LAST A marker that indicates the end of the field list.

The amf_call function submits an AMF request containing at least one message.

The argument order in the amf_call must be identical to the parameter order in the method prototype. If there are no parameters, the section may be omitted or BEGIN_ARGUMENTS and END_ARGUMENTS may be entered with no arguments. For more details, see AMF Arguments.

Return Values

This function returns LR_PASS (0) on success, and LR_FAIL (1) on failure. Note that in many cases, this return value indicates the technical success of the function, and not the result. For example, a function that registers a string to be found in a subsequent step returns LR_PASS to indicate that the registration was successful. This does not indicate that the string was found in the server response.


All arguments can be parameterized using standard parameterization.

List of Attributes

Gateway - The destination gateway is the destination URL for the POST.

The Flash Remoting gateway is a server-side object that brokers requests between Flash and the server and translates between Flash objects and the native objects for the server on which it is running.

Snapshot - (optional) The snapshot file name. If entering the call manually, do not use this attribute.

AMFHeaderSetId - (optional). This parameter specifies the name of an AMF header set defined by a previous amf_define_header_set call. These AMF headers are added to the AMF packet.

ResponseParameter - (optional). The output Vugen parameter containing the response data in XML format. Use the ResponseParameter attribute when the response data is required for coorelation. You can view the data in the replay snapshot or by outputting the value of the parameter.

IsParseResponse - (optional). "IsParseResponse=No" prevents parsing the message during the test run. "IsParseResponse=No" is added to the step if parsing fails when the test is recorded. It can also be added manually to improve performance if parsing is not required. There is usually no need to add "IsParseResponse=Yes" to a step. It can be added to force an attempt to parse a message at replay that failed when the step was recorded.