My method returns a Map<Integer, String[]>
. Is it possible to pass it through to a Web Service?
It's best not to expose a Java collections through your web service interface.
You should expose only simple types, beans and arrays instead, or you risk getting into trouble (interoperability kind of trouble).
Try converting your Map
into an array, like for example an array of Map.Entry
s or something wrapping those entries.
Map is specific to java..
You can use only arrays, int, string.. everything that is common in all the other languages that can use webservices (PHP, C#, C++, etc)... And think about it... what is the Map in PHP? there is not... webservices are built to share data in more than one language...
If you want to use it with Map and you are using this application only for java you'd better use RMI and not WebServices
© 2022 - 2024 — McMap. All rights reserved.
int
? Isn't it actually anInteger
? – Thamos