比如這個地址:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
這個是方法名: getSupportCity
入參: 北京
百度一下,找到了這個,(還有其他的,,感覺這個最詳細了,)
https://www.cnblogs.com/agileai/p/6030612.html
我怎么寫上面的那個地址,帶方法。。
錯誤 回傳------------
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException: 服務器未能識別 HTTP 頭 SOAPAction 的值: 。
在 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
在 System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
在 System.Web.Services.Protocols.SoapServerProtocol.Initialize()
在 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>System.Web.Services.Protocols.SoapException: 服務器未能識別 HTTP 頭 SOAPAction 的值: 。
在 System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
在 System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
在 System.Web.Services.Protocols.SoapServerProtocol.Initialize()
在 System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)</faultstring><detail /></soap:Fault></soap:Body></soap:Envelope>
uj5u.com熱心網友回復:
坐等各位大神留言
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/256471.html
標籤:基礎和管理
