axis-java-user mailing list archives

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

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 
serialize
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    at 
org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)

    at 
org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)


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 
X[].
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


      
Mime
View raw message