2013-03-04 109 views
0

我在GAE python中使用SUDS WSDL(SOAP)Web服務。SUDS SOAP「dependancies suds.TypeNotFound:找不到類型」錯誤

&試圖消耗此46.51.221.138/PBExternalServices/v1/soap?wsdl

這裏是PY代碼

from suds.client import Client 
client = Client(url) 
print client 

但其在控制檯如拋出一些錯誤,

Traceback (most recent call last): 
    File "soap.py", line 14, in <module> 
    client = Client(url) 
     File "build\bdist.win32\egg\suds\client.py", line 112, in __init__ 
     File "build\bdist.win32\egg\suds\reader.py", line 152, in open 
     File "build\bdist.win32\egg\suds\wsdl.py", line 159, in __init__ 
     File "build\bdist.win32\egg\suds\wsdl.py", line 220, in build_schema 
     File "build\bdist.win32\egg\suds\xsd\schema.py", line 95, in load 
     File "build\bdist.win32\egg\suds\xsd\schema.py", line 323, in dereference 
     File "build\bdist.win32\egg\suds\xsd\sxbasic.py", line 469, in dependencies 
    suds.TypeNotFound: Type not found: '(GetAccountBalanceFaultResponse, http://www. 
    payback.net/lmsglobal/xsd/v1/types,)' 

注:我看了一些地方需要使用suds.xsd.doctor因爲這個WSDL似乎以不同的方式打破了,但不幸的是我不知道如何在這裏使用這個suds.xsd.doctor

所以我們之中有人在&被問題解決之前有過這個問題嗎?那麼請建議適當的解決方案來解決問題。

暖Regrads,

NIKS

回答

1

對我來說,以下工作:

from suds.client import Client 
wsdl_url = 'http://46.51.221.138/PBExternalServices/v1/soap?wsdl' 
client = Client(wsdl_url, autoblend=True)