Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
if(toRepeat == null || (toRepeat != null && !toRepeat.equals("true"))){ // if toRepeat flag is set, then "I'm Sorry..." must not be played VoiceElementConfig.StaticAudio PRA_0a = voiceElementConfig.new StaticAudio("I'm sorry, I didn't understand.",promptsURL+"PRA_0a.wav"); audioGroup.addAudioItem(PRA_0a); } else elementAPI.setSessionData("toRepeat", "false");
VoiceElementConfig.StaticAudio PR_166 = voiceElementConfig.new StaticAudio("To move on to the next item, say 'next'.", promptsURL+"PR_166.wav"); audioGroup.addAudioItem(PR_166); VoiceElementConfig.StaticAudio PR_167 = voiceElementConfig.new StaticAudio("To move to the next section, say 'next section'.", promptsURL+"PR_167.wav"); audioGroup.addAudioItem(PR_167); VoiceElementConfig.StaticAudio PR_168 = voiceElementConfig.new StaticAudio("You can also say 'previous,' 'previous section,' 'repeat,' 'first,' or 'last'.", promptsURL+"PR_168.wav"); audioGroup.addAudioItem(PR_168); } else{
VoiceElementConfig.StaticAudio silence = voiceElementConfig.new StaticAudio("Hello", promptsURL+"PR_166.wav"); //this is the audio that will be played in the ordinary case audioGroup.addAudioItem(silence);
}
} catch(CantHandleRequestException exception){ elementAPI.addToLog("- CantHandleRequestException - ", exception.toString()); } catch(Exception e){ elementAPI.addToLog("- The exception was ::", ""+e); }
When its running it throws element,error,A VoiceXML exception occurred: error.badfetch
Can anyone let me know where might the problem in the code
Subject: RE: Get error while running the application Replied by: Michael Bochynski on 28-11-2005 02:50:22 PM Hi Mahesh,
Note that the error.badfetch can be thrown by a voice browser when, as stated in the Voice XML 2.0 specification [quote:e90cd8cb51] a fetch of a document has failed and the interpreter context has reached a place in the document interpretation where the fetch result is required. Fetch failures result from unsupported scheme references, malformed URIs, client aborts, communication errors, timeouts, security violations, unsupported resource types, resource type mismatches, document parse errors, and a variety of errors represented by scheme-specific error codes. [/quote:e90cd8cb51]
I would suggest making sure that all your static WAV files are reachable for a voice browser, since this is the most common source for badfetch errors.
I would also suggest starting from a smaller code, adding [i:e90cd8cb51]System.out.println()[/i:e90cd8cb51] statements to your code and adding new lines successively.
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: