【发布时间】:2012-08-07 20:18:13
【问题描述】:
GroovyWS 是一个在内部使用 CXF 的框架。我想提出如下要求:
<param2 xsi:type="ns2:Map">
<item xsi:type="ns2:Map">
<key xsi:type="xsd:string">param1</key>
<value xsi:type="xsd:string">param2</value>
</item>
</param2>
目前我正在尝试通过 grails 服务执行此操作,如下所示:
def proxy = new WSClient("http://xyz", this.class.classLoader)
proxy.initialize()
proxy.client.invoke("call", new HashMap<String, String>())
这给了
javax.xml.bind.JAXBException
class java.util.HashMap nor any of its super class is known to this context.
我什至尝试过 [:] 之类的东西,但没有成功。
【问题讨论】:
-
我完全不记得细节,但是如果你尝试用
proxy.client.objectFactory.createMap()创建地图参数呢? (最后一个方法的名称可能会有所不同,这取决于 WSDL 类型名称)
标签: grails soap groovy cxf groovyws