職場では、Channel Advisor API ソースにアクセスして作業する必要があります。
私は簡単なことを実行しようとしていますOrderService
from suds.client import Client
wsdl_url = 'https://api.channeladvisor.com/ChannelAdvisorAPI/v6/OrderService.asmx?WSDL'
service_url = 'https://api.channeladvisor.com/ChannelAdvisorAPI/v6/OrderService.asmx'
headers = {'Content-Type': 'text/xml; charset=utf-8'}
client = Client(wsdl_url, location = service_url, headers=headers)
エラーは次のとおりです。
Traceback (most recent call last):
File "test_suds.py", line 9, in <module>
client = Client(wsdl_url, location = service_url, headers=headers)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/client.py", line 112, in __init__
self.wsdl = reader.open(url)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/reader.py", line 152, in open
d = self.fn(url, self.options)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/wsdl.py", line 136, in __init__
d = reader.open(url)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/reader.py", line 79, in open
d = self.download(url)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/reader.py", line 95, in download
fp = self.options.transport.open(Request(url))
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/transport/https.py", line 60, in open
return HttpTransport.open(self, request)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/transport/http.py", line 62, in open
return self.u2open(u2request)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/suds-0.4.1-py2.7.egg/suds/transport/http.py", line 118, in u2open
return url.open(u2request, timeout=tm)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno 54] Connection reset by peer>