1 /* |
|
2 |
|
3 stdsoap2.h 2.7.6b |
|
4 |
|
5 gSOAP runtime |
|
6 |
|
7 gSOAP XML Web services tools |
|
8 Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved. |
|
9 This part of the software is released under one of the following licenses: |
|
10 GPL, the gSOAP public license, or Genivia's license for commercial use. |
|
11 -------------------------------------------------------------------------------- |
|
12 Contributors: |
|
13 |
|
14 Wind River Systems, Inc., for the following additions (marked WR[...]): |
|
15 - vxWorks compatible |
|
16 -------------------------------------------------------------------------------- |
|
17 gSOAP public license. |
|
18 |
|
19 The contents of this file are subject to the gSOAP Public License Version 1.3 |
|
20 (the "License"); you may not use this file except in compliance with the |
|
21 License. You may obtain a copy of the License at |
|
22 http://www.cs.fsu.edu/~engelen/soaplicense.html |
|
23 Software distributed under the License is distributed on an "AS IS" basis, |
|
24 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License |
|
25 for the specific language governing rights and limitations under the License. |
|
26 |
|
27 The Initial Developer of the Original Code is Robert A. van Engelen. |
|
28 Copyright (C) 2000-2005, Robert van Engelen, Genivia Inc., All Rights Reserved. |
|
29 -------------------------------------------------------------------------------- |
|
30 GPL license. |
|
31 |
|
32 This program is free software; you can redistribute it and/or modify it under |
|
33 the terms of the GNU General Public License as published by the Free Software |
|
34 Foundation; either version 2 of the License, or (at your option) any later |
|
35 version. |
|
36 |
|
37 This program is distributed in the hope that it will be useful, but WITHOUT ANY |
|
38 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
|
39 PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|
40 |
|
41 You should have received a copy of the GNU General Public License along with |
|
42 this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
|
43 Place, Suite 330, Boston, MA 02111-1307 USA |
|
44 |
|
45 Author contact information: |
|
46 engelen@genivia.com / engelen@acm.org |
|
47 -------------------------------------------------------------------------------- |
|
48 A commercial use license is available from Genivia, Inc., contact@genivia.com |
|
49 -------------------------------------------------------------------------------- |
|
50 */ |
|
51 |
|
52 #ifdef WITH_SOAPDEFS_H |
|
53 # include "soapdefs.h" /* include user-defined stuff */ |
|
54 #endif |
|
55 |
|
56 #ifndef _THREAD_SAFE |
|
57 # define _THREAD_SAFE |
|
58 #endif |
|
59 |
|
60 #ifndef OPENSERVER |
|
61 # ifndef _REENTRANT |
|
62 # define _REENTRANT |
|
63 # endif |
|
64 #endif |
|
65 |
|
66 #ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */ |
|
67 # define SOAP_FMAC1 |
|
68 #endif |
|
69 |
|
70 #ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */ |
|
71 # define SOAP_FMAC2 |
|
72 #endif |
|
73 |
|
74 #ifndef SOAP_FMAC3 /* (de)serializer declaration macro */ |
|
75 # define SOAP_FMAC3 |
|
76 #endif |
|
77 |
|
78 #ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */ |
|
79 # define SOAP_FMAC3S SOAP_FMAC3 |
|
80 #endif |
|
81 |
|
82 #ifndef SOAP_FMAC4 /* (de)serializer declaration macro */ |
|
83 # define SOAP_FMAC4 |
|
84 #endif |
|
85 |
|
86 #ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */ |
|
87 # define SOAP_FMAC4S SOAP_FMAC4 |
|
88 #endif |
|
89 |
|
90 #ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */ |
|
91 # define SOAP_FMAC5 |
|
92 #endif |
|
93 |
|
94 #ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */ |
|
95 # define SOAP_FMAC6 |
|
96 #endif |
|
97 |
|
98 #ifndef SOAP_CMAC /* class declaration macro */ |
|
99 # define SOAP_CMAC |
|
100 #endif |
|
101 |
|
102 #ifndef SOAP_NMAC /* namespace table declaration macro */ |
|
103 # define SOAP_NMAC |
|
104 #endif |
|
105 |
|
106 #ifndef SOAP_SOURCE_STAMP |
|
107 # define SOAP_SOURCE_STAMP(str) |
|
108 #endif |
|
109 |
|
110 /* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */ |
|
111 #ifndef WITH_FAST |
|
112 # define WITH_FAST |
|
113 #endif |
|
114 |
|
115 #ifdef WITH_LEANER |
|
116 # ifndef WITH_LEAN |
|
117 # define WITH_LEAN |
|
118 # endif |
|
119 #endif |
|
120 |
|
121 #ifdef WITH_LEAN |
|
122 # ifdef WITH_COOKIES |
|
123 # error "Cannot build WITH_LEAN code WITH_COOKIES enabled" |
|
124 # endif |
|
125 #endif |
|
126 |
|
127 #ifndef STDSOAP_H |
|
128 #define STDSOAP_H |
|
129 |
|
130 #if defined(__vxworks) || defined(__VXWORKS__) |
|
131 # define VXWORKS |
|
132 #endif |
|
133 |
|
134 #ifdef _WIN32 |
|
135 # ifndef WIN32 |
|
136 # define WIN32 |
|
137 # endif |
|
138 #endif |
|
139 |
|
140 #ifdef UNDER_CE |
|
141 # ifndef WIN32 |
|
142 # define WIN32 |
|
143 # endif |
|
144 #endif |
|
145 |
|
146 #ifdef __BORLANDC__ |
|
147 # ifdef __WIN32__ |
|
148 # ifndef WIN32 |
|
149 # define WIN32 |
|
150 # endif |
|
151 # endif |
|
152 #endif |
|
153 |
|
154 #ifdef __CYGWIN__ |
|
155 # ifndef CYGWIN |
|
156 # define CYGWIN |
|
157 # endif |
|
158 #endif |
|
159 |
|
160 #ifdef __SYMBIAN32__ |
|
161 # define SYMBIAN |
|
162 # undef WIN32 |
|
163 #endif |
|
164 |
|
165 #if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__) |
|
166 # ifndef PALM |
|
167 # define PALM |
|
168 # endif |
|
169 #endif |
|
170 |
|
171 #if defined(__hpux) |
|
172 # ifndef HP_UX |
|
173 # define HP_UX |
|
174 # endif |
|
175 #endif |
|
176 |
|
177 #if defined(__alpha) && !defined(__VMS) |
|
178 # ifndef TRU64 |
|
179 # define TRU64 |
|
180 # endif |
|
181 #endif |
|
182 |
|
183 #ifdef __MVS__ |
|
184 # ifndef OS390 |
|
185 # define OS390 |
|
186 # endif |
|
187 #endif |
|
188 |
|
189 #ifdef HAVE_CONFIG_H |
|
190 # include "config.h" |
|
191 # ifdef WITH_OPENSSL |
|
192 # ifndef HAVE_OPENSSL_SSL_H |
|
193 # undef WITH_OPENSSL |
|
194 # endif |
|
195 # endif |
|
196 #else |
|
197 # if defined(UNDER_CE) |
|
198 # define WITH_LEAN |
|
199 # define HAVE_SSCANF |
|
200 # elif defined(WIN32) |
|
201 # define HAVE_STRRCHR |
|
202 # define HAVE_STRTOD |
|
203 # define HAVE_SSCANF |
|
204 # define HAVE_STRTOL |
|
205 # define HAVE_STRTOUL |
|
206 # define HAVE_SYS_TIMEB_H |
|
207 # define HAVE_FTIME |
|
208 # define HAVE_WCTOMB |
|
209 # define HAVE_MBTOWC |
|
210 # define SOAP_LONG_FORMAT "%I64d" |
|
211 # define SOAP_ULONG_FORMAT "%I64u" |
|
212 # elif defined(CYGWIN) |
|
213 # define HAVE_STRRCHR |
|
214 # define HAVE_STRTOD |
|
215 # define HAVE_SSCANF |
|
216 # define HAVE_STRTOL |
|
217 # define HAVE_STRTOUL |
|
218 # define HAVE_SYS_TIMEB_H |
|
219 # define HAVE_FTIME |
|
220 # define HAVE_RAND_R |
|
221 # define HAVE_GMTIME_R |
|
222 # define HAVE_LOCALTIME_R |
|
223 # define HAVE_WCTOMB |
|
224 # define HAVE_MBTOWC |
|
225 # elif defined(__APPLE__) |
|
226 # define HAVE_STRRCHR |
|
227 # define HAVE_STRTOD |
|
228 # define HAVE_SSCANF |
|
229 # define HAVE_STRTOL |
|
230 # define HAVE_STRTOUL |
|
231 # define HAVE_RAND_R |
|
232 # define HAVE_GMTIME_R |
|
233 # define HAVE_LOCALTIME_R |
|
234 # define HAVE_TIMEGM |
|
235 # define HAVE_WCTOMB |
|
236 # define HAVE_MBTOWC |
|
237 # elif defined(_AIXVERSION_431) |
|
238 # define HAVE_STRRCHR |
|
239 # define HAVE_STRTOD |
|
240 # define HAVE_SSCANF |
|
241 # define HAVE_STRTOL |
|
242 # define HAVE_STRTOUL |
|
243 # define HAVE_SYS_TIMEB_H |
|
244 # define HAVE_FTIME |
|
245 # define HAVE_RAND_R |
|
246 # define HAVE_GMTIME_R |
|
247 # define HAVE_LOCALTIME_R |
|
248 # define HAVE_WCTOMB |
|
249 # define HAVE_MBTOWC |
|
250 # elif defined(HP_UX) |
|
251 # define HAVE_STRRCHR |
|
252 # define HAVE_STRTOD |
|
253 # define HAVE_SSCANF |
|
254 # define HAVE_STRTOL |
|
255 # define HAVE_STRTOUL |
|
256 # define HAVE_SYS_TIMEB_H |
|
257 # define HAVE_FTIME |
|
258 # define HAVE_RAND_R |
|
259 # define HAVE_GMTIME_R |
|
260 # define HAVE_LOCALTIME_R |
|
261 # define HAVE_WCTOMB |
|
262 # define HAVE_MBTOWC |
|
263 # elif defined(FREEBSD) || defined(__FreeBSD__) |
|
264 # define HAVE_STRRCHR |
|
265 # define HAVE_STRTOD |
|
266 # define HAVE_SSCANF |
|
267 # define HAVE_STRTOL |
|
268 # define HAVE_STRTOUL |
|
269 # define HAVE_STRTOLL |
|
270 # define HAVE_STRTOULL |
|
271 # define HAVE_GETTIMEOFDAY |
|
272 # define HAVE_RAND_R |
|
273 # define HAVE_GMTIME_R |
|
274 # define HAVE_LOCALTIME_R |
|
275 # define HAVE_WCTOMB |
|
276 # define HAVE_MBTOWC |
|
277 # define SOAP_LONG_FORMAT "%qd" |
|
278 # define SOAP_ULONG_FORMAT "%qu" |
|
279 # elif defined(__VMS) |
|
280 # define HAVE_STRRCHR |
|
281 # define HAVE_STRTOD |
|
282 # define HAVE_SSCANF |
|
283 # define HAVE_STRTOL |
|
284 # define HAVE_STRTOUL |
|
285 # define HAVE_SYS_TIMEB_H |
|
286 # define HAVE_FTIME |
|
287 # define HAVE_RAND_R |
|
288 # define HAVE_GMTIME_R |
|
289 # define HAVE_LOCALTIME_R |
|
290 # define HAVE_WCTOMB |
|
291 # define HAVE_MBTOWC |
|
292 # elif defined(__GLIBC__) || defined(__GNU__) |
|
293 # define HAVE_STRRCHR |
|
294 # define HAVE_STRTOD |
|
295 # define HAVE_SSCANF |
|
296 # define HAVE_STRTOL |
|
297 # define HAVE_STRTOUL |
|
298 # define HAVE_STRTOLL |
|
299 # define HAVE_STRTOULL |
|
300 # define HAVE_SYS_TIMEB_H |
|
301 # define HAVE_FTIME |
|
302 # define HAVE_RAND_R |
|
303 # define HAVE_GMTIME_R |
|
304 # define HAVE_LOCALTIME_R |
|
305 # define HAVE_TIMEGM |
|
306 # define HAVE_WCTOMB |
|
307 # define HAVE_MBTOWC |
|
308 # define HAVE_ISNAN |
|
309 # elif defined(TRU64) |
|
310 # define HAVE_STRRCHR |
|
311 # define HAVE_STRTOD |
|
312 # define HAVE_SSCANF |
|
313 # define HAVE_STRTOL |
|
314 # define HAVE_STRTOUL |
|
315 # define HAVE_STRTOLL |
|
316 # define HAVE_STRTOULL |
|
317 # define HAVE_GETTIMEOFDAY |
|
318 # define HAVE_SYS_TIMEB_H |
|
319 # define HAVE_RAND_R |
|
320 # define HAVE_GMTIME_R |
|
321 # define HAVE_LOCALTIME_R |
|
322 # define __USE_STD_IOSTREAM |
|
323 # define HAVE_WCTOMB |
|
324 # define HAVE_MBTOWC |
|
325 # define SOAP_LONG_FORMAT "%ld" |
|
326 # define SOAP_ULONG_FORMAT "%lu" |
|
327 # elif defined(MAC_CARBON) |
|
328 # define WITH_NOIO |
|
329 # define HAVE_STRRCHR |
|
330 # define HAVE_STRTOD |
|
331 # define HAVE_SSCANF |
|
332 # define HAVE_STRTOL |
|
333 # define HAVE_STRTOUL |
|
334 # define HAVE_FTIME |
|
335 # define HAVE_RAND_R |
|
336 # define HAVE_GETHOSTBYNAME_R |
|
337 # define HAVE_GMTIME_R |
|
338 # define HAVE_LOCALTIME_R |
|
339 # define HAVE_WCTOMB |
|
340 # define HAVE_MBTOWC |
|
341 # elif defined(PALM) |
|
342 # define WITH_LEAN |
|
343 # define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */ |
|
344 # include <stdlib.h> /* Needs to be included before unix headers */ |
|
345 # include <sys_types.h> |
|
346 # define IGNORE_STDIO_STUBS |
|
347 # include <StdIOPalm.h> |
|
348 # define O_NONBLOCK FNONBIO |
|
349 # include <sys_socket.h> |
|
350 # include "palmFunctions.h" |
|
351 # elif defined(SYMBIAN) |
|
352 # define WITH_LEAN |
|
353 # define WITH_NONAMESPACES |
|
354 # define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */ |
|
355 # include <e32def.h> |
|
356 # include <sys/ioctl.h> |
|
357 # elif defined(VXWORKS) |
|
358 # define HAVE_STRRCHR |
|
359 # define HAVE_STRTOD |
|
360 # define HAVE_SSCANF |
|
361 # define HAVE_STRTOL |
|
362 # define HAVE_STRTOUL |
|
363 # define HAVE_PGMTIME_R |
|
364 # define HAVE_PLOCALTIME_R |
|
365 # define HAVE_MKTIME |
|
366 # elif defined(OS390) |
|
367 # define HAVE_STRRCHR |
|
368 # define HAVE_STRTOD |
|
369 # define HAVE_SSCANF |
|
370 # define HAVE_STRTOL |
|
371 # define HAVE_STRTOUL |
|
372 # define HAVE_SYS_TIMEB_H |
|
373 # define HAVE_FTIME |
|
374 # define HAVE_RAND_R |
|
375 # define HAVE_GMTIME_R |
|
376 # define HAVE_LOCALTIME_R |
|
377 # define HAVE_WCTOMB |
|
378 # define HAVE_MB |
|
379 # else |
|
380 /* Default asumptions on supported functions */ |
|
381 # define HAVE_STRRCHR |
|
382 # define HAVE_STRTOD |
|
383 # define HAVE_SSCANF |
|
384 # define HAVE_STRTOL |
|
385 # define HAVE_STRTOUL |
|
386 # define HAVE_SYS_TIMEB_H |
|
387 # define HAVE_FTIME |
|
388 # define HAVE_RAND_R |
|
389 # define HAVE_GETHOSTBYNAME_R |
|
390 # define HAVE_GMTIME_R |
|
391 # define HAVE_LOCALTIME_R |
|
392 # define HAVE_WCTOMB |
|
393 # define HAVE_MBTOWC |
|
394 # endif |
|
395 #endif |
|
396 |
|
397 /* QNX does not have a working version of strtof */ |
|
398 #if defined(__QNX__) || defined(QNX) |
|
399 # undef HAVE_STRTOF |
|
400 #endif |
|
401 |
|
402 #ifndef SOAP_LONG_FORMAT |
|
403 # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */ |
|
404 #endif |
|
405 |
|
406 #ifndef SOAP_ULONG_FORMAT |
|
407 # define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */ |
|
408 #endif |
|
409 |
|
410 #ifndef WITH_NOSTDLIB |
|
411 # include <stdlib.h> |
|
412 # ifndef PALM |
|
413 # include <stdio.h> |
|
414 # include <string.h> |
|
415 # endif |
|
416 # include <ctype.h> |
|
417 # include <limits.h> |
|
418 #endif |
|
419 |
|
420 #if defined(__cplusplus) && !defined(WITH_LEAN) |
|
421 # include <string> |
|
422 # include <iostream> |
|
423 #endif |
|
424 |
|
425 #ifdef WITH_NOHTTP |
|
426 # ifndef WITH_NOIO |
|
427 # define WITH_NOIO |
|
428 # undef WITH_COOKIES |
|
429 # endif |
|
430 #endif |
|
431 |
|
432 #ifndef UNDER_CE |
|
433 # ifndef PALM |
|
434 # ifndef WITH_NOIO |
|
435 # include <errno.h> |
|
436 # include <sys/types.h> |
|
437 # endif |
|
438 # ifndef WITH_LEAN |
|
439 # ifdef HAVE_SYS_TIMEB_H |
|
440 # include <sys/timeb.h> /* for ftime() */ |
|
441 # endif |
|
442 # include <time.h> |
|
443 # endif |
|
444 # endif |
|
445 #endif |
|
446 |
|
447 #ifdef OPENSERVER |
|
448 # include <sys/socket.h> |
|
449 # include <sys/stream.h> |
|
450 # include <sys/protosw.h> |
|
451 extern int h_errno; |
|
452 #endif |
|
453 |
|
454 #ifndef WITH_NOIO |
|
455 # ifndef WIN32 |
|
456 # ifndef PALM |
|
457 # include <sys/socket.h> |
|
458 # ifdef VXWORKS |
|
459 # include <sockLib.h> |
|
460 # include <selectLib.h> |
|
461 # endif |
|
462 # ifndef VXWORKS |
|
463 # ifndef SYMBIAN |
|
464 # include <strings.h> |
|
465 # endif |
|
466 # endif |
|
467 # ifdef SUN_OS |
|
468 # include <sys/stream.h> /* SUN */ |
|
469 # include <sys/socketvar.h> /* SUN < 2.8 (?) */ |
|
470 # endif |
|
471 # ifdef VXWORKS |
|
472 # ifdef _WRS_KERNEL |
|
473 # include <sys/times.h> |
|
474 # endif |
|
475 # else |
|
476 # include <sys/time.h> |
|
477 # endif |
|
478 # include <netinet/in.h> |
|
479 # ifdef OS390 |
|
480 # include <netinet/tcp_var.h> |
|
481 # else |
|
482 # include <netinet/tcp.h> /* TCP_NODELAY */ |
|
483 # endif |
|
484 # include <arpa/inet.h> |
|
485 # endif |
|
486 # endif |
|
487 #endif |
|
488 |
|
489 #ifdef WITH_FASTCGI |
|
490 # include <fcgi_stdio.h> |
|
491 #endif |
|
492 |
|
493 #ifdef WITH_OPENSSL |
|
494 # define OPENSSL_NO_KRB5 |
|
495 # include <openssl/ssl.h> |
|
496 # include <openssl/err.h> |
|
497 # include <openssl/rand.h> |
|
498 # ifndef ALLOW_OLD_VERSIONS |
|
499 # if (OPENSSL_VERSION_NUMBER < 0x00905100L) |
|
500 # error "Must use OpenSSL 0.9.6 or later" |
|
501 # endif |
|
502 # endif |
|
503 #endif |
|
504 |
|
505 #ifdef WITH_GZIP |
|
506 # ifndef WITH_ZLIB |
|
507 # define WITH_ZLIB |
|
508 # endif |
|
509 #endif |
|
510 |
|
511 #ifdef WITH_CASEINSENSITIVETAGS |
|
512 # define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */ |
|
513 #else |
|
514 # define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */ |
|
515 #endif |
|
516 |
|
517 #ifdef WITH_ZLIB |
|
518 # include <zlib.h> |
|
519 #endif |
|
520 |
|
521 #ifndef WITH_NOSTDLIB |
|
522 # ifndef PALM |
|
523 # include <math.h> /* for isnan() */ |
|
524 # endif |
|
525 #endif |
|
526 |
|
527 //#define DEBUG /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */ |
|
528 |
|
529 #ifdef __cplusplus |
|
530 extern "C" { |
|
531 #endif |
|
532 |
|
533 #ifdef WIN32 |
|
534 # ifndef UNDER_CE |
|
535 # include <io.h> |
|
536 # include <fcntl.h> |
|
537 # endif |
|
538 //# include <winsock.h> |
|
539 # include <WinSock2.h> /* Alternative: use winsock2 (not available with eVC) */ |
|
540 # ifdef WITH_IPV6 |
|
541 # include <ws2tcpip.h> |
|
542 # include <wspiapi.h> |
|
543 # endif |
|
544 #else |
|
545 # ifdef VXWORKS |
|
546 # include <hostLib.h> |
|
547 # include <ioctl.h> |
|
548 # include <ioLib.h> |
|
549 # endif |
|
550 # ifndef WITH_NOIO |
|
551 # ifndef PALM |
|
552 # include <netdb.h> |
|
553 # include <netinet/in.h> |
|
554 # include <unistd.h> |
|
555 # include <fcntl.h> |
|
556 # endif |
|
557 # endif |
|
558 #endif |
|
559 |
|
560 /* Portability: define SOAP_SOCKLEN_T */ |
|
561 #if defined(SOCKLEN_T) |
|
562 # define SOAP_SOCKLEN_T SOCKLEN_T |
|
563 #elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX) || defined(_AIX) |
|
564 # define SOAP_SOCKLEN_T socklen_t |
|
565 #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) |
|
566 # define SOAP_SOCKLEN_T int |
|
567 #else |
|
568 # define SOAP_SOCKLEN_T size_t |
|
569 #endif |
|
570 |
|
571 #ifdef WIN32 |
|
572 # define SOAP_SOCKET SOCKET |
|
573 #else |
|
574 # define SOAP_SOCKET int |
|
575 # define closesocket(n) close(n) |
|
576 #endif |
|
577 |
|
578 #define SOAP_INVALID_SOCKET (-1) |
|
579 #define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET) |
|
580 |
|
581 #if defined(SYMBIAN) |
|
582 # define LONG64 long |
|
583 # define ULONG64 unsigned LONG64 |
|
584 #elif !defined(WIN32) || defined(__GLIBC__) || defined(__GNU__) |
|
585 # ifndef LONG64 |
|
586 # define LONG64 long long |
|
587 # define ULONG64 unsigned LONG64 |
|
588 # endif |
|
589 #elif defined(UNDER_CE) |
|
590 # define LONG64 __int64 |
|
591 # define ULONG64 unsigned LONG64 |
|
592 #elif defined(__BORLANDC__) |
|
593 # define LONG64 __int64 |
|
594 # define ULONG64 unsigned LONG64 |
|
595 #endif |
|
596 |
|
597 #if defined(WIN32) |
|
598 # define soap_int32 __int32 |
|
599 #elif defined(SYMBIAN) |
|
600 # define soap_int32 long |
|
601 #elif defined(PALM) |
|
602 # define soap_int32 Int32 |
|
603 #else |
|
604 # define soap_int32 int32_t |
|
605 #endif |
|
606 |
|
607 #ifdef WIN32 |
|
608 # define SOAP_ERANGE ERANGE |
|
609 # define SOAP_EINTR WSAEINTR |
|
610 # define SOAP_EAGAIN WSAEWOULDBLOCK |
|
611 # define SOAP_EWOULDBLOCK WSAEWOULDBLOCK |
|
612 # define SOAP_EINPROGRESS WSAEINPROGRESS |
|
613 #else |
|
614 # define SOAP_ERANGE ERANGE |
|
615 # define SOAP_EINTR EINTR |
|
616 # define SOAP_EAGAIN EAGAIN |
|
617 # ifdef SYMBIAN |
|
618 # define SOAP_EWOULDBLOCK 9898 |
|
619 # define SOAP_EINPROGRESS 9899 |
|
620 # else |
|
621 # define SOAP_EWOULDBLOCK EWOULDBLOCK |
|
622 # define SOAP_EINPROGRESS EINPROGRESS |
|
623 # endif |
|
624 #endif |
|
625 |
|
626 #ifdef WIN32 |
|
627 # ifdef UNDER_CE |
|
628 # define soap_errno GetLastError() |
|
629 # define soap_socket_errno GetLastError() |
|
630 # else |
|
631 # define soap_errno GetLastError() |
|
632 # define soap_socket_errno WSAGetLastError() |
|
633 # endif |
|
634 #else |
|
635 # ifndef WITH_NOIO |
|
636 # define soap_errno errno |
|
637 # define soap_socket_errno errno |
|
638 # else |
|
639 # define soap_errno 0 |
|
640 # define soap_socket_errno 0 |
|
641 # endif |
|
642 #endif |
|
643 |
|
644 #ifndef SOAP_BUFLEN |
|
645 # ifdef WITH_UDP |
|
646 # define SOAP_BUFLEN (65536) /* max UDP packet size */ |
|
647 # else |
|
648 # ifndef WITH_LEAN |
|
649 # define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */ |
|
650 # else |
|
651 # define SOAP_BUFLEN (2048) |
|
652 # endif |
|
653 # endif |
|
654 #endif |
|
655 #ifndef SOAP_LABLEN |
|
656 # define SOAP_LABLEN (64) /* initial look-aside buffer length */ |
|
657 #endif |
|
658 #ifndef SOAP_PTRBLK |
|
659 # define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */ |
|
660 #endif |
|
661 #ifndef SOAP_PTRHASH |
|
662 # ifndef WITH_LEAN |
|
663 # define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */ |
|
664 # else |
|
665 # define SOAP_PTRHASH (32) |
|
666 # endif |
|
667 #endif |
|
668 #ifndef SOAP_IDHASH |
|
669 # ifndef WITH_LEAN |
|
670 # define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */ |
|
671 # else |
|
672 # define SOAP_IDHASH (19) /* 19, 199 */ |
|
673 # endif |
|
674 #endif |
|
675 #ifndef SOAP_BLKLEN |
|
676 # ifndef WITH_LEAN |
|
677 # define SOAP_BLKLEN (256) /* size of blocks to collect long strings and XML attributes */ |
|
678 # else |
|
679 # define SOAP_BLKLEN (32) |
|
680 # endif |
|
681 #endif |
|
682 #ifndef SOAP_TAGLEN |
|
683 # ifndef WITH_LEAN |
|
684 # define SOAP_TAGLEN (256) /* maximum length of XML element tag/attribute name or host/path name + 1 */ |
|
685 # else |
|
686 # define SOAP_TAGLEN (64) |
|
687 # endif |
|
688 #endif |
|
689 #ifndef SOAP_HDRLEN |
|
690 # ifndef WITH_LEAN |
|
691 # define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */ |
|
692 # else |
|
693 # define SOAP_HDRLEN (1024) |
|
694 # endif |
|
695 #endif |
|
696 #ifndef SOAP_MAXDIMS |
|
697 # ifndef WITH_LEAN |
|
698 # define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */ |
|
699 # else |
|
700 # define SOAP_MAXDIMS (4) |
|
701 # endif |
|
702 #endif |
|
703 |
|
704 #ifndef SOAP_MAXLOGS |
|
705 # define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */ |
|
706 # define SOAP_INDEX_RECV (0) |
|
707 # define SOAP_INDEX_SENT (1) |
|
708 # define SOAP_INDEX_TEST (2) |
|
709 #endif |
|
710 |
|
711 #ifndef SOAP_MAXKEEPALIVE |
|
712 # define SOAP_MAXKEEPALIVE (100) /* max iterations to keep server connection alive */ |
|
713 #endif |
|
714 |
|
715 #ifndef SOAP_MAXARRAYSIZE |
|
716 # define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */ |
|
717 #endif |
|
718 |
|
719 #ifdef VXWORKS |
|
720 # ifdef __INCmathh |
|
721 # include <private/mathP.h> |
|
722 # ifndef HAVE_ISNAN |
|
723 # define HAVE_ISNAN |
|
724 # endif |
|
725 # define soap_isnan(num) isNan(num) |
|
726 # endif |
|
727 #endif |
|
728 |
|
729 #ifdef WIN32 |
|
730 # include <float.h> |
|
731 # ifndef HAVE_ISNAN |
|
732 # define HAVE_ISNAN |
|
733 # endif |
|
734 # define soap_isnan(num) _isnan(num) |
|
735 #endif |
|
736 |
|
737 #ifdef SUN_OS |
|
738 # define soap_isnan(n) isnan(n) |
|
739 #endif |
|
740 |
|
741 #if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED)) |
|
742 # define HAVE_ISNAN |
|
743 #endif |
|
744 |
|
745 #ifndef soap_isnan |
|
746 # ifdef HAVE_ISNAN |
|
747 # define soap_isnan(n) isnan(n) |
|
748 # else |
|
749 # define soap_isnan(_) (0) |
|
750 # endif |
|
751 #endif |
|
752 |
|
753 extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan; |
|
754 |
|
755 #ifdef VXWORKS |
|
756 # ifndef FLT_MAX |
|
757 # define FLT_MAX _ARCH_FLT_MAX |
|
758 # endif |
|
759 # ifndef DBL_MAX |
|
760 # define DBL_MAX _ARCH_DBL_MAX |
|
761 # endif |
|
762 #endif |
|
763 |
|
764 #ifndef FLT_NAN |
|
765 # ifdef HAVE_ISNAN |
|
766 # define FLT_NAN (*(float*)(void*)&soap_double_nan) |
|
767 # else |
|
768 # define FLT_NAN (0.0) |
|
769 # endif |
|
770 #endif |
|
771 |
|
772 #ifndef FLT_PINFTY |
|
773 # if defined(FLT_MAX) |
|
774 # define FLT_PINFTY FLT_MAX |
|
775 # elif defined(HUGE_VALF) |
|
776 # define FLT_PINFTY (float)HUGE_VALF |
|
777 # elif defined(HUGE_VAL) |
|
778 # define FLT_PINFTY (float)HUGE_VAL |
|
779 # elif defined(FLOAT_MAX) |
|
780 # define FLT_PINFTY FLOAT_MAX |
|
781 # else |
|
782 # define FLT_PINFTY (3.40282347e+38F) |
|
783 # endif |
|
784 #endif |
|
785 |
|
786 #ifndef FLT_NINFTY |
|
787 # define FLT_NINFTY (-FLT_PINFTY) |
|
788 #endif |
|
789 |
|
790 #ifndef DBL_NAN |
|
791 # ifdef HAVE_ISNAN |
|
792 # define DBL_NAN (*(double*)(void*)&soap_double_nan) |
|
793 # else |
|
794 # define DBL_NAN (0.0) |
|
795 # endif |
|
796 #endif |
|
797 |
|
798 #ifndef DBL_PINFTY |
|
799 # if defined(DBL_MAX) |
|
800 # define DBL_PINFTY DBL_MAX |
|
801 # elif defined(HUGE_VALF) |
|
802 # define DBL_PINFTY (double)HUGE_VALF |
|
803 # elif defined(HUGE_VAL) |
|
804 # define DBL_PINFTY (double)HUGE_VAL |
|
805 # elif defined(DOUBLE_MAX) |
|
806 # define DBL_PINFTY DOUBLE_MAX |
|
807 # else |
|
808 # define DBL_PINFTY (1.7976931348623157e+308) |
|
809 # endif |
|
810 #endif |
|
811 |
|
812 #ifndef DBL_NINFTY |
|
813 # define DBL_NINFTY (-DBL_PINFTY) |
|
814 #endif |
|
815 |
|
816 #define soap_ispinfd(n) ((n) >= DBL_PINFTY) |
|
817 #define soap_ispinff(n) ((n) >= FLT_PINFTY) |
|
818 #define soap_isninfd(n) ((n) <= DBL_NINFTY) |
|
819 #define soap_isninff(n) ((n) <= FLT_NINFTY) |
|
820 |
|
821 /* gSOAP error codes */ |
|
822 |
|
823 #define SOAP_EOF EOF |
|
824 #define SOAP_ERR EOF |
|
825 #define SOAP_OK 0 |
|
826 #define SOAP_CLI_FAULT 1 |
|
827 #define SOAP_SVR_FAULT 2 |
|
828 #define SOAP_TAG_MISMATCH 3 |
|
829 #define SOAP_TYPE 4 |
|
830 #define SOAP_SYNTAX_ERROR 5 |
|
831 #define SOAP_NO_TAG 6 |
|
832 #define SOAP_IOB 7 |
|
833 #define SOAP_MUSTUNDERSTAND 8 |
|
834 #define SOAP_NAMESPACE 9 |
|
835 #define SOAP_USER_ERROR 10 |
|
836 #define SOAP_FATAL_ERROR 11 |
|
837 #define SOAP_FAULT 12 |
|
838 #define SOAP_NO_METHOD 13 |
|
839 #define SOAP_GET_METHOD 14 |
|
840 #define SOAP_EOM 15 |
|
841 #define SOAP_NULL 16 |
|
842 #define SOAP_DUPLICATE_ID 17 |
|
843 #define SOAP_MISSING_ID 18 |
|
844 #define SOAP_HREF 19 |
|
845 #define SOAP_UDP_ERROR 20 |
|
846 #define SOAP_TCP_ERROR 21 |
|
847 #define SOAP_HTTP_ERROR 22 |
|
848 #define SOAP_SSL_ERROR 23 |
|
849 #define SOAP_ZLIB_ERROR 24 |
|
850 #define SOAP_DIME_ERROR 25 |
|
851 #define SOAP_DIME_HREF 26 |
|
852 #define SOAP_DIME_MISMATCH 27 |
|
853 #define SOAP_DIME_END 28 |
|
854 #define SOAP_MIME_ERROR 29 |
|
855 #define SOAP_MIME_HREF 30 |
|
856 #define SOAP_MIME_END 31 |
|
857 #define SOAP_VERSIONMISMATCH 32 |
|
858 #define SOAP_PLUGIN_ERROR 33 |
|
859 #define SOAP_DATAENCODINGUNKNOWN 34 |
|
860 #define SOAP_REQUIRED 35 |
|
861 #define SOAP_PROHIBITED 36 |
|
862 #define SOAP_OCCURS 37 |
|
863 #define SOAP_LENGTH 38 |
|
864 |
|
865 #define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_DUPLICATE_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF) |
|
866 #define soap_soap_error_check(e) ((e) == SOAP_CLI_FAULT || (e) == SOAP_SVR_FAULT || (e) == SOAP_VERSIONMISMATCH || (e) == SOAP_MUSTUNDERSTAND || (e) == SOAP_FAULT || (e) == SOAP_NO_METHOD) |
|
867 #define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR) |
|
868 #define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR) |
|
869 #define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR) |
|
870 #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600)) |
|
871 |
|
872 /* gSOAP HTTP response status codes 100 to 599 are reserved */ |
|
873 |
|
874 /* Codes 600 to 999 are user definable */ |
|
875 |
|
876 /* Exceptional gSOAP HTTP response status codes >= 1000 */ |
|
877 |
|
878 #define SOAP_STOP 1000 /* No HTTP response */ |
|
879 #define SOAP_FORM 1001 /* Form request/response */ |
|
880 #define SOAP_HTML 1002 /* Custom HTML response */ |
|
881 #define SOAP_FILE 1003 /* Custom file-based response */ |
|
882 |
|
883 /* gSOAP HTTP method codes */ |
|
884 |
|
885 #define SOAP_POST 2000 |
|
886 #define SOAP_GET 2001 |
|
887 |
|
888 /* gSOAP DIME */ |
|
889 |
|
890 #define SOAP_DIME_CF 0x01 |
|
891 #define SOAP_DIME_ME 0x02 |
|
892 #define SOAP_DIME_MB 0x04 |
|
893 #define SOAP_DIME_VERSION 0x08 /* DIME version 1 */ |
|
894 #define SOAP_DIME_MEDIA 0x10 |
|
895 #define SOAP_DIME_ABSURI 0x20 |
|
896 |
|
897 /* gSOAP ZLIB */ |
|
898 |
|
899 #define SOAP_ZLIB_NONE 0x00 |
|
900 #define SOAP_ZLIB_DEFLATE 0x01 |
|
901 #define SOAP_ZLIB_INFLATE 0x02 |
|
902 #define SOAP_ZLIB_GZIP 0x02 |
|
903 |
|
904 /* gSOAP transport, connection, and content encoding modes */ |
|
905 |
|
906 typedef soap_int32 soap_mode; |
|
907 |
|
908 #define SOAP_IO 0x00000003 /* IO mask */ |
|
909 #define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */ |
|
910 #define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */ |
|
911 #define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */ |
|
912 #define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */ |
|
913 |
|
914 #define SOAP_IO_UDP 0x00000004 |
|
915 #define SOAP_IO_LENGTH 0x00000008 |
|
916 #define SOAP_IO_KEEPALIVE 0x00000010 |
|
917 |
|
918 #define SOAP_ENC_LATIN 0x00800020 /* iso-8859-1 encoding */ |
|
919 #define SOAP_ENC_XML 0x00000040 /* plain XML encoding, no HTTP header */ |
|
920 #define SOAP_ENC_DIME 0x00000080 |
|
921 #define SOAP_ENC_MIME 0x00000100 |
|
922 #define SOAP_ENC_MTOM 0x00000200 |
|
923 #define SOAP_ENC_ZLIB 0x00000400 |
|
924 #define SOAP_ENC_SSL 0x00000800 |
|
925 |
|
926 #define SOAP_ENC 0x00000FFF /* IO and ENC mask */ |
|
927 |
|
928 #define SOAP_XML_STRICT 0x00001000 /* strict validation */ |
|
929 #define SOAP_XML_INDENT 0x00002000 |
|
930 #define SOAP_XML_CANONICAL 0x00004000 /* EXC C14N canonical XML */ |
|
931 #define SOAP_XML_TREE 0x00008000 |
|
932 #define SOAP_XML_GRAPH 0x00010000 |
|
933 #define SOAP_XML_NIL 0x00020000 |
|
934 #define SOAP_XML_DOM 0x00040000 |
|
935 #define SOAP_XML_SEC 0x00080000 /* reserved for WS security */ |
|
936 |
|
937 #define SOAP_C_NOIOB 0x00100000 |
|
938 #define SOAP_C_UTFSTRING 0x00200000 |
|
939 #define SOAP_C_MBSTRING 0x00400000 |
|
940 |
|
941 #define SOAP_DOM_TREE 0x01000000 |
|
942 #define SOAP_DOM_NODE 0x02000000 |
|
943 #define SOAP_DOM_ASIS 0x04000000 |
|
944 |
|
945 #define SOAP_IO_DEFAULT SOAP_IO_FLUSH |
|
946 |
|
947 /* SSL client/server authentication settings */ |
|
948 |
|
949 #define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */ |
|
950 #define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */ |
|
951 #define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */ |
|
952 |
|
953 #define SOAP_SSL_DEFAULT SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION |
|
954 |
|
955 /* */ |
|
956 |
|
957 #define SOAP_BEGIN 0 |
|
958 #define SOAP_IN_ENVELOPE 2 |
|
959 #define SOAP_IN_HEADER 3 |
|
960 #define SOAP_END_HEADER 4 |
|
961 #define SOAP_NO_BODY 5 |
|
962 #define SOAP_IN_BODY 6 |
|
963 #define SOAP_END_BODY 7 |
|
964 #define SOAP_END_ENVELOPE 8 |
|
965 #define SOAP_END 9 |
|
966 #define SOAP_BEGIN_SECURITY 10 |
|
967 #define SOAP_IN_SECURITY 11 |
|
968 #define SOAP_END_SECURITY 12 |
|
969 |
|
970 /* DEBUG macros */ |
|
971 |
|
972 #ifndef WITH_LEAN |
|
973 # ifdef DEBUG |
|
974 # ifndef SOAP_DEBUG |
|
975 # define SOAP_DEBUG |
|
976 # endif |
|
977 # endif |
|
978 #endif |
|
979 |
|
980 #ifdef SOAP_DEBUG |
|
981 # define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size) |
|
982 # define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr) |
|
983 #endif |
|
984 |
|
985 #ifndef SOAP_MALLOC /* use libc malloc */ |
|
986 # define SOAP_MALLOC(soap, size) malloc(size) |
|
987 #endif |
|
988 |
|
989 #ifndef SOAP_FREE /* use libc free */ |
|
990 # define SOAP_FREE(soap, ptr) free(ptr) |
|
991 #endif |
|
992 |
|
993 #ifdef SOAP_DEBUG |
|
994 # ifndef SOAP_MESSAGE |
|
995 # define SOAP_MESSAGE fprintf |
|
996 # endif |
|
997 # ifndef DBGLOG |
|
998 # define DBGLOG(DBGFILE, CMD) \ |
|
999 { if (soap)\ |
|
1000 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ |
|
1001 soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ |
|
1002 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ |
|
1003 { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\ |
|
1004 CMD;\ |
|
1005 fflush(fdebug);\ |
|
1006 }\ |
|
1007 }\ |
|
1008 } |
|
1009 # endif |
|
1010 # ifndef DBGMSG |
|
1011 # define DBGMSG(DBGFILE, MSG, LEN) \ |
|
1012 { if (soap)\ |
|
1013 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ |
|
1014 soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ |
|
1015 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ |
|
1016 { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\ |
|
1017 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ |
|
1018 }\ |
|
1019 }\ |
|
1020 } |
|
1021 # endif |
|
1022 # ifndef DGBFUN |
|
1023 # define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME)) |
|
1024 # define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG))) |
|
1025 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2))) |
|
1026 # define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2", "FMT3")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2), (ARG3))) |
|
1027 # endif |
|
1028 # ifndef DBGHEX |
|
1029 # define DBGHEX(DBGFILE, MSG, LEN) \ |
|
1030 { if (soap)\ |
|
1031 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\ |
|
1032 soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\ |
|
1033 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\ |
|
1034 { int i; char *s;\ |
|
1035 for (s = (char*)(MSG), i = (LEN); i; i--)\ |
|
1036 fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2hhX ", *s++);\ |
|
1037 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\ |
|
1038 }\ |
|
1039 }\ |
|
1040 } |
|
1041 # endif |
|
1042 #else |
|
1043 # define DBGLOG(DBGFILE, CMD) |
|
1044 # define DBGMSG(DBGFILE, MSG, LEN) |
|
1045 # define DBGFUN(FNAME) |
|
1046 # define DBGFUN1(FNAME, FMT, ARG) |
|
1047 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) |
|
1048 # define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3) |
|
1049 # define DBGHEX(DBGFILE, MSG, LEN) |
|
1050 #endif |
|
1051 |
|
1052 /* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */ |
|
1053 typedef soap_int32 soap_wchar; |
|
1054 |
|
1055 /* namespace table row */ |
|
1056 struct Namespace |
|
1057 { const char *id; |
|
1058 const char *ns; |
|
1059 const char *in; |
|
1060 char *out; |
|
1061 }; |
|
1062 |
|
1063 /* namespace stack */ |
|
1064 struct soap_nlist |
|
1065 { struct soap_nlist *next; |
|
1066 unsigned int level; /* nesting depth level */ |
|
1067 short index; /* corresponding entry in ns mapping table */ |
|
1068 char *ns; /* only set when parsed ns URI is not in the ns mapping table */ |
|
1069 char id[1]; /* the actual string value flows into the allocated region below this struct */ |
|
1070 }; |
|
1071 |
|
1072 /* block stack for nested block allocations */ |
|
1073 struct soap_blist |
|
1074 { struct soap_blist *next; |
|
1075 char *ptr; |
|
1076 size_t size; |
|
1077 }; |
|
1078 |
|
1079 /* array layout */ |
|
1080 struct soap_array |
|
1081 { void *__ptr; |
|
1082 int __size; |
|
1083 }; |
|
1084 |
|
1085 /* pointer serialization management */ |
|
1086 struct soap_plist |
|
1087 { struct soap_plist *next; |
|
1088 const void *ptr; |
|
1089 const struct soap_array *array; |
|
1090 int type; |
|
1091 int id; |
|
1092 char mark1; |
|
1093 char mark2; |
|
1094 }; |
|
1095 |
|
1096 /* block allocation for pointer serialization management */ |
|
1097 struct soap_pblk |
|
1098 { struct soap_pblk *next; |
|
1099 struct soap_plist plist[SOAP_PTRBLK]; |
|
1100 }; |
|
1101 |
|
1102 #ifdef SOAP_DEBUG |
|
1103 /* malloc/free tracking for debugging */ |
|
1104 struct soap_mlist |
|
1105 { struct soap_mlist *next; |
|
1106 const void *ptr; |
|
1107 const char *file; |
|
1108 int line; |
|
1109 short live; |
|
1110 }; |
|
1111 #endif |
|
1112 |
|
1113 /* class allocation list */ |
|
1114 struct soap_clist |
|
1115 { struct soap_clist *next; |
|
1116 void *ptr; |
|
1117 int type; |
|
1118 int size; |
|
1119 void (*fdelete)(struct soap_clist*); |
|
1120 }; |
|
1121 |
|
1122 /* attributes */ |
|
1123 struct soap_attribute |
|
1124 { struct soap_attribute *next; |
|
1125 char *value; |
|
1126 size_t size; |
|
1127 char *ns; |
|
1128 short visible; |
|
1129 char name[1]; /* the actual name string flows into the allocated region below this struct */ |
|
1130 }; |
|
1131 |
|
1132 struct soap_cookie |
|
1133 { struct soap_cookie *next; |
|
1134 char *name; |
|
1135 char *value; |
|
1136 char *domain; |
|
1137 char *path; |
|
1138 long expire; /* client-side: local time to expire; server-side: seconds to expire */ |
|
1139 unsigned int version; |
|
1140 short secure; |
|
1141 short session; /* server-side */ |
|
1142 short env; /* server-side: got cookie from client and should not be (re)send */ |
|
1143 short modified; /* server-side: client cookie was modified and should be send */ |
|
1144 }; |
|
1145 |
|
1146 #ifdef __cplusplus |
|
1147 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); |
|
1148 |
|
1149 class soap_multipart_iterator |
|
1150 { public: |
|
1151 struct soap_multipart *content; |
|
1152 bool operator==(const soap_multipart_iterator& iter) const |
|
1153 { return content == iter.content; } |
|
1154 bool operator!=(const soap_multipart_iterator& iter) const |
|
1155 { return content != iter.content; } |
|
1156 struct soap_multipart &operator*() const |
|
1157 { return *content; } |
|
1158 soap_multipart_iterator &operator++() |
|
1159 { content = soap_next_multipart(content); return *this; } |
|
1160 soap_multipart_iterator() : content(NULL) |
|
1161 { } |
|
1162 soap_multipart_iterator(struct soap_multipart *p) : content(p) |
|
1163 { } |
|
1164 }; |
|
1165 #endif |
|
1166 |
|
1167 #ifndef WITH_LEANER |
|
1168 struct soap_dime |
|
1169 { size_t count; |
|
1170 size_t size; |
|
1171 size_t chunksize; |
|
1172 size_t buflen; |
|
1173 char flags; |
|
1174 char *ptr; |
|
1175 const char *id; |
|
1176 const char *type; |
|
1177 const char *options; |
|
1178 struct soap_multipart *list; /* list of DIME attachments received */ |
|
1179 struct soap_multipart *first, *last; /* temporary in/out queue */ |
|
1180 #ifdef __cplusplus |
|
1181 soap_multipart_iterator begin() |
|
1182 { soap_multipart_iterator iter(list); return iter; }; |
|
1183 soap_multipart_iterator end() |
|
1184 { soap_multipart_iterator iter(NULL); return iter; }; |
|
1185 #endif |
|
1186 }; |
|
1187 #endif |
|
1188 |
|
1189 #ifndef WITH_LEANER |
|
1190 struct soap_mime |
|
1191 { char *boundary; /* MIME boundary */ |
|
1192 const char *start; /* MIME start ID */ |
|
1193 struct soap_multipart *list; /* list of MIME attachments received */ |
|
1194 struct soap_multipart *first, *last; /* temporary in/out queue */ |
|
1195 #ifdef __cplusplus |
|
1196 soap_multipart_iterator begin() |
|
1197 { soap_multipart_iterator iter(list); return iter; }; |
|
1198 soap_multipart_iterator end() |
|
1199 { soap_multipart_iterator iter(NULL); return iter; }; |
|
1200 #endif |
|
1201 }; |
|
1202 #endif |
|
1203 |
|
1204 #ifndef WITH_LEANER |
|
1205 /* RFC2045 MIME content transfer encodings */ |
|
1206 enum soap_mime_encoding |
|
1207 { SOAP_MIME_NONE, |
|
1208 SOAP_MIME_7BIT, |
|
1209 SOAP_MIME_8BIT, |
|
1210 SOAP_MIME_BINARY, |
|
1211 SOAP_MIME_QUOTED_PRINTABLE, |
|
1212 SOAP_MIME_BASE64, |
|
1213 SOAP_MIME_IETF_TOKEN, |
|
1214 SOAP_MIME_X_TOKEN |
|
1215 }; |
|
1216 #endif |
|
1217 |
|
1218 #ifndef WITH_LEANER |
|
1219 /* DIME/MIME multipart list */ |
|
1220 struct soap_multipart |
|
1221 { struct soap_multipart *next; |
|
1222 char *ptr; /* points to raw data content */ |
|
1223 size_t size; /* size of data content */ |
|
1224 const char *id; /* DIME/MIME content ID or form data name */ |
|
1225 const char *type; /* DIME/MIME type (MIME type format) */ |
|
1226 const char *options; /* DIME options */ |
|
1227 enum soap_mime_encoding encoding; /* MIME Content-Transfer-Encoding */ |
|
1228 const char *location; /* MIME Content-Location (optional) */ |
|
1229 const char *description; /* MIME Content-Description (optional) */ |
|
1230 #ifdef __cplusplus |
|
1231 typedef soap_multipart_iterator iterator; |
|
1232 #endif |
|
1233 }; |
|
1234 #endif |
|
1235 |
|
1236 #ifndef WITH_LEANER |
|
1237 /* attachment DIME and MTOM XOP forwarding */ |
|
1238 struct soap_xlist |
|
1239 { struct soap_xlist *next; |
|
1240 unsigned char **ptr; |
|
1241 int *size; |
|
1242 char *id; |
|
1243 char **type; |
|
1244 char **options; |
|
1245 }; |
|
1246 #endif |
|
1247 |
|
1248 /******************************************************************************/ |
|
1249 |
|
1250 #ifndef WITH_LEANER |
|
1251 #ifdef __cplusplus |
|
1252 class soap_dom_attribute_iterator |
|
1253 { public: |
|
1254 struct soap_dom_attribute *att; |
|
1255 const char *nstr; |
|
1256 const char *name; |
|
1257 bool operator==(const soap_dom_attribute_iterator&) const; |
|
1258 bool operator!=(const soap_dom_attribute_iterator&) const; |
|
1259 struct soap_dom_attribute &operator*() const; |
|
1260 soap_dom_attribute_iterator &operator++(); |
|
1261 soap_dom_attribute_iterator(); |
|
1262 soap_dom_attribute_iterator(struct soap_dom_attribute*); |
|
1263 ~soap_dom_attribute_iterator(); |
|
1264 }; |
|
1265 #endif |
|
1266 #endif |
|
1267 |
|
1268 #ifndef WITH_LEANER |
|
1269 struct soap_dom_attribute |
|
1270 { struct soap_dom_attribute *next; |
|
1271 const char *nstr; |
|
1272 char *name; |
|
1273 char *data; |
|
1274 wchar_t *wide; |
|
1275 struct soap *soap; |
|
1276 #ifdef __cplusplus |
|
1277 typedef soap_dom_attribute_iterator iterator; |
|
1278 struct soap_dom_attribute &set(const char *nstr, const char *name); /* set namespace and name */ |
|
1279 struct soap_dom_attribute &set(const char *data); /* set data */ |
|
1280 soap_dom_attribute_iterator begin(); |
|
1281 soap_dom_attribute_iterator end(); |
|
1282 soap_dom_attribute_iterator find(const char *nstr, const char *name); |
|
1283 void unlink(); |
|
1284 soap_dom_attribute(); |
|
1285 soap_dom_attribute(struct soap *soap); |
|
1286 soap_dom_attribute(struct soap *soap, const char *nstr, const char *name, const char *data); |
|
1287 ~soap_dom_attribute(); |
|
1288 #endif |
|
1289 }; |
|
1290 #endif |
|
1291 |
|
1292 #ifndef WITH_LEANER |
|
1293 #ifdef __cplusplus |
|
1294 class soap_dom_element_iterator |
|
1295 { public: |
|
1296 struct soap_dom_element *elt; |
|
1297 const char *nstr; |
|
1298 const char *name; |
|
1299 int type; |
|
1300 bool operator==(const soap_dom_element_iterator&) const; |
|
1301 bool operator!=(const soap_dom_element_iterator&) const; |
|
1302 struct soap_dom_element &operator*() const; |
|
1303 soap_dom_element_iterator &operator++(); |
|
1304 soap_dom_element_iterator(); |
|
1305 soap_dom_element_iterator(struct soap_dom_element*); |
|
1306 ~soap_dom_element_iterator(); |
|
1307 }; |
|
1308 #endif |
|
1309 #endif |
|
1310 |
|
1311 #ifndef WITH_LEANER |
|
1312 struct soap_dom_element |
|
1313 { struct soap_dom_element *next; /* next sibling */ |
|
1314 struct soap_dom_element *prnt; /* parent */ |
|
1315 struct soap_dom_element *elts; /* list of child elements */ |
|
1316 struct soap_dom_attribute *atts; /* list of attributes */ |
|
1317 const char *nstr; /* namespace string */ |
|
1318 char *name; /* element tag name */ |
|
1319 char *data; /* element content data (with SOAP_C_UTFSTRING flag set) */ |
|
1320 wchar_t *wide; /* element content data */ |
|
1321 int type; /* optional: serialized C/C++ data type */ |
|
1322 void *node; /* optional: pointer to serialized C/C++ data */ |
|
1323 char *head; /* leading whitespace to start tag */ |
|
1324 char *tail; /* leading whitespace to end tag */ |
|
1325 struct soap *soap; /* soap context that manages this node */ |
|
1326 #ifdef __cplusplus |
|
1327 typedef soap_dom_element_iterator iterator; |
|
1328 struct soap_dom_element &set(const char *nstr, const char *name); |
|
1329 struct soap_dom_element &set(const char *data); |
|
1330 struct soap_dom_element &set(void *node, int type); |
|
1331 struct soap_dom_element &add(struct soap_dom_element*); |
|
1332 struct soap_dom_element &add(struct soap_dom_element&); |
|
1333 struct soap_dom_element &add(struct soap_dom_attribute*); |
|
1334 struct soap_dom_element &add(struct soap_dom_attribute&); |
|
1335 soap_dom_element_iterator begin(); |
|
1336 soap_dom_element_iterator end(); |
|
1337 soap_dom_element_iterator find(const char *nstr, const char *name); |
|
1338 soap_dom_element_iterator find(int type); |
|
1339 void unlink(); |
|
1340 soap_dom_element(); |
|
1341 soap_dom_element(struct soap *soap); |
|
1342 soap_dom_element(struct soap *soap, const char *nstr, const char *name); |
|
1343 soap_dom_element(struct soap *soap, const char *nstr, const char *name, const char *data); |
|
1344 soap_dom_element(struct soap *soap, const char *nstr, const char *name, void *node, int type); |
|
1345 ~soap_dom_element(); |
|
1346 #endif |
|
1347 }; |
|
1348 SOAP_FMAC1 const char* SOAP_FMAC2 soap_dom_current_nstr(struct soap *soap, const char *tag); |
|
1349 SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt); |
|
1350 SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att); |
|
1351 #endif |
|
1352 |
|
1353 #if defined(__cplusplus) && !defined(WITH_LEAN) |
|
1354 } |
|
1355 extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&); |
|
1356 extern std::istream &operator>>(std::istream&, struct soap_dom_element&); |
|
1357 extern "C" { |
|
1358 #endif |
|
1359 |
|
1360 /******************************************************************************/ |
|
1361 |
|
1362 struct soap |
|
1363 { short version; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */ |
|
1364 short copy; /* 1 = copy of another soap struct */ |
|
1365 soap_mode mode; |
|
1366 soap_mode imode; |
|
1367 soap_mode omode; |
|
1368 const char *float_format; /* user-definable format string for floats (<1024 chars) */ |
|
1369 const char *double_format; /* user-definable format string for doubles (<1024 chars) */ |
|
1370 const char *dime_id_format; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */ |
|
1371 const char *http_version; /* HTTP version used "1.0" or "1.1" */ |
|
1372 const char *http_content; /* optional custom response content type (with SOAP_FILE) */ |
|
1373 const char *encodingStyle; /* default = NULL which means that SOAP encoding is used */ |
|
1374 const char *actor; /* SOAP-ENV:actor or role attribute value */ |
|
1375 int recv_timeout; /* when > 0, gives socket recv timeout in seconds, < 0 in usec */ |
|
1376 int send_timeout; /* when > 0, gives socket send timeout in seconds, < 0 in usec */ |
|
1377 int connect_timeout; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */ |
|
1378 int accept_timeout; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */ |
|
1379 int socket_flags; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */ |
|
1380 int connect_flags; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */ |
|
1381 int bind_flags; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */ |
|
1382 int accept_flags; /* accept() SOL_SOCKET sockopt flags */ |
|
1383 const struct Namespace *namespaces; /* Pointer to global namespace mapping table */ |
|
1384 struct Namespace *local_namespaces; /* Local namespace mapping table */ |
|
1385 struct soap_nlist *nlist; /* namespace stack */ |
|
1386 struct soap_blist *blist; /* block allocation stack */ |
|
1387 struct soap_clist *clist; /* class instance allocation list */ |
|
1388 void *alist; /* memory allocation (malloc) list */ |
|
1389 struct soap_ilist *iht[SOAP_IDHASH]; |
|
1390 struct soap_plist *pht[SOAP_PTRHASH]; |
|
1391 struct soap_pblk *pblk; /* plist block allocation */ |
|
1392 short pidx; /* plist block allocation */ |
|
1393 struct SOAP_ENV__Header *header; |
|
1394 struct SOAP_ENV__Fault *fault; |
|
1395 int idnum; |
|
1396 void *user; /* to pass user-defined data */ |
|
1397 struct soap_plugin *plugins; /* linked list of plug-in data */ |
|
1398 char *userid; /* HTTP Basic authorization userid */ |
|
1399 char *passwd; /* HTTP Basic authorization passwd */ |
|
1400 int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t); |
|
1401 int (*fget)(struct soap*); |
|
1402 int (*fform)(struct soap*); |
|
1403 int (*fposthdr)(struct soap*, const char*, const char*); |
|
1404 int (*fresponse)(struct soap*, int, size_t); |
|
1405 int (*fparse)(struct soap*); |
|
1406 int (*fparsehdr)(struct soap*, const char*, const char*); |
|
1407 int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr); |
|
1408 int (*fconnect)(struct soap*, const char*, const char*, int); |
|
1409 int (*fdisconnect)(struct soap*); |
|
1410 int (*fclosesocket)(struct soap*, SOAP_SOCKET); |
|
1411 int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int); |
|
1412 int (*fopen)(struct soap*, const char*, const char*, int); |
|
1413 int (*faccept)(struct soap*, int, struct sockaddr*, int *n); |
|
1414 int (*fclose)(struct soap*); |
|
1415 int (*fsend)(struct soap*, const char*, size_t); |
|
1416 size_t (*frecv)(struct soap*, char*, size_t); |
|
1417 int (*fpoll)(struct soap*); |
|
1418 void (*fseterror)(struct soap*, const char **c, const char **s); |
|
1419 int (*fignore)(struct soap*, const char*); |
|
1420 int (*fserveloop)(struct soap*); |
|
1421 void *(*fplugin)(struct soap*, const char*); |
|
1422 #ifndef WITH_LEANER |
|
1423 int (*fprepareinit)(struct soap*); |
|
1424 int (*fpreparesend)(struct soap*, const char*, size_t); |
|
1425 int (*fpreparerecv)(struct soap*, const char*, size_t); |
|
1426 int (*fpreparefinal)(struct soap*); |
|
1427 void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*); |
|
1428 void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*); |
|
1429 void (*fdimereadclose)(struct soap*, void*); |
|
1430 void (*fdimewriteclose)(struct soap*, void*); |
|
1431 size_t (*fdimeread)(struct soap*, void*, char*, size_t); |
|
1432 int (*fdimewrite)(struct soap*, void*, const char*, size_t); |
|
1433 #endif |
|
1434 int master; |
|
1435 int socket; |
|
1436 #if defined(__cplusplus) && !defined(WITH_LEAN) |
|
1437 std::ostream *os; |
|
1438 std::istream *is; |
|
1439 #else |
|
1440 void *os; /* preserve alignment */ |
|
1441 void *is; /* preserve alignment */ |
|
1442 #endif |
|
1443 #ifndef UNDER_CE |
|
1444 int sendfd; |
|
1445 int recvfd; |
|
1446 #else |
|
1447 FILE *sendfd; |
|
1448 FILE *recvfd; |
|
1449 #endif |
|
1450 #ifdef WIN32 |
|
1451 char errorstr[256]; /* buf for FormatMessage() */ |
|
1452 #endif |
|
1453 size_t bufidx; /* index in soap.buf[] */ |
|
1454 size_t buflen; /* length of soap.buf[] content */ |
|
1455 soap_wchar ahead; /* parser lookahead */ |
|
1456 short cdata; /* CDATA parser state */ |
|
1457 short body; /* parsed XML element has a body or not */ |
|
1458 unsigned int level; /* XML nesting level */ |
|
1459 size_t count; /* message length counter */ |
|
1460 size_t length; /* message length as set by HTTP header */ |
|
1461 #ifdef WITH_FAST |
|
1462 char *labbuf; /* look-aside buffer */ |
|
1463 size_t lablen; /* look-aside buffer allocated length */ |
|
1464 size_t labidx; /* look-aside buffer index to available part */ |
|
1465 #endif |
|
1466 char buf[SOAP_BUFLEN];/* send and receive buffer */ |
|
1467 char tmpbuf[1024]; /* in/output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */ |
|
1468 char msgbuf[1024]; /* output buffer for (error) messages <=1024 bytes */ |
|
1469 char tag[SOAP_TAGLEN]; |
|
1470 char id[SOAP_TAGLEN]; |
|
1471 char href[SOAP_TAGLEN]; |
|
1472 char type[SOAP_TAGLEN]; |
|
1473 char arrayType[SOAP_TAGLEN]; |
|
1474 char arraySize[SOAP_TAGLEN]; |
|
1475 char arrayOffset[SOAP_TAGLEN]; |
|
1476 short other; |
|
1477 short position; |
|
1478 int positions[SOAP_MAXDIMS]; |
|
1479 short root; |
|
1480 struct soap_attribute *attributes; /* attribute list */ |
|
1481 short encoding; /* when set, output encodingStyle */ |
|
1482 short mustUnderstand; /* a mustUnderstand element was parsed or is output */ |
|
1483 short keep_alive; /* connection should be kept open */ |
|
1484 short null; /* parsed XML is xsi:nil */ |
|
1485 short ns; /* when not set, output full xmlns bindings */ |
|
1486 short part; /* parsing state */ |
|
1487 short alloced; |
|
1488 short peeked; |
|
1489 size_t chunksize; |
|
1490 size_t chunkbuflen; |
|
1491 char endpoint[SOAP_TAGLEN]; |
|
1492 char path[SOAP_TAGLEN]; |
|
1493 char host[SOAP_TAGLEN]; |
|
1494 char *action; |
|
1495 char *authrealm; /* HTTP authentication realm */ |
|
1496 char *prolog; /* XML declaration prolog */ |
|
1497 unsigned long ip; /* IP number */ |
|
1498 int port; /* port number */ |
|
1499 unsigned int max_keep_alive; |
|
1500 const char *proxy_host; /* Proxy Server host name */ |
|
1501 int proxy_port; /* Proxy Server port (default = 8080) */ |
|
1502 const char *proxy_userid; /* Proxy Authorization user name */ |
|
1503 const char *proxy_passwd; /* Proxy Authorization password */ |
|
1504 int status; /* -1 when request, else error code to be returned by server */ |
|
1505 int error; |
|
1506 int errmode; |
|
1507 int errnum; |
|
1508 #ifndef WITH_LEANER |
|
1509 struct soap_dom_element *dom; |
|
1510 struct soap_dime dime; |
|
1511 struct soap_mime mime; |
|
1512 struct soap_xlist *xlist; |
|
1513 #endif |
|
1514 #if !defined(WITH_LEAN) || defined(SOAP_DEBUG) |
|
1515 const char *logfile[SOAP_MAXLOGS]; |
|
1516 FILE *fdebug[SOAP_MAXLOGS]; |
|
1517 struct soap_mlist *mht[SOAP_PTRHASH]; |
|
1518 #endif |
|
1519 #ifndef WITH_LEAN |
|
1520 const char *c14ninclude; |
|
1521 const char *c14nexclude; |
|
1522 struct soap_cookie *cookies; |
|
1523 const char *cookie_domain; |
|
1524 const char *cookie_path; |
|
1525 int cookie_max; |
|
1526 #endif |
|
1527 #ifndef WITH_NOIO |
|
1528 #ifdef WITH_IPV6 |
|
1529 struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */ |
|
1530 #else |
|
1531 struct sockaddr_in peer; /* IPv4: set by soap_connect/soap_accept and by UDP recv */ |
|
1532 #endif |
|
1533 size_t peerlen; |
|
1534 #endif |
|
1535 #ifdef WITH_OPENSSL |
|
1536 int (*fsslauth)(struct soap*); |
|
1537 int (*fsslverify)(int, X509_STORE_CTX*); |
|
1538 BIO *bio; |
|
1539 SSL *ssl; |
|
1540 SSL_CTX *ctx; |
|
1541 short require_server_auth; |
|
1542 short require_client_auth; |
|
1543 short rsa; /* when set, use RSA instead of DH */ |
|
1544 const char *keyfile; |
|
1545 const char *password; |
|
1546 const char *dhfile; |
|
1547 const char *cafile; |
|
1548 const char *capath; |
|
1549 const char *crlfile; |
|
1550 const char *randfile; |
|
1551 SSL_SESSION *session; |
|
1552 char session_host[SOAP_TAGLEN]; |
|
1553 int session_port; |
|
1554 #endif |
|
1555 #ifdef WITH_ZLIB |
|
1556 short zlib_state; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */ |
|
1557 short zlib_in; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ |
|
1558 short zlib_out; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */ |
|
1559 z_stream d_stream; /* decompression stream */ |
|
1560 char z_buf[SOAP_BUFLEN]; /* buffer */ |
|
1561 size_t z_buflen; |
|
1562 unsigned short z_level; /* compression level to be used (0=none, 1=fast to 9=best) */ |
|
1563 uLong z_crc; /* internal gzip crc */ |
|
1564 float z_ratio_in; /* detected compression ratio compressed_length/length of inbound message */ |
|
1565 float z_ratio_out; /* detected compression ratio compressed_length/length of outbound message */ |
|
1566 #endif |
|
1567 /* WR[ */ |
|
1568 #ifdef WMW_RPM_IO |
|
1569 void *rpmreqid; |
|
1570 #endif /* WMW_RPM_IO */ |
|
1571 /* ]WR */ |
|
1572 }; |
|
1573 |
|
1574 struct soap_code_map |
|
1575 { long code; |
|
1576 const char *string; |
|
1577 }; |
|
1578 |
|
1579 /* forwarding list */ |
|
1580 struct soap_flist |
|
1581 { struct soap_flist *next; |
|
1582 int type; |
|
1583 void *ptr; |
|
1584 unsigned int level; |
|
1585 void (*fcopy)(struct soap*, int, int, void*, const void*, size_t); |
|
1586 }; |
|
1587 |
|
1588 /* id-ref forwarding list */ |
|
1589 struct soap_ilist |
|
1590 { struct soap_ilist *next; |
|
1591 int type; |
|
1592 size_t size; |
|
1593 void *link; |
|
1594 void *copy; |
|
1595 struct soap_flist *flist; |
|
1596 void *ptr; |
|
1597 unsigned int level; |
|
1598 char id[1]; /* the actual id string value flows into the allocated region below this struct */ |
|
1599 }; |
|
1600 |
|
1601 struct soap_plugin |
|
1602 { struct soap_plugin *next; |
|
1603 const char *id; |
|
1604 void *data; |
|
1605 int (*fcopy)(struct soap *soap, struct soap_plugin *dst, struct soap_plugin *src); |
|
1606 void (*fdelete)(struct soap *soap, struct soap_plugin *p); /* should delete fields of plugin only and not free(p) */ |
|
1607 }; |
|
1608 |
|
1609 #ifndef WITH_NONAMESPACES |
|
1610 extern SOAP_NMAC struct Namespace namespaces[]; |
|
1611 #endif |
|
1612 |
|
1613 #ifndef WITH_LEAN |
|
1614 # define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx]) |
|
1615 # define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++]) |
|
1616 #else |
|
1617 soap_wchar soap_get0(struct soap*); |
|
1618 soap_wchar soap_get1(struct soap*); |
|
1619 #endif |
|
1620 |
|
1621 #define soap_revget1(soap) ((soap)->bufidx--) |
|
1622 #define soap_unget(soap, c) ((soap)->ahead = c) |
|
1623 #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL) |
|
1624 #define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n)) |
|
1625 #define soap_set_imode(soap, n) ((soap)->imode |= (n)) |
|
1626 #define soap_clr_imode(soap, n) ((soap)->imode &= ~(n)) |
|
1627 #define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n)) |
|
1628 #define soap_set_omode(soap, n) ((soap)->omode |= (n)) |
|
1629 #define soap_clr_omode(soap, n) ((soap)->omode &= ~(n)) |
|
1630 #define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n)) |
|
1631 #define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n)) |
|
1632 #define soap_destroy(soap) soap_delete((soap), NULL) |
|
1633 |
|
1634 #ifdef HAVE_STRRCHR |
|
1635 # define soap_strrchr(s, t) strrchr(s, t) |
|
1636 #else |
|
1637 SOAP_FMAC1 char* SOAP_FMAC2 soap_strrchr(const char *s, int t); |
|
1638 #endif |
|
1639 |
|
1640 #ifdef HAVE_STRTOL |
|
1641 # define soap_strtol(s, t, b) strtol(s, t, b) |
|
1642 #else |
|
1643 SOAP_FMAC1 long SOAP_FMAC2 soap_strtol(const char *s, char **t, int b); |
|
1644 #endif |
|
1645 |
|
1646 #ifdef HAVE_STRTOUL |
|
1647 # define soap_strtoul(s, t, b) strtoul(s, t, b) |
|
1648 #else |
|
1649 SOAP_FMAC1 unsigned long SOAP_FMAC2 soap_strtoul(const char *s, char **t, int b); |
|
1650 #endif |
|
1651 |
|
1652 #if defined(WITH_OPENSSL) |
|
1653 # define soap_random soap_rand() |
|
1654 SOAP_FMAC1 int SOAP_FMAC2 soap_rand(); |
|
1655 #elif defined(HAVE_RANDOM) |
|
1656 # define soap_random (int)random() |
|
1657 #else |
|
1658 # define soap_random rand() |
|
1659 #endif |
|
1660 |
|
1661 #ifdef WITH_NOIDREF |
|
1662 # define soap_embedded(s, p, t) (0) |
|
1663 # define soap_id_lookup(s, i, p, t, n, k) (p) |
|
1664 # define soap_id_forward(s, h, p, st, tt, n, k, fc) (p) |
|
1665 # define soap_reference(s, a, t) (1) |
|
1666 # define soap_array_reference(s, p, a, n, t) (1) |
|
1667 # define soap_embed(s, p, a, n, t, pp) (0) |
|
1668 # define soap_embedded_id(s, i, p, t) (i) |
|
1669 # define soap_is_embedded(s, p) (0) |
|
1670 # define soap_is_single(s, p) (1) |
|
1671 # define soap_lookup_type(s, i) (0) |
|
1672 # define soap_getindependent(s) (0) |
|
1673 # define soap_putindependent(s) (0) |
|
1674 # define soap_getelement(s, n) (n) |
|
1675 # define soap_putelement(s, p, t, i, n) (0) |
|
1676 # define soap_markelement(s, p, n) (0) |
|
1677 #endif |
|
1678 |
|
1679 SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*); |
|
1680 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*); |
|
1681 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*); |
|
1682 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*); |
|
1683 SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*); |
|
1684 SOAP_FMAC1 void SOAP_FMAC2 soap_serializeheader(struct soap*); |
|
1685 SOAP_FMAC1 int SOAP_FMAC2 soap_putheader(struct soap*); |
|
1686 SOAP_FMAC1 int SOAP_FMAC2 soap_getheader(struct soap*); |
|
1687 SOAP_FMAC1 void SOAP_FMAC2 soap_serializefault(struct soap*); |
|
1688 SOAP_FMAC1 int SOAP_FMAC2 soap_putfault(struct soap*); |
|
1689 SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*); |
|
1690 |
|
1691 SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*); |
|
1692 SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*); |
|
1693 SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*); |
|
1694 SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int); |
|
1695 SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*); |
|
1696 SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*); |
|
1697 |
|
1698 SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*); |
|
1699 SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_client_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*); |
|
1700 |
|
1701 SOAP_FMAC1 int SOAP_FMAC2 soap_puthttphdr(struct soap*, int status, size_t count); |
|
1702 |
|
1703 SOAP_FMAC1 const char* SOAP_FMAC2 soap_get_header_attribute(struct soap*, const char*, const char*); |
|
1704 SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_key(char*, size_t, const char*); |
|
1705 SOAP_FMAC1 const char* SOAP_FMAC2 soap_decode_val(char*, size_t, const char*); |
|
1706 |
|
1707 SOAP_FMAC1 size_t SOAP_FMAC2 soap_hash(const char*); |
|
1708 SOAP_FMAC1 void SOAP_FMAC2 soap_set_endpoint(struct soap*, const char*); |
|
1709 SOAP_FMAC1 int SOAP_FMAC2 soap_flush_raw(struct soap*, const char*, size_t); |
|
1710 SOAP_FMAC1 int SOAP_FMAC2 soap_flush(struct soap*); |
|
1711 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_get(struct soap*); |
|
1712 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getchar(struct soap*); |
|
1713 SOAP_FMAC1 int SOAP_FMAC2 soap_tag_cmp(const char*, const char*); |
|
1714 SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*); |
|
1715 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*); |
|
1716 SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*); |
|
1717 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*); |
|
1718 SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*); |
|
1719 SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int); |
|
1720 SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int); |
|
1721 |
|
1722 SOAP_FMAC1 int SOAP_FMAC2 soap_send_raw(struct soap*, const char*, size_t); |
|
1723 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_raw(struct soap*); |
|
1724 SOAP_FMAC1 int SOAP_FMAC2 soap_recv(struct soap*); |
|
1725 SOAP_FMAC1 int SOAP_FMAC2 soap_send(struct soap*, const char*); |
|
1726 SOAP_FMAC1 int SOAP_FMAC2 soap_send2(struct soap*, const char*, const char*); |
|
1727 SOAP_FMAC1 int SOAP_FMAC2 soap_send3(struct soap*, const char*, const char*, const char*); |
|
1728 |
|
1729 SOAP_FMAC1 int SOAP_FMAC2 soap_pututf8(struct soap*, unsigned long); |
|
1730 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_getutf8(struct soap*); |
|
1731 |
|
1732 SOAP_FMAC1 int SOAP_FMAC2 soap_putbase64(struct soap*, const unsigned char*, int); |
|
1733 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_getbase64(struct soap*, int*, int); |
|
1734 SOAP_FMAC1 int SOAP_FMAC2 soap_puthex(struct soap*, const unsigned char*, int); |
|
1735 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*); |
|
1736 |
|
1737 #ifndef WITH_LEANER |
|
1738 SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**); |
|
1739 SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**); |
|
1740 #endif |
|
1741 |
|
1742 #ifndef WITH_NOIDREF |
|
1743 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**); |
|
1744 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**); |
|
1745 SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); |
|
1746 SOAP_FMAC1 int SOAP_FMAC2 soap_array_pointer_lookup(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**); |
|
1747 SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type); |
|
1748 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*); |
|
1749 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*); |
|
1750 SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*); |
|
1751 SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t); |
|
1752 SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t); |
|
1753 SOAP_FMAC1 int SOAP_FMAC2 soap_array_reference(struct soap*, const void *p, const struct soap_array *a, int n, int t); |
|
1754 SOAP_FMAC1 int SOAP_FMAC2 soap_embedded_id(struct soap*, int id, const void *p, int t); |
|
1755 SOAP_FMAC1 int SOAP_FMAC2 soap_is_embedded(struct soap*, struct soap_plist*); |
|
1756 SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*); |
|
1757 SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*); |
|
1758 #endif |
|
1759 |
|
1760 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*); |
|
1761 SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*); |
|
1762 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*); |
|
1763 SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*); |
|
1764 |
|
1765 SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str); |
|
1766 SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other); |
|
1767 SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code); |
|
1768 |
|
1769 SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int); |
|
1770 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_recv(struct soap*); |
|
1771 SOAP_FMAC1 int SOAP_FMAC2 soap_end_recv(struct soap*); |
|
1772 |
|
1773 SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t); |
|
1774 SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*); |
|
1775 SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*)); |
|
1776 SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*); |
|
1777 SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*); |
|
1778 |
|
1779 SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t); |
|
1780 SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*); |
|
1781 |
|
1782 #ifndef WITH_NOIDREF |
|
1783 SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id); |
|
1784 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k); |
|
1785 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, const void*, size_t)); |
|
1786 #endif |
|
1787 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_enter(struct soap*, const char *id, void *p, int t, size_t n, unsigned int k, const char *type, const char *arrayType, void *(*finstantiate)(struct soap*, int, const char*, const char*, size_t*)); |
|
1788 SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n); |
|
1789 |
|
1790 SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int); |
|
1791 SOAP_FMAC1 int SOAP_FMAC2 soap_getoffsets(const char *, const int *, int *, int); |
|
1792 SOAP_FMAC1 int SOAP_FMAC2 soap_getsize(const char *, const char *, int *); |
|
1793 SOAP_FMAC1 int SOAP_FMAC2 soap_getsizes(const char *, int *, int); |
|
1794 SOAP_FMAC1 int SOAP_FMAC2 soap_getposition(const char *, int *); |
|
1795 |
|
1796 SOAP_FMAC1 char* SOAP_FMAC2 soap_putsize(struct soap*, const char *, int); |
|
1797 SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizesoffsets(struct soap*, const char *, const int *, const int *, int); |
|
1798 SOAP_FMAC1 char* SOAP_FMAC2 soap_putsizes(struct soap*, const char *, const int *, int); |
|
1799 SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffset(struct soap*, int); |
|
1800 SOAP_FMAC1 char* SOAP_FMAC2 soap_putoffsets(struct soap*, const int *, int); |
|
1801 |
|
1802 SOAP_FMAC1 int SOAP_FMAC2 soap_closesock(struct soap*); |
|
1803 |
|
1804 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void); |
|
1805 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode); |
|
1806 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode); |
|
1807 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*); |
|
1808 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*); |
|
1809 SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*); |
|
1810 SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode); |
|
1811 SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode); |
|
1812 SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*); |
|
1813 SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*); |
|
1814 SOAP_FMAC1 void SOAP_FMAC2 soap_begin(struct soap*); |
|
1815 SOAP_FMAC1 void SOAP_FMAC2 soap_end(struct soap*); |
|
1816 SOAP_FMAC1 void SOAP_FMAC2 soap_delete(struct soap*, void*); |
|
1817 |
|
1818 #ifdef SOAP_DEBUG |
|
1819 SOAP_FMAC1 void SOAP_FMAC2 soap_set_recv_logfile(struct soap*, const char*); |
|
1820 SOAP_FMAC1 void SOAP_FMAC2 soap_set_sent_logfile(struct soap*, const char*); |
|
1821 SOAP_FMAC1 void SOAP_FMAC2 soap_set_test_logfile(struct soap*, const char*); |
|
1822 SOAP_FMAC1 void SOAP_FMAC2 soap_close_logfiles(struct soap*); |
|
1823 SOAP_FMAC1 void SOAP_FMAC2 soap_open_logfile(struct soap*, int); |
|
1824 #endif |
|
1825 |
|
1826 SOAP_FMAC1 const char* SOAP_FMAC2 soap_token(struct soap*); |
|
1827 SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*); |
|
1828 |
|
1829 SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *); |
|
1830 SOAP_FMAC1 int SOAP_FMAC2 soap_match_array(struct soap*, const char*); |
|
1831 |
|
1832 SOAP_FMAC1 int SOAP_FMAC2 soap_element(struct soap*, const char*, int, const char*); |
|
1833 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_out(struct soap*, const char *tag, int id, const char *type); |
|
1834 SOAP_FMAC1 int SOAP_FMAC2 soap_array_begin_out(struct soap*, const char *tag, int id, const char *type, const char *offset); |
|
1835 SOAP_FMAC1 int SOAP_FMAC2 soap_element_ref(struct soap*, const char *tag, int id, int href); |
|
1836 SOAP_FMAC1 int SOAP_FMAC2 soap_element_href(struct soap*, const char *tag, int id, const char *ref, const char *val); |
|
1837 SOAP_FMAC1 int SOAP_FMAC2 soap_element_null(struct soap*, const char *tag, int id, const char *type); |
|
1838 SOAP_FMAC1 int SOAP_FMAC2 soap_element_id(struct soap*, const char *tag, int id, const void *p, const struct soap_array *a, int d, const char *type, int n); |
|
1839 SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag); |
|
1840 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag); |
|
1841 SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag); |
|
1842 |
|
1843 SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*); |
|
1844 |
|
1845 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable); |
|
1846 |
|
1847 SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag); |
|
1848 |
|
1849 SOAP_FMAC1 int SOAP_FMAC2 soap_peek_element(struct soap*); |
|
1850 |
|
1851 SOAP_FMAC1 void SOAP_FMAC2 soap_retry(struct soap*); |
|
1852 SOAP_FMAC1 void SOAP_FMAC2 soap_revert(struct soap*); |
|
1853 |
|
1854 SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*); |
|
1855 SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little); |
|
1856 |
|
1857 SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag); |
|
1858 SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long); |
|
1859 |
|
1860 #ifndef WITH_LEANER |
|
1861 SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag); |
|
1862 SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long); |
|
1863 #endif |
|
1864 |
|
1865 SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2); |
|
1866 |
|
1867 SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*); |
|
1868 SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*); |
|
1869 |
|
1870 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*); |
|
1871 SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *); |
|
1872 |
|
1873 SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t); |
|
1874 SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t); |
|
1875 |
|
1876 SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*); |
|
1877 SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t); |
|
1878 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*); |
|
1879 SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t); |
|
1880 SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*); |
|
1881 SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*); |
|
1882 SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*); |
|
1883 SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int); |
|
1884 SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*); |
|
1885 |
|
1886 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*); |
|
1887 SOAP_FMAC1 int soap_envelope_end_out(struct soap*); |
|
1888 |
|
1889 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_in(struct soap*); |
|
1890 SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_end_in(struct soap*); |
|
1891 |
|
1892 SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_out(struct soap*); |
|
1893 SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_out(struct soap*); |
|
1894 |
|
1895 SOAP_FMAC1 int SOAP_FMAC2 soap_body_begin_in(struct soap*); |
|
1896 SOAP_FMAC1 int SOAP_FMAC2 soap_body_end_in(struct soap*); |
|
1897 |
|
1898 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_header(struct soap*); |
|
1899 |
|
1900 SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int); |
|
1901 |
|
1902 SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*); |
|
1903 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*); |
|
1904 |
|
1905 SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*); |
|
1906 SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*); |
|
1907 |
|
1908 #ifndef WITH_NOSTDLIB |
|
1909 SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*); |
|
1910 SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*); |
|
1911 #endif |
|
1912 |
|
1913 SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*); |
|
1914 SOAP_FMAC1 int SOAP_FMAC2 soap_s2short(struct soap*, const char*, short*); |
|
1915 SOAP_FMAC1 int SOAP_FMAC2 soap_s2int(struct soap*, const char*, int*); |
|
1916 SOAP_FMAC1 int SOAP_FMAC2 soap_s2long(struct soap*, const char*, long*); |
|
1917 SOAP_FMAC1 int SOAP_FMAC2 soap_s2LONG64(struct soap*, const char*, LONG64*); |
|
1918 SOAP_FMAC1 int SOAP_FMAC2 soap_s2float(struct soap*, const char*, float*); |
|
1919 SOAP_FMAC1 int SOAP_FMAC2 soap_s2double(struct soap*, const char*, double*); |
|
1920 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedByte(struct soap*, const char*, unsigned char*); |
|
1921 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedShort(struct soap*, const char*, unsigned short*); |
|
1922 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedInt(struct soap*, const char*, unsigned int*); |
|
1923 SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*); |
|
1924 SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*); |
|
1925 SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**); |
|
1926 SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**); |
|
1927 |
|
1928 #ifndef WITH_LEAN |
|
1929 SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*); |
|
1930 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int); |
|
1931 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int); |
|
1932 #endif |
|
1933 |
|
1934 SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char); |
|
1935 SOAP_FMAC1 const char* SOAP_FMAC2 soap_short2s(struct soap*, short); |
|
1936 SOAP_FMAC1 const char* SOAP_FMAC2 soap_int2s(struct soap*, int); |
|
1937 SOAP_FMAC1 const char* SOAP_FMAC2 soap_long2s(struct soap*, long); |
|
1938 SOAP_FMAC1 const char* SOAP_FMAC2 soap_LONG642s(struct soap*, LONG64); |
|
1939 SOAP_FMAC1 const char* SOAP_FMAC2 soap_float2s(struct soap*, float); |
|
1940 SOAP_FMAC1 const char* SOAP_FMAC2 soap_double2s(struct soap*, double); |
|
1941 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedByte2s(struct soap*, unsigned char); |
|
1942 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedShort2s(struct soap*, unsigned short); |
|
1943 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedInt2s(struct soap*, unsigned int); |
|
1944 SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long); |
|
1945 SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64); |
|
1946 SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*); |
|
1947 |
|
1948 #ifndef WITH_LEAN |
|
1949 SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t); |
|
1950 SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*); |
|
1951 SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*); |
|
1952 #endif |
|
1953 |
|
1954 |
|
1955 SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int); |
|
1956 SOAP_FMAC1 char* SOAP_FMAC2 soap_inbyte(struct soap*, const char *tag, char *p, const char *, int); |
|
1957 SOAP_FMAC1 long* SOAP_FMAC2 soap_inlong(struct soap*, const char *tag, long *p, const char *, int); |
|
1958 SOAP_FMAC1 LONG64* SOAP_FMAC2 soap_inLONG64(struct soap*, const char *tag, LONG64 *p, const char *, int); |
|
1959 SOAP_FMAC1 short* SOAP_FMAC2 soap_inshort(struct soap*, const char *tag, short *p, const char *, int); |
|
1960 SOAP_FMAC1 float* SOAP_FMAC2 soap_infloat(struct soap*, const char *tag, float *p, const char *, int); |
|
1961 SOAP_FMAC1 double* SOAP_FMAC2 soap_indouble(struct soap*, const char *tag, double *p, const char *, int); |
|
1962 SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_inunsignedByte(struct soap*, const char *tag, unsigned char *p, const char *, int); |
|
1963 SOAP_FMAC1 unsigned short* SOAP_FMAC2 soap_inunsignedShort(struct soap*, const char *tag, unsigned short *p, const char *, int); |
|
1964 SOAP_FMAC1 unsigned int* SOAP_FMAC2 soap_inunsignedInt(struct soap*, const char *tag, unsigned int *p, const char *, int); |
|
1965 SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int); |
|
1966 SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int); |
|
1967 SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long); |
|
1968 SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p); |
|
1969 |
|
1970 #ifndef WITH_LEAN |
|
1971 SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int); |
|
1972 #endif |
|
1973 |
|
1974 #ifndef WITH_LEANER |
|
1975 SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long); |
|
1976 SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p); |
|
1977 #endif |
|
1978 |
|
1979 SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int); |
|
1980 SOAP_FMAC1 int SOAP_FMAC2 soap_outshort(struct soap*, const char *tag, int id, const short *p, const char *, int); |
|
1981 SOAP_FMAC1 int SOAP_FMAC2 soap_outint(struct soap*, const char *tag, int id, const int *p, const char *, int); |
|
1982 SOAP_FMAC1 int SOAP_FMAC2 soap_outlong(struct soap*, const char *tag, int id, const long *p, const char *, int); |
|
1983 SOAP_FMAC1 int SOAP_FMAC2 soap_outLONG64(struct soap*, const char *tag, int id, const LONG64 *p, const char *, int); |
|
1984 SOAP_FMAC1 int SOAP_FMAC2 soap_outfloat(struct soap*, const char *tag, int id, const float *p, const char *, int); |
|
1985 SOAP_FMAC1 int SOAP_FMAC2 soap_outdouble(struct soap*, const char *tag, int id, const double *p, const char *, int); |
|
1986 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedByte(struct soap*, const char *tag, int id, const unsigned char *p, const char *, int); |
|
1987 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedShort(struct soap*, const char *tag, int id, const unsigned short *p, const char *, int); |
|
1988 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedInt(struct soap*, const char *tag, int id, const unsigned int *p, const char *, int); |
|
1989 SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int); |
|
1990 SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int); |
|
1991 SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int); |
|
1992 SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p); |
|
1993 |
|
1994 #ifndef WITH_LEAN |
|
1995 SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int); |
|
1996 #endif |
|
1997 |
|
1998 #ifndef WITH_LEANER |
|
1999 SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int); |
|
2000 SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p); |
|
2001 #endif |
|
2002 |
|
2003 #ifndef WITH_LEANER |
|
2004 SOAP_FMAC1 int SOAP_FMAC2 soap_attachment(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int); |
|
2005 SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long); |
|
2006 SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*); |
|
2007 SOAP_FMAC1 char* SOAP_FMAC2 soap_dime_option(struct soap*, unsigned short, const char*); |
|
2008 SOAP_FMAC1 int SOAP_FMAC2 soap_getdimehdr(struct soap*); |
|
2009 SOAP_FMAC1 int SOAP_FMAC2 soap_getdime(struct soap*); |
|
2010 SOAP_FMAC1 int SOAP_FMAC2 soap_putdimehdr(struct soap*); |
|
2011 SOAP_FMAC1 int SOAP_FMAC2 soap_putdime(struct soap*); |
|
2012 SOAP_FMAC1 int SOAP_FMAC2 soap_getmimehdr(struct soap*); |
|
2013 SOAP_FMAC1 int SOAP_FMAC2 soap_getmime(struct soap*); |
|
2014 SOAP_FMAC1 int SOAP_FMAC2 soap_putmimehdr(struct soap*, struct soap_multipart*); |
|
2015 SOAP_FMAC1 int SOAP_FMAC2 soap_putmime(struct soap*); |
|
2016 SOAP_FMAC1 void SOAP_FMAC2 soap_set_dime(struct soap*); |
|
2017 SOAP_FMAC1 void SOAP_FMAC2 soap_set_mime(struct soap*, const char *boundary, const char *start); |
|
2018 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_dime(struct soap*); |
|
2019 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_mime(struct soap*); |
|
2020 SOAP_FMAC1 int SOAP_FMAC2 soap_set_dime_attachment(struct soap*, char *ptr, size_t size, const char *type, const char *id, unsigned short optype, const char *option); |
|
2021 SOAP_FMAC1 int SOAP_FMAC2 soap_set_mime_attachment(struct soap*, char *ptr, size_t size, enum soap_mime_encoding encoding, const char *type, const char *id, const char *location, const char *description); |
|
2022 SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*); |
|
2023 #endif |
|
2024 |
|
2025 SOAP_FMAC1 int SOAP_FMAC2 soap_register_plugin_arg(struct soap*, int (*fcreate)(struct soap*, struct soap_plugin*, void*), void*); |
|
2026 SOAP_FMAC1 void* SOAP_FMAC2 soap_lookup_plugin(struct soap*, const char*); |
|
2027 |
|
2028 SOAP_FMAC1 const char* SOAP_FMAC2 soap_attr_value(struct soap *soap, const char *name, int flag); |
|
2029 SOAP_FMAC1 int SOAP_FMAC2 soap_set_attr(struct soap *soap, const char *name, const char *value); |
|
2030 SOAP_FMAC1 void SOAP_FMAC2 soap_clr_attr(struct soap *soap); |
|
2031 |
|
2032 #ifdef WITH_COOKIES |
|
2033 SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t); |
|
2034 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*); |
|
2035 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*); |
|
2036 SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*); |
|
2037 SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*); |
|
2038 SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*); |
|
2039 SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*); |
|
2040 SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*); |
|
2041 SOAP_FMAC1 extern int SOAP_FMAC2 soap_clr_cookie_session(struct soap*, const char*, const char*, const char*); |
|
2042 SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*); |
|
2043 SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*); |
|
2044 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*); |
|
2045 SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*); |
|
2046 #endif |
|
2047 |
|
2048 #ifdef __cplusplus |
|
2049 } /* extern "C" */ |
|
2050 #endif |
|
2051 |
|
2052 #endif |
|
2053 |
|