First you need to undestand the actions which take place at server and client side.
What you are doing in your sample code is writing the byte data but also opening the file on the server itself.
This won't work.
You need to stream the file data from the webservice to the client browser and then opne the file in the client machine.
Look here for a similar thread. (Wow, seems like I answered that as well:))
Download pdf using webservice