File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes Can webservices support vectors of complex data types .. Like custom bean Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Can webservices support vectors of complex data types .. Like custom bean" Watch "Can webservices support vectors of complex data types .. Like custom bean" New topic
Author

Can webservices support vectors of complex data types .. Like custom bean

Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
I tried creating webservices in RAD6.0 and I am having problems trying to use Vectors of a bean .
Is vectors of complex data type supported with WebSphere.
If any one has any information please post some link on how complex
data types can be supported . ?

Thanks
Dhiren
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
Unless you're willing to serialize it in binary form, you'll need to map your collection to an array. This article should help you get going.


Android appsImageJ pluginsJava web charts
Dhiren Joshi
Ranch Hand

Joined: Dec 09, 2003
Posts: 463
Thanks Dittmer great article .
Exactly what I was trying to do.
One more question. Could I still encapsulate an Vector or ArrayList as my instance variable like this..

public class DEscription {
ArrayList description = null;


public void setDescriptionList(Desc[] desc) {
description = new ArrayList();
description.toArray(desc);
}

public Desc[] getDescriptionList(){

return Desc[] description.toArray();
}
}

Thanks
Dhiren
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 32767
I see no reason why not, because it never gets transferred over the wire, so you are free to implement as you choose.
 
 
subject: Can webservices support vectors of complex data types .. Like custom bean
 
Threads others viewed
WS for existing application
CMP vs BMP
deploy a class as a web service
Entity Bean Global Variables
Web Service Interoperablity
Two Laptop Bag