Updated workbook Eiffel code to follow new EWF concurrent design.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
note
|
||||
description : "Basic Service that show how to use common Status Code"
|
||||
date : "$Date$"
|
||||
revision : "$Revision$"
|
||||
description: "Basic Service launcher"
|
||||
|
||||
class
|
||||
APPLICATION
|
||||
|
||||
inherit
|
||||
WSF_DEFAULT_SERVICE
|
||||
WSF_DEFAULT_SERVICE [APPLICATION_EXECUTION]
|
||||
redefine
|
||||
initialize
|
||||
end
|
||||
@@ -23,25 +21,4 @@ feature {NONE} -- Initialization
|
||||
set_service_option ("port", 9090)
|
||||
end
|
||||
|
||||
feature -- Basic operations
|
||||
|
||||
execute (req: WSF_REQUEST; res: WSF_RESPONSE)
|
||||
-- Execute the incomming request
|
||||
do
|
||||
-- To send a response we need to setup, the status code and
|
||||
-- the response headers.
|
||||
res.put_header ({HTTP_STATUS_CODE}.ok, <<["Content-Type", "text/csv"],["Content-Disposition","attachment;filename=Report.xls"],["Content-Length", sheet.count.out]>>)
|
||||
res.put_string (sheet)
|
||||
end
|
||||
|
||||
-- ,["Content-Disposition","attachment;filename=Report.xls"]
|
||||
|
||||
|
||||
sheet: STRING ="[
|
||||
Q1 Q2 Q3 Q4 Total
|
||||
Cherries 78 87 92 29 =SUM(B2:E2)
|
||||
Grapes 77 86 93 30 =SUM(B3:E3)
|
||||
]"
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user