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 服务请求并获得响应?
尝试使用 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