AppCore
Loading...
Searching...
No Matches
envServer.cpp
Go to the documentation of this file.
1/* envServer.cpp
2 Generated by gSOAP 2.7.9k from env.h
3 Copyright(C) 2000-2007, Robert van Engelen, Genivia Inc. All Rights Reserved.
4 This part of the software is released under one of the following licenses:
5 GPL, the gSOAP public license, or Genivia's license for commercial use.
6*/
7#include "envH.h"
8
9SOAP_SOURCE_STAMP("@(#) envServer.cpp ver 2.7.9k 2009-10-26 07:34:17 GMT")
10
11
12SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
13{
14#ifndef WITH_FASTCGI
15 unsigned int k = soap->max_keep_alive;
16#endif
17
18 do
19 {
20#ifdef WITH_FASTCGI
21 if (FCGI_Accept() < 0)
22 {
23 soap->error = SOAP_EOF;
24 return soap_send_fault(soap);
25 }
26#endif
27
28 soap_begin(soap);
29
30#ifndef WITH_FASTCGI
31 if (soap->max_keep_alive > 0 && !--k)
32 soap->keep_alive = 0;
33#endif
34
35 if (soap_begin_recv(soap))
36 { if (soap->error < SOAP_STOP)
37 {
38#ifdef WITH_FASTCGI
39 soap_send_fault(soap);
40#else
41 return soap_send_fault(soap);
42#endif
43 }
44 soap_closesock(soap);
45
46 continue;
47 }
48
49 if (soap_envelope_begin_in(soap)
50 || soap_recv_header(soap)
51 || soap_body_begin_in(soap)
52 || soap_serve_request(soap)
53 || (soap->fserveloop && soap->fserveloop(soap)))
54 {
55#ifdef WITH_FASTCGI
56 soap_send_fault(soap);
57#else
58 return soap_send_fault(soap);
59#endif
60 }
61
62#ifdef WITH_FASTCGI
63 soap_destroy(soap);
64 soap_end(soap);
65 } while (1);
66#else
67 } while (soap->keep_alive);
68#endif
69 return SOAP_OK;
70}
71
72#ifndef WITH_NOSERVEREQUEST
73SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
74{
75 soap_peek_element(soap);
76 return soap->error = SOAP_NO_METHOD;
77}
78#endif
79
80/* End of envServer.cpp */
SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
Definition envServer.cpp:73
SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
Definition envServer.cpp:12