[英]how to request with method post to asp.net web service from php and get response
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.