|
|
The get_message method retrieves a single message according to a specified
message handle. The response from this method is a
GET_MESSAGE_RESULT object,
that contains the message in a Q_MESSAGE object.
Message content is not retrieved, but can be obtained by calling get_message_content.
| GET_MESSAGE_RESULT get_message( |
| string user_name, |
// Fax server user name |
| string user_password, |
// Fax server user password |
| string message_handle |
// Handle of message to retrieve |
| ) |
|
Parameters: |
|
| user_name |
A NET SatisFAXtion user name.
|
| user_password |
The password for the user.
|
| message_handle |
The handle of the message to retrieve.
|
|
Return Value: |
|
A GET_MESSAGE_RESULT object containing a result code and string, and a
Q_MESSAGE object if the function was successful.
|
Example: |
|
public bool wait_for_message_completed(string message_handle)
{
NSSOAP ns = new NSSOAP();
for ( ;; )
{
GET_MESSAGE_RESULT gmr =
ns.get_message("supervisor","",message_handle);
if (gmr.status_num != STATUS_NUM.NoError)
{
// Lost contact with the server or message
break;
}
if (gmr.q_message.is_completed)
{
// Message status is in gmr.q_message.completion_code
// and gmr.q_message.completion_string.
// If gmr.q_message.completion_code == 0 then the message
// was successful.
return(true);
}
Thread.Sleep(3000);
}
return(false);
}
|
See Also: |
|
send_message, get_message_content,
get_message_q |