This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

hashtable or hashmap in a web service

Rodrigo Bossini
Ranch Hand

Joined: Jul 03, 2009
Posts: 113
Hi,

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
    
    1
Hi!
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
 
Similar Threads
doubt about custom types
stackoverflow cloning hashtable
Lists
Use Vector or Hashtable?
List with a sublist of Integers