-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsoapServer.c
115 lines (108 loc) · 3.78 KB
/
soapServer.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
/* soapServer.c
Generated by gSOAP 2.8.129 for testh.h
gSOAP XML Web services tools
Copyright (C) 2000-2023, Robert van Engelen, Genivia Inc. All Rights Reserved.
The soapcpp2 tool and its generated software are released under the GPL.
This program is released under the GPL with the additional exemption that
compiling, linking, and/or using OpenSSL is allowed.
--------------------------------------------------------------------------------
A commercial use license is available from Genivia Inc., contact@genivia.com
--------------------------------------------------------------------------------
*/
#if defined(__BORLANDC__)
#pragma option push -w-8060
#pragma option push -w-8004
#endif
#include "soapH.h"
SOAP_SOURCE_STAMP("@(#) soapServer.c ver 2.8.129 2023-08-27 23:34:23 GMT")
SOAP_FMAC5 int SOAP_FMAC6 soap_serve(struct soap *soap)
{
#ifndef WITH_FASTCGI
soap->keep_alive = soap->max_keep_alive + 1;
#endif
do
{
#ifndef WITH_FASTCGI
if (soap->keep_alive > 0 && soap->max_keep_alive > 0)
soap->keep_alive--;
#endif
if (soap_begin_serve(soap))
{ if (soap->error >= SOAP_STOP)
continue;
return soap->error;
}
if ((soap_serve_request(soap) || (soap->fserveloop && soap->fserveloop(soap))) && soap->error && soap->error < SOAP_STOP)
{
#ifdef WITH_FASTCGI
soap_send_fault(soap);
#else
return soap_send_fault(soap);
#endif
}
#ifdef WITH_FASTCGI
soap_destroy(soap);
soap_end(soap);
} while (1);
#else
} while (soap->keep_alive);
#endif
return SOAP_OK;
}
#ifndef WITH_NOSERVEREQUEST
SOAP_FMAC5 int SOAP_FMAC6 soap_serve_request(struct soap *soap)
{
soap->mode |= SOAP_XML_STRICT;
(void)soap_peek_element(soap);
if (!soap_match_tag(soap, soap->tag, "ns21:readWitsmlObject"))
return soap_serve_ns21__readWitsmlObject(soap);
return soap->error = SOAP_NO_METHOD;
}
#endif
SOAP_FMAC5 int SOAP_FMAC6 soap_serve_ns21__readWitsmlObject(struct soap *soap)
{ struct ns21__readWitsmlObject soap_tmp_ns21__readWitsmlObject;
struct ns21__readWitsmlObjectResponse soap_tmp_ns21__readWitsmlObjectResponse;
char * soap_tmp_string;
soap_default_ns21__readWitsmlObjectResponse(soap, &soap_tmp_ns21__readWitsmlObjectResponse);
soap_tmp_string = NULL;
soap_tmp_ns21__readWitsmlObjectResponse.result = &soap_tmp_string;
soap_default_ns21__readWitsmlObject(soap, &soap_tmp_ns21__readWitsmlObject);
if (!soap_get_ns21__readWitsmlObject(soap, &soap_tmp_ns21__readWitsmlObject, "ns21:readWitsmlObject", NULL))
return soap->error;
if (soap_body_end_in(soap)
|| soap_envelope_end_in(soap)
|| soap_end_recv(soap))
return soap->error;
soap->error = ns21__readWitsmlObject(soap, soap_tmp_ns21__readWitsmlObject.WitsmlObject, soap_tmp_ns21__readWitsmlObjectResponse.result);
if (soap->error)
return soap->error;
soap->encodingStyle = NULL; /* use SOAP literal style */
soap_serializeheader(soap);
soap_serialize_ns21__readWitsmlObjectResponse(soap, &soap_tmp_ns21__readWitsmlObjectResponse);
if (soap_begin_count(soap))
return soap->error;
if ((soap->mode & SOAP_IO_LENGTH))
{ if (soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns21__readWitsmlObjectResponse(soap, &soap_tmp_ns21__readWitsmlObjectResponse, "ns21:readWitsmlObjectResponse", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap))
return soap->error;
};
if (soap_end_count(soap)
|| soap_response(soap, SOAP_OK)
|| soap_envelope_begin_out(soap)
|| soap_putheader(soap)
|| soap_body_begin_out(soap)
|| soap_put_ns21__readWitsmlObjectResponse(soap, &soap_tmp_ns21__readWitsmlObjectResponse, "ns21:readWitsmlObjectResponse", "")
|| soap_body_end_out(soap)
|| soap_envelope_end_out(soap)
|| soap_end_send(soap))
return soap->error;
return soap_closesock(soap);
}
#if defined(__BORLANDC__)
#pragma option pop
#pragma option pop
#endif
/* End of soapServer.c */