How to have a HashMap as @WebParam with JBossWS 3.1.2

自闭症网瘾萝莉.ら 提交于 2019-12-03 21:11:11
Lloyd Meinholz

The answer was in another post How can I pass in an array as a value into a PHP soapclient request?

I would have never thought to look into a PHP question for a JAX-WS solution...

The HashMap needs to be wrapped in another Java class called HashMapWrapper.java (or whatever).

public class HashMapWrapper {
    public HashMap<String, Object> parameters;
}

The ping method call needs to be modified to use the wrapper class instead of HashMap:

public String ping(@WebParam(name="arguments") HashMapWrapper arguments) {

This generates appropriate WSDL which in turns generates useful Java stubs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!