Hi, I am trying to connect to my server via web services in the browser and I can't find a way. Here is a simple example:
1. Create a calcserver from examples from gSoap(here
). The only change I made is in calc.h:
2. Create html in the same directory and use example(here
). Make little modifications(like where is wsdl).
3. Copy WebService HTC File
to the same directory.
Maybe it is becouse the service is located on http://localhost:11011 and the wsdl is in the directory where is the html. But it is only maybe.
Any suggestions please?
Here is the code of html:
iCallID = service.MyMath.callService("add",5,6);
var xfaultcode = event.result.errorDetail.code;
var xfaultstring = event.result.errorDetail.string;
var xfaultsoap = event.result.errorDetail.raw;
alert("Error: " + xfaultcode + " " + xfaultstring + " " + xfaultsoap);
alert("The method returned the result : " + event.result.value);
<div id="service" style="behavior:url(webservice.htc)" onresult="onWSresult()">