on 03-02-2007 5:53 AM
Hi,
I have an ejb module. From that one of the method is returning Hashtable object. But when I am creating webservice for that ejb module it is not accepting hashtable as return value. To return key value pair which java class/interface I can use.
Thanks
Bobby M
Hai ,
You can return array list by providing a bean.
Public Class Pair implements Serializable{
String Key;
String Value;
//Setters and Getters
}
//webservice method
Public ArrayList SomeX(){
ArrayList al=new ArrayList();
for(your data condition){
Pair p=new Pair ();
p.setKey(key);
p.setValue(value);
al.add(p);
}
return al;
}
other wise you can return array of pair objects.
Regards,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.