on 10-07-2009 11:14 AM
Hi Colleagues,
We have developed an application which is used to download softwares from SMP (service market place).we have used a servlet to downlaod the software. When i click on download button of my implemented application, a new window with three options "Open", "Save" and "Close" .
When we select "Save", the software gets saved with extenssion ".exe". But when we run the software it is empty.
But if try directly downlaoding the software , it is also storing as an exe file. But i am able to INSTALL that Spftware.
When i checked the properties of the exe from the SMP it is showing as the file description is "SAP Self-Extractor MFC Application".
Could any one please let me know what are code changes that are required in my below code to download a exe file of type "SAP Self-Extractor MFC Application".
Code used to downlaod software in my application:
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("Authorization" , encodedData);
connection.connect();
if (connection.getResponseCode() == 200)
{
response.setStatus(connection.getResponseCode());
response.setContentType("application/zip");
response.addHeader("Content-Disposition", "attachment;filename=" + file );
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
//servout.println("new");
InputStream inp = connection.getInputStream();
byte[] buf = new byte[4 * 1024]; // 4K buffer
int bytesRead;
while ((bytesRead = inp.read(buf)) != -1)
{
out.write(buf, 0, bytesRead);
}
}
Please help me here
Many Thanks
Best Regards
Swetha
What is need for an application when SAP Download Manager can do the job for you...
Chintan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Chintan,
I have already provided S-User details and i am able downlaod the software........But after downloading...the software is empty......
Here i feel the empty software is due to the Code while downloading the software.It needs some additional code to be inserted to get a file of typ "SAP Self-Extractor MFC Application".
Could you please let me know if you are aware of something like this.
Thanks & Regards
Swetha
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.