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,554
  • 6
  • 49
  • 71
Prakash
  • 281
  • 5
  • 18

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,776
  • 15
  • 24
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
  • 133,369
  • 30
  • 199
  • 275