Home | Documentation |
SOAP_MACRO run-time flags
updated Tue Aug 27 2024 by Robert van Engelen
|
This module defines the SOAP_MACRO
run-time soap_mode
flags to set the engine mode.
More...
Macros | |
#define | SOAP_IO 0x00000003 |
soap_mode IO flags mask to check for SOAP_IO_FLUSH , SOAP_IO_BUFFER , SOAP_IO_STORE , SOAP_IO_CHUNK (for internal use only) More... | |
#define | SOAP_IO_FLUSH 0x00000000 |
soap_mode IO output flag value to flush the message sent immediately without buffering (the default mode), do not combine this flag with SOAP_IO_BUFFER , SOAP_IO_STORE , SOAP_IO_CHUNK More... | |
#define | SOAP_IO_BUFFER 0x00000001 |
soap_mode IO output flag value to buffer the message sent in packets of size SOAP_BUFLEN , do not combine this flag with SOAP_IO_FLUSH , SOAP_IO_STORE , SOAP_IO_CHUNK More... | |
#define | SOAP_IO_STORE 0x00000002 |
soap_mode IO output flag value to store messages temporarily before transmission, e.g. to determine message length for transmission over HTTP instead of chunking or two-phase message sends, do not combine this flag with SOAP_IO_FLUSH , SOAP_IO_BUFFER , SOAP_IO_CHUNK More... | |
#define | SOAP_IO_CHUNK 0x00000003 |
soap_mode IO output flag value to send HTTP chunked messages, buffers the message in packets of size SOAP_BUFLEN , do not combine this flag with SOAP_IO_FLUSH , SOAP_IO_BUFFER , SOAP_IO_STORE More... | |
#define | SOAP_IO_UDP 0x00000004 |
soap_mode IO input/output flag value to use UDP datagrams, message size is limited to UDP packet size More... | |
#define | SOAP_IO_LENGTH 0x00000008 |
soap_mode IO output flag value to calculate message length when sending a message without transmission (for internal use only) More... | |
#define | SOAP_IO_KEEPALIVE 0x00000010 |
soap_mode IO input and output flag value to keep the socket connection alive for SOAP_MAXKEEPALIVE message exchanges per connection (100 by default), enabling HTTP keep-alive connection persistence More... | |
#define | SOAP_ENC 0x00000FFF |
soap_mode ENC flags mask (for internal use only) More... | |
#define | SOAP_ENC_LATIN 0x00000020 |
soap_mode ENC input flag value to receive ISO-8859-1 encoded messages (automatically detected when receiving XML) More... | |
#define | SOAP_ENC_PLAIN 0x00000040 |
soap_mode ENC input/output flag value to omit the HTTP headers from messages sent and disable detection and parsing of HTTP headers in messages received More... | |
#define | SOAP_ENC_XML |
soap_mode ENC input/output flag (deprecated, same as SOAP_ENC_PLAIN for backward compatibility) More... | |
#define | SOAP_ENC_DIME 0x00000080 |
soap_mode ENC output flag value to enable DIME attachments (for internal use only) More... | |
#define | SOAP_ENC_MIME 0x00000100 |
soap_mode ENC output flag value to enable MIME attachments in messages to be sent, receiving is automatic More... | |
#define | SOAP_ENC_MTOM 0x00000200 |
soap_mode ENC output flag value to enable MTOM XOP attachments in messages to be sent, receiving is automatic More... | |
#define | SOAP_ENC_ZLIB 0x00000400 |
soap_mode ENC output flag value to compress messages sent, requires zlib enabled with compile-time flag WITH_GZIP (or WITH_ZLIB for compression limited to "compress"), detection of compressed messages received and decompression of the messages is automatic More... | |
#define | SOAP_ENC_SSL 0x00000800 |
soap_mode ENC input/output flag value to enable TLS/SSL, e.g. HTTPS, requires OpenSSL, GNUTLS or WolfSSL enabled with compile-time flag WITH_OPENSSL , WITH_GNUTLS , or WITH_WOLFSSL (flag for internal use only) More... | |
#define | SOAP_XML_STRICT 0x00001000 |
soap_mode XML input flag value to enable strict XML validation of messages received More... | |
#define | SOAP_XML_INDENT 0x00002000 |
soap_mode XML output flag value to enable XML (and JSON) message indentation in messages sent More... | |
#define | SOAP_XML_IGNORENS 0x00004000 |
soap_mode XML input flag value to ignore XML namespaces in messages received More... | |
#define | SOAP_XML_DEFAULTNS 0x00008000 |
soap_mode XML output flag value to send XML messages with XML default namespaces for elements instead of namespace-qualified elements More... | |
#define | SOAP_XML_CANONICAL 0x00010000 |
soap_mode XML output flag value to send XML messages in exclusive canonical format as per W3C XML C14N standards, use with the soap::c14ninclude and soap::c14nexclude strings to control the prefixes that are subject to canonicalization by including or excluding specific prefixes More... | |
#define | SOAP_XML_CANONICAL_NA 0x00800000 |
soap_mode XML output flag value to send XML messages in exclusive canonical format as per W3C XML C14N standards, use with the soap::c14ninclude and soap::c14nexclude strings to control the prefixes that are subject to canonicalization by including or excluding specific prefixes More... | |
#define | SOAP_XML_TREE 0x00020000 |
soap_mode XML input/output flag value to serialize C/C++ data structures as XML trees without id-href or id-ref multi-references, duplicates co-referenced data in the XML output and automatically breaks data structure cycles to prevent infinite serialization loops, ignores id and href/ref reference attributes in messages received, this flag is the opposite of SOAP_XML_GRAPH More... | |
#define | SOAP_XML_GRAPH 0x00020000 |
soap_mode XML input/output flag value to serialize C/C++ (cyclic) data structures in XML with id-ref references for co-referenced data and to accurately serialize data structure cycles, accept id-ref references in XML received to (re)construct the C/C++ (co-referenced and cyclic) data structures, this flag is the opposite of SOAP_XML_TREE More... | |
#define | SOAP_XML_NIL 0x00040000 |
soap_mode XML output flag value to serialize C/C++ NULL pointers in XML as elements with attribute xsi:nil="true" More... | |
#define | SOAP_XML_NOTYPE 0x00080000 |
soap_mode XML output flag value to serialize C/C++ data structures in XML without xsi:type attributes, even when this may be necessary to distinguish base from derived data types More... | |
#define | SOAP_XML_DOM 0x10000000 |
soap_mode XML input/output flag value to enable DOM node tree construction of the XML received and sent, requires compile-time flag WITH_DOM More... | |
#define | SOAP_DOM_ASIS 0x00400000 |
soap_mode DOM output flag value to disable reformatting of the DOM node tree in XML, displaying the DOM in XML exactly as is More... | |
#define | SOAP_DOM_NODE 0x00200000 |
soap_mode DOM input flag value to always attempt to deserialize embedded serializable C/C++ data structures into the DOM node tree based on matching element name to C/C++ type names and by matching xsi:type attributes when present, the opposite of SOAP_DOM_TREE More... | |
#define | SOAP_DOM_TREE 0x00100000 |
soap_mode DOM input flag value to ignore id and xsi:type XML attributes and disables deserialization of serializable C/C++ data structures into the DOM node tree, the opposite of SOAP_DOM_NODE More... | |
#define | SOAP_C_NOIOB 0x01000000 |
soap_mode input flag value to ignore array items that are out of bounds when deserializing fixed-size arrays, instead of producing SOAP_IOB errors More... | |
#define | SOAP_C_UTFSTRING 0x02000000 |
soap_mode input/output flag value to serialize and deserialize 8-bit C/C++ strings containing UTF-8 encoded Unicode characters More... | |
#define | SOAP_C_MBSTRING 0x04000000 |
soap_mode input/output flag value to enable multibyte character support for 8-bit character strings with wctomb and mbtowc using the current locale More... | |
#define | SOAP_C_NILSTRING 0x08000000 |
soap_mode input/output flag value to serialize empty strings as elements with attribute xsi:nil="true" More... | |
#define | SOAP_MIME_POSTCHECK 0x40000000 |
soap_mode MIME input flag value to check and process additional MIME attachments (for internal use only) More... | |
#define | SOAP_SEC_WSUID 0x80000000 |
soap_mode SEC output flag value to add wsu:Id attributes to signed parts of messages sent and signed with WS-Security (for internal use only) More... | |
Typedefs | |
typedef int | soap_mode |
The soap_mode flags to initialize the soap context, flags can be combined with | (bit-wise or) More... | |
This module defines the SOAP_MACRO
run-time soap_mode
flags to set the engine mode.
This module defines the following soap_mode
flags:
SOAP_C_MBSTRING
SOAP_C_NILSTRING
SOAP_C_NOIOB
SOAP_C_UTFSTRING
SOAP_DOM_ASIS
SOAP_DOM_NODE
SOAP_DOM_TREE
SOAP_ENC
SOAP_ENC_DIME
SOAP_ENC_LATIN
SOAP_ENC_MIME
SOAP_ENC_MTOM
SOAP_ENC_PLAIN
SOAP_ENC_SSL
SOAP_ENC_XML
SOAP_ENC_ZLIB
SOAP_IO
SOAP_IO_BUFFER
SOAP_IO_CHUNK
SOAP_IO_FLUSH
SOAP_IO_KEEPALIVE
SOAP_IO_LENGTH
SOAP_IO_STORE
SOAP_IO_UDP
SOAP_MIME_POSTCHECK
SOAP_SEC_WSUID
SOAP_XML_CANONICAL
SOAP_XML_CANONICAL_NA
SOAP_XML_DEFAULTNS
SOAP_XML_DOM
SOAP_XML_GRAPH
SOAP_XML_IGNORENS
SOAP_XML_INDENT
SOAP_XML_NIL
SOAP_XML_NOTYPE
SOAP_XML_STRICT
SOAP_XML_TREE
#define SOAP_C_MBSTRING 0x04000000 |
soap_mode
input/output flag value to enable multibyte character support for 8-bit character strings with wctomb
and mbtowc
using the current locale
This flag requires macros HAVE_WCTOMB
and HAVE_MBTOWC
to be defined. Otherwise, this flag has no effect.
wctomb
and mbtowc
functions are not thread safe. It is recommended to use SOAP_C_UTFSTRING
instead of SOAP_C_MBSTRING
. SOAP_C_UTFSTRING
idoes not depend on the current locale.SOAP_C_UTFSTRING
. #define SOAP_C_NILSTRING 0x08000000 |
soap_mode
input/output flag value to serialize empty strings as elements with attribute xsi:nil="true"
#define SOAP_C_NOIOB 0x01000000 |
soap_mode
input flag value to ignore array items that are out of bounds when deserializing fixed-size arrays, instead of producing SOAP_IOB
errors
#define SOAP_C_UTFSTRING 0x02000000 |
soap_mode
input/output flag value to serialize and deserialize 8-bit C/C++ strings containing UTF-8 encoded Unicode characters
#define SOAP_DOM_ASIS 0x00400000 |
soap_mode
DOM output flag value to disable reformatting of the DOM node tree in XML, displaying the DOM in XML exactly as is
This example requires the soapC.cpp source code generated with soapcpp2 from gsoap/import/dom.h
as (imported) input in order to use soap_new_xsd__anyType
and soap_write_xsd__anyType
.
SOAP_DOM_NODE
, SOAP_DOM_TREE
and the gSOAP XML DOM API documentation. #define SOAP_DOM_NODE 0x00200000 |
soap_mode
DOM input flag value to always attempt to deserialize embedded serializable C/C++ data structures into the DOM node tree based on matching element name to C/C++ type names and by matching xsi:type
attributes when present, the opposite of SOAP_DOM_TREE
This example requires the soapC.cpp source code generated with soapcpp2 from gsoap/import/dom.h
as (imported) input in order to use soap_new_xsd__anyType
and soap_write_xsd__anyType
.
SOAP_DOM_ASIS
, SOAP_DOM_TREE
and the gSOAP XML DOM API documentation. #define SOAP_DOM_TREE 0x00100000 |
soap_mode
DOM input flag value to ignore id
and xsi:type
XML attributes and disables deserialization of serializable C/C++ data structures into the DOM node tree, the opposite of SOAP_DOM_NODE
This example requires the soapC.cpp source code generated with soapcpp2 from gsoap/import/dom.h
as (imported) input in order to use soap_new_xsd__anyType
, soap_read_xsd__anyType
and soap_write_xsd__anyType
.
SOAP_DOM_ASIS
, SOAP_DOM_NODE
and the gSOAP XML DOM API documentation. #define SOAP_ENC 0x00000FFF |
soap_mode
ENC flags mask (for internal use only)
#define SOAP_ENC_DIME 0x00000080 |
soap_mode
ENC output flag value to enable DIME attachments (for internal use only)
The SOAP_ENC_DIME
flag is automatically set when attachments are present in the message to be sent or when a message with DIME attachments is received and does not need to be set explicitly.
DIME attachment sizes are limited to SOAP_MAXDIMESIZE
, which is a compile-time constant that can be changed.
SOAP_ENC_MIME
, SOAP_ENC_DIME
, DIME attachments. #define SOAP_ENC_LATIN 0x00000020 |
soap_mode
ENC input flag value to receive ISO-8859-1 encoded messages (automatically detected when receiving XML)
#define SOAP_ENC_MIME 0x00000100 |
soap_mode
ENC output flag value to enable MIME attachments in messages to be sent, receiving is automatic
The MTOM specification requires SOAP 1.2.
To enable MIME on the fly to return MIME attachments in the message sent:
To disable:
SOAP_ENC_DIME
, SOAP_ENC_MTOM
, MIME attachments. #define SOAP_ENC_MTOM 0x00000200 |
soap_mode
ENC output flag value to enable MTOM XOP attachments in messages to be sent, receiving is automatic
To enable MTOM on the fly to return MTOM attachments in the message sent:
To disable:
SOAP_ENC_DIME
, SOAP_ENC_MIME
, MTOM attachments. #define SOAP_ENC_PLAIN 0x00000040 |
soap_mode
ENC input/output flag value to omit the HTTP headers from messages sent and disable detection and parsing of HTTP headers in messages received
#define SOAP_ENC_SSL 0x00000800 |
soap_mode
ENC input/output flag value to enable TLS/SSL, e.g. HTTPS, requires OpenSSL, GNUTLS or WolfSSL enabled with compile-time flag WITH_OPENSSL
, WITH_GNUTLS
, or WITH_WOLFSSL
(flag for internal use only)
#define SOAP_ENC_XML |
soap_mode
ENC input/output flag (deprecated, same as SOAP_ENC_PLAIN
for backward compatibility)
#define SOAP_ENC_ZLIB 0x00000400 |
#define SOAP_IO 0x00000003 |
soap_mode
IO flags mask to check for SOAP_IO_FLUSH
, SOAP_IO_BUFFER
, SOAP_IO_STORE
, SOAP_IO_CHUNK
(for internal use only)
#define SOAP_IO_BUFFER 0x00000001 |
soap_mode
IO output flag value to buffer the message sent in packets of size SOAP_BUFLEN
, do not combine this flag with SOAP_IO_FLUSH
, SOAP_IO_STORE
, SOAP_IO_CHUNK
#define SOAP_IO_CHUNK 0x00000003 |
soap_mode
IO output flag value to send HTTP chunked messages, buffers the message in packets of size SOAP_BUFLEN
, do not combine this flag with SOAP_IO_FLUSH
, SOAP_IO_BUFFER
, SOAP_IO_STORE
SOAP_IO_CHUNK
is preferable to use compared to SOAP_IO_STORE
, because SOAP_IO_STORE
requires more memory and increases response time latency due to the overhead of storing the entire message before transmission.#define SOAP_IO_FLUSH 0x00000000 |
soap_mode
IO output flag value to flush the message sent immediately without buffering (the default mode), do not combine this flag with SOAP_IO_BUFFER
, SOAP_IO_STORE
, SOAP_IO_CHUNK
#define SOAP_IO_KEEPALIVE 0x00000010 |
soap_mode
IO input and output flag value to keep the socket connection alive for SOAP_MAXKEEPALIVE
message exchanges per connection (100 by default), enabling HTTP keep-alive connection persistence
This flag activates HTTP connection persistence for client and server applications. The input and output mode flags should both be set to enable HTTP connection persistance.
Client applications can request HTTP persistance with this flag enabled and may indicate the end of a sequence of messages by disabling this flag immediately prior to the last message exchange with a server, which allows the server to gracefully close the connection. If the client does not disable this flag, the server will keep the connection open until the connection is reset or times out.
Stand-alone server applications should be multi-threaded to use this flag, because iterative servers cannot serve other clients while connected to one client. Stand-alone multi-threaded server applications should also use timeouts and limit the number of messages exchanged in a keep-alive connection with soap::max_keep_alive
, which is set to SOAP_MAXKEEPALIVE
(the value is 100 by default).
SOAP_IO_KEEPALIVE
with CGI and FastCGI applications.#define SOAP_IO_LENGTH 0x00000008 |
soap_mode
IO output flag value to calculate message length when sending a message without transmission (for internal use only)
soap_begin_count
, soap_end_count
. #define SOAP_IO_STORE 0x00000002 |
soap_mode
IO output flag value to store messages temporarily before transmission, e.g. to determine message length for transmission over HTTP instead of chunking or two-phase message sends, do not combine this flag with SOAP_IO_FLUSH
, SOAP_IO_BUFFER
, SOAP_IO_CHUNK
When set as input-mode flag, forces all messages sent to be temporarily stored before transmission. When set as output-mode flag, forces only the next message to be temporarily stored before transmission.
SOAP_IO_CHUNK
is preferable over SOAP_IO_STORE
, because SOAP_IO_STORE
requires more memory and increases response time latency due to the overhead of storing the entire message before transmission.#define SOAP_IO_UDP 0x00000004 |
soap_mode
IO input/output flag value to use UDP datagrams, message size is limited to UDP packet size
#define SOAP_MIME_POSTCHECK 0x40000000 |
soap_mode
MIME input flag value to check and process additional MIME attachments (for internal use only)
Used by soap_post_check_mime_attachments
and soap_check_mime_attachments
.
#define SOAP_SEC_WSUID 0x80000000 |
soap_mode
SEC output flag value to add wsu:Id attributes to signed parts of messages sent and signed with WS-Security (for internal use only)
#define SOAP_XML_CANONICAL 0x00010000 |
soap_mode
XML output flag value to send XML messages in exclusive canonical format as per W3C XML C14N standards, use with the soap::c14ninclude
and soap::c14nexclude
strings to control the prefixes that are subject to canonicalization by including or excluding specific prefixes
This flag changes the following example XML fragment:
into the following exclusive C14N fragment:
Sending XML is slowed down by canonicalization. Furthermore, messages may or may not be reduced in size, depending on the additional xmlns
bindings generated for local element scopes. Consider for example the following message:
The message is larger when canonicalized:
SOAP_XML_CANONICAL_NA
mode flag omits QName canonicalization.This example XML fragment is canonicalized with SOAP_XML_CANONICAL
as:
The example XML fragment is canonicalized with SOAP_XML_CANONICAL | SOAP_XML_CANONICAL_NA
as per W3C XML exclusive C14N as:
Note that prefix a
in "a:Bar"
is now bound to "http://www.w3.org"
captured by the outer xmlns:a="http://www.w3.org"
. XML libraries may rename prefixes to prevent capturing. The gSOAP serializers do not reuse prefixes, meaning that this problem cannot occur. However, this does not prevent the namespace prefix to become lost when exclusive C14N is used and namespace bindings are removed because prefixes are not visibly utilized.
SOAP_XML_CANONICAL_NA
. #define SOAP_XML_CANONICAL_NA 0x00800000 |
soap_mode
XML output flag value to send XML messages in exclusive canonical format as per W3C XML C14N standards, use with the soap::c14ninclude
and soap::c14nexclude
strings to control the prefixes that are subject to canonicalization by including or excluding specific prefixes
Must be used in combination with SOAP_XML_CANONICAL_NA
to emit XML in canonical form such that namespace prefixes in QName values are ignored. Recommended is to only use SOAP_XML_CANONICAL
which is more secure, see the SOAP_XML_CANONICAL
notes.
SOAP_XML_CANONICAL
. #define SOAP_XML_DEFAULTNS 0x00008000 |
soap_mode
XML output flag value to send XML messages with XML default namespaces for elements instead of namespace-qualified elements
This flag changes the following example XML fragment:
into the following fragment with default namespaces for XML elements:
Qualified XML element names are replaced by unqualified element names. Qualified XML attribute names are not affected and require a prefix with an XML namespace binding. The SOAP_XML_DEFAULTNS
mode flag affects serialization performance somewhat negatively. To produce normalized cleaner XML use the SOAP_XML_CANONICAL
mode flag, but this further negatively affects serialization performance.
WITH_NOEMPTYNAMESPACES
, SOAP_XML_CANONICAL
. #define SOAP_XML_DOM 0x10000000 |
soap_mode
XML input/output flag value to enable DOM node tree construction of the XML received and sent, requires compile-time flag WITH_DOM
#define SOAP_XML_GRAPH 0x00020000 |
soap_mode
XML input/output flag value to serialize C/C++ (cyclic) data structures in XML with id-ref references for co-referenced data and to accurately serialize data structure cycles, accept id-ref references in XML received to (re)construct the C/C++ (co-referenced and cyclic) data structures, this flag is the opposite of SOAP_XML_TREE
WITH_NOIDREF
.SOAP_XML_TREE
. #define SOAP_XML_IGNORENS 0x00004000 |
soap_mode
XML input flag value to ignore XML namespaces in messages received
#define SOAP_XML_INDENT 0x00002000 |
soap_mode
XML output flag value to enable XML (and JSON) message indentation in messages sent
#define SOAP_XML_NIL 0x00040000 |
soap_mode
XML output flag value to serialize C/C++ NULL pointers in XML as elements with attribute xsi:nil="true"
#define SOAP_XML_NOTYPE 0x00080000 |
soap_mode
XML output flag value to serialize C/C++ data structures in XML without xsi:type
attributes, even when this may be necessary to distinguish base from derived data types
#define SOAP_XML_STRICT 0x00001000 |
soap_mode
XML input flag value to enable strict XML validation of messages received
Alternatively, use soapcpp2 -s
to generate stub and skeleton functions that perform strict XML validation checks.
#define SOAP_XML_TREE 0x00020000 |
soap_mode
XML input/output flag value to serialize C/C++ data structures as XML trees without id-href or id-ref multi-references, duplicates co-referenced data in the XML output and automatically breaks data structure cycles to prevent infinite serialization loops, ignores id and href/ref reference attributes in messages received, this flag is the opposite of SOAP_XML_GRAPH
WITH_NOIDREF
.SOAP_XML_GRAPH
, WITH_NOIDREF
. typedef int soap_mode |
The soap_mode
flags to initialize the soap
context, flags can be combined with |
(bit-wise or)
The soap_mode
flags are:
SOAP_C_MBSTRING
SOAP_C_NILSTRING
SOAP_C_NOIOB
SOAP_C_UTFSTRING
SOAP_DOM_ASIS
SOAP_DOM_NODE
SOAP_DOM_TREE
SOAP_ENC
SOAP_ENC_DIME
SOAP_ENC_LATIN
SOAP_ENC_MIME
SOAP_ENC_MTOM
SOAP_ENC_PLAIN
SOAP_ENC_SSL
SOAP_ENC_XML
SOAP_ENC_ZLIB
SOAP_IO
SOAP_IO_BUFFER
SOAP_IO_CHUNK
SOAP_IO_FLUSH
SOAP_IO_KEEPALIVE
SOAP_IO_LENGTH
SOAP_IO_STORE
SOAP_IO_UDP
SOAP_MIME_POSTCHECK
SOAP_SEC_WSUID
SOAP_XML_CANONICAL
SOAP_XML_CANONICAL_NA
SOAP_XML_DEFAULTNS
SOAP_XML_DOM
SOAP_XML_GRAPH
SOAP_XML_IGNORENS
SOAP_XML_INDENT
SOAP_XML_NIL
SOAP_XML_NOTYPE
SOAP_XML_STRICT
SOAP_XML_TREE