asp教程.net 擷取移動手機號碼介面
獲得國內手機號碼歸屬地省份、地區和手機卡類型資訊
輸入參數:mobilecode = 字串(手機號碼,最少前7位元字),userid = 字串(商業使用者id) 免費使用者為空白字串;返回資料:字串(手機號碼:省份 城市 手機卡類型)。
soap 1.1
以下是 soap 1.2 請求和響應樣本。所顯示的預留位置需替換為實際值。
post /webservices/mobilecodews.asmx http/1.1
host: webservice.webxml.com.cn
content-type: text/xml; charset=utf-8
content-length: length
soapaction: "http://webxml.com.cn/getmobilecodeinfo"
<?xml version="1.0" encoding="utf-8"?>
<soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<getmobilecodeinfo xmlns="http://webxml.com.cn/">
<mobilecode>string</mobilecode>
<userid>string</userid>
</getmobilecodeinfo>
</soap:body>
</soap:envelope>
http/1.1 200 ok
content-type: text/xml; charset=utf-8
content-length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:body>
<getmobilecodeinforesponse xmlns="http://webxml.com.cn/">
<getmobilecodeinforesult>string</getmobilecodeinforesult>
</getmobilecodeinforesponse>
</soap:body>
</soap:envelope>
soap 1.2
以下是 soap 1.2 請求和響應樣本。所顯示的預留位置需替換為實際值。
post /webservices/mobilecodews.asmx http/1.1
host: webservice.webxml.com.cn
content-type: application/soap+xml; charset=utf-8
content-length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:body>
<getmobilecodeinfo xmlns="http://webxml.com.cn/">
<mobilecode>string</mobilecode>
<userid>string</userid>
</getmobilecodeinfo>
</soap12:body>
</soap12:envelope>
http/1.1 200 ok
content-type: application/soap+xml; charset=utf-8
content-length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:body>
<getmobilecodeinforesponse xmlns="http://webxml.com.cn/">
<getmobilecodeinforesult>string</getmobilecodeinforesult>
</getmobilecodeinforesponse>
</soap12:body>
</soap12:envelope>
http get
以下是 http get 請求和響應樣本。所顯示的預留位置需替換為實際值。
get /webservices/mobilecodews.asmx/getmobilecodeinfo?mobilecode=string&userid=string http/1.1
host: webservice.webxml.com.cn
http/1.1 200 ok
content-type: text/xml; charset=utf-8
content-length: length
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://webxml.com.cn/">string</string>
http post
以下是 http post 請求和響應樣本。所顯示的預留位置需替換為實際值。
post /webservices/mobilecodews.asmx/getmobilecodeinfo http/1.1
host: webservice.webxml.com.cn
content-type: application/x-www-form-urlencoded
content-length: length
mobilecode=string&userid=string
http/1.1 200 ok
content-type: text/xml; charset=utf-8
content-length: length
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://webxml.com.cn/">string</string>