I have a requirement of calling a web service built in Java to be called from an HTML page via Java-script.
I have tried the code sample available at the following URL: http://www.codeproject.com/Articles/14610/Calling-Web-Services-from-HTML-Pages-using-JavaScr#
<html>
<head>
<title>Hello World</title>
<script language="JavaScript">
var iCallID;
function InitializeService(){
service.useService(http://localhost:1394/MyWebService.asmx?wsdl,
"HelloWorldService");
service.HelloWorldService.callService("HelloWorld");
}
function ShowResult(){
alert(event.result.value);//Output: Undefined
}
</script>
</head>
<body onload="InitializeService()" id="service"
style="behavior:url(webservice.htc)" onresult="ShowResult()"> </body>
</html>
The web service is running and has been tested via a Weblogic inbuilt test client.
Please suggest some JS code for calling a webservice with String Parameters