~ifolder-dev/simias/trunk-packaging

« back to all changes in this revision

Viewing changes to tools/gsoap/gsoap-linux-2.7/samples/webserver/.svn/text-base/README.txt.svn-base

  • Committer: Jorge O. Castro
  • Date: 2007-12-03 06:56:46 UTC
  • Revision ID: jorge@ubuntu.com-20071203065646-mupcnjcwgm5mnhyt
* Remove a bunch of .svn directories we no longer need.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
This directory contains an example stand-alone gSOAP Web server. It uses the
2
 
gSOAP HTTP GET plugin to serve HTTP GET requests as well as SOAP/XML HTTP POST
3
 
requests.
4
 
 
5
 
This is a small but fully functional (embedded) Web server that can serve both
6
 
static and dynamic pages and provide SOAP/XML responses.
7
 
 
8
 
This Web server implements a simple calculator XML Web service for
9
 
demonstration purposes.
10
 
 
11
 
This application requires Zlib and Pthreads (you can replace Pthreads with
12
 
another thread library, but you need to study the OpenSSL Pthread
13
 
implementation when you plan to use OpenSSL).
14
 
 
15
 
On Unix/Linux, please enable SIGPIPE handling, see the main function in
16
 
webserver.c. SIGPIPE handling will avoid your server from termination when
17
 
sockets are disconnected by clients before the transaction was completed
18
 
(aka broken pipe).
19
 
 
20
 
Please don't be tempted to run the webserver with root permission! The best
21
 
way to protect your site is by creating a dummy account with very limited
22
 
system access and run the webserver under this account.
23
 
 
24
 
        Compile without OpenSSL:
25
 
        soapcpp2 -c -n -popt opt.h
26
 
        soapcpp2 -c webserver.h
27
 
        Customize your COOKIE_DOMAIN in webserver.c (if you use cookies)
28
 
        gcc -DWITH_COOKIES -DWITH_ZLIB -I../.. -o webserver webserver.c
29
 
        options.c ../../plugin/httpget.c ../../plugin/logging.c
30
 
        ../../plugin/threads.c ../../stdsoap2.c soapC.c soapClient.c
31
 
        soapServer.c -lpthread -lz
32
 
 
33
 
        Compile with OpenSSL:
34
 
        soapcpp2 -c -n -popt opt.h
35
 
        soapcpp2 -c webserver.h
36
 
        gcc -DWITH_OPENSSL -DWITH_COOKIES -DWITH_ZLIB -I../.. -o webserver
37
 
        webserver.c options.c ../../plugin/httpget.c ../../plugin/logging.c
38
 
        ../../plugin/threads.c ../../stdsoap2.c soapC.c
39
 
        soapClient.c soapServer.c -lpthread -lz -lssl -lcrypto
40
 
 
41
 
        Use (HTTP GET):
42
 
        Compile the web server as explained above
43
 
        Start the web server on an even numbered port (e.g. 8080):
44
 
        > webserver 8080 &
45
 
        Start a web browser and open a (localhost) location:
46
 
        http://127.0.0.1:8080
47
 
        and type userid 'admin' and passwd 'guest' to gain access
48
 
        Open the location:
49
 
        http://127.0.0.1:8080/calc.html
50
 
        and enter an expression
51
 
        Open the locations:
52
 
        http://127.0.0.1:8080/test.html
53
 
        http://127.0.0.1:8081/webserver.wsdl
54
 
 
55
 
        Use (HTTPS GET):
56
 
        Create the SSL certificate
57
 
        Compile the web server with OpenSSL as explained above
58
 
        Start the web server on an odd numbered port (e.g. 8081)
59
 
        > webserver 8081 &
60
 
        Actually, you can start two servers, one on 8080 and a secure one on
61
 
        8081
62
 
        Start a web browser and open a (localhost) location:
63
 
        https://127.0.0.1:8081
64
 
        and type userid 'admin' and passwd 'guest' to gain access
65
 
        Open the location:
66
 
        https://127.0.0.1:8081/calc.html
67
 
        and enter an expression
68
 
        Open the locations:
69
 
        https://127.0.0.1:8081/test.html
70
 
        https://127.0.0.1:8081/webserver.wsdl
71
 
 
72
 
        Use (HTTP POST):
73
 
        Serves SOAP/XML calculation requests
74
 
 
75
 
        Command-line options:
76
 
        -z              enables compression
77
 
        -c              enables chunking
78
 
        -k              enables keep-alive
79
 
        -i              enables non-threaded iterative server
80
 
        -v              enables verbose mode
81
 
        -t<val>         sets I/O timeout value (seconds)
82
 
        -s<val>         sets server timeout value (seconds)
83
 
        -d<host>        sets cookie domain
84
 
        -p<path>        sets cookie path
85
 
        -l[none inbound outbound both]
86
 
                        enables logging
87