0
POST /abc/abcServiceWSService.asmx HTTP/1.1
Host: abc.def.org
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://def.org/getActiveAbc"

这是网络服务示例

如何使用方法从 php 向 asp.net Web 服务请求并获得响应?

4

1 回答 1

0

尝试使用 Jquery Ajax 发布此 Web 服务并获取响应消息,如下例所示:

$.ajax({
            type: "POST",
            url: "/abc/abcServiceWSService.asmx",
            contentType: "application/json; charset=utf-8",
            data: "{}",
            dataType: "json",
            success: onSuccessFunction
        });
    });
    function onSuccessFunction(message){
//message contains your response :)
}

不要忘记包含 jquery

于 2013-10-21T12:57:49.037 回答