wood burning stoves 2.0*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2: passing an ArrayList to a webservice" Watch "Axis2: passing an ArrayList to a webservice" New topic
Author

Axis2: passing an ArrayList to a webservice

Pramod Chris
Greenhorn

Joined: Oct 15, 2004
Posts: 21
Hi,
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
Greenhorn

Joined: Dec 10, 2006
Posts: 18
Pramod,
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 ...

Razi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Axis2: passing an ArrayList to a webservice
 
Similar Threads
OMException java.lang.NullPointerExce
OMException java.lang.NullPointerExce
returnMessageContext is getting set to null why?
Writing Client using Axis 2 for asynchronous call.
Web Services problem