Re: [Rslib-talk] Type token in namespace http://www.w3.org/2001/XMLSchema not found
Status: Alpha
Brought to you by:
gweis
|
From: Gerhard W. <ger...@gm...> - 2009-08-26 06:19:47
|
Hi Nathan,
I oversaw one of your questions :)
>
> Incidently, would it be possible to monkey-patch this -- for
> example, if another type was missing or (heaven forbid) someone
> referenced a non-standard xsd type in their WSDL?
Normally I'd consider a service with such a WSDL as broken,
unfortunately there are a lot of broken WSDLs out there.
I think the simples thing to do in such a case is to add a similar
definition for such types directly into the xsd-instance just like you
did it with xsd:token.
(just choose or implement a suitable alternative for AnySimpleType if
you need something different.)
The standard xsd-schema should be accessible via the global schema
manager (see rsl/xsd/manager.py and somewhere should be code how to
access it, but as a quick fix you can access it directly there.)
from rsl.xsd.manager import GLOBALSCHEMAMANAGER
xsd = GLOBALSCHEMAMANAGER.getSchema('http://www.w3.org/2001/XMLSchema')
xsd.types['.....'] = AnySimpleType(......)
the thing with accessing the GLOBALSCHEMAMANAGER directly will also go
away in rsl.xsd >= 0.3 (zope's AdapterFactory will make this a lot
easier)
cheers,
Gerhard
|