Added more content to the tutorial

This commit is contained in:
Jocelyn Fiat
2012-05-25 22:55:15 +02:00
parent 6cff00428b
commit 08347da643
15 changed files with 322 additions and 26 deletions

View File

@@ -0,0 +1,53 @@
note
description: "[
This class implements the `Hello World' service.
It inherits from WSF_DEFAULT_RESPONSE_SERVICE to get default EWF connector ready
only `response' needs to be implemented.
In this example, it is redefined and specialized to be WSF_PAGE_RESPONSE
`initialize' can be redefine to provide custom options if needed.
]"
class
CUSTOM_HELLO_APPLICATION
inherit
WSF_DEFAULT_RESPONSE_SERVICE
redefine
initialize
end
create
make_and_launch
feature {NONE} -- Initialization
initialize
do
--| Uncomment the following line, to be able to load options from the file ewf.ini
-- create {WSF_SERVICE_LAUNCHER_OPTIONS_FROM_INI} service_options.make_from_file ("ewf.ini")
--| You can also uncomment the following line if you use the Nino connector
--| so that the server listens on port 9999
--| quite often the port 80 is already busy
-- set_service_option ("port", 9999)
--| Uncomment next line to have verbose option if available
-- set_service_option ("verbose", True)
--| If you don't need any custom options, you are not obliged to redefine `initialize'
Precursor
end
feature {NONE} -- Initialization
response (req: WSF_REQUEST): WSF_PAGE_RESPONSE
-- Computed response message.
do
create Result.make
Result.put_string ("Hello World")
end
end

View File

@@ -0,0 +1,31 @@
note
description: "[
This class implements the `Hello World' service.
It inherits from WSF_DEFAULT_RESPONSE_SERVICE to get default EWF connector ready
only `response' needs to be implemented.
In this example, it is redefined and specialized to be WSF_PAGE_RESPONSE
`initialize' can be redefine to provide custom options if needed.
]"
class
HELLO_APPLICATION
inherit
WSF_DEFAULT_RESPONSE_SERVICE
create
make_and_launch
feature {NONE} -- Initialization
response (req: WSF_REQUEST): WSF_PAGE_RESPONSE
-- Computed response message.
do
create Result.make
Result.put_string ("Hello World")
end
end