我在Linux Slackware 13.0上使用python 2.6.2运行SUDS 0.4.当我使用此代码调用SOAP方法时:
from suds.client import Client
client = Client(url='file:acctWeb.wsdl',
location='http://10.242.69.4:8088/pfmaccess')
res = client.service.login(login='user',password='passwd')
Run Code Online (Sandbox Code Playgroud)
我收到以下回复:
DEBUG:suds.transport.http:received:
CODE: 200
HEADERS: {'set-cookie': 'OSP_Ref=0000000573800052;Domain=10.242.69.4:8088;Path=/pfmaccess', 'content-length': '26541', 'content-type': 'text/xml; charset=utf-8', 'connection': 'close', 'server': 'Alcatel-Lucent OSP 2.4'}
Run Code Online (Sandbox Code Playgroud)
但
>>> client.options.transport.cookiejar
<cookielib.CookieJar[]>
Run Code Online (Sandbox Code Playgroud)
表明没有可用的cookie.可能是什么原因?我无法使用SOAP API,因为我需要传递响应cookie中发送的凭据.
请帮帮我.
BR
rjan