on 01-25-2014 10:38 AM
Asher Schweigart:I have a custom element that pulls some information using XML http requests, and it is causing CVP to throw a "error.badfetch".
Running the same element in the debugger throws no such error, but it does take a long time to continue, so I am wondering if it is a voicexml timeout issue.
From what I have read in other posts, I should be able to set the fetchtimeout vxml property on my custom action element. I don't see the normal pane to do that in CS, so I am thinking I should do it in the java code? How would I do this in java?
Janine Graves:Asher, the fetchtimeout timer is only for the gateway when it's waiting for another vxml page. Your error.badfetch is being generated by VxmlServer. I don't know if you can customize VxmlServer (Tomcat) to tell it how long to wait for response. Someone at Cisco would have to help you with this. Or maybe you could do it inside your java by setting an http fetch timeout property for tomcat. -- Janine Graves
Janine Graves:Sidney,
Anyway, to make a long story short, for that http request VxmlServer has
a HARD CODED 5-second timeout to receive back the response. It's not
configurable. And I tend to think this is the case for Asher's scenario.
BUT - it sure would be nice if someone from Cisco could chime in. Paul
Tindall - can you help???
Paul Tindall:Not sure I can help much but I can confirm the built-in back-end HTTP request doesn't give you any flexibility in terms of request timeout, security etc. You will have to code your own HTTP request in a custom action/decision element to get a longer timeout.
Hemal Mehta:The webservice timeouts do not get controlled by fetchtimeout. You need to explicity code that in the webservice. Hemal From: Cisco Developer Community Forums [mailto:cdicuser@developer.cisco.com] Sent: Tuesday, March 26, 2013 3:30 PM To: cdicuser@developer.cisco.com Subject: New Message from Shikha Sharma in Customer Voice Portal (CVP) - General Discussion - All Versions: RE: Fetchtimeout in custom action element Shikha Sharma has created a new message in the forum "General Discussion - All Versions": -------------------------------------------------------------- You can put an audio element just before your custom action element and set following vxml properties: fetchtimeout fetchaudio(if you want to play music while waiting for xml response) This approach works for our webservice calls. -- To respond to this post, please click the following link: http://developer.cisco.com/web/cvp/forums/-/message_boards/view_message/13535491 or simply reply to this email.
Asher Schweigart:
That is what I've done, I have a custom action element that does the http request:
URL url = new URL("URL_that_returns_XML);
URLConnection conn = url.openConnection();
conn.setRequestProperty("Authorization", "Basic "+cred);
conn.connect();
InputStream sn = conn.getInputStream();
So maybe the timeout is not what is causing the error.
This is what the logs said:
10.255.60.88.1364318999643.19285.HD_start,03/26/2013 13:32:03.299,A VoiceXML error occurred of type "error.badfetch"
10.255.60.88.1364319084959.19289.HD_start,03/26/2013 13:32:14.533,A VoiceXML error occurred of type "error.badfetch"
10.255.60.88.1364319084959.19289.HD_start,03/26/2013 13:32:41.265, The error was: Another thread is currently working on this session. This means the original thread took too long to complete what it was doing. To prevent abnormal behaviour the original thread will exit immediately. The call should not be affected.
com.audium.server.MultipleThreadException: Another thread is currently working on this session. This means the original thread took too long to complete what it was doing. To prevent abnormal behaviour the original thread will exit immediately. The call should not be affected.
Asher Schweigart:I have a custom element that pulls some information using XML http requests, and it is causing CVP to throw a "error.badfetch".
Running the same element in the debugger throws no such error, but it does take a long time to continue, so I am wondering if it is a voicexml timeout issue.
From what I have read in other posts, I should be able to set the fetchtimeout vxml property on my custom action element. I don't see the normal pane to do that in CS, so I am thinking I should do it in the java code? How would I do this in java?
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: