Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [vtp-dev] Scripting

Mike,

Thanks for your response.

I think I have not explained it properly. The _javascript_ code that I want to execute will not get embedded in the VXML I am attempting to use the Mozilla Rhino _javascript_ to call some some custom classes.

I am using the "script" control In the Common section of the voice pallet and writing this code in it.

var cx=new Packages.com.acme.Test();
Variables.somevar=cx.xtest();

The error I get is :

TypeError: [JavaPackage com.acme.Test] is not a
function, it is org.mozilla._javascript_.NativeJavaPackage.

Thanks
--
Jay

--- On Sat, 8/9/08, Mike Greenawalt <mike@xxxxxxxxxxxxxx> wrote:
From: Mike Greenawalt <mike@xxxxxxxxxxxxxx>
Subject: Re: [vtp-dev] Scripting
To: sspal@xxxxxxxxx, "Voice Tools general developers" <vtp-dev@xxxxxxxxxxx>
Date: Saturday, August 9, 2008, 10:05 PM

VXML is specified to use ECMAScript (== _javascript_) only as its 
scripting language. VXML browsers will likely only provide processing
for that option. Some maverick developer may have included other
scripting support, but I don't know if that is the case.

The basic answer to your question is that you cannot do what you suggest.

If you were to set up your custom jar file to be accessed via an
application on a separate document server, you could then use the <data>
element in VXML to retrieve its results. (Some VXML browsers do not yet
support <data>).

-- Mike

Jay wrote:
> Hi,
>
> I see that the Rhino scripting engine is being used to execute
> _javascript_.
> I created a custom jar file and bundled it with the plugins jar
> for eventual deployment to Tomcat.
> How do I execute a class file in the jar from the "script"
> element in the openvxml designer?
>
> Best Regards
> --
> Jay
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> vtp-dev mailing list
> vtp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/vtp-dev
>


Back to the top