wsdl2dispatch raises exception while generating server file
Asked Answered
P

0

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.

Pimento answered 9/7, 2017 at 12:45 Comment(6)
What is the version of your wsdl?Microcopy
@Microcopy what do you mean? How should I get that?Pimento
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 versionMicrocopy
@Microcopy 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.Pimento
Look at https://www.w3.org/TR/soap12/Microcopy
@Elektroi, well according to xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" in my WSDL file and this answer, I use SOAP version 1.1.Pimento

© 2022 - 2024 — McMap. All rights reserved.