Hi Ahmed:

The reason I am trying to execute the RPC calls is so that in the
event of radical UI changes (EXT is an example) my team will still be
able to test the basic business logic.  I need a way to make calls to
GWT RemoteServiceServlets over http and so far the only way to do that
seems to be through the javascript compiled by GWT itself.  GWT's rpc
protocol is very opaque, making it very difficult to performance test.

So I was hoping to piggyback onto Rhino and use it as a tool through
which to make the RPC calls.  Rhino/HTMLUnit still need some
improvements in order to automate interaction with the UI's provided
by frameworks like EXT.

On Jul 16, 10:27 am, Ahmed Ashour <[EMAIL PROTECTED]> wrote:
> Dear Kevin,
> I guess all related information can be found 
> in:http://www.mozilla.org/rhino/tutorial.html
> Simply, you can do something like the below Java code.
> On the other hand, I am curious by your GWT statement, isn't it meant to 
> handle the JS, and you don't worry about RPC at all?
> Hope that helps,
> Ahmed
> --------------------
>   Context cx = ContextFactory.getGlobal().enterContext();
>   try {
>    final String s = "your js code";
>    Scriptable scope = cx.initStandardObjects();
>    cx.evaluateString(scope, s, "<cmd>", 1, null);
>    Object functionArgs[] = {"hello", "there"};
>    Object fObj = scope.get("function_name", scope);
>    final NativeFunction f = (NativeFunction) fObj;
>    Object result = f.call(cx, scope, scope, functionArgs);
>    System.out.println(result);
>   }
>   finally {
>    Context.exit();
>   }
> --------------------
>
> ----- Original Message ----
> From: Kevin R. VanDenBreemen <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Sent: Wednesday, July 16, 2008 5:18:12 PM
> Subject: The Basics
>
> I've been googling around for a while, looking at Rhino's examples,
> etc, and I am rather puzzled by the tool.  I was hoping that it was
> something that could simply (without jargon) do the following within
> the context of a Java program:
>
> 1.  Take a javascript source F
> 2.  Given a function n() defined in F and an argument set S, execute
> n(S)
>
> But instead there is a lot of discussion about executing scripts from
> the commandline, compiling scripts into classfiles whose source cannot
> be obtained, etc.
>
> Am I missing something here?
>
> Really I am interested in trying to use Rhino for something like
> executing the RPC calls in GWT applications.  Can it do that?
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> [EMAIL PROTECTED]://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to