summaryrefslogtreecommitdiff
path: root/testprogs/ejs/echo.js
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-07-02 05:22:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:19:05 -0500
commit52f481b666f0dade2b6fa8da851bb4a407fe4df9 (patch)
tree95548be7705ed0c408ddb0a529a198178eafd612 /testprogs/ejs/echo.js
parent643e5d8239ba105a5ac99ecc513289a17402714b (diff)
downloadsamba-52f481b666f0dade2b6fa8da851bb4a407fe4df9.tar.gz
samba-52f481b666f0dade2b6fa8da851bb4a407fe4df9.tar.bz2
samba-52f481b666f0dade2b6fa8da851bb4a407fe4df9.zip
r8070: a (as yet not working) example of how rpc calls might be made from js scripts
(This used to be commit b9e73fa932e8289b756b557faeca1690c02a21ed)
Diffstat (limited to 'testprogs/ejs/echo.js')
-rw-r--r--testprogs/ejs/echo.js34
1 files changed, 34 insertions, 0 deletions
diff --git a/testprogs/ejs/echo.js b/testprogs/ejs/echo.js
new file mode 100644
index 0000000000..6d01f69a5c
--- /dev/null
+++ b/testprogs/ejs/echo.js
@@ -0,0 +1,34 @@
+/*
+ demonstrate access to rpc calls from ejs
+*/
+
+function irpcObj()
+{
+ var o = new Object();
+ o.in = new Object();
+ return o;
+}
+
+function test_AddOne()
+{
+ var status;
+ var conn = new Object();
+ var io = irpcObj();
+
+ status = rpc_connect(conn, "ncacn_ip_tcp:localhost", "rpcecho");
+ printVars(status);
+ printVars(conn);
+
+ io.in.in_data = 3;
+ status = rpc_call(conn, "echo_AddOne", io);
+ printVars(status);
+ printVars(io);
+}
+
+
+print("Starting\n");
+
+test_AddOne();
+
+
+