wsdl2dispatch raises exception while generating se

2019-09-13 15:49发布

问题:

I want to implement a SOAP web server using python ZSI library. I tried solution described here, but I get exception while using wsdl2dispatch command as described in page 6 of the book:

wsdl2dispatch --extended mywsdl.xml

It raises:

Traceback (most recent call last):
  File "/usr/local/bin/wsdl2dispatch", line 11, in <module>
    load_entry_point('ZSI==2.0rc3', 'console_scripts', 'wsdl2dispatch')()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 561, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2649, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2303, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2313, in resolve
    raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'wsdl2dispatch'

I have added /usr/local/lib/python2.7/dist-packages/ to the system PATH; still no change. Any idea how should I fix this?

Note: There is a workaround described in this answer which was really useful; but it didn't use wsdl2dispatch command.