File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Axis2: passing an ArrayList to a webservice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2: passing an ArrayList to a webservice" Watch "Axis2: passing an ArrayList to a webservice" New topic

Axis2: passing an ArrayList to a webservice

Pramod Chris

Joined: Oct 15, 2004
Posts: 21
I don't know if this has been discussed already. I am new to web services and axis2 in particular. I have a web service with a method that takes an ArrayList as a parameter. the ArrayList further has a Hashtable as one of its elements.
when i call the web service from a client, passing the ArrayList as the input, on the server side (at the web service), i am getting <empty>false</empty>. is this a problem of serializing and deserializing paramters? the client code snippet is below..

and my services.xml look like this...

when i print out the arraylist in the webservice it prints <empty>false</empty>
any idea what the issue is?

thanks in advance!
Razi Abbas

Joined: Dec 10, 2006
Posts: 18
While I am no guru on webservices interfaces ... I feel s=you should be able to resolve the problem, if you modify the interface to use Arrays instead of ArrayList. To my feeling (not sure) .. xml has support for Arrays and not for ArrayList ... so the change might be an easy way to solve the issue ...

cheers ...

I agree. Here's the link:
subject: Axis2: passing an ArrayList to a webservice
It's not a secret anymore!