referencing a WCF web service
Posted
by ErnieStings
on Stack Overflow
See other posts from Stack Overflow
or by ErnieStings
Published on 2009-11-27T17:27:01Z
Indexed on
2010/04/14
13:03 UTC
Read the original article
Hit count: 372
Our current project uses an asmx service. We want to keep this service for now, but would like to add an additional wcf service for ajax calls.
I followed a procedure i found online to set up the service and it works fine with javascript in aspx files within that particular project but i'm unsure how to reference it in javascript files in a different project (in the same solution).
If someone could point me in the right direction it would be much appreciated.
Thanks,
Shawn
EDIT: i wish to make calls in javascript similar to the following:
function Button1_onclick() {
var service = new AjaxServices.TestService();
service.wcfTest(4, onSuccess, null, null);
}
function onSuccess(result){
document.getElementById("ajaxPlaceHolder").innerHTML = "<p>" + result + "</p>";
}
// ]]>
but i'm willing to explore the jQuery option as well.
© Stack Overflow or respective owner