Skip to content

Instantly share code, notes, and snippets.

@rotaliator
Created June 2, 2021 20:22
Show Gist options
  • Save rotaliator/52d763e0eaab5e9f6d567fbe1d07dd5e to your computer and use it in GitHub Desktop.
Save rotaliator/52d763e0eaab5e9f6d567fbe1d07dd5e to your computer and use it in GitHub Desktop.
(ns soap-service.core
(:import (javax.jws WebMethod WebService WebParam)
(javax.xml.ws Endpoint)))
(definterface ITestService
(^int add [^int a ^int b]))
(deftype ^{WebService {:targetNamespace "http://service.test.com"}} TestService []
ITestService
(^int ^{WebMethod []} add [_
^int #^{WebParam {:name "a"}} a
^int #^{WebParam {:name "b"}} b]
(+ a b)))
(defn endpoint []
(Endpoint/publish "http://localhost:3001/testService" (TestService.)))
(comment
(def service (endpoint))
(.stop service)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment