Python XML-RPC Server with clientside Javascript

Discussion in 'Javascript' started by akineko, Jul 5, 2008.

  1. akineko

    akineko Guest

    Hello everyone,

    I have used Python SimpleXMLRPCServer to expose several methods to be
    used.
    My Python script creates a free-standing server and not a CGI script.
    I have tested its exposed methods using the following Python script:

    import xmlrpclib
    s = xmlrpclib.ServerProxy('http://localhost:8765')
    print s.my_method()

    I tested all methods one by one and they are working as I intended.

    Now, I want to use those exposed methods from a static html file
    (without any web server) using client side javascript. (i.e. Open
    File... from the browser (or file://...) )

    I found many XML-RPC examples with javascript but all of them I found
    assume XML-RPC services to be deliver from a web server, such as
    Apache, as a CGI.

    I tried those examples with placing 'http://localhost:8765' as url,
    but they didn't work.

    How can I utilize the XML-RPC services from a free-standing
    SimpleXMLRPCServer in a static HTML page?
    Is it possible to do such? Do I need web server to use client-side
    javascript?

    I have searched the Internet for similar questions. I found similar
    postings but there were no clear answers.

    Any suggestions will be highly appreciated.
    Best regards,
    Aki Niimura
    akineko, Jul 5, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Pere Montolio

    XML RPC to ONC XDR RPC

    Pere Montolio, Aug 11, 2004, in forum: XML
    Replies:
    0
    Views:
    695
    Pere Montolio
    Aug 11, 2004
  2. akineko
    Replies:
    2
    Views:
    778
    akineko
    Jul 5, 2008
  3. Ymtrader
    Replies:
    1
    Views:
    568
    Adam Tauno Williams
    Mar 15, 2011
  4. Shirish Joshi

    Ruby and Sun-RPC or ONC-RPC ?

    Shirish Joshi, Apr 7, 2004, in forum: Ruby
    Replies:
    0
    Views:
    171
    Shirish Joshi
    Apr 7, 2004
  5. Vladimir Konrad

    rpc (not xml-rpc)

    Vladimir Konrad, Sep 2, 2005, in forum: Ruby
    Replies:
    5
    Views:
    123
    Austin Ziegler
    Sep 3, 2005
Loading...

Share This Page