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 reading voiceXML from URL

Questions and answers about IVR programming for Plum DEV

Moderators: admin, support

Post Reply
josephg
Posts: 4
Joined: Thu Sep 22, 2016 10:51 am

Error reading voiceXML from URL

Post by josephg »

Hi,
I'm using this code for testing

Code: Select all

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE vxml PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">
<vxml version="2.1"
      xmlns="http://www/w3/org/2001/VXML"
      xml:lang="en-US">
    <property name="documentmaxage" value="0s" />
    <form id="mainDialog">
        <field name="callerResponse">
            <prompt>
                You want to fly to New York. Is that correct?
            </prompt>
 
            <grammar type="application/srgs+xml" root="ROOT" mode="dtmf">
                <rule id="ROOT">
                    <one-of>
                        <item>1</item>
                        <item>2</item>
                        <item>3</item>
                    </one-of>
                </rule>
            </grammar>
            <filled>
                <prompt> thank you </prompt>
                <prompt>you said <value expr="callerResponse" /> </prompt>
            </filled>
        </field>
    </form>
     
 
</vxml>
When running it from the scratchpad, it's working fine, However, if I run it from a URL (http://209.123.176.147) then I'm getting this error

Code: Select all

Cache Hit: http://209.123.176.147
DocumentParser::FetchDocument - Parse error in file "http://209.123.176.147", line 2, column 6 - Unknown element 'html'
errno: 205 uri http://209.123.176.147
Please note the following:
  • There is no error retriving the document from the URL, You can out in that URL in the browser & it will return the vxml
  • Im using ASP MVC for my web application
  • When I validate the scratchpad everything is valid, However, when I validate the URL I'm receiving this error on line 3

Code: Select all

XML declaration allowed only at the start of the document in Entity

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

Re: Error reading voiceXML from URL

Post by support »

Hi,

The XML declaration must be the first line of your document. If you view the page source of your URL:

Code: Select all



<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE VXML PUBLIC "-//The Plum Group//DTD VOICEXML 2.1//EN" "/usr/local/plumvp/vxml.dtd">

<vxml version="2.1"
      xmlns="http://www/w3/org/2001/VXML"
      xml:lang="en-US">
...
You can see that there are a couple of empty lines before the "<?xml" line. Removing these should resolve your issue.

Regards,
Plum Support

josephg
Posts: 4
Joined: Thu Sep 22, 2016 10:51 am

Re: Error reading voiceXML from URL

Post by josephg »

Thanks, I will try that & let you know results

Post Reply