Scott -

This question comes after Barry White's upload question. If I have multiple files uploaded, one way is to send each file uploaded with seperate soap request, but I don't think it's efficient. So the other way I think, is to create a Datahandler array, then you send all files in this array with single soap request, I think this is more efficient.

...
DataHandler[] dhArray = new DataHandler[fileNumber];
for (int i = 0; i < fileNumber; i++) {
dhArray[i] = new DataHandler(datasource[i]);
}
...
params.addElement(new Parameter("uploadfiles", javax.activation.DataHandler[].class, dhArray, null));
...


The key point here is "javax.activation.DataHandler[].class" legal or illiegal for class type? Or we have to do extra effort here?

TIA,

-Daniel



Reply via email to