Introduction to server management requests

A QAnywhere client application can send special messages to the server called server management requests. These messages contain content that is formatted as XML and are addressed to the QAnywhere system queue. They require a special authentication string. Server management requests can perform a variety of functions, such as:

Addressing server management requests

By default, server management requests must be addressed to ianywhere.server\system. To change the client ID portion of this address, set the ianywhere.qa.server.id property and restart the server. For example, if the ianywhere.qa.server.id property is set to myServer, server management requests are addressed to myServer\system.

For more information about setting the ianywhere.qa.server.id property, see Server properties.

For more information about addressing QAnywhere messages, see Sending QAnywhere messages.

For more information about the system queue, see System queue.

Examples

The following is a sample message details request. It generates a single report that displays the message ID, status, and target address of all messages with priority 9 currently on the server.

<?xml version="1.0" encoding="UTF-8"?>
<actions>
   <MessageDetailsRequest>
      <request>
         <requestId>testRequest</requestId>
         <condition>
            <priority>9</priority>
         </condition>
         <status/>
         <address/>
      </request>
   </MessageDetailsRequest>
</actions>

The following example is in C#. It sets a server-side transmission rule for a client such that messages from the server are only transmitted to the client called someClient if the priority is greater than 4.

QAManager mgr = ...; // Initialize the QAManager
QAMessage msg = mgr.CreateTextMessage();
msg.SetStringProperty( “ias_ServerPassword”, “QAnywhere” );

// Indenting and newlines are just for readability
msg.Text = “<?xml version="1.0" encoding="UTF-8"?>\n”
+ “<actions>\n”
+ “ <SetProperty>\n”
+ “  <prop>\n”
+ “   <client>someClient</client>\n”
+ “   <name>ianywhere.qa.server.rules</name>\n”
+ “   <value>ias_Priority &gt; 4</value>\n”
+ “  </prop>\n”
+ “ </SetProperty>\n”
+ “ <RestartRules>\n”
+ “  <client>someClient</client>\n”
+ “ </RestartRules>\n”
+ “</actions>\n”;

mgr.PutMessage( @“ianywhere.server\system”, msg );
Authenticating server management requests

The ianywhere.qa.server.password.e server property is used to specify a password that is used for authenticating server management requests. If this property is not set, the password is QAnywhere. See Server properties.