kartagis / pysimplesoap

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

Unable to use Netsuite WSDL #49

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
>> import pysimplesoap.client
>> WSDL = 'https://webservices.netsuite.com/wsdl/v2011_2_0/netsuite.wsdl'
>> cl = pysimplesoap.client.SoapClient(wsdl=WSDL, timeout=None)

What is the expected output? What do you see instead?
The last call fails with:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "c:\pypy-1.7\site-packages\pysimplesoap\client.py", line 109, in __init__
    self.services = wsdl and self.wsdl_parse(wsdl, debug=trace, cache=cache)
  File "c:\pypy-1.7\site-packages\pysimplesoap\client.py", line 638, in wsdl_parse
    preprocess_schema(schema)
  File "c:\pypy-1.7\site-packages\pysimplesoap\client.py", line 592, in preprocess_schema
    preprocess_schema(imported_schema)
  File "c:\pypy-1.7\site-packages\pysimplesoap\client.py", line 592, in preprocess_schema
    preprocess_schema(imported_schema)
  File "c:\pypy-1.7\site-packages\pysimplesoap\client.py", line 576, in preprocess_schema
    for element in schema.children():
TypeError: 'NoneType' object is not iterable

What version of the product are you using? On what operating system?
Using:
* Windows XP SP3
* Python 2.7
* pysimplesoap rev 127
* httplib2 v0.7.2

Original issue reported on code.google.com by BahejlB...@gmail.com on 6 Feb 2012 at 7:44

GoogleCodeExporter commented 8 years ago
The reported traceback is with pypy, but I have the same problem when using 
CPython 2.7:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "c:\Python27\lib\site-packages\pysimplesoap\client.py", line 109, in __init__
    self.services = wsdl and self.wsdl_parse(wsdl, debug=trace, cache=cache)
  File "c:\Python27\lib\site-packages\pysimplesoap\client.py", line 638, in wsdl_parse
    preprocess_schema(schema)
  File "c:\Python27\lib\site-packages\pysimplesoap\client.py", line 592, in preprocess_schema
    preprocess_schema(imported_schema)
  File "c:\Python27\lib\site-packages\pysimplesoap\client.py", line 592, in preprocess_schema
    preprocess_schema(imported_schema)
  File "c:\Python27\lib\site-packages\pysimplesoap\client.py", line 576, in preprocess_schema
    for element in schema.children():
TypeError: 'NoneType' object is not iterable

Original comment by BahejlB...@gmail.com on 6 Feb 2012 at 7:51

GoogleCodeExporter commented 8 years ago
It seems that a imported schema is empty and there are other problems in 
messages whose do not follow standard conventions required for this library.

I've tried to patch them, attaches is a client.py with a tentative fixe, could 
you test it?

Original comment by reingart@gmail.com on 7 Feb 2012 at 8:53

Attachments:

GoogleCodeExporter commented 8 years ago
Yes, this appears to work with the new client.py.  I'm trying to migrate from 
suds right now -- the suds client uses ~900MB memory and ~20 minutes to parse 
the NetSuite wsdl.  With this client.py file, pysimplesoap uses 25 MB memory 
and parses the wsdl in ~10 seconds!

Original comment by BahejlB...@gmail.com on 7 Feb 2012 at 9:47

GoogleCodeExporter commented 8 years ago
close?

Original comment by oczk...@gmail.com on 17 Aug 2013 at 7:59

GoogleCodeExporter commented 8 years ago
The reported error is fixed but I don't have test data (and it seems to return 
a 304 status)

Addeded a basic test in revision 1aa63f13ef54

Original comment by reingart@gmail.com on 22 Jan 2014 at 2:55