Forum .LRN Q&A: Timeout problem consuming a web service

Request notifications

I am trying to consume an external web service but the following error message is displayed:

-----------------------------------------------------------
Exception caught. Please, consult the log file for details:
Reason: Timeout-constraint, blocking HTTP request failed. Reason: 'COND_WAIT_TIMEOUT'
-----------------------------------------------------------

The service was written using Eclipse and Axis and deployed in a Tomcat 7.0 Server. It works and it can be consumed from Eclipse without problem.

However when I try to consume it from dotLRN using this code the exception is caught:

----------------------------------------
namespace import -force ::xosoap::client::*
namespace import -force ::xorb::stub::*

set s1 [SoapGlueObject new \
-endpoint http://192.168.1.102:8080/AxisWSTest/services/HolaWS \
-action urn:HolaWS#hola]

ProxyObject Hola -glueobject $s1
Hola ad_proc -returns xsString hola {
} {Returns hola munod} {}

set var "AXIS version: [Hola hola]"
---------------------------------------------

I have installed xosoap and xorb and I have disabled my firewall.
When I check the log nothing tell me the reason of the timeout.

Must I do anything more to consume an external web service from dotLRN?
Can anybody give me advice?

Thanks in advance.

Collapse
Posted by Stefan Sobernig on
Javier,

I am wondering why you end up with a timeout constraint in the first place. Without setting timeout > 0 explicitly, such an exception should not be thrown up, eventually.

1) Please, let me know the following:

Which versions of xotcl-core etc. are you running?

Run http://YOURHOST/xotcl/version-numbers and post the result.

2) Set a timeout > 0 explicitly:

set s1 [SoapGlueObject new -endpoint http://192.168.1.102:8080/AxisWSTest/services/HolaWS -action urn:HolaWS#hola -timeout 3000]

//stefan

Collapse
Posted by Javier Arranz on
Thanks for your help, Stephan, and I am sorry for the delay.

About your requests:

1) Versions:

----------------------------------------------------------
Database: PostgreSQL 8.4.16 on x86_64-pc-linux-gnu, compiled by GCC gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3, 64-bit
Server: 4.5.1 (AOLserver)
Tcl: 8.4.19
XOTcl: 1.6.5
Tdom: 0.8.3
libthread: /usr/lib/tcltk/thread2.6.5/libthread2.6.5-aolserver.so
Tcllib: /usr/share/tcltk/tcllib1.12
acs-kernel: 2010-06-17, 5.6.0
xotcl-core: 2009-12-12, 0.111
----------------------------------------------------------

2) Explicit Timeout. I have added this option but nothing changed. The exception continues beeing thrown. This is the error message:

----------------------------------------------------------
Exception caught. Please, consult the log file for details:
Reason: Timeout-constraint, blocking HTTP request failed. Reason: 'COND_WAIT_TIMEOUT'

while executing
"error [subst {
Exception caught. Please, consult the log file for details:
[$e message]
}]"
("uplevel" body line 4)
invoked from within
"uplevel $catchScript"
invoked from within
"if { "error" == "$errorType" } {

uplevel [ list set $errorName $result ]
uple..."
("catch" arm line 11)
invoked from within
"switch $firstArg {

catch {

set errorTypeAndName [ lindex $remainingArgs 1 ]
..."
("1" arm line 6)
invoked from within
"switch $retValue {

3 { error "break not supported in try without loop" }
4 { error "continue not supported in try without loo..."
(procedure "try" line 14)
::xoexception::Throwable->try
invoked from within
"::xoexception::Throwable try {
my debug INNER-ARGS=$args
#$requestor setup
$requestor call $args
} catch {Exception e} {
my debug EXCEPTION=..."
("uplevel" body line 1)
invoked from within
"uplevel ::xoexception::Throwable try $args"
(procedure "::xoexception::try" line 3)
invoked from within
"::xoexception::try {
my debug INNER-ARGS=$args
#$requestor setup
$requestor call $args
} catch {Exception e} {
my debug EXCEPTION=[$e serial..."
(procedure "hola" line 7)
::template::Hola->hola
invoked from within
"Hola hola"
invoked from within
"set var "AXIS version: [Hola hola]""
("uplevel" body line 20)
invoked from within
"uplevel {
namespace import -force ::xosoap::client::*
namespace import -force ::xorb::stub::*

# / / / / / / / / / / / / / / / / / / /
# 1) cr..."
(procedure "code::tcl::/web/dotlrn/packages/xotcl-prueba/www/axisWSTestC..." line 2)
invoked from within
"code::tcl::$__adp_stub"
invoked from within
"if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init tcl $__adp_stub
..."
("uplevel" body line 3)
invoked from within
"uplevel {

if { [file exists $__adp_stub.tcl] } {

# ensure that data source preparation procedure exists and is up-to-date
adp_init t..."
(procedure "adp_prepare" line 2)
invoked from within
"adp_prepare"
invoked from within
"template::adp_parse [file root [ad_conn file]] {}"
(procedure "adp_parse_ad_conn_file" line 6)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file "$root/$extra_url""
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
rp_serve_abstract_file "$root/$extra_url"
set tcl_url2file([ad_conn url]) [ad_conn file]
set tcl_url2path..."
-----------------------------------------------------------

Thanks again,
Javier

Collapse
Posted by Javier Arranz on
I reply myself

I have solved it only using the latest versions of oacs/dotlrn and xorb/xosoap.