I am writing a webservice method to return the values of a table.I am using two Vectors one for the column and another for the values of the table.The Vector used for Values of the table contain each row as a Vector.These methods are written inside an EJB and the webservice is deployed in Weblogic 10.3. I am able to hit the webservice and call the methods and able to fetch the columnnames Vector.However when I fetch the values Vector I am just getting the Object class reference(address).I think I have to add something in xmltype-mapping.xml and I have never worked on it.Can anyone suggest what should be done so that I can retrieve the values of the table too.
+1
A:
I am using Vector only and the values are stored perfectly in the server side but when I retrieve in the client side I am getting the address of the Object in place of the individual Vectors.
That's probably because you are trying to convert the Vector<Vector>
to a String and passing the String. You might be doing it explicitly by calling vec.toString()
, or you might be doing something like this:
String element = "<something>" + vec + "</something>";
The problem is that the Vector
class does not override the toString()
method, and your code ends up calling Object.toString()
... which gives you the array's internal class name concatenated with the array's identity hashcode value.
That's what is happening, but I don't know what you need to do to fix it, given the technologies you are using.
Stephen C
2010-10-12 08:46:04