-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdsoap2.h
3727 lines (3374 loc) · 154 KB
/
stdsoap2.h
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
stdsoap2.h 2.8.129
gSOAP runtime engine
gSOAP XML Web services tools
Copyright (C) 2000-2023, Robert van Engelen, Genivia Inc., All Rights Reserved.
This part of the software is released under ONE of the following licenses:
GPL or the gSOAP public license.
--------------------------------------------------------------------------------
Contributors:
Wind River Systems, Inc., for the following addition licensed under the gSOAP
public license:
- vxWorks compatible, enabled with compiler option -DVXWORKS
--------------------------------------------------------------------------------
gSOAP public license.
The contents of this file are subject to the gSOAP Public License Version 1.3
(the "License"); you may not use this file except in compliance with the
License. You may obtain a copy of the License at
http://www.cs.fsu.edu/~engelen/soaplicense.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.
The Initial Developer of the Original Code is Robert A. van Engelen.
Copyright (C) 2000-2023, Robert van Engelen, Genivia Inc., All Rights Reserved.
--------------------------------------------------------------------------------
GPL license.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
Author contact information:
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., [email protected]
--------------------------------------------------------------------------------
*/
#define GSOAP_VERSION 208129
#define WITH_NOIDREF
#ifdef WITH_SOAPDEFS_H
# include "soapdefs.h" /* include user-defined stuff in soapdefs.h */
#endif
#ifndef _THREAD_SAFE
# define _THREAD_SAFE
#endif
#ifndef OPENSERVER
# ifndef _REENTRANT
# define _REENTRANT
# endif
#endif
#ifdef _WIN32
# ifndef WIN32
# define WIN32
# endif
#endif
/* for legacy purposes we use WIN32 macro, even when WIN64 is supported */
#ifdef _WIN64
# ifndef WIN32
# define WIN32
# endif
#endif
#ifdef WIN32
# ifdef SOAP_STD_EXPORTS /* dllexport the API functions and classes */
# ifndef SOAP_STD_API
# define SOAP_STD_API __declspec(dllexport)
# endif
# ifndef SOAP_CMAC
# define SOAP_CMAC SOAP_STD_API /* export soap struct and generated classes */
# endif
# ifndef SOAP_FMAC1
# define SOAP_FMAC1 SOAP_STD_API /* export stdsoap2.cpp API */
# endif
# ifndef SOAP_FMAC3
# define SOAP_FMAC3 SOAP_STD_API /* export soapC.cpp serializers API */
# endif
# ifndef SOAP_FMAC5
# define SOAP_FMAC5 SOAP_STD_API /* export soapClient.cpp and soapServer.cpp API */
# endif
# endif
#endif
#ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */
# define SOAP_FMAC1
#endif
#ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */
# define SOAP_FMAC2
#endif
#ifndef SOAP_FMAC3 /* (de)serializer declaration macro */
# define SOAP_FMAC3
#endif
#ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */
# define SOAP_FMAC3S SOAP_FMAC3
#endif
#ifndef SOAP_FMAC4 /* (de)serializer declaration macro */
# define SOAP_FMAC4
#endif
#ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */
# define SOAP_FMAC4S SOAP_FMAC4
#endif
#ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */
# define SOAP_FMAC5
#endif
#ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */
# define SOAP_FMAC6
#endif
#ifndef SOAP_CMAC /* class declaration macro */
# define SOAP_CMAC
#endif
#ifndef SOAP_NMAC /* namespace table declaration macro */
# define SOAP_NMAC
#endif
#ifndef SOAP_SOURCE_STAMP
# define SOAP_SOURCE_STAMP(str)
#endif
#ifndef STDSOAP_H
#define STDSOAP_H
#define SOAP_XSTRINGIFY(s) SOAP_STRINGIFY(s)
#define SOAP_STRINGIFY(s) #s
#if defined(SOAPDEFS_H) && !defined(WITH_SOAPDEFS_H)
# include SOAP_XSTRINGIFY(SOAPDEFS_H) /* include user-defined "SOAPDEFS_H" */
#endif
#if defined(__vxworks) || defined(__VXWORKS__)
# ifndef VXWORKS
# define VXWORKS
# endif
#endif
#ifdef _WIN32_WCE
# ifndef UNDER_CE
# define UNDER_CE _WIN32_WCE
# endif
#endif
#ifdef UNDER_CE
# ifndef WIN32
# define WIN32
# endif
#endif
#ifdef __BORLANDC__
# ifdef __clang__
# ifdef _WIN32
# ifndef WIN32
# define WIN32
# endif
# endif
# else
# ifdef __WIN32__
# ifndef WIN32
# define WIN32
# endif
# endif
# endif
#endif
#if defined(__CYGWIN__) || defined(__CYGWIN32__)
# ifndef CYGWIN
# define CYGWIN
# endif
#endif
#ifdef __SYMBIAN32__
# define SYMBIAN
# undef WIN32
#endif
#if defined(__hpux)
# ifndef HP_UX
# define HP_UX
# endif
#endif
#if defined(__digital__) && defined(__unix__)
# ifndef TRU64
# define TRU64
# endif
#endif
#ifdef __MVS__
# ifndef OS390
# define OS390
# endif
#endif
#if defined(__sun) && defined(__SVR4)
# ifndef SUN_OS
# define SUN_OS
# endif
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#else
# if defined(UNDER_CE)
# define SOAP_BUFLEN (2048)
# define SOAP_PTRHASH (32)
# define SOAP_IDHASH (19)
# define SOAP_BLKLEN (32)
# define SOAP_TAGLEN (256)
# define SOAP_HDRLEN (1024)
# define SOAP_MAXDIMS (4)
# define HAVE_SSCANF
# elif defined(CYGWIN)
# define HAVE_POLL
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# define HAVE_INTTYPES_H
# define HAVE_LOCALE_H
# define HAVE_SOCKLEN_T
# elif defined(WIN32)
# ifdef __BORLANDC__
# ifdef __clang__
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOD_L
# define HAVE_STRTOL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_GMTIME
# define SOAP_LONG_FORMAT "%lld"
# define SOAP_ULONG_FORMAT "%llu"
# else
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOD_L
# define HAVE_STRTOL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_GMTIME
# define SOAP_LONG_FORMAT "%I64d"
# define SOAP_ULONG_FORMAT "%I64u"
# endif
# else
# if _MSC_VER >= 1400
# define HAVE_SNPRINTF
# endif
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOD_L
# define HAVE_STRTOL
# define HAVE_STRTOUL
# if _MSC_VER >= 1300
# define HAVE_STRTOLL /* use _strtoi64 */
# define HAVE_STRTOULL /* use _strtoui64 */
# endif
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_GMTIME
# define SOAP_LONG_FORMAT "%I64d"
# define SOAP_ULONG_FORMAT "%I64u"
# define HAVE_LOCALE_H
# endif
# elif defined(__APPLE__)
# define HAVE_POLL
# define HAVE_SNPRINTF
# define HAVE_STRLCPY
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOD_L
# define HAVE_SSCANF_L
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_STRTOLL
# define HAVE_STRTOULL
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_TM_GMTOFF
# define HAVE_GETTIMEOFDAY
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# define HAVE_TIMEGM
# define HAVE_INTTYPES_H
# define HAVE_LOCALE_H
# define HAVE_XLOCALE_H
# define HAVE_RANDOM
# define HAVE_SOCKLEN_T
# elif defined(_AIX41)
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_LOCALE_H
# elif defined(_AIX)
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GETHOSTBYNAME_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_LOCALE_H
# define HAVE_SOCKLEN_T
# elif defined(HP_UX)
# include <sys/_inttypes.h>
# if 0 /* enable if __strtoll and __strtoull are available */
extern intmax_t __strtoll(const char*, char**, int);
extern intmax_t __strtoull(const char*, char**, int);
# define strtoll __strtoll
# define strtoull __strtoull
# endif
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_STRTOLL
# define HAVE_STRTOULL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_ISNAN
# define HAVE_LOCALE_H
# elif defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD)
# define HAVE_POLL
# define HAVE_SNPRINTF
# define HAVE_STRLCPY
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOD_L
# define HAVE_SSCANF_L
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_STRTOLL
# define HAVE_STRTOULL
# define HAVE_GETTIMEOFDAY
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# define SOAP_LONG_FORMAT "%qd"
# define SOAP_ULONG_FORMAT "%qu"
# define HAVE_ISNAN
# define HAVE_ISINF
# define HAVE_INTTYPES_H
# define HAVE_LOCALE_H
# define HAVE_XLOCALE_H
# define HAVE_RANDOM
# define HAVE_SOCKLEN_T
# elif defined(__VMS)
# include <ioctl.h>
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# elif defined(TRU64)
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_GETTIMEOFDAY
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define __USE_STD_IOSTREAM
# define SOAP_LONG_FORMAT "%ld"
# define SOAP_ULONG_FORMAT "%lu"
# define HAVE_LOCALE_H
# elif defined(MAC_CARBON)
# define WITH_NOIO
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GETHOSTBYNAME_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# elif defined(SYMBIAN)
# define WITH_LEAN
# define WITH_NONAMESPACES
# define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */
# include <e32def.h>
# include <sys/ioctl.h>
# elif defined(VXWORKS)
# ifdef _WRS_KERNEL
# define _POSIX_THREADS 1
# endif
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_GMTIME
# define HAVE_LOCALTIME
# define HAVE_MKTIME
# elif defined(OS390)
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_SOCKLEN_T
# elif defined(AS400)
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# elif defined(__QNX__) || defined(QNX)
/* QNX does not have a working version of strtof */
# undef HAVE_STRTOF
# define HAVE_POLL
# define HAVE_SNPRINTF
# define HAVE_STRLCPY
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_STRTOLL
# define HAVE_STRTOULL
# define HAVE_GETTIMEOFDAY
# define HAVE_RAND_R
# define HAVE_GETHOSTBYNAME_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# define HAVE_SOCKLEN_T
# elif defined(SUN_OS)
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_SYS_TIMEB_H
# define HAVE_FTIME
# define HAVE_RAND_R
# define HAVE_GETHOSTBYNAME_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# elif defined(__GLIBC__) || defined(__GNU__) || defined(__GNUC__)
# define HAVE_POLL
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_STRTOLL
# define HAVE_STRTOULL
# define HAVE_GETTIMEOFDAY
# define HAVE_RAND_R
# define HAVE_GETHOSTBYNAME_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# define HAVE_TIMEGM
# define HAVE_ISNAN
# define HAVE_ISINF
# if !defined(__GNUC__) || __GNUC__ >= 4 /* gcc 3 and earlier often refuse to compile _l functions */
# define HAVE_STRTOD_L
# define HAVE_SSCANF_L
# define HAVE_LOCALE_H
# endif
# define HAVE_SOCKLEN_T
# else /* Default assumptions for supported library functions when not including config.h */
# ifndef WITH_C_LOCALE
# ifndef WITH_NO_C_LOCALE
# define WITH_NO_C_LOCALE /* turn locale support off by default */
# endif
# endif
# define HAVE_SNPRINTF
# define HAVE_STRRCHR
# define HAVE_STRTOD
# define HAVE_SSCANF
# define HAVE_STRTOL
# define HAVE_STRTOUL
# define HAVE_STRTOLL
# define HAVE_STRTOULL
# define HAVE_GETTIMEOFDAY
# define HAVE_RAND_R
# define HAVE_GETHOSTBYNAME_R
# define HAVE_GMTIME_R
# define HAVE_ASCTIME_R
# define HAVE_LOCALTIME_R
# define HAVE_STRERROR_R
# define HAVE_INTTYPES_H
# define HAVE_LOCALE_H
# endif
#endif
#ifdef WITH_LEANER
# ifndef WITH_LEAN
# define WITH_LEAN
# endif
#endif
/* gSOAP 2.7.15 and higher: always use FAST and retain CDATA in literal XML, unless WITH_LEAN or WITH_NOCDATA */
#ifndef WITH_LEAN
# ifndef WITH_FAST
# define WITH_FAST
# endif
# ifndef WITH_NOCDATA
# ifndef WITH_CDATA
# define WITH_CDATA
# endif
# endif
#endif
#if !defined(__cplusplus)
/* allowing empty struct/union in C is a GNU extension */
# if !defined(__GNU__) && !defined(__GNUC__)
# define WITH_NOEMPTYSTRUCT
# endif
#endif
/* silence clang's C99 variadic macro warnings */
#ifdef __clang__
# pragma clang diagnostic ignored "-Wvariadic-macros"
#endif
#if defined(WITH_PURE_VIRTUAL)
# define SOAP_PURE_VIRTUAL = 0
# define SOAP_PURE_VIRTUAL_COPY = 0
#elif defined(WITH_DEFAULT_VIRTUAL)
# define SOAP_PURE_VIRTUAL { return SOAP_NO_METHOD; }
# define SOAP_PURE_VIRTUAL_COPY
#else
# define SOAP_PURE_VIRTUAL
# define SOAP_PURE_VIRTUAL_COPY
#endif
/* older OpenVMS TCP/IP stacks cannot handle 65536 bytes */
#ifdef __VMS
# ifndef SOAP_BUFLEN
# define SOAP_BUFLEN (65535)
# endif
#endif
/* small buffer, to accelerate base64 and hex binary output */
#ifndef SOAP_BINARY_BUFLEN
# define SOAP_BINARY_BUFLEN (128)
#endif
/* if we have locale.h then we should use it WITH_C_LOCALE enabled to avoid decimal point conversion issues */
#ifdef HAVE_LOCALE_H
# ifndef WITH_NO_C_LOCALE
# ifndef WITH_C_LOCALE
# define WITH_C_LOCALE
# endif
# endif
#endif
/* MinGW does not support uselocale() and xlocale.h and gettimeofday() */
#if defined(__MINGW32__) || defined(__MINGW64__)
# if !defined(WITH_NO_C_LOCALE)
# define WITH_NO_C_LOCALE
# endif
# undef HAVE_GETTIMEOFDAY
#endif
/* user can set WITH_NO_C_LOCALE to force removal of locale (e.g. in case of compiler errors) */
#ifdef WITH_NO_C_LOCALE
# undef WITH_C_LOCALE
#endif
#ifndef WITH_NOSTDLIB
# include <stdlib.h>
# include <stddef.h>
# include <stdio.h>
# include <string.h>
# if !defined(HAVE_CONFIG_H) || defined(HAVE_CTYPE_H)
# include <ctype.h>
# endif
# if !defined(HAVE_CONFIG_H) || defined(HAVE_LIMITS_H)
# include <limits.h> /* for MB_LEN_MAX strtol strtoll strtoul strtoull */
# endif
# if !defined(HAVE_CONFIG_H) || defined(HAVE_FLOAT_H)
# include <float.h> /* for INFINITY */
# endif
# if !defined(HAVE_CONFIG_H) || defined(HAVE_MATH_H)
# include <math.h> /* for isnan() and isinf() */
# endif
#endif
/* force inclusion of xlocale.h when WITH_INCLUDE_XLOCALE_H is defined by the user for systems that require xlocale.h */
#ifdef WITH_INCLUDE_XLOCALE_H
# ifndef HAVE_XLOCALE_H
# define HAVE_XLOCALE_H
# endif
#endif
#ifdef WITH_C_LOCALE
# include <locale.h>
# if defined(WIN32) && !defined(CYGWIN)
# define SOAP_LOCALE_T _locale_t
# define SOAP_LOCALE(soap) ((soap)->c_locale ? (soap)->c_locale : ((soap)->c_locale = _create_locale(LC_ALL, "C")))
# define SOAP_FREELOCALE(soap) (void)((soap)->c_locale && (_free_locale((soap)->c_locale), ((soap)->c_locale = NULL)))
# else
# if defined(HAVE_XLOCALE_H)
# include <xlocale.h>
# endif
# define SOAP_LOCALE_T locale_t
# define SOAP_LOCALE(soap) ((soap)->c_locale ? (soap)->c_locale : ((soap)->c_locale = newlocale(LC_ALL_MASK, "C", NULL)))
# define SOAP_FREELOCALE(soap) (void)((soap)->c_locale && (freelocale((soap)->c_locale), ((soap)->c_locale = NULL)))
# if defined(CYGWIN)
# undef HAVE_STRTOF_L /* Cygwin does not support strtof_l strtod_l */
# undef HAVE_STRTOD_L
# endif
# endif
#else
# undef HAVE_STRTOF_L
# undef HAVE_STRTOD_L
# undef HAVE_SSCANF_L
#endif
#ifdef TANDEM_NONSTOP /* Support for Guardian */
# define SOAP_BUFLEN (32767)
/*# define WITH_NOSTDLIB */ /* uncommment to remove stdlib dependences */
# define WITH_NOIO /* no IO dependences, e.g. remove TCP/IP */
# define int32_t int
# define int64_t long long
# define LONG64 long long
# define ULONG64 unsigned long long
# define DBL_PINFTY (1.1579208923716189e77)
# undef HAVE_GMTIME_R
# undef HAVE_ASCTIME_R
# undef HAVE_LOCALTIME_R
# undef HAVE_SNPRINTF
# define SOAP_BUFLEN (32767)
# define SOAP_SOCKET short
#pragma nolist
# include <sys\param.h>
# include <sys\socket.h>
# include <netinet\in.h>
# include <netdb.h>
# include <stdio.h>
# include <fcntl.h>
# include <string.h>
# include <stdlib.h>
# include <memory.h>
# include <errno.h>
# include <cextdecs.h(TIME,FILE_CLOSE_,AWAITIOX,DELAY,FILEINFO,FILE_GETINFO_)>
# define INET_ERROR 4294967295
#pragma list
#elif defined(__TANDEM) /* Support for OSS */
# define int32_t int
# define SOAP_BUFLEN (32767)
#endif
#ifdef WITH_NTLM
# include <ntlm.h>
#endif
#ifdef HAVE_POLL
# include <poll.h>
#endif
#ifdef __cplusplus
# include <new>
# include <iterator>
# include <memory>
# ifndef WITH_COMPAT
# include <string>
# include <iostream>
# endif
#endif
#ifdef WITH_NOHTTP
# ifndef WITH_NOIO
# define WITH_NOIO
# undef WITH_COOKIES
# endif
#endif
/* Suggestion when SOAP_FD_EXCEEDED error occurs:
Some systems allow increasing FD_SETSIZE before including sys/types.h:
#define FD_SETSIZE (2048)
*/
#ifndef UNDER_CE
# ifndef WITH_NOIO
# include <errno.h>
# include <sys/types.h>
# endif
# ifndef WITH_LEAN
# ifdef HAVE_SYS_TIMEB_H
# ifdef HAVE_FTIME
# include <sys/timeb.h> /* for ftime() */
# endif
# endif
# include <time.h>
# endif
#endif
#ifdef OPENSERVER
# include <sys/socket.h>
# include <sys/stream.h>
# include <sys/protosw.h>
extern int h_errno;
#endif
#ifdef HAVE_GETTIMEOFDAY
# ifndef WIN32
# ifdef VXWORKS
# ifdef _WRS_KERNEL
# include <sys/times.h>
# endif
# else
# include <sys/time.h> /* for timeval and gettimeofday() */
# endif
# endif
#endif
#ifndef WITH_NOIO
# ifndef WIN32
# include <sys/socket.h>
# ifdef VXWORKS
# include <sockLib.h>
# include <selectLib.h>
# ifndef _WRS_KERNEL
# include <strings.h>
# endif
# else
# ifndef SYMBIAN
# include <strings.h>
# endif
# endif
# ifdef SUN_OS
# include <sys/stream.h> /* SUN */
# include <sys/socketvar.h> /* only needed with SUN < 2.8 ? */
# endif
# ifdef VXWORKS
# ifdef _WRS_KERNEL
# include <sys/times.h>
# endif
# endif
# include <netinet/in.h>
# ifdef OS390
# include <netinet/tcp_var.h>
# else
# include <netinet/tcp.h> /* TCP_NODELAY, TCP_FASTOPEN */
# endif
# include <arpa/inet.h>
# endif
#endif
#ifdef WIN32
# define SOAP_WINSOCKINT int
#else
# define SOAP_WINSOCKINT size_t
#endif
#ifdef WIN32
# undef WITH_SELF_PIPE
#endif
#if defined(WITH_IPV6_V6ONLY)
# ifndef WITH_IPV6
# define WITH_IPV6
# endif
#endif
#ifdef WIN32
# ifndef UNDER_CE
# include <io.h>
# include <fcntl.h>
# endif
// When you get macro redefinition errors when compiling the code below, then:
// a) try arrange your includes so <windows.h> is included after "stdsoap2.h"
// b) or define _WINSOCKAPI_ first:
// #define _WINSOCKAPI_ // stops windows.h including winsock.h
// #include <windows.h>
// #include "stdsoap2.h"
// c) or compile with the -DWIN32_LEAN_AND_MEAN switch
# include <winsock2.h> // Visual Studio 2005 users: install Platform SDK (R2)
# include <ws2tcpip.h>
// # define _WSPIAPI_COUNTOF // DEV NOTE: enble to fix problems with VC6
// # include <wspiapi.h>
# include <ws2spi.h> // DEV NOTE: replaces older wspiapi.h above
# ifdef WITH_IPV6
# define SOAP_GAI_STRERROR gai_strerrorA
# endif
#else
# ifdef VXWORKS
# include <hostLib.h>
# include <ioctl.h>
# include <ioLib.h>
# endif
# ifndef WITH_NOIO
# include <netdb.h>
# include <netinet/in.h>
# include <unistd.h>
# include <fcntl.h>
# ifdef _AIX41
# include <sys/select.h>
# endif
# endif
#endif
#ifdef WITH_FASTCGI
# include <fcgi_stdio.h>
#endif
#ifdef WITH_OPENSSL
# ifdef __VMS
# pragma names save
# pragma names uppercase
# endif
# undef WITH_GNUTLS
# define OPENSSL_NO_KRB5
# include <openssl/bio.h>
# include <openssl/err.h>
# include <openssl/rand.h>
# include <openssl/ssl.h>
# include <openssl/rsa.h>
# include <openssl/dh.h>
# include <openssl/asn1.h>
# include <openssl/x509v3.h>
# ifndef ALLOW_OLD_VERSIONS
# if (OPENSSL_VERSION_NUMBER < 0x00905100L)
# error "Must use OpenSSL 0.9.6 or later"
# endif
# endif
# ifdef __VMS
# pragma names restore
# endif
#endif
#ifdef WITH_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/x509.h>
# if GNUTLS_VERSION_NUMBER < 0x020b00
/* deprecated since GNUTLS 2.11.0 */
# include <gcrypt.h>
# endif
# ifndef HAVE_PTHREAD_H
# ifdef _POSIX_THREADS
# define HAVE_PTHREAD_H /* make GNUTLS thread safe */
# endif
# endif
#endif
#ifdef WITH_WOLFSSL
# include <wolfssl/ssl.h>
#endif
#ifdef WITH_SYSTEMSSL
# include <gskssl.h>
#endif
#ifdef WITH_GZIP
# ifndef WITH_ZLIB
# define WITH_ZLIB
# endif
#endif
#ifdef WITH_CASEINSENSITIVETAGS
# define SOAP_STRCMP soap_tag_cmp /* case insensitive XML element/attribute names */
#else
# define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */
#endif
#ifdef WITH_ZLIB
# include <zlib.h>
#endif
/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and internal operations (in file TEST.log) */
/* #define DEBUG_STAMP */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and time-stamped operations (in file TEST.log) */
#ifdef __cplusplus
extern "C" {
#endif
/* Portability (X/Open, BSD sockets etc): define SOAP_SOCKLEN_T as socklen_t or int or ... */
#if defined(HAVE_SOCKLEN_T)
# define SOAP_SOCKLEN_T socklen_t
#elif defined(_AIX) || defined(AIX) || defined(HP_UX)
# if defined(_AIX43)
# define SOAP_SOCKLEN_T socklen_t
# else
# define SOAP_SOCKLEN_T int
# endif
#elif defined(SOCKLEN_T)
# define SOAP_SOCKLEN_T SOCKLEN_T
#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(__ANDROID__) || !defined(_GNU_SOURCE) || (!(~_GNU_SOURCE+1) && !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600
# define SOAP_SOCKLEN_T socklen_t
#elif defined(IRIX) || defined(WIN32) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
# define SOAP_SOCKLEN_T int
#elif !defined(SOAP_SOCKLEN_T)
# define SOAP_SOCKLEN_T socklen_t
#endif
/* AIX DCE threads portability: define SOAP_FUNC_R_ERR gmtime_r and localtime_r err ret val as -1 */
#ifdef _AIX32_THREADS
# define SOAP_FUNC_R_ERR (-1)
#elif !defined(SOAP_FUNC_R_ERR)
# define SOAP_FUNC_R_ERR (NULL)
#endif
#ifndef SOAP_SOCKET
# ifdef WIN32
# define SOAP_SOCKET SOCKET
# define soap_closesocket(n) closesocket(n)
# else
# define SOAP_SOCKET int
# define soap_closesocket(n) close(n)