Since you didn't post any programs or how you ran them, it is hard for me to tell what the problem is. It appears that you tried to run the "server" code as a module-based servlet, which it is not because it does not provide interface-version, manager, or start as specified here:
http://docs.racket-lang.org/web-server/servlet.html#(part._servlet-example) Since I can tell this code is based on the code in the docs, it appears that you just aren't calling (run-server!) as you'd need to actually run the server. Attached is code that will work and makes everything explicit. Jay On Thu, Sep 23, 2010 at 12:40 PM, Tobias Salzmann <salt...@googlemail.com> wrote: > Hello > > many thanks for the quick help. > But I still have a problem > > Here is my code: > Server: > (define (add x y) (+ x y)) > (define xml-rpc-adder > (make-handle-xml-rpc > (hasheq 'math.add add > 'math.+ + > 'addFun add))) > (define (run-server!) > (serve/servlet xml-rpc-adder > #:port 8888 > #:servlet-path "/servlets/rpc/xmlrpc.rkt" > #:command-line? #t)) > Client: > (define adder > (xml-rpc-server (string->url > "http://localhost:8888/servlets/rpc/xmlrpc.rkt"))) > (define math.add (adder 'math.add)) > (math.add 3 4) > And the answer here: > Received invalid XMLRPC response (html (head (title Servlet Error) (link (@ > (rel stylesheet) (href /error.css)))) (body (div (@ (class section)) (div (@ > (class title)) Exception) (p The application raised an exception with the > message: (pre dynamic-require: name is not provided: 'interface-version by > module: #<resolved-module-path:"C:\Program Files > (x86)\Racket\collects\web-server\default-web-root\htdocs\servlets\rpc\xmlrpc.rkt">)) > (p Stack trace: (pre <unknown procedure> at: > line 121, column 2, in file C:\Program Files > (x86)\Racket\collects\web-server\servlet\setup.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > hash-ref! at: > line 399, column 13, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 57, column 2, in file C:\Program Files > (x86)\Racket\collects\web-server\dispatchers\dispatch-servlets.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > select-handler/no-breaks at: > line 173, column 2, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > select-handler/no-breaks at: > line 173, column 2, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > select-handler/no-breaks at: > line 173, column 2, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > select-handler/no-breaks at: > line 173, column 2, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > select-handler/no-breaks at: > line 173, column 2, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > select-handler/no-breaks at: > line 173, column 2, in file C:\Program Files > (x86)\Racket\collects\racket\private\more-scheme.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > <unknown procedure> at: > line 1445, column 3, in file C:\Program Files > (x86)\Racket\collects\racket\contract\private\arrow.rkt > connection-loop at: > line 62, column 2, in file C:\Program Files > (x86)\Racket\collects\web-server\private\dispatch-server-unit.rkt > ))))) > > Where is my mistake? :) > >> >> Cheers, >> Tobi > > -- Jay McCarthy <j...@cs.byu.edu> Assistant Professor / Brigham Young University http://teammccarthy.org/jay "The glory of God is Intelligence" - D&C 93
client.rkt
Description: Binary data
serve.rkt
Description: Binary data
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users