Hi all,
I have a webpage that calls a webservice found on a remote computer.
Below is the code of my webpage:
=============== =============== =======
<html>
<head>
<script language="JavaS cript">
var iCallID;
function init()
{
service.useServ ice("http://www.webservicex .net/length.asmx?WSD L","MyMath") ;
iCallID = service.MyMath. callService(onW Sresult,
"ChangeLengthUn it", 12, "Feet", "Inches");
}
function onWSresult(resu lt)
{
alert(result.va lue);
if((event.resul t.error)&&(iCal lID==event.resu lt.id))
{
var xfaultcode = event.result.er rorDetail.code;
var xfaultstring = event.result.er rorDetail.strin g;
var xfaultsoap = event.result.er rorDetail.raw;
// Add code to output error information here
}
else
{
alert("The method returned the result : " + event.result.va lue);
}
}
</script>
</head>
<body onload="init()" >
<div id="service" style="behavior :url(webservice .htc)">
</div>
</body>
</html>
=============== =============== =======
When the "alert(result.v alue)" is reached, I used to get "undefined" as
a result but now it seems that the webpage freezes and nothing happens.
I'm sure that the webservice I'm calling is functioning properly (if I
type its URL in a brower, it works fine) and I'm sure that the
'webservice.htc ' is there in it's proper location.
Note: The above webpage is hosted on a Windows 2003 Server which has a
public IP (i don't know if this might be helpful)
Any ideas would be greatly appreciated!
Thanks