aspose file tools*
The moose likes Web Services and the fly likes Java webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Java webservice" Watch "Java webservice" New topic
Author

Java webservice

Akhil kumarS
Greenhorn

Joined: Oct 16, 2007
Posts: 13
Is it possible to return a result set from a java webservice? If possible show me some codes. If it is not possible how can i get the result set values from webservice??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42908
    
  69
By "result set", do you mean an instance of java.sql.ResultSet? If so, the answer is no. Web services should be implemented in a platform-neutral way, and not return objects that tie you into one particular language. Use arrays instead.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40029
    
  28
A question which would sit better on a different forum. Moving.
Nitin Pathak
Ranch Hand

Joined: Sep 25, 2006
Posts: 70
If the iterating over java.sql.ResultSet processed different data types, Intergers and String, use a HashMap (typecast in to Integer wrapper):

The server side can be coded in the following way:


The client side implementation can be described as:


Hope this helps!
[ December 16, 2008: Message edited by: Nitin Pathak ]
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Please see here why the use of a HashMap should ultimately be avoided.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java webservice