axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From am am <>
Subject Axis2: how to send list of datahandler?
Date Fri, 11 Mar 2011 21:29:19 GMT

I have a web service in axis2 that I can send a file to, from a WS client.
The  file is read as byte[] and then from these bytes a  
javax.activation.DataHandler is constructed. This DataHandler is send to  the 
web service as a member of an object. No problem so far.
The  DataHandler is created as a result of the declaration of byte[] in the  
class that serves as the input parameter to the web service. And so the  ADBBean 
that is created has a DataHandler as member.
Problem: I need to enhance my web service and send multiple files.
I thought if I modified the byte[]  to a -> List<byte[]> it could work (was 
hoping to get a List<DataHandler>).
Anyway, the resulting stubs created a param of type Object.
When I tried to set my list of byte[] (as  Object) I got the exception:

Exception in thread "main" org.apache.axis2.AxisFault: Unknow type can not 
    at org.apache.axis2.AxisFault.makeFault(


I thought that maybe I should not be using lists so I changed to the following:

class X{
byte[] data;

and in the class of the request object I changed the byte[] and made as member 
This did not work either. It created an empty stub that I could not use.

How can I solve this problem? How can I modify my web service to accept multiple 
byte[] (i.e. multiple files)?

Thank you

View raw message