You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Clifford THOMPSON <ct...@mdacorporation.com> on 2008/02/15 20:37:06 UTC

[AXIS2C] Question regarding the adjustment of response timeouts

Hello,
 
I have a question about adjusting the timeout period for web services.
Our current software dictates that we can have upwards of a 300 second
delay before a response is sent (we have a large amount of data that
needs to be prepared before being sent). Currently, our web service
component will timeout after roughly 60 sec (I'm not sure if this is the
Axis API, or from the OS). I have tried using some of the timeout
functions in the Axis2C API, but they appear to have no effect (if I set
the timeout 5 secs and the server takes 10 secs to respond, the client
will wait 10 secs for the response). I am assuming that I am using the
API incorrectly. We are working under WinXP, and have generate portions
of our code using the WSDL2C tool. We have chosen to generate
synchronous code using WSDL2C (so the eventual call in the generate code
will be to "axis2_svc_client_send_receive_with_op_qname"). Here is a
rough paraphrase of the code that we have and how I thought the timeout
function should be applied:
 
    env  = axutil_env_create_all( "MyServiceLog.log", 
                                  AXIS2_LOG_LEVEL_TRACE); 
    assert(NULL != env); 
 
    stub = axis2_stub_create_MyService( env, 
                                        AXIS2_GETENV("AXIS2C_HOME"), 
 
"http://myserver.ca:8080/services/MyService");
    assert(NULL != stub);
 
 
    status = axis2_options_set_timeout_in_milli_seconds( 
                 axis2_stub_get_options( stub,
                                         env ),        
                 env,
                 300000);
    assert(AXIS2_SUCCESS == status);
 
    /*                                      */
    /* lots of interleaving non-Axis2C code */
    /*                                      */
 
    responseNode = axis2_stub_op_MyService_MyOperation(
                      stub,
                      env,
                      headerNode1,
                      headerNode2,
                      bodyNode);
    if(NULL !=)
    {
        /* process the response */
    }
    else
    {
       /* log the response error */
    }
     
Thank you in advance for the help.
 
Cheers,
Cliff
 

Re: [AXIS2C] Question regarding the adjustment of response timeouts

Posted by Dimuthu Gamage <di...@gmail.com>.
Hi,

I too checked it in Linux and got the same result,

Seems we are not using axis2_options_get_timeout_in_milli_seconds
anywhere.. If this is a bug, should be fixed before the 1.3 release.

Thanks
Dimuthu

On Feb 16, 2008 1:07 AM, Clifford THOMPSON <ct...@mdacorporation.com> wrote:
>
>
> Hello,
>
> I have a question about adjusting the timeout period for web services. Our
> current software dictates that we can have upwards of a 300 second delay
> before a response is sent (we have a large amount of data that needs to be
> prepared before being sent). Currently, our web service component will
> timeout after roughly 60 sec (I'm not sure if this is the Axis API, or from
> the OS). I have tried using some of the timeout functions in the Axis2C API,
> but they appear to have no effect (if I set the timeout 5 secs and the
> server takes 10 secs to respond, the client will wait 10 secs for the
> response). I am assuming that I am using the API incorrectly. We are working
> under WinXP, and have generate portions of our code using the WSDL2C tool.
> We have chosen to generate synchronous code using WSDL2C (so the eventual
> call in the generate code will be to
> "axis2_svc_client_send_receive_with_op_qname"). Here is a rough paraphrase
> of the code that we have and how I thought the timeout function should be
> applied:
>
>     env  = axutil_env_create_all( "MyServiceLog.log",
>                                   AXIS2_LOG_LEVEL_TRACE);
>     assert(NULL != env);
>
>     stub = axis2_stub_create_MyService( env,
>                                         AXIS2_GETENV("AXIS2C_HOME"),
>
> "http://myserver.ca:8080/services/MyService");
>     assert(NULL != stub);
>
>
>     status = axis2_options_set_timeout_in_milli_seconds(
>                  axis2_stub_get_options( stub,
>                                          env ),
>                  env,
>                  300000);
>     assert(AXIS2_SUCCESS == status);
>
>     /*                                      */
>     /* lots of interleaving non-Axis2C code */
>     /*                                      */
>
>     responseNode = axis2_stub_op_MyService_MyOperation(
>                       stub,
>                       env,
>                       headerNode1,
>                       headerNode2,
>                       bodyNode);
>     if(NULL !=)
>     {
>         /* process the response */
>     }
>     else
>     {
>        /* log the response error */
>     }
>
> Thank you in advance for the help.
>
> Cheers,
> Cliff
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org