Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Example of an XMLRPC client somewhere?

12 views
Skip to first unread message

Helmut Giese

unread,
Mar 31, 2005, 4:29:59 PM3/31/05
to
Hello out there,
I need to send requests via XMLRPC to various machines. This is mostly
:) working, but one server (implemented in java) ignores my requests.
I just discovered that Tcl-SOAP contains an XMLRPC module, but I
haven't been able to find an example of using it. Maybe because it's a
bit late over here - so if you're still fit and know of an example of
its use, any link will be greatly appreciated.
Best regards
Helmut Giese

Emmanuel Frécon

unread,
Apr 1, 2005, 4:08:51 AM4/1/05
to
Declare a tcl proc bound to an XMLRPC remote entry using something like
(extract from some blogging code, I guess you'll understand the
principle without knowing the details of my own code):

XMLRPC::create blog_newMediaObject \
-name "metaWeblog.newMediaObject" \
-proxy $url \
-params { blogid string username string password string file struct }

(the url should be the entry point for all XMLRPC call on the HTTP
remote server).


Use it in the following way later on.

set fileinfo(bits) [encode_file $local_fname]
set fileinfo(name) $remote_fname
if { $type != "" } {
set fileinfo(type) $type
}

::llog::log "Pushing encoded content of \"$local_fname\" to blog" 2
set res [catch [list blog_newMediaObject $blogid $bloguser \
$blogpasswd [array get fileinfo]] answer]
if { $res != 0 } {
::llog::log "Failed posting media object \"$remote_fname\": $answer" 0
} else {
# Do something

Helmut Giese

unread,
Apr 1, 2005, 7:20:35 AM4/1/05
to
On Fri, 01 Apr 2005 11:08:51 +0200, =?ISO-8859-1?Q?Emmanuel_Fr=E9con?=
<emma...@sics.se> wrote:

>Declare a tcl proc bound to an XMLRPC remote entry using something like
>(extract from some blogging code, I guess you'll understand the
>principle without knowing the details of my own code):
>
> XMLRPC::create blog_newMediaObject \
> -name "metaWeblog.newMediaObject" \
> -proxy $url \
> -params { blogid string username string password string file struct }
>
>(the url should be the entry point for all XMLRPC call on the HTTP
>remote server).

Thanks a lot - didn't know it was this easy :)
Cannot test it right now 'cause the server in question is on a local
net at some other place, but I'm optimistic.
Thanks and have a nice weekend
Helmut Giese

0 new messages