Click here to Skip to main content
15,915,324 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I created wcf successfully and got this message
that you have created service successfully

ASM
You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

i tried to used it kendui
$(document).ready(function() {
$("#products").kendoComboBox({
placeholder: "Select Country",
dataTextField: "ProductName",
dataValueField: "ProductID",
filter: "contains",
autoBind: false,
minLength: 3,
dataSource : {
type: 'odata',

serverFiltering: true,
transport: {
read: {
url: "http://localhost:4398/MyFirstService.svc/getdata",

}

}
}



});
});

or jquery
XML
<h1>jQuery Tokeninput Demos</h1>

  <h2>Simple Server-Backed Search</h2>
  <div>
      <input type="text" id="demo-input" name="blah" />
      <input type="button" value="Submit" />
      <script type="text/javascript">
      $(document).ready(function() {
          $("#demo-input").tokenInput("http://localhost:4398/MyFirstService.svc/json/getdata");
      });
      </script>
  </div>




it is not working and i don't know what is the matter
help please
Posted
Updated 3-Sep-13 3:01am
v3

1 solution

I didn't understand the way your are trying to call the service. In jQuery normally a service call can be ajax call, xhr call or a getJSON().
I am adding here a sample for ajax call:


JavaScript
function serviceCall() {
    return $.ajax({
        type: "GET",
        url: "http://localhost:4398/MyFirstService.svc/json/getdata,
    });
}
serviceCall().done(function (data) {
        //You will get the result here;
});

Happy Coding :)
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900