Saturday 26 May 2012

Call web Services Using SOAP Client in JavaScript


Call web service using SOAP Client in JavaScript :

function webService() {
            try {

                var myvar = new SOAPClientParameters();
                SOAPClient.invoke( '../Sample.asmx(URL of Service)', 'Hello',
                                              myvar,  true,  Refresh(Callback function) );
            }
            catch (ex) {
                alert(ex)
            }
        }
        function Refresh(r) {
            for (i = 0; i < r.length; i++) {
                document.getElementById("me").innerHTML += "<br />" + r[i].FirstName;
            }
        }

Download  SOAP Client JS File from here
  
Why should be a fan as you are a star of tomorrow

No comments:

Post a Comment