This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes In Axis, how to support java.util.List types ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "In Axis, how to support java.util.List types ?" Watch "In Axis, how to support java.util.List types ?" New topic
Author

In Axis, how to support java.util.List types ?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
In Axis, how to support java.util.List types ?

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41124
    
  45
There's no direct way to use Java data types with web services, as that would undermine the cross-platform compatibility. You could transform the list into an array (which is supported), or -alternatively- embed a serialized representation (either binary of XML) if compatibility isn't important to you, although I would advise against that.


Ping & DNS - my free Android networking tools app
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
There is absolutely no reason to use the functionality of a List in a web service. Like Ulf said, use an array. The classes implementing List have excellent and fast toArray() methods.

In all likelyhood, a client of your web service will NOT need the List functionality, but if it does there are fast constructors that take arrays.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: In Axis, how to support java.util.List types ?
 
Similar Threads
SOAP over FTP or SMTP
Passing Set<java.lang.Object> and List<java.lang.Object> in Axis 2.0
Use Grid, Custom Markers, Pareto & Step Chart Types in Java Apps
Complex Data type handling Axis for interoperability
This Weeks Giveaway