我正在调用一个文档网络服务,我从一个简单的代码开始:
from suds.client import Client #@UnresolvedImport
from suds.transport.https import HttpAuthenticated
import urllib2
t=HttpAuthenticated(username='x', password='x')
t.handler = urllib2.HTTPBasicAuthHandler(t.pm)
t.urlopener = urllib2.build_opener(t.handler)
url = 'http://hudt17:8888/services/core/ObjectService?wsdl'
client = Client(url,transport=t)
print client
如果url='http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl'
. 但如果不是,我会将此错误返回给我:
https://docs.google.com/document/pub?id=1Qk8_qji385B9fZB-z4eMbPc1fv1AXVKEtbxr7Xx6AvQ
这里发生了什么?