We've Moved! Please visit our new and improved forum over at our new portal: https://portal.plumvoice.com/hc/en-us/community/topics

error.badfetch on attempt to send data

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
ddcohen
Posts: 7
Joined: Tue Jul 13, 2010 9:47 am

error.badfetch on attempt to send data

Post by ddcohen »

I am working with the Plum Voice free trial developer account. I am attempting to run the following very simple script:

Code: Select all

<?xml version="1.0"?>
<vxml version="2.0">
<form>
  <field name="secretCode" type="digits?length=5">
      <prompt>
        Please press or say your 5-digit code.
      </prompt>
  </field>
  <block>
    <data name="verification" namelist="secretCode"
    src="http://mycompany.com/dev/CheckCode.xml"/>
      <prompt>
        Your code is <value expr="verification.documentElement.firstChild.toString()"/>.
      </prompt>
   </block>
</form>
</vxml>
(For this post, I have substituted the actual domain of my server with mycompany.com.)

The file located at http://mycompany.com/dev/CheckCode.xml is as follows:

Code: Select all

<?xml version="1.0" encoding="utf-8" ?> 
<isverified>true</isverified> 
This seems like it should be very simple, but when I call and enter my "5-digit code," I am then told that "a serious error of type error-badfetch has occurred." It seems that it is having trouble reading the XML file. When I point my browser to that URL, though, it can read the XML file just fine. What is going wrong?

Thank you,
David Cohen

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: error.badfetch on attempt to send data

Post by support »

Hi,

All your code is correct. We tested it and it is working correctly on our servers. The issue you are experiencing with the badfetch is because your application is unable to access your XML code located on your remote server. Please check your application server logs for any errors that might be causing your CheckCode.xml file to be inaccessible.

Regards,
Plum Support

ddcohen
Posts: 7
Joined: Tue Jul 13, 2010 9:47 am

Re: error.badfetch on attempt to send data

Post by ddcohen »

As far as I can see from our server logs, the page is being served.

In order to do a direct side-by-side comparison, I took out namelist="secretCode" from my <data> tag, so that I would not be sending any parameters with the GET Request for the XML page.

Here is the line in my server log that shows my Web browser requesting the page (which resulted in its successfully displaying the returned XML):
2010-07-21 16:25:58 W3SVC1 10.0.0.17 GET /dev/CheckCode.xml - 80 - 62.219.196.180 Mozilla/4.0+(compatible;+MSIE+8.0;+Windows+NT+6.0;+Trident/4.0;+GTB6.5;+SLCC1;+.NET+CLR+2.0.50727;+Media+Center+PC+5.0;+.NET+CLR+1.1.4322;+.NET+CLR+3.5.21022;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+OfficeLiveConnector.1.5;+OfficeLivePatch.1.3;+.NET4.0C) 200 0 0
Here is the line in my server log that shows the Plum Voice application requesting the same page (which resulted in "a serious error of type error-badfetch has occured"):
2010-07-21 16:52:53 W3SVC1 10.0.0.17 POST /dev/CheckCode.xml - 80 - 69.25.74.81 PlumVoicePortal/3.0 405 0 1
Why is the Plum Voice application getting this error when requesting a perfectly good XML page?

Thank you,
David

ddcohen
Posts: 7
Joined: Tue Jul 13, 2010 9:47 am

Re: error.badfetch on attempt to send data

Post by ddcohen »

Oops -- I realized that the second line that I posted from our server logs was from when I tried a POST instead of a GET. (No, that didn't help.) For the sake of the direct side-by-side comparison with my Web browser's get, here is a line from the server log from when the Plum Voice application did made a GET request for the page:
2010-07-21 17:01:49 W3SVC1 10.0.0.17 GET /dev/CheckCode.xml - 80 - 69.25.74.81 PlumVoicePortal/3.0 200 0 0
-- David

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: error.badfetch on attempt to send data

Post by support »

Hi David,

Could you tell us what you are seeing in your call logs? In the past, we've found that users have encountered badfetch errors as the result of a parse error from invalid code being returned to the IVR.

Even though your code appears to be correct, perhaps you could check into your remote server for any errors as it may not be properly returning your XML file as valid XML code when the IVR is attempting to fetch it.

Hope this helps.

Regards,
Plum Support

ddcohen
Posts: 7
Joined: Tue Jul 13, 2010 9:47 am

Re: error.badfetch on attempt to send data

Post by ddcohen »

Here are the relevant lines from the call log:

Code: Select all

Attempting to fetch http://mycompany.com/dev/CheckCode.xml
Parse error in file "http://mycompany.com/dev/CheckCode.xml", invalid XML
errno: 205 uri http://mycompany.com/dev/CheckCode.xml
received event: error.badfetch: 
I posted the contents of the XML file in my initial post above. It seems to be to be well-formed. Is the problem that the XML schema is not defined?

-- David

support
Posts: 3632
Joined: Mon Jun 02, 2003 3:47 pm
Location: Boston, MA
Contact:

Re: error.badfetch on attempt to send data

Post by support »

Hi David,

Could you private message us the URL of your XML file?

We've tested your code on our servers and it works correctly each time, leading us to believe that there may be an issue with the remote app server that's hosting the XML file.

Here are some possible suggestions you can try:

1) Hosting your XML file on a different app server.

2) Enabling full verbose logging on your app server to troubleshoot the issue when the fetch is occurring.

3) Changing the security settings on your app server that could be affecting the data exchange between it and the IVR.

Regards,
Plum Support

Post Reply