kartagis / pysimplesoap

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

Exception - Tag not found: types (No elements found) #114

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download code from mercurial
2. Run from Django1.5.1 with code in view.py:
client = SoapClient(wsdl=WSDL_URL, trace=True), WSDL_URL contain attached 
WebRequest.xml file
3. Output:

Traceback:
File 
"/Users/suhanov_v/work/tpsid/python/lib/python2.7/site-packages/django/core/hand
lers/base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "/Users/suhanov_v/work/tpsid/repo/dev/tps/lotus/views.py" in index
  14.     client = SoapClient(wsdl=WSDL_URL, trace=True)
File "/Users/suhanov_v/work/tpsid/repo/dev/utilities/pysimplesoap/client.py" in 
__init__
  145.         self.services = wsdl and self.wsdl_parse(wsdl, cache=cache)
File "/Users/suhanov_v/work/tpsid/repo/dev/utilities/pysimplesoap/client.py" in 
wsdl_parse
  592.         for schema in wsdl.types('schema', ns=xsd_uri):
File "/Users/suhanov_v/work/tpsid/repo/dev/utilities/pysimplesoap/simplexml.py" 
in __getattr__
  238.         return self.__call__(tag)
File "/Users/suhanov_v/work/tpsid/repo/dev/utilities/pysimplesoap/simplexml.py" 
in __call__
  234.             raise AttributeError("Tag not found: %s (%s)" % (tag, e))

Exception Type: AttributeError at /lotus/test
Exception Value: Tag not found: types (No elements found)

Original issue reported on code.google.com by vadimsuh...@gmail.com on 10 Sep 2013 at 3:18

Attachments:

GoogleCodeExporter commented 8 years ago
Your WSDL seems to have missing the wsdl namespaces.
Adding xmlns="http://schemas.xmlsoap.org/wsdl/" should help:

<definitions targetNamespace="urn:DefaultNamespace" 
xmlns="http://schemas.xmlsoap.org/wsdl/">

<message name="CREATEREQUESTResponse">

...

I'll see if there is a workaround to apply in the code, but without proper 
namespaces it is a bit complicated.

Original comment by reingart@gmail.com on 10 Sep 2013 at 6:36

GoogleCodeExporter commented 8 years ago
Hmm, we have changed the wsdl, but it did not work
New wsdl in attach

Exception Value:    

Tag not found: types (No elements found)

Original comment by vadimsuh...@gmail.com on 11 Sep 2013 at 1:33

Attachments:

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

Original comment by reingart@gmail.com on 13 Sep 2013 at 5:13

GoogleCodeExporter commented 8 years ago
Sorry, I misread the first xml.
It seems fine but it has no schema, that's why it was failing.

I've commited a patch for this issue, so it should be fixed in trunk.
Please do:

hg pull
hg update

I'll also add a test case, thanks for reporting this issue.

Original comment by reingart@gmail.com on 13 Sep 2013 at 5:14

GoogleCodeExporter commented 8 years ago
Thank you very much for quick response and fix, its work

Original comment by vadimsuh...@gmail.com on 13 Sep 2013 at 7:48