send byte[] over webservice

Hi there,

I’ve created a service in IS which returns a byte[] and then I’ve created a webservice connector in a portlet project. The portlet contains a command button which refreshes the connector, thus invoking the service.

I’m having an exception everytime the service is invoked:
electric.util.WrappedException: java.rmi.UnmarshalException: java.lang.IllegalArgumentException: argument type mismatch

any ideas?

Rui Cabete

you may consider to use base64 encoding the bytes, then you can change the interface type to String to avoid the type mismatch problem.

Thanks tongwang, I’m now using base64 with success. Bu now I’m facing a new problem: Sometimes the data is to large and some I can’t send it all. Is there a way to send it using small chunks with a fixed sized via webservice?