RosesDurden / pysimplesoap

Automatically exported from code.google.com/p/pysimplesoap
0 stars 0 forks source link

Not able to parse ONVIF WSDL #123

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
CODE:

from pysimplesoap.client import SoapClient

wsdl = "http://www.onvif.org/onvif/ver10/device/wsdl/devicemgmt.wsdl"
client = SoapClient(wsdl=wsdl)

print client

OUTPUT:

Traceback (most recent call last):
  File "testPython01.py", line 4, in <module>
    client = SoapClient(wsdl=wsdl)
  File "/usr/local/lib/python2.7/dist-packages/pysimplesoap/client.py", line 133, in __init__
    self.services = wsdl and self.wsdl_parse(wsdl, cache=cache)
  File "/usr/local/lib/python2.7/dist-packages/pysimplesoap/client.py", line 493, in wsdl_parse
    for service in wsdl.service:
  File "/usr/local/lib/python2.7/dist-packages/pysimplesoap/simplexml.py", line 374, in __getattr__
    return self.__call__(tag)
  File "/usr/local/lib/python2.7/dist-packages/pysimplesoap/simplexml.py", line 370, in __call__
    raise AttributeError("Tag not found: %s (%s)" % (tag, e))
AttributeError: Tag not found: service (No elements found)

Original issue reported on code.google.com by andrea.g...@gmail.com on 29 Oct 2013 at 1:50

GoogleCodeExporter commented 8 years ago
The latest version is currently 1.11 (wsdl support was enhanced and this issue 
should be addressed), please download it from the repo:

https://github.com/pysimplesoap/pysimplesoap/archive/master.zip

Let us know if your issue is fixed 

Original comment by reingart@gmail.com on 20 Dec 2013 at 8:03

GoogleCodeExporter commented 8 years ago
I am not the original poster, but I get exactly the same problem with 1.11:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PySimpleSOAP-1.11-py2.7.egg/pysimplesoap/client.py", line 159, in __init__
    self.services = wsdl and self.wsdl_parse(wsdl, cache=cache)
  File "/usr/local/lib/python2.7/dist-packages/PySimpleSOAP-1.11-py2.7.egg/pysimplesoap/client.py", line 547, in wsdl_parse
    for service in wsdl.service:
  File "/usr/local/lib/python2.7/dist-packages/PySimpleSOAP-1.11-py2.7.egg/pysimplesoap/simplexml.py", line 239, in __getattr__
    return self.__call__(tag)
  File "/usr/local/lib/python2.7/dist-packages/PySimpleSOAP-1.11-py2.7.egg/pysimplesoap/simplexml.py", line 235, in __call__
    raise AttributeError("Tag not found: %s (%s)" % (tag, e))
AttributeError: Tag not found: service (No elements found)

You can easily reproduce it yourself with the code from the original poster.

Original comment by jan.pers...@gmail.com on 14 Jan 2014 at 10:10

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 5119af745c4a.

Original comment by reingart@gmail.com on 21 Jan 2014 at 6:54

GoogleCodeExporter commented 8 years ago
Could you try the latest source code from the repository? (1.12)

It should be fixed in rev 5119af745c4a , but you'll need to test the methods

Original comment by reingart@gmail.com on 21 Jan 2014 at 7:01