wood burning stoves 2.0*
The moose likes Web Services and the fly likes hashtable or hashmap in a web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "hashtable or hashmap in a web service" Watch "hashtable or hashmap in a web service" New topic

hashtable or hashmap in a web service

Rodrigo Bossini
Ranch Hand

Joined: Jul 03, 2009
Posts: 113

I'm building a C# web service (whatever, that could be in java anyway) and I just realized that I need to send something similar to a hashtable (similar to the hashmap in java) as a response to my web service consumer.

Will that simply work?

As I'm new to the web service world, there might be a trick that I'm not yet aware of.

If it will not work, do you guys have a suggestion on how I could build something similar to a hashtable manually?

Thank you.

I see wind mills
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
If you want to test whether your web service conforms to the WS-I Basic Profile (conformance will facilitate interoperability), then you can use the WS-I testing tool that is embedded in soapUI or that can be downloaded separately to examine the WSDL of your web service.
To be more interoperable, I would use an array of items where each item contains a key and a value. If you have a multi-value hashmap, then each item need to contain a key and a list of values.
Hope this helps!
I agree. Here's the link: http://aspose.com/file-tools
subject: hashtable or hashmap in a web service