• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use List and HashMap as parameters to a web service?

 
Sac Anand
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

Can anybody please tell me how can i pass List or HashMap to a web service?

Regards,
Sachin
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use encoded mode and then use a deserializer/serializer pair Axis: The BeanSerializer.
However I wouldn't recommend it. A Non-Java client doesn't know what a java.util.List or java.util.HashMap instance is and even for Java-clients both sides will have to know how to use the deserializer/serializer pair.
Better to send the data-content that makes up the List/HashMap as a string, possibly an array of strings, an XML fragment in a string or an XML document.
 
Sac Anand
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

Your inputs will definitely help me in my project. I'll try to expose my web service without using HashMap and List.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!