• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Returning Vectors

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)?
 
Carlos Felipe Zirbes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I too is giving up looking at axis webservice returning vector. Instead I will fall back to returning array of beans. Thanks guys.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic