IntelliJ Java IDE
The moose likes Web Services and the fly likes Returning Vectors Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Returning Vectors" Watch "Returning Vectors" New topic
Author

Returning Vectors

Carlos Felipe Zirbes
Greenhorn

Joined: Sep 30, 2004
Posts: 2
I have developed a web service that returns a Vector of objects and I am sure the Vector is been correctly filled.

My problem is in the client. The Vector always comes back empty. I am using the class BeanSerializer to serialize/deserialize the Vector. Is this the problem? I've tried to use VectorSerializer but had no success either.

Has someone done this before?


TIA,<br /> <br />Zirbes
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Are you using Axis ?
Did you checked the raw SOAP request response messages using SOAPMonitor or some sniffers.
Was your client using WSDL2Java (its better to use for complex objects)?


Spritle Software Blogs
Carlos Felipe Zirbes
Greenhorn

Joined: Sep 30, 2004
Posts: 2
Hi.

I am really new to web services. I've been using Apache SOAP and deploying my applications in Tomcat 5. I never used WSDL and I am not sure what's its purpose.

Anyway, I have already solved my problem. Well... sort of. To tell you the truth I gave up using Vectors and decided to use arrays instead. It's working fine now.

Thanks anyway,
Zirbes.
Tom George
Ranch Hand

Joined: Jan 28, 2004
Posts: 41
I guess it must be tiring for experts to answer this again and again but here goes. I had this problem also; tried to use arraylists and in the end reverted to plain arrays. Why? What should I do in the client?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11862
For one thing, every programming language used with web services can understand an array of basic elements. There just is no reason to use an ArrayList, given that the Collections API has fast and elegant conversions to and from arrays.
Bill
Micheal Lorenzo
Greenhorn

Joined: Nov 10, 2004
Posts: 1
I too is giving up looking at axis webservice returning vector. Instead I will fall back to returning array of beans. Thanks guys.
 
 
subject: Returning Vectors
 
Threads others viewed
Deleting JTable Row
Vector with bean:write tag
Using add on Vector<?>
Problem!
Vector object in HttpServletRequest
Two Laptop Bag

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture