Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
scripts
hosting
jscript
remote
scripting.wsh
scriptlets
vbscript
virus.discussion
  
 
date: Sun, 29 Jun 2008 03:25:26 -0700 (PDT),    group: microsoft.public.scripting.wsh        back       


Web services: Next steps   
Trying to learn how to call a web service from script. I know we can
use the XMLHttpRequest object to invoke a call. But I don't know how
to initiate the call, and also pass arguments to my web method. The
web method is as defined below C#:

[WebMethod]
    public string FahrenheitToCelcius(string fahrenheit)
    {
        Double fahr;
        if ((fahrenheit.Trim().Length == 0) ||
Double.TryParse(fahrenheit.Trim(), out fahr) == false)
        {
            return "Error";
        }
        else
            return string.Format("{0}", ((fahr - 32) / 9) * 5);
    }

It is converts fahrenheit to celcius. The argument is a string. How
can I call this web method and also receive its output?

--deostroll
date: Sun, 29 Jun 2008 03:25:26 -0700 (PDT)   author:   deostroll

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us