当前位置:编程学习 > C#/ASP.NET >>

asp.net 获取移动手机号码接口

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>

补充:asp.net教程,.Net开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,