0

I want to send a .rar file from Server to Client through web service.Which data type to be return from server side method?There is no byte[] method if I am not wrong.

Kindly advice to solve the issue..

Ankit
  • 6,403
  • 6
  • 46
  • 70
Prakash
  • 251
  • 3
  • 15

2 Answers2

0

Have a look here: Java web service to transfer file to Local system

You could also use a servlet (Implementing a simple file download servlet) or send your file Base64 encoded.

Community
  • 1
  • 1
TerenceJackson
  • 1,754
  • 14
  • 22
0

I think byte[] is a JAX-WS supported type, see http://docs.oracle.com/javaee/6/tutorial/doc/bnazc.html. JAX-WS will automatically convert byte[] into xsd:hexBinary string.

Evgeniy Dorofeev
  • 129,181
  • 28
  • 195
  • 266