[Zope] How do I form an XML-RPC query to a remote server?

Michel Pelletier michel@digicool.com
Wed, 15 Nov 2000 09:58:08 -0800


Tony McDonald wrote:
> 
> Hi all,
> I'm experimenting with collating data from a remote database that uses
> XML-RPC.
> 
> I can send it messages like;
> >>> import xmlrpclib
> >>> medweb = xmlrpclib.Server("http://bogus.server.com")
> >>> medweb.getImages('scar')
> '<?xml version="1.0" encoding="ISO-8859-1"
> ?>\015\012\011<data>\015\012\011\011<title>Medwebb Images</title> \0
> 
> (lots of stuff snipped)
> 
> But I just can't figure out how to send the XML version of the same query,
> ie
> <?XML VERSION="1.0"?>
> <methodCall>
>     <methodName>getimages</methodName>
>     <params>
>         <param>
>             <value><string>scar</string></value>
>             </param>
>         </params>
>     </methodCall>
> 
> to the server.

How does it fail?  Did you set the right content type (text/xml I
think?)?

Why do you want to send a hand built query to the server?  That's what
xmlrpclib is for.

-Michel

> I've got a nasty feeling that when I get told how to do this, I'm going to
> slap my forehead bloody hard....

Do what I do, where a helmet to work.