Active scripting and webservices  
Author Message
Rowan Massey





PostPosted: Visual C# General, Active scripting and webservices Top

Hi all,

I've been tasked with writing a c# application and finding a way to execute a script via a webservice using active scripting! i.e. we currently have script files (using javascript) that call custom functions found in a COM object. What we're looking to do is to do the same thing but instead of using a COM object, we'd like to use a WebService. Is this at all possible I suppose since everything in it's basic form is an object that it could be...but then I could be wrong! Any information, or recommendations would be greatly appreciated.

Regards,

Rowan.



Visual C#18  
 
 
Lee_Dale





PostPosted: Visual C# General, Active scripting and webservices Top

This article might help

http://msdn2.microsoft.com/en-us/library/ms996450.aspx



 
 
Paul Louth





PostPosted: Visual C# General, Active scripting and webservices Top

Just want to get this straight. Are you asking to execute a remote web-service from client-side javascript which replaces a client-side COM object and client side javascript If so, you could use AJAX to execute specific behaviour on the server. You could use the Microsoft Atlas version of Ajax, or something a bit more lightweight:

http://www.codeproject.com/soap/JavaScriptProxy_01.asp


 
 
Rowan Massey





PostPosted: Visual C# General, Active scripting and webservices Top

Gents,

Thanks for the quick responses, this is essentially the problem:

We have function calls stored in a script file (as stated), a new webservice was created that mimiced all the function calls exposed by the COM object (The COM object was on the server, and all script files needed to be run on the server itself) - the reason for the webservice is to allow customers to run these script files remotely.

So what I'm esentially looking to do it to connect to the webservice using a C# windows application, somehow pass up all the function calls, with their parameters in the file to the webservice for it to execute them on the server. I was hoping to use active scripting, and just pass in the Webservice (since it has all the definitions for the functions as does the COM object) and just execute it like that (wishfull thinking on my part obviously)

Rowan.