Consider the following in a controller:
@service.xmlrpc
def add_record(s):
print s
return s
That will publish an XML method named add_record at this controller's URL.
I need to be able to specify the name of that method. Inside xmlprc.py is
this code:
dispatcher.register_function(method)
If I added a name="log.add_record" to the register_function that would get
me where I need to be.
Unfortunately there can not be a dot (.) in a python method so changing the
controller method doesn't fix my issue. And I really shouldn't change the
code on the XMLRPC client for interoperability issues.
I am not real good with annotations, but it seems this should be easy with
an argument to the @service.xmlrpc??
Also I have another challenge that I may publish separately. The XMLRPC
client is expecting to do the XML interaction at /. Unfortunately that
doesn't work well for web2py and I really don't have a way to change the
connect string in the client. I have been able to make it work with a
redirect in routes.py, but what I would like to do is conditionally rewrite
the connection only if the connection is an RPC request (instead of
rewriting everything). Thoughts on that?
Thanks in advance.
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.