I would like to know if to send the image from java I must first encode it.
I would like to know if to send the image from java I must first encode it.
I think you are referring to how to send the byte array of an image in a Web Service, to send it, having the byte array, as you mention you have to code it to Base64
in this way:
String miImagen = Base64.encodeToString(byteArray, Base64.DEFAULT);
miImagen
would be the value you would send in the WebService.
You can use MTOM (from Java 6) JAX-WS MTOM , or as a string in base 64, as Elenasys says.