JAX-WS: How to make a SOAP Response return a HashMap object

前端 未结 3 1116
天涯浪人
天涯浪人 2020-12-10 17:34

So I have a simple web service:

    @WebMethod(operationName=\"getBookList\")
    public HashMap getBookList()
    {
        HashMap

        
3条回答
  •  醉话见心
    2020-12-10 18:19

    JAX-WS How to make SOAP Response return Hashmap object

    You should not expose any Java specific constructs like HashMap via a Web Service.
    Web Services is about interoperability and following paths like yours is the wrong way.
    Just return the information required so that the web service client can build the hash table regardless of the programming language it is written

提交回复
热议问题