Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Voicetools » how to pass request parameters to openvxml web app
how to pass request parameters to openvxml web app [message #844295] Fri, 13 April 2012 22:17 Go to next message
s guo is currently offline s guoFriend
Messages: 2
Registered: April 2012
Junior Member
I deployed an openvxml WAR to tomcat, and can retrieve voice xml out of it.

but I need to pass in a parameter in the request. how do I retrieve this parameter value in openvxml project?

for example, the WeatherDemo project is deployed as "test.server.com/test/WeatherDemo",

I want to pass in a zip code like "test.server.comlocalhost/test/WeatherDemo?zip=95401", then how can I get this zip code value in openvxml project? Thanks,
Re: how to pass request parameters to openvxml web app [message #844470 is a reply to message #844295] Sat, 14 April 2012 02:40 Go to previous messageGo to next message
Randy Childers is currently offline Randy ChildersFriend
Messages: 121
Registered: July 2009
Senior Member
Hi--

If you got your OpenVXML through an installer from the OpenMethods
website, there's not an easy answer (because that's an older version,
the 3.x codestream). However, if you're hooked into the VTP code at
Eclipse (which is the 4.0 codestream), then there is a really easy way
to do this.

There's a system Map variable called InitialParameters which is
automatically populated with URL parameters. In your example, you could
use this in a script block to catch the incoming variable:

if("zip" in Variables.InitialParameters) {
Variables.zipcode = Variables.InitialParameters.zip;

You could just make the assigment without checking to see if it's in the
collection, but if the .war were ever invoked without the parameter,
you'd get an error.

Good luck,
Randy



In <jma8l4$k3c$1@xxxxxxxxe.org> s guo wrote:
> I deployed an openvxml WAR to tomcat, and can retrieve voice xml out
> of it.
>
> but I need to pass in a parameter in the request. how do I retrieve
> this parameter value in openvxml project?
>
> for example, the WeatherDemo project is deployed as "test.server.com/
> test/WeatherDemo",
>
> I want to pass in a zip code like "test.server.comlocalhost/test/
> WeatherDemo?zip=95401", then how can I get this zip code value in
> openvxml project? Thanks,
>
Re: how to pass request parameters to openvxml web app [message #848012 is a reply to message #844470] Tue, 17 April 2012 21:49 Go to previous message
s guo is currently offline s guoFriend
Messages: 2
Registered: April 2012
Junior Member
Thanks Randy, that worked.

I tried it on the latest openvxml from open methods, that method also worked.
Previous Topic:Is there a way to have voice (vox) files out of the WAR file
Next Topic:Creating a new voice formatter to a new language
Goto Forum:
  


Current Time: Fri Apr 26 19:14:32 GMT 2024

Powered by FUDForum. Page generated in 0.03426 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top