kartagis / pysimplesoap

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

call() will not accept request with no children #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
from pysimplesoap.client import SoapClient, SimpleXMLElement
req = SimpleXMLElement('<ChildlessRequest date="today"/>')
client = SoapClient(
    location = 'http://localhost',
    trace = True,
    ns = False)
client.call('ChildlessRequest', req)

What is the expected output? What do you see instead?
Expecting a successful call with a childless request, but instead:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Python/2.7/site-packages/pysimplesoap/client.py", line 173, in call
    for param in parameters[0].children():
TypeError: 'NoneType' object is not iterable

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

Latest development version, Python 2.7, OS X

Please provide any additional information below.

Original issue reported on code.google.com by jta...@gmail.com on 18 Apr 2012 at 6:41

GoogleCodeExporter commented 8 years ago
Here's a fix and unit test for the issue.

Original comment by jta...@gmail.com on 18 Apr 2012 at 7:00

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks ! 
I've added you as committer, just in case you want to apply the patch directly 
and close this ticket ;-) 

Original comment by reingart@gmail.com on 18 Apr 2012 at 7:06

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 76759d8099d2.

Original comment by jta...@gmail.com on 18 Apr 2012 at 9:14