Python SOAP与持久性

Python SOAP与持久性,python,web-services,cookies,soap,Python,Web Services,Cookies,Soap,我正在使用python和SudsSOAP客户端编写自动交易机器人 我想知道是否有可能通过使用持久的SOAP调用来提高速度(比如在RESTful服务中使用会话) 以下是我的请求: DEBUG:suds.client:sending to (http://api.betdaq.com/v2.0/ReadOnlyService.asmx) message: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:

我正在使用python和SudsSOAP客户端编写自动交易机器人

我想知道是否有可能通过使用持久的SOAP调用来提高速度(比如在RESTful服务中使用会话)

以下是我的请求:

DEBUG:suds.client:sending to (http://api.betdaq.com/v2.0/ReadOnlyService.asmx)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://www.GlobalBettingExchange.com/ExternalAPI/" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:None="http://www.GlobalBettingExchange.com/ExternalAPI/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
      <ns0:ExternalApiHeader xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/" version="2" languageCode="en" username="****" password="****" applicationIdentifier="***"/>
   </SOAP-ENV:Header>
   <ns1:Body>
      <ns0:GetPrices>
         <getPricesRequest xmlns="http://www.GlobalBettingExchange.com/ExternalAPI/" NumberForPricesRequired="1" NumberAgainstPricesRequired="1">
            <MarketIds>9430420</MarketIds>
         </getPricesRequest>
      </ns0:GetPrices>
   </ns1:Body>
</SOAP-ENV:Envelope>
正如您所看到的,我在每个xml请求中使用用户名和密码的标题。但当我得到响应时,标题中没有cookie


我想知道是否有可能在我的请求中插入cookie或类似的东西来实现持久性。(就像在RESTful服务中使用会话一样)

不。服务器响应将决定您的命运,我知道服务器响应不会返回任何cookie

存在一种加速HTTP基本身份验证的极端情况,即启用抢先发送凭据,但不适用


确保重新使用HTTPS连接。

从来没有真正使用过soap,但是您可以看到,+?@Arount响应不会真正返回我可以插入到下一个请求中的任何Cookie。是的,服务器不会返回任何Cookie。我使用同一个客户机对象向服务器发出请求,所以我猜我使用的是持久连接?通常是。那么,允许您进行并行请求吗?好的,确保连接池(如果有)具有足够的连接。
DEBUG:suds.client:headers = {'SOAPAction': u'"http://www.GlobalBettingExchange.com/ExternalAPI/GetPrices"', 'Content-Type': 'text/xml; charset=utf-8'}
DEBUG:suds.client:http succeeded: *long xml here*