Click here to Skip to main content
14,920,690 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
I have web service on my host having URL[^]. This webservice has a method getChannel() which returns a string. How can I call this from my project? I tried as follows but it's not working.
<script type="text/javascript">
      $(document).ready(function () {
          $("#sayHelloButton").click(function (event) {
                  type: "GET",
                  url: "",
                  data: "{'name': '" + $('#name').val() + "'}",
                  contentType: "application/json; charset=utf-8",
                  dataType: "json",
                  success: function (msg) {
                  error: AjaxFailed
      function AjaxSucceeded(result) {
      function AjaxFailed(result) {
          alert(result.status + ' ' + result.statusText);

Please help me out here.
Updated 27-May-11 5:59am
AspDotNetDev 27-May-11 13:09pm
Just one comment. You set the dataType to "json", but your web service is probably returning XML in a SOAP response.
Wonde Tadesse 27-May-11 21:36pm
The webservice method is getchannel but you are calling get_voda_channels ? Humm...

1 solution


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