IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 12, 2008, 3:15:59 PM (18 years ago)
Author:
jhoblitt
Message:

update to gSOAP 2.7.11

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/nebclient/src/stdsoap2.h

    r3017 r19542  
    11/*
    2 
    3 stdsoap2.h 2.7.0d
    4 
    5 gSOAP runtime environment.
     2        stdsoap2.h 2.7.11-upd
     3
     4        gSOAP runtime engine
    65
    76gSOAP XML Web services tools
    8 Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
    9 
     7Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
     8This part of the software is released under ONE of the following licenses:
     9GPL, the gSOAP public license, OR Genivia's license for commercial use.
     10--------------------------------------------------------------------------------
    1011Contributors:
    1112
    12 Wind River Systems, Inc., for the following additions (marked WR[...]) :
     13Wind River Systems, Inc., for the following additions
    1314  - vxWorks compatible
    14   - Support for IPv6.
    15 
    1615--------------------------------------------------------------------------------
    1716gSOAP public license.
     
    2625
    2726The Initial Developer of the Original Code is Robert A. van Engelen.
    28 Copyright (C) 2000-2004, Robert van Engelen, Genivia, Inc., All Rights Reserved.
     27Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc., All Rights Reserved.
    2928--------------------------------------------------------------------------------
    3029GPL license.
     
    4544Author contact information:
    4645engelen@genivia.com / engelen@acm.org
     46
     47This program is released under the GPL with the additional exemption that
     48compiling, linking, and/or using OpenSSL is allowed.
     49--------------------------------------------------------------------------------
     50A commercial use license is available from Genivia, Inc., contact@genivia.com
    4751--------------------------------------------------------------------------------
    4852*/
     
    6266#endif
    6367
    64 #ifndef SOAP_BEGIN_NAMESPACE
    65 # define SOAP_BEGIN_NAMESPACE(name)
    66 #endif
    67 
    68 #ifndef SOAP_END_NAMESPACE
    69 # define SOAP_END_NAMESPACE(name)
    70 #endif
    71 
    7268#ifndef SOAP_FMAC1      /* stdsoap2.h declaration macro */
    7369# define SOAP_FMAC1
     
    8278#endif
    8379
     80#ifndef SOAP_FMAC3S     /* string converter for (de)serializer declaration macro */
     81# define SOAP_FMAC3S SOAP_FMAC3
     82#endif
     83
    8484#ifndef SOAP_FMAC4      /* (de)serializer declaration macro */
    8585# define SOAP_FMAC4
    8686#endif
    8787
     88#ifndef SOAP_FMAC4S     /* string converter for (de)serializer declaration macro */
     89# define SOAP_FMAC4S SOAP_FMAC4
     90#endif
     91
    8892#ifndef SOAP_FMAC5      /* stub/skeleton declaration macro */
    8993# define SOAP_FMAC5
     
    104108#ifndef SOAP_SOURCE_STAMP
    105109# define SOAP_SOURCE_STAMP(str)
     110#endif
     111
     112/* gSOAP 2.7.4 and higher: fast look-aside buffering is stable */
     113#ifndef WITH_FAST
     114# define WITH_FAST
    106115#endif
    107116
     
    128137# ifndef WIN32
    129138#  define WIN32
     139# endif
     140#endif
     141
     142#ifdef _WIN32_WCE
     143# ifndef UNDER_CE
     144#  define UNDER_CE _WIN32_WCE
    130145# endif
    131146#endif
     
    157172
    158173#if defined(__palmos__) || defined(PALM_GCC) || defined(__PALMOS_TRAPS__)
    159 # define PALM
    160 #endif
    161 
    162 #ifdef __hpux
    163 # define HP_UX
    164 #endif
    165 
    166 #ifdef __alpha
    167 # define TRU64
     174# ifndef PALM
     175#  define PALM
     176# endif
     177#endif
     178
     179#if defined(__hpux)
     180# ifndef HP_UX
     181#  define HP_UX
     182# endif
     183#endif
     184
     185#if defined(__digital__) && defined(__unix__)
     186# ifndef TRU64
     187#  define TRU64
     188# endif
    168189#endif
    169190
    170191#ifdef __MVS__
    171 # define OS390
    172 #endif
    173 
    174 #ifdef _AIX
    175 # define __socklen_t_defined
     192# ifndef OS390
     193#  define OS390
     194# endif
    176195#endif
    177196
    178197#ifdef HAVE_CONFIG_H
    179198# include "config.h"
     199# if defined(WITH_OPENSSL)
     200#  ifndef HAVE_OPENSSL_SSL_H
     201#   undef WITH_OPENSSL
     202#  endif
     203# endif
     204# if defined(WITH_ZLIB) || defined(WITH_GZIP)
     205#  ifndef HAVE_ZLIB_H
     206#   undef WITH_ZLIB
     207#   undef WITH_GZIP
     208#  endif
     209# endif
    180210#else
    181211# if defined(UNDER_CE)
     212#  define WITH_NOEMPTYSTRUCT
    182213#  define WITH_LEAN
    183214#  define HAVE_SSCANF
    184215# elif defined(WIN32)
     216#  define WITH_NOEMPTYSTRUCT
    185217#  define HAVE_STRRCHR
    186218#  define HAVE_STRTOD
     
    192224#  define HAVE_WCTOMB
    193225#  define HAVE_MBTOWC
     226#  define SOAP_LONG_FORMAT "%I64d"
     227#  define SOAP_ULONG_FORMAT "%I64u"
    194228# elif defined(CYGWIN)
    195229#  define HAVE_STRRCHR
     
    209243#  define HAVE_STRTOD
    210244#  define HAVE_SSCANF
     245#  define HAVE_STRTOD_L
     246#  define HAVE_SSCANF_L
     247#  define HAVE_SPRINTF_L
    211248#  define HAVE_STRTOL
    212249#  define HAVE_STRTOUL
     
    217254#  define HAVE_WCTOMB
    218255#  define HAVE_MBTOWC
    219 # elif defined(_AIXVERSION_431)
     256# elif defined(_AIX43)
    220257#  define HAVE_STRRCHR
    221258#  define HAVE_STRTOD
     
    228265#  define HAVE_GMTIME_R
    229266#  define HAVE_LOCALTIME_R
     267#  define HAVE_WCTOMB
     268#  define HAVE_MBTOWC
     269# elif defined(_AIX41)
     270#  define HAVE_STRRCHR
     271#  define HAVE_STRTOD
     272#  define HAVE_SSCANF
     273#  define HAVE_STRTOL
     274#  define HAVE_STRTOUL
     275#  define HAVE_SYS_TIMEB_H
    230276#  define HAVE_WCTOMB
    231277#  define HAVE_MBTOWC
     
    243289#  define HAVE_WCTOMB
    244290#  define HAVE_MBTOWC
    245 # elif defined(FREEBSD)
     291# elif defined(FREEBSD) || defined(__FreeBSD__)
    246292#  define HAVE_STRRCHR
    247293#  define HAVE_STRTOD
    248294#  define HAVE_SSCANF
     295#  define HAVE_STRTOD_L
     296#  define HAVE_SSCANF_L
     297#  define HAVE_SPRINTF_L
    249298#  define HAVE_STRTOL
    250299#  define HAVE_STRTOUL
     300#  define HAVE_STRTOLL
     301#  define HAVE_STRTOULL
    251302#  define HAVE_GETTIMEOFDAY
    252303#  define HAVE_RAND_R
     
    255306#  define HAVE_WCTOMB
    256307#  define HAVE_MBTOWC
     308#  define SOAP_LONG_FORMAT "%qd"
     309#  define SOAP_ULONG_FORMAT "%qu"
    257310# elif defined(__VMS)
    258311#  define HAVE_STRRCHR
     
    268321#  define HAVE_WCTOMB
    269322#  define HAVE_MBTOWC
    270 # elif defined(__GLIBC__)
     323# elif defined(__GLIBC__) || defined(__GNU__)
    271324#  define HAVE_STRRCHR
    272325#  define HAVE_STRTOD
    273326#  define HAVE_SSCANF
     327#  define HAVE_STRTOD_L
     328#  define HAVE_SSCANF_L
     329#  define HAVE_SPRINTF_L
    274330#  define HAVE_STRTOL
    275331#  define HAVE_STRTOUL
     332#  define HAVE_STRTOLL
     333#  define HAVE_STRTOULL
    276334#  define HAVE_SYS_TIMEB_H
    277335#  define HAVE_FTIME
     
    297355#  define HAVE_WCTOMB
    298356#  define HAVE_MBTOWC
     357#  define SOAP_LONG_FORMAT "%ld"
     358#  define SOAP_ULONG_FORMAT "%lu"
    299359# elif defined(MAC_CARBON)
     360#  define WITH_NOIO
    300361#  define HAVE_STRRCHR
    301362#  define HAVE_STRTOD
    302363#  define HAVE_SSCANF
     364#  define HAVE_STRTOD_L
     365#  define HAVE_SSCANF_L
     366#  define HAVE_SPRINTF_L
    303367#  define HAVE_STRTOL
    304368#  define HAVE_STRTOUL
     
    319383#  define O_NONBLOCK FNONBIO
    320384#  include <sys_socket.h>
    321 #  include <time.h>
    322385#  include "palmFunctions.h"
    323386# elif defined(SYMBIAN)
     
    325388#  define WITH_NONAMESPACES
    326389#  define HAVE_STRTOD   /* use STRTOD since sscanf doesn't seem to work */
     390#  include <e32def.h>
    327391#  include <sys/ioctl.h>
    328392# elif defined(VXWORKS)
     393#  ifdef _WRS_KERNEL
     394#   define _POSIX_THREADS 1
     395#  endif
    329396#  define HAVE_STRRCHR
    330397#  define HAVE_STRTOD
     
    332399#  define HAVE_STRTOL
    333400#  define HAVE_STRTOUL
    334 #  define HAVE_RAND_R
    335 #  define HAVE_PGMTIME_R
    336 #  define HAVE_PLOCALTIME_R
     401#  define HAVE_GMTIME
     402#  define HAVE_LOCALTIME
    337403#  define HAVE_MKTIME
    338404# elif defined(OS390)
     
    348414#  define HAVE_LOCALTIME_R
    349415#  define HAVE_WCTOMB
    350 #  define HAVE_MB
     416#  define HAVE_MBTOWC
     417# elif defined(AS400)
     418#  define HAVE_STRRCHR
     419#  define HAVE_STRTOD
     420#  define HAVE_SSCANF
     421#  define HAVE_STRTOL
     422#  define HAVE_STRTOUL
     423#  define HAVE_SYS_TIMEB_H
     424#  define HAVE_FTIME
     425#  define HAVE_RAND_R
     426#  define HAVE_GMTIME_R
     427#  define HAVE_LOCALTIME_R
     428#  define HAVE_WCTOMB
     429#  define HAVE_MBTOWC
     430# elif defined(__QNX__) || defined(QNX)
     431/* QNX does not have a working version of strtof */
     432#  undef HAVE_STRTOF
     433#  define HAVE_STRRCHR
     434#  define HAVE_STRTOD
     435#  define HAVE_SSCANF
     436#  define HAVE_STRTOL
     437#  define HAVE_STRTOUL
     438#  define HAVE_SYS_TIMEB_H
     439#  define HAVE_FTIME
     440#  define HAVE_RAND_R
     441#  define HAVE_GETHOSTBYNAME_R
     442#  define HAVE_GMTIME_R
     443#  define HAVE_LOCALTIME_R
     444#  define HAVE_WCTOMB
     445#  define HAVE_MBTOWC
     446#  define LONG64 long
     447#  define ULONG64 unsigned LONG64
     448#  define SOAP_LONG_FORMAT "%ld"
     449#  define SOAP_ULONG_FORMAT "%lu"
    351450# else
    352451/* Default asumptions on supported functions */
     
    367466#endif
    368467
    369 #if defined(TRU64)
    370 # define SOAP_LONG_FORMAT "%ld"
    371 # define SOAP_ULONG_FORMAT "%lu"
    372 #elif defined(WIN32)
    373 # define SOAP_LONG_FORMAT "%I64d"
    374 # define SOAP_ULONG_FORMAT "%I64u"
    375 #endif
    376 
    377 #ifndef SOAP_LONG_FORMAT
    378 # define SOAP_LONG_FORMAT "%lld"        /* printf format for 64 bit ints */
    379 #endif
    380 
    381 #ifndef SOAP_ULONG_FORMAT
    382 # define SOAP_ULONG_FORMAT "%llu"       /* printf format for unsigned 64 bit ints */
    383 #endif
    384 
    385 #ifndef SOAP_MALLOC                     /* use libc malloc */
    386 # define SOAP_MALLOC(n) malloc(n)
    387 #endif
    388 
    389 #ifndef SOAP_FREE                       /* use libc free */
    390 # define SOAP_FREE(p) free(p)
    391 #endif
    392 
    393 #include <stdlib.h>
    394 
    395 #ifndef PALM
    396 # include <stdio.h>
    397 # include <string.h>
    398 #endif
    399 
    400 #include <ctype.h>
    401 #include <limits.h>
     468#ifdef WITH_C_LOCALE
     469# include <xlocale.h>
     470#else
     471# undef HAVE_STRTOF_L
     472# undef HAVE_STRTOD_L
     473# undef HAVE_SSCANF_L
     474# undef HAVE_SPRINTF_L
     475#endif
     476
     477#ifndef WITH_NOSTDLIB
     478# include <stdlib.h>
     479# ifndef PALM
     480#  include <stdio.h>
     481#  include <string.h>
     482# endif
     483# include <ctype.h>
     484# include <limits.h>
     485#endif
    402486
    403487#if defined(__cplusplus) && !defined(WITH_LEAN)
    404488# include <string>
    405489# include <iostream>
    406   using namespace std;
    407 #endif
     490#endif
     491
     492#ifdef WITH_NOHTTP
     493# ifndef WITH_NOIO
     494#  define WITH_NOIO
     495#  undef WITH_COOKIES
     496# endif
     497#endif
     498
     499/* Suggestion when SOAP_FD_EXCEEDED error occurs:
     500   Some systems allow increasing FD_SETSIZE before including sys/types.h:
     501#define FD_SETSIZE (2048)
     502*/
    408503
    409504#ifndef UNDER_CE
    410505# ifndef PALM
    411 #  include <errno.h>
    412 ifndef MAC_CARBON
     506#  ifndef WITH_NOIO
     507 include <errno.h>
    413508#   include <sys/types.h>
    414509#  endif
     
    429524#endif
    430525
    431 #ifndef MAC_CARBON
     526#ifndef WITH_NOIO
    432527# ifndef WIN32
    433528#  ifndef PALM
     
    435530#   ifdef VXWORKS
    436531#    include <sockLib.h>
    437 #   endif
    438 #   ifndef VXWORKS
     532#    include <selectLib.h>
     533#    ifndef _WRS_KERNEL
     534#     include <strings.h>
     535#    endif
     536#   else
    439537#    ifndef SYMBIAN
    440538#     include <strings.h>
     
    446544#   endif
    447545#   ifdef VXWORKS
    448 #    include <sys/times.h>
     546#    ifdef _WRS_KERNEL
     547#     include <sys/times.h>
     548#    endif
    449549#   else
    450550#    include <sys/time.h>
     
    461561#endif
    462562
    463 #ifdef WITH_FASTCGI
    464 # include <fcgi_stdio.h>
    465 #endif
    466 
    467 #ifdef WITH_OPENSSL
    468 # define OPENSSL_NO_KRB5
    469 # include <openssl/ssl.h>
    470 # include <openssl/err.h>
    471 # include <openssl/rand.h>
    472 # ifndef ALLOW_OLD_VERSIONS
    473 #  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
    474 #   error "Must use OpenSSL 0.9.6 or later"
    475 #  endif
    476 # endif
    477 #endif
    478 
    479 #ifdef WITH_GZIP
    480 # ifndef WITH_ZLIB
    481 #  define WITH_ZLIB
    482 # endif
    483 #endif
    484 
    485 #ifdef WITH_CASEINSENSITIVETAGS
    486 # define SOAP_STRCMP soap_tag_cmp       /* case insensitve XML element/attribute names */
     563#ifdef WIN32
     564# define SOAP_WINSOCKINT int
    487565#else
    488 # define SOAP_STRCMP strcmp             /* case sensitive XML element/attribute names */
    489 #endif
    490 
    491 #ifdef WITH_ZLIB
    492 # include <zlib.h>
    493 #endif
    494 
    495 #ifndef PALM
    496 # include <math.h>      /* for isnan() */
    497 #endif
    498 
    499 /* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
    500 
    501 #ifdef __cplusplus
    502 extern "C" {
    503 #endif
    504 
    505 #define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
    506 #define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
    507 #define soap_revget1(soap) ((soap)->bufidx--)
    508 #define soap_unget(soap, c) ((soap)->ahead = c)
    509 #define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
    510 #define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
    511 #define soap_set_imode(soap, n) ((soap)->mode = (soap)->imode |= (n))
    512 #define soap_clr_imode(soap, n) ((soap)->mode = (soap)->imode &= ~(n))
    513 #define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
    514 #define soap_set_omode(soap, n) ((soap)->mode = (soap)->omode |= (n))
    515 #define soap_clr_omode(soap, n) ((soap)->mode = (soap)->omode &= ~(n))
    516 #define soap_destroy(soap) soap_delete((soap), NULL)
     566# define SOAP_WINSOCKINT size_t
     567#endif
    517568
    518569#ifdef WIN32
     
    521572#  include <fcntl.h>
    522573# endif
    523 # include <winsock.h>
    524 /* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
    525 /* WR[ */
    526574# ifdef WITH_IPV6
     575#  include <winsock2.h> /* Visual Studio 2005 users: you must install the Platform SDK (R2) */
    527576#  include <ws2tcpip.h>
    528577#  include <wspiapi.h>
     578#  define SOAP_GAI_STRERROR gai_strerrorA
     579# else
     580#  include <winsock.h> /* Visual Studio 2005 users: you must install the Platform SDK (R2) */
     581/* # include <winsock2.h> */ /* Alternative: use winsock2 (not available with eVC) */
    529582# endif
    530583#else
     
    534587#  include <ioLib.h>
    535588# endif
    536 /* ]WR */
    537 # ifndef MAC_CARBON
     589# ifndef WITH_NOIO
    538590#  ifndef PALM
    539591#   include <netdb.h>
     
    541593#   include <unistd.h>
    542594#   include <fcntl.h>
     595#   ifdef _AIX41
     596#    include <sys/select.h>
     597#   endif
    543598#  endif
    544599# endif
    545600#endif
    546601
    547 #ifdef WIN32
    548 # define SOAP_SOCKET SOCKET
     602#ifdef WITH_FASTCGI
     603# include <fcgi_stdio.h>
     604#endif
     605
     606#ifdef WITH_OPENSSL
     607# define OPENSSL_NO_KRB5
     608# include <openssl/bio.h>
     609# include <openssl/err.h>
     610# include <openssl/rand.h>
     611# include <openssl/ssl.h>
     612# include <openssl/x509v3.h>
     613# ifndef ALLOW_OLD_VERSIONS
     614#  if (OPENSSL_VERSION_NUMBER < 0x00905100L)
     615#   error "Must use OpenSSL 0.9.6 or later"
     616#  endif
     617# endif
     618#endif
     619
     620#ifdef WITH_GZIP
     621# ifndef WITH_ZLIB
     622#  define WITH_ZLIB
     623# endif
     624#endif
     625
     626#ifdef WITH_CASEINSENSITIVETAGS
     627# define SOAP_STRCMP soap_tag_cmp       /* case insensitve XML element/attribute names */
    549628#else
    550 # define SOAP_SOCKET int
    551 # define closesocket(n) close(n)
    552 #endif
    553 
    554 #define soap_valid_socket(n) ((n) >= 0)
    555 #define SOAP_INVALID_SOCKET (-1)
     629# define SOAP_STRCMP strcmp             /* case sensitive XML element/attribute names */
     630#endif
     631
     632#ifdef WITH_ZLIB
     633# include <zlib.h>
     634#endif
     635
     636#ifndef WITH_NOSTDLIB
     637# ifndef PALM
     638#  include <math.h>     /* for isnan() */
     639# endif
     640#endif
     641
     642/* #define DEBUG */ /* Uncomment to debug sending (in file SENT.log) receiving (in file RECV.log) and messages (in file TEST.log) */
     643
     644#ifdef __cplusplus
     645extern "C" {
     646#endif
     647
     648/* Portability: define SOAP_SOCKLEN_T */
     649#if defined(_AIX)
     650# if defined(_AIX43)
     651#  define SOAP_SOCKLEN_T socklen_t
     652# else
     653#  define SOAP_SOCKLEN_T int
     654# endif
     655#elif defined(SOCKLEN_T)
     656# define SOAP_SOCKLEN_T SOCKLEN_T
     657#elif defined(__socklen_t_defined) || defined(_SOCKLEN_T) || defined(CYGWIN) || defined(FREEBSD) || defined(__FreeBSD__) || defined(__QNX__) || defined(QNX)
     658# define SOAP_SOCKLEN_T socklen_t
     659#elif defined(IRIX) || defined(WIN32) || defined(__APPLE__) || defined(HP_UX) || defined(SUN_OS) || defined(OPENSERVER) || defined(TRU64) || defined(VXWORKS)
     660# define SOAP_SOCKLEN_T int
     661#else
     662# define SOAP_SOCKLEN_T size_t
     663#endif
     664
     665#ifndef SOAP_SOCKET
     666# ifdef WIN32
     667#  define SOAP_SOCKET SOCKET
     668#  define soap_closesocket(n) closesocket(n)
     669# else
     670#  define SOAP_SOCKET int
     671#  define soap_closesocket(n) close(n)
     672# endif
     673#endif
     674
     675#define SOAP_INVALID_SOCKET ((SOAP_SOCKET)-1)
     676#define soap_valid_socket(n) ((n) != SOAP_INVALID_SOCKET)
     677
     678#ifndef SOAP_GAI_STRERROR
     679# define SOAP_GAI_STRERROR gai_strerror
     680#endif
     681
     682#ifndef FD_SETSIZE
     683# define FD_SETSIZE (1024)
     684#endif
    556685
    557686#if defined(SYMBIAN)
    558687# define LONG64 long
    559688# define ULONG64 unsigned LONG64
    560 #elif !defined(WIN32)
    561 # define LONG64 long long
    562 # define ULONG64 unsigned LONG64
     689#elif !defined(WIN32) || defined(CYGWIN) || defined(__GLIBC__) || defined(__GNU__)
     690# ifndef LONG64
     691#  if defined(HAVE_STDINT_H)
     692#   include <stdint.h>
     693#   define LONG64 int64_t
     694#   define ULONG64 uint64_t
     695#  elif defined(__GLIBC__)
     696#   include <bits/wordsize.h>
     697#   if (__WORDSIZE == 64)
     698#    define LONG64 int64_t
     699#    define ULONG64 uint64_t
     700#    ifndef SOAP_LONG_FORMAT
     701#     define SOAP_LONG_FORMAT "%ld"
     702#    endif
     703#    ifndef SOAP_ULONG_FORMAT
     704#     define SOAP_ULONG_FORMAT "%lu"
     705#    endif
     706#   else
     707#    define LONG64 long long
     708#    define ULONG64 unsigned LONG64
     709#   endif
     710#  else
     711#   define LONG64 long long
     712#   define ULONG64 unsigned LONG64
     713#  endif
     714# endif
    563715#elif defined(UNDER_CE)
    564716# define LONG64 __int64
     
    569721#endif
    570722
    571 #if defined(WIN32)
     723#ifndef SOAP_LONG_FORMAT
     724# define SOAP_LONG_FORMAT "%lld"        /* printf format for 64 bit ints */
     725#endif
     726
     727#ifndef SOAP_ULONG_FORMAT
     728# define SOAP_ULONG_FORMAT "%llu"       /* printf format for unsigned 64 bit ints */
     729#endif
     730
     731#if defined(WIN32) && !defined(CYGWIN)
    572732# define soap_int32 __int32
    573733#elif defined(SYMBIAN)
     
    575735#elif defined(PALM)
    576736# define soap_int32 Int32
     737#elif defined(_AIX)
     738# if defined(_AIX43)
     739#  define soap_int32 int32_t
     740# else
     741#  define soap_int32 signed int
     742# endif
    577743#else
    578744# define soap_int32 int32_t
    579745#endif
    580746
    581 /* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
    582 typedef soap_int32 soap_wchar;
    583 
    584747#ifdef WIN32
     748# define SOAP_ERANGE ERANGE
    585749# define SOAP_EINTR WSAEINTR
    586750# define SOAP_EAGAIN WSAEWOULDBLOCK
    587751# define SOAP_EWOULDBLOCK WSAEWOULDBLOCK
    588752# define SOAP_EINPROGRESS WSAEINPROGRESS
     753# define SOAP_EADDRINUSE WSAEADDRINUSE
    589754#else
     755# define SOAP_ERANGE ERANGE
    590756# define SOAP_EINTR EINTR
    591757# define SOAP_EAGAIN EAGAIN
     758# define SOAP_EADDRINUSE EADDRINUSE
    592759# ifdef SYMBIAN
    593760#  define SOAP_EWOULDBLOCK 9898
     
    602769# ifdef UNDER_CE
    603770#  define soap_errno GetLastError()
    604 #  define soap_socket_errno GetLastError()
     771#  define soap_socket_errno(s) GetLastError()
     772#  define soap_reset_errno SetLastError(0)
    605773# else
    606774#  define soap_errno GetLastError()
    607 #  define soap_socket_errno WSAGetLastError()
     775#  define soap_socket_errno(s) WSAGetLastError()
     776#  define soap_reset_errno SetLastError(0)
    608777# endif
    609778#else
    610 # define soap_errno errno
    611 # define soap_socket_errno errno
     779# ifndef WITH_NOIO
     780#  define soap_errno errno
     781#  define soap_socket_errno(s) errno
     782#  define soap_reset_errno (errno = 0)
     783# else
     784#  define soap_errno 0
     785#  define soap_socket_errno(s) 0
     786#  define soap_reset_errno
     787# endif
    612788#endif
    613789
    614790#ifndef SOAP_BUFLEN
    615791# ifndef WITH_LEAN
    616 #  define SOAP_BUFLEN  (32768) /* buffer length for socket packets, also used by gethostbyname_r so don't make this too small */
     792#  define SOAP_BUFLEN (65536) /* buffer length for socket packets, also used by gethostbyname_r and UDP messages, so don't make this too small */
    617793# else
    618 #  define SOAP_BUFLEN   (2048)
     794#  define SOAP_BUFLEN  (2048)
    619795# endif
    620796#endif
    621797#ifndef SOAP_LABLEN
    622 # ifndef WITH_LEAN
    623 #  define SOAP_LABLEN  (256) /* initial look-aside buffer length */
    624 # else
    625 #  define SOAP_LABLEN   (64)
    626 # endif
     798# define SOAP_LABLEN     (256) /* initial look-aside buffer length */
     799#endif
     800#ifndef SOAP_PTRBLK
     801# define SOAP_PTRBLK     (32) /* block allocation for pointer hash table chains */
    627802#endif
    628803#ifndef SOAP_PTRHASH
    629804# ifndef WITH_LEAN
    630 #  define SOAP_PTRHASH  (1024) /* size of pointer analysis hash table (must be power of 2) */
     805#  define SOAP_PTRHASH (1024) /* size of pointer analysis hash table (must be power of 2) */
    631806# else
    632 #  define SOAP_PTRHASH    (16)
     807#  define SOAP_PTRHASH   (32)
    633808# endif
    634809#endif
    635810#ifndef SOAP_IDHASH
    636811# ifndef WITH_LEAN
    637 #  define SOAP_IDHASH   (1999) /* prime size of hash table for parsed id/ref */
     812#  define SOAP_IDHASH  (1999) /* prime size of hash table for parsed id/ref */
    638813# else
    639 #  define SOAP_IDHASH    (199)
     814#  define SOAP_IDHASH    (19) /* 19, 199 */
    640815# endif
    641816#endif
    642817#ifndef SOAP_BLKLEN
    643 # define SOAP_BLKLEN     (256) /* size of blocks to collect long strings and XML attributes */
     818# ifndef WITH_LEAN
     819#  define SOAP_BLKLEN   (256) /* size of blocks to collect long strings and XML attributes */
     820# else
     821#  define SOAP_BLKLEN    (32)
     822# endif
    644823#endif
    645824#ifndef SOAP_TAGLEN
    646 # define SOAP_TAGLEN     (256) /* maximum length of XML element tag/attribute name + 1 */
     825# ifndef WITH_LEAN
     826#  define SOAP_TAGLEN  (1024) /* maximum length of XML element tag/attribute name or host/path name + 1 */
     827# else
     828#  define SOAP_TAGLEN    (64)
     829# endif
    647830#endif
    648831#ifndef SOAP_HDRLEN
    649832# ifndef WITH_LEAN
    650 #  define SOAP_HDRLEN   (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
     833#  define SOAP_HDRLEN  (8192) /* maximum length of HTTP header line (must be >4096 to read cookies) */
    651834# else
    652 #  define SOAP_HDRLEN   (1024)
     835#  define SOAP_HDRLEN  (1024)
    653836# endif
    654837#endif
    655838#ifndef SOAP_MAXDIMS
    656 # define SOAP_MAXDIMS    (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
     839# ifndef WITH_LEAN
     840#  define SOAP_MAXDIMS   (16) /* maximum array dimensions (array nestings) must be less than 64 to protect soap->tmpbuf */
     841# else
     842#  define SOAP_MAXDIMS    (4)
     843# endif
    657844#endif
    658845
     
    669856
    670857#ifndef SOAP_MAXARRAYSIZE
    671 # define SOAP_MAXARRAYSIZE (100000) /* "trusted" max size of inbound SOAP array for compound array allocation */
     858# define SOAP_MAXARRAYSIZE (1000000) /* "trusted" max size of inbound SOAP array for compound array allocation */
    672859#endif
    673860
     
    691878
    692879#ifdef SUN_OS
    693 # define soap_isnan(n) isnan(n)
     880# define HAVE_ISNAN
     881#endif
     882
     883#ifdef __APPLE__
     884# ifdef __cplusplus
     885#  ifndef isnan
     886extern "C" int isnan(double);
     887#  endif
     888# endif
     889# define HAVE_ISNAN
    694890#endif
    695891
    696892#if !defined(HAVE_ISNAN) && (defined(_MATH_H) || defined(_MATH_INCLUDED))
    697893# define HAVE_ISNAN
     894#endif
     895
     896extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
     897
     898#ifdef VXWORKS
     899# ifndef FLT_MAX
     900#  define FLT_MAX _ARCH_FLT_MAX
     901# endif
     902# ifndef DBL_MAX
     903#  define DBL_MAX _ARCH_DBL_MAX
     904# endif
     905#endif
     906
     907#ifndef FLT_NAN
     908#  define FLT_NAN (*(float*)(void*)&soap_double_nan)
     909#endif
     910
     911#ifndef FLT_PINFTY
     912# if defined(FLT_MAX)
     913#  define FLT_PINFTY FLT_MAX
     914# elif defined(HUGE_VALF)
     915#  define FLT_PINFTY (float)HUGE_VALF
     916# elif defined(HUGE_VAL)
     917#  define FLT_PINFTY (float)HUGE_VAL
     918# elif defined(FLOAT_MAX)
     919#  define FLT_PINFTY FLOAT_MAX
     920# else
     921#  define FLT_PINFTY (3.40282347e+38F)
     922# endif
     923#endif
     924
     925#ifndef FLT_NINFTY
     926# define FLT_NINFTY (-FLT_PINFTY)
     927#endif
     928
     929#ifndef DBL_NAN
     930#  define DBL_NAN (*(double*)(void*)&soap_double_nan)
     931#endif
     932
     933#ifndef DBL_PINFTY
     934# if defined(DBL_MAX)
     935#  define DBL_PINFTY DBL_MAX
     936# elif defined(HUGE_VALF)
     937#  define DBL_PINFTY (double)HUGE_VALF
     938# elif defined(HUGE_VAL)
     939#  define DBL_PINFTY (double)HUGE_VAL
     940# elif defined(DOUBLE_MAX)
     941#  define DBL_PINFTY DOUBLE_MAX
     942# else
     943#  define DBL_PINFTY (1.7976931348623157e+308)
     944# endif
     945#endif
     946
     947#ifndef DBL_NINFTY
     948# define DBL_NINFTY (-DBL_PINFTY)
    698949#endif
    699950
     
    702953#  define soap_isnan(n) isnan(n)
    703954# else
    704 #  define soap_isnan(_) (0)
    705 # endif
    706 #endif
    707 
    708 extern const struct soap_double_nan { unsigned int n1, n2; } soap_double_nan;
    709 
    710 #ifdef VXWORKS
    711 # ifndef FLT_MAX
    712 #  define FLT_MAX _ARCH_FLT_MAX
    713 # endif
    714 # ifndef DBL_MAX
    715 #  define DBL_MAX _ARCH_DBL_MAX
    716 # endif
    717 #endif
    718 
    719 #ifndef FLT_NAN
    720 # ifdef HAVE_ISNAN
    721 #  define FLT_NAN (*(float*)&soap_double_nan)
    722 # else
    723 #  define FLT_NAN (0.0)
    724 # endif
    725 #endif
    726 
    727 #ifndef FLT_PINFTY
    728 # ifdef FLT_MAX
    729 #  define FLT_PINFTY FLT_MAX
    730 # else
    731 #  ifdef HUGE_VAL
    732 #    define FLT_PINFTY (float)HUGE_VAL
    733 #  else
    734 #   ifdef FLOAT_MAX
    735 #    define FLT_PINFTY FLOAT_MAX
    736 #   else
    737 #    define FLT_PINFTY (3.40282347e+38)
    738 #   endif
    739 #  endif
    740 # endif
    741 #endif
    742 
    743 #ifndef FLT_NINFTY
    744 # define FLT_NINFTY (-FLT_PINFTY)
    745 #endif
    746 
    747 #ifndef DBL_NAN
    748 # ifdef HAVE_ISNAN
    749 #  define DBL_NAN (*(double*)&soap_double_nan)
    750 # else
    751 #  define DBL_NAN (0.0)
    752 # endif
    753 #endif
    754 
    755 #ifndef DBL_PINFTY
    756 # ifdef DBL_MAX
    757 #  define DBL_PINFTY DBL_MAX
    758 # else
    759 #  ifdef HUGE_VAL
    760 #   define DBL_PINFTY (double)HUGE_VAL
    761 #  else
    762 #   ifdef DOUBLE_MAX
    763 #    define DBL_PINFTY DOUBLE_MAX
    764 #   else
    765 #    define DBL_PINFTY (1.7976931348623157e+308)
    766 #   endif
    767 #  endif
    768 # endif
    769 #endif
    770 
    771 #ifndef DBL_NINFTY
    772 # define DBL_NINFTY (-DBL_PINFTY)
     955#  define soap_isnan(n) (0)
     956# endif
    773957#endif
    774958
     
    792976#define SOAP_MUSTUNDERSTAND             8
    793977#define SOAP_NAMESPACE                  9
    794 /* #define SOAP_OBJ_MISMATCH            10      obsolete */
    795 #define SOAP_TAG_END                    10
     978#define SOAP_USER_ERROR                 10
    796979#define SOAP_FATAL_ERROR                11
    797980#define SOAP_FAULT                      12
    798981#define SOAP_NO_METHOD                  13
    799 #define SOAP_GET_METHOD                 14
    800 #define SOAP_EOM                        15
    801 #define SOAP_NULL                       16
    802 #define SOAP_MULTI_ID                   17
    803 #define SOAP_MISSING_ID                 18
    804 #define SOAP_HREF                       19
    805 #define SOAP_TCP_ERROR                  20
    806 #define SOAP_HTTP_ERROR                 21
    807 #define SOAP_SSL_ERROR                  22
    808 #define SOAP_ZLIB_ERROR                 23
    809 #define SOAP_DIME_ERROR                 24
    810 #define SOAP_DIME_HREF                  25
    811 #define SOAP_DIME_MISMATCH              26
    812 #define SOAP_DIME_END                   27
    813 #define SOAP_MIME_ERROR                 28
    814 #define SOAP_VERSIONMISMATCH            29
    815 #define SOAP_PLUGIN_ERROR               30
    816 #define SOAP_DATAENCODINGUNKNOWN        31
    817 #define SOAP_REQUIRED                   32
    818 #define SOAP_PROHIBITED                 33
    819 #define SOAP_OCCURS                     34
    820 #define SOAP_LENGTH                     35
    821 
    822 #define soap_xml_error_check(e) ((e) == SOAP_TAG_MISMATCH || (e) == SOAP_TAG_END || (e) == SOAP_SYNTAX_ERROR || (e) == SOAP_NAMESPACE || (e) == SOAP_MULTI_ID || (e) == SOAP_MISSING_ID || (e) == SOAP_REQUIRED || (e) == SOAP_PROHIBITED || (e) == SOAP_OCCURS || (e) == SOAP_LENGTH || (e) == SOAP_NULL || (e) == SOAP_HREF)
     982#define SOAP_NO_DATA                    14
     983#define SOAP_GET_METHOD                 15
     984#define SOAP_PUT_METHOD                 16
     985#define SOAP_DEL_METHOD                 17
     986#define SOAP_HEAD_METHOD                18
     987#define SOAP_HTTP_METHOD                19
     988#define SOAP_EOM                        20
     989#define SOAP_MOE                        21
     990#define SOAP_HDR                        22
     991#define SOAP_NULL                       23
     992#define SOAP_DUPLICATE_ID               24
     993#define SOAP_MISSING_ID                 25
     994#define SOAP_HREF                       26
     995#define SOAP_UDP_ERROR                  27
     996#define SOAP_TCP_ERROR                  28
     997#define SOAP_HTTP_ERROR                 29
     998#define SOAP_SSL_ERROR                  30
     999#define SOAP_ZLIB_ERROR                 31
     1000#define SOAP_DIME_ERROR                 32
     1001#define SOAP_DIME_HREF                  33
     1002#define SOAP_DIME_MISMATCH              34
     1003#define SOAP_DIME_END                   35
     1004#define SOAP_MIME_ERROR                 36
     1005#define SOAP_MIME_HREF                  37
     1006#define SOAP_MIME_END                   38
     1007#define SOAP_VERSIONMISMATCH            39
     1008#define SOAP_PLUGIN_ERROR               40
     1009#define SOAP_DATAENCODINGUNKNOWN        41
     1010#define SOAP_REQUIRED                   42
     1011#define SOAP_PROHIBITED                 43
     1012#define SOAP_OCCURS                     44
     1013#define SOAP_LENGTH                     45
     1014#define SOAP_FD_EXCEEDED                46
     1015
     1016#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)
    8231017#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)
    8241018#define soap_tcp_error_check(e) ((e) == SOAP_EOF || (e) == SOAP_TCP_ERROR)
    8251019#define soap_ssl_error_check(e) ((e) == SOAP_SSL_ERROR)
    8261020#define soap_zlib_error_check(e) ((e) == SOAP_ZLIB_ERROR)
    827 #define soap_mime_error_check(e) ((e) == SOAP_MIME_ERROR)
    828 #define soap_dime_error_check(e) ((e) == SOAP_DIME_ERROR || (e) == SOAP_DIME_MISMATCH)
    829 #define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || (e) == SOAP_GET_METHOD || ((e) >= 100 && (e) < 600))
    830 
    831 /* gSOAP HTTP response status codes 100 to 600 are reserved */
    832 
    833 /* Special gSOAP HTTP response status codes */
     1021#define soap_http_error_check(e) ((e) == SOAP_HTTP_ERROR || ((e) >= SOAP_GET_METHOD && (e) <= SOAP_HTTP_METHOD)|| (e) == SOAP_NO_DATA || ((e) >= 100 && (e) < 600))
     1022
     1023/* gSOAP HTTP response status codes 100 to 599 are reserved */
     1024
     1025/* Codes 600 to 999 are user definable */
     1026
     1027/* Exceptional gSOAP HTTP response status codes >= 1000 */
    8341028
    8351029#define SOAP_STOP               1000    /* No HTTP response */
    836 #define SOAP_HTML               1001    /* Custom HTML response */
    837 #define SOAP_FILE               1002    /* Custom file-based response */
    838 
    839 /* gSOAP HTTP request status codes */
    840 
    841 #define SOAP_POST               1003
    842 #define SOAP_GET                1104
     1030#define SOAP_FORM               1001    /* Form request/response */
     1031#define SOAP_HTML               1002    /* Custom HTML response */
     1032#define SOAP_FILE               1003    /* Custom file-based response */
     1033
     1034/* gSOAP HTTP method codes */
     1035
     1036#define SOAP_POST               2000
     1037#define SOAP_GET                2001
    8431038
    8441039/* gSOAP DIME */
     
    8681063#define SOAP_IO_CHUNK           0x00000003      /* use HTTP chunked transfer AND buffer packets */
    8691064
    870 #define SOAP_IO_LENGTH          0x00000004
    871 #define SOAP_IO_KEEPALIVE       0x00000008
    872 
    873 #define SOAP_ENC_LATIN          0x00800010      /* iso-8859-1 encoding */
    874 #define SOAP_ENC_XML            0x00000020      /* plain XML encoding, no HTTP header */
    875 #define SOAP_ENC_DIME           0x00000040
    876 #define SOAP_ENC_MIME           0x00000080
    877 #define SOAP_ENC_ZLIB           0x00000100
    878 #define SOAP_ENC_SSL            0x00000200
    879 
    880 #define SOAP_XML_STRICT         0x00001000      /* strict validation */
    881 #define SOAP_XML_CANONICAL      0x00002000      /* C14N canonical XML */
    882 #define SOAP_XML_TREE           0x00004000
    883 #define SOAP_XML_GRAPH          0x00008000
    884 #define SOAP_XML_NIL            0x00010000
    885 #define SOAP_XML_DOM            0x00020000
    886 #define SOAP_XML_SEC            0x00040000      /* reserved for WS security */
    887 
    888 #define SOAP_C_NOIOB            0x00100000
    889 #define SOAP_C_UTFSTRING        0x00200000
    890 #define SOAP_C_MBSTRING         0x00400000
     1065#define SOAP_IO_UDP             0x00000004      /* TCP or UDP */
     1066
     1067#define SOAP_IO_LENGTH          0x00000008      /* calc message length (internal) */
     1068#define SOAP_IO_KEEPALIVE       0x00000010      /* keep connection alive */
     1069
     1070#define SOAP_ENC_LATIN          0x00000020      /* accept iso-8859-1 encoding */
     1071#define SOAP_ENC_XML            0x00000040      /* plain XML encoding, no HTTP header */
     1072#define SOAP_ENC_DIME           0x00000080
     1073#define SOAP_ENC_MIME           0x00000100
     1074#define SOAP_ENC_MTOM           0x00000200
     1075#define SOAP_ENC_ZLIB           0x00000400
     1076#define SOAP_ENC_SSL            0x00000800
     1077
     1078#define SOAP_ENC                0x00000FFF      /* IO and ENC mask */
     1079
     1080#define SOAP_XML_STRICT         0x00001000      /* apply strict validation */
     1081#define SOAP_XML_INDENT         0x00002000      /* emit indented XML */
     1082#define SOAP_XML_CANONICAL      0x00004000      /* EXC C14N canonical XML */
     1083#define SOAP_XML_TREE           0x00008000      /* emit XML tree (no id/ref) */
     1084#define SOAP_XML_GRAPH          0x00010000
     1085#define SOAP_XML_NIL            0x00020000
     1086#define SOAP_XML_DOM            0x00040000
     1087#define SOAP_XML_SEC            0x00080000      /* reserved for WS security */
     1088
     1089#define SOAP_C_NOIOB            0x00100000      /* don't fault on array index out of bounds (just ignore) */
     1090#define SOAP_C_UTFSTRING        0x00200000      /* (de)serialize strings with UTF8 content */
     1091#define SOAP_C_MBSTRING         0x00400000      /* (de)serialize strings with multi-byte content */
     1092#define SOAP_C_NILSTRING        0x00800000      /* serialize empty strings as nil (omitted) */
    8911093
    8921094#define SOAP_DOM_TREE           0x01000000
    8931095#define SOAP_DOM_NODE           0x02000000
     1096#define SOAP_DOM_ASIS           0x04000000
     1097
     1098#define SOAP_MIME_POSTCHECK     0x10000000      /* MIME flag (internal) */
    8941099
    8951100#define SOAP_IO_DEFAULT         SOAP_IO_FLUSH
     
    9001105#define SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION  0x01    /* client requires server to authenticate */
    9011106#define SOAP_SSL_REQUIRE_CLIENT_AUTHENTICATION  0x02    /* server requires client to authenticate */
    902 
    903 #define SOAP_SSL_DEFAULT                        SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION
    904 
    905 /* */
     1107#define SOAP_SSL_SKIP_HOST_CHECK                0x04    /* client does not check the common name of the host in certificate */
     1108#define SOAP_SSL_ALLOW_EXPIRED_CERTIFICATE      0x08    /* client does not check the expiration date of the host certificate */
     1109#define SOAP_SSL_RSA                            0x10    /* use RSA */
     1110#define SOAP_SSLv3                              0x20    /* SSL v3 only */
     1111#define SOAP_TLSv1                              0x40    /* TLS v1 only */
     1112#define SOAP_SSLv3_TLSv1                        0x00    /* SSL v3 and TLS v1 support by default */
     1113
     1114#define SOAP_SSL_DEFAULT                        (SOAP_SSL_REQUIRE_SERVER_AUTHENTICATION | SOAP_SSLv3_TLSv1)
     1115
     1116/* state */
     1117
     1118#define SOAP_NONE       0
     1119#define SOAP_INIT       1
     1120#define SOAP_COPY       2
     1121
     1122#define soap_check_state(soap) (!(soap) || ((soap)->state != SOAP_INIT && (soap)->state != SOAP_COPY))
     1123
     1124/* part */
    9061125
    9071126#define SOAP_BEGIN              0
     
    9091128#define SOAP_IN_HEADER          3
    9101129#define SOAP_END_HEADER         4
    911 #define SOAP_IN_BODY            5
    912 #define SOAP_END_BODY           6
    913 #define SOAP_END_ENVELOPE       7
    914 #define SOAP_END                8
     1130#define SOAP_NO_BODY            5
     1131#define SOAP_IN_BODY            6
     1132#define SOAP_END_BODY           7
     1133#define SOAP_END_ENVELOPE       8
     1134#define SOAP_END                9
     1135#define SOAP_BEGIN_SECURITY     10
     1136#define SOAP_IN_SECURITY        11
     1137#define SOAP_END_SECURITY       12
    9151138
    9161139/* DEBUG macros */
     
    9211144#   define SOAP_DEBUG
    9221145#  endif
    923 # endif
     1146#  ifndef SOAP_MEM_DEBUG
     1147#   define SOAP_MEM_DEBUG
     1148#  endif
     1149# endif
     1150#endif
     1151
     1152#ifdef SOAP_MEM_DEBUG
     1153# ifndef SOAP_MALLOC
     1154#  define SOAP_MALLOC(soap, size) soap_track_malloc(soap, __FILE__, __LINE__, size)
     1155# endif
     1156# ifndef SOAP_FREE
     1157#  define SOAP_FREE(soap, ptr) soap_track_free(soap, __FILE__, __LINE__, ptr)
     1158# endif
     1159#endif
     1160
     1161#ifndef SOAP_MALLOC                     /* use libc malloc */
     1162# define SOAP_MALLOC(soap, size) malloc(size)
     1163#endif
     1164
     1165#ifndef SOAP_FREE                       /* use libc free */
     1166# define SOAP_FREE(soap, ptr) free(ptr)
    9241167#endif
    9251168
     
    9321175{ if (soap)\
    9331176  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
    934       soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
     1177      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
    9351178    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
    9361179    { FILE *fdebug = soap->fdebug[SOAP_INDEX_##DBGFILE];\
     
    9451188{ if (soap)\
    9461189  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
    947       soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
     1190      soap_open_logfile((struct soap*)soap, SOAP_INDEX_##DBGFILE);\
    9481191    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
    9491192    { fwrite((MSG), 1, (LEN), soap->fdebug[SOAP_INDEX_##DBGFILE]);\
     
    9531196}
    9541197# endif
     1198# ifndef DBGFUN
     1199#  define DBGFUN(FNAME) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s()\n", __FILE__, __LINE__, FNAME))
     1200#  define DBGFUN1(FNAME, FMT, ARG) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT")\n", __FILE__, __LINE__, FNAME, (ARG)))
     1201#  define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2) DBGLOG(TEST, SOAP_MESSAGE(fdebug, "%s(%d): %s("FMT1", "FMT2")\n", __FILE__, __LINE__, FNAME, (ARG1), (ARG2)))
     1202#  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)))
     1203# endif
     1204# ifndef DBGHEX
     1205#  define DBGHEX(DBGFILE, MSG, LEN) \
     1206{ if (soap)\
     1207  { if (!soap->fdebug[SOAP_INDEX_##DBGFILE])\
     1208      soap_open_logfile(soap, SOAP_INDEX_##DBGFILE);\
     1209    if (soap->fdebug[SOAP_INDEX_##DBGFILE])\
     1210    { int i; char *s;\
     1211      for (s = (char*)(MSG), i = (LEN); i; i--)\
     1212        fprintf(soap->fdebug[SOAP_INDEX_##DBGFILE], "%2.2X  ", (int)*s++&0xFF);\
     1213      fflush(soap->fdebug[SOAP_INDEX_##DBGFILE]);\
     1214    }\
     1215  }\
     1216}
     1217# endif
    9551218#else
    9561219# define DBGLOG(DBGFILE, CMD)
    9571220# define DBGMSG(DBGFILE, MSG, LEN)
    958 #endif
    959 
     1221# define DBGFUN(FNAME)
     1222# define DBGFUN1(FNAME, FMT, ARG)
     1223# define DBGFUN2(FNAME, FMT1, ARG1, FMT2, ARG2)
     1224# define DBGFUN3(FNAME, FMT1, ARG1, FMT2, ARG2, FMT3, ARG3)
     1225# define DBGHEX(DBGFILE, MSG, LEN)
     1226#endif
     1227
     1228/* UCS-4 requires 32 bits (0-7FFFFFFF, the sign bit is used by gSOAP to distinguish XML entities) */
     1229typedef soap_int32 soap_wchar;
     1230
     1231/* namespace table row */
    9601232struct Namespace
    9611233{ const char *id;
     
    9651237};
    9661238
     1239/* namespace stack */
    9671240struct soap_nlist
    9681241{ struct soap_nlist *next;
    969   unsigned int level;
     1242  unsigned int level; /* nesting depth level */
    9701243  short index; /* corresponding entry in ns mapping table */
    9711244  char *ns; /* only set when parsed ns URI is not in the ns mapping table */
     
    9731246};
    9741247
     1248/* block stack for nested block allocations */
    9751249struct soap_blist
    9761250{ struct soap_blist *next;
     
    9791253};
    9801254
     1255/* array layout */
    9811256struct soap_array
    9821257{ void *__ptr;
     
    9951270};
    9961271
     1272/* block allocation for pointer serialization management */
     1273struct soap_pblk
     1274{ struct soap_pblk *next;
     1275  struct soap_plist plist[SOAP_PTRBLK];
     1276};
     1277
     1278#ifdef SOAP_MEM_DEBUG
     1279/* malloc/free tracking for debugging */
     1280struct soap_mlist
     1281{ struct soap_mlist *next;
     1282  const void *ptr;
     1283  const char *file;
     1284  int line;
     1285  short live;
     1286};
     1287#endif
     1288
    9971289/* class allocation list */
    9981290struct soap_clist
     
    10011293  int type;
    10021294  int size;
    1003   void (*fdelete)(struct soap_clist*);
    1004 };
    1005 
     1295  int (*fdelete)(struct soap_clist*);
     1296};
     1297
     1298/* attributes */
    10061299struct soap_attribute
    10071300{ struct soap_attribute *next;
     
    10131306};
    10141307
     1308#ifndef WITH_LEAN
    10151309struct soap_cookie
    10161310{ struct soap_cookie *next;
     
    10191313  char *domain;
    10201314  char *path;
    1021   long expire;          /* client-side: local time to expire; server-side: seconds to expire */
     1315  time_t expire;        /* client-side: local time to expire */
     1316  long maxage;          /* server-side: seconds to expire */
    10221317  unsigned int version;
    10231318  short secure;
    10241319  short session;        /* server-side */
    1025   short env;            /* server-side: got cookie from client */
    1026   short modified;       /* server-side: client cookie was modified */
    1027 };
     1320  short env;            /* server-side: got cookie from client and should not be (re)send */
     1321  short modified;       /* server-side: client cookie was modified and should be send */
     1322};
     1323#endif
    10281324
    10291325#ifdef __cplusplus
    10301326SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
     1327
    10311328class soap_multipart_iterator
    10321329{ public:
     
    10471344#endif
    10481345
     1346#ifndef WITH_LEANER
    10491347struct soap_dime
    10501348{ size_t count;
     
    10661364#endif
    10671365};
    1068 
     1366#endif
     1367
     1368#ifndef WITH_LEANER
    10691369struct soap_mime
    10701370{ char *boundary;                       /* MIME boundary */
    10711371  const char *start;                    /* MIME start ID */
    1072   struct soap_multipart *list;          /* list of DIME attachments received */
     1372  struct soap_multipart *list;          /* list of MIME attachments received */
    10731373  struct soap_multipart *first, *last;  /* temporary in/out queue */
    10741374#ifdef __cplusplus
     
    10791379#endif
    10801380};
    1081 
     1381#endif
     1382
     1383#ifndef WITH_LEANER
    10821384/* RFC2045 MIME content transfer encodings */
    10831385enum soap_mime_encoding
     
    10911393  SOAP_MIME_X_TOKEN
    10921394};
    1093 
     1395#endif
     1396
     1397#ifndef WITH_LEANER
    10941398/* DIME/MIME multipart list */
    10951399struct soap_multipart
     
    10971401  char *ptr;                            /* points to raw data content */
    10981402  size_t size;                          /* size of data content */
    1099   const char *id;                       /* DIME/MIME content ID */
     1403  const char *id;                       /* DIME/MIME content ID or form data name */
    11001404  const char *type;                     /* DIME/MIME type (MIME type format) */
    11011405  const char *options;                  /* DIME options */
     
    11071411#endif
    11081412};
    1109 
     1413#endif
     1414
     1415#ifndef WITH_LEANER
     1416/* attachment DIME and MTOM XOP forwarding */
     1417struct soap_xlist
     1418{ struct soap_xlist *next;
     1419  unsigned char **ptr;
     1420  int *size;
     1421  char *id;
     1422  char **type;
     1423  char **options;
     1424};
     1425#endif
     1426
     1427/******************************************************************************/
     1428
     1429#ifndef WITH_LEANER
     1430#ifdef __cplusplus
     1431class soap_dom_attribute_iterator
     1432{ public:
     1433  struct soap_dom_attribute *att;
     1434  const char *nstr;
     1435  const char *name;
     1436  bool operator==(const soap_dom_attribute_iterator&) const;
     1437  bool operator!=(const soap_dom_attribute_iterator&) const;
     1438  struct soap_dom_attribute &operator*() const;
     1439  soap_dom_attribute_iterator &operator++();
     1440  soap_dom_attribute_iterator();
     1441  soap_dom_attribute_iterator(struct soap_dom_attribute*);
     1442  ~soap_dom_attribute_iterator();
     1443};
     1444#endif
     1445#endif
     1446
     1447#ifndef WITH_LEANER
    11101448struct soap_dom_attribute
    11111449{ struct soap_dom_attribute *next;
     
    11161454  struct soap *soap;
    11171455#ifdef __cplusplus
    1118   struct soap_dom_attribute &set(const char *nstr, const char *name);   // set namespace and name
    1119   struct soap_dom_attribute &set(const char *data);             // set data
     1456  typedef soap_dom_attribute_iterator iterator;
     1457  struct soap_dom_attribute &set(const char *nstr, const char *name);   /* set namespace and name */
     1458  struct soap_dom_attribute &set(const char *data);             /* set data */
     1459  soap_dom_attribute_iterator begin();
     1460  soap_dom_attribute_iterator end();
     1461  soap_dom_attribute_iterator find(const char *nstr, const char *name);
    11201462  void unlink();
    11211463  soap_dom_attribute();
     
    11251467#endif
    11261468};
    1127 
     1469#endif
     1470
     1471#ifndef WITH_LEANER
    11281472#ifdef __cplusplus
    1129 class soap_dom_iterator
     1473class soap_dom_element_iterator
    11301474{ public:
    11311475  struct soap_dom_element *elt;
     
    11331477  const char *name;
    11341478  int type;
    1135   bool operator==(const soap_dom_iterator&) const;
    1136   bool operator!=(const soap_dom_iterator&) const;
     1479  bool operator==(const soap_dom_element_iterator&) const;
     1480  bool operator!=(const soap_dom_element_iterator&) const;
    11371481  struct soap_dom_element &operator*() const;
    1138   soap_dom_iterator &operator++();
    1139   soap_dom_iterator();
    1140   soap_dom_iterator(struct soap_dom_element*);
    1141   ~soap_dom_iterator();
    1142 };
    1143 #endif
    1144 
     1482  soap_dom_element_iterator &operator++();
     1483  soap_dom_element_iterator();
     1484  soap_dom_element_iterator(struct soap_dom_element*);
     1485  ~soap_dom_element_iterator();
     1486};
     1487#endif
     1488#endif
     1489
     1490#ifndef WITH_LEANER
    11451491struct soap_dom_element
    11461492{ struct soap_dom_element *next;        /* next sibling */
    11471493  struct soap_dom_element *prnt;        /* parent */
    1148   struct soap_dom_element *elts;        /* first child element */
    1149   struct soap_dom_attribute *atts;      /* first child attribute */
     1494  struct soap_dom_element *elts;        /* list of child elements */
     1495  struct soap_dom_attribute *atts;      /* list of attributes */
    11501496  const char *nstr;                     /* namespace string */
    11511497  char *name;                           /* element tag name */
     
    11541500  int type;                             /* optional: serialized C/C++ data type */
    11551501  void *node;                           /* optional: pointer to serialized C/C++ data */
    1156   struct soap *soap;
     1502  char *head;                           /* leading whitespace to start tag */
     1503  char *tail;                           /* leading whitespace to end tag */
     1504  struct soap *soap;                    /* soap context that manages this node */
    11571505#ifdef __cplusplus
    1158   typedef soap_dom_iterator iterator;
     1506  typedef soap_dom_element_iterator iterator;
    11591507  struct soap_dom_element &set(const char *nstr, const char *name);
    11601508  struct soap_dom_element &set(const char *data);
     
    11641512  struct soap_dom_element &add(struct soap_dom_attribute*);
    11651513  struct soap_dom_element &add(struct soap_dom_attribute&);
    1166   soap_dom_iterator begin();
    1167   soap_dom_iterator end();
    1168   soap_dom_iterator find(const char *nstr, const char *name);
    1169   soap_dom_iterator find(int type);
     1514  soap_dom_element_iterator begin();
     1515  soap_dom_element_iterator end();
     1516  soap_dom_element_iterator find(const char *nstr, const char *name);
     1517  soap_dom_element_iterator find(int type);
    11701518  void unlink();
    11711519  soap_dom_element();
     
    11771525#endif
    11781526};
     1527SOAP_FMAC1 struct soap_dom_element * SOAP_FMAC2 soap_dom_next_element(struct soap_dom_element *elt);
     1528SOAP_FMAC1 struct soap_dom_attribute * SOAP_FMAC2 soap_dom_next_attribute(struct soap_dom_attribute *att);
     1529#endif
    11791530
    11801531#if defined(__cplusplus) && !defined(WITH_LEAN)
    11811532}
    1182 extern ostream &operator<<(ostream&, const struct soap_dom_element&);
    1183 extern istream &operator>>(istream&, struct soap_dom_element&);
     1533extern std::ostream &operator<<(std::ostream&, const struct soap_dom_element&);
     1534extern std::istream &operator>>(std::istream&, struct soap_dom_element&);
    11841535extern "C" {
    11851536#endif
    11861537
    1187 struct soap
    1188 { short version;                /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
    1189   short copy;                   /* 1 = copy of another soap struct */
     1538/******************************************************************************/
     1539
     1540#ifdef WIN32
     1541# ifdef SOAP_STD_EXPORTS
     1542#  define SOAP_STD_API __declspec(dllexport)
     1543# else
     1544#  define SOAP_STD_API
     1545# endif
     1546#else
     1547# define SOAP_STD_API
     1548#endif
     1549
     1550struct SOAP_STD_API soap
     1551{ short state;                  /* 0 = uninitialized, 1 = initialized, 2 = copy of another soap struct */
     1552  short version;                /* 1 = SOAP1.1 and 2 = SOAP1.2 (set automatically from namespace URI in nsmap table) */
    11901553  soap_mode mode;
    11911554  soap_mode imode;
    11921555  soap_mode omode;
    1193   const char *float_format;     /* points to user-definable format string for floats (<1024 chars) */
    1194   const char *double_format;    /* points to user-definable format string for doubles (<1024 chars) */
    1195   const char *dime_id_format;   /* points to user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
    1196   const char *http_version;     /* default = "1.0" */
     1556  const char *float_format;     /* user-definable format string for floats (<1024 chars) */
     1557  const char *double_format;    /* user-definable format string for doubles (<1024 chars) */
     1558  const char *dime_id_format;   /* user-definable format string for integer DIME id (<SOAP_TAGLEN chars) */
     1559  const char *http_version;     /* HTTP version used "1.0" or "1.1" */
    11971560  const char *http_content;     /* optional custom response content type (with SOAP_FILE) */
    11981561  const char *encodingStyle;    /* default = NULL which means that SOAP encoding is used */
    1199   const char *actor;
     1562  const char *actor;            /* SOAP-ENV:actor or role attribute value */
     1563  const char *lang;             /* xml:lang attribute value of SOAP-ENV:Text */
    12001564  int recv_timeout;             /* when > 0, gives socket recv timeout in seconds, < 0 in usec */
    12011565  int send_timeout;             /* when > 0, gives socket send timeout in seconds, < 0 in usec */
     
    12061570  int bind_flags;               /* bind() SOL_SOCKET sockopt flags, e.g. set to SO_REUSEADDR to enable reuse */
    12071571  int accept_flags;             /* accept() SOL_SOCKET sockopt flags */
     1572  unsigned short linger_time;   /* linger time for SO_LINGER option */
    12081573  const struct Namespace *namespaces;   /* Pointer to global namespace mapping table */
    12091574  struct Namespace *local_namespaces;   /* Local namespace mapping table */
     
    12111576  struct soap_blist *blist;     /* block allocation stack */
    12121577  struct soap_clist *clist;     /* class instance allocation list */
    1213   void *alist;                  /* memory allocation list */
     1578  void *alist;                  /* memory allocation (malloc) list */
    12141579  struct soap_ilist *iht[SOAP_IDHASH];
    12151580  struct soap_plist *pht[SOAP_PTRHASH];
     1581  struct soap_pblk *pblk;       /* plist block allocation */
     1582  short pidx;                   /* plist block allocation */
    12161583  struct SOAP_ENV__Header *header;
    12171584  struct SOAP_ENV__Fault *fault;
     1585  int idnum;
    12181586  void *user;                   /* to pass user-defined data */
    12191587  struct soap_plugin *plugins;  /* linked list of plug-in data */
     
    12221590  int (*fpost)(struct soap*, const char*, const char*, int, const char*, const char*, size_t);
    12231591  int (*fget)(struct soap*);
     1592  int (*fput)(struct soap*);
     1593  int (*fdel)(struct soap*);
     1594  int (*fhead)(struct soap*);
     1595  int (*fform)(struct soap*);
    12241596  int (*fposthdr)(struct soap*, const char*, const char*);
    12251597  int (*fresponse)(struct soap*, int, size_t);
    12261598  int (*fparse)(struct soap*);
    12271599  int (*fparsehdr)(struct soap*, const char*, const char*);
     1600  int (*fheader)(struct soap*);
    12281601  int (*fresolve)(struct soap*, const char*, struct in_addr* inaddr);
    12291602  int (*fconnect)(struct soap*, const char*, const char*, int);
     
    12311604  int (*fclosesocket)(struct soap*, SOAP_SOCKET);
    12321605  int (*fshutdownsocket)(struct soap*, SOAP_SOCKET, int);
    1233   int (*fopen)(struct soap*, const char*, const char*, int);
    1234   int (*faccept)(struct soap*, int, struct sockaddr*, int *n);
     1606  SOAP_SOCKET (*fopen)(struct soap*, const char*, const char*, int);
     1607  SOAP_SOCKET (*faccept)(struct soap*, SOAP_SOCKET, struct sockaddr*, int *n);
    12351608  int (*fclose)(struct soap*);
    12361609  int (*fsend)(struct soap*, const char*, size_t);
    12371610  size_t (*frecv)(struct soap*, char*, size_t);
    12381611  int (*fpoll)(struct soap*);
     1612  void (*fseterror)(struct soap*, const char **c, const char **s);
     1613  int (*fignore)(struct soap*, const char*);
     1614  int (*fserveloop)(struct soap*);
     1615  void *(*fplugin)(struct soap*, const char*);
     1616  void *(*fmalloc)(struct soap*, size_t);
     1617#ifndef WITH_LEANER
    12391618  int (*fprepareinit)(struct soap*);
    12401619  int (*fpreparesend)(struct soap*, const char*, size_t);
    12411620  int (*fpreparerecv)(struct soap*, const char*, size_t);
    1242   int (*fignore)(struct soap*, const char*);
    1243   int (*fserveloop)(struct soap*);
    1244   void *(*fplugin)(struct soap*, const char*);
     1621  int (*fpreparefinal)(struct soap*);
    12451622  void *(*fdimereadopen)(struct soap*, void*, const char*, const char*, const char*);
    12461623  void *(*fdimewriteopen)(struct soap*, const char*, const char*, const char*);
     
    12491626  size_t (*fdimeread)(struct soap*, void*, char*, size_t);
    12501627  int (*fdimewrite)(struct soap*, void*, const char*, size_t);
    1251   int master;
    1252   int socket;
     1628  void *(*fmimereadopen)(struct soap*, void*, const char*, const char*, const char*);
     1629  void *(*fmimewriteopen)(struct soap*, void*, const char*, const char*, const char*, enum soap_mime_encoding);
     1630  void (*fmimereadclose)(struct soap*, void*);
     1631  void (*fmimewriteclose)(struct soap*, void*);
     1632  size_t (*fmimeread)(struct soap*, void*, char*, size_t);
     1633  int (*fmimewrite)(struct soap*, void*, const char*, size_t);
     1634#endif
     1635  SOAP_SOCKET master;
     1636  SOAP_SOCKET socket;
    12531637#if defined(__cplusplus) && !defined(WITH_LEAN)
    1254   ostream *os;
    1255   istream *is;
     1638  std::ostream *os;
     1639  std::istream *is;
    12561640#else
    1257   void *os;     /* preserve alignment */
    1258   void *is;     /* preserve alignment */
     1641  void *os;             /* preserve struct size */
     1642  void *is;             /* preserve struct size */
    12591643#endif
    12601644#ifndef UNDER_CE
     
    12641648  FILE *sendfd;
    12651649  FILE *recvfd;
    1266   char errorstr[256];
    1267   wchar_t werrorstr[256];
    1268 #endif
    1269   size_t bufidx;
    1270   size_t buflen;
    1271   soap_wchar ahead;
    1272   short cdata;
    1273   short body;
    1274   unsigned int level;
     1650#endif
     1651  size_t bufidx;        /* index in soap.buf[] */
     1652  size_t buflen;        /* length of soap.buf[] content */
     1653  soap_wchar ahead;     /* parser lookahead */
     1654  short cdata;          /* CDATA parser state */
     1655  short body;           /* parsed XML element has a body or not */
     1656  unsigned int level;   /* XML nesting level */
    12751657  size_t count;         /* message length counter */
    12761658  size_t length;        /* message length as set by HTTP header */
     
    12791661  size_t labidx;        /* look-aside buffer index to available part */
    12801662  char buf[SOAP_BUFLEN];/* send and receive buffer */
    1281   char tmpbuf[1024];    /* output buffer for HTTP headers, simpleType values, attribute names, and DIME >=1024 bytes */
    1282   char msgbuf[1024];    /* output buffer for (error) messages <=1024 bytes */
     1663  char msgbuf[1024];    /* in/out buffer for HTTP/MIME headers >=1024 bytes */
     1664  char tmpbuf[1024];    /* in/out buffer for HTTP/MIME headers, simpleType values, element and attribute tag names, and DIME must be >=1024 bytes */
    12831665  char tag[SOAP_TAGLEN];
    12841666  char id[SOAP_TAGLEN];
     
    12891671  char arrayOffset[SOAP_TAGLEN];
    12901672  short other;
    1291   short root;
    12921673  short position;
    12931674  int positions[SOAP_MAXDIMS];
     1675  short root;
    12941676  struct soap_attribute *attributes;    /* attribute list */
    1295   short encoding;
    1296   short mustUnderstand;
    1297   short null;
    1298   short ns;
    1299   short part;
     1677  short encoding;       /* when set, output encodingStyle */
     1678  short mustUnderstand; /* a mustUnderstand element was parsed or is output */
     1679  short null;           /* parsed XML is xsi:nil */
     1680  short ns;             /* when not set, output full xmlns bindings */
     1681  short part;           /* parsing state */
    13001682  short alloced;
    13011683  short peeked;
    1302   short keep_alive;
    13031684  size_t chunksize;
    13041685  size_t chunkbuflen;
     
    13091690  char *authrealm;              /* HTTP authentication realm */
    13101691  char *prolog;                 /* XML declaration prolog */
    1311   int port;
    1312   unsigned int max_keep_alive;
     1692  unsigned long ip;             /* IP number */
     1693  int port;                     /* port number */
     1694  short keep_alive;             /* connection should be kept open */
     1695  short tcp_keep_alive;         /* enable SO_KEEPALIVE */
     1696  unsigned int tcp_keep_idle;   /* set TCP_KEEPIDLE */
     1697  unsigned int tcp_keep_intvl;  /* set TCP_KEEPINTVL */
     1698  unsigned int tcp_keep_cnt;    /* set TCP_KEEPCNT */
     1699  unsigned int max_keep_alive;  /* maximum keep-alive session (default=100) */
     1700  const char *proxy_http_version;/* HTTP version of proxy "1.0" or "1.1" */
    13131701  const char *proxy_host;       /* Proxy Server host name */
    13141702  int proxy_port;               /* Proxy Server port (default = 8080) */
    13151703  const char *proxy_userid;     /* Proxy Authorization user name */
    13161704  const char *proxy_passwd;     /* Proxy Authorization password */
     1705  const char *proxy_from;       /* X-Forwarding-For header returned by proxy */
    13171706  int status;                   /* -1 when request, else error code to be returned by server */
    13181707  int error;
    13191708  int errmode;
    13201709  int errnum;
    1321   unsigned long idnum;
    1322   unsigned long ip;
     1710#ifndef WITH_LEANER
     1711  struct soap_dom_element *dom;
    13231712  struct soap_dime dime;
    13241713  struct soap_mime mime;
    1325   struct soap_dom_element *dom;
     1714  struct soap_xlist *xlist;
     1715#endif
    13261716#if !defined(WITH_LEAN) || defined(SOAP_DEBUG)
    13271717  const char *logfile[SOAP_MAXLOGS];
    13281718  FILE *fdebug[SOAP_MAXLOGS];
     1719  struct soap_mlist *mht[SOAP_PTRHASH];
    13291720#endif
    13301721#ifndef WITH_LEAN
     1722  const char *c14ninclude;
     1723  const char *c14nexclude;
    13311724  struct soap_cookie *cookies;
    13321725  const char *cookie_domain;
     
    13341727  int cookie_max;
    13351728#endif
     1729#ifndef WITH_NOIO
     1730  int ipv6_multicast_if; /* always include this to keep the soap struct size the same in v4 and v6 */
     1731  char* ipv4_multicast_if; /* always include this to keep the soap struct size the same in v4 and v6 */
     1732  int ipv4_multicast_ttl; /* multicast scope */
     1733#ifdef WITH_IPV6
     1734  struct sockaddr_storage peer; /* IPv6: set by soap_accept and by UDP recv */
     1735#else
     1736  struct sockaddr_in peer;      /* IPv4: set by soap_connect/soap_accept and by UDP recv */
     1737#endif
     1738#endif
     1739  size_t peerlen;
    13361740#ifdef WITH_OPENSSL
    13371741  int (*fsslauth)(struct soap*);
     
    13401744  SSL *ssl;
    13411745  SSL_CTX *ctx;
    1342   short require_server_auth;
    1343   short require_client_auth;
    1344   short rsa;                    /* when set, use RSA instead of DH */
     1746  SSL_SESSION *session;
     1747#else
     1748  void *fsslauth;               /* dummy members, to preserve struct size */
     1749  void *fsslverify;
     1750  void *bio;
     1751  void *ssl;
     1752  void *ctx;
     1753  void *session;
     1754#endif
     1755  unsigned short ssl_flags;
    13451756  const char *keyfile;
    13461757  const char *password;
     
    13481759  const char *cafile;
    13491760  const char *capath;
     1761  const char *crlfile;
    13501762  const char *randfile;
    1351   SSL_SESSION *session;
    13521763  char session_host[SOAP_TAGLEN];
    13531764  int session_port;
     1765#ifdef WITH_C_LOCALE
     1766  locale_t c_locale;            /* set to C locale by default */
     1767#else
     1768  void *c_locale;
    13541769#endif
    13551770#ifdef WITH_ZLIB
     1771  z_stream *d_stream;           /* decompression stream */
     1772  uLong z_crc;                  /* internal gzip crc */
     1773#else
     1774  void *d_stream;               /* dummy members, to preserve struct size */
     1775  soap_int32 z_crc;
     1776#endif
    13561777  short zlib_state;             /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_INFLATE */
    13571778  short zlib_in;                /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
    13581779  short zlib_out;               /* SOAP_ZLIB_NONE, SOAP_ZLIB_DEFLATE, or SOAP_ZLIB_GZIP */
    1359   z_stream d_stream;            /* decompression stream */
    1360   char z_buf[SOAP_BUFLEN];      /* buffer */
     1780  char *z_buf;                  /* buffer */
    13611781  size_t z_buflen;
    13621782  unsigned short z_level;       /* compression level to be used (0=none, 1=fast to 9=best) */
    1363   uLong z_crc;                  /* internal gzip crc */
    13641783  float z_ratio_in;             /* detected compression ratio compressed_length/length of inbound message */
    13651784  float z_ratio_out;            /* detected compression ratio compressed_length/length of outbound message */
    1366 #endif
    1367 /* WR[ */
    13681785#ifdef WMW_RPM_IO
    13691786  void *rpmreqid;
    1370 #endif /* WMW_RPM_IO */
    1371 /* ]WR */
     1787#endif
     1788#ifdef __cplusplus
     1789  soap();
     1790  soap(soap_mode);
     1791  soap(soap_mode, soap_mode);
     1792  soap(struct soap&);
     1793  virtual ~soap();
     1794#else
     1795  void (*dummy)();
     1796#endif
    13721797};
    13731798
     
    13831808  void *ptr;
    13841809  unsigned int level;
    1385   void (*fcopy)(struct soap*, int, int, void*, const void*, size_t);
     1810  size_t len;
     1811  void (*fcopy)(struct soap*, int, int, void*, size_t, const void*, size_t);
    13861812};
    13871813
     
    14111837#endif
    14121838
     1839#ifndef WITH_LEAN
     1840# define soap_get0(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx])
     1841# define soap_get1(soap) (((soap)->bufidx>=(soap)->buflen && soap_recv(soap)) ? EOF : (unsigned char)(soap)->buf[(soap)->bufidx++])
     1842#else
     1843soap_wchar soap_get0(struct soap*);
     1844soap_wchar soap_get1(struct soap*);
     1845#endif
     1846
     1847#define soap_revget1(soap) ((soap)->bufidx--)
     1848#define soap_unget(soap, c) ((soap)->ahead = c)
     1849#define soap_register_plugin(soap, plugin) soap_register_plugin_arg(soap, plugin, NULL)
     1850#define soap_imode(soap, n) ((soap)->mode = (soap)->imode = (n))
     1851#define soap_set_imode(soap, n) ((soap)->imode |= (n))
     1852#define soap_clr_imode(soap, n) ((soap)->imode &= ~(n))
     1853#define soap_omode(soap, n) ((soap)->mode = (soap)->omode = (n))
     1854#define soap_set_omode(soap, n) ((soap)->omode |= (n))
     1855#define soap_clr_omode(soap, n) ((soap)->omode &= ~(n))
     1856#define soap_set_mode(soap, n) ((soap)->imode |= (n), (soap)->omode |= (n))
     1857#define soap_clr_mode(soap, n) ((soap)->imode &= ~(n), (soap)->omode &= ~(n))
     1858#define soap_destroy(soap) soap_delete((soap), NULL)
     1859
    14131860#ifdef HAVE_STRRCHR
    14141861# define soap_strrchr(s, t) strrchr(s, t)
     
    14291876#endif
    14301877
     1878#if defined(WITH_OPENSSL)
     1879# define soap_random soap_rand()
     1880SOAP_FMAC1 int SOAP_FMAC2 soap_rand(void);
     1881#elif defined(HAVE_RANDOM)
     1882# define soap_random (int)random()
     1883#else
     1884# define soap_random rand()
     1885#endif
     1886
     1887#ifdef WITH_NOIDREF
     1888# define soap_embedded(s, p, t) (0)
     1889# define soap_id_lookup(s, i, p, t, n, k) (p)
     1890# define soap_id_forward(s, h, p, len, st, tt, n, k, fc) (p)
     1891# define soap_reference(s, a, t) (1)
     1892# define soap_array_reference(s, p, a, n, t) (1)
     1893# define soap_embed(s, p, a, n, t, pp) (0)
     1894# define soap_embedded_id(s, i, p, t) (i)
     1895# define soap_is_embedded(s, p) (0)
     1896# define soap_is_single(s, p) (1)
     1897# define soap_lookup_type(s, i) (0)
     1898# define soap_getindependent(s) (0)
     1899# define soap_putindependent(s) (0)
     1900# define soap_getelement(s, n) (n)
     1901# define soap_putelement(s, p, t, i, n) (0)
     1902# define soap_markelement(s, p, n) (0)
     1903#endif
     1904
     1905SOAP_FMAC1 void SOAP_FMAC2 soap_header(struct soap*);
    14311906SOAP_FMAC1 void SOAP_FMAC2 soap_fault(struct soap*);
    14321907SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultcode(struct soap*);
     1908SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultsubcode(struct soap*);
    14331909SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultstring(struct soap*);
    14341910SOAP_FMAC1 const char** SOAP_FMAC2 soap_faultdetail(struct soap*);
     
    14401916SOAP_FMAC1 int SOAP_FMAC2 soap_getfault(struct soap*);
    14411917
     1918SOAP_FMAC1 void SOAP_FMAC2 soap_ssl_init();
    14421919SOAP_FMAC1 int SOAP_FMAC2 soap_poll(struct soap*);
    14431920SOAP_FMAC1 int SOAP_FMAC2 soap_connect_command(struct soap*, int, const char*, const char*);
    14441921SOAP_FMAC1 int SOAP_FMAC2 soap_connect(struct soap*, const char*, const char*);
    1445 SOAP_FMAC1 int SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
    1446 SOAP_FMAC1 int SOAP_FMAC2 soap_accept(struct soap*);
     1922SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_bind(struct soap*, const char*, int, int);
     1923SOAP_FMAC1 SOAP_SOCKET SOAP_FMAC2 soap_accept(struct soap*);
    14471924SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_accept(struct soap*);
     1925SOAP_FMAC1 const char * SOAP_FMAC2 soap_ssl_error(struct soap*, int);
    14481926
    14491927SOAP_FMAC1 int SOAP_FMAC2 soap_ssl_server_context(struct soap*, unsigned short, const char*, const char*, const char*, const char*, const char*, const char*, const char*);
     
    14651943SOAP_FMAC1 void SOAP_FMAC2 soap_set_fault(struct soap*);
    14661944SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault(struct soap*, const char*, const char*);
     1945SOAP_FMAC1 int SOAP_FMAC2 soap_sender_fault_subcode(struct soap*, const char*, const char*, const char*);
    14671946SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault(struct soap*, const char*, const char*);
     1947SOAP_FMAC1 int SOAP_FMAC2 soap_receiver_fault_subcode(struct soap*, const char*, const char*, const char*);
    14681948SOAP_FMAC1 int SOAP_FMAC2 soap_set_sender_error(struct soap*, const char*, const char*, int);
    14691949SOAP_FMAC1 int SOAP_FMAC2 soap_set_receiver_error(struct soap*, const char*, const char*, int);
     
    14841964SOAP_FMAC1 unsigned char* SOAP_FMAC2 soap_gethex(struct soap*, int*);
    14851965
    1486 
    1487 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
    1488 SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
    1489 SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
    1490 
     1966#ifndef WITH_LEANER
     1967SOAP_FMAC1 int SOAP_FMAC2 soap_xop_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
     1968SOAP_FMAC1 int SOAP_FMAC2 soap_dime_forward(struct soap*, unsigned char**, int*, char**, char**, char**);
     1969#endif
     1970
     1971#ifndef WITH_NOIDREF
    14911972SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup_id(struct soap*, void *p, int t, struct soap_plist**);
    14921973SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_lookup(struct soap*, const void *p, int t, struct soap_plist**);
    14931974SOAP_FMAC1 int SOAP_FMAC2 soap_pointer_enter(struct soap*, const void *p, const struct soap_array *a, int n, int t, struct soap_plist**);
    14941975SOAP_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**);
    1495 
    14961976SOAP_FMAC1 int SOAP_FMAC2 soap_embed(struct soap *soap, const void *p, const struct soap_array *a, int n, const char *tag, int type);
    1497 
    1498 SOAP_FMAC1 void SOAP_FMAC2 soap_begin_count(struct soap*);
    1499 SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
    1500 SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
    1501 
     1977SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_lookup(struct soap*, const char*);
     1978SOAP_FMAC1 struct soap_ilist* SOAP_FMAC2 soap_enter(struct soap*, const char*);
     1979SOAP_FMAC1 int SOAP_FMAC2 soap_resolve(struct soap*);
    15021980SOAP_FMAC1 void SOAP_FMAC2 soap_embedded(struct soap*, const void *p, int t);
    15031981SOAP_FMAC1 int SOAP_FMAC2 soap_reference(struct soap*, const void *p, int t);
     
    15071985SOAP_FMAC1 int SOAP_FMAC2 soap_is_single(struct soap*, struct soap_plist*);
    15081986SOAP_FMAC1 void SOAP_FMAC2 soap_set_embedded(struct soap*, struct soap_plist*);
    1509 
    1510 SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char *str);
    1511 SOAP_FMAC1 long SOAP_FMAC2 soap_int_code(const struct soap_code_map*, const char *str, long other);
    1512 SOAP_FMAC1 const char* SOAP_FMAC2 soap_str_code(const struct soap_code_map*, long code);
     1987#endif
     1988
     1989SOAP_FMAC1 int SOAP_FMAC2 soap_begin_count(struct soap*);
     1990SOAP_FMAC1 int SOAP_FMAC2 soap_end_count(struct soap*);
     1991SOAP_FMAC1 int SOAP_FMAC2 soap_begin_send(struct soap*);
     1992SOAP_FMAC1 int SOAP_FMAC2 soap_end_send(struct soap*);
     1993
     1994SOAP_FMAC1 const struct soap_code_map* SOAP_FMAC2 soap_code(const struct soap_code_map*, const char*);
     1995SOAP_FMAC1 long SOAP_FMAC2 soap_code_int(const struct soap_code_map*, const char*, long);
     1996SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_str(const struct soap_code_map*, long);
     1997SOAP_FMAC1 long SOAP_FMAC2 soap_code_bits(const struct soap_code_map*, const char*);
     1998SOAP_FMAC1 const char* SOAP_FMAC2 soap_code_list(struct soap*, const struct soap_code_map*, long);
    15131999
    15142000SOAP_FMAC1 int SOAP_FMAC2 soap_getline(struct soap*, char*, int);
     
    15182004SOAP_FMAC1 void* SOAP_FMAC2 soap_malloc(struct soap*, size_t);
    15192005SOAP_FMAC1 void SOAP_FMAC2 soap_dealloc(struct soap*, void*);
    1520 SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, void (*fdelete)(struct soap_clist*));
     2006SOAP_FMAC1 struct soap_clist * SOAP_FMAC2 soap_link(struct soap*, void*, int, int, int (*fdelete)(struct soap_clist*));
    15212007SOAP_FMAC1 void SOAP_FMAC2 soap_unlink(struct soap*, const void*);
    1522 SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
    1523 
     2008SOAP_FMAC1 void SOAP_FMAC2 soap_free_temp(struct soap*);
     2009SOAP_FMAC1 void SOAP_FMAC2 soap_del(struct soap*);
     2010
     2011SOAP_FMAC1 void* SOAP_FMAC2 soap_track_malloc(struct soap*, const char*, int, size_t);
     2012SOAP_FMAC1 void SOAP_FMAC2 soap_track_free(struct soap*, const char*, int, void*);
     2013
     2014#ifndef WITH_NOIDREF
    15242015SOAP_FMAC1 int SOAP_FMAC2 soap_lookup_type(struct soap*, const char *id);
    1525 
    15262016SOAP_FMAC1 void* SOAP_FMAC2 soap_id_lookup(struct soap*, const char *id, void **p, int t, size_t n, unsigned int k);
    1527 SOAP_FMAC1 void* SOAP_FMAC2 soap_id_forward(struct soap*, const char *id, void *p, int st, int tt, size_t n, unsigned int k, void(*fcopy)(struct soap*, int, int, void*, const void*, size_t));
     2017SOAP_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));
     2018#endif
    15282019SOAP_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*));
    1529 SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, const void *q, size_t n);
     2020SOAP_FMAC1 void SOAP_FMAC2 soap_fcopy(struct soap *soap, int st, int tt, void *p, size_t, const void *q, size_t n);
    15302021
    15312022SOAP_FMAC1 int SOAP_FMAC2 soap_size(const int *, int);
     
    15442035
    15452036SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new(void);
    1546 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(int);
    1547 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(int, int);
    1548 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(struct soap*);
    1549 SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*,struct soap*);
     2037SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new1(soap_mode);
     2038SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_new2(soap_mode, soap_mode);
     2039SOAP_FMAC1 void SOAP_FMAC2 soap_free(struct soap*);
     2040SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy(const struct soap*);
     2041SOAP_FMAC1 struct soap *SOAP_FMAC2 soap_copy_context(struct soap*, const struct soap*);
     2042SOAP_FMAC1 void SOAP_FMAC2 soap_copy_stream(struct soap*, struct soap*);
    15502043SOAP_FMAC1 void SOAP_FMAC2 soap_init(struct soap*);
    1551 SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, int);
    1552 SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, int, int);
     2044SOAP_FMAC1 void SOAP_FMAC2 soap_init1(struct soap*, soap_mode);
     2045SOAP_FMAC1 void SOAP_FMAC2 soap_init2(struct soap*, soap_mode, soap_mode);
    15532046SOAP_FMAC1 void SOAP_FMAC2 soap_done(struct soap*);
    15542047SOAP_FMAC1 void SOAP_FMAC2 soap_cleanup(struct soap*);
     
    15662059
    15672060SOAP_FMAC1 const char* SOAP_FMAC2 soap_value(struct soap*);
    1568 
    1569 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_advance(struct soap*);
    1570 SOAP_FMAC1 soap_wchar SOAP_FMAC2 soap_skip(struct soap*);
    15712061
    15722062SOAP_FMAC1 int SOAP_FMAC2 soap_match_tag(struct soap*, const char*, const char *);
     
    15812071SOAP_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);
    15822072SOAP_FMAC1 int SOAP_FMAC2 soap_element_result(struct soap*, const char *tag);
     2073SOAP_FMAC1 void SOAP_FMAC2 soap_check_result(struct soap*, const char *tag);
    15832074SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_out(struct soap*, const char *tag);
    15842075SOAP_FMAC1 int SOAP_FMAC2 soap_element_start_end_out(struct soap*, const char *tag);
     
    15862077SOAP_FMAC1 int SOAP_FMAC2 soap_attribute(struct soap*, const char*, const char*);
    15872078
    1588 SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable);
     2079SOAP_FMAC1 int SOAP_FMAC2 soap_element_begin_in(struct soap*, const char *tag, int nillable, const char *type);
    15892080
    15902081SOAP_FMAC1 int SOAP_FMAC2 soap_element_end_in(struct soap*, const char *tag);
     
    15962087
    15972088SOAP_FMAC1 char* SOAP_FMAC2 soap_strdup(struct soap*, const char*);
     2089SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstrdup(struct soap*, const wchar_t*);
     2090SOAP_FMAC1 const char * SOAP_FMAC2 soap_strsearch(const char *big, const char *little);
    15982091
    15992092SOAP_FMAC1 int SOAP_FMAC2 soap_string_out(struct soap*, const char *s, int flag);
    16002093SOAP_FMAC1 char* SOAP_FMAC2 soap_string_in(struct soap*, int, long, long);
     2094
     2095#ifndef WITH_LEANER
    16012096SOAP_FMAC1 int SOAP_FMAC2 soap_wstring_out(struct soap*, const wchar_t *s, int flag);
    16022097SOAP_FMAC1 wchar_t* SOAP_FMAC2 soap_wstring_in(struct soap*, int, long, long);
    1603 
    1604 SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, int n1, int n2);
    1605 
    1606 SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, struct Namespace*);
     2098#endif
     2099
     2100SOAP_FMAC1 int SOAP_FMAC2 soap_match_namespace(struct soap*, const char *, const char*, size_t n1, size_t n2);
     2101
     2102SOAP_FMAC1 int SOAP_FMAC2 soap_set_namespaces(struct soap*, const struct Namespace*);
     2103SOAP_FMAC1 void SOAP_FMAC2 soap_set_local_namespaces(struct soap*);
    16072104
    16082105SOAP_FMAC1 void SOAP_FMAC2 soap_pop_namespace(struct soap*);
    16092106SOAP_FMAC1 int SOAP_FMAC2 soap_push_namespace(struct soap*, const char *,const char *);
    1610 
    1611 SOAP_FMAC1 int SOAP_FMAC2 soap_new_block(struct soap*);
    1612 SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, size_t);
    1613 SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*);
    1614 SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, size_t);
    1615 SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*);
    1616 SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*);
    1617 SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*);
    1618 SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, char*, int);
    1619 SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*);
     2107SOAP_FMAC1 const char* SOAP_FMAC2 soap_current_namespace(struct soap *soap, const char *tag);
     2108
     2109SOAP_FMAC1 struct soap_nlist* SOAP_FMAC2 soap_lookup_ns(struct soap *soap, const char *tag, size_t n);
     2110
     2111SOAP_FMAC1 int SOAP_FMAC2 soap_store_lab(struct soap*, const char*, size_t);
     2112SOAP_FMAC1 int SOAP_FMAC2 soap_append_lab(struct soap*, const char*, size_t);
     2113
     2114SOAP_FMAC1 struct soap_blist* SOAP_FMAC2 soap_new_block(struct soap*);
     2115SOAP_FMAC1 void* SOAP_FMAC2 soap_push_block(struct soap*, struct soap_blist*, size_t);
     2116SOAP_FMAC1 void SOAP_FMAC2 soap_pop_block(struct soap*, struct soap_blist*);
     2117SOAP_FMAC1 size_t SOAP_FMAC2 soap_size_block(struct soap*, struct soap_blist*, size_t);
     2118SOAP_FMAC1 char* SOAP_FMAC2 soap_first_block(struct soap*, struct soap_blist*);
     2119SOAP_FMAC1 char* SOAP_FMAC2 soap_next_block(struct soap*, struct soap_blist*);
     2120SOAP_FMAC1 size_t SOAP_FMAC2 soap_block_size(struct soap*, struct soap_blist*);
     2121SOAP_FMAC1 char* SOAP_FMAC2 soap_save_block(struct soap*, struct soap_blist*, char*, int);
     2122SOAP_FMAC1 void SOAP_FMAC2 soap_end_block(struct soap*, struct soap_blist*);
    16202123
    16212124SOAP_FMAC1 int SOAP_FMAC2 soap_envelope_begin_out(struct soap*);
     
    16352138SOAP_FMAC1 int SOAP_FMAC2 soap_response(struct soap*, int);
    16362139
     2140SOAP_FMAC1 int SOAP_FMAC2 soap_send_empty_response(struct soap*, int status);
     2141SOAP_FMAC1 int SOAP_FMAC2 soap_recv_empty_response(struct soap*);
     2142
    16372143SOAP_FMAC1 int SOAP_FMAC2 soap_send_fault(struct soap*);
    1638 
    16392144SOAP_FMAC1 int SOAP_FMAC2 soap_recv_fault(struct soap*);
    16402145
     2146#ifndef WITH_NOSTDLIB
    16412147SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault(struct soap*, FILE*);
    16422148SOAP_FMAC1 void SOAP_FMAC2 soap_print_fault_location(struct soap*, FILE*);
     2149# ifndef WITH_LEAN
     2150#  ifdef __cplusplus
     2151SOAP_FMAC1 void SOAP_FMAC2 soap_stream_fault(struct soap*, std::ostream&);
     2152#  endif
     2153SOAP_FMAC1 char* SOAP_FMAC2 soap_sprint_fault(struct soap*, char*, size_t);
     2154# endif
     2155#endif
    16432156
    16442157SOAP_FMAC1 int SOAP_FMAC2 soap_s2byte(struct soap*, const char*, char*);
     
    16542167SOAP_FMAC1 int SOAP_FMAC2 soap_s2unsignedLong(struct soap*, const char*, unsigned long*);
    16552168SOAP_FMAC1 int SOAP_FMAC2 soap_s2ULONG64(struct soap*, const char*, ULONG64*);
    1656 SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
    16572169SOAP_FMAC1 int SOAP_FMAC2 soap_s2string(struct soap*, const char*, char**);
    16582170SOAP_FMAC1 int SOAP_FMAC2 soap_s2QName(struct soap*, const char*, char**);
    16592171
    1660 SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, size_t);
     2172#ifndef WITH_LEAN
     2173SOAP_FMAC1 int SOAP_FMAC2 soap_s2wchar(struct soap*, const char*, wchar_t**);
     2174SOAP_FMAC1 int SOAP_FMAC2 soap_s2dateTime(struct soap*, const char*, time_t*);
     2175SOAP_FMAC1 char* SOAP_FMAC2 soap_s2base64(struct soap*, const unsigned char*, char*, int);
     2176SOAP_FMAC1 char* SOAP_FMAC2 soap_s2hex(struct soap*, const unsigned char*, char*, int);
     2177#endif
    16612178
    16622179SOAP_FMAC1 const char* SOAP_FMAC2 soap_byte2s(struct soap*, char);
     
    16722189SOAP_FMAC1 const char* SOAP_FMAC2 soap_unsignedLong2s(struct soap*, unsigned long);
    16732190SOAP_FMAC1 const char* SOAP_FMAC2 soap_ULONG642s(struct soap*, ULONG64);
     2191SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
     2192
     2193#ifndef WITH_LEAN
     2194SOAP_FMAC1 const char* SOAP_FMAC2 soap_wchar2s(struct soap*, const wchar_t*);
    16742195SOAP_FMAC1 const char* SOAP_FMAC2 soap_dateTime2s(struct soap*, time_t);
    1675 SOAP_FMAC1 const char* SOAP_FMAC2 soap_QName2s(struct soap*, const char*);
    1676 
    1677 SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, size_t*);
     2196SOAP_FMAC1 const char* SOAP_FMAC2 soap_base642s(struct soap*, const char*, char*, size_t, int*);
     2197SOAP_FMAC1 const char* SOAP_FMAC2 soap_hex2s(struct soap*, const char*, char*, size_t, int*);
     2198#endif
     2199
    16782200
    16792201SOAP_FMAC1 int* SOAP_FMAC2 soap_inint(struct soap*, const char *tag, int *p, const char *, int);
     
    16892211SOAP_FMAC1 unsigned long* SOAP_FMAC2 soap_inunsignedLong(struct soap*, const char *tag, unsigned long *p, const char *, int);
    16902212SOAP_FMAC1 ULONG64* SOAP_FMAC2 soap_inULONG64(struct soap*, const char *tag, ULONG64 *p, const char *, int);
     2213SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
     2214SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
     2215
     2216#ifndef WITH_LEAN
    16912217SOAP_FMAC1 time_t* SOAP_FMAC2 soap_indateTime(struct soap*, const char *tag, time_t *p, const char *, int);
    1692 SOAP_FMAC1 char** SOAP_FMAC2 soap_instring(struct soap*, const char *tag, char **p, const char *, int, int, long, long);
     2218SOAP_FMAC1 time_t SOAP_FMAC2 soap_timegm(struct tm*);
     2219#endif
     2220
     2221#ifndef WITH_LEANER
    16932222SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwstring(struct soap*, const char *tag, wchar_t **p, const char *, int, long, long);
    1694 SOAP_FMAC1 char** SOAP_FMAC2 soap_inliteral(struct soap*, const char *tag, char **p);
    16952223SOAP_FMAC1 wchar_t** SOAP_FMAC2 soap_inwliteral(struct soap*, const char *tag, wchar_t **p);
     2224#endif
    16962225
    16972226SOAP_FMAC1 int SOAP_FMAC2 soap_outbyte(struct soap*, const char *tag, int id, const char *p, const char *, int);
     
    17072236SOAP_FMAC1 int SOAP_FMAC2 soap_outunsignedLong(struct soap*, const char *tag, int id, const unsigned long *p, const char *, int);
    17082237SOAP_FMAC1 int SOAP_FMAC2 soap_outULONG64(struct soap*, const char *tag, int id, const ULONG64 *p, const char *, int);
     2238SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
     2239SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p, const char *type);
     2240
     2241#ifndef WITH_LEAN
    17092242SOAP_FMAC1 int SOAP_FMAC2 soap_outdateTime(struct soap*, const char *tag, int id, const time_t *p, const char *, int);
    1710 SOAP_FMAC1 int SOAP_FMAC2 soap_outstring(struct soap*, const char *tag, int id, char *const*p, const char *, int);
     2243#endif
     2244
     2245#ifndef WITH_LEANER
    17112246SOAP_FMAC1 int SOAP_FMAC2 soap_outwstring(struct soap*, const char *tag, int id, wchar_t *const*p, const char *, int);
    1712 SOAP_FMAC1 int SOAP_FMAC2 soap_outliteral(struct soap*, const char *tag, char *const*p);
    1713 SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p);
     2247SOAP_FMAC1 int SOAP_FMAC2 soap_outwliteral(struct soap*, const char *tag, wchar_t *const*p, const char *type);
     2248#endif
    17142249
    17152250#ifndef WITH_LEANER
    1716 SOAP_FMAC1 int SOAP_FMAC2 soap_element_dime(struct soap *, const char*, int, const void*, const struct soap_array*, const char*, const char*, const char*, int, const char*, int);
     2251SOAP_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);
    17172252SOAP_FMAC1 int SOAP_FMAC2 soap_move(struct soap*, long);
    17182253SOAP_FMAC1 size_t SOAP_FMAC2 soap_tell(struct soap*);
     
    17322267SOAP_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);
    17332268SOAP_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);
     2269SOAP_FMAC1 void SOAP_FMAC2 soap_post_check_mime_attachments(struct soap *soap);
     2270SOAP_FMAC1 int SOAP_FMAC2 soap_check_mime_attachments(struct soap *soap);
     2271SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_get_mime_attachment(struct soap *soap, void *handle);
    17342272SOAP_FMAC1 struct soap_multipart* SOAP_FMAC2 soap_next_multipart(struct soap_multipart*);
     2273SOAP_FMAC1 int SOAP_FMAC2 soap_match_cid(struct soap*, const char*, const char*);
    17352274#endif
    17362275
     
    17432282
    17442283#ifdef WITH_COOKIES
     2284SOAP_FMAC1 void SOAP_FMAC2 soap_getcookies(struct soap *soap, const char *val);
    17452285SOAP_FMAC1 size_t SOAP_FMAC2 soap_encode_cookie(const char*, char*, size_t);
    17462286SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_set_cookie(struct soap*, const char*, const char*, const char*, const char*);
    17472287SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_cookie(struct soap*, const char*, const char*, const char*);
    17482288SOAP_FMAC1 extern char* SOAP_FMAC2 soap_cookie_value(struct soap*, const char*, const char*, const char*);
    1749 SOAP_FMAC1 extern long SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
     2289SOAP_FMAC1 extern char* SOAP_FMAC2 soap_env_cookie_value(struct soap*, const char*, const char*, const char*);
     2290SOAP_FMAC1 extern time_t SOAP_FMAC2 soap_cookie_expire(struct soap*, const char*, const char*, const char*);
    17502291SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_expire(struct soap*, const char*, long, const char*, const char*);
    17512292SOAP_FMAC1 extern int SOAP_FMAC2 soap_set_cookie_session(struct soap*, const char*, const char*, const char*);
     
    17532294SOAP_FMAC1 extern void SOAP_FMAC2 soap_clr_cookie(struct soap*, const char*, const char*, const char*);
    17542295SOAP_FMAC1 extern int SOAP_FMAC2 soap_getenv_cookies(struct soap*);
    1755 SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*);
     2296SOAP_FMAC1 extern struct soap_cookie* SOAP_FMAC2 soap_copy_cookies(struct soap*, const struct soap*);
    17562297SOAP_FMAC1 extern void SOAP_FMAC2 soap_free_cookies(struct soap*);
    17572298#endif
    17582299
    17592300#ifdef __cplusplus
    1760 }
    1761 #endif
    1762 
    1763 #endif
    1764 
     2301} /* extern "C" */
     2302#endif
     2303
     2304#endif
Note: See TracChangeset for help on using the changeset viewer.