Share this page

# nca_java_set_reply_property

Java Object Functions

Sets a reply property for a Java object.

    void nca_java_set_reply_property( void * ReplyPropList );

ReplyPropList | A list of reply properties.

The nca_java_set_reply_property function sets the specified Java reply properties.

One use of the function is to prevent "402", warning messages where the server is unable to reply to requests for information. See the example for details.

Where the property has multiple values that must be set, use a parameter for the values rather than entering each value in a separate row of ReplyPropList. For example, this definition with multiple values for mGetProperty is invalid for use with nca_java_set_reply_property:

    char* JavaProp[][3] =
    	{
    		{"BEANS_VZSYSTEM_0", "mGetProperty", "Windows XP"},
    		{"BEANS_VZSYSTEM_0", "mGetProperty", "\"" },
    		{"BEANS_VZSYSTEM_0", "mGetProperty", "C:\\myDir"},
    		{0,0,0}
    	};

To pass multiple values of mGetProperty, specify a parameter in the parameters table, named p_mGetProperty in this example, and set the values. Define the parameter as sequential and to be modified each occurrence. Then use this declaration:

    char* JavaProp[][3] =
    	{
    		{"BEANS_VZSYSTEM_0", "mGetProperty", "{p_mGetProperty}"},
    		{0,0,0}
    	};

This and other nca_java functions can be sent to the server as a single packet by wrapping the set of nca_java calls with nca_step_begin and nca_step_end functions.

## Return Values

No value returned.

## Parameterization

Parameterization is not available for this function.

## Example

## Example 1

In this example, the nca_java_set_reply_property function sets several Java properties.

    char* JavaProp[][3] = {{"GetHost", "HostName", "servername"},
              {"GetHost", "HostIP", "127.0.0.1"},
              {0,0,0}};

    nca_connect_server(...);
    nca_java_set_reply_property(JavaProp);

     Example 2

    In this example, nca_java_set_reply_property is used for preventing errors resulting from missing information on java objects.

    The message "Warning: did not reply to property - 402" for a java object (handlerClassId=0x10F) means the server requested information and the answer is not available. The answers can be found in the recording log.

    For example, this recording log shows two such events.

    In the first, the property requested is "ctiEnabled" and the value is "TRUE".

    Server Message Properties: action=4 handlerClassId=0x10F handlerId=20
        property=402 type=0x4000 value="ctiEnabled"

    Server Terminate Message: #5

    Client Message Properties: action=4 handlerClassId=0x10F handlerId=20
        property=402 type=0x4000 value="TRUE"

    Client Terminate Message: #6

    In the second, the property requested is "message" and the value is "Unknown property: BACKGROUND"

    Server Message Properties: action=4 handlerClassId=0x10F handlerId=20
        property=402 type=0x4000 value="message"

    Server Terminate Message: #7

    Client Message Properties: action=4 handlerClassId=0x10F handlerId=20
        property=402 type=0x4000 value="Unknown property: BACKGROUND"

    Client Terminate Message: #8

    The object name in the example is known from the recording log. A call to nca_java_action("CONTROL_CTI_CLIENT_0", "errorEvent","") is recorded before the logon.

    This example from the vuser_init action shows how to solve the problem. First, create an array where each element contains the object name, the requested property from the recording log, and the answer from the recording log. Then, pass the array as an argument to nca_java_set_reply_property before connecting to the server:

    /* The first two elements in array JavaProp provide the missing replies.
       The third element, {0,0,0}, terminates the array. */

    char* JavaProp[][3]= {
        {"CONTROL_CTI_CLIENT_0", "ctiEnabled", "TRUE"},
        {"CONTROL_CTI_CLIENT_0",
            "message", "Unknown property: BACKGROUND"},
        {0,0,0}
    };

    vuser_init() {
        nca_set_connect_opt(SCALE_INFO, 11, 18);
        nca_set_connect_opt(REQUIRED_LIST, 0);
        /* Set the reply before connecting to the server */
        nca_java_set_reply_property(JavaProp);

        nca_connect_server("kellynch.hall.com",
            "80",
            "module=DTCFM000 record=names");

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: