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

Damitha Kumarage reassigned AXIS2C-1189:
----------------------------------------

    Assignee: Damitha Kumarage

> svc_client_send_receive could be improved significantly in blocking dual 
> channel case.
> --------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-1189
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1189
>             Project: Axis2-C
>          Issue Type: Bug
>         Environment: all
>            Reporter: Damitha Kumarage
>            Assignee: Damitha Kumarage
>
> I observered that in svc_client_send_receive function's blocking dual related 
> code section could be improved.
> Currently after establishing the callback and starting listener manager it 
> repeatedly call op_client_receive function in a loop. It in tern call engine 
> receive.It then extract the response soap envelope from the response message 
> context passed to  engine receive. But this is redundant and expensive calls 
> to engine_receive. By this time, the callback we passed already contain the 
> response soap envelope. What we need is just the following code to get the 
> response envelope instead of having some unneccessary complexity.
> index = axis2_options_get_timeout_in_milli_seconds(svc_client->options, env) 
> / 10;
> while(!axis2_callback_get_complete(callback, env))
> {
>     if(index-- >= 0)
>     {
>        AXIS2_USLEEP(10000);
>     }
>     else
>     {
>         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_RESPONSE_TIMED_OUT, 
> AXIS2_FAILURE);
>         AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Response time out");
>     }
>     
>     soap_envelope = axis2_callback_get_envelope(callback, env);
> }
> Note that I use the function axis2_callback_get_complete() function as the 
> loop condition.

-- 
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]

Reply via email to