我通过学习Flask Web(就是封面是一条狗的那本书)构建了一个网站,在登录页面需要调用WebService提供的接口,我们这边的另一个开发人员给了我一个WebService的接口让我调用,但我不知道怎么调用,希望大家帮我看一下,下面的数据如何通过Python调用。
以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。
POST /MemberService.asmx HTTP/1.1
Host: 114.55.172.*
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.*.com/MemberLogin"
<?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>
<MemberLogin xmlns="http://www.*.com/">
<sCondition>string</sCondition>
<sPassword>string</sPassword>
</MemberLogin>
</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>
<MemberLoginResponse xmlns="http://www.*.com/">
<MemberLoginResult>
<MebID>int</MebID>
<CreateTime>dateTime</CreateTime>
<State>NotActive or Active or Vain</State>
<StayPlaceID>int</StayPlaceID>
<MebTypeName>string</MebTypeName>
<SellerName>string</SellerName>
</MemberLoginResult>
</MemberLoginResponse>
</soap:Body>
</soap:Envelope>