• 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
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Apache axis arraylist problem

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a web service which exposes a method which takes an object as an argument. This object contains 2 custom arraylists. I populate the arraylists with custom objects manually before invoking the web service. But they become empty when they reach the web service.
I don't get any serialization errors in the (jboss) console or logs. What could be the problem?
 
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
If this was my problem I would define the service in terms of arrays, not ArrayList objects - there are convenient conversions from and to arrays in the Collections API.

If you still want to continue with arrays, the next thing to do would be to capture the full text of the request with something like TCPMON - in your Axis toolkit. People are often surprised when they see what is actually being sent.

Bill
 
Ashok C. Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I might have mislead you by making my question sound very simple. I apologize for it. My problem is not with a simple scenario with an object and 2 arraylists. What I am trying to do is pass to the webservice a complex data structure which contains multiple arraylists with custom objects which in turn contain arraylists and other objects.
I am afraid that I cannot change to arrays as the webservice works with these custom objects and arraylist. Conversion to arrays would be very painful and complex.

If you still want to continue with arrays


I assume you meant

If you still want to continue with arraylists


I will try capturing the full text of the request with TCPMON. In the meantime if you happen to have any other suggestions you are most welcome. I am really stuck and I would be greatful for any lead.
 
Ashok C. Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is the full text of the request with TCPMON


I am new to axis and SOAP. Anyone who can read this xml, please help

[ December 04, 2006: Message edited by: Ashok C.M. ]

[ December 04, 2006: Message edited by: Ashok C.M. ]
[ December 04, 2006: Message edited by: Ashok C.M. ]
 
William Brogden
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

Etc..
Looks like your custom objects are not getting encoded at all or contain no data.
Bill
[ December 04, 2006: Message edited by: William Brogden ]
 
Ashok C. Mohan
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use custom lists (extends ArrayList) could that be the problem? There are no attributes specified in my custom list. Could the webservice be just scanning for attributes and finds none, so marks it as empty?
 
William Brogden
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

Could the webservice be just scanning for attributes and finds none, so marks it as empty?



As far as I can see, right now what your client is sending is nothing like the complex object you say the web service needs. If you don't see something recognizable as your data in the SOAP request, then something is wrong on the client side encoding.

How did you use your custom object code to create a SOAP client?

Bill
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic