I have a twisted web server running using "twisted.web.http".

The objective of the server is to convert files to another format. Currently I upload the files and the conversion params using an HTTP POST from a form.

Now I want to add XML-RPC support to the conversion process. It means the user could process the conversion using the http form or calling directly the XML-RPC class.

This is my pages dispatch:

class MyRequestHandler(http.Request):

    pages = { '/' : loginPage,
                     '/uploadHandler' : handleUpload,
                     '/uploadform' : uploadForm,
                     '/xmlrpc_converter': MyConverterXMLRPCClass() }

What I want to do is offer the user two possibilities to upload the file, one of them using HTTP POST (calling to "uploadform") and the other using XML-RPC (caling to xmlrpc_converter).

I have tried to implement MyConverterXMLRPCClass() as follows:

    def __init(self):

    def xmlrpc_mymethod1(self, param)
        """My process""

But It down't work, when I try http://localhost:8000/xmlrpc_converter I get the following error:

"MyConverterXMLRPCClass instance has no __call__ method"
How can I call MyConverterXMLRPCClass from an url in my http server?

Thank you.

Daniel de la Cuesta Navarrete
Técnico de Desarrollo de Software

Tel. 951 015 300

Este correo electrónico y, en su caso, cualquier fichero anexo, contiene información confidencial exclusivamente dirigida a su(s) destinatario(s). Toda copia o divulgación deberá ser autorizada por IAVANTE.

This e-mail and any attachments are confidential and exclusively directed to its adressee(s). Any copy or distribution will have to be authorized by IAVANTE.