bufubaoni / pysimplesoap

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

AttributeError: Tag not found: faultstring #140

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

from pysimplesoap.client import SoapClient
client = SoapClient(wsdl=http://url-for-my-service?wsdl')
result = client.StartSession('userid','passwd')

What is the expected output? What do you see instead?

I should get back a session ID but instead I get back the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rksmith/Projects/soap/venv/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 141, in <lambda>
    return lambda *args, **kwargs: self.wsdl_call(attr, *args, **kwargs)
  File "/home/rksmith/Projects/soap/venv/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 285, in wsdl_call
    response = self.call(method, *params)
  File "/home/rksmith/Projects/soap/venv/local/lib/python2.7/site-packages/pysimplesoap/client.py", line 211, in call
    raise SoapFault(response.faultcode, response.faultstring)
  File "/home/rksmith/Projects/soap/venv/local/lib/python2.7/site-packages/pysimplesoap/simplexml.py", line 374, in __getattr__
    return self.__call__(tag)
  File "/home/rksmith/Projects/soap/venv/local/lib/python2.7/site-packages/pysimplesoap/simplexml.py", line 370, in __call__
    raise AttributeError("Tag not found: %s (%s)" % (tag, e))
AttributeError: Tag not found: faultstring (No elements found)

What version of the product are you using? On what operating system?

I am using the latest version installed by pip (1.10) on ubuntu 12.4

Please provide any additional information below.

I think the problem is the wsdl. It comes from a third party product I have no 
control over and it is .NET so the vendor doesn't know how to do anything 
except push buttons in Visual Studio to make anything work. 

Original issue reported on code.google.com by ronsmit...@gmail.com on 3 Apr 2014 at 8:46

Attachments:

GoogleCodeExporter commented 8 years ago
Please test the latest development version from the repository:

https://pysimplesoap.googlecode.com/archive/default.zip

It has many enhancements and fixes for wsdl handling.

As soon as I could fix/update some tests, it will be published as stable 
(including pip package)

Original comment by reingart@gmail.com on 5 Apr 2014 at 2:01

GoogleCodeExporter commented 8 years ago
I'm seeing this error too, however when looking at the server response I can 
see that this error is caused by the server rejecting my request because of an 
invalid or expired security token. Maybe my error should have been caught and 
reported earlier in the code, 

Original comment by berne...@gmail.com on 31 Jul 2014 at 6:02