A Small SOAP Server for Testing Purposes
$ git clone https://github.com/oubiwann/test-auth-soap-server.git
- Ensure the interface is as you want it in
src/*/*.clj
. - Run
lein run
to start serving on localhost:8888. - Generate the class files:
$ wsimport \
-d target/base+system+user+dev/classes/ \
"http://localhost:8888/RegistrationService?wsdl"
Sample usage in REPL (while lein run
is still serving on localhost:8888):
$ lein repl
t.c=> (def reg-service (gov.example.registration.RegistrationService.))
#'test-auth-soap-server.core/reg-service
t.c=> (def reg-proxy (.getRegistrationPort reg-service))
#'test-auth-soap-server.core/reg-proxy
t.c=> (.loginUser reg-proxy "alice" "asecret")
"OK"
Or you could use the Clojure wrapper provided in
test-auth-soap-server.client
:
t.c=> (require '[test-auth-soap-server.client :as client])
nil
t.c=> (-> (client/new)
(client/login "bob" "abc123"))
"OK"