在 VXML 中传递子对话框参数
我正在创建另一个供应商正在调用的子对话框。 我无法读取从该供应商传递到我的子对话框中的值。 当我自己从另一个 vxml 浏览器调用子对话框时,我可以读取传入的参数,因此我倾向于认为其他供应商错误地传递了它们。 但是,我无法在 w3c 规范中找到有关数据如何真正传递的任何详细信息。 当 IIS 从我使用的语音浏览器发布我的页面时,我没有看到参数被指定为查询字符串的一部分。 但是,当其他供应商的浏览器请求我的子对话框时,我会看到查询字符串中的参数,并且这些值不会显示在相应的中。 这让我相信他们错误地传递了变量。 我可以在哪里获得有关此过程如何运作的详细信息吗? 我如何确认这些值实际上没有被传递? 谢谢!
I'm creating a sub dialog another vendor is calling. I'm having trouble reading the values passed into my subdialog from that vendor. I can read the parameters passed in when I call the subdialog myself from another vxml browser, so I tend to think that the other vendor is passing them incorrectly. However, I have not been able to locate any details in the w3c spec on how that data really gets passed. When IIS posts my page from the voice browser I am using I don't see the parameters being specified as part of the query string. However, when this the browser for this other vendor requests my sub dialog I see the parameters in the query string and the values don't show up in the corresponding 's. This leads me to believe they are passing the variables incorrectly. Is there anywhere I can get details on how this process is suppose to work? How can I confirm that these values are not actually being passed? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
子对话框元素可用于转换到同一文档或外部文档内的表单。 由于您表明您正在与第三方合作,因此我将假设子对话框是文档中的外部表单。
子对话框通过 HTTP 请求传递参数。 如果子对话框的方法属性为 GET 或未设置,则它们将成为 URL 上的参数。 如果是邮寄,它们将嵌入到请求中。 如果您正在创建标准 servlet/jsp,您应该能够像从任何 Web 应用程序中一样获取这些参数。
您可能已经注意到,VoiceXML 规范在很多细节上都有点薄弱。 可能给您带来问题的一个特殊问题是复杂对象(ECMAScript 对象)的传递方式。 有些浏览器不会传递它们,有些浏览器会转换为文本参数,例如 xyz=42,有些浏览器会转换为 JSON 字符串。 我建议继续传递原始变量。
关于对象传递的主题,您可能会发现在文档内转换与转换到另一个文档时浏览器中的行为不同。
一些快速检查:
The subdialog element can be used to transition to forms within the same document or an external document. Since you are indicating that you are working with a third party, I'm going to assume the subdialog is to an external form in your document.
The subdialog passes arguments via the HTTP request. If the method attribute of the subdialog is GET or unset, they will be arguments on the URL. If it is post, they will be embedded within the request. If you are creating a standard servlet/jsp, you should be able to pick up these arguments as you would from any web application.
As you've probably noticed, the VoiceXML specification is a bit weak on a lot of details. One particular one that may cause you problem is how complex objects (ECMAScript objects) are passed. Some browsers will not pass them, some convert to text arguments like x.y.z=42 and some convert to a JSON string. I recommend keeping with passing primitive variables.
On the topic of passing of objects, you may find different behaviors within a browser when transitioning within the document versus transitioning to another document.
Some quick checks: