0

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.

Zeinab Abbasimazar
  • 9,835
  • 23
  • 82
  • 131
  • What is the version of your wsdl? – Elektroi Jul 10 '17 at 10:17
  • @Elektroi what do you mean? How should I get that? – Zeinab Abbasimazar Jul 10 '17 at 10:50
  • The Wsdl file has a version, it was at the start of the wsdl file. The latest soap version is 1.2 and in ZSI documentations put that ZSI is for 1.1 soap version – Elektroi Jul 10 '17 at 11:00
  • @Elektroi if you mean XML version, it is `1.0`; there is no other version in my WSDL file; besides I think there is a problem in the lib, because when I call `wsdl2dispatch` with no argument, it returns the same exception. – Zeinab Abbasimazar Jul 10 '17 at 11:08
  • Look at [https://www.w3.org/TR/soap12/](https://www.w3.org/TR/soap12/) – Elektroi Jul 10 '17 at 11:23
  • @Elektroi, well according to `xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"` in my WSDL file and [this answer](https://stackoverflow.com/questions/736845/can-a-wsdl-indicate-the-soap-version-1-1-or-1-2-of-the-web-service?answertab=active#tab-top), I use SOAP version 1.1. – Zeinab Abbasimazar Jul 10 '17 at 11:45

0 Answers0