Hi Jonathan, I wouldn't mind adding support for this input scheme. However, I am afraid that it will be some time before it can be addressed. Also, I prefer not include this in the 2.0 final that I am attempting to ship in the next few weeks. In the meantime, if you'd like to help with the effort to implement this I'd welcome your contribution.
Again, I am sorry that I can't support your use case right now but. I've created the ticket here: https://github.com/soaplib/soaplib/issues#issue/17 . Please take a look at it and comment as you find necessary. I want to make sure that I am capturing your idea correctly. On Tue, Mar 29, 2011 at 6:59 AM, J.Fine <[email protected]> wrote: > Hi > > I wrote some code that seemed to me to be just fine and I got an exception > from soaplib. Just in case you're worried about the code, think about a > situation where the input signature is quite complicated and is stored in > another file, and all you want to do is write a stub function that returns a > fixed value, or a range of fixed values. In this situation you might want to > try different input schemes but for the stub return a fixed value. > > The background to this is that I want to decouple the various aspects of the > information that goes into soaplib so that I have more flexibility. I've had > a look at the source that raises this error. > https://github.com/soaplib/soaplib/blob/1_0/src/soaplib/service.py#L64 > > > Here's the example. > > $ cat examples/woozle.py > from soaplib.service import rpc, DefinitionBase > from soaplib.serializers.primitive import String > from soaplib.wsgi import Application > > > class Tiny(DefinitionBase): > > @rpc(String, _returns=String) > def doit(self, *argv): > return 'this is a string' > > > application = Application([Tiny], 'namespace') > > > $ python examples/woozle.py > Traceback (most recent call last): > File "examples/woozle.py", line 13, in <module> > application = Application([Tiny], 'namespace') > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/wsgi.py", > line 89, in __init__ > self.build_schema() > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/wsgi.py", > line 165, in build_schema > inst = self.get_service(s) > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/wsgi.py", > line 205, in get_service > return service(http_req_env) > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/service.py", > line 260, in __init__ > _public_methods_cache[cls] = self.build_public_methods() > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/service.py", > line 337, in build_public_methods > descriptor = func(_method_descriptor=True, clazz=self.__class__) > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/service.py", > line 124, in explain_method > in_message = get_input_message(ns) > File > "/usr/local/lib/python2.6/dist-packages/soaplib-1.0.0_beta8-py2.6.egg/soaplib/service.py", > line 66, in get_input_message > f.func_name) > Exception: doit has parameter numbers mismatching > > > -- > Jonathan > > > > -- > The Open University is incorporated by Royal Charter (RC 000391), an exempt > charity in England & Wales and a charity registered in Scotland (SC 038302). > > _______________________________________________ > Soap mailing list > [email protected] > http://mail.python.org/mailman/listinfo/soap > _______________________________________________ Soap mailing list [email protected] http://mail.python.org/mailman/listinfo/soap
