Consume Remote Web Service from HTML Page

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sweetneel
    New Member
    • Oct 2008
    • 42

    Consume Remote Web Service from HTML Page

    Hi
    I need a help. I have created a webservice . Host it. And then tried to call it from HTML page . Nothing is working. But if i call this webservice locally it is working fine.
    URL of my service is

    I am providing html code
    Code:
    <script>
            
           
            $(document).ready(function () {
                $.support.cors = true;
            $.ajax({
                type: "GET",
                url: "http://bademo.ossnadev.com/GeFileService.asmx/HelloWorld",
                
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (response) {
                    //var mydata = data.d;
                    alert('ok');
                },
                failure: function (response) {
                    //alert(response.d);
                    alert('nok');
                }
            });
        });
        </script>
    Please let me , what i am mising .
    Last edited by Rabbit; Oct 9 '15, 03:57 PM. Reason: fixed code tags
  • madankarmukta
    Contributor
    • Apr 2008
    • 308

    #2
    Did you get the failure fixed ?

    What does this web service do?

    Regards.

    Comment

    Working...