문제

I am writing an xmlrpc client which uses a server written in ruby. One of the functions is framework.busy?(). Let me show the ruby version:

server.call( "framework.busy?" )  

So lets assume I create an instance of the ServerProxy class say server. So while using python to call the function busy? I need to use:

server.framework.busy?()  

This leads to an error:

SyntaxError: invalid syntax  

How can I call this function? Or am I reading the ruby code wrong and implementing it wrongly.

도움이 되었습니까?

해결책

I've never had to call XML methods with a question mark in (and I strongly suspect it might actually be outside XML-RPC specs), but try this:

server.framework.getattr('busy?')()

I have no idea of that works, and you would need to post a code example and have a working server I could test against. :)

In any case it's probably not a good idea to have a question mark in the method name, so if you can modify the Ruby server to something more sane, that would be helpful.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top