Non blocking samples could be improved by the use of
axis2_callback_get_complete function.
------------------------------------------------------------------------------------------
Key: AXIS2C-1190
URL: https://issues.apache.org/jira/browse/AXIS2C-1190
Project: Axis2-C
Issue Type: Bug
Environment: all
Reporter: Damitha Kumarage
I can see that in non blocking samples it keep variable isComplete which is
updated from within the on_complte callback function to notify the application
client that response has arrived. Meanwhile client is in a while loop which
look for the change in onComplete variable for loop break.
I think it is more advisable simpler to use following in the client code which
use axis2_callback_get_complete function.
while(!axis2_callback_get_comlete(callback, env))
{
AXIS2_SLLEP(1);
if(count < 30)
{
count++;
}
else
{
printf("\necho client invoke failed. Counter timed out. \n");
}
}
echo_process_result_node(callback, env);
Note that echo_process_result_node(callback, env) function
has the same content as the echo_callback_on_complete() function. Only the name
is changed for appropriateness.
Also significant change is not passing a callback function with the callback.
This is not needed.
Once response come back the callback has the response envelope set. Calling
echo_process_result_node
we can process this result appropriatley.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]