[ 
https://issues.apache.org/jira/browse/AXIS2C-1190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Lazarski resolved AXIS2C-1190.
-------------------------------------
    Resolution: Implemented

 - The improvement suggested in this ticket has been implemented       
  - The sample code already uses axis2_callback_get_complete() for      
  polling                                                               
  - The on_complete callback registration is commented out              
  - No further action needed                                 

> 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
>          Components: samples
>         Environment: all
>            Reporter: Damitha N.M. Kumarage
>            Priority: Major
>
> 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 was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to