Hi hideki,

 link [1] may be help to you , also please see my inline comments .

> public String upload( byte[] document, String filename, String sender,
> DataSource dataSource = new ByteArrayDataSource( uploadedfile.toByteArray(),
> "application/octet-stream");
> DataHandler dataHandler = new DataHandler(dataSource);

If it is a file on your local file system ,it would be better to
create  DataHandler as  follows using FileDataSource without
specifying MIME  type yourself.

DataHandler dh = new DataHandler(new FileDataSource("path to file"));

> I always get following AxisFault:
>
> the service is unknown (or similar).
>
> Is it not possible to have a byte[] array as a parameter ?

No , it is possible to have a byte[] array  as a parameter for Axis2
service , but better to use DataHandler as a parameter  instead of
byte[] array , because in byte[] array it is required to  load
complete file into the memory at once.

[1] - http://wso2.org/library/3860


Thanks ,

-- 
Sagara Gunathunga

Blog - http://ssagara.blogspot.com
Web - http://sagaras.awardspace.com/

Reply via email to