最近做一个关于数据对接的东西,对方提供的是一个asmx的webservice接口(恶心的是只有soap访问方式,没有http方式),各种碰壁之后,一个偶然的机会终于解决,这里记录下解决方式和例子,便于日后查看和他人参考。
范例webservice:http://api.xunns.com/Service.asmx
webservice方法:GetWhoisHistory
对应的wsdl:http://api.xunns.com/Service.asmx?wsdl
返回说明:
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length:
length
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
string
从返回的说明中可以看出,返回的是一个自定义复杂类型(complexType)的数据集