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 05:06:14
|
Hi Nathan, > That did it! I can't say I called the service successfully, but at > least I'm past that error. Now it's just a matter of figuring out > how to form the other parameters to make the server happy -- > fortunately it provides fairly descriptive error strings. so far good to hear :) > > Would a complete fix also include adding the same line to > createCSD99Schema? Yes, but I have not seen a service which uses the old xml-schema name- space for a long time. Basically it is just there to satisfy my tests. > Thanks. I'm doing for a client, so that would be very helpful. You're welcome. > > 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? I'll go through the list of xsd-types and will add them. Derived types from other name-spaces should be created automatically. It's just the the types defined in xml-schema which need to be registered there. I know it is not a very clean solution, but as xsd is defined by itself I could not think of an easy solution to overcome this issue. > > I'm curious what your plans are for expanding this in the future -- > or, actually, the type system in general. It would be nice, for > example, to be able to work with types defined in the schema as > python classes. I'd like to get your thoughts on the feasibility of > dynamically generating python classes from schemas. If you are really curious on reading a bit of python code you can have a look into the source-repository (http://hg.proclos.com/rslib) or specifically for the rsl.xsd package: http://hg.proclos.com/rslib/rsl.xsd/ ... I did already quite a bit of work on the br-0.3-dev branch. The idea behind is, to use parts of the zope component architecture (I think this will be just the zope.interface package) to make the whole type-system pluggable. The main goals of this branch are to allow custom python classes to be used, with rsl.xsd. Basically you'll need to register an adapter which does a simple transformation from a python object to an representation which rsl.xsd understands (currently simple dictionaries)..... An additional goal is that custom python classes should be completely unaware of such a transformation makeing it easier to include third party code. (that's why I am using zope.interface and adaptation). Furthermore the br-03.dev implementation supports a lot more features of xml-schema, like xsd:groups etc. It also does a better job in type conversion regarding string formatting for the xml-representation and respects various xsd:facets defined in an xml-schema. Unfortunately I have not had much time lately to work on it, but I think it is rather close to be finished for a first release. (At least it should provide the same amount of functionality as the 0.2.x release series before I make a release). I also plan to refactor all the other rsl.xxx parts to use zope.interface and adaption, which should make it much easier to customise various aspect of the library. Regarding dynamically generated python classes: Personally I am not a fan of dynamically generated classes. However, the rsl.xsd 0.3 branch should make it rather easy to add a separate package supporting this use case, or generate python code or whatever. For instance I could imagine to add an adapter for various xsd:types which generates classes on the fly. So I won't ignore dynamic class creation/code creation, but I think I won't create such a package by myself. If someone wants to do it, I can definitely provide help on how to use rsl.xsd, but my main priority is to move the whole rsl- stuff up to the rsl.xsd 0.3 branch. And stabilise the whole thing. Another thing which I want to do before I think of class/code creation, is to add support for WSDL2 and some additional WS-X standards like WS-Addressing and WS-Security etc.... Cheers, Gerhard Don't hesitate to ask if you have any further problems or suggestions :) |