Setting Timeout length using axis2_options_set_timeout_in_milli_seconds

lislej's picture
I am trying to set the timeout duration for a long running synchronous soap call to 3 minutes but I am having issues getting the axis2_options_set_timeout_in_milli_seconds() function to work. It is timing out always at the default of 1 minute. I have reproduced this behavior in both 1.5 and 1.6 on Windows. Thanks for your help. Relevant section of code: ...... /* server specific data */ serverName = (axis2_char_t*)p_serverName; endpoint_uri = (axis2_char_t*)p_serverUrl; /* create environment structure */ env = axutil_env_create_all("RuleAdminWS.log", AXIS2_LOG_LEVEL_TRACE); //AXIS2_LOG_LEVEL_INFO /* create options structure */ options = axis2_options_create(env); /* set timeout duration to wait for a response for up to 3 minutes*/ long timeout_in_milli_seconds = 180000; axis2_options_set_timeout_in_milli_seconds(options, env, timeout_in_milli_seconds); ......
lislej's picture

RE: Setting Timeout length using axis2_options_set_timeout_in_mi

Found some posted code which cleared in up for me...This resets the timeout period to 3 minutes. ...... long timeout_in_milli_seconds=180000; /* create environment structure */ env = axutil_env_create_all("RuleAdminWS.log", AXIS2_LOG_LEVEL_TRACE); //AXIS2_LOG_LEVEL_INFO // create handle to remote service stub = axis2_stub_create_BPCService(env, client_home, endpoint_uri); // get options structure options = axis2_stub_get_options( stub, env ); // set timeout status = axis2_options_set_timeout_in_milli_seconds( options, env, timeout_in_milli_seconds); ......
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)