我试图做的Clojure和JAX-WSClojure的SOAP服务器JAX-WS
(ns test-ws.routes.home
(:import (javax.jws WebMethod WebService)
(javax.xml.ws Endpoint)))
(defprotocol Calculator (add [this a b]))
(deftype ^{WebService {:targetNamespace "test.seltzer" }}
CalcWeb [] Calculator (^{WebMethod []} add [this a b] (+ a b)))
(def endpoint (Endpoint/publish "http://localhost:8080/calcWeb" (CalcWeb.)))
一个简单的SOAP Web服务器是WSDL可在http://localhost:8080/calcWeb?wsdl
后,但是当我试图从SOAP-UI叫它我: com.sun.org.apache.xerces.internal.dom.ElementNSImpl不能转换到java.lang.Number中
我的想法是,Clojure中不能映射SOAP请求号码,以便我加注释
(defprotocol Calculator (add [this ^Integer a ^Integer b]))
(deftype ^{WebService {:targetNamespace "test.seltzer" }}
CalcWeb [] Calculator (^{WebMethod []} add [this ^Integer a ^Integer b] (+ a b)))
现在在编译时我有以下错误:找不到匹配的方法:添加,关闭自动匹配提示。
我也试过这个
(defprotocol Calculator (add [this ^Integer a ^Integer b]))
(deftype ^{WebService {:targetNamespace "test-ws.routes.home"}}
CalcWeb [] Calculator (^{WebMethod []} add [this
#^{WebParam {:name "param0"} :tag Integer} a
#^{WebParam {:name "param1"} :tag Integer} b] (+ a b)))
我给了我同样的错误。
我错过了什么吗?
这已经有一段时间,但有没有变化我可以从可能的话有些回购叉你的工作的例子吗?谢谢 :) –