Services|web If you are using Microsoft IE 5 or later, your can use the behavior/html-component "WebService" to access a We B 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 a element using the STYLE, as follows:
<div id= "Giveitaname"
Style= "Behavior:url (WEBSERVICE.HTC)" ></DIV>
A Complete example taken from the Microsoft Web site is as follows:
<script language= "JavaScript" >
var icallid;
function init ()
{
Service.useservice
("Http://myserver.com/services/myservice.asmx?WSDL",
"ServiceName");
}
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.errorDetail.raw;
ADD code to output error information
Alert ("Error");
}
Else
{
Service.innerhtml= "The method returned the result:"
+ Event.result.value;
}
}
</script>
</HEAD>
<body onload= "Init ();" >
<BR>
Enter a Value <input type= ' text ' id= ' param1 ' >
<BR>
<button >call A Web method</button>
<div id= "Service"
Style= "Behavior:url (WEBSERVICE.HTC)"
onresult= "Onmyresult ();" >
</div>
</body>