Call Web Services with JavaScript

zhaozj2021-02-16  122

If you are using Microsoft IE 5 or later, you can use the behavior / HTML-Component "WebService" to access a Web service. The "WebService" behavior communicates with Web services over HTTP using Simple Object Access Protocol (SOAP).

To use the "Webservice" Behavior, You Must Attach It To An Element Using The Style Attribute, As Follows:

var iCallID;

Function init ("http://myserver.com/services/myservice.asmx?wsdl", "serviceename");

function onmyresult () {if ((event.result.error) && (iCallID == event.result.id)) {var xfaultcode = event.result.errorDetail.code; var xfaultstring = event.result.errorDetail.string; var Xfaultsoap = event.result.rrordetail.raw;

// Add code to output ("error");} else {service.innerhtml = "The method Returned The Result:" Event.Result.Value;}} οnlοad = "init ();">
Enter a value

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.034, SQL: 9