gpt4 book ai didi

java - JAX-WS,为什么收到的LinkedHashMap集合是空的?

转载 作者:行者123 更新时间:2023-12-01 15:06:17 25 4
gpt4 key购买 nike

我正在构建一个java webservice,它接收LinkedHashMap作为参数。 LinkedHashMap 集合在客户端插入了一些元素,但我在 Web 服务中收到的元素是空的。

最佳答案

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

另请参阅:

关于java - JAX-WS,为什么收到的LinkedHashMap集合是空的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12905315/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com