Skip to main content

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

Title: Re: [vtp-dev] Scripting
Sorry about the slow response Jay, I’ve been traveling.  You can place your jar into the dependencies folder of the voice application project.  Items in that project should automatically be placed into the rhino class path to resolve java references.  I do want to point out that we are still bound to version 1.6.2 of the engine that is available through the eclipse orbit project.  I am testing the newer 1.6.6 bundle that offers the new rhino engine that supports much more of the _javascript_ language.  When I’m done testing I’ll drop a note here and request access to the upgrade.

Trip


On 8/9/08 9:25 PM, "Jay" <sspal@xxxxxxxxx> wrote:

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
>   

 

_______________________________________________
vtp-dev mailing list
vtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/vtp-dev

Back to the top