Hi friends i am new to web services, their is requirement in my project that a webservice should be created which does some database interaction process and business logic than it has to send an excel file to the requested client [file should be downloaded on to client meachine].[*]I know we can send attachment in both SOAP and RESTFULL. i want to know which is the best method to send excel file and how to send it sample code so that i can get idea.[*]I know web service communicate through xml i want to know that convert excel file to xml and send it to client from their client convert it again to excel is that method ok from both performance and efficient point of view. Finally i want to know which is the best method to achieve it and sample code so that i can work on it. Updated questionThis is my web service method in project A\[code\]@Path("/todo")public class TodoResource{ @GET @Produces(MediaType.APPLICATION_OCTET_STREAM) public Response getfile(){ File file =new File("D:\\Test.xls"); // Initialize this to the File path you want to serve. return Response.ok(file, MediaType.APPLICATION_OCTET_STREAM).build(); }} \[/code\]This in project B where i created client\[code\] protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub System.out.println(">>>>>>>>>>>>>>>>>Starting of Project Test Call >>>>>>>>>>>>>>>>>"); ClientConfig config = new DefaultClientConfig(); Client client = Client.create(config); WebResource service = client.resource(getBaseURI()); //Get Excel Download System.out.println(":::::: The Application APPLICATION_OCTET_STREAM Response :::::: "); System.out.println(service.path("rest").path("todo").accept(MediaType.APPLICATION_OCTET_STREAM).get(String.class)); System.out.println(">>>>>>>>>>>>>>>>>Ending of Project Test Call >>>>>>>>>>>>>>>>>"); } private static URI getBaseURI() { return UriBuilder.fromUri("http://localhost:8080/WebService_XML").build(); }\[/code\]my requirement is the client will send some info like parameter 1,parameter 2 etc. based on that it will interact with database and a file will be created. and that file should be send to client.like on click call webservice process it send that file to client, browser download popup window will appear to save or open should appear. on click save save it.