To give some background, i have a WCF SOAP service in .NET that needs to return pdf files. This service will be used by multiple application, many times in a day. The size of the files returned varies from 10KB to 10MB. Also, there is no shared location where the file can be kept and the path can be returned. It can be done using byte, but that will increase the load on service, which I want to avoid. Any suggestions are welcome.
Application is hosted as a windows service. It is being used mostly by Java Clients. When I am trying to directly return the file stream, at client side the return type does not get mapped to a proper class and returns a null object in an automatically generated empty class. Only in the case when I returned byte, it was able to read the file.