From: Jim G <jim...@gm...> - 2011-11-28 15:31:08
|
Hi, PIP delivers the 2.0rc3 version, that looks like not as stable than 2.0 or 2.1_a1. pip install ZSI Downloading/unpacking ZSI Downloading ZSI-2.0-rc3.tar.gz (1.1Mb): 1.1Mb downloaded I got this bug with ServiceProxy: python VersionService_client_no_wsdl2py_proxy.py Help on instance of MethodProxy in module ZSI.ServiceProxy: getVersion = class MethodProxy | Methods defined here: | | __call__(self, *args, **kwargs) | | __init__(self, parent, callinfo) None Traceback (most recent call last): File "VersionService_client_no_wsdl2py_proxy.py", line 21, in <module> service.getVersion() File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 305, in __call__ return self.parent()._call(self.__name__, *args, **kwargs) File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 97, in _call request, response = self._getTypeCodes(callinfo) File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 124, in _getTypeCodes replyTC = self._getTypeCode(parameters=callinfo.getOutParameters(), literal=(callinfo.use=='literal')) File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 156, in _getTypeCode tc = self._getElement(element, literal=literal, local=False, namespaceURI=namespaceURI) File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 232, in _getElement typeObj = self._getType(tp, elementName, literal, local, namespaceURI) File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 281, in _getType self._globalElement(tc, namespaceURI=namespaceURI, literal=literal) File "C:\Python27\lib\site-packages\ZSI\ServiceProxy.py", line 178, in _globalElement %{'prefix':self._getPrefix(namespaceURI), 'name':typeCode.oname, 'namespaceURI':namespaceURI} AttributeError: Struct instance has no attribute 'oname' Sources: VersionService_client_no_wsdl2py_proxy.py import sys from ZSI.auth import AUTH from ZSI import ServiceProxy from ZSI.client import Binding from ZSI import TC myurl='VersionService.wsdl' kw = {'tracefile': sys.stdout} service = ServiceProxy.ServiceProxy( wsdl=myurl, service='VersionService', port='VersionServiceHttpSoap11Endpoint', **kw) ret = service.getVersion() I could fix it with: diff ZSI-2.0-rc3/ZSI/ServiceProxy.py /cygdrive/c/Python27/Lib/site-packages/ZSI/ServiceProxy.py 178c178 < %{'prefix':self._getPrefix(namespaceURI), 'name':typeCode.oname, 'namespaceURI':namespaceURI} --- > %{'prefix':self._getPrefix(namespaceURI), 'name':typeCode.aname, 'namespaceURI':namespaceURI} 233,234c233 < < minOccurs = int(element.getAttribute('minOccurs')) --- > minOccurs = int(element.getAttribute('minOccurs')) if element.getAttribute('minOccurs') is not None else 0 238c237 < maxOccurs = element.getAttribute('maxOccurs') --- > maxOccurs = int(element.getAttribute('maxOccurs')) if element.getAttribute('minOccurs') is not None else 0 Anyway, it looks like better to distribute the last version via pip. |