Just wanted to ask if I can call a method coming from a WSDL generated class inside javascript. Thanks!
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you mean a class generated by importing the WSDL using Add Service Reference / svcutil, then no, since those tools don’t support generating javascript clients.
If you want to access a WCF service via javascript, you should add a non-SOAP (REST) endpoint to the service, since it can take / return JSON data (which is easy to create / consume in JS). You can also take a look at http://wcf.codeplex.com, which has an extension for accepting the native data format used by jQuery’s ajax calls (application/x-www-form-urlencoded), along with some samples.