JAX-WS, why LinkedHashMap collection received is empty?

与世无争的帅哥 提交于 2020-01-03 05:35:05

问题


I am building a java webservice which receive a LinkedHashMap as argument. The LinkedHashMap collection has some elements inserted in the client side, but I received it empty in the webservice.


回答1:


Avoid returning collections directly. Instead of returning a List<X>, return a JavaBean that has a List<X> in it. This will give you more detailed control over the marshalling anyway.

Producing a Web Service with JAX-WS and JAXB

See also:

  • What happens to generic class in jax-ws webservice?


来源:https://stackoverflow.com/questions/12905315/jax-ws-why-linkedhashmap-collection-received-is-empty

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