1

我想调用一个使用soap客户端在.net中创建的Web服务。

现在我想用 jQuery 调用这个 Web 服务并在我的 HTML5 页面中显示结果。

我正在使用以下代码,但仅收到错误消息。

$(document).ready(function() {
    $.ajax({
        type: "POST",
        url: "http://mysite.com/RSSReader.asmx/MY_method_name_in_web_service",
        data: "{}",
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) {
            // Hide the fake progress indicator graphic.
            $('#RSSContent').removeClass('loading');

            // Insert the returned HTML into the <div>.
            $('#RSSContent').html(msg.d);
        }
    });
});

请给我建议。提前致谢

4

0 回答 0