6 gSOAP XML Web services tools
7 Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved.
8 This part of the software is released under ONE of the following licenses:
9 GPL, or the gSOAP public license, or Genivia's license for commercial use.
10 --------------------------------------------------------------------------------
13 Wind River Systems, Inc., for the following additions
15 --------------------------------------------------------------------------------
18 The contents of this file are subject to the gSOAP Public License Version 1.3
19 (the "License"); you may not use this file except in compliance with the
20 License. You may obtain a copy of the License at
21 http://www.cs.fsu.edu/~engelen/soaplicense.html
22 Software distributed under the License is distributed on an "AS IS" basis,
23 WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
24 for the specific language governing rights and limitations under the License.
26 The Initial Developer of the Original Code is Robert A. van Engelen.
27 Copyright (C) 2000-2013, Robert van Engelen, Genivia Inc., All Rights Reserved.
28 --------------------------------------------------------------------------------
31 This program is free software; you can redistribute it and/or modify it under
32 the terms of the GNU General Public License as published by the Free Software
33 Foundation; either version 2 of the License, or (at your option) any later
36 This program is distributed in the hope that it will be useful, but WITHOUT ANY
37 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
38 PARTICULAR PURPOSE. See the GNU General Public License for more details.
40 You should have received a copy of the GNU General Public License along with
41 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
42 Place, Suite 330, Boston, MA 02111-1307 USA
44 Author contact information:
45 engelen@genivia.com / engelen@acm.org
47 This program is released under the GPL with the additional exemption that
48 compiling, linking, and/or using OpenSSL is allowed.
49 --------------------------------------------------------------------------------
50 A commercial use license is available from Genivia, Inc., contact@genivia.com
51 --------------------------------------------------------------------------------
54 #define GSOAP_VERSION 20817
56 #ifdef WITH_SOAPDEFS_H
57 # include "soapdefs.h" /* include user-defined stuff */
70 #ifndef SOAP_FMAC1 /* stdsoap2.h declaration macro */
74 #ifndef SOAP_FMAC2 /* stdsoap2.h declaration macro */
78 #ifndef SOAP_FMAC3 /* (de)serializer declaration macro */
82 #ifndef SOAP_FMAC3S /* string converter for (de)serializer declaration macro */
83 # define SOAP_FMAC3S SOAP_FMAC3
86 #ifndef SOAP_FMAC4 /* (de)serializer declaration macro */
90 #ifndef SOAP_FMAC4S /* string converter for (de)serializer declaration macro */
91 # define SOAP_FMAC4S SOAP_FMAC4
94 #ifndef SOAP_FMAC5 /* stub/skeleton declaration macro */
98 #ifndef SOAP_FMAC6 /* stub/skeleton declaration macro */
102 #ifndef SOAP_CMAC /* class declaration macro */
106 #ifndef SOAP_NMAC /* namespace table declaration macro */
110 #ifndef SOAP_SOURCE_STAMP
111 # define SOAP_SOURCE_STAMP(str)
114 /* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
122 #if defined(__vxworks) || defined(__VXWORKS__)
134 /* for legacy purposes we use WIN32 macro even though 64 bit is supported */
143 # define UNDER_CE _WIN32_WCE
172 #if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
184 #if defined(__digital__) && defined(__unix__)
198 # if defined(WITH_OPENSSL)
199 # ifndef HAVE_OPENSSL_SSL_H
203 # if defined(WITH_GNUTLS)
204 # ifndef HAVE_GNUTLS_GNUTLS_H
208 # if defined(WITH_ZLIB) || defined(WITH_GZIP)
215 # if defined(UNDER_CE)
218 # elif defined(WIN32)
219 # if _MSC_VER >= 1400
220 # define HAVE_SNPRINTF
222 # define HAVE_STRRCHR
225 # define HAVE_STRTOD_L
226 # define HAVE_SPRINTF_L
228 # define HAVE_STRTOUL
229 # if _MSC_VER >= 1300
230 # define HAVE_STRTOLL /* use _strtoi64 */
231 # define HAVE_STRTOULL /* use _strtoui64 */
233 # define HAVE_SYS_TIMEB_H
238 # define SOAP_LONG_FORMAT "%I64d"
239 # define SOAP_ULONG_FORMAT "%I64u"
240 # elif defined(CYGWIN)
242 # define HAVE_SNPRINTF
243 # define HAVE_STRRCHR
247 # define HAVE_STRTOUL
248 # define HAVE_SYS_TIMEB_H
251 # define HAVE_GMTIME_R
252 # define HAVE_LOCALTIME_R
253 # define HAVE_STRERROR_R
256 # elif defined(__APPLE__)
258 # define HAVE_SNPRINTF
259 # define HAVE_STRRCHR
262 # define HAVE_STRTOD_L
263 # define HAVE_SSCANF_L
264 # define HAVE_SPRINTF_L
266 # define HAVE_STRTOUL
268 # define HAVE_GMTIME_R
269 # define HAVE_TM_GMTOFF
270 # define HAVE_GETTIMEOFDAY
271 # define HAVE_LOCALTIME_R
272 # define HAVE_STRERROR_R
276 # define HAVE_INTTYPES_H
277 # elif defined(_AIX43)
278 # define HAVE_SNPRINTF
279 # define HAVE_STRRCHR
283 # define HAVE_STRTOUL
284 # define HAVE_SYS_TIMEB_H
287 # define HAVE_GMTIME_R
288 # define HAVE_LOCALTIME_R
291 # elif defined(_AIX41)
292 # define HAVE_SNPRINTF
293 # define HAVE_STRRCHR
297 # define HAVE_STRTOUL
298 # define HAVE_SYS_TIMEB_H
301 # elif defined(HP_UX)
302 # define HAVE_SNPRINTF
303 # define HAVE_STRRCHR
307 # define HAVE_STRTOUL
308 # define HAVE_SYS_TIMEB_H
311 # define HAVE_GMTIME_R
312 # define HAVE_LOCALTIME_R
316 # elif defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD)
318 # define HAVE_SNPRINTF
319 # define HAVE_STRRCHR
322 # define HAVE_STRTOD_L
323 # define HAVE_SSCANF_L
324 # define HAVE_SPRINTF_L
326 # define HAVE_STRTOUL
327 # define HAVE_STRTOLL
328 # define HAVE_STRTOULL
329 # define HAVE_GETTIMEOFDAY
331 # define HAVE_GMTIME_R
332 # define HAVE_LOCALTIME_R
333 # define HAVE_STRERROR_R
336 # define SOAP_LONG_FORMAT "%qd"
337 # define SOAP_ULONG_FORMAT "%qu"
340 # elif defined(__VMS)
342 # define HAVE_SNPRINTF
343 # define HAVE_STRRCHR
347 # define HAVE_STRTOUL
348 # define HAVE_SYS_TIMEB_H
351 # define HAVE_GMTIME_R
352 # define HAVE_LOCALTIME_R
355 # elif defined(__GLIBC__) || defined(__GNU__)
357 # define HAVE_SNPRINTF
358 # define HAVE_STRRCHR
361 # define HAVE_STRTOD_L
362 # define HAVE_SSCANF_L
363 # define HAVE_SPRINTF_L
365 # define HAVE_STRTOUL
366 # define HAVE_STRTOLL
367 # define HAVE_STRTOULL
368 # define HAVE_SYS_TIMEB_H
371 # define HAVE_GMTIME_R
372 # define HAVE_LOCALTIME_R
373 # define HAVE_STRERROR_R
379 # elif defined(TRU64)
380 # define HAVE_SNPRINTF
381 # define HAVE_STRRCHR
385 # define HAVE_STRTOUL
386 # define HAVE_GETTIMEOFDAY
387 # define HAVE_SYS_TIMEB_H
389 # define HAVE_GMTIME_R
390 # define HAVE_LOCALTIME_R
391 # define __USE_STD_IOSTREAM
394 # define SOAP_LONG_FORMAT "%ld"
395 # define SOAP_ULONG_FORMAT "%lu"
396 # elif defined(MAC_CARBON)
398 # define HAVE_SNPRINTF
399 # define HAVE_STRRCHR
402 # define HAVE_STRTOD_L
403 # define HAVE_SSCANF_L
404 # define HAVE_SPRINTF_L
406 # define HAVE_STRTOUL
409 # define HAVE_GETHOSTBYNAME_R
410 # define HAVE_GMTIME_R
411 # define HAVE_LOCALTIME_R
412 # define HAVE_STRERROR_R
417 # define HAVE_STRTOD /* strtod() is defined in palmFunctions.h */
418 # include <stdlib.h> /* Needs to be included before unix headers */
419 # include <sys_types.h>
420 # define IGNORE_STDIO_STUBS
421 # include <StdIOPalm.h>
422 # define O_NONBLOCK FNONBIO
423 # include <sys_socket.h>
424 # include "palmFunctions.h"
425 # elif defined(SYMBIAN)
427 # define WITH_NONAMESPACES
428 # define HAVE_STRTOD /* use STRTOD since sscanf doesn't seem to work */
430 # include <sys/ioctl.h>
431 # elif defined(VXWORKS)
433 # define _POSIX_THREADS 1
435 # define HAVE_STRRCHR
439 # define HAVE_STRTOUL
441 # define HAVE_LOCALTIME
443 # elif defined(OS390)
444 # define HAVE_SNPRINTF
445 # define HAVE_STRRCHR
449 # define HAVE_STRTOUL
450 # define HAVE_SYS_TIMEB_H
453 # define HAVE_GMTIME_R
454 # define HAVE_LOCALTIME_R
457 # elif defined(AS400)
458 # define HAVE_SNPRINTF
459 # define HAVE_STRRCHR
463 # define HAVE_STRTOUL
464 # define HAVE_SYS_TIMEB_H
467 # define HAVE_GMTIME_R
468 # define HAVE_LOCALTIME_R
471 # elif defined(__QNX__) || defined(QNX)
472 /* QNX does not have a working version of strtof */
475 # define HAVE_SNPRINTF
476 # define HAVE_STRRCHR
480 # define HAVE_STRTOUL
481 # define HAVE_SYS_TIMEB_H
484 # define HAVE_GETHOSTBYNAME_R
485 # define HAVE_GMTIME_R
486 # define HAVE_LOCALTIME_R
487 # define HAVE_STRERROR_R
490 # elif defined(SUN_OS)
491 # define HAVE_SNPRINTF
492 # define HAVE_STRRCHR
496 # define HAVE_STRTOUL
497 # define HAVE_SYS_TIMEB_H
500 # define HAVE_GETHOSTBYNAME_R
501 # define HAVE_GMTIME_R
502 # define HAVE_LOCALTIME_R
504 /* Default assumptions for supported functions */
505 # define HAVE_SNPRINTF
506 # define HAVE_STRRCHR
510 # define HAVE_STRTOUL
511 # define HAVE_SYS_TIMEB_H
514 # define HAVE_GETHOSTBYNAME_R
515 # define HAVE_GMTIME_R
516 # define HAVE_LOCALTIME_R
517 # define HAVE_STRERROR_R
525 /* gSOAP 2.7.15 and higher: always retain CDATA in literal XML, unless WITH_LEAN or WITH_NOCDATA */
527 # ifndef WITH_NOCDATA
542 # error "Cannot build WITH_LEAN code WITH_COOKIES enabled"
546 /* native Win, HP-UX, and AIX compilers don't like empty structs */
547 #if defined(WIN32) || defined(HP_UX) || defined(_AIX) || defined(AIX) || defined(VXWORKS)
548 # define WITH_NOEMPTYSTRUCT
551 #ifdef WITH_PURE_VIRTUAL
552 # define SOAP_PURE_VIRTUAL = 0
554 # define SOAP_PURE_VIRTUAL
559 # undef HAVE_STRTOULL
562 /* older OpenVMS TCP/IP stacks cannot handle 65536 bytes */
565 # define SOAP_BUFLEN (65535)
569 /* if we have xlocale.h we use it to avoid decimal point conversion issues */
574 # include <xlocale.h>
577 # undef HAVE_STRTOF_L
578 # undef HAVE_STRTOD_L
579 # undef HAVE_SSCANF_L
580 # undef HAVE_SPRINTF_L
583 #ifdef TANDEM_NONSTOP /* Support for Guardian */
584 # define SOAP_BUFLEN (32767)
585 /*# define WITH_NOSTDLIB */ /* uncommment to remove stdlib dependences */
586 # define WITH_NOIO /* no IO dependences, e.g. remove TCP/IP */
588 # define int64_t long long
589 # define LONG64 long long
590 # define ULONG64 long long
591 # define DBL_PINFTY (1.1579208923716189e77)
592 # define WITH_NOEMPTYSTRUCT
595 # undef HAVE_GMTIME_R
596 # undef HAVE_LOCALTIME_R
597 # undef HAVE_SNPRINTF
598 # define SOAP_BUFLEN (32767)
599 # define SOAP_SOCKET short
601 # include <sys\param.h>
602 # include <sys\socket.h>
603 # include <netinet\in.h>
611 # include <cextdecs.h(TIME,FILE_CLOSE_,AWAITIOX,DELAY,FILEINFO,FILE_GETINFO_)>
612 # define INET_ERROR 4294967295
614 #elif defined(__TANDEM) /* Support for OSS */
616 # define SOAP_BUFLEN (32767)
619 #ifndef WITH_NOSTDLIB
637 #if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT)
649 /* Suggestion when SOAP_FD_EXCEEDED error occurs:
650 Some systems allow increasing FD_SETSIZE before including sys/types.h:
651 #define FD_SETSIZE (2048)
658 # include <sys/types.h>
661 # ifdef HAVE_SYS_TIMEB_H
662 # include <sys/timeb.h> /* for ftime() */
670 # include <sys/socket.h>
671 # include <sys/stream.h>
672 # include <sys/protosw.h>
679 # include <sys/socket.h>
681 # include <sockLib.h>
682 # include <selectLib.h>
684 # include <strings.h>
688 # include <strings.h>
692 # include <sys/stream.h> /* SUN */
693 # include <sys/socketvar.h> /* SUN < 2.8 (?) */
697 # include <sys/times.h>
700 # include <sys/time.h>
702 # include <netinet/in.h>
704 # include <netinet/tcp_var.h>
706 # include <netinet/tcp.h> /* TCP_NODELAY */
708 # include <arpa/inet.h>
714 # define SOAP_WINSOCKINT int
716 # define SOAP_WINSOCKINT size_t
719 #if defined(WITH_IPV6_V6ONLY) || defined(WITH_NO_IPV6_V6ONLY)
730 // When you get macro redefinition errors when compiling the code below, then:
731 // a) try arrange your includes so <windows.h> is included after "stdsoap2.h"
732 // b) or define _WINSOCKAPI_ first:
733 // #define _WINSOCKAPI_ // stops windows.h including winsock.h
734 // #include <windows.h>
735 // #include "stdsoap2.h"
736 // c) or compile with the -DWIN32_LEAN_AND_MEAN switch
737 # include <winsock2.h> // Visual Studio 2005 users: install Platform SDK (R2)
738 # include <ws2tcpip.h>
739 // # define _WSPIAPI_COUNTOF // DEV NOTE: enble to fix problems with VC6
740 // # include <wspiapi.h>
741 # include <ws2spi.h> // DEV NOTE: replaces older wspiapi.h above
743 # define SOAP_GAI_STRERROR gai_strerrorA
747 # include <hostLib.h>
754 # include <netinet/in.h>
758 # include <sys/select.h>
765 # include <fcgi_stdio.h>
771 # pragma names uppercase
774 # define OPENSSL_NO_KRB5
775 # include <openssl/bio.h>
776 # include <openssl/err.h>
777 # include <openssl/rand.h>
778 # include <openssl/ssl.h>
779 # include <openssl/x509v3.h>
780 # ifndef ALLOW_OLD_VERSIONS
781 # if (OPENSSL_VERSION_NUMBER < 0x00905100L)
782 # error "Must use OpenSSL 0.9.6 or later"
786 # pragma names restore
791 # include <gnutls/gnutls.h>
792 # include <gnutls/x509.h>
794 # ifndef HAVE_PTHREAD_H
795 # ifdef _POSIX_THREADS
796 # define HAVE_PTHREAD_H /* make GNUTLS thread safe */
807 #ifdef WITH_CASEINSENSITIVETAGS
808 # define SOAP_STRCMP soap_tag_cmp /* case insensitve XML element/attribute names */
810 # define SOAP_STRCMP strcmp /* case sensitive XML element/attribute names */
817 #ifndef WITH_NOSTDLIB
819 # include <math.h> /* for isnan() */
823 /* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and internal operations (in file TEST.log) */
825 /* #define DEBUG_STAMP */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and time-stamped operations (in file TEST.log) */
831 /* Portability: define SOAP_SOCKLEN_T */
832 #if defined(_AIX) || defined(AIX)
834 # define SOAP_SOCKLEN_T socklen_t
836 # define SOAP_SOCKLEN_T int
838 #elif defined(SOCKLEN_T)
839 # define SOAP_SOCKLEN_T SOCKLEN_T
840 #elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(OPENBSD) || defined(__QNX__) || defined(QNX) || defined(OS390) || defined(__ANDROID__)
841 # define SOAP_SOCKLEN_T socklen_t
842 #elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS) || defined(HP_UX)
843 # define SOAP_SOCKLEN_T int
845 # define SOAP_SOCKLEN_T size_t
850 # define SOAP_SOCKET SOCKET
851 # define soap_closesocket(n) closesocket(n)
853 # define SOAP_SOCKET int
854 # define soap_closesocket(n) close(n)
858 #define SOAP_INVALID_SOCKET ((SOAP_SOCKET)-1)
859 #define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
861 #define SOAP_SHUT_WR 1
862 #define SOAP_SHUT_RDWR 2
864 #ifndef SOAP_GAI_STRERROR
865 # define SOAP_GAI_STRERROR gai_strerror
869 # define FD_SETSIZE (1024)
873 # define SOAP_CHK_EOF SOAP_EOF
875 # define SOAP_CHK_EOF (soap->error ? soap->error : SOAP_EOF)
879 # ifndef __STDC_FORMAT_MACROS
880 # define __STDC_FORMAT_MACROS
886 # define ULONG64 unsigned LONG64
887 #elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__)
889 # if defined(HAVE_INTTYPES_H)
890 # ifdef HAVE_STDINT_H
893 # include <inttypes.h>
894 # define LONG64 int64_t
895 # define ULONG64 uint64_t
896 # elif defined(HAVE_SYS_INTTYPES_H)
897 # include <sys/inttypes.h>
898 # define LONG64 int64_t
899 # define ULONG64 uint64_t
900 # elif defined(HAVE_STDINT_H)
902 # define LONG64 int64_t
903 # define ULONG64 uint64_t
904 # elif defined(__GLIBC__)
905 # include <bits/wordsize.h>
906 # if (__WORDSIZE == 64)
907 # define LONG64 int64_t
908 # define ULONG64 uint64_t
909 # ifndef SOAP_LONG_FORMAT
910 # define SOAP_LONG_FORMAT "%ld"
912 # ifndef SOAP_ULONG_FORMAT
913 # define SOAP_ULONG_FORMAT "%lu"
916 # define LONG64 long long
917 # define ULONG64 unsigned LONG64
920 # define LONG64 long long
921 # define ULONG64 unsigned LONG64
924 #elif defined(UNDER_CE)
925 # define LONG64 __int64
926 # define ULONG64 unsigned LONG64
927 #elif defined(__BORLANDC__)
928 # define LONG64 __int64
929 # define ULONG64 unsigned LONG64
933 # ifndef SOAP_LONG_FORMAT
934 # define SOAP_LONG_FORMAT "%" PRId64
939 # ifndef SOAP_ULONG_FORMAT
940 # define SOAP_ULONG_FORMAT "%" PRIu64
944 #ifndef SOAP_LONG_FORMAT
945 # define SOAP_LONG_FORMAT "%lld" /* printf format for 64 bit ints */
948 #ifndef SOAP_ULONG_FORMAT
949 # define SOAP_ULONG_FORMAT "%llu" /* printf format for unsigned 64 bit ints */
952 #if defined(WIN32) && !defined(CYGWIN)
953 # define soap_int32 __int32
954 #elif defined(SYMBIAN)
955 # define soap_int32 long
957 # define soap_int32 Int32
958 #elif defined(_AIX) || defined(AIX)
960 # define soap_int32 int32_t
962 # define soap_int32 signed int
965 # define soap_int32 int32_t
969 # define SOAP_ERANGE ERANGE
970 # define SOAP_EINTR WSAEINTR
971 # define SOAP_EAGAIN WSAEWOULDBLOCK
972 # define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
973 # define SOAP_EINPROGRESS WSAEINPROGRESS
974 # define SOAP_EADDRINUSE WSAEADDRINUSE
976 # define SOAP_ERANGE ERANGE
977 # define SOAP_EINTR EINTR
978 # define SOAP_EAGAIN EAGAIN
979 # define SOAP_EADDRINUSE EADDRINUSE
981 # define SOAP_EWOULDBLOCK 9898
982 # define SOAP_EINPROGRESS 9899
984 # define SOAP_EWOULDBLOCK EWOULDBLOCK
985 # define SOAP_EINPROGRESS EINPROGRESS
991 # define soap_errno GetLastError()
992 # define soap_socket_errno(s) GetLastError()
993 # define soap_reset_errno SetLastError(0)
995 # define soap_errno GetLastError()
996 # define soap_socket_errno(s) WSAGetLastError()
997 # define soap_reset_errno SetLastError(0)
1001 # define soap_errno errno
1002 # define soap_socket_errno(s) errno
1003 # define soap_reset_errno (errno = 0)
1005 # define soap_errno 0
1006 # define soap_socket_errno(s) 0
1007 # define soap_reset_errno
1012 # if !defined(WITH_LEAN)
1013 # define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r and UDP messages, so don't make this too small */
1015 # define SOAP_BUFLEN (2048) /* lean size */
1019 # define SOAP_LABLEN (256) /* initial look-aside buffer length */
1022 # define SOAP_PTRBLK (32) /* block allocation for pointer hash table chains */
1024 #ifndef SOAP_PTRHASH
1026 # define SOAP_PTRHASH (4096) /* size of pointer analysis hash table (must be power of 2) */
1028 # define SOAP_PTRHASH (32)
1033 # define SOAP_IDHASH (1999) /* prime size of hash table for parsed id/ref */
1035 # define SOAP_IDHASH (19) /* 19, 199 */
1040 # define SOAP_BLKLEN (256) /* to collect long strings and XML attributes */
1042 # define SOAP_BLKLEN (32)
1047 # define SOAP_TAGLEN (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
1049 # define SOAP_TAGLEN (128)
1054 # define SOAP_HDRLEN (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
1056 # define SOAP_HDRLEN (1024)
1059 #ifndef SOAP_MAXDIMS
1061 # define SOAP_MAXDIMS (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
1063 # define SOAP_MAXDIMS (4)
1067 #ifndef SOAP_MAXLOGS
1068 # define SOAP_MAXLOGS (3) /* max number of debug logs per struct soap environment */
1069 # define SOAP_INDEX_RECV (0)
1070 # define SOAP_INDEX_SENT (1)
1071 # define SOAP_INDEX_TEST (2)
1074 /* Max number of EINTR while poll/select on a socket */
1075 /* Each EINTR can lengthen the I/O blocking time by at most one second */
1076 #ifndef SOAP_MAXEINTR
1077 # define SOAP_MAXEINTR (10)
1080 /* Max iterations in soap_serve() to keep server connection alive */
1081 #ifndef SOAP_MAXKEEPALIVE
1082 # define SOAP_MAXKEEPALIVE (100)
1085 /* Trusted max size of inbound SOAP array for compound array allocation.
1086 Increase if necessary to allow larger arrays.
1088 #ifndef SOAP_MAXARRAYSIZE
1089 # define SOAP_MAXARRAYSIZE (1000000)
1092 /* Trusted max size of inbound DIME data.
1093 Increase if necessary to allow larger attachments, or decrease when server
1094 resources are limited.
1096 #ifndef SOAP_MAXDIMESIZE
1097 # define SOAP_MAXDIMESIZE (8388608) /* 8 MB */
1102 # include "httpLib.h"
1105 # include <private/mathP.h>
1110 # define soap_isnan(num) isNan(num)
1113 # ifdef WM_SECURE_KEY_STORAGE
1114 # include <ipcom_key_db.h>
1123 # define soap_isnan(n) _isnan(n)
1127 # define soap_isinf(n) (!_finite(n))
1137 extern "C" int isnan(double);
1138 extern "C" int isinf(double);
1149 #if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
1153 union soap_double_nan
{struct {unsigned int n1
, n2
;} iv
; double dv
; float fv
;};
1154 extern const union soap_double_nan soap_double_nan
;
1155 extern const char soap_base64o
[], soap_base64i
[];
1159 # define FLT_MAX _ARCH_FLT_MAX
1162 # define DBL_MAX _ARCH_DBL_MAX
1167 # define FLT_NAN (soap_double_nan.fv)
1171 # if defined(FLT_MAX)
1172 # define FLT_PINFTY FLT_MAX
1173 # elif defined(HUGE_VALF)
1174 # define FLT_PINFTY (float)HUGE_VALF
1175 # elif defined(HUGE_VAL)
1176 # define FLT_PINFTY (float)HUGE_VAL
1177 # elif defined(FLOAT_MAX)
1178 # define FLT_PINFTY FLOAT_MAX
1180 # define FLT_PINFTY (3.40282347e+38F)
1185 # define FLT_NINFTY (-FLT_PINFTY)
1189 # define DBL_NAN (soap_double_nan.dv)
1193 # if defined(DBL_MAX)
1194 # define DBL_PINFTY DBL_MAX
1195 # elif defined(HUGE_VALF)
1196 # define DBL_PINFTY (double)HUGE_VALF
1197 # elif defined(HUGE_VAL)
1198 # define DBL_PINFTY (double)HUGE_VAL
1199 # elif defined(DOUBLE_MAX)
1200 # define DBL_PINFTY DOUBLE_MAX
1202 # define DBL_PINFTY (1.7976931348623157e+308)
1207 # define DBL_NINFTY (-DBL_PINFTY)
1212 # define soap_isnan(n) isnan(n)
1214 # define soap_isnan(n) ((n) != (n))
1220 # define soap_isinf(n) isinf(n)
1222 # define soap_isinf(n) (!soap_isnan(n) && soap_isnan((n) - (n)))
1226 #define soap_ispinfd(n) ((n) > 0 && soap_isinf(n))
1227 #define soap_ispinff(n) ((n) > 0 && soap_isinf(n))
1228 #define soap_isninfd(n) ((n) < 0 && soap_isinf(n))
1229 #define soap_isninff(n) ((n) < 0 && soap_isinf(n))
1231 #ifdef HAVE_SNPRINTF
1233 # define soap_snprintf(buf, len, ...) (_snprintf((buf), (len), __VA_ARGS__), (buf)[(len)-1] = '\0')
1235 # define soap_snprintf snprintf
1239 /* gSOAP status/error codes */
1241 typedef soap_int32 soap_status
;
1243 #define SOAP_EOF EOF
1244 #define SOAP_ERR EOF
1246 #define SOAP_CLI_FAULT 1
1247 #define SOAP_SVR_FAULT 2
1248 #define SOAP_TAG_MISMATCH 3
1250 #define SOAP_SYNTAX_ERROR 5
1251 #define SOAP_NO_TAG 6
1253 #define SOAP_MUSTUNDERSTAND 8
1254 #define SOAP_NAMESPACE 9
1255 #define SOAP_USER_ERROR 10
1256 #define SOAP_FATAL_ERROR 11
1257 #define SOAP_FAULT 12
1258 #define SOAP_NO_METHOD 13
1259 #define SOAP_NO_DATA 14
1260 #define SOAP_GET_METHOD 15
1261 #define SOAP_PUT_METHOD 16
1262 #define SOAP_DEL_METHOD 17 /* deprecated */
1263 #define SOAP_HEAD_METHOD 18 /* deprecated */
1264 #define SOAP_HTTP_METHOD 19
1268 #define SOAP_NULL 23
1269 #define SOAP_DUPLICATE_ID 24
1270 #define SOAP_MISSING_ID 25
1271 #define SOAP_HREF 26
1272 #define SOAP_UDP_ERROR 27
1273 #define SOAP_TCP_ERROR 28
1274 #define SOAP_HTTP_ERROR 29
1275 #define SOAP_SSL_ERROR 30
1276 #define SOAP_ZLIB_ERROR 31
1277 #define SOAP_DIME_ERROR 32
1278 #define SOAP_DIME_HREF 33
1279 #define SOAP_DIME_MISMATCH 34
1280 #define SOAP_DIME_END 35
1281 #define SOAP_MIME_ERROR 36
1282 #define SOAP_MIME_HREF 37
1283 #define SOAP_MIME_END 38
1284 #define SOAP_VERSIONMISMATCH 39
1285 #define SOAP_PLUGIN_ERROR 40
1286 #define SOAP_DATAENCODINGUNKNOWN 41
1287 #define SOAP_REQUIRED 42
1288 #define SOAP_PROHIBITED 43
1289 #define SOAP_OCCURS 44
1290 #define SOAP_LENGTH 45
1291 #define SOAP_FD_EXCEEDED 46
1292 #define SOAP_UTF_ERROR 47
1293 #define SOAP_NTLM_ERROR 48
1295 #define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_NO_TAG || (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)
1296 #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)
1297 #define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
1298 #define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
1299 #define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
1300 #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_NO_DATA || ((e) >= SOAP_GET_METHOD && (e) <= SOAP_HTTP_METHOD) || ((e) >= 100 && (e) < 600))
1302 /* gSOAP HTTP response status codes 100 to 599 are reserved */
1304 /* Codes 600 to 999 are user definable */
1306 /* Exceptional gSOAP HTTP server response status codes >= 1000 */
1308 #define SOAP_STOP 1000 /* No HTTP response */
1309 #define SOAP_FORM 1001 /* Request (form) data is present, no HTTP response */
1310 #define SOAP_HTML 1002 /* Custom HTML response */
1311 #define SOAP_FILE 1003 /* Custom file-based response */
1313 /* gSOAP HTTP method codes (client) */
1315 #define SOAP_POST 2000 /* POST request */
1316 #define SOAP_POST_FILE 2001 /* Custom file-based POST request */
1317 #define SOAP_GET 2002 /* GET request */
1318 #define SOAP_PUT 2003 /* PUT request */
1319 #define SOAP_DEL 2004 /* DELETE request */
1320 #define SOAP_CONNECT 2005 /* CONNECT request */
1324 #define SOAP_DIME_CF 0x01
1325 #define SOAP_DIME_ME 0x02
1326 #define SOAP_DIME_MB 0x04
1327 #define SOAP_DIME_VERSION 0x08 /* DIME version 1 */
1328 #define SOAP_DIME_MEDIA 0x10
1329 #define SOAP_DIME_ABSURI 0x20
1333 #define SOAP_ZLIB_NONE 0x00
1334 #define SOAP_ZLIB_DEFLATE 0x01
1335 #define SOAP_ZLIB_INFLATE 0x02
1336 #define SOAP_ZLIB_GZIP 0x02
1338 /* gSOAP transport, connection, and content encoding modes */
1340 typedef soap_int32 soap_mode
;
1342 #define SOAP_IO 0x00000003 /* IO mask */
1343 #define SOAP_IO_FLUSH 0x00000000 /* flush output immediately, no buffering */
1344 #define SOAP_IO_BUFFER 0x00000001 /* buffer output in packets of size SOAP_BUFLEN */
1345 #define SOAP_IO_STORE 0x00000002 /* store entire output to determine length for transport */
1346 #define SOAP_IO_CHUNK 0x00000003 /* use HTTP chunked transfer AND buffer packets */
1348 #define SOAP_IO_UDP 0x00000004 /* TCP or UDP */
1349 #define SOAP_IO_LENGTH 0x00000008 /* calc message length (internal) */
1350 #define SOAP_IO_KEEPALIVE 0x00000010 /* keep connection alive */
1352 #define SOAP_ENC 0x00000FFF /* IO and ENC mask */
1353 #define SOAP_ENC_LATIN 0x00000020 /* in: accept iso-8859-1 */
1354 #define SOAP_ENC_XML 0x00000040 /* out: plain XML encoding, no HTTP header */
1355 #define SOAP_ENC_DIME 0x00000080
1356 #define SOAP_ENC_MIME 0x00000100
1357 #define SOAP_ENC_MTOM 0x00000200
1358 #define SOAP_ENC_ZLIB 0x00000400
1359 #define SOAP_ENC_SSL 0x00000800
1361 #define SOAP_XML_STRICT 0x00001000 /* in: strict validation */
1362 #define SOAP_XML_INDENT 0x00002000 /* out: emit indented XML */
1363 #define SOAP_XML_IGNORENS 0x00004000 /* in: ignore namespaces */
1364 #define SOAP_XML_DEFAULTNS 0x00008000 /* out: emit xmlns="..." */
1365 #define SOAP_XML_CANONICAL 0x00010000 /* out: excC14N canonical XML */
1366 #define SOAP_XML_TREE 0x00020000 /* in/out: XML tree (no id/ref) */
1367 #define SOAP_XML_NIL 0x00040000 /* out: NULLs as xsi:nil */
1368 #define SOAP_XML_NOTYPE 0x00080000 /* out: do not add xsi:type */
1370 #define SOAP_DOM_TREE 0x00100000 /* see DOM manual */
1371 #define SOAP_DOM_NODE 0x00200000
1372 #define SOAP_DOM_ASIS 0x00400000
1374 #define SOAP_C_NOIOB 0x01000000 /* don't fault on array index out of bounds (just ignore) */
1375 #define SOAP_C_UTFSTRING 0x02000000 /* (de)serialize strings with UTF8 content */
1376 #define SOAP_C_MBSTRING 0x04000000 /* (de)serialize strings with multi-byte content */
1377 #define SOAP_C_NILSTRING 0x08000000 /* serialize empty strings as nil (omitted) */
1379 #define SOAP_XML_DOM 0x10000000 /* enable internal DOM */
1380 #define SOAP_XML_GRAPH 0x20000000 /* force id-ref XML graph */
1382 #define SOAP_MIME_POSTCHECK 0x40000000 /* MIME flag (internal) */
1384 #define SOAP_SEC_WSUID 0x80000000 /* Add Body wsu:Id */
1386 /* WITH_XMLNS backward compatibility: always use XML default namespaces */
1388 # define SOAP_IO_DEFAULT (SOAP_IO_FLUSH | SOAP_XML_DEFAULTNS)
1390 # define SOAP_IO_DEFAULT SOAP_IO_FLUSH
1393 /* SSL client/server authentication settings */
1395 #define SOAP_SSL_NO_AUTHENTICATION 0x00 /* for testing purposes */
1396 #define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION 0x01 /* client requires server to authenticate */
1397 #define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION 0x02 /* server requires client to authenticate */
1398 #define SOAP_SSL_SKIP_HOST_CHECK 0x04 /* client does not check the common name of the host in certificate */
1399 #define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE 0x08 /* client does not check the expiration date of the host certificate */
1400 #define SOAP_SSL_NO_DEFAULT_CA_PATH 0x10 /* don't use default_verify_paths */
1401 #define SOAP_SSL_RSA 0x20 /* use RSA */
1402 #define SOAP_SSLv3 0x40 /* SSL v3 only */
1403 #define SOAP_TLSv1 0x80 /* TLS v1 only */
1404 #define SOAP_SSLv3_TLSv1 0x00 /* SSL v3 and TLS v1 support by default (no SSL v1/v2) */
1405 #define SOAP_SSL_CLIENT 0x100 /* client context */
1407 #define SOAP_SSL_DEFAULT (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1)
1415 #define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
1419 #define SOAP_BEGIN 0
1420 #define SOAP_IN_ENVELOPE 2
1421 #define SOAP_IN_HEADER 3
1422 #define SOAP_END_HEADER 4
1423 #define SOAP_NO_BODY 5
1424 #define SOAP_IN_BODY 6
1425 #define SOAP_END_BODY 7
1426 #define SOAP_END_ENVELOPE 8
1431 #define SOAP_SEC_BEGIN 1
1432 #define SOAP_SEC_SIGN 2
1433 #define SOAP_SEC_DECRYPT 3
1447 # ifndef SOAP_MEM_DEBUG
1448 # define SOAP_MEM_DEBUG
1453 #ifdef SOAP_MEM_DEBUG
1454 # ifndef SOAP_MALLOC
1455 # define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
1458 # define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
1462 #ifndef SOAP_MALLOC /* use libc malloc */
1463 # define SOAP_MALLOC(soap, size) malloc(size)
1466 #ifndef SOAP_FREE /* use libc free */
1467 # define SOAP_FREE(soap, ptr) free(ptr)
1470 #if defined(__GNUC__) && (__GNUC__ <= 2)
1471 # define SOAP_NOTHROW
1472 #elif !defined(WITH_LEAN) && !defined(WITH_COMPAT) && !defined(SOAP_NOTHROW)
1473 # define SOAP_NOTHROW (std::nothrow)
1475 # define SOAP_NOTHROW
1478 #if (defined(__GNUC__) && (__GNUC__ <= 2) && !defined(__BORLANDC__)) || defined(__clang__) || defined(_AIX) || defined(AIX)
1479 /* old form w/o parenthesis */
1481 # define SOAP_NEW(type) new SOAP_NOTHROW type
1483 # ifndef SOAP_NEW_ARRAY
1484 # define SOAP_NEW_ARRAY(type, n) new SOAP_NOTHROW type[n]
1486 # ifndef SOAP_PLACEMENT_NEW
1487 # define SOAP_PLACEMENT_NEW(buf, type) new (buf) type
1490 /* new form with parenthesis */
1492 # define SOAP_NEW(type) new SOAP_NOTHROW (type)
1494 # ifndef SOAP_NEW_ARRAY
1495 # define SOAP_NEW_ARRAY(type, n) new SOAP_NOTHROW type[n]
1497 # ifndef SOAP_PLACEMENT_NEW
1498 # define SOAP_PLACEMENT_NEW(buf, type) new (buf) (type)
1502 #ifndef SOAP_NEW_COPY /* use C++ new operator for ::copy() */
1503 # define SOAP_NEW_COPY(clas) new SOAP_NOTHROW clas
1506 #ifndef SOAP_DELETE /* use C++ delete operator */
1507 # define SOAP_DELETE(obj) delete obj
1510 #ifndef SOAP_DELETE_ARRAY /* use C++ delete[] operator */
1511 # define SOAP_DELETE_ARRAY(obj) delete[] obj
1515 # ifndef SOAP_MESSAGE
1516 # define SOAP_MESSAGE fprintf
1521 # define DBGLOG(DBGFILE, CMD) \
1523 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1524 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
1525 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1526 { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
1527 SYSTEMTIME _localTime;\
1528 ::GetLocalTime(&_localTime); \
1529 fprintf(fdebug, "%02d%02d%02d %02d:%02d:%02d.%03d|", _localTime.wYear%100, _localTime.wMonth, _localTime.wDay, _localTime.wHour, _localTime.wMinute, _localTime.wSecond, _localTime.wMilliseconds);\
1536 # define DBGLOG(DBGFILE, CMD) \
1538 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1539 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
1540 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1541 { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
1542 struct timeval _tv;\
1544 gettimeofday(&_tv, NULL);\
1545 localtime_r(&_tv.tv_sec, &_tm);\
1546 fprintf(fdebug, "%02d%02d%02d %02d:%02d:%02d.%06d|", _tm.tm_year%100, _tm.tm_mon+1, _tm.tm_mday, _tm.tm_hour, _tm.tm_min, _tm.tm_sec, _tv.tv_usec);\
1554 # define DBGLOG(DBGFILE, CMD) \
1556 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1557 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
1558 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1559 { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
1568 # define DBGMSG(DBGFILE, MSG, LEN) \
1570 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1571 soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
1572 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1573 { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
1574 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
1580 # define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
1581 # define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s(" FMT ")\n", __FILE__, __LINE__, FNAME, (ARG)))
1582 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s(" FMT1 ", " FMT2 ")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
1583 # 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)))
1586 # define DBGHEX(DBGFILE, MSG, LEN) \
1588 { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
1589 soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
1590 if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
1592 for (s = (char*)(MSG), i = (LEN); i; i--)\
1593 fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2X ", (int)*s++&0xFF);\
1594 fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
1600 # define DBGLOG(DBGFILE, CMD)
1601 # define DBGMSG(DBGFILE, MSG, LEN)
1602 # define DBGFUN(FNAME)
1603 # define DBGFUN1(FNAME, FMT, ARG)
1604 # define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
1605 # define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
1606 # define DBGHEX(DBGFILE, MSG, LEN)
1609 /* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
1610 typedef soap_int32 soap_wchar
;
1612 /* namespace table row */
1620 /* namespace stack */
1622 { struct soap_nlist
*next
;
1623 unsigned int level
; /* nesting depth level */
1624 short index
; /* corresponding entry in ns mapping table */
1625 const char *ns
; /* only set when parsed ns URI is not in the ns mapping table */
1626 char id
[1]; /* the actual string value flows into the allocated region below this struct */
1629 /* block stack for nested block allocations */
1631 { struct soap_blist
*next
;
1642 /* pointer serialization management */
1644 { struct soap_plist
*next
;
1646 const struct soap_array
*array
;
1649 char mark1
; /* 0=single-ref, 1=embedded-multi-ref (SOAP1.1), 2=multi-ref, 3=attachment */
1653 /* block allocation for pointer serialization management */
1655 { struct soap_pblk
*next
;
1656 struct soap_plist plist
[SOAP_PTRBLK
];
1659 #ifdef SOAP_MEM_DEBUG
1660 /* malloc/free tracking for debugging */
1662 { struct soap_mlist
*next
;
1670 /* class allocation list */
1672 { struct soap_clist
*next
;
1676 int (*fdelete
)(struct soap_clist
*);
1680 struct soap_attribute
1681 { struct soap_attribute
*next
;
1682 short flag
; /* soap_set_attr: 1 = normal, 2 = utf content */
1687 char name
[1]; /* the actual name string flows into the allocated region below this struct */
1692 { struct soap_cookie
*next
;
1697 time_t expire
; /* client-side: local time to expire */
1698 long maxage
; /* server-side: seconds to expire */
1699 unsigned int version
;
1701 short session
; /* server-side */
1702 short env
; /* server-side: got cookie from client and should not be (re)send */
1703 short modified
; /* server-side: client cookie was modified and should be send */
1707 SOAP_FMAC1
struct soap_multipart
* SOAP_FMAC2
soap_next_multipart(struct soap_multipart
*);
1711 class soap_multipart_iterator
1713 struct soap_multipart
*content
;
1714 bool operator==(const soap_multipart_iterator
& iter
) const
1715 { return (bool)(content
== iter
.content
); }
1716 bool operator!=(const soap_multipart_iterator
& iter
) const
1717 { return (bool)(content
!= iter
.content
); }
1718 struct soap_multipart
&operator*() const
1719 { return *content
; }
1720 soap_multipart_iterator
&operator++()
1721 { content
= soap_next_multipart(content
); return *this; }
1722 soap_multipart_iterator() : content(NULL
)
1724 soap_multipart_iterator(struct soap_multipart
*p
) : content(p
)
1739 const char *options
;
1740 struct soap_multipart
*list
; /* list of DIME attachments received */
1741 struct soap_multipart
*first
, *last
; /* temporary in/out queue */
1743 soap_multipart_iterator
begin()
1744 { soap_multipart_iterator
iter(list
); return iter
; };
1745 soap_multipart_iterator
end()
1746 { soap_multipart_iterator
iter(NULL
); return iter
; };
1753 { char *boundary
; /* MIME boundary */
1754 const char *start
; /* MIME start ID */
1755 struct soap_multipart
*list
; /* list of MIME attachments received */
1756 struct soap_multipart
*first
, *last
; /* temporary in/out queue */
1758 soap_multipart_iterator
begin()
1759 { soap_multipart_iterator
iter(list
); return iter
; };
1760 soap_multipart_iterator
end()
1761 { soap_multipart_iterator
iter(NULL
); return iter
; };
1767 /* RFC2045 MIME content transfer encodings */
1768 enum soap_mime_encoding
1773 SOAP_MIME_QUOTED_PRINTABLE
,
1775 SOAP_MIME_IETF_TOKEN
,
1781 /* DIME/MIME multipart list */
1782 struct soap_multipart
1783 { struct soap_multipart
*next
;
1784 char *ptr
; /* points to raw data content */
1785 size_t size
; /* size of data content */
1786 const char *id
; /* DIME/MIME content ID or form data name */
1787 const char *type
; /* DIME/MIME type (MIME type format) */
1788 const char *options
; /* DIME options */
1789 enum soap_mime_encoding encoding
; /* MIME Content-Transfer-Encoding */
1790 const char *location
; /* MIME Content-Location (optional) */
1791 const char *description
; /* MIME Content-Description (optional) */
1793 typedef soap_multipart_iterator iterator
;
1799 /* attachment DIME and MTOM XOP forwarding */
1801 { struct soap_xlist
*next
;
1802 unsigned char **ptr
;
1810 /******************************************************************************/
1814 class soap_dom_attribute_iterator
1816 struct soap_dom_attribute
*att
;
1819 bool operator==(const soap_dom_attribute_iterator
&) const;
1820 bool operator!=(const soap_dom_attribute_iterator
&) const;
1821 struct soap_dom_attribute
&operator*() const;
1822 soap_dom_attribute_iterator
&operator++();
1823 soap_dom_attribute_iterator();
1824 soap_dom_attribute_iterator(struct soap_dom_attribute
*);
1825 ~soap_dom_attribute_iterator();
1831 struct soap_dom_attribute
1832 { struct soap_dom_attribute
*next
;
1839 typedef soap_dom_attribute_iterator iterator
;
1840 struct soap_dom_attribute
&set(const char *nstr
, const char *name
); /* set namespace and name */
1841 struct soap_dom_attribute
&set(const char *data
); /* set data */
1842 soap_dom_attribute_iterator
begin();
1843 soap_dom_attribute_iterator
end();
1844 soap_dom_attribute_iterator
find(const char *nstr
, const char *name
);
1846 soap_dom_attribute();
1847 soap_dom_attribute(struct soap
*soap
);
1848 soap_dom_attribute(struct soap
*soap
, const char *nstr
, const char *name
, const char *data
);
1849 ~soap_dom_attribute();
1856 class soap_dom_element_iterator
1858 struct soap_dom_element
*elt
;
1862 bool operator==(const soap_dom_element_iterator
&) const;
1863 bool operator!=(const soap_dom_element_iterator
&) const;
1864 struct soap_dom_element
&operator*() const;
1865 soap_dom_element_iterator
&operator++();
1866 soap_dom_element_iterator();
1867 soap_dom_element_iterator(struct soap_dom_element
*);
1868 ~soap_dom_element_iterator();
1874 struct soap_dom_element
1875 { struct soap_dom_element
*next
; /* next sibling */
1876 struct soap_dom_element
*prnt
; /* parent */
1877 struct soap_dom_element
*elts
; /* list of child elements */
1878 struct soap_dom_attribute
*atts
; /* list of attributes */
1879 const char *nstr
; /* namespace string */
1880 char *name
; /* element tag name */
1881 char *data
; /* element content data (with SOAP_C_UTFSTRING flag set) */
1882 wchar_t *wide
; /* element content data */
1883 int type
; /* optional: serialized C/C++ data type */
1884 void *node
; /* optional: pointer to serialized C/C++ data */
1885 char *head
; /* leading content before start tag */
1886 char *tail
; /* leading content before end tag */
1887 struct soap
*soap
; /* soap context that manages this node */
1889 typedef soap_dom_element_iterator iterator
;
1890 struct soap_dom_element
&set(const char *nstr
, const char *name
);
1891 struct soap_dom_element
&set(const char *data
);
1892 struct soap_dom_element
&set(void *node
, int type
);
1893 struct soap_dom_element
&add(struct soap_dom_element
*);
1894 struct soap_dom_element
&add(struct soap_dom_element
&);
1895 struct soap_dom_element
&add(struct soap_dom_attribute
*);
1896 struct soap_dom_element
&add(struct soap_dom_attribute
&);
1897 soap_dom_element_iterator
begin();
1898 soap_dom_element_iterator
end();
1899 soap_dom_element_iterator
find(const char *nstr
, const char *name
);
1900 soap_dom_element_iterator
find(int type
);
1903 soap_dom_element(struct soap
*soap
);
1904 soap_dom_element(struct soap
*soap
, const char *nstr
, const char *name
);
1905 soap_dom_element(struct soap
*soap
, const char *nstr
, const char *name
, const char *data
);
1906 soap_dom_element(struct soap
*soap
, const char *nstr
, const char *name
, void *node
, int type
);
1907 ~soap_dom_element();
1910 SOAP_FMAC1
struct soap_dom_element
* SOAP_FMAC2
soap_dom_next_element(struct soap_dom_element
*elt
);
1911 SOAP_FMAC1
struct soap_dom_attribute
* SOAP_FMAC2
soap_dom_next_attribute(struct soap_dom_attribute
*att
);
1914 #if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT)
1916 extern std::ostream
&operator<<(std::ostream
&, const struct soap_dom_element
&);
1917 extern std::istream
&operator>>(std::istream
&, struct soap_dom_element
&);
1921 /******************************************************************************/
1924 # ifdef SOAP_STD_EXPORTS
1925 # define SOAP_STD_API __declspec(dllexport)
1927 # define SOAP_STD_API
1930 # define SOAP_STD_API
1933 struct SOAP_STD_API soap
1934 { short state
; /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
1935 short version
; /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table), 0 indicates non-SOAP content */
1939 const char *float_format
; /* user-definable format string for floats (<1024 chars) */
1940 const char *double_format
; /* user-definable format string for doubles (<1024 chars) */
1941 const char *dime_id_format
; /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
1942 const char *http_version
; /* HTTP version used "1.0" or "1.1" */
1943 const char *http_content
; /* optional custom response content type (with SOAP_FILE) */
1944 const char *encodingStyle
; /* default = "" which means that SOAP encoding is used */
1945 const char *actor
; /* SOAP-ENV:actor or role attribute value */
1946 const char *lang
; /* xml:lang attribute value of SOAP-ENV:Text */
1947 int recv_timeout
; /* when > 0, gives socket recv timeout in seconds, < 0 in usec */
1948 int send_timeout
; /* when > 0, gives socket send timeout in seconds, < 0 in usec */
1949 int connect_timeout
; /* when > 0, gives socket connect() timeout in seconds, < 0 in usec */
1950 int accept_timeout
; /* when > 0, gives socket accept() timeout in seconds, < 0 in usec */
1951 int socket_flags
; /* socket recv() and send() flags, e.g. set to MSG_NOSIGNAL to disable sigpipe */
1952 int connect_flags
; /* connect() SOL_SOCKET sockopt flags, e.g. set to SO_DEBUG to debug socket */
1953 int bind_flags
; /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
1954 int accept_flags
; /* accept() SOL_SOCKET sockopt flags */
1955 unsigned short linger_time
; /* linger time for SO_LINGER option */
1956 const struct Namespace
*namespaces
; /* Pointer to global namespace mapping table */
1957 struct Namespace
*local_namespaces
; /* Local namespace mapping table */
1958 struct soap_nlist
*nlist
; /* namespace stack */
1959 struct soap_blist
*blist
; /* block allocation stack */
1960 struct soap_clist
*clist
; /* class instance allocation list */
1961 void *alist
; /* memory allocation (malloc) list */
1962 #if !defined(WITH_LEAN) || !defined(WITH_NOIDREF)
1963 struct soap_ilist
*iht
[SOAP_IDHASH
];
1964 struct soap_plist
*pht
[SOAP_PTRHASH
];
1965 struct soap_pblk
*pblk
; /* plist block allocation */
1966 short pidx
; /* plist block allocation */
1968 struct SOAP_ENV__Header
*header
;
1969 struct SOAP_ENV__Fault
*fault
;
1971 void *user
; /* for user to pass user-defined data */
1972 void *data
[4]; /* extension data = {smdevp, mecevp, ...} */
1973 struct soap_plugin
*plugins
; /* linked list of plug-in data */
1974 const char *userid
; /* HTTP Basic authorization userid */
1975 const char *passwd
; /* HTTP Basic authorization passwd */
1976 const char *authrealm
; /* HTTP authentication realm (NTLM domain) */
1977 #if !defined(WITH_LEAN) || defined(WITH_NTLM)
1978 const char *ntlm_challenge
; /* HTTP NTLM challenge key string */
1979 short ntlm_auth
; /* HTTP NTLM authentication type */
1980 short ntlm_stage
; /* HTTP NTLM stage 0..3 */
1982 int (*fpost
)(struct soap
*, const char*, const char*, int, const char*, const char*, size_t);
1983 int (*fget
)(struct soap
*); /* HTTP GET hook (not set by default) */
1984 int (*fput
)(struct soap
*); /* HTTP PUT hook (handled as POST by default) */
1985 int (*fdel
)(struct soap
*); /* HTTP DELETE hook (not set by default) */
1986 int (*fopt
)(struct soap
*); /* HTTP OPTIONS hook (not set by default) */
1987 int (*fhead
)(struct soap
*); /* HTTP HEAD hook (not set by default) */
1988 int (*fform
)(struct soap
*); /* HTTP/HTML form handler for plugins */
1989 int (*fposthdr
)(struct soap
*, const char*, const char*);
1990 int (*fresponse
)(struct soap
*, int, size_t);
1991 int (*fparse
)(struct soap
*);
1992 int (*fparsehdr
)(struct soap
*, const char*, const char*);
1993 int (*fheader
)(struct soap
*);
1994 int (*fresolve
)(struct soap
*, const char*, struct in_addr
* inaddr
);
1995 int (*fconnect
)(struct soap
*, const char*, const char*, int);
1996 int (*fdisconnect
)(struct soap
*);
1997 int (*fclosesocket
)(struct soap
*, SOAP_SOCKET
);
1998 int (*fshutdownsocket
)(struct soap
*, SOAP_SOCKET
, int);
1999 SOAP_SOCKET (*fopen
)(struct soap
*, const char*, const char*, int);
2000 SOAP_SOCKET (*faccept
)(struct soap
*, SOAP_SOCKET
, struct sockaddr
*, int *n
);
2001 int (*fclose
)(struct soap
*);
2002 int (*fsend
)(struct soap
*, const char*, size_t);
2003 size_t (*frecv
)(struct soap
*, char*, size_t);
2004 int (*fpoll
)(struct soap
*);
2005 void (*fseterror
)(struct soap
*, const char **c
, const char **s
);
2006 int (*fignore
)(struct soap
*, const char*);
2007 int (*fserveloop
)(struct soap
*);
2008 void *(*fplugin
)(struct soap
*, const char*);
2009 void *(*fmalloc
)(struct soap
*, size_t);
2011 int (*feltbegin
)(struct soap
*, const char*);
2012 int (*feltendin
)(struct soap
*, const char*, const char*);
2013 int (*feltbegout
)(struct soap
*, const char*);
2014 int (*feltendout
)(struct soap
*, const char*);
2015 int (*fprepareinitsend
)(struct soap
*);
2016 int (*fprepareinitrecv
)(struct soap
*);
2017 int (*fpreparesend
)(struct soap
*, const char*, size_t);
2018 int (*fpreparerecv
)(struct soap
*, const char*, size_t);
2019 int (*fpreparefinalsend
)(struct soap
*);
2020 int (*fpreparefinalrecv
)(struct soap
*);
2022 int (*ffiltersend
)(struct soap
*, const char**, size_t*);
2023 int (*ffilterrecv
)(struct soap
*, char*, size_t*, size_t);
2024 void *(*fdimereadopen
)(struct soap
*, void*, const char*, const char*, const char*);
2025 void *(*fdimewriteopen
)(struct soap
*, const char*, const char*, const char*);
2026 void (*fdimereadclose
)(struct soap
*, void*);
2027 void (*fdimewriteclose
)(struct soap
*, void*);
2028 size_t (*fdimeread
)(struct soap
*, void*, char*, size_t);
2029 int (*fdimewrite
)(struct soap
*, void*, const char*, size_t);
2030 void *(*fmimereadopen
)(struct soap
*, void*, const char*, const char*, const char*);
2031 void *(*fmimewriteopen
)(struct soap
*, void*, const char*, const char*, const char*, enum soap_mime_encoding
);
2032 void (*fmimereadclose
)(struct soap
*, void*);
2033 void (*fmimewriteclose
)(struct soap
*, void*);
2034 size_t (*fmimeread
)(struct soap
*, void*, char*, size_t);
2035 int (*fmimewrite
)(struct soap
*, void*, const char*, size_t);
2037 SOAP_SOCKET master
; /* socket bound to TCP/IP port */
2038 SOAP_SOCKET socket
; /* socket to send and receive */
2039 SOAP_SOCKET sendsk
; /* socket to send (overrides ::socket) */
2040 SOAP_SOCKET recvsk
; /* socket to receive (overrides ::socket) */
2041 #if defined(__cplusplus) && !defined(WITH_LEAN) && !defined(WITH_COMPAT)
2042 std::ostream
*os
; /* stream to send */
2043 std::istream
*is
; /* stream to receive */
2045 void *os
; /* preserve struct size */
2046 void *is
; /* preserve struct size */
2049 int sendfd
; /* WinCE FD to send */
2050 int recvfd
; /* WinCE FD to receive */
2052 FILE *sendfd
; /* FD to send */
2053 FILE *recvfd
; /* FD to receive */
2055 size_t bufidx
; /* index in soap.buf[] */
2056 size_t buflen
; /* length of soap.buf[] content */
2057 soap_wchar ahead
; /* parser lookahead */
2058 short cdata
; /* CDATA parser state */
2059 short body
; /* HTTP or XML element has a body (1) or not (0) */
2060 unsigned int level
; /* XML nesting level */
2061 size_t count
; /* message length counter */
2062 size_t length
; /* message length as set by HTTP header */
2063 char *labbuf
; /* look-aside buffer */
2064 size_t lablen
; /* look-aside buffer allocated length */
2065 size_t labidx
; /* look-aside buffer index to available part */
2066 char buf
[SOAP_BUFLEN
];/* send and receive buffer */
2067 char msgbuf
[1024]; /* in/out buffer for HTTP/MIME headers >=1024 bytes */
2068 char tmpbuf
[1024]; /* in/out buffer for HTTP/MIME headers, simpleType values, element and attribute tag names, and DIME must be >=1024 bytes */
2069 char tag
[SOAP_TAGLEN
];
2070 char id
[SOAP_TAGLEN
];
2071 char href
[SOAP_TAGLEN
];
2072 char type
[SOAP_TAGLEN
];
2073 char arrayType
[SOAP_TAGLEN
];
2074 char arraySize
[SOAP_TAGLEN
];
2075 char arrayOffset
[SOAP_TAGLEN
];
2079 int positions
[SOAP_MAXDIMS
];
2080 struct soap_attribute
*attributes
; /* attribute list */
2081 short encoding
; /* when set, output encodingStyle */
2082 short mustUnderstand
; /* a mustUnderstand element was parsed or is output */
2083 short null
; /* parsed XML is xsi:nil */
2084 short ns
; /* when not set, output full xmlns bindings */
2085 short part
; /* SOAP part state (header or body) */
2086 short event
; /* engine events and states for use by plugins */
2087 unsigned int evlev
; /* event level */
2092 char endpoint
[SOAP_TAGLEN
];
2093 char path
[SOAP_TAGLEN
];
2094 char host
[SOAP_TAGLEN
];
2096 char *prolog
; /* XML declaration prolog */
2097 unsigned long ip
; /* IP number */
2098 int port
; /* port number */
2099 short keep_alive
; /* connection should be kept open */
2100 short tcp_keep_alive
; /* enable SO_KEEPALIVE */
2101 unsigned int tcp_keep_idle
; /* set TCP_KEEPIDLE */
2102 unsigned int tcp_keep_intvl
; /* set TCP_KEEPINTVL */
2103 unsigned int tcp_keep_cnt
; /* set TCP_KEEPCNT */
2104 unsigned int max_keep_alive
; /* maximum keep-alive session (default=100) */
2105 const char *proxy_http_version
;/* HTTP version of proxy "1.0" or "1.1" */
2106 const char *proxy_host
; /* Proxy Server host name */
2107 int proxy_port
; /* Proxy Server port (default = 8080) */
2108 const char *proxy_userid
; /* Proxy Authorization user name */
2109 const char *proxy_passwd
; /* Proxy Authorization password */
2110 const char *proxy_from
; /* X-Forwarding-For header returned by proxy */
2111 int status
; /* -1 when request, else error code to be returned by server */
2116 struct soap_dom_element
*dom
;
2117 struct soap_dime dime
;
2118 struct soap_mime mime
;
2119 struct soap_xlist
*xlist
;
2121 #if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
2122 const char *logfile
[SOAP_MAXLOGS
];
2123 FILE *fdebug
[SOAP_MAXLOGS
];
2124 struct soap_mlist
*mht
[SOAP_PTRHASH
];
2127 const char *wsuid
; /* space-separated string of element tags */
2128 const char *c14nexclude
; /* space-separated string of prefixes */
2129 struct soap_cookie
*cookies
;
2130 const char *cookie_domain
;
2131 const char *cookie_path
;
2135 unsigned int ipv6_multicast_if
; /* in_addr_t in6addr->sin6_scope_id IPv6 value */
2136 char* ipv4_multicast_if
; /* IP_MULTICAST_IF IPv4 setsockopt interface_addr */
2137 unsigned char ipv4_multicast_ttl
; /* IP_MULTICAST_TTL value 0..255 */
2139 struct sockaddr_storage peer
; /* IPv6: set by soap_accept and by UDP recv */
2141 struct sockaddr_in peer
; /* IPv4: set by soap_connect/soap_accept and by UDP recv */
2145 #if defined(WITH_OPENSSL) /* OpenSSL */
2146 int (*fsslauth
)(struct soap
*);
2147 int (*fsslverify
)(int, X509_STORE_CTX
*);
2151 SSL_SESSION
*session
;
2153 const char *randfile
;
2154 #elif defined(WITH_GNUTLS) /* GNUTLS */
2155 int (*fsslauth
)(struct soap
*);
2157 gnutls_certificate_credentials_t xcred
; /* cert pointer */
2158 gnutls_anon_client_credentials_t acred
; /* anon pointer */
2159 gnutls_priority_t cache
; /* priority cache pointer */
2160 gnutls_session_t session
; /* session pointer */
2161 gnutls_dh_params_t dh_params
;
2162 gnutls_rsa_params_t rsa_params
;
2163 #else /* No SSL/TLS */
2164 void *fsslauth
; /* dummy members, to preserve struct size */
2173 unsigned short ssl_flags
;
2174 const char *keyfile
;
2176 const char *password
;
2179 const char *crlfile
;
2180 char session_host
[SOAP_TAGLEN
];
2182 #ifdef WITH_C_LOCALE
2184 _locale_t c_locale
; /* set to C locale by default */
2186 locale_t c_locale
; /* set to C locale by default */
2192 z_stream
*d_stream
; /* decompression stream */
2193 uLong z_crc
; /* internal gzip crc */
2195 void *d_stream
; /* dummy members, to preserve struct size */
2198 const char *z_dict
; /* support for zlib static dictionaries */
2199 unsigned int z_dict_len
;
2200 short zlib_state
; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
2201 short zlib_in
; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
2202 short zlib_out
; /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
2203 char *z_buf
; /* buffer */
2205 unsigned short z_level
; /* compression level to be used (0=none, 1=fast to 9=best) */
2206 float z_ratio_in
; /* detected compression ratio compressed_length/length of inbound message */
2207 float z_ratio_out
; /* detected compression ratio compressed_length/length of outbound message */
2208 #ifdef WMW_RPM_IO /* VxWorks */
2214 soap(soap_mode
, soap_mode
);
2215 soap(const struct soap
&);
2218 void (*dummy
)(void);
2222 struct soap_code_map
2227 /* forwarding list */
2229 { struct soap_flist
*next
;
2234 void (*fcopy
)(struct soap
*, int, int, void*, size_t, const void*, size_t);
2237 /* id-ref forwarding list */
2239 { struct soap_ilist
*next
;
2244 struct soap_flist
*flist
;
2247 char id
[1]; /* the actual id string value flows into the allocated region below this struct */
2251 { struct soap_plugin
*next
;
2254 int (*fcopy
)(struct soap
*soap
, struct soap_plugin
*dst
, struct soap_plugin
*src
);
2255 void (*fdelete
)(struct soap
*soap
, struct soap_plugin
*p
); /* should delete fields of plugin only and not free(p) */
2258 extern SOAP_NMAC
struct Namespace namespaces
[];
2261 # define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
2262 # define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
2264 soap_wchar
soap_get0(struct soap
*);
2265 soap_wchar
soap_get1(struct soap
*);
2268 #define SOAP_XSTRINGIFY(s) SOAP_STRINGIFY(s)
2269 #define SOAP_STRINGIFY(s) #s
2271 #define soap_versioning_paste(name, ext) name##_LIBRARY_VERSION_REQUIRED_##ext
2272 #define soap_versioning_ext(name, ext) soap_versioning_paste(name, ext)
2273 #define soap_versioning(name) soap_versioning_ext(name, GSOAP_VERSION)
2275 #define soap_init(soap) soap_init1(soap, SOAP_IO_DEFAULT)
2276 #define soap_init1(soap, mode) soap_init2(soap, mode, mode)
2277 #define soap_init2(soap, imode, omode) soap_versioning(soap_init)(soap, imode, omode)
2279 #define soap_new() soap_new1(SOAP_IO_DEFAULT)
2280 #define soap_new1(mode) soap_new2(mode, mode)
2281 #define soap_new2(imode, omode) soap_versioning(soap_new)(imode, omode)
2283 #define soap_revget1(soap) ((soap)->bufidx--)
2284 #define soap_unget(soap, c) ((soap)->ahead = c)
2285 #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
2286 #define soap_mode(soap, n) ((soap)->mode = (soap)->imode = (soap)->omode = (n))
2287 #define soap_imode(soap, n) ((soap)->imode = (n))
2288 #define soap_omode(soap, n) ((soap)->omode = (n))
2289 #define soap_set_imode(soap, n) ((soap)->imode |= (n))
2290 #define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
2291 #define soap_set_omode(soap, n) ((soap)->omode |= (n))
2292 #define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
2293 #define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
2294 #define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
2295 #define soap_destroy(soap) soap_delete((soap), NULL)
2298 # define soap_strrchr(s, t) strrchr(s, t)
2300 SOAP_FMAC1
char* SOAP_FMAC2
soap_strrchr(const char *s
, int t
);
2304 # define soap_strtol(s, t, b) strtol(s, t, b)
2306 SOAP_FMAC1
long SOAP_FMAC2
soap_strtol(const char *s
, char **t
, int b
);
2310 # define soap_strtoul(s, t, b) strtoul(s, t, b)
2312 SOAP_FMAC1
unsigned long SOAP_FMAC2
soap_strtoul(const char *s
, char **t
, int b
);
2315 #if defined(WIN32) && !defined(__MINGW32__)
2316 # define soap_strtoll _strtoi64
2318 # define soap_strtoll strtoll
2321 #if defined(WIN32) && !defined(__MINGW32__)
2322 # define soap_strtoull _strtoui64
2324 # define soap_strtoull strtoull
2327 #if defined(WITH_OPENSSL)
2328 # define soap_random soap_rand()
2329 SOAP_FMAC1
int SOAP_FMAC2
soap_rand(void);
2330 #elif defined(HAVE_RANDOM)
2331 # define soap_random (int)random()
2333 # define soap_random rand()
2337 # define soap_embedded(s, p, t) (0)
2338 # define soap_id_lookup(s, i, p, t, n, k) (p)
2339 # define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
2340 # define soap_reference(s, a, t) (1)
2341 # define soap_array_reference(s, p, a, n, t) (1)
2342 # define soap_embed(s, p, a, n, t, pp) (0)
2343 # define soap_embedded_id(s, i, p, t) (i)
2344 # define soap_is_embedded(s, p) (0)
2345 # define soap_is_single(s, p) (1)
2346 # define soap_lookup_type(s, i) (0)
2347 # define soap_getindependent(s) (0)
2348 # define soap_putindependent(s) (0)
2349 # define soap_markelement(s, p, n) (0)
2352 /* soap_traverse() traversal/walker routines take walker function arguments */
2353 typedef void soap_walker(struct soap
*, void*, int, const char*, const char*);
2355 SOAP_FMAC5
int SOAP_FMAC6
soap_serve(struct soap
*soap
);
2356 SOAP_FMAC5
int SOAP_FMAC6
soap_serve_request(struct soap
*soap
);
2358 SOAP_FMAC3
void SOAP_FMAC4
soap_header(struct soap
*);
2359 SOAP_FMAC3
void SOAP_FMAC4
soap_fault(struct soap
*);
2360 SOAP_FMAC3
const char** SOAP_FMAC4
soap_faultcode(struct soap
*);
2361 SOAP_FMAC3
const char** SOAP_FMAC4
soap_faultsubcode(struct soap
*);
2362 SOAP_FMAC3
const char** SOAP_FMAC4
soap_faultstring(struct soap
*);
2363 SOAP_FMAC3
const char** SOAP_FMAC4
soap_faultdetail(struct soap
*);
2364 SOAP_FMAC3
const char* SOAP_FMAC4
soap_check_faultsubcode(struct soap
*);
2365 SOAP_FMAC3
const char* SOAP_FMAC4
soap_check_faultdetail(struct soap
*);
2366 SOAP_FMAC3
void SOAP_FMAC4
soap_serializefault(struct soap
*);
2368 SOAP_FMAC1
void SOAP_FMAC2
soap_serializeheader(struct soap
*);
2369 SOAP_FMAC1
int SOAP_FMAC2
soap_getheader(struct soap
*);
2370 SOAP_FMAC1
int SOAP_FMAC2
soap_putheader(struct soap
*);
2371 SOAP_FMAC1
int SOAP_FMAC2
soap_getfault(struct soap
*);
2372 SOAP_FMAC1
int SOAP_FMAC2
soap_putfault(struct soap
*);
2374 SOAP_FMAC1
void SOAP_FMAC2
soap_ssl_init(void);
2375 SOAP_FMAC1
int SOAP_FMAC2
soap_poll(struct soap
*);
2376 SOAP_FMAC1
int SOAP_FMAC2
soap_connect_command(struct soap
*, int, const char*, const char*);
2377 SOAP_FMAC1
int SOAP_FMAC2
soap_connect(struct soap
*, const char*, const char*);
2378 SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2
soap_bind(struct soap
*, const char*, int, int);
2379 SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2
soap_accept(struct soap
*);
2380 SOAP_FMAC1
int SOAP_FMAC2
soap_ssl_accept(struct soap
*);
2381 SOAP_FMAC1
const char * SOAP_FMAC2
soap_ssl_error(struct soap
*, int);
2383 #if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE)
2384 SOAP_FMAC1
int SOAP_FMAC2
soap_ssl_server_context(struct soap
*soap
, unsigned short flags
, const char *keyfile
, const char *keyid
, const char *password
, const char *cafile
, const char *capath
, const char *dhfile
, const char *randfile
, const char *sid
);
2386 SOAP_FMAC1
int SOAP_FMAC2
soap_ssl_server_context(struct soap
*soap
, unsigned short flags
, const char *keyfile
, const char *password
, const char *cafile
, const char *capath
, const char *dhfile
, const char *randfile
, const char *sid
);
2388 #if defined(VXWORKS) && defined(WM_SECURE_KEY_STORAGE)
2389 SOAP_FMAC1
int SOAP_FMAC2
soap_ssl_client_context(struct soap
*soap
, unsigned short flags
, const char *keyfile
, const char *keyid
, const char *password
, const char *cafile
, const char *capath
, const char *randfile
);
2391 SOAP_FMAC1
int SOAP_FMAC2
soap_ssl_client_context(struct soap
*soap
, unsigned short flags
, const char *keyfile
, const char *password
, const char *cafile
, const char *capath
, const char *randfile
);
2394 SOAP_FMAC1
int SOAP_FMAC2
soap_puthttphdr(struct soap
*, int status
, size_t count
);
2396 SOAP_FMAC1
const char* SOAP_FMAC2
soap_get_header_attribute(struct soap
*, const char*, const char*);
2397 SOAP_FMAC1
const char* SOAP_FMAC2
soap_decode_key(char*, size_t, const char*);
2398 SOAP_FMAC1
const char* SOAP_FMAC2
soap_decode_val(char*, size_t, const char*);
2400 SOAP_FMAC1
size_t SOAP_FMAC2
soap_hash(const char*);
2401 SOAP_FMAC1
void SOAP_FMAC2
soap_set_endpoint(struct soap
*, const char*);
2402 SOAP_FMAC1
int SOAP_FMAC2
soap_flush_raw(struct soap
*, const char*, size_t);
2403 SOAP_FMAC1
int SOAP_FMAC2
soap_flush(struct soap
*);
2404 SOAP_FMAC1 soap_wchar SOAP_FMAC2
soap_get(struct soap
*);
2405 SOAP_FMAC1 soap_wchar SOAP_FMAC2
soap_getchar(struct soap
*);
2406 SOAP_FMAC1
int SOAP_FMAC2
soap_tag_cmp(const char*, const char*);
2407 SOAP_FMAC1
void SOAP_FMAC2
soap_set_fault(struct soap
*);
2408 SOAP_FMAC1
int SOAP_FMAC2
soap_sender_fault(struct soap
*, const char*, const char*);
2409 SOAP_FMAC1
int SOAP_FMAC2
soap_sender_fault_subcode(struct soap
*, const char*, const char*, const char*);
2410 SOAP_FMAC1
int SOAP_FMAC2
soap_receiver_fault(struct soap
*, const char*, const char*);
2411 SOAP_FMAC1
int SOAP_FMAC2
soap_receiver_fault_subcode(struct soap
*, const char*, const char*, const char*);
2412 SOAP_FMAC1
int SOAP_FMAC2
soap_set_sender_error(struct soap
*, const char*, const char*, int);
2413 SOAP_FMAC1
int SOAP_FMAC2
soap_set_receiver_error(struct soap
*, const char*, const char*, int);
2415 SOAP_FMAC1
int SOAP_FMAC2
soap_send_raw(struct soap
*, const char*, size_t);
2416 SOAP_FMAC1
int SOAP_FMAC2
soap_recv_raw(struct soap
*);
2417 SOAP_FMAC1
int SOAP_FMAC2
soap_recv(struct soap
*);
2418 SOAP_FMAC1
int SOAP_FMAC2
soap_send(struct soap
*, const char*);
2419 SOAP_FMAC1
int SOAP_FMAC2
soap_send2(struct soap
*, const char*, const char*);
2420 SOAP_FMAC1
int SOAP_FMAC2
soap_send3(struct soap
*, const char*, const char*, const char*);
2422 SOAP_FMAC1
int SOAP_FMAC2
soap_pututf8(struct soap
*, unsigned long);
2423 SOAP_FMAC1 soap_wchar SOAP_FMAC2
soap_getutf8(struct soap
*);
2425 SOAP_FMAC1
int SOAP_FMAC2
soap_putbase64(struct soap
*, const unsigned char*, int);
2426 SOAP_FMAC1
unsigned char* SOAP_FMAC2
soap_getbase64(struct soap
*, int*, int);
2427 SOAP_FMAC1
int SOAP_FMAC2
soap_puthex(struct soap
*, const unsigned char*, int);
2428 SOAP_FMAC1
unsigned char* SOAP_FMAC2
soap_gethex(struct soap
*, int*);
2431 SOAP_FMAC1
int SOAP_FMAC2
soap_xop_forward(struct soap
*, unsigned char**, int*, char**, char**, char**);
2432 SOAP_FMAC1
int SOAP_FMAC2
soap_dime_forward(struct soap
*, unsigned char**, int*, char**, char**, char**);
2435 #ifndef WITH_NOIDREF
2436 SOAP_FMAC1
int SOAP_FMAC2
soap_pointer_lookup_id(struct soap
*, void *p
, int t
, struct soap_plist
**);
2437 SOAP_FMAC1
int SOAP_FMAC2
soap_pointer_lookup(struct soap
*, const void *p
, int t
, struct soap_plist
**);
2438 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
**);
2439 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
**);
2440 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
);
2441 SOAP_FMAC1
struct soap_ilist
* SOAP_FMAC2
soap_lookup(struct soap
*, const char*);
2442 SOAP_FMAC1
struct soap_ilist
* SOAP_FMAC2
soap_enter(struct soap
*, const char*);
2443 SOAP_FMAC1
int SOAP_FMAC2
soap_resolve(struct soap
*);
2444 SOAP_FMAC1
void SOAP_FMAC2
soap_embedded(struct soap
*, const void *p
, int t
);
2445 SOAP_FMAC1
int SOAP_FMAC2
soap_reference(struct soap
*, const void *p
, int t
);
2446 SOAP_FMAC1
int SOAP_FMAC2
soap_array_reference(struct soap
*, const void *p
, const struct soap_array
*a
, int n
, int t
);
2447 SOAP_FMAC1
int SOAP_FMAC2
soap_embedded_id(struct soap
*, int id
, const void *p
, int t
);
2448 SOAP_FMAC1
int SOAP_FMAC2
soap_is_embedded(struct soap
*, struct soap_plist
*);
2449 SOAP_FMAC1
int SOAP_FMAC2
soap_is_single(struct soap
*, struct soap_plist
*);
2450 SOAP_FMAC1
void SOAP_FMAC2
soap_set_embedded(struct soap
*, struct soap_plist
*);
2453 SOAP_FMAC1
int SOAP_FMAC2
soap_begin_count(struct soap
*);
2454 SOAP_FMAC1
int SOAP_FMAC2
soap_end_count(struct soap
*);
2455 SOAP_FMAC1
int SOAP_FMAC2
soap_begin_send(struct soap
*);
2456 SOAP_FMAC1
int SOAP_FMAC2
soap_end_send(struct soap
*);
2457 SOAP_FMAC1
int SOAP_FMAC2
soap_end_send_flush(struct soap
*);
2459 SOAP_FMAC1
const struct soap_code_map
* SOAP_FMAC2
soap_code(const struct soap_code_map
*, const char*);
2460 SOAP_FMAC1
long SOAP_FMAC2
soap_code_int(const struct soap_code_map
*, const char*, long);
2461 SOAP_FMAC1
const char* SOAP_FMAC2
soap_code_str(const struct soap_code_map
*, long);
2462 SOAP_FMAC1
long SOAP_FMAC2
soap_code_bits(const struct soap_code_map
*, const char*);
2463 SOAP_FMAC1
const char* SOAP_FMAC2
soap_code_list(struct soap
*, const struct soap_code_map
*, long);
2465 SOAP_FMAC1
int SOAP_FMAC2
soap_getline(struct soap
*, char*, int);
2466 SOAP_FMAC1
int SOAP_FMAC2
soap_begin_serve(struct soap
*);
2467 SOAP_FMAC1
int SOAP_FMAC2
soap_begin_recv(struct soap
*);
2468 SOAP_FMAC1
int SOAP_FMAC2
soap_end_recv(struct soap
*);
2470 SOAP_FMAC1
void* SOAP_FMAC2
soap_malloc(struct soap
*, size_t);
2471 SOAP_FMAC1
void SOAP_FMAC2
soap_dealloc(struct soap
*, void*);
2472 SOAP_FMAC1
struct soap_clist
* SOAP_FMAC2
soap_link(struct soap
*, void*, int, int, int (*fdelete
)(struct soap_clist
*));
2473 SOAP_FMAC1
int SOAP_FMAC2
soap_unlink(struct soap
*, const void*);
2474 SOAP_FMAC1
void SOAP_FMAC2
soap_free_temp(struct soap
*);
2475 SOAP_FMAC1
void SOAP_FMAC2
soap_del(struct soap
*);
2477 SOAP_FMAC1
void* SOAP_FMAC2
soap_track_malloc(struct soap
*, const char*, int, size_t);
2478 SOAP_FMAC1
void SOAP_FMAC2
soap_track_free(struct soap
*, const char*, int, void*);
2480 #ifndef WITH_NOIDREF
2481 SOAP_FMAC1
int SOAP_FMAC2
soap_lookup_type(struct soap
*, const char *id
);
2482 SOAP_FMAC1
void* SOAP_FMAC2
soap_id_lookup(struct soap
*, const char *id
, void **p
, int t
, size_t n
, unsigned int k
);
2483 SOAP_FMAC1
void* SOAP_FMAC2
soap_id_forward(struct soap
*, const char *id
, void *p
, size_t len
, int st
, int tt
, size_t n
, unsigned int k
, void(*fcopy
)(struct soap
*, int, int, void*, size_t, const void*, size_t));
2485 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*));
2486 SOAP_FMAC1
void SOAP_FMAC2
soap_fcopy(struct soap
*soap
, int st
, int tt
, void *p
, size_t, const void *q
, size_t n
);
2488 SOAP_FMAC1
int SOAP_FMAC2
soap_size(const int *, int);
2489 SOAP_FMAC1
int SOAP_FMAC2
soap_getoffsets(const char *, const int *, int *, int);
2490 SOAP_FMAC1
int SOAP_FMAC2
soap_getsize(const char *, const char *, int *);
2491 SOAP_FMAC1
int SOAP_FMAC2
soap_getsizes(const char *, int *, int);
2492 SOAP_FMAC1
int SOAP_FMAC2
soap_getposition(const char *, int *);
2494 SOAP_FMAC1
char* SOAP_FMAC2
soap_putsize(struct soap
*, const char *, int);
2495 SOAP_FMAC1
char* SOAP_FMAC2
soap_putsizesoffsets(struct soap
*, const char *, const int *, const int *, int);
2496 SOAP_FMAC1
char* SOAP_FMAC2
soap_putsizes(struct soap
*, const char *, const int *, int);
2497 SOAP_FMAC1
char* SOAP_FMAC2
soap_putoffset(struct soap
*, int);
2498 SOAP_FMAC1
char* SOAP_FMAC2
soap_putoffsets(struct soap
*, const int *, int);
2500 SOAP_FMAC1
int SOAP_FMAC2
soap_closesock(struct soap
*);
2501 SOAP_FMAC1
int SOAP_FMAC2
soap_force_closesock(struct soap
*);
2503 SOAP_FMAC1
struct soap
*SOAP_FMAC2
soap_versioning(soap_new
)(soap_mode
, soap_mode
);
2504 SOAP_FMAC1
void SOAP_FMAC2
soap_free(struct soap
*);
2505 SOAP_FMAC1
struct soap
*SOAP_FMAC2
soap_copy(const struct soap
*);
2506 SOAP_FMAC1
struct soap
*SOAP_FMAC2
soap_copy_context(struct soap
*, const struct soap
*);
2507 SOAP_FMAC1
void SOAP_FMAC2
soap_copy_stream(struct soap
*, struct soap
*);
2508 SOAP_FMAC1
void SOAP_FMAC2
soap_free_stream(struct soap
*);
2509 SOAP_FMAC1
void SOAP_FMAC2
soap_versioning(soap_init
)(struct soap
*, soap_mode
, soap_mode
);
2510 SOAP_FMAC1
void SOAP_FMAC2
soap_initialize(struct soap
*);
2511 SOAP_FMAC1
void SOAP_FMAC2
soap_done(struct soap
*);
2512 SOAP_FMAC1
void SOAP_FMAC2
soap_cleanup(struct soap
*);
2513 SOAP_FMAC1
void SOAP_FMAC2
soap_begin(struct soap
*);
2514 SOAP_FMAC1
void SOAP_FMAC2
soap_end(struct soap
*);
2515 SOAP_FMAC1
void SOAP_FMAC2
soap_delete(struct soap
*, void*);
2516 SOAP_FMAC1
void SOAP_FMAC2
soap_delegate_deletion(struct soap
*, struct soap
*);
2518 /* API functions available with DEBUG or SOAP_DEBUG defined: */
2519 SOAP_FMAC1
void SOAP_FMAC2
soap_set_recv_logfile(struct soap
*, const char*);
2520 SOAP_FMAC1
void SOAP_FMAC2
soap_set_sent_logfile(struct soap
*, const char*);
2521 SOAP_FMAC1
void SOAP_FMAC2
soap_set_test_logfile(struct soap
*, const char*);
2522 SOAP_FMAC1
void SOAP_FMAC2
soap_close_logfiles(struct soap
*);
2523 SOAP_FMAC1
void SOAP_FMAC2
soap_open_logfile(struct soap
*, int);
2526 SOAP_FMAC1
const char* SOAP_FMAC2
soap_value(struct soap
*);
2528 SOAP_FMAC1
int SOAP_FMAC2
soap_match_tag(struct soap
*, const char*, const char *);
2529 SOAP_FMAC1
int SOAP_FMAC2
soap_match_array(struct soap
*, const char*);
2531 SOAP_FMAC1
int SOAP_FMAC2
soap_element(struct soap
*, const char*, int, const char*);
2532 SOAP_FMAC1
int SOAP_FMAC2
soap_element_begin_out(struct soap
*, const char *tag
, int id
, const char *type
);
2533 SOAP_FMAC1
int SOAP_FMAC2
soap_array_begin_out(struct soap
*, const char *tag
, int id
, const char *type
, const char *offset
);
2534 SOAP_FMAC1
int SOAP_FMAC2
soap_element_ref(struct soap
*, const char *tag
, int id
, int href
);
2535 SOAP_FMAC1
int SOAP_FMAC2
soap_element_href(struct soap
*, const char *tag
, int id
, const char *ref
, const char *val
);
2536 SOAP_FMAC1
int SOAP_FMAC2
soap_element_null(struct soap
*, const char *tag
, int id
, const char *type
);
2537 SOAP_FMAC1
int SOAP_FMAC2
soap_element_nil(struct soap
*, const char *tag
);
2538 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
);
2539 SOAP_FMAC1
int SOAP_FMAC2
soap_element_result(struct soap
*, const char *tag
);
2540 SOAP_FMAC1
void SOAP_FMAC2
soap_check_result(struct soap
*, const char *tag
);
2541 SOAP_FMAC1
int SOAP_FMAC2
soap_element_end_out(struct soap
*, const char *tag
);
2542 SOAP_FMAC1
int SOAP_FMAC2
soap_element_start_end_out(struct soap
*, const char *tag
);
2544 SOAP_FMAC1
int SOAP_FMAC2
soap_attribute(struct soap
*, const char*, const char*);
2546 SOAP_FMAC1
int SOAP_FMAC2
soap_element_begin_in(struct soap
*, const char *tag
, int nillable
, const char *type
);
2548 SOAP_FMAC1
int SOAP_FMAC2
soap_element_end_in(struct soap
*, const char *tag
);
2550 SOAP_FMAC1
int SOAP_FMAC2
soap_peek_element(struct soap
*);
2552 SOAP_FMAC1
void SOAP_FMAC2
soap_retry(struct soap
*);
2553 SOAP_FMAC1
void SOAP_FMAC2
soap_revert(struct soap
*);
2555 SOAP_FMAC1
char* SOAP_FMAC2
soap_strdup(struct soap
*, const char*);
2556 SOAP_FMAC1
wchar_t* SOAP_FMAC2
soap_wstrdup(struct soap
*, const wchar_t*);
2557 SOAP_FMAC1
const char * SOAP_FMAC2
soap_tagsearch(const char *big
, const char *little
);
2559 SOAP_FMAC1
int SOAP_FMAC2
soap_string_out(struct soap
*, const char *s
, int flag
);
2560 SOAP_FMAC1
char* SOAP_FMAC2
soap_string_in(struct soap
*, int, long, long);
2563 SOAP_FMAC1
int SOAP_FMAC2
soap_wstring_out(struct soap
*, const wchar_t *s
, int flag
);
2564 SOAP_FMAC1
wchar_t* SOAP_FMAC2
soap_wstring_in(struct soap
*, int, long, long);
2567 SOAP_FMAC1
int SOAP_FMAC2
soap_match_namespace(struct soap
*, const char *, const char*, size_t n1
, size_t n2
);
2569 SOAP_FMAC1
void SOAP_FMAC2
soap_set_version(struct soap
*, short);
2570 SOAP_FMAC1
int SOAP_FMAC2
soap_set_namespaces(struct soap
*, const struct Namespace
*);
2571 SOAP_FMAC1
void SOAP_FMAC2
soap_set_local_namespaces(struct soap
*);
2573 SOAP_FMAC1
void SOAP_FMAC2
soap_pop_namespace(struct soap
*);
2574 SOAP_FMAC1
struct soap_nlist
* SOAP_FMAC2
soap_push_namespace(struct soap
*, const char *,const char *);
2575 SOAP_FMAC1
const char* SOAP_FMAC2
soap_current_namespace(struct soap
*soap
, const char *tag
);
2577 SOAP_FMAC1
struct soap_nlist
* SOAP_FMAC2
soap_lookup_ns(struct soap
*soap
, const char *tag
, size_t n
);
2579 SOAP_FMAC1
int SOAP_FMAC2
soap_store_lab(struct soap
*, const char*, size_t);
2580 SOAP_FMAC1
int SOAP_FMAC2
soap_append_lab(struct soap
*, const char*, size_t);
2582 SOAP_FMAC1
struct soap_blist
* SOAP_FMAC2
soap_new_block(struct soap
*);
2583 SOAP_FMAC1
void* SOAP_FMAC2
soap_push_block(struct soap
*, struct soap_blist
*, size_t);
2584 SOAP_FMAC1
void SOAP_FMAC2
soap_pop_block(struct soap
*, struct soap_blist
*);
2585 SOAP_FMAC1
size_t SOAP_FMAC2
soap_size_block(struct soap
*, struct soap_blist
*, size_t);
2586 SOAP_FMAC1
char* SOAP_FMAC2
soap_first_block(struct soap
*, struct soap_blist
*);
2587 SOAP_FMAC1
char* SOAP_FMAC2
soap_next_block(struct soap
*, struct soap_blist
*);
2588 SOAP_FMAC1
size_t SOAP_FMAC2
soap_block_size(struct soap
*, struct soap_blist
*);
2589 SOAP_FMAC1
char* SOAP_FMAC2
soap_save_block(struct soap
*, struct soap_blist
*, char*, int);
2590 SOAP_FMAC1
void SOAP_FMAC2
soap_end_block(struct soap
*, struct soap_blist
*);
2591 SOAP_FMAC1
void SOAP_FMAC2
soap_update_pointers(struct soap
*soap
, char *start
, char *end
, char *p1
, char *p2
);
2593 SOAP_FMAC1
int SOAP_FMAC2
soap_envelope_begin_out(struct soap
*);
2594 SOAP_FMAC1
int SOAP_FMAC2
soap_envelope_end_out(struct soap
*);
2596 SOAP_FMAC1
char * SOAP_FMAC2
soap_get_http_body(struct soap
*, size_t *len
);
2598 SOAP_FMAC1
int SOAP_FMAC2
soap_envelope_begin_in(struct soap
*);
2599 SOAP_FMAC1
int SOAP_FMAC2
soap_envelope_end_in(struct soap
*);
2601 SOAP_FMAC1
int SOAP_FMAC2
soap_body_begin_out(struct soap
*);
2602 SOAP_FMAC1
int SOAP_FMAC2
soap_body_end_out(struct soap
*);
2604 SOAP_FMAC1
int SOAP_FMAC2
soap_body_begin_in(struct soap
*);
2605 SOAP_FMAC1
int SOAP_FMAC2
soap_body_end_in(struct soap
*);
2607 SOAP_FMAC1
int SOAP_FMAC2
soap_recv_header(struct soap
*);
2609 SOAP_FMAC1
int SOAP_FMAC2
soap_response(struct soap
*, int);
2611 SOAP_FMAC1
int SOAP_FMAC2
soap_send_empty_response(struct soap
*, int status
);
2612 SOAP_FMAC1
int SOAP_FMAC2
soap_recv_empty_response(struct soap
*);
2614 SOAP_FMAC1
int SOAP_FMAC2
soap_send_fault(struct soap
*);
2615 SOAP_FMAC1
int SOAP_FMAC2
soap_recv_fault(struct soap
*, int check
);
2617 #ifndef WITH_NOSTDLIB
2618 SOAP_FMAC1
void SOAP_FMAC2
soap_print_fault(struct soap
*, FILE*);
2619 SOAP_FMAC1
void SOAP_FMAC2
soap_print_fault_location(struct soap
*, FILE*);
2621 # ifndef WITH_COMPAT
2623 SOAP_FMAC1
void SOAP_FMAC2
soap_stream_fault(struct soap
*, std::ostream
&);
2626 SOAP_FMAC1
char* SOAP_FMAC2
soap_sprint_fault(struct soap
*, char*, size_t);
2630 SOAP_FMAC1
int SOAP_FMAC2
soap_s2byte(struct soap
*, const char*, char*);
2631 SOAP_FMAC1
int SOAP_FMAC2
soap_s2short(struct soap
*, const char*, short*);
2632 SOAP_FMAC1
int SOAP_FMAC2
soap_s2int(struct soap
*, const char*, int*);
2633 SOAP_FMAC1
int SOAP_FMAC2
soap_s2long(struct soap
*, const char*, long*);
2634 SOAP_FMAC1
int SOAP_FMAC2
soap_s2LONG64(struct soap
*, const char*, LONG64
*);
2635 SOAP_FMAC1
int SOAP_FMAC2
soap_s2float(struct soap
*, const char*, float*);
2636 SOAP_FMAC1
int SOAP_FMAC2
soap_s2double(struct soap
*, const char*, double*);
2637 SOAP_FMAC1
int SOAP_FMAC2
soap_s2unsignedByte(struct soap
*, const char*, unsigned char*);
2638 SOAP_FMAC1
int SOAP_FMAC2
soap_s2unsignedShort(struct soap
*, const char*, unsigned short*);
2639 SOAP_FMAC1
int SOAP_FMAC2
soap_s2unsignedInt(struct soap
*, const char*, unsigned int*);
2640 SOAP_FMAC1
int SOAP_FMAC2
soap_s2unsignedLong(struct soap
*, const char*, unsigned long*);
2641 SOAP_FMAC1
int SOAP_FMAC2
soap_s2ULONG64(struct soap
*, const char*, ULONG64
*);
2642 SOAP_FMAC1
int SOAP_FMAC2
soap_s2string(struct soap
*, const char*, char**, long minlen
, long maxlen
);
2643 SOAP_FMAC1
int SOAP_FMAC2
soap_s2QName(struct soap
*, const char*, char**, long minlen
, long maxlen
);
2646 SOAP_FMAC1
int SOAP_FMAC2
soap_s2wchar(struct soap
*, const char*, wchar_t**, long minlen
, long maxlen
);
2647 SOAP_FMAC1
int SOAP_FMAC2
soap_s2dateTime(struct soap
*, const char*, time_t*);
2648 SOAP_FMAC1
char* SOAP_FMAC2
soap_s2base64(struct soap
*, const unsigned char*, char*, int);
2649 SOAP_FMAC1
char* SOAP_FMAC2
soap_s2hex(struct soap
*, const unsigned char*, char*, int);
2652 SOAP_FMAC1
const char* SOAP_FMAC2
soap_byte2s(struct soap
*, char);
2653 SOAP_FMAC1
const char* SOAP_FMAC2
soap_short2s(struct soap
*, short);
2654 SOAP_FMAC1
const char* SOAP_FMAC2
soap_int2s(struct soap
*, int);
2655 SOAP_FMAC1
const char* SOAP_FMAC2
soap_long2s(struct soap
*, long);
2656 SOAP_FMAC1
const char* SOAP_FMAC2
soap_LONG642s(struct soap
*, LONG64
);
2657 SOAP_FMAC1
const char* SOAP_FMAC2
soap_float2s(struct soap
*, float);
2658 SOAP_FMAC1
const char* SOAP_FMAC2
soap_double2s(struct soap
*, double);
2659 SOAP_FMAC1
const char* SOAP_FMAC2
soap_unsignedByte2s(struct soap
*, unsigned char);
2660 SOAP_FMAC1
const char* SOAP_FMAC2
soap_unsignedShort2s(struct soap
*, unsigned short);
2661 SOAP_FMAC1
const char* SOAP_FMAC2
soap_unsignedInt2s(struct soap
*, unsigned int);
2662 SOAP_FMAC1
const char* SOAP_FMAC2
soap_unsignedLong2s(struct soap
*, unsigned long);
2663 SOAP_FMAC1
const char* SOAP_FMAC2
soap_ULONG642s(struct soap
*, ULONG64
);
2664 SOAP_FMAC1
const char* SOAP_FMAC2
soap_QName2s(struct soap
*, const char*);
2667 SOAP_FMAC1
const char* SOAP_FMAC2
soap_wchar2s(struct soap
*, const wchar_t*);
2668 SOAP_FMAC1
const char* SOAP_FMAC2
soap_dateTime2s(struct soap
*, time_t);
2669 SOAP_FMAC1
const char* SOAP_FMAC2
soap_base642s(struct soap
*, const char*, char*, size_t, int*);
2670 SOAP_FMAC1
const char* SOAP_FMAC2
soap_hex2s(struct soap
*, const char*, char*, size_t, int*);
2674 SOAP_FMAC1
int* SOAP_FMAC2
soap_inint(struct soap
*, const char *tag
, int *p
, const char *, int);
2675 SOAP_FMAC1
char* SOAP_FMAC2
soap_inbyte(struct soap
*, const char *tag
, char *p
, const char *, int);
2676 SOAP_FMAC1
long* SOAP_FMAC2
soap_inlong(struct soap
*, const char *tag
, long *p
, const char *, int);
2677 SOAP_FMAC1 LONG64
* SOAP_FMAC2
soap_inLONG64(struct soap
*, const char *tag
, LONG64
*p
, const char *, int);
2678 SOAP_FMAC1
short* SOAP_FMAC2
soap_inshort(struct soap
*, const char *tag
, short *p
, const char *, int);
2679 SOAP_FMAC1
float* SOAP_FMAC2
soap_infloat(struct soap
*, const char *tag
, float *p
, const char *, int);
2680 SOAP_FMAC1
double* SOAP_FMAC2
soap_indouble(struct soap
*, const char *tag
, double *p
, const char *, int);
2681 SOAP_FMAC1
unsigned char* SOAP_FMAC2
soap_inunsignedByte(struct soap
*, const char *tag
, unsigned char *p
, const char *, int);
2682 SOAP_FMAC1
unsigned short* SOAP_FMAC2
soap_inunsignedShort(struct soap
*, const char *tag
, unsigned short *p
, const char *, int);
2683 SOAP_FMAC1
unsigned int* SOAP_FMAC2
soap_inunsignedInt(struct soap
*, const char *tag
, unsigned int *p
, const char *, int);
2684 SOAP_FMAC1
unsigned long* SOAP_FMAC2
soap_inunsignedLong(struct soap
*, const char *tag
, unsigned long *p
, const char *, int);
2685 SOAP_FMAC1 ULONG64
* SOAP_FMAC2
soap_inULONG64(struct soap
*, const char *tag
, ULONG64
*p
, const char *, int);
2686 SOAP_FMAC1
char** SOAP_FMAC2
soap_instring(struct soap
*, const char *tag
, char **p
, const char *, int, int, long, long);
2687 SOAP_FMAC1
char** SOAP_FMAC2
soap_inliteral(struct soap
*, const char *tag
, char **p
);
2690 SOAP_FMAC1
time_t* SOAP_FMAC2
soap_indateTime(struct soap
*, const char *tag
, time_t *p
, const char *, int);
2691 SOAP_FMAC1
time_t SOAP_FMAC2
soap_timegm(struct tm
*);
2695 SOAP_FMAC1
wchar_t** SOAP_FMAC2
soap_inwstring(struct soap
*, const char *tag
, wchar_t **p
, const char *, int, long, long);
2696 SOAP_FMAC1
wchar_t** SOAP_FMAC2
soap_inwliteral(struct soap
*, const char *tag
, wchar_t **p
);
2699 SOAP_FMAC1
int SOAP_FMAC2
soap_outbyte(struct soap
*, const char *tag
, int id
, const char *p
, const char *, int);
2700 SOAP_FMAC1
int SOAP_FMAC2
soap_outshort(struct soap
*, const char *tag
, int id
, const short *p
, const char *, int);
2701 SOAP_FMAC1
int SOAP_FMAC2
soap_outint(struct soap
*, const char *tag
, int id
, const int *p
, const char *, int);
2702 SOAP_FMAC1
int SOAP_FMAC2
soap_outlong(struct soap
*, const char *tag
, int id
, const long *p
, const char *, int);
2703 SOAP_FMAC1
int SOAP_FMAC2
soap_outLONG64(struct soap
*, const char *tag
, int id
, const LONG64
*p
, const char *, int);
2704 SOAP_FMAC1
int SOAP_FMAC2
soap_outfloat(struct soap
*, const char *tag
, int id
, const float *p
, const char *, int);
2705 SOAP_FMAC1
int SOAP_FMAC2
soap_outdouble(struct soap
*, const char *tag
, int id
, const double *p
, const char *, int);
2706 SOAP_FMAC1
int SOAP_FMAC2
soap_outunsignedByte(struct soap
*, const char *tag
, int id
, const unsigned char *p
, const char *, int);
2707 SOAP_FMAC1
int SOAP_FMAC2
soap_outunsignedShort(struct soap
*, const char *tag
, int id
, const unsigned short *p
, const char *, int);
2708 SOAP_FMAC1
int SOAP_FMAC2
soap_outunsignedInt(struct soap
*, const char *tag
, int id
, const unsigned int *p
, const char *, int);
2709 SOAP_FMAC1
int SOAP_FMAC2
soap_outunsignedLong(struct soap
*, const char *tag
, int id
, const unsigned long *p
, const char *, int);
2710 SOAP_FMAC1
int SOAP_FMAC2
soap_outULONG64(struct soap
*, const char *tag
, int id
, const ULONG64
*p
, const char *, int);
2711 SOAP_FMAC1
int SOAP_FMAC2
soap_outstring(struct soap
*, const char *tag
, int id
, char *const*p
, const char *, int);
2712 SOAP_FMAC1
int SOAP_FMAC2
soap_outliteral(struct soap
*, const char *tag
, char *const*p
, const char *type
);
2715 SOAP_FMAC1
int SOAP_FMAC2
soap_outdateTime(struct soap
*, const char *tag
, int id
, const time_t *p
, const char *, int);
2719 SOAP_FMAC1
int SOAP_FMAC2
soap_outwstring(struct soap
*, const char *tag
, int id
, wchar_t *const*p
, const char *, int);
2720 SOAP_FMAC1
int SOAP_FMAC2
soap_outwliteral(struct soap
*, const char *tag
, wchar_t *const*p
, const char *type
);
2724 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);
2725 SOAP_FMAC1
int SOAP_FMAC2
soap_move(struct soap
*, size_t);
2726 SOAP_FMAC1
size_t SOAP_FMAC2
soap_tell(struct soap
*);
2727 SOAP_FMAC1
char* SOAP_FMAC2
soap_dime_option(struct soap
*, unsigned short, const char*);
2728 SOAP_FMAC1
int SOAP_FMAC2
soap_getdimehdr(struct soap
*);
2729 SOAP_FMAC1
int SOAP_FMAC2
soap_getdime(struct soap
*);
2730 SOAP_FMAC1
int SOAP_FMAC2
soap_putdimehdr(struct soap
*);
2731 SOAP_FMAC1
int SOAP_FMAC2
soap_putdime(struct soap
*);
2732 SOAP_FMAC1
int SOAP_FMAC2
soap_getmimehdr(struct soap
*);
2733 SOAP_FMAC1
int SOAP_FMAC2
soap_getmime(struct soap
*);
2734 SOAP_FMAC1
int SOAP_FMAC2
soap_putmimehdr(struct soap
*, struct soap_multipart
*);
2735 SOAP_FMAC1
int SOAP_FMAC2
soap_putmime(struct soap
*);
2736 SOAP_FMAC1
void SOAP_FMAC2
soap_set_dime(struct soap
*);
2737 SOAP_FMAC1
void SOAP_FMAC2
soap_set_mime(struct soap
*, const char *boundary
, const char *start
);
2738 SOAP_FMAC1
void SOAP_FMAC2
soap_clr_dime(struct soap
*);
2739 SOAP_FMAC1
void SOAP_FMAC2
soap_clr_mime(struct soap
*);
2740 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
);
2741 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
);
2742 SOAP_FMAC1
void SOAP_FMAC2
soap_post_check_mime_attachments(struct soap
*soap
);
2743 SOAP_FMAC1
int SOAP_FMAC2
soap_check_mime_attachments(struct soap
*soap
);
2744 SOAP_FMAC1
struct soap_multipart
* SOAP_FMAC2
soap_get_mime_attachment(struct soap
*soap
, void *handle
);
2745 SOAP_FMAC1
int SOAP_FMAC2
soap_match_cid(struct soap
*, const char*, const char*);
2748 SOAP_FMAC1
int SOAP_FMAC2
soap_register_plugin_arg(struct soap
*, int (*fcreate
)(struct soap
*, struct soap_plugin
*, void*), void*);
2749 SOAP_FMAC1
void* SOAP_FMAC2
soap_lookup_plugin(struct soap
*, const char*);
2751 SOAP_FMAC1
const char* SOAP_FMAC2
soap_attr_value(struct soap
*soap
, const char *name
, int flag
);
2752 SOAP_FMAC1
int SOAP_FMAC2
soap_set_attr(struct soap
*soap
, const char *name
, const char *value
, int flag
);
2753 SOAP_FMAC1
void SOAP_FMAC2
soap_clr_attr(struct soap
*soap
);
2755 SOAP_FMAC1
const char* SOAP_FMAC2
soap_url(struct soap
*soap
, const char*, const char*);
2756 SOAP_FMAC1
size_t SOAP_FMAC2
soap_encode_url(const char*, char*, size_t);
2757 SOAP_FMAC1
const char* SOAP_FMAC2
soap_encode_url_string(struct soap
*, const char*);
2759 SOAP_FMAC1
void SOAP_FMAC2
soap_getcookies(struct soap
*soap
, const char *val
);
2760 SOAP_FMAC1
extern struct soap_cookie
* SOAP_FMAC2
soap_set_cookie(struct soap
*, const char*, const char*, const char*, const char*);
2761 SOAP_FMAC1
extern struct soap_cookie
* SOAP_FMAC2
soap_cookie(struct soap
*, const char*, const char*, const char*);
2762 SOAP_FMAC1
extern char* SOAP_FMAC2
soap_cookie_value(struct soap
*, const char*, const char*, const char*);
2763 SOAP_FMAC1
extern char* SOAP_FMAC2
soap_env_cookie_value(struct soap
*, const char*, const char*, const char*);
2764 SOAP_FMAC1
extern time_t SOAP_FMAC2
soap_cookie_expire(struct soap
*, const char*, const char*, const char*);
2765 SOAP_FMAC1
extern int SOAP_FMAC2
soap_set_cookie_expire(struct soap
*, const char*, long, const char*, const char*);
2766 SOAP_FMAC1
extern int SOAP_FMAC2
soap_set_cookie_session(struct soap
*, const char*, const char*, const char*);
2767 SOAP_FMAC1
extern int SOAP_FMAC2
soap_clr_cookie_session(struct soap
*, const char*, const char*, const char*);
2768 SOAP_FMAC1
extern void SOAP_FMAC2
soap_clr_cookie(struct soap
*, const char*, const char*, const char*);
2769 SOAP_FMAC1
extern int SOAP_FMAC2
soap_getenv_cookies(struct soap
*);
2770 SOAP_FMAC1
extern struct soap_cookie
* SOAP_FMAC2
soap_copy_cookies(struct soap
*, const struct soap
*);
2771 SOAP_FMAC1
extern void SOAP_FMAC2
soap_free_cookies(struct soap
*);
2772 SOAP_FMAC1
int SOAP_FMAC2
soap_putsetcookies(struct soap
*soap
);
2773 SOAP_FMAC1
int SOAP_FMAC2
soap_putcookies(struct soap
*soap
, const char *domain
, const char *path
, int secure
);
2780 #endif /* STDSOAP_H */