Menu

#197 xsd:import empty namespace

v2.1
open
wstools (22)
5
2007-04-05
2007-04-05
No

From: rune.froysa@usit.uio.no
Subject: [Pywebsvcs-talk] wsdl2py has problems with service
Date: March 30, 2007 1:31:43 AM PDT
To: pywebsvcs-talk@lists.sourceforge.net

I have a service that WSDL2Java from axis apears to handle properly,
while wsdl2py from ZSI-2.0 crashes:

~@dresden> /site/bin/wsdl2py -bu http://folk.uio.no/runefro/tmp/Services.asmx.WSDL
Traceback (most recent call last):
...
File "/site/lib/python2.4/site-packages/ZSI/wstools/XMLSchema.py", line 1287, in fromDom
if self.attributes['namespace'] == self.getTargetNamespace():
KeyError: 'namespace'

The problem apears to be that it does not cope with the line:
<s:import schemaLocation="http://folk.uio.no/runefro/tmp/ThemeData.asmx.WSDL" />

Replacing this line with the contents of the refered file apears to
work, but alas:

~@dresden> python
Python 2.4.4 (#1, Oct 31 2006, 12:05:40)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-56)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from Services_services import *
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "Services_services.py", line 612, in ?
FunctionHandlerSoapIn = ns0.FunctionHandler_Dec().pyclass
File "Services_services_types.py", line 476, in __init__
TClist = [ZSI.TC.String(pname=(ns,"SessionID"), aname="_SessionID", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), ZSI.TC.String(pname=(ns,"Name"), aname="_Name", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded")), self.__class__.ds_Dec(minOccurs=0, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), GTD("http://www.gecko.no/ephorte/webservices/","ArrayOfAnyType",lazy=False)(pname=(ns,"Args"), aname="_Args", minOccurs=0, maxOccurs=1, nillable=False, typed=False, encoded=kw.get("encoded"))]
File "Services_services_types.py", line 500, in __init__
TClist = [GED("http://www.w3.org/2001/XMLSchema","schema",lazy=False, isref=True)(minOccurs=1, maxOccurs=1, nillable=False, encoded=kw.get("encoded")), ZSI.TC.AnyElement(aname="_any", minOccurs=1, maxOccurs=1, nillable=False, processContents="strict")]
TypeError: 'NoneType' object is not callable

Any hints on how to handle this would be apreciated

--
Rune Frøysa

Discussion


Log in to post a comment.