xmlrpc via local proxy

Discussion in 'Python' started by Ben, Nov 2, 2003.

  1. Ben

    Ben Guest

    Hi all,

    I'm trying to connect to URL such as http://betty.userland.com through
    my LAN proxy. I've read earlier postings on this newsgroups but still
    i haven't been able to figure out the way to do it. It doesn't look so
    simple. It's very easy to do it using httplib and urllib but xmlrpc
    looks a bit complicated. Can someone tell me if there is an easy way
    around this problem?

    My code is like this:

    import xmlrpclib

    betty = xmlrpclib.Server("http://betty.userland.com")
    print betty.examples.getStateName(32)

    Thanks
    Ben
    Ben, Nov 2, 2003
    #1
    1. Advertising

  2. "Ben" <> wrote in message
    news:...
    > Hi all,
    >
    > I'm trying to connect to URL such as http://betty.userland.com through
    > my LAN proxy. I've read earlier postings on this newsgroups but still
    > i haven't been able to figure out the way to do it. It doesn't look so
    > simple. It's very easy to do it using httplib and urllib but xmlrpc
    > looks a bit complicated. Can someone tell me if there is an easy way
    > around this problem?
    >
    > My code is like this:
    >
    > import xmlrpclib
    >
    > betty = xmlrpclib.Server("http://betty.userland.com")
    > print betty.examples.getStateName(32)
    >


    Results from pasting exactly this:

    ActivePython 2.3.2 Build 230 (ActiveState Corp.) based on
    Python 2.3.2 (#49, Oct 24 2003, 13:37:57) [MSC v.1200 32 bit (Intel)] on
    win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import xmlrpclib
    >>>
    >>> betty = xmlrpclib.Server("http://betty.userland.com")
    >>> print betty.examples.getStateName(32)

    New York
    >>>



    This is from behind a MonMotha iptables firewall configured with Squid as
    transparent proxy.

    So, it works for me... ;-)

    Emile van Sebille
    Emile van Sebille, Nov 2, 2003
    #2
    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. Replies:
    0
    Views:
    314
  2. Etienne Posthumus
    Replies:
    1
    Views:
    1,094
    Roger Binns
    Apr 1, 2004
  3. Xavier

    proxy for xmlrpc calls

    Xavier, Aug 13, 2006, in forum: Python
    Replies:
    1
    Views:
    312
    Fredrik Lundh
    Aug 14, 2006
  4. Chad Dressler
    Replies:
    0
    Views:
    621
    Chad Dressler
    Dec 30, 2006
  5. Gustavo Rahal
    Replies:
    0
    Views:
    720
    Gustavo Rahal
    Aug 12, 2008
Loading...

Share This Page