[plt-scheme] Ok, got XMLRPC sorta working by hacking server-core.ss

From: Danny Yoo (dyoo at hkn.eecs.berkeley.edu)
Date: Wed Nov 8 17:55:16 EST 2006

Hi Neil,

Ok, I've been able to make a very silly xmlrpc server, but I've had to 
make a few changes to make things work.

I'm including a diff attached to this message.  It's important to form the 
XMLRPC response with a mime-type: certain XMLRPC clients do care that the 
response type is "text/xml".


Hope this helps!
-------------- next part --------------
2c2
<   (require (lib "servlet-helpers.ss" "web-server")
---
>   (require (lib "servlet-helpers.ss" "web-server/private")
4c4,6
<            (file "protocol.ss"))
---
>            (file "protocol.ss")
>            (lib "response.ss" "web-server")
>            (lib "xml.ss" "xml"))
40,45c42
<            `(methodResponse
<              (params 
<               (param
<                ;; Is there an inconsistent wrapping of 'value'
<                ;; around this?
<                ,serialised-result))))]
---
>            (make-response serialised-result))]
53a51,64
>   (define (make-response serialised-result)
>     (let* ([response    `(methodResponse
>                           (params 
>                            (param
>                             ;; Is there an inconsistent wrapping of 'value'
>                             ;; around this?
>                             ,serialised-result)))]
>            [output (string->bytes/utf-8 (xexpr->string response))])
>       (make-response/full 
>        200 "Okay" (current-seconds) 
>        #"text/xml" '() 
>        (list output))))
>     
>   

Posted on the users mailing list.