[plt-scheme] XMLRPC & drscheme

From: rjyoung at scs.carleton.ca (rjyoung at scs.carleton.ca)
Date: Sun Sep 19 13:34:02 EDT 2004

Hi there,

I'm interested in doing a bit of XMLRPC scripting in drscheme, but am having
problems getting the XMLRPC module I found here
(http://www.jadud.com/people/mcj/links/Code/) to work.  I installed the package,
and wrote the following test program (which tries to call two XMLRPC functions
provided by the website livejournal.)

;; This is a quick test of the scheme XML-RPC toolkit
;; require the xmlrpc scheme module 
(require (lib "xmlrpc.ss" "xmlrpc"))
(read-case-sensitive #t)

(define xmlrpc-server (xml-rpc-server
"http://www.livejournal.com/interface/xmlrpc" ) )

(define lj-get-challenge (xmlrpc-server 'LJ.XMLRPC.getchallenge))
(define lj-get-friends (xmlrpc-server 'LJ.XMLRPC.getfriends))

(define h (make-hash-table 'equal)) (hash-table-put! h "username" "bobbotron" )

; (lj-get-challenge ) ; should be called without argument
; (lj-get-friends h ) ; needs a username structure

When I make the procedure call, I get the following error, and the thread
executing the interpreter thread is terminated.

The error I've been getting:

Welcome to DrScheme, version 208.
Language: Graphical (MrEd, includes MzScheme).
> (lj-get-challenge )

Error at position 0
(XML [22], unexpected EOF)

I'm running drscheme version 208: any suggestions on what's happening? 
Unfortunately I don't have the source code for xmlrpc.ss.

Robert Young

This mail sent through IMP: http://horde.org/imp/

Posted on the users mailing list.