2
我已經爲一段工作精細的簡單web服務泡沫客戶端。不過,我現在越來越「urllib2.URLError:」每當我運行它。請注意,我可以成功地ping遠程主機,也可以遠程登錄遠程主機端口上。什麼是我可以檢查解決這個問題的一些事情?下面是我的代碼片段:URLError:<的urlopen錯誤[錯誤111]連接被拒絕>的Python
from suds.client import Client
from suds.wsse import *
security = Security()
token = UsernameToken('user', 'pass')
token.setnonce()
token.setcreated()
security.tokens.append(token)
def func():
someVar = '2222222'
try:
url ='http://IP:Port/SomeWebServices/service?wsdl'
client = Client(url)
return client.service.SomeMeth(someVat)
except Exception,x:
raise x
if __name__ == '__main__':
response = func()
print response['responseCode']
print response['balance']
偉大的東西@kumar_v。它的工作,非常感謝。 – user3473526
@ user3473526。我沒有回答你的問題。我剛剛編輯了這個答案。 –
@EdmundChi榮譽給你 – user3473526