kartagis / pysimplesoap

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

Some calls throw "TypeError: Tag: schema invalid (type not found)" #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use the WSDL of some WebsitePanel 2.0 Service (esPackages.asmx in my case)
2. call (for example) AddPackage
3. watch it happen.

What is the expected output? What do you see instead?
It should output the Integer "0". Instead I get TypeError(u"Tag: %s invalid 
(type not found)" % (name,))

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

This happens on a number of functions in this WSDL, not only AddPackage.

Original issue reported on code.google.com by FFHe...@gmail.com on 14 Feb 2013 at 3:08

GoogleCodeExporter commented 8 years ago
This is the output XML which can't be processed

Original comment by FFHe...@gmail.com on 14 Feb 2013 at 3:31

Attachments:

GoogleCodeExporter commented 8 years ago
Can you provide sample code to reproduce the issue?

Original comment by reingart@gmail.com on 14 Feb 2013 at 7:57

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
the wsdl_file is attached, I'm calling:

>>> client = SoapClient(wsdl=wsdl_file, trace=True)
>>> client.AddPackage(657, 33, 'Services', 'Comment', 1, datetime.now())

which produces the output.xml.txt attached to my previous comment. I attached a 
complete trace, hope that helps.

Original comment by FFHe...@gmail.com on 15 Feb 2013 at 7:46

Attachments:

GoogleCodeExporter commented 8 years ago
If I set strict=False in line 420 in simplexml.py, everything works. Could you 
provide a way to set strict=False via SoapClient?

Original comment by FFHe...@gmail.com on 15 Feb 2013 at 9:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
After setting strict=False I get simple answers parsed correctly. But some more 
complicated responses return only some None values like:

{'GetHostingPlanQuotasResult': {'diffgram': None, 'schema': None}}

with the xml-output showing LOTS of data.
Please find attached the full response-xml

Original comment by FFHe...@gmail.com on 18 Feb 2013 at 3:36

Attachments:

GoogleCodeExporter commented 8 years ago
It seems to be defining elements dynamically in the response, look at 
<xs:schema id="NewDataSet" in SOAP Body ...

This is not supported right now in pysimplesoap, all schema definition should 
be in the wsdl.

As a workaround, you could evaluate raw responses:

http://code.google.com/p/pysimplesoap/wiki/SoapClient#Raw_example

For example (untested): 

response = SimpleXMLElement(client.xml_response) 
for table in response("NewDataSet"):
   print int(table("GroupID"))
   print int(table("GroupName"))

For more info about XML manipulation, see:

http://code.google.com/p/pysimplesoap/wiki/SimpleXmlElement

If you can, please attach a full .py working sample so it is easier to test and 
suggest fixes.

In this cases, I could offer commercial support for this kind of issues, as 
they could need more prioritary dedication.

Original comment by reingart@gmail.com on 18 Feb 2013 at 5:29

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

Original comment by reingart@gmail.com on 22 Jan 2014 at 4:26

GoogleCodeExporter commented 8 years ago
The error is now fixed in the latest developement version 1.12

Please download and test the latest source code from the repository until the 
release:

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

Added a test with some explanation in revision 71a6c4b47622

Original comment by reingart@gmail.com on 22 Jan 2014 at 4:28

GoogleCodeExporter commented 8 years ago
Hi, I am still getting the same error with version 1.14. 
I set strict=False and it generated None fields too.
I attach sample code.
Could you please help me to fix this?
Thanks.

Original comment by gabriels...@gmail.com on 24 Jun 2014 at 12:11

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry, but I don't see the error.
Also, this issue is closed (and it was related to other webservice).

Could you please elaborate and open a new issue (attaching some sample code and 
the wsdl)?

Original comment by reingart@gmail.com on 24 Jun 2014 at 6:29

GoogleCodeExporter commented 8 years ago
Same problem with Version 1.14 - not in Version 1.10.
See also https://code.google.com/p/pysimplesoap/issues/detail?id=150

Original comment by karsten....@gmail.com on 23 Jul 2014 at 12:51

GoogleCodeExporter commented 8 years ago
Ok, thanks, will continue to work on issue #150, please add any new info there 
if you can.

Original comment by reingart@gmail.com on 23 Jul 2014 at 9:02