Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Returning Vectors  RSS feed

 
Carlos Felipe Zirbes
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Tom George
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • 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?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
 
Micheal Lorenzo
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!