i am trying to call a web service from my pure HTML page using java script. i had successfully created a web service using java on net beans. now i want to call a method from that web service using java script with sending some parameters to the web Service, i had tried so far but not succeed yet. i had successfully called the method using jsp page, but i need to do it by using simple html page.
i had seen an example Here but it is not working with me. :(
can you please give me some example, so that i come to know how to call a specific method of my web service from java script with sending some parameters to the web service.
thanks in advance.
EDIT
my script
function validateForm(frm)
{
document.forms[0].action="http://localhost:8084/Web_Service_Example/CircleFunctions?"
document.forms[0].method="post"
document.forms[0].submit()
}
my CircleFunctions method
public class CircleFunctions {
public int sum()
{
int a = 20;
int b = 40;
int c = a+b;
return c;
}
}