Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Casting Clojure不识别父类_Casting_Clojure_Jax Ws - Fatal编程技术网

Casting Clojure不识别父类

Casting Clojure不识别父类,casting,clojure,jax-ws,Casting,Clojure,Jax Ws,我正在编写使用wsimport为web服务生成客户端的代码,但是,当我尝试使用寻址功能启动绑定时,出现以下错误: 线程“main”java.lang.ClassCastException中的异常:javax.xml.ws.soap.AddressingFeature无法强制转换为[Ljavax.xml.ws.WebServiceFeature; 我知道javax.xml.ws.soap.AddressingFeature扩展了javax.xml.ws.WebServiceFeature,所以我不

我正在编写使用wsimport为web服务生成客户端的代码,但是,当我尝试使用寻址功能启动绑定时,出现以下错误:

线程“main”java.lang.ClassCastException中的异常:javax.xml.ws.soap.AddressingFeature无法强制转换为[Ljavax.xml.ws.WebServiceFeature;

我知道javax.xml.ws.soap.AddressingFeature扩展了javax.xml.ws.WebServiceFeature,所以我不确定发生了什么。我知道在Clojure中不能向下转换,但向父级转换应该可以

根据我的理解,对象应该是autocast,如果不是,则
clojure.core/cast
应该可以工作,但是,两者都会引发异常

我的代码如下所示:

(-> (com.test.TestAPISOAP.) 
    (.getTestWSHttpBinding 
        (javax.xml.ws.soap.AddressingFeature. true true)))

它看起来像是
.getTestWSHttpBinding
接受一个数组(在[Ljavax.xml.ws.WebServiceFeature]中的[L],而不是一个元素

尝试使用以下方法将带有
AddressingFeature
的数组创建为单个元素:


谢谢!我忽略了它的数组方面。
(-> (com.test.TestAPISOAP.) 
    (.getTestWSHttpBinding 
        (to-array [(javax.xml.ws.soap.AddressingFeature. true true)])))