--- /srv/reproducible-results/rbuild-debian/r-b-build.9xE4bAyM/b1/gsoap_2.8.104-3_arm64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.9xE4bAyM/b2/gsoap_2.8.104-3_arm64.changes ├── Files │ @@ -1,7 +1,7 @@ │ │ 961afd9d051e2533b68a82735ac6ed43 6207180 debug optional gsoap-dbgsym_2.8.104-3_arm64.deb │ - caabd438a59305a49fbd7f046e490d73 12593248 doc optional gsoap-doc_2.8.104-3_all.deb │ + a671e7e02d1ea2a4e007e6dcc90b7c75 12593200 doc optional gsoap-doc_2.8.104-3_all.deb │ 2dad25441fe959b61875423a2b18d369 1409252 devel optional gsoap_2.8.104-3_arm64.deb │ 5d99ba78a590eaa7e7729caa3009f7c5 1656048 debug optional libgsoap-2.8.104-dbgsym_2.8.104-3_arm64.deb │ 5c5f7c246a08e3017c982769a3b644fa 275316 libs optional libgsoap-2.8.104_2.8.104-3_arm64.deb │ 9987f06b6bf1b661c7e16f876fb7bc39 287912 libdevel optional libgsoap-dev_2.8.104-3_arm64.deb ├── gsoap-doc_2.8.104-3_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2021-03-08 13:06:23.000000 debian-binary │ │ --rw-r--r-- 0 0 0 46976 2021-03-08 13:06:23.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 12546080 2021-03-08 13:06:23.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 46988 2021-03-08 13:06:23.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 12546020 2021-03-08 13:06:23.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -355,15 +355,15 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5162 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__soap.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 133290 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__ssl.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2377 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__ssl.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 74502 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__threads.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1922 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__threads.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 126767 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__with.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3411 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/group__group__with.js │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1834652 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/index.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1834626 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/index.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2872 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/index_8md.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 175457 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/jquery.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3222 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/menu.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5236 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/menudata.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10253 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/modules.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1709 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/modules.js │ │ │ │ -rw-r--r-- 0 root (0) root (0) 153 2021-03-08 13:06:23.000000 ./usr/share/doc/gsoap-doc/guide/html/nav_f.png │ │ │ ├── ./usr/share/doc/gsoap-doc/guide/html/index.html │ │ │ │ @@ -56951,57716 +56951,57715 @@ │ │ │ │ 000de760: 6c69 7374 3c2f 7370 616e 3e20 3c73 7061 list id="1& │ │ │ │ 000de7b0: 7175 6f74 3b3c 2f73 7061 6e3e 3c73 7061 quot;␐ │ │ │ │ -000de7e0: 6366 3c2f 7370 616e 3e3c 2f64 6976 3e0a cf. │ │ │ │ +000de7d0: 6974 6572 616c 223e 4026 2378 3234 3133 iteral">@␓ │ │ │ │ +000de7e0: 3bb5 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;.. │ │ │ │ 000de7f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
&# │ │ │ │ -000de820: 7832 3431 303b 6366 2623 7832 3430 323b x2410;cf␂ │ │ │ │ -000de830: abaa 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
. │ │ │ │ -000de840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
&# │ │ │ │ -000de870: 7832 3431 303b 6366 2623 7832 3430 323b x2410;cf␂ │ │ │ │ -000de880: abaa 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
. │ │ │ │ -000de890: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
&# │ │ │ │ -000de8c0: 7832 3431 303b 6366 2623 7832 3430 323b x2410;cf␂ │ │ │ │ -000de8d0: abaa 3c2f 7370 616e 3e3c 2f64 6976 3e0a ..
. │ │ │ │ -000de8e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
│ │ │ │ -000de910: 2020 266c 743b 6e65 7874 2068 7265 663d <next href= │ │ │ │ -000de920: 2671 756f 743b 3c2f 7370 616e 3e23 3126 "#1& │ │ │ │ -000de930: 7175 6f74 3b2f 2667 743b 203c 2f64 6976 quot;/>
.
</next │ │ │ │ -000de980: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.
&l │ │ │ │ -000de9a0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns: │ │ │ │ -000de9c0: 6c69 7374 3c2f 7370 616e 3e26 6774 3b3c list>< │ │ │ │ -000de9d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

In case m │ │ │ │ -000dea00: 756c 7469 2d72 6566 6572 656e 6365 6420 ulti-referenced │ │ │ │ -000dea10: 6461 7461 2069 7320 7265 6365 6976 6564 data is received │ │ │ │ -000dea20: 2074 6861 7420 2264 6f65 7320 6e6f 7420 that "does not │ │ │ │ -000dea30: 6669 7420 696e 2061 2070 6f69 6e74 6572 fit in a pointer │ │ │ │ -000dea40: 2d62 6173 6564 2073 7472 7563 7475 7265 -based structure │ │ │ │ -000dea50: 222c 2074 6865 2064 6174 6120 6973 2063 ", the data is c │ │ │ │ -000dea60: 6f70 6965 642e 2046 6f72 2065 7861 6d70 opied. For examp │ │ │ │ -000dea70: 6c65 2c20 7468 6520 666f 6c6c 6f77 696e le, the followin │ │ │ │ -000dea80: 6720 7477 6f20 7374 7275 6374 7320 6172 g two structs ar │ │ │ │ -000dea90: 6520 7369 6d69 6c61 722c 2065 7863 6570 e similar, excep │ │ │ │ -000deaa0: 7420 7468 6174 2074 6865 2066 6972 7374 t that the first │ │ │ │ -000deab0: 2075 7365 7320 706f 696e 7465 722d 6261 uses pointer-ba │ │ │ │ -000deac0: 7365 6420 6d65 6d62 6572 7320 7768 696c sed members whil │ │ │ │ -000dead0: 6520 7468 6520 6f74 6865 7220 7573 6573 e the other uses │ │ │ │ -000deae0: 206e 6f6e 2d70 6f69 6e74 6572 2d62 6173 non-pointer-bas │ │ │ │ -000deaf0: 6564 206d 656d 6265 7273 3a3c 2f70 3e0a ed members:

. │ │ │ │ -000deb00: 3c64 6976 2063 6c61 7373 3d22 6672 6167
ty │ │ │ │ -000deb40: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef long xsd__int; .
. │ │ │ │ -000debb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct ns__record < │ │ │ │ -000debe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ -000dec00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
xsd__int * │ │ │ │ -000dec20: 613b 203c 2f64 6976 3e0a 3c64 6976 2063 a;
.
│ │ │ │ -000dec40: 7873 645f 5f69 6e74 202a 623b 203c 2f64 xsd__int *b; .
} P;
.
.
struct ns__record.
{
. │ │ │ │ -000ded00: 2020 2078 7364 5f5f 696e 7420 613b 203c xsd__int a; < │ │ │ │ -000ded10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
xsd_ │ │ │ │ -000ded30: 5f69 6e74 2062 3b20 3c2f 6469 763e 0a3c _int b;
.< │ │ │ │ -000ded40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000ded50: 3e7d 2052 3b20 3c2f 6469 763e 0a3c 6469 >} R;
. │ │ │ │ -000ded70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int ma │ │ │ │ -000dedb0: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
.
{.
P.a = & │ │ │ │ -000dedf0: 616d 703b 6e3b 203c 2f64 6976 3e0a 3c64 amp;n;
. │ │ │ │ -000dee10: 2020 502e 6220 3d20 2661 6d70 3b6e 3b20 P.b = &n; │ │ │ │ -000dee20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
... < │ │ │ │ -000dee40: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000dee50: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
}
.< │ │ │ │ -000dee80: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

Since b │ │ │ │ -000deea0: 6f74 6820 3c63 6f64 653e 613c 2f63 6f64 oth a and b members of │ │ │ │ -000deed0: 203c 636f 6465 3e50 3c2f 636f 6465 3e20 P │ │ │ │ -000deee0: 706f 696e 7420 746f 2074 6865 2073 616d point to the sam │ │ │ │ -000deef0: 6520 696e 7465 6765 722c 2074 6865 2073 e integer, the s │ │ │ │ -000def00: 6572 6961 6c69 7a61 7469 6f6e 206f 6620 erialization of │ │ │ │ -000def10: 3c63 6f64 653e 503c 2f63 6f64 653e 2070 P p │ │ │ │ -000def20: 726f 6475 6365 7320 6120 6d75 6c74 692d roduces a multi- │ │ │ │ -000def30: 7265 6665 7265 6e63 6520 696e 2053 4f41 reference in SOA │ │ │ │ -000def40: 5020 312e 3120 5250 4320 656e 636f 6469 P 1.1 RPC encodi │ │ │ │ -000def50: 6e67 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ng:

.
│ │ │ │ -000def80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
< │ │ │ │ -000defb0: 6e73 3a72 6563 6f72 643c 2f73 7061 6e3e ns:record │ │ │ │ -000defc0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.
│ │ │ │ -000defe0: 266c 743b 3c73 7061 6e20 636c 6173 733d <a< │ │ │ │ -000df000: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> hre │ │ │ │ -000df020: 663c 2f73 7061 6e3e 3d3c 7370 616e 2063 f="#1&qu │ │ │ │ -000df050: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> │ │ │ │ -000df060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<< │ │ │ │ -000df080: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000df090: 6f72 6474 7970 6522 3e62 3c2f 7370 616e ordtype">b href= │ │ │ │ -000df0e0: 2671 756f 743b 2331 2671 756f 743b 3c2f "#1"/>
.
</ns:record>
.< │ │ │ │ -000df150: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000df160: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><i │ │ │ │ -000df180: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d i │ │ │ │ -000df1a0: 643c 2f73 7061 6e3e 3d3c 7370 616e 2063 d="1&quo │ │ │ │ -000df1d0: 743b 3c2f 7370 616e 3e26 6774 3b31 3233 t;>123 │ │ │ │ -000df1e0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </i │ │ │ │ -000df200: 643c 2f73 7061 6e3e 2667 743b 3c2f 6469 d>.

The deserial │ │ │ │ -000df240: 697a 6174 696f 6e20 6f66 2074 6865 2063 ization of the c │ │ │ │ -000df250: 6f6e 7465 6e74 2069 6e20 7468 6520 3c63 ontent in the R dat │ │ │ │ -000df270: 6120 7374 7275 6374 7572 6520 7468 6174 a structure that │ │ │ │ -000df280: 2064 6f65 7320 6e6f 7420 7573 6520 706f does not use po │ │ │ │ -000df290: 696e 7465 7273 2074 6f20 696e 7465 6765 inters to intege │ │ │ │ -000df2a0: 7273 2072 6573 756c 7473 2069 6e20 6120 rs results in a │ │ │ │ -000df2b0: 636f 7079 206f 6620 6561 6368 206d 756c copy of each mul │ │ │ │ -000df2c0: 7469 2d72 6566 6572 656e 6365 2069 6e74 ti-reference int │ │ │ │ -000df2d0: 6567 6572 2e20 4e6f 7465 2074 6861 7420 eger. Note that │ │ │ │ -000df2e0: 7468 6520 7477 6f20 7374 7275 6374 7320 the two structs │ │ │ │ -000df2f0: 7265 7365 6d62 6c65 2074 6865 2073 616d resemble the sam │ │ │ │ -000df300: 6520 584d 4c20 6461 7461 2074 7970 6520 e XML data type │ │ │ │ -000df310: 6265 6361 7573 6520 7468 6520 7472 6169 because the trai │ │ │ │ -000df320: 6c69 6e67 2075 6e64 6572 7363 6f72 6520 ling underscore │ │ │ │ -000df330: 7769 6c6c 2062 6520 6967 6e6f 7265 6420 will be ignored │ │ │ │ -000df340: 696e 2058 4d4c 2065 6e63 6f64 696e 6720 in XML encoding │ │ │ │ -000df350: 616e 6420 6465 636f 6469 6e67 2e3c 2f70 and decoding.

.

.... Back to ta │ │ │ │ -000df380: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ -000df390: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

.

.NUL │ │ │ │ -000df3c0: 4c20 706f 696e 7465 7273 2061 6e64 206e L pointers and n │ │ │ │ -000df3d0: 696c 2065 6c65 6d65 6e74 733c 2f68 333e il elements

│ │ │ │ -000df3e0: 0a3c 703e 4120 4e55 4c4c 2070 6f69 6e74 .

A NULL point │ │ │ │ -000df3f0: 6572 2069 7320 6e6f 7420 7365 7269 616c er is not serial │ │ │ │ -000df400: 697a 6564 2c20 756e 6c65 7373 2074 6865 ized, unless the │ │ │ │ -000df410: 2070 6f69 6e74 6572 206d 656d 6265 7220 pointer member │ │ │ │ -000df420: 6f66 2061 2073 7472 7563 7420 6f72 2063 of a struct or c │ │ │ │ -000df430: 6c61 7373 2069 7320 6465 636c 6172 6564 lass is declared │ │ │ │ -000df440: 2069 6e20 7468 6520 696e 7465 7266 6163 in the interfac │ │ │ │ -000df450: 6520 6865 6164 6572 2066 696c 6520 6173 e header file as │ │ │ │ -000df460: 206e 696c 6c61 626c 6520 7769 7468 203c nillable with < │ │ │ │ -000df470: 636f 6465 3e6e 756c 6c70 7472 3c2f 636f code>nullptr or in the un │ │ │ │ -000df490: 6c69 6b65 6c79 2063 6173 6520 7468 6520 likely case the │ │ │ │ -000df4a0: 706f 696e 7465 7220 6974 7365 6c66 2069 pointer itself i │ │ │ │ -000df4b0: 7320 706f 696e 7465 6420 746f 2062 7920 s pointed to by │ │ │ │ -000df4c0: 616e 6f74 6865 7220 706f 696e 7465 7220 another pointer │ │ │ │ -000df4d0: 2862 7574 2073 6565 2053 6563 7469 6f6e (but see Section │ │ │ │ -000df4e0: 203c 6120 636c 6173 733d 2265 6c22 2068 Run-time │ │ │ │ -000df510: 666c 6167 733c 2f61 3e20 746f 2063 6f6e flags to con │ │ │ │ -000df520: 7472 6f6c 2074 6865 2073 6572 6961 6c69 trol the seriali │ │ │ │ -000df530: 7a61 7469 6f6e 206f 6620 4e55 4c4c 7329 zation of NULLs) │ │ │ │ -000df540: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.

struct X │ │ │ │ -000df5a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{
.
int *p; │ │ │ │ -000df600: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int **q;
.< │ │ │ │ -000df650: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000df660: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i │ │ │ │ -000df680: 6e74 3c2f 7370 616e 3e20 2a72 203c 7370 nt *r nullptr 1;
.
}.

T │ │ │ │ -000df6f0: 6865 2074 7970 6573 2073 6563 7469 6f6e he types section │ │ │ │ -000df700: 206f 6620 6120 5753 444c 2064 6573 6372 of a WSDL descr │ │ │ │ -000df710: 6970 7469 6f6e 2063 6f6e 7461 696e 7320 iption contains │ │ │ │ -000df720: 696e 666f 726d 6174 696f 6e20 6f6e 2074 information on t │ │ │ │ -000df730: 6865 2022 6e69 6c6c 6162 696c 6974 7922 he "nillability" │ │ │ │ -000df740: 206f 6620 6461 7461 2c20 7768 6963 6820 of data, which │ │ │ │ -000df750: 6973 2064 6563 6c61 7265 6420 6173 203c is declared as < │ │ │ │ -000df760: 636f 6465 3e6e 756c 6c70 7472 3c2f 636f code>nullptr members wher │ │ │ │ -000df780: 6520 7468 6520 3c63 6f64 653e 313c 2f63 e the 1 indicates t │ │ │ │ -000df7a0: 6861 7420 7468 6520 6d65 6d62 6572 2069 hat the member i │ │ │ │ -000df7b0: 7320 7265 7175 6972 6564 2028 3c65 6d3e s required ( │ │ │ │ -000df7c0: 3c63 6f64 653e 6d69 6e4f 6363 7572 733c minOccurs< │ │ │ │ -000df7d0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ -000df7e0: 3c65 6d3e 3c63 6f64 653e 6d61 784f 6363 maxOcc │ │ │ │ -000df7f0: 7572 733c 2f63 6f64 653e 3c2f 656d 3e20 urs │ │ │ │ -000df800: 6172 6520 3120 7365 7420 7769 7468 203c are 1 set with < │ │ │ │ -000df810: 636f 6465 3e31 3a31 3c2f 636f 6465 3e20 code>1:1 │ │ │ │ -000df820: 6f72 2073 696d 706c 7920 3c63 6f64 653e or simply │ │ │ │ -000df830: 313c 2f63 6f64 653e 292e 3c2f 703e 0a3c 1).

.< │ │ │ │ -000df840: 703e 5375 7070 6f73 6520 706f 696e 7465 p>Suppose pointe │ │ │ │ -000df850: 7220 3c63 6f64 653e 713c 2f63 6f64 653e r q │ │ │ │ -000df860: 2070 6f69 6e74 7320 746f 2070 6f69 6e74 points to point │ │ │ │ -000df870: 6572 203c 636f 6465 3e70 3c2f 636f 6465 er p and suppose p and │ │ │ │ -000df8a0: 203c 636f 6465 3e72 3c2f 636f 6465 3e20 r │ │ │ │ -000df8b0: 6172 6520 4e55 4c4c 2e20 496e 2074 6861 are NULL. In tha │ │ │ │ -000df8c0: 7420 6361 7365 2074 6865 203c 636f 6465 t case the X struct │ │ │ │ -000df8e0: 2069 7320 7365 7269 616c 697a 6564 2077 is serialized w │ │ │ │ -000df8f0: 6974 6820 3c63 6f64 653e 2353 4f41 505f ith #SOAP_ │ │ │ │ -000df900: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH │ │ │ │ -000df910: 2061 733a 3c2f 703e 0a3c 6469 7620 636c as:

.
<X>.
<p < │ │ │ │ -000df9c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000df9d0: 6f72 6422 3e69 643c 2f73 7061 6e3e 3d3c ord">id=< │ │ │ │ -000df9e0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000df9f0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000dfa00: 3b31 2671 756f 743b 3c2f 7370 616e 3e20 ;1" │ │ │ │ -000dfa10: 3c73 7061 6e20 636c 6173 733d 226b 6579 xsi:nil="true" │ │ │ │ -000dfa60: 3b3c 2f73 7061 6e3e 2f26 6774 3b3c 2f64 ;/>.
<q < │ │ │ │ -000dfab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000dfac0: 6f72 6422 3e72 6566 3c2f 7370 616e 3e3d ord">ref= │ │ │ │ -000dfad0: 3c73 7061 6e20 636c 6173 733d 2273 7472 P.e& │ │ │ │ -000dfaf0: 2378 3234 3032 3b3c 2f73 7061 6e3e 3c2f #x2402;.
<r id=&q │ │ │ │ -000dfb40: 756f 743b 3c2f 7370 616e 3e31 3c73 7061 uot;1" x │ │ │ │ -000dfb70: 7369 3a6e 696c 3d26 7175 6f74 3b3c 2f73 si:nil="true"/> │ │ │ │ -000dfbb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</X │ │ │ │ -000dfbf0: 2667 743b 3c2f 6469 763e 0a3c 2f64 6976 >
.
< │ │ │ │ +000de9e0: 703e 496e 2063 6173 6520 6d75 6c74 692d p>In case multi- │ │ │ │ +000de9f0: 7265 6665 7265 6e63 6564 2064 6174 6120 referenced data │ │ │ │ +000dea00: 6973 2072 6563 6569 7665 6420 7468 6174 is received that │ │ │ │ +000dea10: 2022 646f 6573 206e 6f74 2066 6974 2069 "does not fit i │ │ │ │ +000dea20: 6e20 6120 706f 696e 7465 722d 6261 7365 n a pointer-base │ │ │ │ +000dea30: 6420 7374 7275 6374 7572 6522 2c20 7468 d structure", th │ │ │ │ +000dea40: 6520 6461 7461 2069 7320 636f 7069 6564 e data is copied │ │ │ │ +000dea50: 2e20 466f 7220 6578 616d 706c 652c 2074 . For example, t │ │ │ │ +000dea60: 6865 2066 6f6c 6c6f 7769 6e67 2074 776f he following two │ │ │ │ +000dea70: 2073 7472 7563 7473 2061 7265 2073 696d structs are sim │ │ │ │ +000dea80: 696c 6172 2c20 6578 6365 7074 2074 6861 ilar, except tha │ │ │ │ +000dea90: 7420 7468 6520 6669 7273 7420 7573 6573 t the first uses │ │ │ │ +000deaa0: 2070 6f69 6e74 6572 2d62 6173 6564 206d pointer-based m │ │ │ │ +000deab0: 656d 6265 7273 2077 6869 6c65 2074 6865 embers while the │ │ │ │ +000deac0: 206f 7468 6572 2075 7365 7320 6e6f 6e2d other uses non- │ │ │ │ +000dead0: 706f 696e 7465 722d 6261 7365 6420 6d65 pointer-based me │ │ │ │ +000deae0: 6d62 6572 733a 3c2f 703e 0a3c 6469 7620 mbers:

.
typedef │ │ │ │ +000deb30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c long xs │ │ │ │ +000deb60: 645f 5f69 6e74 3b20 3c2f 6469 763e 0a3c d__int;
.< │ │ │ │ +000deb70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000deb80: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
.
struct n │ │ │ │ +000debc0: 735f 5f72 6563 6f72 6420 3c2f 6469 763e s__record
│ │ │ │ +000debd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
│ │ │ │ +000dec00: 2078 7364 5f5f 696e 7420 2a61 3b20 3c2f xsd__int *a; .
xsd__ │ │ │ │ +000dec30: 696e 7420 2a62 3b20 3c2f 6469 763e 0a3c int *b;
.< │ │ │ │ +000dec40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000dec50: 3e7d 2050 3b20 3c2f 6469 763e 0a3c 6469 >} P;
. │ │ │ │ +000dec70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s │ │ │ │ +000deca0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ +000decb0: 5f72 6563 6f72 643c 2f64 6976 3e0a 3c64 _record
. │ │ │ │ +000decd0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
xs │ │ │ │ +000decf0: 645f 5f69 6e74 2061 3b20 3c2f 6469 763e d__int a;
│ │ │ │ +000ded00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
xsd__int │ │ │ │ +000ded20: 623b 203c 2f64 6976 3e0a 3c64 6976 2063 b;
.
} R; │ │ │ │ +000ded40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
.
in │ │ │ │ +000ded90: 743c 2f73 7061 6e3e 206d 6169 6e28 293c t main()< │ │ │ │ +000deda0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ +000dedc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
P.a = &n │ │ │ │ +000dede0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
P.b │ │ │ │ +000dee00: 203d 2026 616d 703b 6e3b 203c 2f64 6976 = &n;
.
... │ │ │ │ +000dee40: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
. │ │ │ │ +000dee50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
.
│ │ │ │ +000dee70: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

T │ │ │ │ +000df220: 6865 2064 6573 6572 6961 6c69 7a61 7469 he deserializati │ │ │ │ +000df230: 6f6e 206f 6620 7468 6520 636f 6e74 656e on of the conten │ │ │ │ +000df240: 7420 696e 2074 6865 203c 636f 6465 3e52 t in the R │ │ │ │ +000df250: 3c2f 636f 6465 3e20 6461 7461 2073 7472 data str │ │ │ │ +000df260: 7563 7475 7265 2074 6861 7420 646f 6573 ucture that does │ │ │ │ +000df270: 206e 6f74 2075 7365 2070 6f69 6e74 6572 not use pointer │ │ │ │ +000df280: 7320 746f 2069 6e74 6567 6572 7320 7265 s to integers re │ │ │ │ +000df290: 7375 6c74 7320 696e 2061 2063 6f70 7920 sults in a copy │ │ │ │ +000df2a0: 6f66 2065 6163 6820 6d75 6c74 692d 7265 of each multi-re │ │ │ │ +000df2b0: 6665 7265 6e63 6520 696e 7465 6765 722e ference integer. │ │ │ │ +000df2c0: 204e 6f74 6520 7468 6174 2074 6865 2074 Note that the t │ │ │ │ +000df2d0: 776f 2073 7472 7563 7473 2072 6573 656d wo structs resem │ │ │ │ +000df2e0: 626c 6520 7468 6520 7361 6d65 2058 4d4c ble the same XML │ │ │ │ +000df2f0: 2064 6174 6120 7479 7065 2062 6563 6175 data type becau │ │ │ │ +000df300: 7365 2074 6865 2074 7261 696c 696e 6720 se the trailing │ │ │ │ +000df310: 756e 6465 7273 636f 7265 2077 696c 6c20 underscore will │ │ │ │ +000df320: 6265 2069 676e 6f72 6564 2069 6e20 584d be ignored in XM │ │ │ │ +000df330: 4c20 656e 636f 6469 6e67 2061 6e64 2064 L encoding and d │ │ │ │ +000df340: 6563 6f64 696e 672e 3c2f 703e 0a3c 703e ecoding.

.

│ │ │ │ +000df350: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +000df370: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

.NULL poi │ │ │ │ +000df3b0: 6e74 6572 7320 616e 6420 6e69 6c20 656c nters and nil el │ │ │ │ +000df3c0: 656d 656e 7473 3c2f 6833 3e0a 3c70 3e41 ements

.

A │ │ │ │ +000df3d0: 204e 554c 4c20 706f 696e 7465 7220 6973 NULL pointer is │ │ │ │ +000df3e0: 206e 6f74 2073 6572 6961 6c69 7a65 642c not serialized, │ │ │ │ +000df3f0: 2075 6e6c 6573 7320 7468 6520 706f 696e unless the poin │ │ │ │ +000df400: 7465 7220 6d65 6d62 6572 206f 6620 6120 ter member of a │ │ │ │ +000df410: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class │ │ │ │ +000df420: 6973 2064 6563 6c61 7265 6420 696e 2074 is declared in t │ │ │ │ +000df430: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea │ │ │ │ +000df440: 6465 7220 6669 6c65 2061 7320 6e69 6c6c der file as nill │ │ │ │ +000df450: 6162 6c65 2077 6974 6820 3c63 6f64 653e able with │ │ │ │ +000df460: 6e75 6c6c 7074 723c 2f63 6f64 653e 206f nullptr o │ │ │ │ +000df470: 7220 696e 2074 6865 2075 6e6c 696b 656c r in the unlikel │ │ │ │ +000df480: 7920 6361 7365 2074 6865 2070 6f69 6e74 y case the point │ │ │ │ +000df490: 6572 2069 7473 656c 6620 6973 2070 6f69 er itself is poi │ │ │ │ +000df4a0: 6e74 6564 2074 6f20 6279 2061 6e6f 7468 nted to by anoth │ │ │ │ +000df4b0: 6572 2070 6f69 6e74 6572 2028 6275 7420 er pointer (but │ │ │ │ +000df4c0: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Run-time flags │ │ │ │ +000df500: 3c2f 613e 2074 6f20 636f 6e74 726f 6c20 to control │ │ │ │ +000df510: 7468 6520 7365 7269 616c 697a 6174 696f the serializatio │ │ │ │ +000df520: 6e20 6f66 204e 554c 4c73 292c 2066 6f72 n of NULLs), for │ │ │ │ +000df530: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

.
stru │ │ │ │ +000df580: 6374 203c 2f73 7061 6e3e 5820 3c2f 6469 ct X .
{
. │ │ │ │ +000df5c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +000df5e0: 3c2f 7370 616e 3e20 2a70 3b20 3c2f 6469 *p; .
int ** │ │ │ │ +000df630: 713b 203c 2f64 6976 3e0a 3c64 6976 2063 q;
.
│ │ │ │ +000df650: 3c73 7061 6e20 636c 6173 733d 226b 6579 int *r nu │ │ │ │ +000df690: 6c6c 7074 723c 2f73 7061 6e3e 2031 3b3c llptr 1;< │ │ │ │ +000df6a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
}
. │ │ │ │ +000df6c0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

The ty │ │ │ │ +000df6e0: 7065 7320 7365 6374 696f 6e20 6f66 2061 pes section of a │ │ │ │ +000df6f0: 2057 5344 4c20 6465 7363 7269 7074 696f WSDL descriptio │ │ │ │ +000df700: 6e20 636f 6e74 6169 6e73 2069 6e66 6f72 n contains infor │ │ │ │ +000df710: 6d61 7469 6f6e 206f 6e20 7468 6520 226e mation on the "n │ │ │ │ +000df720: 696c 6c61 6269 6c69 7479 2220 6f66 2064 illability" of d │ │ │ │ +000df730: 6174 612c 2077 6869 6368 2069 7320 6465 ata, which is de │ │ │ │ +000df740: 636c 6172 6564 2061 7320 3c63 6f64 653e clared as │ │ │ │ +000df750: 6e75 6c6c 7074 723c 2f63 6f64 653e 206d nullptr m │ │ │ │ +000df760: 656d 6265 7273 2077 6865 7265 2074 6865 embers where the │ │ │ │ +000df770: 203c 636f 6465 3e31 3c2f 636f 6465 3e20 1 │ │ │ │ +000df780: 696e 6469 6361 7465 7320 7468 6174 2074 indicates that t │ │ │ │ +000df790: 6865 206d 656d 6265 7220 6973 2072 6571 he member is req │ │ │ │ +000df7a0: 7569 7265 6420 283c 656d 3e3c 636f 6465 uired (minOccurs and < │ │ │ │ +000df7d0: 636f 6465 3e6d 6178 4f63 6375 7273 3c2f code>maxOccurs are 1 │ │ │ │ +000df7f0: 2073 6574 2077 6974 6820 3c63 6f64 653e set with │ │ │ │ +000df800: 313a 313c 2f63 6f64 653e 206f 7220 7369 1:1 or si │ │ │ │ +000df810: 6d70 6c79 203c 636f 6465 3e31 3c2f 636f mply 1).

.

Sup │ │ │ │ +000df830: 706f 7365 2070 6f69 6e74 6572 203c 636f pose pointer q poin │ │ │ │ +000df850: 7473 2074 6f20 706f 696e 7465 7220 3c63 ts to pointer p and │ │ │ │ +000df870: 2073 7570 706f 7365 203c 636f 6465 3e70 suppose p │ │ │ │ +000df880: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and r are N │ │ │ │ +000df8a0: 554c 4c2e 2049 6e20 7468 6174 2063 6173 ULL. In that cas │ │ │ │ +000df8b0: 6520 7468 6520 3c63 6f64 653e 583c 2f63 e the X struct is s │ │ │ │ +000df8d0: 6572 6961 6c69 7a65 6420 7769 7468 203c erialized with < │ │ │ │ +000df8e0: 636f 6465 3e23 534f 4150 5f58 4d4c 5f47 code>#SOAP_XML_G │ │ │ │ +000df8f0: 5241 5048 3c2f 636f 6465 3e20 6173 3a3c RAPH as:< │ │ │ │ +000df900: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l │ │ │ │ +000df940: 743b 3c73 7061 6e20 636c 6173 733d 226b t;X>
.< │ │ │ │ +000df970: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000df980: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <p │ │ │ │ +000df9c0: 6964 3c2f 7370 616e 3e3d 3c73 7061 6e20 id="1&qu │ │ │ │ +000df9f0: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; xsi:nil= │ │ │ │ +000dfa20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000dfa40: 743b 7472 7565 2671 756f 743b 3c2f 7370 t;true"/>
.< │ │ │ │ +000dfa60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000dfa70: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <q │ │ │ │ +000dfab0: 7265 663c 2f73 7061 6e3e 3d3c 7370 616e ref=.Z....
.
<r │ │ │ │ +000dfb20: 2069 643d 2671 756f 743b 3c2f 7370 616e id="1&q │ │ │ │ +000dfb50: 756f 743b 2078 7369 3a6e 696c 3d26 7175 uot; xsi:nil=&qu │ │ │ │ +000dfb60: 6f74 3b3c 2f73 7061 6e3e 3c73 7061 6e20 ot; │ │ │ │ +000dfb80: 7472 7565 3c2f 7370 616e 3e26 7175 6f74 true" │ │ │ │ +000dfb90: 3b2f 2667 743b 3c2f 6469 763e 0a3c 6469 ;/>
.& │ │ │ │ +000dfbb0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/X< │ │ │ │ +000dfbd0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
│ │ │ │ +000dfbe0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
< │ │ │ │ +000dfc00: 703e 5468 6520 6465 7365 7269 616c 697a p>The deserializ │ │ │ │ +000dfc10: 6572 2072 6563 6f6e 7374 7275 6374 7320 er reconstructs │ │ │ │ +000dfc20: 7468 6520 7374 7275 6374 203c 636f 6465 the struct X from t │ │ │ │ +000dfc40: 6869 7320 666f 726d 206f 6620 584d 4c2c his form of XML, │ │ │ │ +000dfc50: 2074 6865 7265 6279 2070 7265 7365 7276 thereby preserv │ │ │ │ +000dfc60: 696e 6720 7468 6520 696e 7465 6772 6974 ing the integrit │ │ │ │ +000dfc70: 7920 6f66 2074 6865 2064 6174 6120 7374 y of the data st │ │ │ │ +000dfc80: 7275 6374 7572 6520 7365 7269 616c 697a ructure serializ │ │ │ │ +000dfc90: 6564 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 ed.

.

When │ │ │ │ +000dfca0: 7468 6520 6465 7365 7269 616c 697a 6572 the deserializer │ │ │ │ +000dfcb0: 2065 6e63 6f75 6e74 6572 7320 616e 2058 encounters an X │ │ │ │ +000dfcc0: 4d4c 2065 6c65 6d65 6e74 2074 6861 7420 ML element that │ │ │ │ +000dfcd0: 6861 7320 6120 3c65 6d3e 3c63 6f64 653e has a │ │ │ │ +000dfce0: 7873 693a 6e69 6c3d 2274 7275 6522 3c2f xsi:nil="true" attri │ │ │ │ +000dfd00: 6275 7465 2062 7574 2074 6865 2063 6f72 bute but the cor │ │ │ │ +000dfd10: 7265 7370 6f6e 6469 6e67 2043 2f43 2b2b responding C/C++ │ │ │ │ +000dfd20: 2064 6174 6120 6973 206e 6f74 2061 2070 data is not a p │ │ │ │ +000dfd30: 6f69 6e74 6572 206f 7220 7265 6665 7265 ointer or refere │ │ │ │ +000dfd40: 6e63 652c 2074 6865 2064 6573 6572 6961 nce, the deseria │ │ │ │ +000dfd50: 6c69 7a65 7220 7769 6c6c 2074 6572 6d69 lizer will termi │ │ │ │ +000dfd60: 6e61 7465 2077 6974 6820 6120 3c63 6f64 nate with a #SOAP_NULL fault when t │ │ │ │ +000dfd90: 6865 203c 636f 6465 3e23 534f 4150 5f58 he #SOAP_X │ │ │ │ +000dfda0: 4d4c 5f53 5452 4943 543c 2f63 6f64 653e ML_STRICT │ │ │ │ +000dfdb0: 2066 6c61 6720 6973 2073 6574 2e3c 2f70 flag is set.

.

.... Back to ta │ │ │ │ +000dfde0: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +000dfdf0: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

.

.Voi │ │ │ │ +000dfe20: 6420 706f 696e 7465 7220 7365 7269 616c d pointer serial │ │ │ │ +000dfe30: 697a 6174 696f 6e3c 2f68 323e 0a3c 703e ization

.

│ │ │ │ +000dfe40: 566f 6964 2070 6f69 6e74 6572 7320 283c Void pointers (< │ │ │ │ +000dfe50: 636f 6465 3e76 6f69 642a 3c2f 636f 6465 code>void*) cannot be ser │ │ │ │ +000dfe70: 6961 6c69 7a65 6420 696e 2058 4d4c 2062 ialized in XML b │ │ │ │ +000dfe80: 6563 6175 7365 2074 6865 2074 7970 6520 ecause the type │ │ │ │ +000dfe90: 6f66 2064 6174 6120 7265 6665 7272 6564 of data referred │ │ │ │ +000dfea0: 2074 6f20 6973 2075 6e74 7970 6564 2e20 to is untyped. │ │ │ │ +000dfeb0: 546f 2065 6e61 626c 6520 7468 6520 7365 To enable the se │ │ │ │ +000dfec0: 7269 616c 697a 6174 696f 6e20 6f66 2076 rialization of v │ │ │ │ +000dfed0: 6f69 6420 706f 696e 7465 7273 2074 6861 oid pointers tha │ │ │ │ +000dfee0: 7420 6172 6520 6d65 6d62 6572 7320 6f66 t are members of │ │ │ │ +000dfef0: 2073 7472 7563 7473 2061 6e64 2063 6c61 structs and cla │ │ │ │ +000dff00: 7373 6573 2c20 796f 7520 6361 6e20 696e sses, you can in │ │ │ │ +000dff10: 7365 7274 2061 203c 636f 6465 3e69 6e74 sert a int │ │ │ │ +000dff20: 205f 5f74 7970 653c 2f63 6f64 653e 206d __type m │ │ │ │ +000dff30: 656d 6265 7220 7269 6768 7420 6265 666f ember right befo │ │ │ │ +000dff40: 7265 2074 6865 2076 6f69 6420 706f 696e re the void poin │ │ │ │ +000dff50: 7465 7220 6d65 6d62 6572 2e20 5468 6520 ter member. The │ │ │ │ +000dff60: 3c63 6f64 653e 696e 7420 5f5f 7479 7065 int __type │ │ │ │ +000dff70: 3c2f 636f 6465 3e20 6d65 6d62 6572 2063 member c │ │ │ │ +000dff80: 6f6e 7461 696e 7320 7275 6e20 7469 6d65 ontains run time │ │ │ │ +000dff90: 2069 6e66 6f72 6d61 7469 6f6e 206f 6e20 information on │ │ │ │ +000dffa0: 7468 6520 7479 7065 206f 6620 7468 6520 the type of the │ │ │ │ +000dffb0: 6461 7461 2070 6f69 6e74 6564 2074 6f20 data pointed to │ │ │ │ +000dffc0: 6279 203c 636f 6465 3e76 6f69 642a 3c2f by void* member in │ │ │ │ +000dffe0: 6120 7374 7275 6374 2f63 6c61 7373 2074 a struct/class t │ │ │ │ +000dfff0: 6f20 656e 6162 6c65 2074 6865 2073 6572 o enable the ser │ │ │ │ +000e0000: 6961 6c69 7a61 7469 6f6e 206f 6620 7468 ialization of th │ │ │ │ +000e0010: 6973 2064 6174 612e 2054 6865 203c 636f is data. The int __type member is s │ │ │ │ +000e0040: 6574 2074 6f20 6120 3c63 6f64 653e 534f et to a SO │ │ │ │ +000e0050: 4150 5f54 5950 455f 543c 2f63 6f64 653e AP_TYPE_T │ │ │ │ +000e0060: 2076 616c 7565 2c20 7768 6572 6520 3c63 value, where T is │ │ │ │ +000e0080: 7468 6520 6e61 6d65 206f 6620 6120 7479 the name of a ty │ │ │ │ +000e0090: 7065 2e20 5468 6520 736f 6170 6370 7032 pe. The soapcpp2 │ │ │ │ +000e00a0: 2074 6f6f 6c20 6765 6e65 7261 7465 7320 tool generates │ │ │ │ +000e00b0: 7468 6520 3c63 6f64 653e 534f 4150 5f54 the SOAP_T │ │ │ │ +000e00c0: 5950 455f 543c 2f63 6f64 653e 2064 6566 YPE_T def │ │ │ │ +000e00d0: 696e 6974 696f 6e73 2069 6e20 3c65 6d3e initions in │ │ │ │ +000e00e0: 3c63 6f64 653e 736f 6170 482e 683c 2f63 soapH.h and us │ │ │ │ +000e0100: 6573 2074 6865 6d20 696e 7465 726e 616c es them internal │ │ │ │ +000e0110: 6c79 2074 6f20 756e 6971 7565 6c79 2069 ly to uniquely i │ │ │ │ +000e0120: 6465 6e74 6966 7920 7468 6520 7479 7065 dentify the type │ │ │ │ +000e0130: 206f 6620 6561 6368 206f 626a 6563 742e of each object. │ │ │ │ +000e0140: 2054 6865 2074 7970 6520 6e61 6d69 6e67 The type naming │ │ │ │ +000e0150: 2063 6f6e 7665 6e74 696f 6e73 206f 7574 conventions out │ │ │ │ +000e0160: 6c69 6e65 6420 696e 2053 6563 7469 6f6e lined in Section │ │ │ │ +000e0170: 203c 6120 636c 6173 733d 2265 6c22 2068 Seria │ │ │ │ +000e01a0: 6c69 7a69 6e67 2043 2f43 2b2b 2064 6174 lizing C/C++ dat │ │ │ │ +000e01b0: 6120 746f 2058 4d4c 3c2f 613e 2061 7265 a to XML are │ │ │ │ +000e01c0: 2075 7365 6420 746f 2064 6574 6572 6d69 used to determi │ │ │ │ +000e01d0: 6e65 2074 6865 2074 7970 6520 6e61 6d65 ne the type name │ │ │ │ +000e01e0: 2066 6f72 203c 636f 6465 3e54 3c2f 636f for T. Values seri │ │ │ │ +000e0200: 616c 697a 6564 2069 6e20 584d 4c20 7769 alized in XML wi │ │ │ │ +000e0210: 7468 2074 6869 7320 6170 7072 6f61 6368 th this approach │ │ │ │ +000e0220: 2061 6c77 6179 7320 6361 7272 7920 7468 always carry th │ │ │ │ +000e0230: 6520 3c65 6d3e 3c63 6f64 653e 7873 693a e xsi: │ │ │ │ +000e0240: 7479 7065 3c2f 636f 6465 3e3c 2f65 6d3e type │ │ │ │ +000e0250: 2061 7474 7269 6275 7465 2069 6e20 584d attribute in XM │ │ │ │ +000e0260: 4c20 746f 2069 6e64 6963 6174 6520 7468 L to indicate th │ │ │ │ +000e0270: 6520 7479 7065 206f 6620 636f 6e74 656e e type of conten │ │ │ │ +000e0280: 7420 7365 7269 616c 697a 6564 2e3c 2f70 t serialized.

.

Here is an │ │ │ │ +000e02a0: 6578 616d 706c 6520 746f 2069 6c6c 7573 example to illus │ │ │ │ +000e02b0: 7472 6174 6520 7468 6520 7365 7269 616c trate the serial │ │ │ │ +000e02c0: 697a 6174 696f 6e20 6f66 2061 203c 636f ization of a void* │ │ │ │ +000e02e0: 6d65 6d62 6572 2069 6e20 6120 7374 7275 member in a stru │ │ │ │ +000e02f0: 6374 2f63 6c61 7373 3a3c 2f70 3e0a 3c64 ct/class:

.
stru │ │ │ │ +000e0340: 6374 203c 2f73 7061 6e3e 6e73 5f5f 7265 ct ns__re │ │ │ │ +000e0350: 636f 7264 203c 2f64 6976 3e0a 3c64 6976 cord
.
{< │ │ │ │ 000e0370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ -000e0390: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
│ │ │ │ -000e03c0: 696e 743c 2f73 7061 6e3e 205f 5f74 7970 int __typ │ │ │ │ -000e03d0: 653b 203c 7370 616e 2063 6c61 7373 3d22 e; // the │ │ │ │ -000e03f0: 534f 4150 5f54 5950 455f 5420 706f 696e SOAP_TYPE_T poin │ │ │ │ -000e0400: 7465 6420 746f 2062 7920 7661 6c3c 2f73 ted to by val
.
│ │ │ │ -000e0430: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ │ -000e0450: 2f73 7061 6e3e 202a 7661 6c3b 2020 3c73 /span> *val; // serialize │ │ │ │ -000e0480: 2061 6e79 2074 7970 6520 696e 2065 6c65 any type in ele │ │ │ │ -000e0490: 6d65 6e74 2026 6c74 3b76 616c 2667 743b ment <val> │ │ │ │ -000e04a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ -000e04c0: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
< │ │ │ │ -000e04d0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -000e04e0: 3c70 3e54 6865 203c 636f 6465 3e5f 5f74

The __t │ │ │ │ -000e04f0: 7970 653c 2f63 6f64 653e 2069 6e74 6567 ype integ │ │ │ │ -000e0500: 6572 2063 616e 2062 6520 7365 7420 746f er can be set to │ │ │ │ -000e0510: 2030 2061 7420 7275 6e20 7469 6d65 2074 0 at run time t │ │ │ │ -000e0520: 6f20 6f6d 6974 2074 6865 2073 6572 6961 o omit the seria │ │ │ │ -000e0530: 6c69 7a61 7469 6f6e 206f 6620 7468 6520 lization of the │ │ │ │ -000e0540: 766f 6964 2070 6f69 6e74 6572 206d 656d void pointer mem │ │ │ │ -000e0550: 6265 722e 3c2f 703e 0a3c 703e 5468 6520 ber.

.

The │ │ │ │ -000e0560: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl │ │ │ │ -000e0570: 6520 696c 6c75 7374 7261 7465 7320 7468 e illustrates th │ │ │ │ -000e0580: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization │ │ │ │ -000e0590: 206f 6620 3c63 6f64 653e 6d79 5374 7275 of myStru │ │ │ │ -000e05a0: 6374 3c2f 636f 6465 3e20 7769 7468 2061 ct with a │ │ │ │ -000e05b0: 2076 6f69 6420 706f 696e 7465 7220 746f void pointer to │ │ │ │ -000e05c0: 2061 6e20 696e 743a 3c2f 703e 0a3c 6469 an int:

.
struc │ │ │ │ -000e0610: 7420 3c2f 7370 616e 3e6e 735f 5f72 6563 t ns__rec │ │ │ │ -000e0620: 6f72 6420 533b 203c 2f64 6976 3e0a 3c64 ord S;
. │ │ │ │ -000e0640: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
n = 123; .
S.val = ( │ │ │ │ -000e0690: 3c73 7061 6e20 636c 6173 733d 226b 6579 void*)&n; < │ │ │ │ -000e06c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
S.__type │ │ │ │ -000e06e0: 203d 2053 4f41 505f 5459 5045 5f69 6e74 = SOAP_TYPE_int │ │ │ │ -000e06f0: 3b20 3c2f 6469 763e 0a3c 2f64 6976 3e3c ;
.
< │ │ │ │ -000e0700: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -000e0710: 3c70 3e54 6865 2073 6572 6961 6c69 7a65

The serialize │ │ │ │ -000e0720: 6420 6f75 7470 7574 206f 6620 3c63 6f64 d output of S conta │ │ │ │ -000e0740: 696e 7320 7468 6520 696e 7465 6765 7220 ins the integer │ │ │ │ -000e0750: 696e 2069 7473 203c 656d 3e3c 636f 6465 in its val │ │ │ │ -000e0770: 2065 6c65 6d65 6e74 3a3c 2f70 3e0a 3c64 element:

. │ │ │ │ -000e0790: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<ns:record< │ │ │ │ -000e07e0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
│ │ │ │ -000e07f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<val xsi:type= │ │ │ │ -000e0870: 2671 756f 743b 7873 643a 696e 7426 7175 "xsd:int&qu │ │ │ │ -000e0880: 6f74 3b3c 2f73 7061 6e3e 2667 743b 3132 ot;>12 │ │ │ │ -000e0890: 3326 6c74 3b2f 3c73 7061 6e20 636c 6173 3</ │ │ │ │ -000e08b0: 7661 6c3c 2f73 7061 6e3e 2667 743b 3c2f val>.
</ns:record< │ │ │ │ -000e0900: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
│ │ │ │ -000e0910: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
< │ │ │ │ -000e0930: 703e 5468 6520 6465 7365 7269 616c 697a p>The deserializ │ │ │ │ -000e0940: 6572 2066 6f72 203c 636f 6465 3e6e 735f er for ns_ │ │ │ │ -000e0950: 5f72 6563 6f72 643c 2f63 6f64 653e 2077 _record w │ │ │ │ -000e0960: 696c 6c20 6175 746f 6d61 7469 6361 6c6c ill automaticall │ │ │ │ -000e0970: 7920 7365 7420 7468 6520 3c63 6f64 653e y set the │ │ │ │ -000e0980: 5f5f 7479 7065 3c2f 636f 6465 3e20 6669 __type fi │ │ │ │ -000e0990: 656c 6420 616e 6420 766f 6964 2070 6f69 eld and void poi │ │ │ │ -000e09a0: 6e74 6572 2077 6865 6e20 6465 7365 7269 nter when deseri │ │ │ │ -000e09b0: 616c 697a 696e 6720 7468 6520 6461 7461 alizing the data │ │ │ │ -000e09c0: 2c20 7072 6f76 6964 6564 2074 6861 7420 , provided that │ │ │ │ -000e09d0: 7468 6520 584d 4c20 656c 656d 656e 7420 the XML element │ │ │ │ -000e09e0: 3c65 6d3e 3c63 6f64 653e 7661 6c3c 2f63 val carrie │ │ │ │ -000e0a00: 7320 7468 6520 3c65 6d3e 3c63 6f64 653e s the │ │ │ │ -000e0a10: 7873 693a 7479 7065 3c2f 636f 6465 3e3c xsi:type< │ │ │ │ -000e0a20: 2f65 6d3e 2061 7474 7269 6275 7465 2066 /em> attribute f │ │ │ │ -000e0a30: 726f 6d20 7768 6963 6820 6974 2063 616e rom which it can │ │ │ │ -000e0a40: 2064 6574 6572 6d69 6e65 2074 6865 2074 determine the t │ │ │ │ -000e0a50: 7970 652e 3c2f 703e 0a3c 646c 2063 6c61 ype.

.
Note
< │ │ │ │ -000e0a80: 6464 3e77 6865 6e20 7365 7269 616c 697a dd>when serializ │ │ │ │ -000e0a90: 696e 6720 7374 7269 6e67 7320 7669 6120 ing strings via │ │ │ │ -000e0aa0: 6120 3c63 6f64 653e 766f 6964 2a3c 2f63 a void* member, the │ │ │ │ -000e0ac0: 203c 636f 6465 3e76 6f69 642a 3c2f 636f void* pointer must │ │ │ │ -000e0ae0: 2064 6972 6563 746c 7920 706f 696e 7420 directly point │ │ │ │ -000e0af0: 746f 2074 6865 2073 7472 696e 6720 7661 to the string va │ │ │ │ -000e0b00: 6c75 6520 7261 7468 6572 2074 6861 6e20 lue rather than │ │ │ │ -000e0b10: 696e 6469 7265 6374 6c79 2061 7320 7769 indirectly as wi │ │ │ │ -000e0b20: 7468 2061 6c6c 206f 7468 6572 2074 7970 th all other typ │ │ │ │ -000e0b30: 6573 2e20 466f 7220 6578 616d 706c 653a es. For example: │ │ │ │ -000e0b40: 3c2f 6464 3e3c 2f64 6c3e 0a3c 6469 7620
.
struct │ │ │ │ -000e0b90: 3c2f 7370 616e 3e6e 735f 5f72 6563 6f72 ns__recor │ │ │ │ -000e0ba0: 6420 533b 203c 2f64 6976 3e0a 3c64 6976 d S;
.
S. │ │ │ │ -000e0bc0: 7661 6c20 3d20 283c 7370 616e 2063 6c61 val = (void*)" │ │ │ │ -000e0c10: 4865 6c6c 6f26 7175 6f74 3b3c 2f73 7061 Hello";
.
S._ │ │ │ │ -000e0c40: 5f74 7970 6520 3d20 534f 4150 5f54 5950 _type = SOAP_TYP │ │ │ │ -000e0c50: 455f 7374 7269 6e67 3b20 3c2f 6469 763e E_string;
│ │ │ │ -000e0c60: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

This │ │ │ │ -000e0c80: 6973 2074 6865 2063 6173 6520 666f 7220 is the case for │ │ │ │ -000e0c90: 616c 6c20 7374 7269 6e67 2d62 6173 6564 all string-based │ │ │ │ -000e0ca0: 2074 7970 6573 2c20 696e 636c 7564 696e types, includin │ │ │ │ -000e0cb0: 6720 7479 7065 7320 6465 6669 6e65 6420 g types defined │ │ │ │ -000e0cc0: 7769 7468 203c 636f 6465 3e74 7970 6564 with typed │ │ │ │ -000e0cd0: 6566 2063 6861 722a 3c2f 636f 6465 3e2e ef char*. │ │ │ │ -000e0ce0: 3c2f 703e 0a3c 703e 596f 7520 6d61 7920

.

You may │ │ │ │ -000e0cf0: 7573 6520 616e 2061 7262 6974 7261 7279 use an arbitrary │ │ │ │ -000e0d00: 2073 7566 6669 7820 7769 7468 2074 6865 suffix with the │ │ │ │ -000e0d10: 203c 636f 6465 3e5f 5f74 7970 653c 2f63 __type members to │ │ │ │ -000e0d30: 6861 6e64 6c65 206d 756c 7469 706c 6520 handle multiple │ │ │ │ -000e0d40: 766f 6964 2070 6f69 6e74 6572 7320 696e void pointers in │ │ │ │ -000e0d50: 2073 7472 7563 7473 2f63 6c61 7373 6573 structs/classes │ │ │ │ -000e0d60: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

struct n │ │ │ │ -000e0dc0: 735f 5f72 6563 6f72 6420 3c2f 6469 763e s__record
│ │ │ │ +000e0380: 3d22 6c69 6e65 223e 2020 2020 3c73 7061 ="line"> int │ │ │ │ +000e03b0: 205f 5f74 7970 653b 203c 7370 616e 2063 __type; / │ │ │ │ +000e03d0: 2f20 7468 6520 534f 4150 5f54 5950 455f / the SOAP_TYPE_ │ │ │ │ +000e03e0: 5420 706f 696e 7465 6420 746f 2062 7920 T pointed to by │ │ │ │ +000e03f0: 7661 6c3c 2f73 7061 6e3e 3c2f 6469 763e val
│ │ │ │ +000e0400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
void *va │ │ │ │ +000e0440: 6c3b 2020 3c73 7061 6e20 636c 6173 733d l; // ser │ │ │ │ +000e0460: 6961 6c69 7a65 2061 6e79 2074 7970 6520 ialize any type │ │ │ │ +000e0470: 696e 2065 6c65 6d65 6e74 2026 6c74 3b76 in element <v │ │ │ │ +000e0480: 616c 2667 743b 3c2f 7370 616e 3e3c 2f64 al>.
};
.< │ │ │ │ +000e04b0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The __type │ │ │ │ +000e04e0: 2069 6e74 6567 6572 2063 616e 2062 6520 integer can be │ │ │ │ +000e04f0: 7365 7420 746f 2030 2061 7420 7275 6e20 set to 0 at run │ │ │ │ +000e0500: 7469 6d65 2074 6f20 6f6d 6974 2074 6865 time to omit the │ │ │ │ +000e0510: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o │ │ │ │ +000e0520: 6620 7468 6520 766f 6964 2070 6f69 6e74 f the void point │ │ │ │ +000e0530: 6572 206d 656d 6265 722e 3c2f 703e 0a3c er member.

.< │ │ │ │ +000e0540: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following │ │ │ │ +000e0550: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra │ │ │ │ +000e0560: 7465 7320 7468 6520 696e 6974 6961 6c69 tes the initiali │ │ │ │ +000e0570: 7a61 7469 6f6e 206f 6620 3c63 6f64 653e zation of │ │ │ │ +000e0580: 6d79 5374 7275 6374 3c2f 636f 6465 3e20 myStruct │ │ │ │ +000e0590: 7769 7468 2061 2076 6f69 6420 706f 696e with a void poin │ │ │ │ +000e05a0: 7465 7220 746f 2061 6e20 696e 743a 3c2f ter to an int:.
struct n │ │ │ │ +000e0600: 735f 5f72 6563 6f72 6420 533b 203c 2f64 s__record S; .
│ │ │ │ +000e0640: 696e 743c 2f73 7061 6e3e 206e 203d 2031 int n = 1 │ │ │ │ +000e0650: 3233 3b20 3c2f 6469 763e 0a3c 6469 7620 23;
.
S.v │ │ │ │ +000e0670: 616c 203d 2028 3c73 7061 6e20 636c 6173 al = ( │ │ │ │ +000e0690: 766f 6964 3c2f 7370 616e 3e2a 2926 616d void*)&am │ │ │ │ +000e06a0: 703b 6e3b 203c 2f64 6976 3e0a 3c64 6976 p;n;
.
S. │ │ │ │ +000e06c0: 5f5f 7479 7065 203d 2053 4f41 505f 5459 __type = SOAP_TY │ │ │ │ +000e06d0: 5045 5f69 6e74 3b20 3c2f 6469 763e 0a3c PE_int;
.< │ │ │ │ +000e06e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

The ser │ │ │ │ +000e0700: 6961 6c69 7a65 6420 6f75 7470 7574 206f ialized output o │ │ │ │ +000e0710: 6620 3c63 6f64 653e 533c 2f63 6f64 653e f S │ │ │ │ +000e0720: 2063 6f6e 7461 696e 7320 7468 6520 696e contains the in │ │ │ │ +000e0730: 7465 6765 7220 696e 2069 7473 203c 656d teger in its val element:< │ │ │ │ +000e0760: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l │ │ │ │ +000e07a0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;ns:r │ │ │ │ +000e07c0: 6563 6f72 643c 2f73 7061 6e3e 2667 743b ecord> │ │ │ │ +000e07d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<< │ │ │ │ +000e07f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e0800: 6f72 6474 7970 6522 3e76 616c 3c2f 7370 ordtype">val xsi:ty │ │ │ │ +000e0830: 7065 3c2f 7370 616e 3e3d 3c73 7061 6e20 pe="xsd: │ │ │ │ +000e0860: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int" │ │ │ │ +000e0870: 2667 743b 3132 3326 6c74 3b2f 3c73 7061 >123</val │ │ │ │ +000e08a0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
< │ │ │ │ +000e08c0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/ns:r │ │ │ │ +000e08e0: 6563 6f72 643c 2f73 7061 6e3e 2667 743b ecord> │ │ │ │ +000e08f0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
< │ │ │ │ +000e0910: 2f64 6976 3e3c 703e 5468 6520 6465 7365 /div>

The dese │ │ │ │ +000e0920: 7269 616c 697a 6572 2066 6f72 203c 636f rializer for ns__record will automa │ │ │ │ +000e0950: 7469 6361 6c6c 7920 7365 7420 7468 6520 tically set the │ │ │ │ +000e0960: 3c63 6f64 653e 5f5f 7479 7065 3c2f 636f __type field and vo │ │ │ │ +000e0980: 6964 2070 6f69 6e74 6572 2077 6865 6e20 id pointer when │ │ │ │ +000e0990: 6465 7365 7269 616c 697a 696e 6720 7468 deserializing th │ │ │ │ +000e09a0: 6520 6461 7461 2c20 7072 6f76 6964 6564 e data, provided │ │ │ │ +000e09b0: 2074 6861 7420 7468 6520 584d 4c20 656c that the XML el │ │ │ │ +000e09c0: 656d 656e 7420 3c65 6d3e 3c63 6f64 653e ement │ │ │ │ +000e09d0: 7661 6c3c 2f63 6f64 653e 3c2f 656d 3e20 val │ │ │ │ +000e09e0: 6361 7272 6965 7320 7468 6520 3c65 6d3e carries the │ │ │ │ +000e09f0: 3c63 6f64 653e 7873 693a 7479 7065 3c2f xsi:type attri │ │ │ │ +000e0a10: 6275 7465 2066 726f 6d20 7768 6963 6820 bute from which │ │ │ │ +000e0a20: 6974 2063 616e 2064 6574 6572 6d69 6e65 it can determine │ │ │ │ +000e0a30: 2074 6865 2074 7970 652e 3c2f 703e 0a3c the type.

.< │ │ │ │ +000e0a40: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class="sectio │ │ │ │ +000e0a50: 6e20 6e6f 7465 223e 3c64 743e 4e6f 7465 n note">
Note │ │ │ │ +000e0a60: 3c2f 6474 3e3c 6464 3e77 6865 6e20 7365
when se │ │ │ │ +000e0a70: 7269 616c 697a 696e 6720 7374 7269 6e67 rializing string │ │ │ │ +000e0a80: 7320 7669 6120 6120 3c63 6f64 653e 766f s via a vo │ │ │ │ +000e0a90: 6964 2a3c 2f63 6f64 653e 206d 656d 6265 id* membe │ │ │ │ +000e0aa0: 722c 2074 6865 203c 636f 6465 3e76 6f69 r, the voi │ │ │ │ +000e0ab0: 642a 3c2f 636f 6465 3e20 706f 696e 7465 d* pointe │ │ │ │ +000e0ac0: 7220 6d75 7374 2064 6972 6563 746c 7920 r must directly │ │ │ │ +000e0ad0: 706f 696e 7420 746f 2074 6865 2073 7472 point to the str │ │ │ │ +000e0ae0: 696e 6720 7661 6c75 6520 7261 7468 6572 ing value rather │ │ │ │ +000e0af0: 2074 6861 6e20 696e 6469 7265 6374 6c79 than indirectly │ │ │ │ +000e0b00: 2061 7320 7769 7468 2061 6c6c 206f 7468 as with all oth │ │ │ │ +000e0b10: 6572 2074 7970 6573 2e20 466f 7220 6578 er types. For ex │ │ │ │ +000e0b20: 616d 706c 653a 3c2f 6464 3e3c 2f64 6c3e ample:
│ │ │ │ +000e0b30: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
s │ │ │ │ +000e0b70: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ +000e0b80: 5f72 6563 6f72 6420 533b 203c 2f64 6976 _record S;
.
S.val = (void*) │ │ │ │ +000e0bf0: 2671 756f 743b 4865 6c6c 6f26 7175 6f74 "Hello" │ │ │ │ +000e0c00: 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e ;;
│ │ │ │ +000e0c10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
S.__type = SO │ │ │ │ +000e0c30: 4150 5f54 5950 455f 7374 7269 6e67 3b20 AP_TYPE_string; │ │ │ │ +000e0c40: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.

This is the cas │ │ │ │ +000e0c70: 6520 666f 7220 616c 6c20 7374 7269 6e67 e for all string │ │ │ │ +000e0c80: 2d62 6173 6564 2074 7970 6573 2c20 696e -based types, in │ │ │ │ +000e0c90: 636c 7564 696e 6720 7479 7065 7320 6465 cluding types de │ │ │ │ +000e0ca0: 6669 6e65 6420 7769 7468 203c 636f 6465 fined with typedef char*.

.

Yo │ │ │ │ +000e0cd0: 7520 6d61 7920 7573 6520 616e 2061 7262 u may use an arb │ │ │ │ +000e0ce0: 6974 7261 7279 2073 7566 6669 7820 7769 itrary suffix wi │ │ │ │ +000e0cf0: 7468 2074 6865 203c 636f 6465 3e5f 5f74 th the __t │ │ │ │ +000e0d00: 7970 653c 2f63 6f64 653e 206d 656d 6265 ype membe │ │ │ │ +000e0d10: 7273 2074 6f20 6861 6e64 6c65 206d 756c rs to handle mul │ │ │ │ +000e0d20: 7469 706c 6520 766f 6964 2070 6f69 6e74 tiple void point │ │ │ │ +000e0d30: 6572 7320 696e 2073 7472 7563 7473 2f63 ers in structs/c │ │ │ │ +000e0d40: 6c61 7373 6573 2e20 466f 7220 6578 616d lasses. For exam │ │ │ │ +000e0d50: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

.
< │ │ │ │ +000e0d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e0d80: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__record │ │ │ │ +000e0db0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
│ │ │ │ 000e0dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
│ │ │ │ -000e0e00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __typeOfp; │ │ │ │ -000e0e30: 203c 7370 616e 2063 6c61 7373 3d22 636f // the SO │ │ │ │ -000e0e50: 4150 5f54 5950 455f 5420 706f 696e 7465 AP_TYPE_T pointe │ │ │ │ -000e0e60: 6420 746f 2062 7920 7020 3c2f 7370 616e d to by p
.
void *p; // element & │ │ │ │ -000e0ee0: 6c74 3b70 2667 743b 3c2f 7370 616e 3e3c lt;p>< │ │ │ │ -000e0ef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
int │ │ │ │ -000e0f30: 205f 5f74 7970 654f 6671 3b20 3c73 7061 __typeOfq; // the SOAP_TY │ │ │ │ -000e0f60: 5045 5f54 2070 6f69 6e74 6564 2074 6f20 PE_T pointed to │ │ │ │ -000e0f70: 6279 2071 203c 2f73 7061 6e3e 3c2f 6469 by q .
void * │ │ │ │ -000e0fc0: 713b 2020 2020 2020 203c 7370 616e 2063 q; / │ │ │ │ -000e0fe0: 2f20 656c 656d 656e 7420 266c 743b 7126 / element <q& │ │ │ │ -000e0ff0: 6774 3b3c 2f73 7061 6e3e 3c2f 6469 763e gt;
│ │ │ │ -000e1000: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

Because se │ │ │ │ -000e1040: 7276 6963 6520 6d65 7468 6f64 2070 6172 rvice method par │ │ │ │ -000e1050: 616d 6574 6572 7320 6172 6520 7374 6f72 ameters are stor │ │ │ │ -000e1060: 6564 2077 6974 6869 6e20 7374 7275 6374 ed within struct │ │ │ │ -000e1070: 732c 2079 6f75 2063 616e 2075 7365 203c s, you can use < │ │ │ │ -000e1080: 636f 6465 3e5f 5f74 7970 653c 2f63 6f64 code>__type and voi │ │ │ │ -000e10a0: 642a 3c2f 636f 6465 3e20 7061 7261 6d65 d* parame │ │ │ │ -000e10b0: 7465 7273 2074 6f20 7061 7373 2070 6f6c ters to pass pol │ │ │ │ -000e10c0: 796d 6f72 7068 6963 2061 7267 756d 656e ymorphic argumen │ │ │ │ -000e10d0: 7473 2077 6974 686f 7574 2068 6176 696e ts without havin │ │ │ │ -000e10e0: 6720 746f 2064 6566 696e 6520 6120 432b g to define a C+ │ │ │ │ -000e10f0: 2b20 636c 6173 7320 6869 6572 6172 6368 + class hierarch │ │ │ │ -000e1100: 7920 2853 6563 7469 6f6e 203c 6120 636c y (Section Polymorphis │ │ │ │ -000e1140: 6d2c 2064 6572 6976 6564 2074 7970 6573 m, derived types │ │ │ │ -000e1150: 2c20 616e 6420 6479 6e61 6d69 6320 6269 , and dynamic bi │ │ │ │ -000e1160: 6e64 696e 6720 696e 2043 2b2b 3c2f 613e nding in C++ │ │ │ │ -000e1170: 2029 2c20 7072 6f76 6964 6564 2074 6861 ), provided tha │ │ │ │ -000e1180: 7420 3c65 6d3e 3c63 6f64 653e 7873 693a t xsi: │ │ │ │ -000e1190: 7479 7065 3c2f 636f 6465 3e3c 2f65 6d3e type │ │ │ │ -000e11a0: 2061 7474 7269 6275 7465 7320 6172 6520 attributes are │ │ │ │ -000e11b0: 7072 6573 656e 7420 696e 2074 6865 2058 present in the X │ │ │ │ -000e11c0: 4d4c 2065 6c65 6d65 6e74 732e 2046 6f72 ML elements. For │ │ │ │ -000e11d0: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

.
type │ │ │ │ -000e1220: 6465 663c 2f73 7061 6e3e 203c 7370 616e def char │ │ │ │ -000e1250: 202a 7873 645f 5f73 7472 696e 673b 203c *xsd__string; < │ │ │ │ -000e1260: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
ty │ │ │ │ -000e1290: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef int xsd__int; .
typed │ │ │ │ -000e1300: 6566 3c2f 7370 616e 3e20 3c73 7061 6e20 ef float │ │ │ │ -000e1330: 2078 7364 5f5f 666c 6f61 743b 203c 2f64 xsd__float; .
enum │ │ │ │ -000e1370: 3c2f 7370 616e 3e20 6e73 5f5f 7374 6174 ns__stat │ │ │ │ -000e1380: 7573 207b 206f 6e2c 206f 6666 207d 3b20 us { on, off }; │ │ │ │ -000e1390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
s │ │ │ │ -000e13c0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ -000e13d0: 5f77 6964 6765 743c 2f64 6976 3e0a 3c64 _widget
. int __ty │ │ │ │ +000e0e10: 7065 4f66 703b 203c 7370 616e 2063 6c61 peOfp; // │ │ │ │ +000e0e30: 7468 6520 534f 4150 5f54 5950 455f 5420 the SOAP_TYPE_T │ │ │ │ +000e0e40: 706f 696e 7465 6420 746f 2062 7920 7020 pointed to by p │ │ │ │ +000e0e50: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ +000e0e70: 2020 2020 3c73 7061 6e20 636c 6173 733d vo │ │ │ │ +000e0e90: 6964 3c2f 7370 616e 3e20 2a70 3b20 2020 id *p; │ │ │ │ +000e0ea0: 2020 2020 3c73 7061 6e20 636c 6173 733d // ele │ │ │ │ +000e0ec0: 6d65 6e74 2026 6c74 3b70 2667 743b 3c2f ment <p>
.
│ │ │ │ +000e0ef0: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +000e0f10: 2f73 7061 6e3e 205f 5f74 7970 654f 6671 /span> __typeOfq │ │ │ │ +000e0f20: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // the S │ │ │ │ +000e0f40: 4f41 505f 5459 5045 5f54 2070 6f69 6e74 OAP_TYPE_T point │ │ │ │ +000e0f50: 6564 2074 6f20 6279 2071 203c 2f73 7061 ed to by q
.
< │ │ │ │ +000e0f80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e0f90: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void *q; < │ │ │ │ +000e0fb0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000e0fc0: 656e 7422 3e2f 2f20 656c 656d 656e 7420 ent">// element │ │ │ │ +000e0fd0: 266c 743b 7126 6774 3b3c 2f73 7061 6e3e <q> │ │ │ │ +000e0fe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};
.

Beca │ │ │ │ +000e1020: 7573 6520 7365 7276 6963 6520 6d65 7468 use service meth │ │ │ │ +000e1030: 6f64 2070 6172 616d 6574 6572 7320 6172 od parameters ar │ │ │ │ +000e1040: 6520 7374 6f72 6564 2077 6974 6869 6e20 e stored within │ │ │ │ +000e1050: 7374 7275 6374 732c 2079 6f75 2063 616e structs, you can │ │ │ │ +000e1060: 2075 7365 203c 636f 6465 3e5f 5f74 7970 use __typ │ │ │ │ +000e1070: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and void* │ │ │ │ +000e1090: 7061 7261 6d65 7465 7273 2074 6f20 7061 parameters to pa │ │ │ │ +000e10a0: 7373 2070 6f6c 796d 6f72 7068 6963 2061 ss polymorphic a │ │ │ │ +000e10b0: 7267 756d 656e 7473 2077 6974 686f 7574 rguments without │ │ │ │ +000e10c0: 2068 6176 696e 6720 746f 2064 6566 696e having to defin │ │ │ │ +000e10d0: 6520 6120 432b 2b20 636c 6173 7320 6869 e a C++ class hi │ │ │ │ +000e10e0: 6572 6172 6368 7920 2853 6563 7469 6f6e erarchy (Section │ │ │ │ +000e10f0: 203c 6120 636c 6173 733d 2265 6c22 2068 Polym │ │ │ │ +000e1120: 6f72 7068 6973 6d2c 2064 6572 6976 6564 orphism, derived │ │ │ │ +000e1130: 2074 7970 6573 2c20 616e 6420 6479 6e61 types, and dyna │ │ │ │ +000e1140: 6d69 6320 6269 6e64 696e 6720 696e 2043 mic binding in C │ │ │ │ +000e1150: 2b2b 3c2f 613e 2029 2c20 7072 6f76 6964 ++ ), provid │ │ │ │ +000e1160: 6564 2074 6861 7420 3c65 6d3e 3c63 6f64 ed that xsi:type attribute │ │ │ │ +000e1190: 7320 6172 6520 7072 6573 656e 7420 696e s are present in │ │ │ │ +000e11a0: 2074 6865 2058 4d4c 2065 6c65 6d65 6e74 the XML element │ │ │ │ +000e11b0: 732e 2046 6f72 2065 7861 6d70 6c65 3a3c s. For example:< │ │ │ │ +000e11c0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

typedef │ │ │ │ +000e1210: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +000e1230: 2f73 7061 6e3e 202a 7873 645f 5f73 7472 /span> *xsd__str │ │ │ │ +000e1240: 696e 673b 203c 2f64 6976 3e0a 3c64 6976 ing;
.
typedef int │ │ │ │ +000e12a0: 3c2f 7370 616e 3e20 7873 645f 5f69 6e74 xsd__int │ │ │ │ +000e12b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
typedef │ │ │ │ +000e12f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 float< │ │ │ │ +000e1310: 2f73 7061 6e3e 2078 7364 5f5f 666c 6f61 /span> xsd__floa │ │ │ │ +000e1320: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
enum ns │ │ │ │ +000e1360: 5f5f 7374 6174 7573 207b 206f 6e2c 206f __status { on, o │ │ │ │ +000e1370: 6666 207d 3b20 3c2f 6469 763e 0a3c 6469 ff };
.< │ │ │ │ +000e1390: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e13a0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct ns__widget.
{
. │ │ │ │ -000e13f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
char *name;
│ │ │ │ -000e1440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int part │ │ │ │ -000e1480: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
};.
i │ │ │ │ -000e14d0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7765 nt ns__we │ │ │ │ -000e14e0: 626d 6574 686f 6428 3c73 7061 6e20 636c bmethod(int __t │ │ │ │ -000e1510: 7970 652c 203c 7370 616e 2063 6c61 7373 ype, v │ │ │ │ -000e1530: 6f69 643c 2f73 7061 6e3e 202a 6461 7461 oid *data │ │ │ │ -000e1540: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct ns__webmet │ │ │ │ -000e1570: 686f 6452 6573 706f 6e73 6520 7b20 3c73 hodResponse { int __type; void │ │ │ │ -000e15d0: 202a 7265 7475 726e 5f3b 207d 202a 6f75 *return_; } *ou │ │ │ │ -000e15e0: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
.
│ │ │ │ -000e15f0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

This m │ │ │ │ +000e15f0: 6574 686f 6420 6861 7320 6120 706f 6c79 ethod has a poly │ │ │ │ +000e1600: 6d6f 7270 6869 6320 696e 7075 7420 7061 morphic input pa │ │ │ │ +000e1610: 7261 6d65 7465 7220 3c63 6f64 653e 6461 rameter da │ │ │ │ +000e1620: 7461 3c2f 636f 6465 3e20 616e 6420 6120 ta and a │ │ │ │ +000e1630: 706f 6c79 6d6f 7270 6869 6320 6f75 7470 polymorphic outp │ │ │ │ +000e1640: 7574 2070 6172 616d 6574 6572 203c 636f ut parameter return_. The __t │ │ │ │ +000e1670: 7970 653c 2f63 6f64 653e 2070 6172 616d ype param │ │ │ │ +000e1680: 6574 6572 7320 6361 6e20 6265 206f 6e65 eters can be one │ │ │ │ +000e1690: 206f 6620 3c63 6f64 653e 534f 4150 5f54 of SOAP_T │ │ │ │ +000e16a0: 5950 455f 7873 645f 5f73 7472 696e 673c YPE_xsd__string< │ │ │ │ +000e16b0: 2f63 6f64 653e 2c20 3c63 6f64 653e 534f /code>, SO │ │ │ │ +000e16c0: 4150 5f54 5950 455f 7873 645f 5f69 6e74 AP_TYPE_xsd__int │ │ │ │ +000e16d0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e53 , S │ │ │ │ +000e16e0: 4f41 505f 5459 5045 5f78 7364 5f5f 666c OAP_TYPE_xsd__fl │ │ │ │ +000e16f0: 6f61 743c 2f63 6f64 653e 2c20 3c63 6f64 oat, SOAP_TYPE_ns__ │ │ │ │ +000e1710: 7374 6174 7573 3c2f 636f 6465 3e2c 206f status, o │ │ │ │ +000e1720: 7220 3c63 6f64 653e 534f 4150 5f54 5950 r SOAP_TYP │ │ │ │ +000e1730: 455f 6e73 5f5f 7769 6467 6574 3c2f 636f E_ns__widget. The WSDL an │ │ │ │ +000e1750: 6420 5853 4420 6669 6c65 7320 7072 6f64 d XSD files prod │ │ │ │ +000e1760: 7563 6564 2062 7920 7468 6520 736f 6170 uced by the soap │ │ │ │ +000e1770: 6370 7032 2074 6f6f 6c20 6465 636c 6172 cpp2 tool declar │ │ │ │ +000e1780: 6520 7468 6520 3c63 6f64 653e 766f 6964 e the void │ │ │ │ +000e1790: 2a3c 2f63 6f64 653e 2070 6f6c 796d 6f72 * polymor │ │ │ │ +000e17a0: 7068 6963 206d 656d 6265 7273 2061 7320 phic members as │ │ │ │ +000e17b0: 3c65 6d3e 3c63 6f64 653e 7873 643a 616e xsd:an │ │ │ │ +000e17c0: 7954 7970 653c 2f63 6f64 653e 3c2f 656d yType elements.

. │ │ │ │ +000e17e0: 3c70 3e54 6f20 6465 636c 6172 6520 6120

To declare a │ │ │ │ +000e17f0: 7772 6170 7065 7220 7374 7275 6374 2f63 wrapper struct/c │ │ │ │ +000e1800: 6c61 7373 2066 6f72 203c 636f 6465 3e76 lass for v │ │ │ │ +000e1810: 6f69 642a 3c2f 636f 6465 3e20 706f 696e oid* poin │ │ │ │ +000e1820: 7465 7273 2061 6c6c 6f77 7320 7573 2074 ters allows us t │ │ │ │ +000e1830: 6f20 7265 7573 6520 7468 6973 206d 6563 o reuse this mec │ │ │ │ +000e1840: 6861 6e69 736d 2077 6865 6e20 7765 2075 hanism when we u │ │ │ │ +000e1850: 7365 203c 636f 6465 3e5f 5f73 656c 663c se __self< │ │ │ │ +000e1860: 2f63 6f64 653e 2061 7320 6120 6d65 6d62 /code> as a memb │ │ │ │ +000e1870: 6572 206e 616d 6520 7468 6174 2072 6566 er name that ref │ │ │ │ +000e1880: 6572 7320 746f 2074 6865 2063 7572 7265 ers to the curre │ │ │ │ +000e1890: 6e74 2058 4d4c 2065 6c65 6d65 6e74 2074 nt XML element t │ │ │ │ +000e18a0: 6167 206e 616d 653a 3c2f 703e 0a3c 6469 ag name:

.
struc │ │ │ │ +000e18f0: 7420 3c2f 7370 616e 3e5f 5f61 6e79 203c t __any < │ │ │ │ +000e1900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ 000e1920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
│ │ │ │ -000e1950: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __type; < │ │ │ │ -000e1980: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000e1990: 656e 7422 3e2f 2f20 7468 6520 534f 4150 ent">// the SOAP │ │ │ │ -000e19a0: 5f54 5950 455f 5420 706f 696e 7465 6420 _TYPE_T pointed │ │ │ │ -000e19b0: 746f 2062 7920 5f5f 7365 6c66 3c2f 7370 to by __self
.
│ │ │ │ -000e19e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *__self; < │ │ │ │ -000e1a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000e1a20: 656e 7422 3e2f 2f20 7365 7269 616c 697a ent">// serializ │ │ │ │ -000e1a30: 6520 616e 7920 7479 7065 206f 6620 636f e any type of co │ │ │ │ -000e1a40: 6e74 656e 7420 6f66 2074 6865 2063 7572 ntent of the cur │ │ │ │ -000e1a50: 7265 6e74 2065 6c65 6d65 6e74 3c2f 7370 rent element
.
};.
str │ │ │ │ -000e1ab0: 7563 7420 3c2f 7370 616e 3e6e 735f 5f72 uct ns__r │ │ │ │ -000e1ac0: 6563 6f72 643c 2f64 6976 3e0a 3c64 6976 ecord
.
{< │ │ │ │ -000e1ae0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
__an │ │ │ │ -000e1b00: 7920 7661 6c3b 3c2f 6469 763e 0a3c 6469 y val;
.} │ │ │ │ -000e1b20: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
< │ │ │ │ -000e1b40: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following │ │ │ │ -000e1b50: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra │ │ │ │ -000e1b60: 7465 7320 7468 6520 696e 6974 6961 6c69 tes the initiali │ │ │ │ -000e1b70: 7a61 7469 6f6e 206f 6620 3c63 6f64 653e zation of │ │ │ │ -000e1b80: 5f5f 6e73 5f5f 7265 636f 7264 3c2f 636f __ns__record with a void │ │ │ │ -000e1ba0: 706f 696e 7465 7220 746f 2061 6e20 696e pointer to an in │ │ │ │ -000e1bb0: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

.
< │ │ │ │ -000e1be0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000e1bf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct ns__record S; │ │ │ │ -000e1c10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int n │ │ │ │ -000e1c50: 203d 2031 3233 3b20 3c2f 6469 763e 0a3c = 123;
.< │ │ │ │ -000e1c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e1c70: 3e53 2e76 616c 2e5f 5f69 7465 6d20 3d20 >S.val.__item = │ │ │ │ -000e1c80: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void< │ │ │ │ -000e1ca0: 2f73 7061 6e3e 2a29 2661 6d70 3b6e 3b20 /span>*)&n; │ │ │ │ -000e1cb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
S.val._ │ │ │ │ -000e1cd0: 5f74 7970 6520 3d20 534f 4150 5f54 5950 _type = SOAP_TYP │ │ │ │ -000e1ce0: 455f 696e 743b 203c 2f64 6976 3e0a 3c2f E_int;
.

The seri │ │ │ │ -000e1d10: 616c 697a 6564 206f 7574 7075 7420 6f66 alized output of │ │ │ │ -000e1d20: 203c 636f 6465 3e53 3c2f 636f 6465 3e20 S │ │ │ │ -000e1d30: 636f 6e74 6169 6e73 2074 6865 2069 6e74 contains the int │ │ │ │ -000e1d40: 6567 6572 3a3c 2f70 3e0a 3c64 6976 2063 eger:

.
<ns:record>
. │ │ │ │ -000e1dd0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <v │ │ │ │ -000e1df0: 616c 3c2f 7370 616e 3e20 3c73 7061 6e20 al │ │ │ │ -000e1e10: 7873 693a 7479 7065 3c2f 7370 616e 3e3d xsi:type= │ │ │ │ -000e1e20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -000e1e40: 743b 7873 643a 696e 7426 7175 6f74 3b3c t;xsd:int"< │ │ │ │ -000e1e50: 2f73 7061 6e3e 2667 743b 3132 3326 6c74 /span>>123< │ │ │ │ -000e1e60: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/val< │ │ │ │ -000e1e80: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
│ │ │ │ -000e1e90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
</ns:record>
.

.. │ │ │ │ -000e1f00: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ -000e1f10: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ -000e1f20: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

│ │ │ │ -000e1f30: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

.Fix │ │ │ │ -000e1f60: 6564 2d73 697a 6520 6172 7261 7920 7365 ed-size array se │ │ │ │ -000e1f70: 7269 616c 697a 6174 696f 6e3c 2f68 323e rialization

│ │ │ │ -000e1f80: 0a3c 703e 4669 7865 6420 7369 7a65 2061 .

Fixed size a │ │ │ │ -000e1f90: 7272 6179 7320 6172 6520 7365 7269 616c rrays are serial │ │ │ │ -000e1fa0: 697a 6564 2061 7320 7265 7065 7469 7469 ized as repetiti │ │ │ │ -000e1fb0: 6f6e 7320 6f66 203c 656d 3e3c 636f 6465 ons of item elements with │ │ │ │ -000e1fe0: 7468 6520 6172 7261 7920 7661 6c75 6573 the array values │ │ │ │ -000e1ff0: 2069 6e20 584d 4c2e 204d 756c 7469 2d64 in XML. Multi-d │ │ │ │ -000e2000: 696d 656e 7369 6f6e 616c 2066 6978 6564 imensional fixed │ │ │ │ -000e2010: 2073 697a 6520 6172 7261 7973 2061 7265 size arrays are │ │ │ │ -000e2020: 2073 6572 6961 6c69 7a65 6420 6173 206e serialized as n │ │ │ │ -000e2030: 6573 7465 6420 3c65 6d3e 3c63 6f64 653e ested │ │ │ │ -000e2040: 6974 656d 3c2f 636f 6465 3e3c 2f65 6d3e item │ │ │ │ -000e2050: 2065 6c65 6d65 6e74 732c 2077 6865 7265 elements, where │ │ │ │ -000e2060: 2074 6865 206f 7574 6572 2065 6c65 6d65 the outer eleme │ │ │ │ -000e2070: 6e74 7320 6172 6520 6172 7261 7973 2e3c nts are arrays.< │ │ │ │ -000e2080: 2f70 3e0a 3c70 3e54 6865 2073 6572 6961 /p>.

The seria │ │ │ │ -000e2090: 6c69 7a61 7469 6f6e 206f 6620 6669 7865 lization of fixe │ │ │ │ -000e20a0: 642d 7369 7a65 2061 7272 6179 7320 7375 d-size arrays su │ │ │ │ -000e20b0: 7070 6f72 7473 2074 6865 2053 4f41 5020 pports the SOAP │ │ │ │ -000e20c0: 5250 4320 656e 636f 6469 6e67 206d 756c RPC encoding mul │ │ │ │ -000e20d0: 7469 2d64 696d 656e 7369 6f6e 616c 2061 ti-dimensional a │ │ │ │ -000e20e0: 7272 6179 2066 6f72 6d61 7420 6173 2077 rray format as w │ │ │ │ -000e20f0: 656c 6c20 6173 2070 6172 7469 616c 6c79 ell as partially │ │ │ │ -000e2100: 2074 7261 6e73 6d69 7474 6564 2061 6e64 transmitted and │ │ │ │ -000e2110: 2073 7061 7273 6520 6172 7261 7920 666f sparse array fo │ │ │ │ -000e2120: 726d 6174 7320 7374 616e 6461 7264 697a rmats standardiz │ │ │ │ -000e2130: 6564 2069 6e20 534f 4150 2031 2e31 2061 ed in SOAP 1.1 a │ │ │ │ -000e2140: 6e64 2031 2e32 2e3c 2f70 3e0a 3c70 3e46 nd 1.2.

.

F │ │ │ │ -000e2150: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

. │ │ │ │ -000e2160: 3c64 6976 2063 6c61 7373 3d22 6672 6167
// │ │ │ │ -000e21a0: 2043 6f6e 7465 6e74 7320 6f66 2066 696c Contents of fil │ │ │ │ -000e21b0: 6520 2671 756f 743b 6669 7865 642e 6826 e "fixed.h& │ │ │ │ -000e21c0: 7175 6f74 3b3a 203c 2f73 7061 6e3e 3c2f quot;: .
str │ │ │ │ -000e2200: 7563 7420 3c2f 7370 616e 3e45 7861 6d70 uct Examp │ │ │ │ -000e2210: 6c65 203c 2f64 6976 3e0a 3c64 6976 2063 le
.
{.
float │ │ │ │ -000e2270: 2061 5b33 5d3b 203c 2f64 6976 3e0a 3c64 a[3];
. │ │ │ │ -000e2290: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
< │ │ │ │ -000e22a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -000e22b0: 3c70 3e54 6869 7320 7370 6563 6966 6965

This specifie │ │ │ │ -000e22c0: 7320 6120 6669 7865 642d 7369 7a65 2061 s a fixed-size a │ │ │ │ -000e22d0: 7272 6179 2070 6172 7420 6f66 2074 6865 rray part of the │ │ │ │ -000e22e0: 203c 636f 6465 3e73 7472 7563 7420 4578 struct Ex │ │ │ │ -000e22f0: 616d 706c 653c 2f63 6f64 653e 2e20 5468 ample. Th │ │ │ │ -000e2300: 6520 7365 7269 616c 697a 6564 206f 7574 e serialized out │ │ │ │ -000e2310: 7075 7420 6f66 2061 7272 6179 203c 636f put of array a is:< │ │ │ │ -000e2330: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l │ │ │ │ -000e2370: 743b 3c73 7061 6e20 636c 6173 733d 226b t;a>
.< │ │ │ │ -000e23a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e23b0: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <item> │ │ │ │ -000e23e0: 312e 3026 6c74 3b2f 3c73 7061 6e20 636c 1.0</item> │ │ │ │ -000e2410: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
< │ │ │ │ -000e2430: 3c73 7061 6e20 636c 6173 733d 226b 6579 item>2.0< │ │ │ │ -000e2460: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /item< │ │ │ │ -000e2480: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
│ │ │ │ -000e2490: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<item&g │ │ │ │ -000e24d0: 743b 332e 3026 6c74 3b2f 3c73 7061 6e20 t;3.0</item& │ │ │ │ -000e2500: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
< │ │ │ │ -000e2520: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /a>
.

A │ │ │ │ -000e2570: 6e79 2064 6573 6572 6961 6c69 7a65 6420 ny deserialized │ │ │ │ -000e2580: 6974 656d 7320 6f66 2061 6e20 6172 7261 items of an arra │ │ │ │ -000e2590: 7920 7468 6174 2064 6f20 6e6f 7420 6669 y that do not fi │ │ │ │ -000e25a0: 7420 696e 2074 6865 2066 6978 6564 2073 t in the fixed s │ │ │ │ -000e25b0: 697a 6520 6172 7261 792c 2069 2e65 2e20 ize array, i.e. │ │ │ │ -000e25c0: 6172 6520 6f75 7420 6f66 2062 6f75 6e64 are out of bound │ │ │ │ -000e25d0: 732c 2061 7265 2069 676e 6f72 6564 2062 s, are ignored b │ │ │ │ -000e25e0: 7920 7468 6520 6465 7365 7269 616c 697a y the deserializ │ │ │ │ -000e25f0: 6572 2077 6865 6e20 7468 6520 3c63 6f64 er when the #SOAP_C_NOIOB< │ │ │ │ -000e2610: 2f63 6f64 653e 2066 6c61 6720 6973 2073 /code> flag is s │ │ │ │ -000e2620: 6574 2c20 6f74 6865 7277 6973 6520 3c63 et, otherwise #SOAP_IOB errors will │ │ │ │ -000e2650: 2062 6520 6765 6e65 7261 7465 6420 6279 be generated by │ │ │ │ -000e2660: 2074 6865 2064 6573 6572 6961 6c69 7a65 the deserialize │ │ │ │ -000e2670: 722e 3c2f 703e 0a3c 703e f09f 949d 203c r.

.

.... < │ │ │ │ -000e2680: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -000e2690: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -000e26a0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

.

.Dynamic ar │ │ │ │ -000e26e0: 7261 7920 7365 7269 616c 697a 6174 696f ray serializatio │ │ │ │ -000e26f0: 6e3c 2f68 323e 0a3c 703e 4479 6e61 6d69 n

.

Dynami │ │ │ │ -000e2700: 6320 6172 7261 7973 2061 7265 206d 7563 c arrays are muc │ │ │ │ -000e2710: 6820 6d6f 7265 2066 6c65 7869 626c 6520 h more flexible │ │ │ │ -000e2720: 7468 616e 2066 6978 6564 2d73 697a 6520 than fixed-size │ │ │ │ -000e2730: 6172 7261 7973 2e20 4479 6e61 6d69 6320 arrays. Dynamic │ │ │ │ -000e2740: 6172 7261 7973 2064 6563 6c61 7265 6420 arrays declared │ │ │ │ -000e2750: 696e 2074 6865 2069 6e74 6572 6661 6365 in the interface │ │ │ │ -000e2760: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for │ │ │ │ -000e2770: 2073 6f61 7063 7070 3220 6172 6520 6120 soapcpp2 are a │ │ │ │ -000e2780: 7370 6563 6961 6c20 7374 7275 6374 206f special struct o │ │ │ │ -000e2790: 7220 636c 6173 7320 6f72 2061 7265 2070 r class or are p │ │ │ │ -000e27a0: 6172 7420 6f66 2061 2073 7472 7563 7420 art of a struct │ │ │ │ -000e27b0: 6f72 2063 6c61 7373 2077 6974 6820 6120 or class with a │ │ │ │ -000e27c0: 6d65 6d62 6572 2070 6f69 6e74 696e 6720 member pointing │ │ │ │ -000e27d0: 746f 2061 6e20 6172 7261 7920 6f66 2065 to an array of e │ │ │ │ -000e27e0: 6c65 6d65 6e74 7320 616e 6420 6120 6d65 lements and a me │ │ │ │ -000e27f0: 6d62 6572 2074 6861 7420 7374 6f72 6573 mber that stores │ │ │ │ -000e2800: 2074 6865 2073 697a 6520 6f66 2074 6865 the size of the │ │ │ │ -000e2810: 2061 7272 6179 2e20 4479 6e61 6d69 6320 array. Dynamic │ │ │ │ -000e2820: 6172 7261 7920 616c 6c6f 6361 7469 6f6e array allocation │ │ │ │ -000e2830: 7320 6172 6520 6561 7379 2075 7369 6e67 s are easy using │ │ │ │ -000e2840: 2074 6865 2073 6f61 7063 7070 2d67 656e the soapcpp-gen │ │ │ │ -000e2850: 6572 6174 6564 203c 636f 6465 3e73 6f61 erated soa │ │ │ │ -000e2860: 705f 6e65 775f 543c 2f63 6f64 653e 2066 p_new_T f │ │ │ │ -000e2870: 756e 6374 696f 6e73 2066 6f72 2074 7970 unctions for typ │ │ │ │ -000e2880: 6520 3c63 6f64 653e 543c 2f63 6f64 653e e T │ │ │ │ -000e2890: 2e20 5468 6973 2066 756e 6374 696f 6e20 . This function │ │ │ │ -000e28a0: 6973 2075 7365 6420 746f 2061 6c6c 6f63 is used to alloc │ │ │ │ -000e28b0: 6174 6520 616e 2061 7272 6179 206f 6620 ate an array of │ │ │ │ -000e28c0: 7661 6c75 6573 2077 6869 6368 2063 616e values which can │ │ │ │ -000e28d0: 2074 6865 6e20 6265 2061 7373 6967 6e65 then be assigne │ │ │ │ -000e28e0: 6420 746f 2074 6865 2070 6f69 6e74 6572 d to the pointer │ │ │ │ -000e28f0: 206d 656d 6265 7220 6f66 2074 6865 2073 member of the s │ │ │ │ -000e2900: 7472 7563 742f 636c 6173 7320 7468 6174 truct/class that │ │ │ │ -000e2910: 2073 746f 7265 7320 7468 6520 6172 7261 stores the arra │ │ │ │ -000e2920: 7920 706f 696e 7465 7220 7769 7468 2069 y pointer with i │ │ │ │ -000e2930: 7473 2073 697a 652e 3c2f 703e 0a3c 703e ts size.

.

│ │ │ │ -000e2940: 546f 2066 6163 696c 6974 6174 6520 534f To facilitate SO │ │ │ │ -000e2950: 4150 2052 5043 2065 6e63 6f64 696e 672c AP RPC encoding, │ │ │ │ -000e2960: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar │ │ │ │ -000e2970: 7261 7973 2072 6571 7569 7265 2073 7065 rays require spe │ │ │ │ -000e2980: 6369 616c 2074 7265 6174 6d65 6e74 2e20 cial treatment. │ │ │ │ -000e2990: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr │ │ │ │ -000e29a0: 6179 7320 6172 6520 7369 6e67 6c65 2d20 ays are single- │ │ │ │ -000e29b0: 6f72 206d 756c 7469 2d64 696d 656e 7369 or multi-dimensi │ │ │ │ -000e29c0: 6f6e 616c 2061 7272 6179 7320 7769 7468 onal arrays with │ │ │ │ -000e29d0: 2062 6f75 6e64 7320 7468 6174 2061 7070 bounds that app │ │ │ │ -000e29e0: 6561 7220 696e 2058 4d4c 2e20 5468 6573 ear in XML. Thes │ │ │ │ -000e29f0: 6520 6172 7261 7973 206d 6179 2061 6c73 e arrays may als │ │ │ │ -000e2a00: 6f20 6861 7665 206f 6666 7365 7473 2074 o have offsets t │ │ │ │ -000e2a10: 6861 7420 6469 6666 6572 2066 726f 6d20 hat differ from │ │ │ │ -000e2a20: 7a65 726f 2e20 5468 6520 696e 7465 6e74 zero. The intent │ │ │ │ -000e2a30: 206f 6620 534f 4150 2d65 6e63 6f64 6564 of SOAP-encoded │ │ │ │ -000e2a40: 2061 7272 6179 7320 6973 2074 6f20 7265 arrays is to re │ │ │ │ -000e2a50: 706c 6963 6174 6520 6d75 6c74 692d 6469 plicate multi-di │ │ │ │ -000e2a60: 6d65 6e73 696f 6e61 6c20 6172 7261 7973 mensional arrays │ │ │ │ -000e2a70: 2063 6f6d 6d6f 6e6c 7920 666f 756e 6420 commonly found │ │ │ │ -000e2a80: 696e 2070 726f 6772 616d 6d69 6e67 206c in programming l │ │ │ │ -000e2a90: 616e 6775 6167 6573 2e3c 2f70 3e0a 3c70 anguages.

.

However, XML al │ │ │ │ -000e2ab0: 736f 2070 726f 7669 6465 7320 6120 7369 so provides a si │ │ │ │ -000e2ac0: 6d70 6c65 2077 6179 2074 6f20 7265 7072 mple way to repr │ │ │ │ -000e2ad0: 6573 656e 7420 6120 7365 7175 656e 6365 esent a sequence │ │ │ │ -000e2ae0: 206f 6620 7661 6c75 6573 2077 6974 6820 of values with │ │ │ │ -000e2af0: 6120 7365 7175 656e 6365 206f 6620 584d a sequence of XM │ │ │ │ -000e2b00: 4c20 656c 656d 656e 7473 2e20 5468 6973 L elements. This │ │ │ │ -000e2b10: 2064 6966 6665 7273 2066 726f 6d20 534f differs from SO │ │ │ │ -000e2b20: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array │ │ │ │ -000e2b30: 7320 696e 2074 6861 7420 534f 4150 2d65 s in that SOAP-e │ │ │ │ -000e2b40: 6e63 6f64 6564 2061 7272 6179 7320 6172 ncoded arrays ar │ │ │ │ -000e2b50: 6520 656c 656d 656e 7473 2077 6974 6820 e elements with │ │ │ │ -000e2b60: 6e65 7374 6564 203c 656d 3e3c 636f 6465 nested item elements with │ │ │ │ -000e2b90: 7661 6c75 6573 2c20 7468 6f75 6768 2053 values, though S │ │ │ │ -000e2ba0: 4f41 5020 6465 7365 7269 616c 697a 6572 OAP deserializer │ │ │ │ -000e2bb0: 7320 6d61 7920 6967 6e6f 7265 2074 6865 s may ignore the │ │ │ │ -000e2bc0: 206e 616d 6520 6f66 2074 6865 7365 2065 name of these e │ │ │ │ -000e2bd0: 6c65 6d65 6e74 7320 7768 656e 2070 6172 lements when par │ │ │ │ -000e2be0: 7369 6e67 2058 4d4c 2061 7320 7374 6174 sing XML as stat │ │ │ │ -000e2bf0: 6564 2069 6e20 7468 6520 534f 4150 2073 ed in the SOAP s │ │ │ │ -000e2c00: 7065 6369 6669 6361 7469 6f6e 732e 3c2f pecifications..

Both SOAP- │ │ │ │ -000e2c20: 656e 636f 6465 6420 6172 7261 7973 2061 encoded arrays a │ │ │ │ -000e2c30: 6e64 2073 6571 7565 6e63 6573 206f 6620 nd sequences of │ │ │ │ -000e2c40: 584d 4c20 656c 656d 656e 7473 2061 7265 XML elements are │ │ │ │ -000e2c50: 2073 7570 706f 7274 6564 2069 6e20 6753 supported in gS │ │ │ │ -000e2c60: 4f41 502c 2075 7369 6e67 2064 796e 616d OAP, using dynam │ │ │ │ -000e2c70: 6963 2061 7272 6179 7320 616e 6420 636f ic arrays and co │ │ │ │ -000e2c80: 6e74 6169 6e65 7273 2e20 5468 6520 6261 ntainers. The ba │ │ │ │ -000e2c90: 7369 6373 2077 696c 6c20 6265 2064 6573 sics will be des │ │ │ │ -000e2ca0: 6372 6962 6564 206e 6578 742e 2046 6f72 cribed next. For │ │ │ │ -000e2cb0: 2061 6464 6974 696f 6e61 6c20 6465 7461 additional deta │ │ │ │ -000e2cc0: 696c 732c 2073 6565 2074 6865 203c 6120 ils, see the C and C │ │ │ │ -000e2d00: 2b2b 2058 4d4c 2044 6174 6120 4269 6e64 ++ XML Data Bind │ │ │ │ -000e2d10: 696e 6773 3c2f 613e 2064 6f63 756d 656e ings documen │ │ │ │ -000e2d20: 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 tation.

.

. │ │ │ │ -000e2d30: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -000e2d40: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -000e2d50: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

.

.SO │ │ │ │ -000e2d90: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array │ │ │ │ -000e2da0: 2062 6f75 6e64 733c 2f68 333e 0a3c 703e bounds

.

│ │ │ │ -000e2db0: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr │ │ │ │ -000e2dc0: 6179 7320 7573 6520 7468 6520 3c65 6d3e ays use the │ │ │ │ -000e2dd0: 3c63 6f64 653e 534f 4150 2d45 4e43 3a41 SOAP-ENC:A │ │ │ │ -000e2de0: 7272 6179 3c2f 636f 6465 3e3c 2f65 6d3e rray │ │ │ │ -000e2df0: 2061 7474 7269 6275 7465 2069 6e20 584d attribute in XM │ │ │ │ -000e2e00: 4c20 746f 2069 6465 6e74 6966 7920 7468 L to identify th │ │ │ │ -000e2e10: 6520 6172 7261 7920 616e 6420 7468 6520 e array and the │ │ │ │ -000e2e20: 3c65 6d3e 3c63 6f64 653e 534f 4150 2d45 SOAP-E │ │ │ │ -000e2e30: 4e43 3a61 7272 6179 5479 7065 3c2f 636f NC:arrayType attribu │ │ │ │ -000e2e50: 7465 2074 6f20 6964 656e 7469 6679 2074 te to identify t │ │ │ │ -000e2e60: 6865 2061 7272 6179 2064 696d 656e 7369 he array dimensi │ │ │ │ -000e2e70: 6f6e 616c 6974 7920 616e 6420 6974 7320 onality and its │ │ │ │ -000e2e80: 7369 7a65 2e3c 2f70 3e0a 3c70 3e41 7320 size.

.

As │ │ │ │ -000e2e90: 6120 7365 6375 7269 7479 206d 6561 7375 a security measu │ │ │ │ -000e2ea0: 7265 2074 6f20 6176 6f69 6420 6465 6e69 re to avoid deni │ │ │ │ -000e2eb0: 616c 206f 6620 7365 7276 6963 6520 6174 al of service at │ │ │ │ -000e2ec0: 7461 636b 7320 6261 7365 6420 6f6e 2073 tacks based on s │ │ │ │ -000e2ed0: 656e 6469 6e67 2061 2068 7567 6520 6172 ending a huge ar │ │ │ │ -000e2ee0: 7261 7920 7369 7a65 2076 616c 7565 2075 ray size value u │ │ │ │ -000e2ef0: 7369 6e67 2074 6865 203c 656d 3e3c 636f sing the SOAP-ENC:arra │ │ │ │ -000e2f10: 7954 7970 653c 2f63 6f64 653e 3c2f 656d yType attribute, req │ │ │ │ -000e2f30: 7569 7269 6e67 2074 6865 2061 6c6c 6f63 uiring the alloc │ │ │ │ -000e2f40: 6174 696f 6e20 6f66 206c 6172 6765 2063 ation of large c │ │ │ │ -000e2f50: 6875 6e6b 7320 6f66 206d 656d 6f72 792c hunks of memory, │ │ │ │ -000e2f60: 2074 6865 2074 6f74 616c 206e 756d 6265 the total numbe │ │ │ │ -000e2f70: 7220 6f66 2061 7272 6179 2065 6c65 6d65 r of array eleme │ │ │ │ -000e2f80: 6e74 7320 7365 7420 6279 2074 6865 203c nts set by the < │ │ │ │ -000e2f90: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN │ │ │ │ -000e2fa0: 433a 6172 7261 7954 7970 653c 2f63 6f64 C:arrayType attribut │ │ │ │ -000e2fc0: 6520 6361 6e6e 6f74 2065 7863 6565 6420 e cannot exceed │ │ │ │ -000e2fd0: 3c63 6f64 653e 2353 4f41 505f 4d41 5841 #SOAP_MAXA │ │ │ │ -000e2fe0: 5252 4159 5349 5a45 3c2f 636f 6465 3e2c RRAYSIZE, │ │ │ │ -000e2ff0: 2077 6869 6368 2069 7320 7365 7420 746f which is set to │ │ │ │ -000e3000: 2031 3030 3030 3020 6279 2064 6566 6175 100000 by defau │ │ │ │ -000e3010: 6c74 2e20 5468 6973 206c 696d 6974 2069 lt. This limit i │ │ │ │ -000e3020: 7320 6e6f 7420 6120 6861 7264 206c 696d s not a hard lim │ │ │ │ -000e3030: 6974 206f 6e20 7468 6520 6e75 6d62 6572 it on the number │ │ │ │ -000e3040: 206f 6620 6172 7261 7920 656c 656d 656e of array elemen │ │ │ │ -000e3050: 7473 2c20 6275 7420 7261 7468 6572 2074 ts, but rather t │ │ │ │ -000e3060: 6f20 6176 6f69 6420 7072 652d 616c 6c6f o avoid pre-allo │ │ │ │ -000e3070: 6361 7469 6e67 206c 6172 6765 2061 7272 cating large arr │ │ │ │ -000e3080: 6179 7320 6173 2073 7461 7465 642e 2054 ays as stated. T │ │ │ │ -000e3090: 6865 2068 6172 6420 6c69 6d69 7420 6f6e he hard limit on │ │ │ │ -000e30a0: 2074 6865 206e 756d 6265 7220 6f66 2061 the number of a │ │ │ │ -000e30b0: 7272 6179 2065 6c65 6d65 6e74 7320 7265 rray elements re │ │ │ │ -000e30c0: 6365 6976 6564 2069 7320 3c63 6f64 653e ceived is │ │ │ │ -000e30d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ma │ │ │ │ -000e3190: 786f 6363 7572 733c 2f61 3e3c 2f63 6f64 xoccurs which is set │ │ │ │ -000e31b0: 746f 203c 636f 6465 3e23 534f 4150 5f4d to #SOAP_M │ │ │ │ -000e31c0: 4158 4f43 4355 5253 3c2f 636f 6465 3e20 AXOCCURS │ │ │ │ -000e31d0: 6279 2064 6566 6175 6c74 2e20 4279 2063 by default. By c │ │ │ │ -000e31e0: 6f6e 7472 6173 742c 2074 6865 203c 636f ontrast, the #SOAP_MAXARRA │ │ │ │ -000e3200: 5953 495a 453c 2f63 6f64 653e 206c 696d YSIZE lim │ │ │ │ -000e3210: 6974 206f 6e6c 7920 6e65 6761 7469 7665 it only negative │ │ │ │ -000e3220: 6c79 2061 6666 6563 7473 206d 756c 7469 ly affects multi │ │ │ │ -000e3230: 2d64 696d 656e 7369 6f6e 616c 2061 7272 -dimensional arr │ │ │ │ -000e3240: 6179 7320 6265 6361 7573 6520 7468 6520 ays because the │ │ │ │ -000e3250: 6469 6d65 6e73 696f 6e61 6c69 7479 206f dimensionality o │ │ │ │ -000e3260: 6620 7468 6520 7265 6365 6976 696e 6720 f the receiving │ │ │ │ -000e3270: 6172 7261 7920 6d61 7920 6265 206c 6f73 array may be los │ │ │ │ -000e3280: 7420 7768 656e 2074 6865 206e 756d 6265 t when the numbe │ │ │ │ -000e3290: 7220 6f66 2065 6c65 6d65 6e74 7320 6578 r of elements ex │ │ │ │ -000e32a0: 6365 6564 7320 3130 3030 3030 2e20 4f6e ceeds 100000. On │ │ │ │ -000e32b0: 652d 6469 6d65 6e73 696f 6e61 6c20 6172 e-dimensional ar │ │ │ │ -000e32c0: 7261 7973 2061 7265 206e 6f74 2061 6666 rays are not aff │ │ │ │ -000e32d0: 6563 7465 6420 616e 6420 706f 7075 6c61 ected and popula │ │ │ │ -000e32e0: 7465 6420 6166 7465 7220 7468 6973 206c ted after this l │ │ │ │ -000e32f0: 696d 6974 2062 7920 7369 6d70 6c79 2064 imit by simply d │ │ │ │ -000e3300: 6573 6572 6961 6c69 7a69 6e67 2074 6865 eserializing the │ │ │ │ -000e3310: 2061 7272 6179 2065 6c65 6d65 6e74 7320 array elements │ │ │ │ -000e3320: 7265 6365 6976 6564 2e3c 2f70 3e0a 3c70 received.

.

.... Back to table │ │ │ │ -000e3350: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents< │ │ │ │ -000e3360: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

.One-dim │ │ │ │ -000e3390: 656e 7369 6f6e 616c 2064 796e 616d 6963 ensional dynamic │ │ │ │ -000e33a0: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar │ │ │ │ -000e33b0: 7261 7973 3c2f 6833 3e0a 3c70 3e41 2073 rays

.

A s │ │ │ │ -000e33c0: 7065 6369 616c 2066 6f72 6d20 6f66 2073 pecial form of s │ │ │ │ -000e33d0: 7472 7563 7420 6f72 2063 6c61 7373 2069 truct or class i │ │ │ │ -000e33e0: 7320 7573 6564 2074 6f20 6465 6669 6e65 s used to define │ │ │ │ -000e33f0: 206f 6e65 2d64 696d 656e 7369 6f6e 616c one-dimensional │ │ │ │ -000e3400: 2064 796e 616d 6963 2053 4f41 502d 656e dynamic SOAP-en │ │ │ │ -000e3410: 636f 6465 6420 6172 7261 7973 2069 6e20 coded arrays in │ │ │ │ -000e3420: 616e 2069 6e74 6572 6661 6365 2068 6561 an interface hea │ │ │ │ -000e3430: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa │ │ │ │ -000e3440: 7063 7070 322e 2045 6163 6820 6172 7261 pcpp2. Each arra │ │ │ │ -000e3450: 7920 6861 7320 6120 706f 696e 7465 7220 y has a pointer │ │ │ │ -000e3460: 7661 7269 6162 6c65 2061 6e64 2061 206d variable and a m │ │ │ │ -000e3470: 656d 6265 7220 7468 6174 2072 6563 6f72 ember that recor │ │ │ │ -000e3480: 6473 2074 6865 206e 756d 6265 7220 6f66 ds the number of │ │ │ │ -000e3490: 2065 6c65 6d65 6e74 7320 7468 6520 706f elements the po │ │ │ │ -000e34a0: 696e 7465 7220 706f 696e 7473 2074 6f20 inter points to │ │ │ │ -000e34b0: 696e 206d 656d 6f72 792e 3c2f 703e 0a3c in memory.

.< │ │ │ │ -000e34c0: 703e 5468 6520 6765 6e65 7261 6c20 666f p>The general fo │ │ │ │ -000e34d0: 726d 206f 6620 7468 6520 7374 7275 6374 rm of the struct │ │ │ │ -000e34e0: 206f 7220 636c 6173 7320 6465 636c 6172 or class declar │ │ │ │ -000e34f0: 6174 696f 6e20 7468 6174 2063 6f6e 7461 ation that conta │ │ │ │ -000e3500: 696e 7320 6120 6f6e 652d 6469 6d65 6e73 ins a one-dimens │ │ │ │ -000e3510: 696f 6e61 6c20 6479 6e61 6d69 6320 534f ional dynamic SO │ │ │ │ -000e3520: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array │ │ │ │ -000e3530: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

.
< │ │ │ │ -000e3550: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e3560: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct array_name │ │ │ │ +000e1930: 223e 2020 2020 3c73 7061 6e20 636c 6173 "> │ │ │ │ +000e1950: 696e 743c 2f73 7061 6e3e 205f 5f74 7970 int __typ │ │ │ │ +000e1960: 653b 2020 203c 7370 616e 2063 6c61 7373 e; // th │ │ │ │ +000e1980: 6520 534f 4150 5f54 5950 455f 5420 706f e SOAP_TYPE_T po │ │ │ │ +000e1990: 696e 7465 6420 746f 2062 7920 5f5f 7365 inted to by __se │ │ │ │ +000e19a0: 6c66 3c2f 7370 616e 3e3c 2f64 6976 3e0a lf
. │ │ │ │ +000e19b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
│ │ │ │ +000e19e0: 766f 6964 3c2f 7370 616e 3e20 2a5f 5f73 void *__s │ │ │ │ +000e19f0: 656c 663b 203c 7370 616e 2063 6c61 7373 elf; // se │ │ │ │ +000e1a10: 7269 616c 697a 6520 616e 7920 7479 7065 rialize any type │ │ │ │ +000e1a20: 206f 6620 636f 6e74 656e 7420 6f66 2074 of content of t │ │ │ │ +000e1a30: 6865 2063 7572 7265 6e74 2065 6c65 6d65 he current eleme │ │ │ │ +000e1a40: 6e74 3c2f 7370 616e 3e3c 2f64 6976 3e0a nt
. │ │ │ │ +000e1a50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.
struct ns__record
.
{
.
│ │ │ │ +000e1ae0: 2020 5f5f 616e 7920 7661 6c3b 3c2f 6469 __any val;.
};
.

The foll │ │ │ │ +000e1b30: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il │ │ │ │ +000e1b40: 6c75 7374 7261 7465 7320 7468 6520 696e lustrates the in │ │ │ │ +000e1b50: 6974 6961 6c69 7a61 7469 6f6e 206f 6620 itialization of │ │ │ │ +000e1b60: 3c63 6f64 653e 5f5f 6e73 5f5f 7265 636f __ns__reco │ │ │ │ +000e1b70: 7264 3c2f 636f 6465 3e20 7769 7468 2061 rd with a │ │ │ │ +000e1b80: 2076 6f69 6420 706f 696e 7465 7220 746f void pointer to │ │ │ │ +000e1b90: 2061 6e20 696e 743a 3c2f 703e 0a3c 6469 an int:

.
struc │ │ │ │ +000e1be0: 7420 3c2f 7370 616e 3e6e 735f 5f72 6563 t ns__rec │ │ │ │ +000e1bf0: 6f72 6420 533b 203c 2f64 6976 3e0a 3c64 ord S;
. │ │ │ │ +000e1c10: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
n = 123; .
S.val.__i │ │ │ │ +000e1c60: 7465 6d20 3d20 283c 7370 616e 2063 6c61 tem = (void*)&a │ │ │ │ +000e1c90: 6d70 3b6e 3b20 3c2f 6469 763e 0a3c 6469 mp;n;
.S │ │ │ │ +000e1cb0: 2e76 616c 2e5f 5f74 7970 6520 3d20 534f .val.__type = SO │ │ │ │ +000e1cc0: 4150 5f54 5950 455f 696e 743b 203c 2f64 AP_TYPE_int; .

Th │ │ │ │ +000e1cf0: 6520 7365 7269 616c 697a 6564 206f 7574 e serialized out │ │ │ │ +000e1d00: 7075 7420 6f66 203c 636f 6465 3e53 3c2f put of S contains t │ │ │ │ +000e1d20: 6865 2069 6e74 6567 6572 3a3c 2f70 3e0a he integer:

. │ │ │ │ +000e1d30: 3c64 6976 2063 6c61 7373 3d22 616c 7422
<ns:recor │ │ │ │ +000e1d90: 643c 2f73 7061 6e3e 2667 743b 3c2f 6469 d>.
<val │ │ │ │ +000e1de0: 3c73 7061 6e20 636c 6173 733d 226b 6579 xsi:type="xsd:int& │ │ │ │ +000e1e30: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;> │ │ │ │ +000e1e40: 3132 3326 6c74 3b2f 3c73 7061 6e20 636c 123</val> │ │ │ │ +000e1e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</ns:recor │ │ │ │ +000e1eb0: 643c 2f73 7061 6e3e 2667 743b 3c2f 6469 d>.

.... Back to tab │ │ │ │ +000e1f00: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

.

.Fixed-size ar │ │ │ │ +000e1f50: 7261 7920 7365 7269 616c 697a 6174 696f ray serializatio │ │ │ │ +000e1f60: 6e3c 2f68 323e 0a3c 703e 4669 7865 6420 n

.

Fixed │ │ │ │ +000e1f70: 7369 7a65 2061 7272 6179 7320 6172 6520 size arrays are │ │ │ │ +000e1f80: 7365 7269 616c 697a 6564 2061 7320 7265 serialized as re │ │ │ │ +000e1f90: 7065 7469 7469 6f6e 7320 6f66 203c 656d petitions of item elements │ │ │ │ +000e1fc0: 2077 6974 6820 7468 6520 6172 7261 7920 with the array │ │ │ │ +000e1fd0: 7661 6c75 6573 2069 6e20 584d 4c2e 204d values in XML. M │ │ │ │ +000e1fe0: 756c 7469 2d64 696d 656e 7369 6f6e 616c ulti-dimensional │ │ │ │ +000e1ff0: 2066 6978 6564 2073 697a 6520 6172 7261 fixed size arra │ │ │ │ +000e2000: 7973 2061 7265 2073 6572 6961 6c69 7a65 ys are serialize │ │ │ │ +000e2010: 6420 6173 206e 6573 7465 6420 3c65 6d3e d as nested │ │ │ │ +000e2020: 3c63 6f64 653e 6974 656d 3c2f 636f 6465 item elements, │ │ │ │ +000e2040: 2077 6865 7265 2074 6865 206f 7574 6572 where the outer │ │ │ │ +000e2050: 2065 6c65 6d65 6e74 7320 6172 6520 6172 elements are ar │ │ │ │ +000e2060: 7261 7973 2e3c 2f70 3e0a 3c70 3e54 6865 rays.

.

The │ │ │ │ +000e2070: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o │ │ │ │ +000e2080: 6620 6669 7865 642d 7369 7a65 2061 7272 f fixed-size arr │ │ │ │ +000e2090: 6179 7320 7375 7070 6f72 7473 2074 6865 ays supports the │ │ │ │ +000e20a0: 2053 4f41 5020 5250 4320 656e 636f 6469 SOAP RPC encodi │ │ │ │ +000e20b0: 6e67 206d 756c 7469 2d64 696d 656e 7369 ng multi-dimensi │ │ │ │ +000e20c0: 6f6e 616c 2061 7272 6179 2066 6f72 6d61 onal array forma │ │ │ │ +000e20d0: 7420 6173 2077 656c 6c20 6173 2070 6172 t as well as par │ │ │ │ +000e20e0: 7469 616c 6c79 2074 7261 6e73 6d69 7474 tially transmitt │ │ │ │ +000e20f0: 6564 2061 6e64 2073 7061 7273 6520 6172 ed and sparse ar │ │ │ │ +000e2100: 7261 7920 666f 726d 6174 7320 7374 616e ray formats stan │ │ │ │ +000e2110: 6461 7264 697a 6564 2069 6e20 534f 4150 dardized in SOAP │ │ │ │ +000e2120: 2031 2e31 2061 6e64 2031 2e32 2e3c 2f70 1.1 and 1.2.

.

For example │ │ │ │ +000e2140: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
// Contents │ │ │ │ +000e2190: 6f66 2066 696c 6520 2671 756f 743b 6669 of file "fi │ │ │ │ +000e21a0: 7865 642e 6826 7175 6f74 3b3a 203c 2f73 xed.h":
.
struct Example
. │ │ │ │ +000e2200: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
│ │ │ │ +000e2230: 3c73 7061 6e20 636c 6173 733d 226b 6579 float< │ │ │ │ +000e2250: 2f73 7061 6e3e 2061 5b33 5d3b 203c 2f64 /span> a[3]; .
};
.< │ │ │ │ +000e2280: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

This sp │ │ │ │ +000e22a0: 6563 6966 6965 7320 6120 6669 7865 642d ecifies a fixed- │ │ │ │ +000e22b0: 7369 7a65 2061 7272 6179 2070 6172 7420 size array part │ │ │ │ +000e22c0: 6f66 2074 6865 203c 636f 6465 3e73 7472 of the str │ │ │ │ +000e22d0: 7563 7420 4578 616d 706c 653c 2f63 6f64 uct Example. The serializ │ │ │ │ +000e22f0: 6564 206f 7574 7075 7420 6f66 2061 7272 ed output of arr │ │ │ │ +000e2300: 6179 203c 636f 6465 3e61 3c2f 636f 6465 ay a is:

.
<a>.
<item>1.0</item>
. │ │ │ │ +000e2410: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ +000e2430: 6974 656d 3c2f 7370 616e 3e26 6774 3b32 item>2 │ │ │ │ +000e2440: 2e30 266c 743b 2f3c 7370 616e 2063 6c61 .0</item> │ │ │ │ +000e2470: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<< │ │ │ │ +000e2490: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e24a0: 6f72 6474 7970 6522 3e69 7465 6d3c 2f73 ordtype">item>3.0</ │ │ │ │ +000e24c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 item>
. │ │ │ │ +000e24f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
</a>.

Any deseria │ │ │ │ +000e2560: 6c69 7a65 6420 6974 656d 7320 6f66 2061 lized items of a │ │ │ │ +000e2570: 6e20 6172 7261 7920 7468 6174 2064 6f20 n array that do │ │ │ │ +000e2580: 6e6f 7420 6669 7420 696e 2074 6865 2066 not fit in the f │ │ │ │ +000e2590: 6978 6564 2073 697a 6520 6172 7261 792c ixed size array, │ │ │ │ +000e25a0: 2069 2e65 2e20 6172 6520 6f75 7420 6f66 i.e. are out of │ │ │ │ +000e25b0: 2062 6f75 6e64 732c 2061 7265 2069 676e bounds, are ign │ │ │ │ +000e25c0: 6f72 6564 2062 7920 7468 6520 6465 7365 ored by the dese │ │ │ │ +000e25d0: 7269 616c 697a 6572 2077 6865 6e20 7468 rializer when th │ │ │ │ +000e25e0: 6520 3c63 6f64 653e 2353 4f41 505f 435f e #SOAP_C_ │ │ │ │ +000e25f0: 4e4f 494f 423c 2f63 6f64 653e 2066 6c61 NOIOB fla │ │ │ │ +000e2600: 6720 6973 2073 6574 2c20 6f74 6865 7277 g is set, otherw │ │ │ │ +000e2610: 6973 6520 3c63 6f64 653e 2353 4f41 505f ise #SOAP_ │ │ │ │ +000e2620: 494f 423c 2f63 6f64 653e 2065 7272 6f72 IOB error │ │ │ │ +000e2630: 7320 7769 6c6c 2062 6520 6765 6e65 7261 s will be genera │ │ │ │ +000e2640: 7465 6420 6279 2074 6865 2064 6573 6572 ted by the deser │ │ │ │ +000e2650: 6961 6c69 7a65 722e 3c2f 703e 0a3c 703e ializer.

.

│ │ │ │ +000e2660: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +000e2680: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

.Dyna │ │ │ │ +000e26c0: 6d69 6320 6172 7261 7920 7365 7269 616c mic array serial │ │ │ │ +000e26d0: 697a 6174 696f 6e3c 2f68 323e 0a3c 703e ization

.

│ │ │ │ +000e26e0: 4479 6e61 6d69 6320 6172 7261 7973 2061 Dynamic arrays a │ │ │ │ +000e26f0: 7265 206d 7563 6820 6d6f 7265 2066 6c65 re much more fle │ │ │ │ +000e2700: 7869 626c 6520 7468 616e 2066 6978 6564 xible than fixed │ │ │ │ +000e2710: 2d73 697a 6520 6172 7261 7973 2e20 4479 -size arrays. Dy │ │ │ │ +000e2720: 6e61 6d69 6320 6172 7261 7973 2064 6563 namic arrays dec │ │ │ │ +000e2730: 6c61 7265 6420 696e 2074 6865 2069 6e74 lared in the int │ │ │ │ +000e2740: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ +000e2750: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 │ │ │ │ +000e2760: 6172 6520 6120 7370 6563 6961 6c20 7374 are a special st │ │ │ │ +000e2770: 7275 6374 206f 7220 636c 6173 7320 6f72 ruct or class or │ │ │ │ +000e2780: 2061 7265 2070 6172 7420 6f66 2061 2073 are part of a s │ │ │ │ +000e2790: 7472 7563 7420 6f72 2063 6c61 7373 2077 truct or class w │ │ │ │ +000e27a0: 6974 6820 6120 6d65 6d62 6572 2070 6f69 ith a member poi │ │ │ │ +000e27b0: 6e74 696e 6720 746f 2061 6e20 6172 7261 nting to an arra │ │ │ │ +000e27c0: 7920 6f66 2065 6c65 6d65 6e74 7320 616e y of elements an │ │ │ │ +000e27d0: 6420 6120 6d65 6d62 6572 2074 6861 7420 d a member that │ │ │ │ +000e27e0: 7374 6f72 6573 2074 6865 2073 697a 6520 stores the size │ │ │ │ +000e27f0: 6f66 2074 6865 2061 7272 6179 2e20 4479 of the array. Dy │ │ │ │ +000e2800: 6e61 6d69 6320 6172 7261 7920 616c 6c6f namic array allo │ │ │ │ +000e2810: 6361 7469 6f6e 7320 6172 6520 6561 7379 cations are easy │ │ │ │ +000e2820: 2075 7369 6e67 2074 6865 2073 6f61 7063 using the soapc │ │ │ │ +000e2830: 7070 2d67 656e 6572 6174 6564 203c 636f pp-generated soap_new_T functions f │ │ │ │ +000e2860: 6f72 2074 7970 6520 3c63 6f64 653e 543c or type T< │ │ │ │ +000e2870: 2f63 6f64 653e 2e20 5468 6973 2066 756e /code>. This fun │ │ │ │ +000e2880: 6374 696f 6e20 6973 2075 7365 6420 746f ction is used to │ │ │ │ +000e2890: 2061 6c6c 6f63 6174 6520 616e 2061 7272 allocate an arr │ │ │ │ +000e28a0: 6179 206f 6620 7661 6c75 6573 2077 6869 ay of values whi │ │ │ │ +000e28b0: 6368 2063 616e 2074 6865 6e20 6265 2061 ch can then be a │ │ │ │ +000e28c0: 7373 6967 6e65 6420 746f 2074 6865 2070 ssigned to the p │ │ │ │ +000e28d0: 6f69 6e74 6572 206d 656d 6265 7220 6f66 ointer member of │ │ │ │ +000e28e0: 2074 6865 2073 7472 7563 742f 636c 6173 the struct/clas │ │ │ │ +000e28f0: 7320 7468 6174 2073 746f 7265 7320 7468 s that stores th │ │ │ │ +000e2900: 6520 6172 7261 7920 706f 696e 7465 7220 e array pointer │ │ │ │ +000e2910: 7769 7468 2069 7473 2073 697a 652e 3c2f with its size..

To facilit │ │ │ │ +000e2930: 6174 6520 534f 4150 2052 5043 2065 6e63 ate SOAP RPC enc │ │ │ │ +000e2940: 6f64 696e 672c 2053 4f41 502d 656e 636f oding, SOAP-enco │ │ │ │ +000e2950: 6465 6420 6172 7261 7973 2072 6571 7569 ded arrays requi │ │ │ │ +000e2960: 7265 2073 7065 6369 616c 2074 7265 6174 re special treat │ │ │ │ +000e2970: 6d65 6e74 2e20 534f 4150 2d65 6e63 6f64 ment. SOAP-encod │ │ │ │ +000e2980: 6564 2061 7272 6179 7320 6172 6520 7369 ed arrays are si │ │ │ │ +000e2990: 6e67 6c65 2d20 6f72 206d 756c 7469 2d64 ngle- or multi-d │ │ │ │ +000e29a0: 696d 656e 7369 6f6e 616c 2061 7272 6179 imensional array │ │ │ │ +000e29b0: 7320 7769 7468 2062 6f75 6e64 7320 7468 s with bounds th │ │ │ │ +000e29c0: 6174 2061 7070 6561 7220 696e 2058 4d4c at appear in XML │ │ │ │ +000e29d0: 2e20 5468 6573 6520 6172 7261 7973 206d . These arrays m │ │ │ │ +000e29e0: 6179 2061 6c73 6f20 6861 7665 206f 6666 ay also have off │ │ │ │ +000e29f0: 7365 7473 2074 6861 7420 6469 6666 6572 sets that differ │ │ │ │ +000e2a00: 2066 726f 6d20 7a65 726f 2e20 5468 6520 from zero. The │ │ │ │ +000e2a10: 696e 7465 6e74 206f 6620 534f 4150 2d65 intent of SOAP-e │ │ │ │ +000e2a20: 6e63 6f64 6564 2061 7272 6179 7320 6973 ncoded arrays is │ │ │ │ +000e2a30: 2074 6f20 7265 706c 6963 6174 6520 6d75 to replicate mu │ │ │ │ +000e2a40: 6c74 692d 6469 6d65 6e73 696f 6e61 6c20 lti-dimensional │ │ │ │ +000e2a50: 6172 7261 7973 2063 6f6d 6d6f 6e6c 7920 arrays commonly │ │ │ │ +000e2a60: 666f 756e 6420 696e 2070 726f 6772 616d found in program │ │ │ │ +000e2a70: 6d69 6e67 206c 616e 6775 6167 6573 2e3c ming languages.< │ │ │ │ +000e2a80: 2f70 3e0a 3c70 3e48 6f77 6576 6572 2c20 /p>.

However, │ │ │ │ +000e2a90: 584d 4c20 616c 736f 2070 726f 7669 6465 XML also provide │ │ │ │ +000e2aa0: 7320 6120 7369 6d70 6c65 2077 6179 2074 s a simple way t │ │ │ │ +000e2ab0: 6f20 7265 7072 6573 656e 7420 6120 7365 o represent a se │ │ │ │ +000e2ac0: 7175 656e 6365 206f 6620 7661 6c75 6573 quence of values │ │ │ │ +000e2ad0: 2077 6974 6820 6120 7365 7175 656e 6365 with a sequence │ │ │ │ +000e2ae0: 206f 6620 584d 4c20 656c 656d 656e 7473 of XML elements │ │ │ │ +000e2af0: 2e20 5468 6973 2064 6966 6665 7273 2066 . This differs f │ │ │ │ +000e2b00: 726f 6d20 534f 4150 2d65 6e63 6f64 6564 rom SOAP-encoded │ │ │ │ +000e2b10: 2061 7272 6179 7320 696e 2074 6861 7420 arrays in that │ │ │ │ +000e2b20: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr │ │ │ │ +000e2b30: 6179 7320 6172 6520 656c 656d 656e 7473 ays are elements │ │ │ │ +000e2b40: 2077 6974 6820 6e65 7374 6564 203c 656d with nested item elements │ │ │ │ +000e2b70: 2077 6974 6820 7661 6c75 6573 2c20 7468 with values, th │ │ │ │ +000e2b80: 6f75 6768 2053 4f41 5020 6465 7365 7269 ough SOAP deseri │ │ │ │ +000e2b90: 616c 697a 6572 7320 6d61 7920 6967 6e6f alizers may igno │ │ │ │ +000e2ba0: 7265 2074 6865 206e 616d 6520 6f66 2074 re the name of t │ │ │ │ +000e2bb0: 6865 7365 2065 6c65 6d65 6e74 7320 7768 hese elements wh │ │ │ │ +000e2bc0: 656e 2070 6172 7369 6e67 2058 4d4c 2061 en parsing XML a │ │ │ │ +000e2bd0: 7320 7374 6174 6564 2069 6e20 7468 6520 s stated in the │ │ │ │ +000e2be0: 534f 4150 2073 7065 6369 6669 6361 7469 SOAP specificati │ │ │ │ +000e2bf0: 6f6e 732e 3c2f 703e 0a3c 703e 426f 7468 ons.

.

Both │ │ │ │ +000e2c00: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar │ │ │ │ +000e2c10: 7261 7973 2061 6e64 2073 6571 7565 6e63 rays and sequenc │ │ │ │ +000e2c20: 6573 206f 6620 584d 4c20 656c 656d 656e es of XML elemen │ │ │ │ +000e2c30: 7473 2061 7265 2073 7570 706f 7274 6564 ts are supported │ │ │ │ +000e2c40: 2069 6e20 6753 4f41 502c 2075 7369 6e67 in gSOAP, using │ │ │ │ +000e2c50: 2064 796e 616d 6963 2061 7272 6179 7320 dynamic arrays │ │ │ │ +000e2c60: 616e 6420 636f 6e74 6169 6e65 7273 2e20 and containers. │ │ │ │ +000e2c70: 5468 6520 6261 7369 6373 2077 696c 6c20 The basics will │ │ │ │ +000e2c80: 6265 2064 6573 6372 6962 6564 206e 6578 be described nex │ │ │ │ +000e2c90: 742e 2046 6f72 2061 6464 6974 696f 6e61 t. For additiona │ │ │ │ +000e2ca0: 6c20 6465 7461 696c 732c 2073 6565 2074 l details, see t │ │ │ │ +000e2cb0: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he C │ │ │ │ +000e2ce0: 2061 6e64 2043 2b2b 2058 4d4c 2044 6174 and C++ XML Dat │ │ │ │ +000e2cf0: 6120 4269 6e64 696e 6773 3c2f 613e 2064 a Bindings d │ │ │ │ +000e2d00: 6f63 756d 656e 7461 7469 6f6e 2e3c 2f70 ocumentation.

.

.... Back to ta │ │ │ │ +000e2d30: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +000e2d40: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

.

< │ │ │ │ +000e2d70: 2f61 3e0a 534f 4150 2d65 6e63 6f64 6564 /a>.SOAP-encoded │ │ │ │ +000e2d80: 2061 7272 6179 2062 6f75 6e64 733c 2f68 array bounds.

SOAP-encod │ │ │ │ +000e2da0: 6564 2061 7272 6179 7320 7573 6520 7468 ed arrays use th │ │ │ │ +000e2db0: 6520 3c65 6d3e 3c63 6f64 653e 534f 4150 e SOAP │ │ │ │ +000e2dc0: 2d45 4e43 3a41 7272 6179 3c2f 636f 6465 -ENC:Array attribute │ │ │ │ +000e2de0: 2069 6e20 584d 4c20 746f 2069 6465 6e74 in XML to ident │ │ │ │ +000e2df0: 6966 7920 7468 6520 6172 7261 7920 616e ify the array an │ │ │ │ +000e2e00: 6420 7468 6520 3c65 6d3e 3c63 6f64 653e d the │ │ │ │ +000e2e10: 534f 4150 2d45 4e43 3a61 7272 6179 5479 SOAP-ENC:arrayTy │ │ │ │ +000e2e20: 7065 3c2f 636f 6465 3e3c 2f65 6d3e 2061 pe a │ │ │ │ +000e2e30: 7474 7269 6275 7465 2074 6f20 6964 656e ttribute to iden │ │ │ │ +000e2e40: 7469 6679 2074 6865 2061 7272 6179 2064 tify the array d │ │ │ │ +000e2e50: 696d 656e 7369 6f6e 616c 6974 7920 616e imensionality an │ │ │ │ +000e2e60: 6420 6974 7320 7369 7a65 2e3c 2f70 3e0a d its size.

. │ │ │ │ +000e2e70: 3c70 3e41 7320 6120 7365 6375 7269 7479

As a security │ │ │ │ +000e2e80: 206d 6561 7375 7265 2074 6f20 6176 6f69 measure to avoi │ │ │ │ +000e2e90: 6420 6465 6e69 616c 206f 6620 7365 7276 d denial of serv │ │ │ │ +000e2ea0: 6963 6520 6174 7461 636b 7320 6261 7365 ice attacks base │ │ │ │ +000e2eb0: 6420 6f6e 2073 656e 6469 6e67 2061 2068 d on sending a h │ │ │ │ +000e2ec0: 7567 6520 6172 7261 7920 7369 7a65 2076 uge array size v │ │ │ │ +000e2ed0: 616c 7565 2075 7369 6e67 2074 6865 203c alue using the < │ │ │ │ +000e2ee0: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN │ │ │ │ +000e2ef0: 433a 6172 7261 7954 7970 653c 2f63 6f64 C:arrayType attribut │ │ │ │ +000e2f10: 652c 2072 6571 7569 7269 6e67 2074 6865 e, requiring the │ │ │ │ +000e2f20: 2061 6c6c 6f63 6174 696f 6e20 6f66 206c allocation of l │ │ │ │ +000e2f30: 6172 6765 2063 6875 6e6b 7320 6f66 206d arge chunks of m │ │ │ │ +000e2f40: 656d 6f72 792c 2074 6865 2074 6f74 616c emory, the total │ │ │ │ +000e2f50: 206e 756d 6265 7220 6f66 2061 7272 6179 number of array │ │ │ │ +000e2f60: 2065 6c65 6d65 6e74 7320 7365 7420 6279 elements set by │ │ │ │ +000e2f70: 2074 6865 203c 656d 3e3c 636f 6465 3e53 the S │ │ │ │ +000e2f80: 4f41 502d 454e 433a 6172 7261 7954 7970 OAP-ENC:arrayTyp │ │ │ │ +000e2f90: 653c 2f63 6f64 653e 3c2f 656d 3e20 6174 e at │ │ │ │ +000e2fa0: 7472 6962 7574 6520 6361 6e6e 6f74 2065 tribute cannot e │ │ │ │ +000e2fb0: 7863 6565 6420 3c63 6f64 653e 2353 4f41 xceed #SOA │ │ │ │ +000e2fc0: 505f 4d41 5841 5252 4159 5349 5a45 3c2f P_MAXARRAYSIZE, which is │ │ │ │ +000e2fe0: 7365 7420 746f 2031 3030 3030 3020 6279 set to 100000 by │ │ │ │ +000e2ff0: 2064 6566 6175 6c74 2e20 5468 6973 206c default. This l │ │ │ │ +000e3000: 696d 6974 2069 7320 6e6f 7420 6120 6861 imit is not a ha │ │ │ │ +000e3010: 7264 206c 696d 6974 206f 6e20 7468 6520 rd limit on the │ │ │ │ +000e3020: 6e75 6d62 6572 206f 6620 6172 7261 7920 number of array │ │ │ │ +000e3030: 656c 656d 656e 7473 2c20 6275 7420 7261 elements, but ra │ │ │ │ +000e3040: 7468 6572 2074 6f20 6176 6f69 6420 7072 ther to avoid pr │ │ │ │ +000e3050: 652d 616c 6c6f 6361 7469 6e67 206c 6172 e-allocating lar │ │ │ │ +000e3060: 6765 2061 7272 6179 7320 6173 2073 7461 ge arrays as sta │ │ │ │ +000e3070: 7465 642e 2054 6865 2068 6172 6420 6c69 ted. The hard li │ │ │ │ +000e3080: 6d69 7420 6f6e 2074 6865 206e 756d 6265 mit on the numbe │ │ │ │ +000e3090: 7220 6f66 2061 7272 6179 2065 6c65 6d65 r of array eleme │ │ │ │ +000e30a0: 6e74 7320 7265 6365 6976 6564 2069 7320 nts received is │ │ │ │ +000e30b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +000e3170: 6170 3a3a 6d61 786f 6363 7572 733c 2f61 ap::maxoccurs which i │ │ │ │ +000e3190: 7320 7365 7420 746f 203c 636f 6465 3e23 s set to # │ │ │ │ +000e31a0: 534f 4150 5f4d 4158 4f43 4355 5253 3c2f SOAP_MAXOCCURS by default │ │ │ │ +000e31c0: 2e20 4279 2063 6f6e 7472 6173 742c 2074 . By contrast, t │ │ │ │ +000e31d0: 6865 203c 636f 6465 3e23 534f 4150 5f4d he #SOAP_M │ │ │ │ +000e31e0: 4158 4152 5241 5953 495a 453c 2f63 6f64 AXARRAYSIZE limit only ne │ │ │ │ +000e3200: 6761 7469 7665 6c79 2061 6666 6563 7473 gatively affects │ │ │ │ +000e3210: 206d 756c 7469 2d64 696d 656e 7369 6f6e multi-dimension │ │ │ │ +000e3220: 616c 2061 7272 6179 7320 6265 6361 7573 al arrays becaus │ │ │ │ +000e3230: 6520 7468 6520 6469 6d65 6e73 696f 6e61 e the dimensiona │ │ │ │ +000e3240: 6c69 7479 206f 6620 7468 6520 7265 6365 lity of the rece │ │ │ │ +000e3250: 6976 696e 6720 6172 7261 7920 6d61 7920 iving array may │ │ │ │ +000e3260: 6265 206c 6f73 7420 7768 656e 2074 6865 be lost when the │ │ │ │ +000e3270: 206e 756d 6265 7220 6f66 2065 6c65 6d65 number of eleme │ │ │ │ +000e3280: 6e74 7320 6578 6365 6564 7320 3130 3030 nts exceeds 1000 │ │ │ │ +000e3290: 3030 2e20 4f6e 652d 6469 6d65 6e73 696f 00. One-dimensio │ │ │ │ +000e32a0: 6e61 6c20 6172 7261 7973 2061 7265 206e nal arrays are n │ │ │ │ +000e32b0: 6f74 2061 6666 6563 7465 6420 616e 6420 ot affected and │ │ │ │ +000e32c0: 706f 7075 6c61 7465 6420 6166 7465 7220 populated after │ │ │ │ +000e32d0: 7468 6973 206c 696d 6974 2062 7920 7369 this limit by si │ │ │ │ +000e32e0: 6d70 6c79 2064 6573 6572 6961 6c69 7a69 mply deserializi │ │ │ │ +000e32f0: 6e67 2074 6865 2061 7272 6179 2065 6c65 ng the array ele │ │ │ │ +000e3300: 6d65 6e74 7320 7265 6365 6976 6564 2e3c ments received.< │ │ │ │ +000e3310: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

.... Back to │ │ │ │ +000e3330: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ +000e3340: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

.

.O │ │ │ │ +000e3370: 6e65 2d64 696d 656e 7369 6f6e 616c 2064 ne-dimensional d │ │ │ │ +000e3380: 796e 616d 6963 2053 4f41 502d 656e 636f ynamic SOAP-enco │ │ │ │ +000e3390: 6465 6420 6172 7261 7973 3c2f 6833 3e0a ded arrays

. │ │ │ │ +000e33a0: 3c70 3e41 2073 7065 6369 616c 2066 6f72

A special for │ │ │ │ +000e33b0: 6d20 6f66 2073 7472 7563 7420 6f72 2063 m of struct or c │ │ │ │ +000e33c0: 6c61 7373 2069 7320 7573 6564 2074 6f20 lass is used to │ │ │ │ +000e33d0: 6465 6669 6e65 206f 6e65 2d64 696d 656e define one-dimen │ │ │ │ +000e33e0: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S │ │ │ │ +000e33f0: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra │ │ │ │ +000e3400: 7973 2069 6e20 616e 2069 6e74 6572 6661 ys in an interfa │ │ │ │ +000e3410: 6365 2068 6561 6465 7220 6669 6c65 2066 ce header file f │ │ │ │ +000e3420: 6f72 2073 6f61 7063 7070 322e 2045 6163 or soapcpp2. Eac │ │ │ │ +000e3430: 6820 6172 7261 7920 6861 7320 6120 706f h array has a po │ │ │ │ +000e3440: 696e 7465 7220 7661 7269 6162 6c65 2061 inter variable a │ │ │ │ +000e3450: 6e64 2061 206d 656d 6265 7220 7468 6174 nd a member that │ │ │ │ +000e3460: 2072 6563 6f72 6473 2074 6865 206e 756d records the num │ │ │ │ +000e3470: 6265 7220 6f66 2065 6c65 6d65 6e74 7320 ber of elements │ │ │ │ +000e3480: 7468 6520 706f 696e 7465 7220 706f 696e the pointer poin │ │ │ │ +000e3490: 7473 2074 6f20 696e 206d 656d 6f72 792e ts to in memory. │ │ │ │ +000e34a0: 3c2f 703e 0a3c 703e 5468 6520 6765 6e65

.

The gene │ │ │ │ +000e34b0: 7261 6c20 666f 726d 206f 6620 7468 6520 ral form of the │ │ │ │ +000e34c0: 7374 7275 6374 206f 7220 636c 6173 7320 struct or class │ │ │ │ +000e34d0: 6465 636c 6172 6174 696f 6e20 7468 6174 declaration that │ │ │ │ +000e34e0: 2063 6f6e 7461 696e 7320 6120 6f6e 652d contains a one- │ │ │ │ +000e34f0: 6469 6d65 6e73 696f 6e61 6c20 6479 6e61 dimensional dyna │ │ │ │ +000e3500: 6d69 6320 534f 4150 2d65 6e63 6f64 6564 mic SOAP-encoded │ │ │ │ +000e3510: 2061 7272 6179 2069 733a 3c2f 703e 0a3c array is:

.< │ │ │ │ +000e3520: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +000e3530: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
str │ │ │ │ +000e3560: 7563 7420 3c2f 7370 616e 3e61 7272 6179 uct array │ │ │ │ +000e3570: 5f6e 616d 6520 3c2f 6469 763e 0a3c 6469 _name
.{ │ │ │ │ 000e3590: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

.
{
│ │ │ │ -000e35b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Type *__p │ │ │ │ -000e35d0: 7472 3b20 203c 7370 616e 2063 6c61 7373 tr; // po │ │ │ │ -000e35f0: 696e 7465 7220 746f 2061 7272 6179 206f inter to array o │ │ │ │ -000e3600: 6620 656c 656d 656e 7473 2069 6e20 6d65 f elements in me │ │ │ │ -000e3610: 6d6f 7279 3c2f 7370 616e 3e3c 2f64 6976 mory
.
int __s │ │ │ │ -000e3660: 697a 653b 2020 203c 7370 616e 2063 6c61 ize; // │ │ │ │ -000e3680: 6e75 6d62 6572 206f 6620 656c 656d 656e number of elemen │ │ │ │ -000e3690: 7473 2070 6f69 6e74 6564 2074 6f20 3c2f ts pointed to
.
│ │ │ │ -000e36c0: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ -000e36e0: 2f73 7061 6e3e 205f 5f6f 6666 7365 743b /span> __offset; │ │ │ │ -000e36f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // option │ │ │ │ -000e3710: 616c 2053 4f41 5020 312e 3120 6172 7261 al SOAP 1.1 arra │ │ │ │ -000e3720: 7920 6f66 6673 6574 3c2f 7370 616e 3e3c y offset< │ │ │ │ -000e3730: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
... │ │ │ │ -000e3750: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ -000e3770: 2f2f 2061 6e79 7468 696e 6720 7468 6174 // anything that │ │ │ │ -000e3780: 2066 6f6c 6c6f 7773 2068 6572 6520 7769 follows here wi │ │ │ │ -000e3790: 6c6c 2062 6520 6967 6e6f 7265 6420 3c2f ll be ignored
.
}; │ │ │ │ -000e37c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.

where the array_name must be a non │ │ │ │ -000e3810: 2d71 7561 6c69 6669 6564 206e 616d 6520 -qualified name │ │ │ │ -000e3820: 616e 6420 3c63 6f64 653e 5479 7065 3c2f and Type is the typ │ │ │ │ -000e3840: 6520 666f 7220 7468 6520 656c 656d 656e e for the elemen │ │ │ │ -000e3850: 7473 206f 6620 7468 6520 6172 7261 792e ts of the array. │ │ │ │ -000e3860: 2054 6865 203c 636f 6465 3e5f 5f70 7472 The __ptr │ │ │ │ -000e3870: 3c2f 636f 6465 3e20 6d65 6d62 6572 2070 member p │ │ │ │ -000e3880: 6f69 6e74 7320 746f 2074 6865 2061 7272 oints to the arr │ │ │ │ -000e3890: 6179 2076 616c 7565 7320 616e 6420 3c63 ay values and __size is the array s │ │ │ │ -000e38c0: 697a 652e 2054 6865 203c 636f 6465 3e5f ize. The _ │ │ │ │ -000e38d0: 5f6f 6666 7365 743c 2f63 6f64 653e 206d _offset m │ │ │ │ -000e38e0: 656d 6265 7220 7370 6563 6966 6965 7320 ember specifies │ │ │ │ -000e38f0: 616e 206f 7074 696f 6e61 6c20 6172 7261 an optional arra │ │ │ │ -000e3900: 7920 6f66 6673 6574 2c20 7768 656e 206e y offset, when n │ │ │ │ -000e3910: 6f6e 7a65 726f 2c20 7365 6520 5365 6374 onzero, see Sect │ │ │ │ -000e3920: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion O │ │ │ │ -000e3950: 6e65 2d64 696d 656e 7369 6f6e 616c 2064 ne-dimensional d │ │ │ │ -000e3960: 796e 616d 6963 2053 4f41 502d 656e 636f ynamic SOAP-enco │ │ │ │ -000e3970: 6465 6420 6172 7261 7973 2077 6974 6820 ded arrays with │ │ │ │ -000e3980: 6e6f 6e2d 7a65 726f 206f 6666 7365 7473 non-zero offsets │ │ │ │ -000e3990: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e49 6620 .

.

If │ │ │ │ -000e39a0: 7468 6520 3c63 6f64 653e 6172 7261 795f the array_ │ │ │ │ -000e39b0: 6e61 6d65 3c2f 636f 6465 3e20 6973 2071 name is q │ │ │ │ -000e39c0: 7561 6c69 6669 6564 2077 6974 6820 6120 ualified with a │ │ │ │ -000e39d0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix │ │ │ │ -000e39e0: 2074 6865 6e20 7468 6520 6172 7261 7920 then the array │ │ │ │ -000e39f0: 6973 206e 6f74 2061 2053 4f41 502d 656e is not a SOAP-en │ │ │ │ -000e3a00: 636f 6465 6420 6172 7261 7920 6275 7420 coded array but │ │ │ │ -000e3a10: 7261 7468 6572 2072 6570 7265 7365 6e74 rather represent │ │ │ │ -000e3a20: 7320 6120 7365 7175 656e 6365 206f 6620 s a sequence of │ │ │ │ -000e3a30: 584d 4c20 656c 656d 656e 7473 2c20 7365 XML elements, se │ │ │ │ -000e3a40: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section N │ │ │ │ -000e3a70: 6f6e 2d53 4f41 5020 6479 6e61 6d69 6320 on-SOAP dynamic │ │ │ │ -000e3a80: 6172 7261 7973 3c2f 613e 2e3c 2f70 3e0a arrays.

. │ │ │ │ -000e3a90: 3c70 3e54 6865 2073 6f61 7063 7070 322d

The soapcpp2- │ │ │ │ -000e3aa0: 6765 6e65 7261 7465 6420 6465 7365 7269 generated deseri │ │ │ │ -000e3ab0: 616c 697a 6572 206f 6620 6120 6f6e 652d alizer of a one- │ │ │ │ -000e3ac0: 6469 6d65 6e73 696f 6e61 6c20 6479 6e61 dimensional dyna │ │ │ │ -000e3ad0: 6d69 6320 6172 7261 7920 6361 6e20 6465 mic array can de │ │ │ │ -000e3ae0: 7365 7269 616c 697a 6520 7061 7274 6961 serialize partia │ │ │ │ -000e3af0: 6c6c 7920 7472 616e 736d 6974 7465 6420 lly transmitted │ │ │ │ -000e3b00: 616e 642f 6f72 2053 4f41 502d 656e 636f and/or SOAP-enco │ │ │ │ -000e3b10: 6465 6420 7370 6172 7365 2061 7272 6179 ded sparse array │ │ │ │ -000e3b20: 732c 2061 6e64 2065 7665 6e20 6d75 6c74 s, and even mult │ │ │ │ -000e3b30: 692d 6469 6d65 6e73 696f 6e61 6c20 6172 i-dimensional ar │ │ │ │ -000e3b40: 7261 7973 2077 6869 6368 2077 696c 6c20 rays which will │ │ │ │ -000e3b50: 6265 2063 6f6c 6c61 7073 6564 2069 6e74 be collapsed int │ │ │ │ -000e3b60: 6f20 6120 6f6e 652d 6469 6d65 6e73 696f o a one-dimensio │ │ │ │ -000e3b70: 6e61 6c20 6172 7261 7920 7769 7468 2072 nal array with r │ │ │ │ -000e3b80: 6f77 2d6d 616a 6f72 206f 7264 6572 696e ow-major orderin │ │ │ │ -000e3b90: 672e 3c2f 703e 0a3c 646c 2063 6c61 7373 g.

.
Warning
SOAP 1.2 │ │ │ │ -000e3bd0: 646f 6573 206e 6f74 2073 7570 706f 7274 does not support │ │ │ │ -000e3be0: 2070 6172 7469 616c 6c79 2074 7261 6e73 partially trans │ │ │ │ -000e3bf0: 6d69 7474 6564 2061 7272 6179 7320 616e mitted arrays an │ │ │ │ -000e3c00: 6420 7468 6520 3c63 6f64 653e 5f5f 6f66 d the __of │ │ │ │ -000e3c10: 6673 6574 3c2f 636f 6465 3e20 6d65 6d62 fset memb │ │ │ │ -000e3c20: 6572 206f 6620 6120 6479 6e61 6d69 6320 er of a dynamic │ │ │ │ -000e3c30: 6172 7261 7920 6973 2069 676e 6f72 6564 array is ignored │ │ │ │ -000e3c40: 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 .
.

. │ │ │ │ -000e3c50: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -000e3c60: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -000e3c70: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

.

.One │ │ │ │ -000e3cb0: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn │ │ │ │ -000e3cc0: 616d 6963 2053 4f41 502d 656e 636f 6465 amic SOAP-encode │ │ │ │ -000e3cd0: 6420 6172 7261 7973 2077 6974 6820 6e6f d arrays with no │ │ │ │ -000e3ce0: 6e2d 7a65 726f 206f 6666 7365 7473 3c2f n-zero offsets.

The decla │ │ │ │ -000e3d00: 7261 7469 6f6e 206f 6620 6120 6479 6e61 ration of a dyna │ │ │ │ -000e3d10: 6d69 6320 6172 7261 7920 6173 2064 6573 mic array as des │ │ │ │ -000e3d20: 6372 6962 6564 2069 6e20 5365 6374 696f cribed in Sectio │ │ │ │ -000e3d30: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n One-dimen │ │ │ │ -000e3d60: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S │ │ │ │ -000e3d70: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra │ │ │ │ -000e3d80: 7973 3c2f 613e 206d 6179 2069 6e63 6c75 ys may inclu │ │ │ │ -000e3d90: 6465 2061 6e20 3c63 6f64 653e 696e 7420 de an int │ │ │ │ -000e3da0: 5f5f 6f66 6673 6574 3c2f 636f 6465 3e20 __offset │ │ │ │ -000e3db0: 6d65 6d62 6572 2e20 5768 656e 2073 6574 member. When set │ │ │ │ -000e3dc0: 2074 6f20 616e 2069 6e74 6567 6572 2076 to an integer v │ │ │ │ -000e3dd0: 616c 7565 2c20 7468 6520 7365 7269 616c alue, the serial │ │ │ │ -000e3de0: 697a 6572 206f 6620 7468 6520 6479 6e61 izer of the dyna │ │ │ │ -000e3df0: 6d69 6320 6172 7261 7920 7769 6c6c 2075 mic array will u │ │ │ │ -000e3e00: 7365 2074 6869 7320 6d65 6d62 6572 2061 se this member a │ │ │ │ -000e3e10: 7320 7468 6520 7374 6172 7420 696e 6465 s the start inde │ │ │ │ -000e3e20: 7820 6f66 2074 6865 2061 7272 6179 2061 x of the array a │ │ │ │ -000e3e30: 6e64 2074 6865 2053 4f41 502d 656e 636f nd the SOAP-enco │ │ │ │ -000e3e40: 6465 6420 6172 7261 7920 6f66 6673 6574 ded array offset │ │ │ │ -000e3e50: 2061 7474 7269 6275 7465 203c 656d 3e3c attribute < │ │ │ │ -000e3e60: 636f 6465 3e53 4f41 502d 454e 433a 6f66 code>SOAP-ENC:of │ │ │ │ -000e3e70: 6673 6574 3c2f 636f 6465 3e3c 2f65 6d3e fset │ │ │ │ -000e3e80: 2077 696c 6c20 6170 7065 6172 2069 6e20 will appear in │ │ │ │ -000e3e90: 7468 6520 584d 4c20 6d65 7373 6167 652e the XML message. │ │ │ │ -000e3ea0: 204e 6f74 6520 7468 6174 2061 7272 6179 Note that array │ │ │ │ -000e3eb0: 206f 6666 7365 7473 2069 7320 6120 534f offsets is a SO │ │ │ │ -000e3ec0: 4150 2031 2e31 2073 7065 6369 6669 6320 AP 1.1 specific │ │ │ │ -000e3ed0: 6665 6174 7572 6520 7768 6963 6820 6973 feature which is │ │ │ │ -000e3ee0: 206e 6f74 2073 7570 706f 7274 6564 2069 not supported i │ │ │ │ -000e3ef0: 6e20 534f 4150 2031 2e32 2e3c 2f70 3e0a n SOAP 1.2.

. │ │ │ │ -000e3f00: 3c70 3e46 6f72 2065 7861 6d70 6c65 2c20

For example, │ │ │ │ -000e3f10: 7468 6520 666f 6c6c 6f77 696e 6720 6865 the following he │ │ │ │ -000e3f20: 6164 6572 2066 696c 6520 6465 636c 6172 ader file declar │ │ │ │ -000e3f30: 6573 2061 206e 756d 6572 6963 203c 636f es a numeric Vector │ │ │ │ -000e3f50: 2063 6c61 7373 2c20 7768 6963 6820 6973 class, which is │ │ │ │ -000e3f60: 2061 2064 796e 616d 6963 2061 7272 6179 a dynamic array │ │ │ │ -000e3f70: 206f 6620 666c 6f61 7469 6e67 2070 6f69 of floating poi │ │ │ │ -000e3f80: 6e74 2076 616c 7565 7320 7769 7468 2061 nt values with a │ │ │ │ -000e3f90: 6e20 696e 6465 7820 7468 6174 2073 7461 n index that sta │ │ │ │ -000e3fa0: 7274 7320 6174 2031 3a3c 2f70 3e0a 3c64 rts at 1:

.
// C │ │ │ │ -000e3ff0: 6f6e 7465 6e74 7320 6f66 2066 696c 6520 ontents of file │ │ │ │ -000e4000: 2671 756f 743b 7665 6374 6f72 2e68 2671 "vector.h&q │ │ │ │ -000e4010: 756f 743b 3a20 3c2f 7370 616e 3e3c 2f64 uot;: .
clas │ │ │ │ -000e4050: 7320 3c2f 7370 616e 3e56 6563 746f 7220 s Vector │ │ │ │ -000e4060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ public:< │ │ │ │ -000e40a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
float *__ptr;
.
int __s │ │ │ │ -000e4130: 697a 653b 203c 2f64 6976 3e0a 3c64 6976 ize;
.
│ │ │ │ -000e4150: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ -000e4170: 2f73 7061 6e3e 205f 5f6f 6666 7365 743b /span> __offset; │ │ │ │ -000e4180: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
Ve │ │ │ │ -000e41a0: 6374 6f72 2829 3b3c 2f64 6976 3e0a 3c64 ctor();
. │ │ │ │ -000e41c0: 2020 2020 5665 6374 6f72 283c 7370 616e Vector(struct < │ │ │ │ -000e41f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -000e4200: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -000e4210: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -000e4220: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int< │ │ │ │ -000e4240: 2f73 7061 6e3e 206e 293b 3c2f 6469 763e /span> n);
│ │ │ │ -000e4250: 0a3c 6469 7620 636c 6173 733d 226c 696e .
float&am │ │ │ │ -000e4290: 703b 206f 7065 7261 746f 725b 5d28 3c73 p; operator[](int i);
. │ │ │ │ -000e42e0: 2020 2020 3c73 7061 6e20 636c 6173 733d struct │ │ │ │ -000e4300: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s │ │ │ │ -000e4330: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap *soap;
.
};
.

The imple │ │ │ │ -000e43d0: 6d65 6e74 6174 696f 6e73 206f 6620 7468 mentations of th │ │ │ │ -000e43e0: 6520 3c63 6f64 653e 5665 6374 6f72 3c2f e Vector methods ar │ │ │ │ -000e4400: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

.
V │ │ │ │ -000e4430: 6563 746f 723a 3a56 6563 746f 7228 293c ector::Vector()< │ │ │ │ +000e35a0: 733d 226c 696e 6522 3e20 2020 2054 7970 s="line"> Typ │ │ │ │ +000e35b0: 6520 2a5f 5f70 7472 3b20 203c 7370 616e e *__ptr; // pointer to a │ │ │ │ +000e35e0: 7272 6179 206f 6620 656c 656d 656e 7473 rray of elements │ │ │ │ +000e35f0: 2069 6e20 6d65 6d6f 7279 3c2f 7370 616e in memory
.
int __size; // number of │ │ │ │ +000e3670: 656c 656d 656e 7473 2070 6f69 6e74 6564 elements pointed │ │ │ │ +000e3680: 2074 6f20 3c2f 7370 616e 3e3c 2f64 6976 to
.
int __o │ │ │ │ +000e36d0: 6666 7365 743b 203c 7370 616e 2063 6c61 ffset; // │ │ │ │ +000e36f0: 6f70 7469 6f6e 616c 2053 4f41 5020 312e optional SOAP 1. │ │ │ │ +000e3700: 3120 6172 7261 7920 6f66 6673 6574 3c2f 1 array offset
.
│ │ │ │ +000e3730: 2020 2e2e 2e20 2020 2020 2020 2020 2020 ... │ │ │ │ +000e3740: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // anythin │ │ │ │ +000e3760: 6720 7468 6174 2066 6f6c 6c6f 7773 2068 g that follows h │ │ │ │ +000e3770: 6572 6520 7769 6c6c 2062 6520 6967 6e6f ere will be igno │ │ │ │ +000e3780: 7265 6420 3c2f 7370 616e 3e3c 2f64 6976 red
.
};
.

where the │ │ │ │ +000e37d0: 203c 636f 6465 3e61 7272 6179 5f6e 616d array_nam │ │ │ │ +000e37e0: 653c 2f63 6f64 653e 206d 7573 7420 6265 e must be │ │ │ │ +000e37f0: 2061 206e 6f6e 2d71 7561 6c69 6669 6564 a non-qualified │ │ │ │ +000e3800: 206e 616d 6520 616e 6420 3c63 6f64 653e name and │ │ │ │ +000e3810: 5479 7065 3c2f 636f 6465 3e20 6973 2074 Type is t │ │ │ │ +000e3820: 6865 2074 7970 6520 666f 7220 7468 6520 he type for the │ │ │ │ +000e3830: 656c 656d 656e 7473 206f 6620 7468 6520 elements of the │ │ │ │ +000e3840: 6172 7261 792e 2054 6865 203c 636f 6465 array. The __ptr me │ │ │ │ +000e3860: 6d62 6572 2070 6f69 6e74 7320 746f 2074 mber points to t │ │ │ │ +000e3870: 6865 2061 7272 6179 2076 616c 7565 7320 he array values │ │ │ │ +000e3880: 616e 6420 3c63 6f64 653e 5f5f 7369 7a65 and __size │ │ │ │ +000e3890: 3c2f 636f 6465 3e20 6973 2074 6865 2061 is the a │ │ │ │ +000e38a0: 7272 6179 2073 697a 652e 2054 6865 203c rray size. The < │ │ │ │ +000e38b0: 636f 6465 3e5f 5f6f 6666 7365 743c 2f63 code>__offset member spec │ │ │ │ +000e38d0: 6966 6965 7320 616e 206f 7074 696f 6e61 ifies an optiona │ │ │ │ +000e38e0: 6c20 6172 7261 7920 6f66 6673 6574 2c20 l array offset, │ │ │ │ +000e38f0: 7768 656e 206e 6f6e 7a65 726f 2c20 7365 when nonzero, se │ │ │ │ +000e3900: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section One-dimensi │ │ │ │ +000e3940: 6f6e 616c 2064 796e 616d 6963 2053 4f41 onal dynamic SOA │ │ │ │ +000e3950: 502d 656e 636f 6465 6420 6172 7261 7973 P-encoded arrays │ │ │ │ +000e3960: 2077 6974 6820 6e6f 6e2d 7a65 726f 206f with non-zero o │ │ │ │ +000e3970: 6666 7365 7473 3c2f 613e 2e3c 2f70 3e0a ffsets.

. │ │ │ │ +000e3980: 3c70 3e49 6620 7468 6520 3c63 6f64 653e

If the │ │ │ │ +000e3990: 6172 7261 795f 6e61 6d65 3c2f 636f 6465 array_name is qualified w │ │ │ │ +000e39b0: 6974 6820 6120 6e61 6d65 7370 6163 6520 ith a namespace │ │ │ │ +000e39c0: 7072 6566 6978 2074 6865 6e20 7468 6520 prefix then the │ │ │ │ +000e39d0: 6172 7261 7920 6973 206e 6f74 2061 2053 array is not a S │ │ │ │ +000e39e0: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra │ │ │ │ +000e39f0: 7920 6275 7420 7261 7468 6572 2072 6570 y but rather rep │ │ │ │ +000e3a00: 7265 7365 6e74 7320 6120 7365 7175 656e resents a sequen │ │ │ │ +000e3a10: 6365 206f 6620 584d 4c20 656c 656d 656e ce of XML elemen │ │ │ │ +000e3a20: 7473 2c20 7365 6520 5365 6374 696f 6e20 ts, see Section │ │ │ │ +000e3a30: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Non-SOAP dy │ │ │ │ +000e3a60: 6e61 6d69 6320 6172 7261 7973 3c2f 613e namic arrays │ │ │ │ +000e3a70: 2e3c 2f70 3e0a 3c70 3e54 6865 2073 6f61 .

.

The soa │ │ │ │ +000e3a80: 7063 7070 322d 6765 6e65 7261 7465 6420 pcpp2-generated │ │ │ │ +000e3a90: 6465 7365 7269 616c 697a 6572 206f 6620 deserializer of │ │ │ │ +000e3aa0: 6120 6f6e 652d 6469 6d65 6e73 696f 6e61 a one-dimensiona │ │ │ │ +000e3ab0: 6c20 6479 6e61 6d69 6320 6172 7261 7920 l dynamic array │ │ │ │ +000e3ac0: 6361 6e20 6465 7365 7269 616c 697a 6520 can deserialize │ │ │ │ +000e3ad0: 7061 7274 6961 6c6c 7920 7472 616e 736d partially transm │ │ │ │ +000e3ae0: 6974 7465 6420 616e 642f 6f72 2053 4f41 itted and/or SOA │ │ │ │ +000e3af0: 502d 656e 636f 6465 6420 7370 6172 7365 P-encoded sparse │ │ │ │ +000e3b00: 2061 7272 6179 732c 2061 6e64 2065 7665 arrays, and eve │ │ │ │ +000e3b10: 6e20 6d75 6c74 692d 6469 6d65 6e73 696f n multi-dimensio │ │ │ │ +000e3b20: 6e61 6c20 6172 7261 7973 2077 6869 6368 nal arrays which │ │ │ │ +000e3b30: 2077 696c 6c20 6265 2063 6f6c 6c61 7073 will be collaps │ │ │ │ +000e3b40: 6564 2069 6e74 6f20 6120 6f6e 652d 6469 ed into a one-di │ │ │ │ +000e3b50: 6d65 6e73 696f 6e61 6c20 6172 7261 7920 mensional array │ │ │ │ +000e3b60: 7769 7468 2072 6f77 2d6d 616a 6f72 206f with row-major o │ │ │ │ +000e3b70: 7264 6572 696e 672e 3c2f 703e 0a3c 646c rdering.

.
War │ │ │ │ +000e3ba0: 6e69 6e67 3c2f 6474 3e3c 6464 3e53 4f41 ning
SOA │ │ │ │ +000e3bb0: 5020 312e 3220 646f 6573 206e 6f74 2073 P 1.2 does not s │ │ │ │ +000e3bc0: 7570 706f 7274 2070 6172 7469 616c 6c79 upport partially │ │ │ │ +000e3bd0: 2074 7261 6e73 6d69 7474 6564 2061 7272 transmitted arr │ │ │ │ +000e3be0: 6179 7320 616e 6420 7468 6520 3c63 6f64 ays and the __offset member of a dy │ │ │ │ +000e3c10: 6e61 6d69 6320 6172 7261 7920 6973 2069 namic array is i │ │ │ │ +000e3c20: 676e 6f72 6564 2e3c 2f64 643e 3c2f 646c gnored.
.

.... Back to ta │ │ │ │ +000e3c50: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +000e3c60: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

.

.One-dimension │ │ │ │ +000e3ca0: 616c 2064 796e 616d 6963 2053 4f41 502d al dynamic SOAP- │ │ │ │ +000e3cb0: 656e 636f 6465 6420 6172 7261 7973 2077 encoded arrays w │ │ │ │ +000e3cc0: 6974 6820 6e6f 6e2d 7a65 726f 206f 6666 ith non-zero off │ │ │ │ +000e3cd0: 7365 7473 3c2f 6833 3e0a 3c70 3e54 6865 sets

.

The │ │ │ │ +000e3ce0: 2064 6563 6c61 7261 7469 6f6e 206f 6620 declaration of │ │ │ │ +000e3cf0: 6120 6479 6e61 6d69 6320 6172 7261 7920 a dynamic array │ │ │ │ +000e3d00: 6173 2064 6573 6372 6962 6564 2069 6e20 as described in │ │ │ │ +000e3d10: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section One │ │ │ │ +000e3d40: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn │ │ │ │ +000e3d50: 616d 6963 2053 4f41 502d 656e 636f 6465 amic SOAP-encode │ │ │ │ +000e3d60: 6420 6172 7261 7973 3c2f 613e 206d 6179 d arrays may │ │ │ │ +000e3d70: 2069 6e63 6c75 6465 2061 6e20 3c63 6f64 include an int __offset member. Wh │ │ │ │ +000e3da0: 656e 2073 6574 2074 6f20 616e 2069 6e74 en set to an int │ │ │ │ +000e3db0: 6567 6572 2076 616c 7565 2c20 7468 6520 eger value, the │ │ │ │ +000e3dc0: 7365 7269 616c 697a 6572 206f 6620 7468 serializer of th │ │ │ │ +000e3dd0: 6520 6479 6e61 6d69 6320 6172 7261 7920 e dynamic array │ │ │ │ +000e3de0: 7769 6c6c 2075 7365 2074 6869 7320 6d65 will use this me │ │ │ │ +000e3df0: 6d62 6572 2061 7320 7468 6520 7374 6172 mber as the star │ │ │ │ +000e3e00: 7420 696e 6465 7820 6f66 2074 6865 2061 t index of the a │ │ │ │ +000e3e10: 7272 6179 2061 6e64 2074 6865 2053 4f41 rray and the SOA │ │ │ │ +000e3e20: 502d 656e 636f 6465 6420 6172 7261 7920 P-encoded array │ │ │ │ +000e3e30: 6f66 6673 6574 2061 7474 7269 6275 7465 offset attribute │ │ │ │ +000e3e40: 203c 656d 3e3c 636f 6465 3e53 4f41 502d SOAP- │ │ │ │ +000e3e50: 454e 433a 6f66 6673 6574 3c2f 636f 6465 ENC:offset will appe │ │ │ │ +000e3e70: 6172 2069 6e20 7468 6520 584d 4c20 6d65 ar in the XML me │ │ │ │ +000e3e80: 7373 6167 652e 204e 6f74 6520 7468 6174 ssage. Note that │ │ │ │ +000e3e90: 2061 7272 6179 206f 6666 7365 7473 2069 array offsets i │ │ │ │ +000e3ea0: 7320 6120 534f 4150 2031 2e31 2073 7065 s a SOAP 1.1 spe │ │ │ │ +000e3eb0: 6369 6669 6320 6665 6174 7572 6520 7768 cific feature wh │ │ │ │ +000e3ec0: 6963 6820 6973 206e 6f74 2073 7570 706f ich is not suppo │ │ │ │ +000e3ed0: 7274 6564 2069 6e20 534f 4150 2031 2e32 rted in SOAP 1.2 │ │ │ │ +000e3ee0: 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 7861 .

.

For exa │ │ │ │ +000e3ef0: 6d70 6c65 2c20 7468 6520 666f 6c6c 6f77 mple, the follow │ │ │ │ +000e3f00: 696e 6720 6865 6164 6572 2066 696c 6520 ing header file │ │ │ │ +000e3f10: 6465 636c 6172 6573 2061 206e 756d 6572 declares a numer │ │ │ │ +000e3f20: 6963 203c 636f 6465 3e56 6563 746f 723c ic Vector< │ │ │ │ +000e3f30: 2f63 6f64 653e 2063 6c61 7373 2c20 7768 /code> class, wh │ │ │ │ +000e3f40: 6963 6820 6973 2061 2064 796e 616d 6963 ich is a dynamic │ │ │ │ +000e3f50: 2061 7272 6179 206f 6620 666c 6f61 7469 array of floati │ │ │ │ +000e3f60: 6e67 2070 6f69 6e74 2076 616c 7565 7320 ng point values │ │ │ │ +000e3f70: 7769 7468 2061 6e20 696e 6465 7820 7468 with an index th │ │ │ │ +000e3f80: 6174 2073 7461 7274 7320 6174 2031 3a3c at starts at 1:< │ │ │ │ +000e3f90: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

// Contents of │ │ │ │ +000e3fe0: 2066 696c 6520 2671 756f 743b 7665 6374 file "vect │ │ │ │ +000e3ff0: 6f72 2e68 2671 756f 743b 3a20 3c2f 7370 or.h":
.
class V │ │ │ │ +000e4040: 6563 746f 7220 3c2f 6469 763e 0a3c 6469 ector
.{ │ │ │ │ +000e4060: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public
:
.
│ │ │ │ +000e40a0: 2020 3c73 7061 6e20 636c 6173 733d 226b floa │ │ │ │ +000e40c0: 743c 2f73 7061 6e3e 202a 5f5f 7074 723b t *__ptr; │ │ │ │ +000e40d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int __size;
.
int __o │ │ │ │ +000e4160: 6666 7365 743b 203c 2f64 6976 3e0a 3c64 ffset;
. │ │ │ │ +000e4180: 2020 2020 5665 6374 6f72 2829 3b3c 2f64 Vector();.
Vector │ │ │ │ +000e41b0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ +000e4200: 3c2f 613e 202a 2c20 3c73 7061 6e20 636c *, int n); │ │ │ │ +000e4230: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
float& operato │ │ │ │ +000e4280: 725b 5d28 3c73 7061 6e20 636c 6173 733d r[](in │ │ │ │ +000e42a0: 743c 2f73 7061 6e3e 2069 293b 203c 2f64 t i); .
│ │ │ │ +000e42e0: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *< │ │ │ │ +000e4320: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000e4330: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +000e4340: 6874 6d6c 2361 3734 3066 3837 3630 6636 html#a740f8760f6 │ │ │ │ +000e4350: 6565 3463 3635 3834 6532 3563 3631 3266 ee4c6584e25c612f │ │ │ │ +000e4360: 3538 3564 3730 223e 736f 6170 3c2f 613e 585d70">soap │ │ │ │ +000e4370: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
};.

The │ │ │ │ +000e43b0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e73 implementations │ │ │ │ +000e43c0: 206f 6620 7468 6520 3c63 6f64 653e 5665 of the Ve │ │ │ │ +000e43d0: 6374 6f72 3c2f 636f 6465 3e20 6d65 7468 ctor meth │ │ │ │ +000e43e0: 6f64 7320 6172 653a 3c2f 703e 0a3c 6469 ods are:

.
Vector::Vec │ │ │ │ +000e4420: 746f 7228 293c 2f64 6976 3e0a 3c64 6976 tor()
.
{< │ │ │ │ 000e4440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ -000e4460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
this->soa │ │ │ │ -000e4480: 705f 6465 6661 756c 7428 4e55 4c4c 293b p_default(NULL); │ │ │ │ +000e4450: 3d22 6c69 6e65 223e 2020 7468 6973 2d26 ="line"> this-& │ │ │ │ +000e4460: 6774 3b73 6f61 705f 6465 6661 756c 7428 gt;soap_default( │ │ │ │ +000e4470: 4e55 4c4c 293b 3c2f 6469 763e 0a3c 6469 NULL);
.} │ │ │ │ 000e4490: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}
│ │ │ │ -000e44b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
Vector::Vecto │ │ │ │ -000e44d0: 7228 3c73 7061 6e20 636c 6173 733d 226b r(struct soa │ │ │ │ -000e4520: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -000e4550: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, int n) │ │ │ │ +000e44a0: 733d 226c 696e 6522 3e56 6563 746f 723a s="line">Vector: │ │ │ │ +000e44b0: 3a56 6563 746f 7228 3c73 7061 6e20 636c :Vector(st │ │ │ │ +000e44d0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, int n)
.{ │ │ │ │ 000e4580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
│ │ │ │ -000e45a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
this->so │ │ │ │ -000e45c0: 6170 203d 203c 6120 636c 6173 733d 2263 ap = so │ │ │ │ -000e4610: 6170 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 ap;
. │ │ │ │ -000e4630: 2020 5f5f 7074 7220 3d20 736f 6170 5f6e __ptr = soap_n │ │ │ │ -000e4640: 6577 5f66 6c6f 6174 283c 6120 636c 6173 ew_float( │ │ │ │ -000e4670: 736f 6170 3c2f 613e 2c20 6e29 3b20 3c2f soap, n); .
__size │ │ │ │ -000e46a0: 3d20 6e3b 203c 2f64 6976 3e0a 3c64 6976 = n;
.
│ │ │ │ -000e46c0: 5f5f 6f66 6673 6574 203d 2031 3b20 3c2f __offset = 1; .
}
. │ │ │ │ -000e46f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
floa │ │ │ │ -000e4720: 743c 2f73 7061 6e3e 2661 6d70 3b20 5665 t& Ve │ │ │ │ -000e4730: 6374 6f72 3a3a 6f70 6572 6174 6f72 5b5d ctor::operator[] │ │ │ │ -000e4740: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int i)
. │ │ │ │ +000e4590: 733d 226c 696e 6522 3e20 2074 6869 732d s="line"> this- │ │ │ │ +000e45a0: 2667 743b 736f 6170 203d 203c 6120 636c >soap = soap;.
__ptr = │ │ │ │ +000e4620: 736f 6170 5f6e 6577 5f66 6c6f 6174 283c soap_new_float(< │ │ │ │ +000e4630: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000e4640: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +000e4650: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +000e4660: 6e29 3b20 3c2f 6469 763e 0a3c 6469 7620 n);
.
_ │ │ │ │ +000e4680: 5f73 697a 6520 3d20 6e3b 203c 2f64 6976 _size = n;
.
__offset = │ │ │ │ +000e46b0: 2031 3b20 3c2f 6469 763e 0a3c 6469 7620 1;
.
} < │ │ │ │ +000e46d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
float&a │ │ │ │ +000e4710: 6d70 3b20 5665 6374 6f72 3a3a 6f70 6572 mp; Vector::oper │ │ │ │ +000e4720: 6174 6f72 5b5d 283c 7370 616e 2063 6c61 ator[](int i) < │ │ │ │ +000e4750: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ 000e4770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
return __ptr[i - │ │ │ │ -000e47d0: 5f5f 6f66 6673 6574 5d3b 203c 2f64 6976 __offset];
.
}
.

An example │ │ │ │ -000e4820: 2070 726f 6772 616d 2066 7261 676d 656e program fragmen │ │ │ │ -000e4830: 7420 7468 6174 2073 6572 6961 6c69 7a65 t that serialize │ │ │ │ -000e4840: 7320 6120 7665 6374 6f72 206f 6620 3320 s a vector of 3 │ │ │ │ -000e4850: 656c 656d 656e 7473 3a3c 2f70 3e0a 3c64 elements:

.
stru │ │ │ │ -000e48a0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new() │ │ │ │ -000e4970: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
Vecto │ │ │ │ -000e4990: 7220 7628 3c61 2063 6c61 7373 3d22 636f r v(soap< │ │ │ │ -000e49c0: 2f61 3e2c 2033 293b 3c2f 6469 763e 0a3c /a>, 3);
.< │ │ │ │ -000e49d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e49e0: 3e76 5b31 5d20 3d20 312e 303b 203c 2f64 >v[1] = 1.0;
.
v[2] = 2.0 │ │ │ │ -000e4a10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
v[3] │ │ │ │ -000e4a30: 3d20 332e 303b 203c 2f64 6976 3e0a 3c64 = 3.0;
. │ │ │ │ -000e4a50: 736f 6170 5f77 7269 7465 5f56 6563 746f soap_write_Vecto │ │ │ │ -000e4a60: 7228 3c61 2063 6c61 7373 3d22 636f 6465 r(
soap, &v);
... │ │ │ │ -000e4c10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
.

Note that < │ │ │ │ -000e5020: 656d 3e3c 636f 6465 3e78 7364 3a66 6c6f em>xsd:flo │ │ │ │ -000e5030: 6174 5b34 5d3c 2f63 6f64 653e 3c2f 656d at[4] is the type an │ │ │ │ -000e5050: 6420 7368 6170 6520 6f66 2074 6865 2065 d shape of the e │ │ │ │ -000e5060: 6e63 6f64 6564 2061 7272 6179 2c20 7768 ncoded array, wh │ │ │ │ -000e5070: 6963 6820 7374 6172 7473 2061 7420 6f66 ich starts at of │ │ │ │ -000e5080: 6673 6574 2031 2061 6e64 2074 6865 7265 fset 1 and there │ │ │ │ -000e5090: 666f 7265 2074 6865 2065 6c65 6d65 6e74 fore the element │ │ │ │ -000e50a0: 2061 7420 3020 6973 206f 6d69 7474 6564 at 0 is omitted │ │ │ │ -000e50b0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

.

.... Back t │ │ │ │ -000e50d0: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ -000e50e0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

.

│ │ │ │ -000e50f0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Nested one-di │ │ │ │ -000e5120: 6d65 6e73 696f 6e61 6c20 6479 6e61 6d69 mensional dynami │ │ │ │ -000e5130: 6320 534f 4150 2d65 6e63 6f64 6564 2061 c SOAP-encoded a │ │ │ │ -000e5140: 7272 6179 733c 2f68 333e 0a3c 703e 4f6e rrays

.

On │ │ │ │ -000e5150: 652d 6469 6d65 6e73 696f 6e61 6c20 534f e-dimensional SO │ │ │ │ -000e5160: 4150 2d65 6e63 6f64 6564 2064 796e 616d AP-encoded dynam │ │ │ │ -000e5170: 6963 2061 7272 6179 7320 6d61 7920 6265 ic arrays may be │ │ │ │ -000e5180: 206e 6573 7465 642e 2046 6f72 2065 7861 nested. For exa │ │ │ │ -000e5190: 6d70 6c65 2c20 7573 696e 6720 3c63 6f64 mple, using class Vector declared i │ │ │ │ -000e51c0: 6e20 7468 6520 7072 6576 696f 7573 2073 n the previous s │ │ │ │ -000e51d0: 6563 7469 6f6e 2c20 3c63 6f64 653e 636c ection, cl │ │ │ │ -000e51e0: 6173 7320 4d61 7472 6978 3c2f 636f 6465 ass Matrix is declared:.

│ │ │ │ -000e5600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

The Matri │ │ │ │ -000e5640: 7820 7479 7065 2069 7320 6573 7365 6e74 x type is essent │ │ │ │ -000e5650: 6961 6c6c 7920 616e 2061 7272 6179 206f ially an array o │ │ │ │ -000e5660: 6620 706f 696e 7465 7273 2074 6f20 6172 f pointers to ar │ │ │ │ -000e5670: 7261 7973 2077 6869 6368 206d 616b 6520 rays which make │ │ │ │ -000e5680: 7570 2074 6865 2072 6f77 7320 6f66 2061 up the rows of a │ │ │ │ -000e5690: 206d 6174 7269 782e 2054 6865 2073 6572 matrix. The ser │ │ │ │ -000e56a0: 6961 6c69 7a61 7469 6f6e 206f 6620 7468 ialization of th │ │ │ │ -000e56b0: 6520 7477 6f2d 6469 6d65 6e73 696f 6e61 e two-dimensiona │ │ │ │ -000e56c0: 6c20 6479 6e61 6d69 6320 6172 7261 7920 l dynamic array │ │ │ │ -000e56d0: 696e 2069 7320 6e65 7374 6564 2066 6f72 in is nested for │ │ │ │ -000e56e0: 6d20 696e 2058 4d4c 2e3c 2f70 3e0a 3c70 m in XML.

.

.... Back to table │ │ │ │ -000e5710: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents< │ │ │ │ -000e5720: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

.Multi │ │ │ │ -000e5750: 2d64 696d 656e 7369 6f6e 616c 2064 796e -dimensional dyn │ │ │ │ -000e5760: 616d 6963 2053 4f41 502d 656e 636f 6465 amic SOAP-encode │ │ │ │ -000e5770: 6420 6172 7261 7973 3c2f 6833 3e0a 3c70 d arrays

.

A special form │ │ │ │ -000e5790: 6f66 203c 636f 6465 3e73 7472 7563 743c of struct< │ │ │ │ -000e57a0: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or │ │ │ │ -000e57b0: 636c 6173 733c 2f63 6f64 653e 2069 7320 class is │ │ │ │ -000e57c0: 7573 6564 2074 6f20 6465 6669 6e65 206d used to define m │ │ │ │ -000e57d0: 756c 7469 2d64 696d 656e 7369 6f6e 616c ulti-dimensional │ │ │ │ -000e57e0: 2064 796e 616d 6963 2053 4f41 502d 656e dynamic SOAP-en │ │ │ │ -000e57f0: 636f 6465 6420 6172 7261 7973 2e20 4561 coded arrays. Ea │ │ │ │ -000e5800: 6368 2061 7272 6179 2068 6173 2061 2070 ch array has a p │ │ │ │ -000e5810: 6f69 6e74 6572 2076 6172 6961 626c 6520 ointer variable │ │ │ │ -000e5820: 616e 6420 6120 6d65 6d62 6572 2074 6861 and a member tha │ │ │ │ -000e5830: 7420 7265 636f 7264 7320 7468 6520 6e75 t records the nu │ │ │ │ -000e5840: 6d62 6572 206f 6620 656c 656d 656e 7473 mber of elements │ │ │ │ -000e5850: 2070 6572 2064 696d 656e 7369 6f6e 2e20 per dimension. │ │ │ │ -000e5860: 4120 3c63 6f64 653e 4b3c 2f63 6f64 653e A K │ │ │ │ -000e5870: 2d64 696d 656e 7369 6f6e 616c 2061 7272 -dimensional arr │ │ │ │ -000e5880: 6179 2069 7320 6465 636c 6172 6564 2061 ay is declared a │ │ │ │ -000e5890: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

.
< │ │ │ │ -000e58c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000e58d0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct array_name re │ │ │ │ +000e47a0: 7475 726e 3c2f 7370 616e 3e20 5f5f 7074 turn __pt │ │ │ │ +000e47b0: 725b 6920 2d20 5f5f 6f66 6673 6574 5d3b r[i - __offset]; │ │ │ │ +000e47c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
}
.

An e │ │ │ │ +000e4800: 7861 6d70 6c65 2070 726f 6772 616d 2066 xample program f │ │ │ │ +000e4810: 7261 676d 656e 7420 7468 6174 2073 6572 ragment that ser │ │ │ │ +000e4820: 6961 6c69 7a65 7320 6120 7665 6374 6f72 ializes a vector │ │ │ │ +000e4830: 206f 6620 3320 656c 656d 656e 7473 3a3c of 3 elements:< │ │ │ │ +000e4840: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct │ │ │ │ +000e4890: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +000e48c0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +000e48f0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new │ │ │ │ +000e4950: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
.< │ │ │ │ +000e4960: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e4970: 3e56 6563 746f 7220 7628 3c61 2063 6c61 >Vector v(soap, 3);.
v[1] = 1. │ │ │ │ +000e49d0: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
.
v[2] │ │ │ │ +000e49f0: 203d 2032 2e30 3b20 3c2f 6469 763e 0a3c = 2.0;
.< │ │ │ │ +000e4a00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e4a10: 3e76 5b33 5d20 3d20 332e 303b 203c 2f64 >v[3] = 3.0; .
soap_write │ │ │ │ +000e4a40: 5f56 6563 746f 7228 3c61 2063 6c61 7373 _Vector(s │ │ │ │ +000e4a70: 6f61 703c 2f61 3e2c 2026 616d 703b 7629 oap, &v) │ │ │ │ +000e4a80: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
s │ │ │ │ +000e4af0: 6f61 705f 6465 7374 726f 793c 2f61 3e28 oap_destroy( │ │ │ │ +000e4b00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +000e4b30: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.

The o │ │ │ │ +000e4cb0: 7574 7075 7420 6973 2061 2070 6172 7469 utput is a parti │ │ │ │ +000e4cc0: 616c 6c79 2074 7261 6e73 6d69 7474 6564 ally transmitted │ │ │ │ +000e4cd0: 2061 7272 6179 3a3c 2f70 3e0a 3c64 6976 array:

.
<SOAP-ENC:Arr │ │ │ │ +000e4d40: 6179 3c2f 7370 616e 3e20 3c73 7061 6e20 ay │ │ │ │ +000e4d60: 534f 4150 2d45 4e43 3a61 7272 6179 5479 SOAP-ENC:arrayTy │ │ │ │ +000e4d70: 7065 3c2f 7370 616e 3e3d 3c73 7061 6e20 pe="xsd: │ │ │ │ +000e4da0: 666c 6f61 745b 345d 2671 756f 743b 3c2f float[4]" SOAP │ │ │ │ +000e4dd0: 2d45 4e43 3a6f 6666 7365 743c 2f73 7061 -ENC:offset=& │ │ │ │ +000e4e00: 7175 6f74 3b5b 315d 2671 756f 743b 3c2f quot;[1]">
│ │ │ │ +000e4e20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<item&g │ │ │ │ +000e4e60: 743b 3126 6c74 3b2f 3c73 7061 6e20 636c t;1</item> │ │ │ │ +000e4e90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ +000e4eb0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;item< │ │ │ │ +000e4ed0: 2f73 7061 6e3e 2667 743b 3226 6c74 3b2f /span>>2</ │ │ │ │ +000e4ee0: 3c73 7061 6e20 636c 6173 733d 226b 6579 item>
│ │ │ │ +000e4f10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<item&g │ │ │ │ +000e4f50: 743b 3326 6c74 3b2f 3c73 7061 6e20 636c t;3</item> │ │ │ │ +000e4f80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
</ │ │ │ │ +000e4fa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E │ │ │ │ +000e4fc0: 4e43 3a41 7272 6179 3c2f 7370 616e 3e26 NC:Array& │ │ │ │ +000e4fd0: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
.
│ │ │ │ +000e4fe0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

The │ │ │ │ +000e5620: 204d 6174 7269 7820 7479 7065 2069 7320 Matrix type is │ │ │ │ +000e5630: 6573 7365 6e74 6961 6c6c 7920 616e 2061 essentially an a │ │ │ │ +000e5640: 7272 6179 206f 6620 706f 696e 7465 7273 rray of pointers │ │ │ │ +000e5650: 2074 6f20 6172 7261 7973 2077 6869 6368 to arrays which │ │ │ │ +000e5660: 206d 616b 6520 7570 2074 6865 2072 6f77 make up the row │ │ │ │ +000e5670: 7320 6f66 2061 206d 6174 7269 782e 2054 s of a matrix. T │ │ │ │ +000e5680: 6865 2073 6572 6961 6c69 7a61 7469 6f6e he serialization │ │ │ │ +000e5690: 206f 6620 7468 6520 7477 6f2d 6469 6d65 of the two-dime │ │ │ │ +000e56a0: 6e73 696f 6e61 6c20 6479 6e61 6d69 6320 nsional dynamic │ │ │ │ +000e56b0: 6172 7261 7920 696e 2069 7320 6e65 7374 array in is nest │ │ │ │ +000e56c0: 6564 2066 6f72 6d20 696e 2058 4d4c 2e3c ed form in XML.< │ │ │ │ +000e56d0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

.... Back to │ │ │ │ +000e56f0: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ +000e5700: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

.

│ │ │ │ +000e5730: 0a4d 756c 7469 2d64 696d 656e 7369 6f6e .Multi-dimension │ │ │ │ +000e5740: 616c 2064 796e 616d 6963 2053 4f41 502d al dynamic SOAP- │ │ │ │ +000e5750: 656e 636f 6465 6420 6172 7261 7973 3c2f encoded arrays.

A special │ │ │ │ +000e5770: 2066 6f72 6d20 6f66 203c 636f 6465 3e73 form of s │ │ │ │ +000e5780: 7472 7563 743c 2f63 6f64 653e 206f 7220 truct or │ │ │ │ +000e5790: 3c63 6f64 653e 636c 6173 733c 2f63 6f64 class is used to de │ │ │ │ +000e57b0: 6669 6e65 206d 756c 7469 2d64 696d 656e fine multi-dimen │ │ │ │ +000e57c0: 7369 6f6e 616c 2064 796e 616d 6963 2053 sional dynamic S │ │ │ │ +000e57d0: 4f41 502d 656e 636f 6465 6420 6172 7261 OAP-encoded arra │ │ │ │ +000e57e0: 7973 2e20 4561 6368 2061 7272 6179 2068 ys. Each array h │ │ │ │ +000e57f0: 6173 2061 2070 6f69 6e74 6572 2076 6172 as a pointer var │ │ │ │ +000e5800: 6961 626c 6520 616e 6420 6120 6d65 6d62 iable and a memb │ │ │ │ +000e5810: 6572 2074 6861 7420 7265 636f 7264 7320 er that records │ │ │ │ +000e5820: 7468 6520 6e75 6d62 6572 206f 6620 656c the number of el │ │ │ │ +000e5830: 656d 656e 7473 2070 6572 2064 696d 656e ements per dimen │ │ │ │ +000e5840: 7369 6f6e 2e20 4120 3c63 6f64 653e 4b3c sion. A K< │ │ │ │ +000e5850: 2f63 6f64 653e 2d64 696d 656e 7369 6f6e /code>-dimension │ │ │ │ +000e5860: 616c 2061 7272 6179 2069 7320 6465 636c al array is decl │ │ │ │ +000e5870: 6172 6564 2061 733a 3c2f 703e 0a3c 6469 ared as:

.
struc │ │ │ │ +000e58c0: 7420 3c2f 7370 616e 3e61 7272 6179 5f6e t array_n │ │ │ │ +000e58d0: 616d 6520 3c2f 6469 763e 0a3c 6469 7620 ame
.
{.
{
.< │ │ │ │ -000e5910: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e5920: 3e20 2020 2054 7970 6520 2a5f 5f70 7472 > Type *__ptr │ │ │ │ -000e5930: 3b20 2020 2020 3c73 7061 6e20 636c 6173 ; // p │ │ │ │ -000e5950: 6f69 6e74 6572 2074 6f20 6172 7261 7920 ointer to array │ │ │ │ -000e5960: 6f66 2065 6c65 6d65 6e74 7320 696e 206d of elements in m │ │ │ │ -000e5970: 656d 6f72 793c 2f73 7061 6e3e 3c2f 6469 emory.
int __ │ │ │ │ -000e59c0: 7369 7a65 5b4b 5d3b 2020 203c 7370 616e size[K]; // number of el │ │ │ │ -000e59f0: 656d 656e 7473 2070 6572 2064 696d 656e ements per dimen │ │ │ │ -000e5a00: 7369 6f6e 3c2f 7370 616e 3e3c 2f64 6976 sion
.
int __o │ │ │ │ -000e5a50: 6666 7365 745b 4b5d 3b20 3c73 7061 6e20 ffset[K]; │ │ │ │ -000e5a70: 2f2f 206f 7074 696f 6e61 6c20 534f 4150 // optional SOAP │ │ │ │ -000e5a80: 2031 2e31 2061 7272 6179 206f 6666 7365 1.1 array offse │ │ │ │ -000e5a90: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
.< │ │ │ │ -000e5aa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e5ab0: 3e20 2020 202e 2e2e 2020 2020 2020 2020 > ... │ │ │ │ -000e5ac0: 2020 2020 2020 3c73 7061 6e20 636c 6173 // a │ │ │ │ -000e5ae0: 6e79 7468 696e 6720 7468 6174 2066 6f6c nything that fol │ │ │ │ -000e5af0: 6c6f 7773 2068 6572 6520 7769 6c6c 2062 lows here will b │ │ │ │ -000e5b00: 6520 6967 6e6f 7265 6420 3c2f 7370 616e e ignored
.
};.

whe │ │ │ │ -000e5b50: 7265 2074 6865 203c 636f 6465 3e61 7272 re the arr │ │ │ │ -000e5b60: 6179 5f6e 616d 653c 2f63 6f64 653e 206d ay_name m │ │ │ │ -000e5b70: 7573 7420 6265 2061 206e 6f6e 2d71 7561 ust be a non-qua │ │ │ │ -000e5b80: 6c69 6669 6564 206e 616d 6520 616e 6420 lified name and │ │ │ │ -000e5b90: 3c63 6f64 653e 5479 7065 3c2f 636f 6465 Type is the type fo │ │ │ │ -000e5bb0: 7220 7468 6520 656c 656d 656e 7473 206f r the elements o │ │ │ │ -000e5bc0: 6620 7468 6520 6172 7261 792e 2054 6865 f the array. The │ │ │ │ -000e5bd0: 203c 636f 6465 3e5f 5f70 7472 3c2f 636f __ptr member point │ │ │ │ -000e5bf0: 7320 746f 2074 6865 2061 7272 6179 2076 s to the array v │ │ │ │ -000e5c00: 616c 7565 732e 2054 6865 203c 636f 6465 alues. The __size a │ │ │ │ -000e5c20: 7272 6179 2073 7065 6369 6669 6573 2074 rray specifies t │ │ │ │ -000e5c30: 6865 206e 756d 6265 7220 6f66 2061 7272 he number of arr │ │ │ │ -000e5c40: 6179 2065 6c65 6d65 6e74 7320 7065 7220 ay elements per │ │ │ │ -000e5c50: 6469 6d65 6e73 696f 6e2e 2054 6865 203c dimension. The < │ │ │ │ -000e5c60: 636f 6465 3e5f 5f6f 6666 7365 743c 2f63 code>__offset array speci │ │ │ │ -000e5c80: 6669 6573 2061 6e20 6f70 7469 6f6e 616c fies an optional │ │ │ │ -000e5c90: 206f 6666 7365 7420 7065 7220 6469 6d65 offset per dime │ │ │ │ -000e5ca0: 6e73 696f 6e2e 3c2f 703e 0a3c 703e 466f nsion.

.

Fo │ │ │ │ -000e5cb0: 7220 6578 616d 706c 652c 2074 6865 2066 r example, the f │ │ │ │ -000e5cc0: 6f6c 6c6f 7769 6e67 2064 6563 6c61 7261 ollowing declara │ │ │ │ -000e5cd0: 7469 6f6e 2073 7065 6369 6669 6573 2061 tion specifies a │ │ │ │ -000e5ce0: 206d 6174 7269 7820 636c 6173 733a 3c2f matrix class:.

class Ma │ │ │ │ -000e5d40: 7472 6978 203c 2f64 6976 3e0a 3c64 6976 trix
.
{ │ │ │ │ -000e5d60: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
.
│ │ │ │ -000e5da0: 2020 3c73 7061 6e20 636c 6173 733d 226b floa │ │ │ │ -000e5dc0: 743c 2f73 7061 6e3e 202a 5f5f 7074 723b t *__ptr; │ │ │ │ -000e5dd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
int __size[2]; .
int │ │ │ │ -000e5e60: 5f5f 6f66 6673 6574 5b32 5d3b 203c 2f64 __offset[2]; .
};
. │ │ │ │ -000e5e90: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

By con │ │ │ │ -000e5eb0: 7472 6173 7420 746f 2074 6865 206d 6174 trast to the mat │ │ │ │ -000e5ec0: 7269 7820 636c 6173 7320 6f66 2053 6563 rix class of Sec │ │ │ │ -000e5ed0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Nest │ │ │ │ -000e5f00: 6564 206f 6e65 2d64 696d 656e 7369 6f6e ed one-dimension │ │ │ │ -000e5f10: 616c 2064 796e 616d 6963 2053 4f41 502d al dynamic SOAP- │ │ │ │ -000e5f20: 656e 636f 6465 6420 6172 7261 7973 3c2f encoded arrays that defines │ │ │ │ -000e5f40: 6120 6d61 7472 6978 2061 7320 616e 2061 a matrix as an a │ │ │ │ -000e5f50: 7272 6179 206f 6620 706f 696e 7465 7273 rray of pointers │ │ │ │ -000e5f60: 2074 6f20 6d61 7472 6978 2072 6f77 732c to matrix rows, │ │ │ │ -000e5f70: 2074 6869 7320 636c 6173 7320 6861 7320 this class has │ │ │ │ -000e5f80: 6f6e 6520 706f 696e 7465 7220 746f 2061 one pointer to a │ │ │ │ -000e5f90: 206d 6174 7269 7820 7374 6f72 6564 2069 matrix stored i │ │ │ │ -000e5fa0: 6e20 726f 772d 6d61 6a6f 7220 6f72 6465 n row-major orde │ │ │ │ -000e5fb0: 722e 2054 6865 2073 697a 6520 6f66 2074 r. The size of t │ │ │ │ -000e5fc0: 6865 206d 6174 7269 7820 6973 2064 6574 he matrix is det │ │ │ │ -000e5fd0: 6572 6d69 6e65 6420 6279 2074 6865 203c ermined by the < │ │ │ │ -000e5fe0: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size member: __size[0] holds the numb │ │ │ │ -000e6020: 6572 206f 6620 726f 7773 2061 6e64 203c er of rows and < │ │ │ │ -000e6030: 636f 6465 3e5f 5f73 697a 655b 315d 3c2f code>__size[1] holds the │ │ │ │ -000e6050: 6e75 6d62 6572 206f 6620 636f 6c75 6d6e number of column │ │ │ │ -000e6060: 7320 6f66 2074 6865 206d 6174 7269 782e s of the matrix. │ │ │ │ -000e6070: 204c 696b 6577 6973 652c 203c 636f 6465 Likewise, __offset[0] is the row o │ │ │ │ -000e60a0: 6666 7365 7420 616e 6420 3c63 6f64 653e ffset and │ │ │ │ -000e60b0: 5f5f 6f66 6673 6574 5b31 5d3c 2f63 6f64 __offset[1] is the column │ │ │ │ -000e60d0: 7320 6f66 6673 6574 2e3c 2f70 3e0a 3c64 s offset.

.
Wa │ │ │ │ -000e6100: 726e 696e 673c 2f64 743e 3c64 643e 534f rning
SO │ │ │ │ -000e6110: 4150 2031 2e32 2064 6f65 7320 6e6f 7420 AP 1.2 does not │ │ │ │ -000e6120: 7375 7070 6f72 7420 7061 7274 6961 6c6c support partiall │ │ │ │ -000e6130: 7920 7472 616e 736d 6974 7465 6420 6172 y transmitted ar │ │ │ │ -000e6140: 7261 7973 2061 6e64 2074 6865 203c 636f rays and the __offset member of a d │ │ │ │ -000e6170: 796e 616d 6963 2061 7272 6179 2069 7320 ynamic array is │ │ │ │ -000e6180: 6967 6e6f 7265 642e 3c2f 6464 3e3c 2f64 ignored.
.

.... Back to t │ │ │ │ -000e61b0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -000e61c0: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

.

.No │ │ │ │ -000e61f0: 6e2d 534f 4150 2064 796e 616d 6963 2061 n-SOAP dynamic a │ │ │ │ -000e6200: 7272 6179 733c 2f68 333e 0a3c 703e 416e rrays

.

An │ │ │ │ -000e6210: 2061 7272 6179 2069 7320 7365 7269 616c array is serial │ │ │ │ -000e6220: 697a 6564 2061 7320 6120 7365 7175 656e ized as a sequen │ │ │ │ -000e6230: 6365 206f 6620 584d 4c20 656c 656d 656e ce of XML elemen │ │ │ │ -000e6240: 7473 2e20 4279 2063 6f6e 7472 6173 742c ts. By contrast, │ │ │ │ -000e6250: 2061 2053 4f41 502d 656e 636f 6465 6420 a SOAP-encoded │ │ │ │ -000e6260: 6172 7261 7920 6973 2073 6572 6961 6c69 array is seriali │ │ │ │ -000e6270: 7a65 6420 6173 2061 6e20 656c 656d 656e zed as an elemen │ │ │ │ -000e6280: 7420 7769 7468 2061 2073 6571 7565 6e63 t with a sequenc │ │ │ │ -000e6290: 6520 6f66 2073 7562 2d65 6c65 6d65 6e74 e of sub-element │ │ │ │ -000e62a0: 732c 2077 686f 7365 2074 6167 206e 616d s, whose tag nam │ │ │ │ -000e62b0: 6573 2061 7265 2069 7272 656c 6576 616e es are irrelevan │ │ │ │ -000e62c0: 7420 746f 2074 6865 2053 4f41 5020 7072 t to the SOAP pr │ │ │ │ -000e62d0: 6f63 6573 736f 722c 2073 6565 203c 6120 ocessor, see One-dimensiona │ │ │ │ -000e6310: 6c20 6479 6e61 6d69 6320 534f 4150 2d65 l dynamic SOAP-e │ │ │ │ -000e6320: 6e63 6f64 6564 2061 7272 6179 733c 2f61 ncoded arrays.

.

An arr │ │ │ │ -000e6340: 6179 2069 7320 6465 636c 6172 6564 2069 ay is declared i │ │ │ │ -000e6350: 6e20 616e 2069 6e74 6572 6661 6365 2068 n an interface h │ │ │ │ -000e6360: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s │ │ │ │ -000e6370: 6f61 7063 7070 3220 6173 2061 2073 7472 oapcpp2 as a str │ │ │ │ -000e6380: 7563 7420 6f72 2063 6c61 7373 2077 6974 uct or class wit │ │ │ │ -000e6390: 6820 6120 6e61 6d65 2074 6861 7420 6973 h a name that is │ │ │ │ -000e63a0: 2071 7561 6c69 6669 6564 2077 6974 6820 qualified with │ │ │ │ -000e63b0: 6120 6e61 6d65 7370 6163 6520 7072 6566 a namespace pref │ │ │ │ -000e63c0: 6978 2e20 5468 6572 6520 6172 6520 7477 ix. There are tw │ │ │ │ -000e63d0: 6f20 666f 726d 732e 2054 6865 2066 6972 o forms. The fir │ │ │ │ -000e63e0: 7374 2066 6f72 6d20 6973 2073 696d 696c st form is simil │ │ │ │ -000e63f0: 6172 2074 6f20 7468 6520 534f 4150 2d65 ar to the SOAP-e │ │ │ │ -000e6400: 6e63 6f64 6564 2061 7272 6179 2064 6563 ncoded array dec │ │ │ │ -000e6410: 6c61 7261 7469 6f6e 2074 6861 7420 7772 laration that wr │ │ │ │ -000e6420: 6170 7320 7468 6520 3c63 6f64 653e 5f5f aps the __ │ │ │ │ -000e6430: 7074 723c 2f63 6f64 653e 2061 6e64 203c ptr and < │ │ │ │ -000e6440: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size members:

. │ │ │ │ -000e6460: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st │ │ │ │ -000e64a0: 7275 6374 203c 2f73 7061 6e3e 7072 6566 ruct pref │ │ │ │ -000e64b0: 6978 5f5f 6172 7261 795f 6e61 6d65 203c ix__array_name < │ │ │ │ +000e5900: 226c 696e 6522 3e20 2020 2054 7970 6520 "line"> Type │ │ │ │ +000e5910: 2a5f 5f70 7472 3b20 2020 2020 3c73 7061 *__ptr; // pointer to │ │ │ │ +000e5940: 6172 7261 7920 6f66 2065 6c65 6d65 6e74 array of element │ │ │ │ +000e5950: 7320 696e 206d 656d 6f72 793c 2f73 7061 s in memory
.
< │ │ │ │ +000e5980: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e5990: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int __size[K]; │ │ │ │ +000e59b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // number │ │ │ │ +000e59d0: 206f 6620 656c 656d 656e 7473 2070 6572 of elements per │ │ │ │ +000e59e0: 2064 696d 656e 7369 6f6e 3c2f 7370 616e dimension
.
int __offset[K]; │ │ │ │ +000e5a40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona │ │ │ │ +000e5a60: 6c20 534f 4150 2031 2e31 2061 7272 6179 l SOAP 1.1 array │ │ │ │ +000e5a70: 206f 6666 7365 743c 2f73 7061 6e3e 3c2f offset.
... │ │ │ │ +000e5aa0: 2020 2020 2020 2020 2020 2020 3c73 7061 // anything th │ │ │ │ +000e5ad0: 6174 2066 6f6c 6c6f 7773 2068 6572 6520 at follows here │ │ │ │ +000e5ae0: 7769 6c6c 2062 6520 6967 6e6f 7265 6420 will be ignored │ │ │ │ +000e5af0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ +000e5b10: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
.
< │ │ │ │ +000e5b20: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +000e5b30: 3c70 3e77 6865 7265 2074 6865 203c 636f

where the array_name must be a n │ │ │ │ +000e5b60: 6f6e 2d71 7561 6c69 6669 6564 206e 616d on-qualified nam │ │ │ │ +000e5b70: 6520 616e 6420 3c63 6f64 653e 5479 7065 e and Type │ │ │ │ +000e5b80: 3c2f 636f 6465 3e20 6973 2074 6865 2074 is the t │ │ │ │ +000e5b90: 7970 6520 666f 7220 7468 6520 656c 656d ype for the elem │ │ │ │ +000e5ba0: 656e 7473 206f 6620 7468 6520 6172 7261 ents of the arra │ │ │ │ +000e5bb0: 792e 2054 6865 203c 636f 6465 3e5f 5f70 y. The __p │ │ │ │ +000e5bc0: 7472 3c2f 636f 6465 3e20 6d65 6d62 6572 tr member │ │ │ │ +000e5bd0: 2070 6f69 6e74 7320 746f 2074 6865 2061 points to the a │ │ │ │ +000e5be0: 7272 6179 2076 616c 7565 732e 2054 6865 rray values. The │ │ │ │ +000e5bf0: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size array speci │ │ │ │ +000e5c10: 6669 6573 2074 6865 206e 756d 6265 7220 fies the number │ │ │ │ +000e5c20: 6f66 2061 7272 6179 2065 6c65 6d65 6e74 of array element │ │ │ │ +000e5c30: 7320 7065 7220 6469 6d65 6e73 696f 6e2e s per dimension. │ │ │ │ +000e5c40: 2054 6865 203c 636f 6465 3e5f 5f6f 6666 The __off │ │ │ │ +000e5c50: 7365 743c 2f63 6f64 653e 2061 7272 6179 set array │ │ │ │ +000e5c60: 2073 7065 6369 6669 6573 2061 6e20 6f70 specifies an op │ │ │ │ +000e5c70: 7469 6f6e 616c 206f 6666 7365 7420 7065 tional offset pe │ │ │ │ +000e5c80: 7220 6469 6d65 6e73 696f 6e2e 3c2f 703e r dimension.

│ │ │ │ +000e5c90: 0a3c 703e 466f 7220 6578 616d 706c 652c .

For example, │ │ │ │ +000e5ca0: 2074 6865 2066 6f6c 6c6f 7769 6e67 2064 the following d │ │ │ │ +000e5cb0: 6563 6c61 7261 7469 6f6e 2073 7065 6369 eclaration speci │ │ │ │ +000e5cc0: 6669 6573 2061 206d 6174 7269 7820 636c fies a matrix cl │ │ │ │ +000e5cd0: 6173 733a 3c2f 703e 0a3c 6469 7620 636c ass:

.
< │ │ │ │ +000e5cf0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e5d00: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >class Matrix
.
{ publ │ │ │ │ +000e5d60: 6963 3c2f 7370 616e 3e3a 203c 2f64 6976 ic:
.
float * │ │ │ │ +000e5db0: 5f5f 7074 723b 203c 2f64 6976 3e0a 3c64 __ptr;
. │ │ │ │ +000e5dd0: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ +000e5df0: 743c 2f73 7061 6e3e 205f 5f73 697a 655b t __size[ │ │ │ │ +000e5e00: 325d 3b20 3c2f 6469 763e 0a3c 6469 7620 2];
.
│ │ │ │ +000e5e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __offset[2 │ │ │ │ +000e5e50: 5d3b 203c 2f64 6976 3e0a 3c64 6976 2063 ];
.
}; < │ │ │ │ +000e5e70: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

│ │ │ │ +000e5e90: 4279 2063 6f6e 7472 6173 7420 746f 2074 By contrast to t │ │ │ │ +000e5ea0: 6865 206d 6174 7269 7820 636c 6173 7320 he matrix class │ │ │ │ +000e5eb0: 6f66 2053 6563 7469 6f6e 203c 6120 636c of Section Nested one-dim │ │ │ │ +000e5ef0: 656e 7369 6f6e 616c 2064 796e 616d 6963 ensional dynamic │ │ │ │ +000e5f00: 2053 4f41 502d 656e 636f 6465 6420 6172 SOAP-encoded ar │ │ │ │ +000e5f10: 7261 7973 3c2f 613e 2074 6861 7420 6465 rays that de │ │ │ │ +000e5f20: 6669 6e65 7320 6120 6d61 7472 6978 2061 fines a matrix a │ │ │ │ +000e5f30: 7320 616e 2061 7272 6179 206f 6620 706f s an array of po │ │ │ │ +000e5f40: 696e 7465 7273 2074 6f20 6d61 7472 6978 inters to matrix │ │ │ │ +000e5f50: 2072 6f77 732c 2074 6869 7320 636c 6173 rows, this clas │ │ │ │ +000e5f60: 7320 6861 7320 6f6e 6520 706f 696e 7465 s has one pointe │ │ │ │ +000e5f70: 7220 746f 2061 206d 6174 7269 7820 7374 r to a matrix st │ │ │ │ +000e5f80: 6f72 6564 2069 6e20 726f 772d 6d61 6a6f ored in row-majo │ │ │ │ +000e5f90: 7220 6f72 6465 722e 2054 6865 2073 697a r order. The siz │ │ │ │ +000e5fa0: 6520 6f66 2074 6865 206d 6174 7269 7820 e of the matrix │ │ │ │ +000e5fb0: 6973 2064 6574 6572 6d69 6e65 6420 6279 is determined by │ │ │ │ +000e5fc0: 2074 6865 203c 636f 6465 3e5f 5f73 697a the __siz │ │ │ │ +000e5fd0: 653c 2f63 6f64 653e 206d 656d 6265 723a e member: │ │ │ │ +000e5fe0: 203c 636f 6465 3e5f 5f73 697a 655b 305d __size[0] │ │ │ │ +000e5ff0: 3c2f 636f 6465 3e20 686f 6c64 7320 7468 holds th │ │ │ │ +000e6000: 6520 6e75 6d62 6572 206f 6620 726f 7773 e number of rows │ │ │ │ +000e6010: 2061 6e64 203c 636f 6465 3e5f 5f73 697a and __siz │ │ │ │ +000e6020: 655b 315d 3c2f 636f 6465 3e20 686f 6c64 e[1] hold │ │ │ │ +000e6030: 7320 7468 6520 6e75 6d62 6572 206f 6620 s the number of │ │ │ │ +000e6040: 636f 6c75 6d6e 7320 6f66 2074 6865 206d columns of the m │ │ │ │ +000e6050: 6174 7269 782e 204c 696b 6577 6973 652c atrix. Likewise, │ │ │ │ +000e6060: 203c 636f 6465 3e5f 5f6f 6666 7365 745b __offset[ │ │ │ │ +000e6070: 305d 3c2f 636f 6465 3e20 6973 2074 6865 0] is the │ │ │ │ +000e6080: 2072 6f77 206f 6666 7365 7420 616e 6420 row offset and │ │ │ │ +000e6090: 3c63 6f64 653e 5f5f 6f66 6673 6574 5b31 __offset[1 │ │ │ │ +000e60a0: 5d3c 2f63 6f64 653e 2069 7320 7468 6520 ] is the │ │ │ │ +000e60b0: 636f 6c75 6d6e 7320 6f66 6673 6574 2e3c columns offset.< │ │ │ │ +000e60c0: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.

│ │ │ │ +000e60e0: 3c64 743e 5761 726e 696e 673c 2f64 743e
Warning
│ │ │ │ +000e60f0: 3c64 643e 534f 4150 2031 2e32 2064 6f65
SOAP 1.2 doe │ │ │ │ +000e6100: 7320 6e6f 7420 7375 7070 6f72 7420 7061 s not support pa │ │ │ │ +000e6110: 7274 6961 6c6c 7920 7472 616e 736d 6974 rtially transmit │ │ │ │ +000e6120: 7465 6420 6172 7261 7973 2061 6e64 2074 ted arrays and t │ │ │ │ +000e6130: 6865 203c 636f 6465 3e5f 5f6f 6666 7365 he __offse │ │ │ │ +000e6140: 743c 2f63 6f64 653e 206d 656d 6265 7220 t member │ │ │ │ +000e6150: 6f66 2061 2064 796e 616d 6963 2061 7272 of a dynamic arr │ │ │ │ +000e6160: 6179 2069 7320 6967 6e6f 7265 642e 3c2f ay is ignored.
.

.... │ │ │ │ +000e6180: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +000e6190: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +000e61a0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

.< │ │ │ │ +000e61b0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>< │ │ │ │ +000e61d0: 2f61 3e0a 4e6f 6e2d 534f 4150 2064 796e /a>.Non-SOAP dyn │ │ │ │ +000e61e0: 616d 6963 2061 7272 6179 733c 2f68 333e amic arrays

│ │ │ │ +000e61f0: 0a3c 703e 416e 2061 7272 6179 2069 7320 .

An array is │ │ │ │ +000e6200: 7365 7269 616c 697a 6564 2061 7320 6120 serialized as a │ │ │ │ +000e6210: 7365 7175 656e 6365 206f 6620 584d 4c20 sequence of XML │ │ │ │ +000e6220: 656c 656d 656e 7473 2e20 4279 2063 6f6e elements. By con │ │ │ │ +000e6230: 7472 6173 742c 2061 2053 4f41 502d 656e trast, a SOAP-en │ │ │ │ +000e6240: 636f 6465 6420 6172 7261 7920 6973 2073 coded array is s │ │ │ │ +000e6250: 6572 6961 6c69 7a65 6420 6173 2061 6e20 erialized as an │ │ │ │ +000e6260: 656c 656d 656e 7420 7769 7468 2061 2073 element with a s │ │ │ │ +000e6270: 6571 7565 6e63 6520 6f66 2073 7562 2d65 equence of sub-e │ │ │ │ +000e6280: 6c65 6d65 6e74 732c 2077 686f 7365 2074 lements, whose t │ │ │ │ +000e6290: 6167 206e 616d 6573 2061 7265 2069 7272 ag names are irr │ │ │ │ +000e62a0: 656c 6576 616e 7420 746f 2074 6865 2053 elevant to the S │ │ │ │ +000e62b0: 4f41 5020 7072 6f63 6573 736f 722c 2073 OAP processor, s │ │ │ │ +000e62c0: 6565 203c 6120 636c 6173 733d 2265 6c22 ee One-dime │ │ │ │ +000e62f0: 6e73 696f 6e61 6c20 6479 6e61 6d69 6320 nsional dynamic │ │ │ │ +000e6300: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr │ │ │ │ +000e6310: 6179 733c 2f61 3e2e 3c2f 703e 0a3c 703e ays.

.

│ │ │ │ +000e6320: 416e 2061 7272 6179 2069 7320 6465 636c An array is decl │ │ │ │ +000e6330: 6172 6564 2069 6e20 616e 2069 6e74 6572 ared in an inter │ │ │ │ +000e6340: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ +000e6350: 2066 6f72 2073 6f61 7063 7070 3220 6173 for soapcpp2 as │ │ │ │ +000e6360: 2061 2073 7472 7563 7420 6f72 2063 6c61 a struct or cla │ │ │ │ +000e6370: 7373 2077 6974 6820 6120 6e61 6d65 2074 ss with a name t │ │ │ │ +000e6380: 6861 7420 6973 2071 7561 6c69 6669 6564 hat is qualified │ │ │ │ +000e6390: 2077 6974 6820 6120 6e61 6d65 7370 6163 with a namespac │ │ │ │ +000e63a0: 6520 7072 6566 6978 2e20 5468 6572 6520 e prefix. There │ │ │ │ +000e63b0: 6172 6520 7477 6f20 666f 726d 732e 2054 are two forms. T │ │ │ │ +000e63c0: 6865 2066 6972 7374 2066 6f72 6d20 6973 he first form is │ │ │ │ +000e63d0: 2073 696d 696c 6172 2074 6f20 7468 6520 similar to the │ │ │ │ +000e63e0: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr │ │ │ │ +000e63f0: 6179 2064 6563 6c61 7261 7469 6f6e 2074 ay declaration t │ │ │ │ +000e6400: 6861 7420 7772 6170 7320 7468 6520 3c63 hat wraps the __ptr │ │ │ │ +000e6420: 2061 6e64 203c 636f 6465 3e5f 5f73 697a and __siz │ │ │ │ +000e6430: 653c 2f63 6f64 653e 206d 656d 6265 7273 e members │ │ │ │ +000e6440: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct prefix__array_ │ │ │ │ +000e64a0: 6e61 6d65 203c 2f64 6976 3e0a 3c64 6976 name
.
{< │ │ │ │ 000e64c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ -000e64e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Type *__pt │ │ │ │ -000e6500: 723b 2020 3c73 7061 6e20 636c 6173 733d r; // poi │ │ │ │ -000e6520: 6e74 6572 2074 6f20 6172 7261 7920 6f66 nter to array of │ │ │ │ -000e6530: 2065 6c65 6d65 6e74 7320 696e 206d 656d elements in mem │ │ │ │ -000e6540: 6f72 793c 2f73 7061 6e3e 3c2f 6469 763e ory
│ │ │ │ -000e6550: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __si │ │ │ │ -000e6590: 7a65 3b20 2020 3c73 7061 6e20 636c 6173 ze; // n │ │ │ │ -000e65b0: 756d 6265 7220 6f66 2065 6c65 6d65 6e74 umber of element │ │ │ │ -000e65c0: 7320 706f 696e 7465 6420 746f 203c 2f73 s pointed to
.
│ │ │ │ -000e65f0: 202e 2e2e 2020 2020 2020 2020 2020 203c ... < │ │ │ │ -000e6600: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000e6610: 656e 7422 3e2f 2f20 616e 7974 6869 6e67 ent">// anything │ │ │ │ -000e6620: 2074 6861 7420 666f 6c6c 6f77 7320 6865 that follows he │ │ │ │ -000e6630: 7265 2077 696c 6c20 6265 2069 676e 6f72 re will be ignor │ │ │ │ -000e6640: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
│ │ │ │ -000e6650: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

The second │ │ │ │ -000e6690: 2066 6f72 6d20 6973 206d 6f72 6520 6765 form is more ge │ │ │ │ -000e66a0: 6e65 7269 632c 2062 6563 6175 7365 2074 neric, because t │ │ │ │ -000e66b0: 6865 2061 7272 6179 2063 616e 2062 6520 he array can be │ │ │ │ -000e66c0: 6465 636c 6172 6564 2061 6e79 7768 6572 declared anywher │ │ │ │ -000e66d0: 6520 696e 2074 6865 2073 7472 7563 7420 e in the struct │ │ │ │ -000e66e0: 6f72 2063 6c61 7373 2061 6e64 206d 756c or class and mul │ │ │ │ -000e66f0: 7469 706c 6520 6172 7261 7973 2063 616e tiple arrays can │ │ │ │ -000e6700: 2062 6520 7573 6564 2061 7320 6d65 6d62 be used as memb │ │ │ │ -000e6710: 6572 732c 2065 6163 6820 7769 7468 2061 ers, each with a │ │ │ │ -000e6720: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member (__sizeName is also all │ │ │ │ -000e6760: 6f77 6564 2920 7468 6174 2070 7265 6365 owed) that prece │ │ │ │ -000e6770: 6465 7320 6120 706f 696e 7465 7220 6d65 des a pointer me │ │ │ │ -000e6780: 6d62 6572 3a3c 2f70 3e0a 3c64 6976 2063 mber:

.
│ │ │ │ -000e67a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct < │ │ │ │ -000e67d0: 2f73 7061 6e3e 7072 6566 6978 5f5f 6172 /span>prefix__ar │ │ │ │ -000e67e0: 7261 795f 6e61 6d65 203c 2f64 6976 3e0a ray_name
. │ │ │ │ +000e64d0: 3d22 6c69 6e65 223e 2020 2020 5479 7065 ="line"> Type │ │ │ │ +000e64e0: 202a 5f5f 7074 723b 2020 3c73 7061 6e20 *__ptr; │ │ │ │ +000e6500: 2f2f 2070 6f69 6e74 6572 2074 6f20 6172 // pointer to ar │ │ │ │ +000e6510: 7261 7920 6f66 2065 6c65 6d65 6e74 7320 ray of elements │ │ │ │ +000e6520: 696e 206d 656d 6f72 793c 2f73 7061 6e3e in memory │ │ │ │ +000e6530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
int __size; // number of e │ │ │ │ +000e65a0: 6c65 6d65 6e74 7320 706f 696e 7465 6420 lements pointed │ │ │ │ +000e65b0: 746f 203c 2f73 7061 6e3e 3c2f 6469 763e to
│ │ │ │ +000e65c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... │ │ │ │ +000e65e0: 2020 2020 203c 7370 616e 2063 6c61 7373 // an │ │ │ │ +000e6600: 7974 6869 6e67 2074 6861 7420 666f 6c6c ything that foll │ │ │ │ +000e6610: 6f77 7320 6865 7265 2077 696c 6c20 6265 ows here will be │ │ │ │ +000e6620: 2069 676e 6f72 6564 203c 2f73 7061 6e3e ignored │ │ │ │ +000e6630: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};
.

The │ │ │ │ +000e6670: 7365 636f 6e64 2066 6f72 6d20 6973 206d second form is m │ │ │ │ +000e6680: 6f72 6520 6765 6e65 7269 632c 2062 6563 ore generic, bec │ │ │ │ +000e6690: 6175 7365 2074 6865 2061 7272 6179 2063 ause the array c │ │ │ │ +000e66a0: 616e 2062 6520 6465 636c 6172 6564 2061 an be declared a │ │ │ │ +000e66b0: 6e79 7768 6572 6520 696e 2074 6865 2073 nywhere in the s │ │ │ │ +000e66c0: 7472 7563 7420 6f72 2063 6c61 7373 2061 truct or class a │ │ │ │ +000e66d0: 6e64 206d 756c 7469 706c 6520 6172 7261 nd multiple arra │ │ │ │ +000e66e0: 7973 2063 616e 2062 6520 7573 6564 2061 ys can be used a │ │ │ │ +000e66f0: 7320 6d65 6d62 6572 732c 2065 6163 6820 s members, each │ │ │ │ +000e6700: 7769 7468 2061 203c 636f 6465 3e5f 5f73 with a __s │ │ │ │ +000e6710: 697a 653c 2f63 6f64 653e 206d 656d 6265 ize membe │ │ │ │ +000e6720: 7220 283c 636f 6465 3e5f 5f73 697a 654e r (__sizeN │ │ │ │ +000e6730: 616d 653c 2f63 6f64 653e 2069 7320 616c ame is al │ │ │ │ +000e6740: 736f 2061 6c6c 6f77 6564 2920 7468 6174 so allowed) that │ │ │ │ +000e6750: 2070 7265 6365 6465 7320 6120 706f 696e precedes a poin │ │ │ │ +000e6760: 7465 7220 6d65 6d62 6572 3a3c 2f70 3e0a ter member:

. │ │ │ │ +000e6770: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st │ │ │ │ +000e67b0: 7275 6374 203c 2f73 7061 6e3e 7072 6566 ruct pref │ │ │ │ +000e67c0: 6978 5f5f 6172 7261 795f 6e61 6d65 203c ix__array_name < │ │ │ │ +000e67d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{
. │ │ │ │ 000e67f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
│ │ │ │ -000e6820: 2e2e 2e20 2020 2020 2020 2020 2020 2020 ... │ │ │ │ -000e6830: 2020 2020 2020 3c73 7061 6e20 636c 6173 // o │ │ │ │ -000e6850: 7468 6572 206d 656d 6265 7273 2074 6861 ther members tha │ │ │ │ -000e6860: 7420 6172 6520 7365 7269 616c 697a 6564 t are serialized │ │ │ │ -000e6870: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ -000e6890: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -000e68b0: 743c 2f73 7061 6e3e 205f 5f73 697a 655f t __size_ │ │ │ │ -000e68c0: 6f66 5f61 7272 6179 313b 203c 7370 616e of_array1; // number of el │ │ │ │ -000e68f0: 656d 656e 7473 2070 6f69 6e74 6564 2074 ements pointed t │ │ │ │ -000e6900: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
. │ │ │ │ -000e6910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
Type1 *arr │ │ │ │ -000e6930: 6179 313b 2020 2020 2020 2020 3c73 7061 ay1; // pointer to │ │ │ │ -000e6960: 6172 7261 7920 6f66 2065 6c65 6d65 6e74 array of element │ │ │ │ -000e6970: 7320 696e 206d 656d 6f72 793c 2f73 7061 s in memory
.
. │ │ │ │ -000e69a0: 2e2e 2020 2020 2020 2020 2020 2020 2020 .. │ │ │ │ -000e69b0: 2020 2020 203c 7370 616e 2063 6c61 7373 // ot │ │ │ │ -000e69d0: 6865 7220 6d65 6d62 6572 7320 7468 6174 her members that │ │ │ │ -000e69e0: 2061 7265 2073 6572 6961 6c69 7a65 643c are serialized< │ │ │ │ -000e69f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. │ │ │ │ -000e6a10: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -000e6a30: 3c2f 7370 616e 3e20 5f5f 7369 7a65 5f6f __size_o │ │ │ │ -000e6a40: 665f 6172 7261 7931 3b20 3c73 7061 6e20 f_array1; │ │ │ │ -000e6a60: 2f2f 206e 756d 6265 7220 6f66 2065 6c65 // number of ele │ │ │ │ -000e6a70: 6d65 6e74 7320 706f 696e 7465 6420 746f ments pointed to │ │ │ │ -000e6a80: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.< │ │ │ │ -000e6a90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e6aa0: 3e20 2020 2054 7970 6532 202a 6172 7261 > Type2 *arra │ │ │ │ -000e6ab0: 7932 3b20 2020 2020 2020 203c 7370 616e y2; // pointer to a │ │ │ │ -000e6ae0: 7272 6179 206f 6620 656c 656d 656e 7473 rray of elements │ │ │ │ -000e6af0: 2069 6e20 6d65 6d6f 7279 3c2f 7370 616e in memory
.
.. │ │ │ │ -000e6b20: 2e20 2020 2020 2020 2020 2020 2020 2020 . │ │ │ │ -000e6b30: 2020 2020 3c73 7061 6e20 636c 6173 733d // oth │ │ │ │ -000e6b50: 6572 206d 656d 6265 7273 2074 6861 7420 er members that │ │ │ │ -000e6b60: 6172 6520 7365 7269 616c 697a 6564 3c2f are serialized
.
}; │ │ │ │ -000e6b90: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.

The __siz │ │ │ │ -000e6bc0: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member │ │ │ │ -000e6bd0: 7368 6f75 6c64 2062 6520 616e 203c 636f should be an int ty │ │ │ │ -000e6bf0: 7065 2061 6e64 2063 616e 6e6f 7420 6265 pe and cannot be │ │ │ │ -000e6c00: 2061 203c 636f 6465 3e73 697a 655f 743c a size_t< │ │ │ │ -000e6c10: 2f63 6f64 653e 2074 7970 6520 6f72 206f /code> type or o │ │ │ │ -000e6c20: 7468 6572 2069 6e74 6567 6572 2074 7970 ther integer typ │ │ │ │ -000e6c30: 652e 3c2f 703e 0a3c 703e 466f 7220 6578 e.

.

For ex │ │ │ │ -000e6c40: 616d 706c 652c 2077 6520 6465 6669 6e65 ample, we define │ │ │ │ -000e6c50: 2061 204d 6170 2073 7472 7563 7475 7265 a Map structure │ │ │ │ -000e6c60: 2074 6861 7420 636f 6e74 6169 6e73 2061 that contains a │ │ │ │ -000e6c70: 2073 6571 7565 6e63 6520 6f66 206b 6579 sequence of key │ │ │ │ -000e6c80: 2d76 616c 2070 6169 7273 3a3c 2f70 3e0a -val pairs:

. │ │ │ │ -000e6c90: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st │ │ │ │ -000e6cd0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__ │ │ │ │ -000e6ce0: 4d61 7020 3c2f 6469 763e 0a3c 6469 7620 Map
.
{.
int │ │ │ │ -000e6d40: 5f5f 7369 7a65 3b20 3c73 7061 6e20 636c __size; // │ │ │ │ -000e6d60: 206e 756d 6265 7220 6f66 2070 6169 7273 number of pairs │ │ │ │ -000e6d70: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
.< │ │ │ │ -000e6d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e6d90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc │ │ │ │ -000e6db0: 7420 3c2f 7370 616e 3e6e 735f 5f50 6169 t ns__Pai │ │ │ │ -000e6dc0: 723c 2f64 6976 3e0a 3c64 6976 2063 6c61 r
.
{< │ │ │ │ -000e6de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -000e6e00: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *key;
.
char *val;
. │ │ │ │ -000e6e90: 2020 2020 7d20 2a70 6169 723b 2020 2020 } *pair; │ │ │ │ -000e6ea0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // array o │ │ │ │ -000e6ec0: 6620 7061 6972 733c 2f73 7061 6e3e 3c2f f pairs.
};
. │ │ │ │ -000e6ef0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

Since │ │ │ │ -000e6f10: 322e 372e 3136 2069 7420 6973 2061 6c73 2.7.16 it is als │ │ │ │ -000e6f20: 6f20 706f 7373 6962 6c65 2074 6f20 7573 o possible to us │ │ │ │ -000e6f30: 6520 6120 273c 636f 6465 3e24 3c2f 636f e a '$' as a specia │ │ │ │ -000e6f50: 6c20 6d61 726b 6572 2074 6f20 616e 6e6f l marker to anno │ │ │ │ -000e6f60: 7461 7465 2061 2073 697a 6520 6d65 6d62 tate a size memb │ │ │ │ -000e6f70: 6572 2069 6e73 7465 6164 206f 6620 7265 er instead of re │ │ │ │ -000e6f80: 7175 6972 696e 6720 7468 6573 6520 6d65 quiring these me │ │ │ │ -000e6f90: 6d62 6572 7320 746f 2073 7461 7274 2077 mbers to start w │ │ │ │ -000e6fa0: 6974 6820 3c63 6f64 653e 5f5f 7369 7a65 ith __size │ │ │ │ -000e6fb0: 3c2f 636f 6465 3e3a 3c2f 703e 0a3c 6469 :

.
struc │ │ │ │ -000e7000: 7420 3c2f 7370 616e 3e6e 735f 5f4d 6170 t ns__Map │ │ │ │ -000e7010: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{
.
$ int siz │ │ │ │ -000e7070: 653b 2020 3c73 7061 6e20 636c 6173 733d e; // num │ │ │ │ -000e7090: 6265 7220 6f66 2070 6169 7273 203c 2f73 ber of pairs
.
│ │ │ │ -000e70c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct ns__Pair.
{
.
char *key;
. │ │ │ │ -000e7170: 2020 2020 2020 2020 3c73 7061 6e20 636c char *v │ │ │ │ -000e71a0: 616c 3b3c 2f64 6976 3e0a 3c64 6976 2063 al;
.
│ │ │ │ -000e71c0: 7d20 2a70 6169 723b 2020 2020 3c73 7061 } *pair; // array of pa │ │ │ │ -000e71f0: 6972 733c 2f73 7061 6e3e 3c2f 6469 763e irs
│ │ │ │ -000e7200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

The array │ │ │ │ -000e7240: 7769 6c6c 2062 6520 7365 7269 616c 697a will be serializ │ │ │ │ -000e7250: 6564 2069 6e20 584d 4c20 6173 2061 2073 ed in XML as a s │ │ │ │ -000e7260: 6571 7565 6e63 6520 6f66 2070 6169 7273 equence of pairs │ │ │ │ -000e7270: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
│ │ │ │ -000e72b0: 266c 743b 3c73 7061 6e20 636c 6173 733d <ns │ │ │ │ -000e72d0: 3a4d 6170 3c2f 7370 616e 3e26 6774 3b20 :Map> │ │ │ │ -000e72e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<< │ │ │ │ -000e7300: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000e7310: 6f72 6474 7970 6522 3e70 6169 723c 2f73 ordtype">pair>
. │ │ │ │ -000e7330: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<key&g │ │ │ │ -000e7370: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Joe</key> │ │ │ │ -000e73c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
< │ │ │ │ -000e73e0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;val>555 77 │ │ │ │ -000e7410: 3132 3334 266c 743b 2f3c 7370 616e 2063 1234</val> │ │ │ │ -000e7440: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ -000e7460: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/pair │ │ │ │ -000e7480: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<pair │ │ │ │ -000e74d0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
.
│ │ │ │ -000e74f0: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ -000e7510: 6b65 793c 2f73 7061 6e3e 2667 743b 3c73 key>Susan │ │ │ │ -000e7540: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </k │ │ │ │ -000e7560: 6579 3c2f 7370 616e 3e26 6774 3b20 3c2f ey> .
<< │ │ │ │ -000e7590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000e75a0: 6f72 6474 7970 6522 3e76 616c 3c2f 7370 ordtype">val>555 12 67 │ │ │ │ -000e75c0: 3235 266c 743b 2f3c 7370 616e 2063 6c61 25</val> │ │ │ │ -000e75f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
</ │ │ │ │ -000e7610: 3c73 7061 6e20 636c 6173 733d 226b 6579 pair>
│ │ │ │ -000e7640: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<pair&g │ │ │ │ -000e7680: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
│ │ │ │ -000e76a0: 266c 743b 3c73 7061 6e20 636c 6173 733d <ke │ │ │ │ -000e76c0: 793c 2f73 7061 6e3e 2667 743b 3c73 7061 y>Pete< │ │ │ │ -000e76f0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/key< │ │ │ │ -000e7710: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>>
.
<val │ │ │ │ -000e7760: 2667 743b 3535 3520 3939 2034 3332 3126 >555 99 4321& │ │ │ │ -000e7770: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/va │ │ │ │ -000e7790: 6c3c 2f73 7061 6e3e 2667 743b 203c 2f64 l> .
</pair>
. │ │ │ │ -000e7800: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </n │ │ │ │ -000e7820: 733a 4d61 703c 2f73 7061 6e3e 2667 743b s:Map> │ │ │ │ -000e7830: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.
< │ │ │ │ -000e7850: 2f64 6976 3e3c 703e 4465 7365 7269 616c /div>

Deserial │ │ │ │ -000e7860: 697a 6174 696f 6e20 6973 206c 6573 7320 ization is less │ │ │ │ -000e7870: 6566 6669 6369 656e 7420 636f 6d70 6172 efficient compar │ │ │ │ -000e7880: 6564 2074 6f20 6120 534f 4150 2d65 6e63 ed to a SOAP-enc │ │ │ │ -000e7890: 6f64 6564 2061 7272 6179 2c20 6265 6361 oded array, beca │ │ │ │ -000e78a0: 7573 6520 7468 6520 7369 7a65 206f 6620 use the size of │ │ │ │ -000e78b0: 7468 6520 7365 7175 656e 6365 2069 7320 the sequence is │ │ │ │ -000e78c0: 6e6f 7420 7061 7274 206f 6620 7468 6520 not part of the │ │ │ │ -000e78d0: 534f 4150 2065 6e63 6f64 696e 672e 2042 SOAP encoding. B │ │ │ │ -000e78e0: 7566 6665 7269 6e67 2069 7320 7573 6564 uffering is used │ │ │ │ -000e78f0: 2062 7920 7468 6520 6465 7365 7269 616c by the deserial │ │ │ │ -000e7900: 697a 6572 2074 6f20 636f 6c6c 6563 7420 izer to collect │ │ │ │ -000e7910: 7468 6520 656c 656d 656e 7473 2069 6e20 the elements in │ │ │ │ -000e7920: 6d65 6d6f 7279 2e20 5768 656e 2074 6865 memory. When the │ │ │ │ -000e7930: 2065 6e64 206f 6620 7468 6520 6c69 7374 end of the list │ │ │ │ -000e7940: 2069 7320 7265 6163 6865 642c 2074 6865 is reached, the │ │ │ │ -000e7950: 2062 7566 6665 7265 6420 656c 656d 656e buffered elemen │ │ │ │ -000e7960: 7473 2061 7265 2063 6f70 6965 6420 746f ts are copied to │ │ │ │ -000e7970: 2061 206e 6577 6c79 2061 6c6c 6f63 6174 a newly allocat │ │ │ │ -000e7980: 6564 206d 616e 6167 6564 2073 7061 6365 ed managed space │ │ │ │ -000e7990: 206f 6e20 7468 6520 6865 6170 2066 6f72 on the heap for │ │ │ │ -000e79a0: 2074 6865 2064 796e 616d 6963 2061 7272 the dynamic arr │ │ │ │ -000e79b0: 6179 2e3c 2f70 3e0a 3c70 3e4d 756c 7469 ay.

.

Multi │ │ │ │ -000e79c0: 706c 6520 6172 7261 7973 2063 616e 2062 ple arrays can b │ │ │ │ -000e79d0: 6520 7061 7274 206f 6620 6120 7374 7275 e part of a stru │ │ │ │ -000e79e0: 6374 206f 7220 636c 6173 732e 2046 6f72 ct or class. For │ │ │ │ -000e79f0: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

.
stru │ │ │ │ -000e7a40: 6374 203c 2f73 7061 6e3e 6e73 5f5f 436f ct ns__Co │ │ │ │ -000e7a50: 6e74 6163 7420 3c2f 6469 763e 0a3c 6469 ntact
.{ │ │ │ │ -000e7a70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
char *firstName; < │ │ │ │ -000e7ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
char *lastName; .
$ int n │ │ │ │ -000e7b50: 5068 6f6e 6573 3b20 2020 2020 2020 2020 Phones; │ │ │ │ -000e7b60: 203c 7370 616e 2063 6c61 7373 3d22 636f // number │ │ │ │ -000e7b80: 206f 6620 5068 6f6e 6573 3c2f 7370 616e of Phones
.
│ │ │ │ -000e7c00: 554c 4f4e 4736 343c 2f61 3e20 2a70 686f ULONG64 *pho │ │ │ │ -000e7c10: 6e65 4e75 6d62 6572 3b20 3c73 7061 6e20 neNumber; │ │ │ │ -000e7c30: 2f2f 2061 7272 6179 206f 6620 7068 6f6e // array of phon │ │ │ │ -000e7c40: 6520 6e75 6d62 6572 7320 3c2f 7370 616e e numbers
.
$ int nEmails; │ │ │ │ -000e7ca0: 2020 2020 203c 7370 616e 2063 6c61 7373 // nu │ │ │ │ -000e7cc0: 6d62 6572 206f 6620 656d 6169 6c73 203c mber of emails < │ │ │ │ -000e7cd0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. │ │ │ │ -000e7cf0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ -000e7d10: 723c 2f73 7061 6e3e 202a 2a65 6d61 696c r **email │ │ │ │ -000e7d20: 4164 6472 6573 733b 2020 3c73 7061 6e20 Address; │ │ │ │ -000e7d40: 2f2f 2061 7272 6179 206f 6620 656d 6169 // array of emai │ │ │ │ -000e7d50: 6c20 6164 6472 6573 7365 7320 3c2f 7370 l addresses
.
};.

T │ │ │ │ -000e7da0: 6865 2058 4d4c 2073 6572 6961 6c69 7a61 he XML serializa │ │ │ │ -000e7db0: 7469 6f6e 206f 6620 616e 2065 7861 6d70 tion of an examp │ │ │ │ -000e7dc0: 6c65 203c 636f 6465 3e6e 735f 5f43 6f6e le ns__Con │ │ │ │ -000e7dd0: 7461 6374 3c2f 636f 6465 3e20 6973 3a3c tact is:< │ │ │ │ -000e7de0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l │ │ │ │ -000e7e20: 743b 3c73 7061 6e20 636c 6173 733d 226b t;ns:C │ │ │ │ -000e7e40: 6f6e 7461 6374 3c2f 7370 616e 3e26 6774 ontact> │ │ │ │ -000e7e50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ -000e7e70: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;first │ │ │ │ -000e7e90: 4e61 6d65 3c2f 7370 616e 3e26 6774 3b3c Name>< │ │ │ │ -000e7ea0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000e7eb0: 6f72 6422 3e4a 6f65 3c2f 7370 616e 3e26 ord">Joe& │ │ │ │ -000e7ec0: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/fi │ │ │ │ -000e7ee0: 7273 744e 616d 653c 2f73 7061 6e3e 2667 rstName&g │ │ │ │ -000e7ef0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l │ │ │ │ -000e7f10: 743b 3c73 7061 6e20 636c 6173 733d 226b t;last │ │ │ │ -000e7f30: 4e61 6d65 3c2f 7370 616e 3e26 6774 3b3c Name>< │ │ │ │ -000e7f40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000e7f50: 6f72 6422 3e53 6d69 7468 3c2f 7370 616e ord">Smith</ │ │ │ │ -000e7f80: 6c61 7374 4e61 6d65 3c2f 7370 616e 3e26 lastName& │ │ │ │ -000e7f90: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
& │ │ │ │ -000e7fb0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;pho │ │ │ │ -000e7fd0: 6e65 4e75 6d62 6572 3c2f 7370 616e 3e26 neNumber& │ │ │ │ -000e7fe0: 6774 3b35 3535 3131 3132 3232 3226 6c74 gt;5551112222< │ │ │ │ -000e7ff0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/phon │ │ │ │ -000e8010: 654e 756d 6265 723c 2f73 7061 6e3e 2667 eNumber&g │ │ │ │ -000e8020: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l │ │ │ │ -000e8040: 743b 3c73 7061 6e20 636c 6173 733d 226b t;phon │ │ │ │ -000e8060: 654e 756d 6265 723c 2f73 7061 6e3e 2667 eNumber&g │ │ │ │ -000e8070: 743b 3535 3531 3233 3435 3637 266c 743b t;5551234567< │ │ │ │ -000e8080: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /phone │ │ │ │ -000e80a0: 4e75 6d62 6572 3c2f 7370 616e 3e26 6774 Number> │ │ │ │ -000e80b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ -000e80d0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;phone │ │ │ │ -000e80f0: 4e75 6d62 6572 3c2f 7370 616e 3e26 6774 Number> │ │ │ │ -000e8100: 3b35 3535 3233 3438 3930 3126 6c74 3b2f ;5552348901</ │ │ │ │ -000e8110: 3c73 7061 6e20 636c 6173 733d 226b 6579 phoneN │ │ │ │ -000e8130: 756d 6265 723c 2f73 7061 6e3e 2667 743b umber> │ │ │ │ -000e8140: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
< │ │ │ │ -000e8160: 3c73 7061 6e20 636c 6173 733d 226b 6579 emailA │ │ │ │ -000e8180: 6464 7265 7373 3c2f 7370 616e 3e26 6774 ddress> │ │ │ │ -000e8190: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;Joe.Smith │ │ │ │ -000e81b0: 3c2f 7370 616e 3e40 3c73 7061 6e20 636c @ma │ │ │ │ -000e81d0: 696c 2e63 6f6d 3c2f 7370 616e 3e26 6c74 il.com< │ │ │ │ -000e81e0: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/emai │ │ │ │ -000e8200: 6c41 6464 7265 7373 3c2f 7370 616e 3e26 lAddress& │ │ │ │ -000e8210: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
& │ │ │ │ -000e8230: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ema │ │ │ │ -000e8250: 696c 4164 6472 6573 733c 2f73 7061 6e3e ilAddress │ │ │ │ -000e8260: 2667 743b 3c73 7061 6e20 636c 6173 733d >Joe@Smith │ │ │ │ -000e82a0: 2e63 6f6d 3c2f 7370 616e 3e26 6c74 3b2f .com</ │ │ │ │ -000e82b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 emailA │ │ │ │ -000e82d0: 6464 7265 7373 3c2f 7370 616e 3e26 6774 ddress> │ │ │ │ -000e82e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
</ │ │ │ │ -000e8300: 3c73 7061 6e20 636c 6173 733d 226b 6579 ns:Con │ │ │ │ -000e8320: 7461 6374 3c2f 7370 616e 3e26 6774 3b3c tact>< │ │ │ │ -000e8330: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

For C++, │ │ │ │ -000e8360: 6120 6265 7474 6572 2061 6c74 6572 6e61 a better alterna │ │ │ │ -000e8370: 7469 7665 2074 6f20 6172 7261 7973 2061 tive to arrays a │ │ │ │ -000e8380: 7265 2063 6f6e 7461 696e 6572 732c 2077 re containers, w │ │ │ │ -000e8390: 6869 6368 2061 7265 2064 6573 6372 6962 hich are describ │ │ │ │ -000e83a0: 6564 206e 6578 742e 3c2f 703e 0a3c 703e ed next.

.

│ │ │ │ -000e83b0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -000e83d0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

.STL │ │ │ │ -000e8410: 2063 6f6e 7461 696e 6572 733c 2f68 333e containers

│ │ │ │ -000e8420: 0a3c 703e 5468 6520 5354 4c20 636f 6e74 .

The STL cont │ │ │ │ -000e8430: 6169 6e65 7273 203c 636f 6465 3e73 7464 ainers std │ │ │ │ -000e8440: 3a3a 6465 7175 653c 2f63 6f64 653e 2c20 ::deque, │ │ │ │ -000e8450: 3c63 6f64 653e 7374 643a 3a6c 6973 743c std::list< │ │ │ │ -000e8460: 2f63 6f64 653e 2c20 3c63 6f64 653e 7374 /code>, st │ │ │ │ -000e8470: 643a 3a73 6574 3c2f 636f 6465 3e2c 2061 d::set, a │ │ │ │ -000e8480: 6e64 203c 636f 6465 3e73 7464 3a3a 7665 nd std::ve │ │ │ │ -000e8490: 6374 6f72 3c2f 636f 6465 3e20 6172 6520 ctor are │ │ │ │ -000e84a0: 7365 7269 616c 697a 6162 6c65 2069 6e20 serializable in │ │ │ │ -000e84b0: 584d 4c20 6279 2074 6865 2073 6f61 7063 XML by the soapc │ │ │ │ -000e84c0: 7070 322d 6765 6e65 7261 7465 6420 7365 pp2-generated se │ │ │ │ -000e84d0: 7269 616c 697a 6572 732e 3c2f 703e 0a3c rializers.

.< │ │ │ │ -000e84e0: 703e 496e 206f 7264 6572 2074 6f20 7573 p>In order to us │ │ │ │ -000e84f0: 6520 636f 6e74 6169 6e65 7273 2069 6e20 e containers in │ │ │ │ -000e8500: 616e 2069 6e74 6572 6661 6365 2068 6561 an interface hea │ │ │ │ -000e8510: 6465 7220 6669 6c65 2066 6f72 2073 6f61 der file for soa │ │ │ │ -000e8520: 7063 7070 322c 2069 6d70 6f72 7420 3c65 pcpp2, import stldeque │ │ │ │ -000e8540: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, │ │ │ │ -000e8550: 3c65 6d3e 3c63 6f64 653e 7374 6c6c 6973 stllis │ │ │ │ -000e8560: 742e 683c 2f63 6f64 653e 3c2f 656d 3e2c t.h, │ │ │ │ -000e8570: 203c 656d 3e3c 636f 6465 3e73 746c 7365 stlse │ │ │ │ -000e8580: 742e 683c 2f63 6f64 653e 3c2f 656d 3e2c t.h, │ │ │ │ -000e8590: 206f 7220 3c65 6d3e 3c63 6f64 653e 7374 or st │ │ │ │ -000e85a0: 6c76 6563 746f 722e 683c 2f63 6f64 653e lvector.h │ │ │ │ -000e85b0: 3c2f 656d 3e20 746f 2065 6e61 626c 6520 to enable │ │ │ │ -000e85c0: 3c63 6f64 653e 7374 643a 3a64 6571 7565 std::deque │ │ │ │ -000e85d0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s │ │ │ │ -000e85e0: 7464 3a3a 6c69 7374 3c2f 636f 6465 3e2c td::list, │ │ │ │ -000e85f0: 203c 636f 6465 3e73 7464 3a3a 7365 743c std::set< │ │ │ │ -000e8600: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and std::vector, respective │ │ │ │ -000e8630: 6c79 2e20 466f 7220 6578 616d 706c 653a ly. For example: │ │ │ │ -000e8640: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
#import │ │ │ │ -000e8690: 2671 756f 743b 7374 6c76 6563 746f 722e "stlvector. │ │ │ │ -000e86a0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" < │ │ │ │ -000e86b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
cl │ │ │ │ -000e86e0: 6173 7320 3c2f 7370 616e 3e6e 735f 5f6d ass ns__m │ │ │ │ -000e86f0: 7943 6c61 7373 203c 2f64 6976 3e0a 3c64 yClass
. │ │ │ │ -000e8710: 7b20 3c73 7061 6e20 636c 6173 733d 226b { public:
. │ │ │ │ -000e8750: 2020 2020 7374 643a 3a76 6563 746f 7226 std::vector& │ │ │ │ -000e8760: 6c74 3b69 6e74 2667 743b 2020 2020 2020 lt;int> │ │ │ │ -000e8770: 2020 2020 6e75 6d62 6572 2031 3a31 303b number 1:10; │ │ │ │ -000e8780: 203c 7370 616e 2063 6c61 7373 3d22 636f // 1 to 1 │ │ │ │ -000e87a0: 3020 6e75 6d62 6572 733c 2f73 7061 6e3e 0 numbers │ │ │ │ -000e87b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
std │ │ │ │ -000e87d0: 3a3a 7665 6374 6f72 266c 743b 7374 643a ::vector<std: │ │ │ │ -000e87e0: 3a73 7472 696e 6726 6774 3b20 2a6e 616d :string> *nam │ │ │ │ -000e87f0: 6520 2020 323b 2020 2020 3c73 7061 6e20 e 2; │ │ │ │ -000e8810: 2f2f 206d 6f72 6520 7468 616e 2032 206e // more than 2 n │ │ │ │ -000e8820: 616d 6573 3c2f 7370 616e 3e3c 2f64 6976 ames
.
};
.

The use o │ │ │ │ -000e8870: 6620 706f 696e 7465 7220 6d65 6d62 6572 f pointer member │ │ │ │ -000e8880: 7320 7375 6368 2061 7320 666f 7220 3c63 s such as for name │ │ │ │ -000e88a0: 7368 6f77 6e20 6162 6f76 6520 6973 2070 shown above is p │ │ │ │ -000e88b0: 6f73 7369 626c 652c 2062 7574 206e 6f74 ossible, but not │ │ │ │ -000e88c0: 2072 6571 7569 7265 642e 2041 6c73 6f20 required. Also │ │ │ │ -000e88d0: 3c63 6f64 653e 6d69 6e4f 6363 7572 7320 minOccurs │ │ │ │ -000e88e0: 3a20 6d61 784f 6363 7572 733c 2f63 6f64 : maxOccurs and min │ │ │ │ -000e8900: 4f63 6375 7273 3c2f 636f 6465 3e20 6c65 Occurs le │ │ │ │ -000e8910: 6e67 7468 2063 6f6e 7374 7261 696e 7473 ngth constraints │ │ │ │ -000e8920: 2063 616e 2062 6520 7370 6563 6966 6965 can be specifie │ │ │ │ -000e8930: 6420 6173 2073 686f 776e 2069 6e20 7468 d as shown in th │ │ │ │ -000e8940: 6520 6578 616d 706c 6520 6162 6f76 652e e example above. │ │ │ │ -000e8950: 2054 6865 2058 4d4c 2073 6368 656d 6120 The XML schema │ │ │ │ -000e8960: 7468 6174 2063 6f72 7265 7370 6f6e 6473 that corresponds │ │ │ │ -000e8970: 2074 6f20 7468 6520 3c63 6f64 653e 6e73 to the ns │ │ │ │ -000e8980: 5f5f 6d79 436c 6173 733c 2f63 6f64 653e __myClass │ │ │ │ -000e8990: 2074 7970 6520 6973 3a3c 2f70 3e0a 3c64 type is:

. │ │ │ │ -000e89b0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<complexTyp │ │ │ │ -000e8a00: 653c 2f73 7061 6e3e 203c 7370 616e 2063 e n │ │ │ │ -000e8a20: 616d 653c 2f73 7061 6e3e 3d3c 7370 616e ame="myC │ │ │ │ -000e8a50: 6c61 7373 2671 756f 743b 3c2f 7370 616e lass">
. │ │ │ │ -000e8a80: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <s │ │ │ │ -000e8aa0: 6571 7565 6e63 653c 2f73 7061 6e3e 2667 equence&g │ │ │ │ -000e8ab0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
│ │ │ │ -000e8ad0: 266c 743b 3c73 7061 6e20 636c 6173 733d <el │ │ │ │ -000e8af0: 656d 656e 743c 2f73 7061 6e3e 203c 7370 ement name=< │ │ │ │ -000e8b20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000e8b30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000e8b40: 3b6e 756d 6265 7226 7175 6f74 3b3c 2f73 ;number" type< │ │ │ │ -000e8b70: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:int │ │ │ │ -000e8ba0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " minOccurs="1" maxO │ │ │ │ -000e8c20: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="1 │ │ │ │ -000e8c50: 3026 7175 6f74 3b3c 2f73 7061 6e3e 2f26 0"/& │ │ │ │ -000e8c60: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
│ │ │ │ -000e8c80: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e │ │ │ │ -000e8ca0: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement name= │ │ │ │ -000e8cd0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -000e8cf0: 743b 6e61 6d65 2671 756f 743b 3c2f 7370 t;name" type="xsd:stri │ │ │ │ -000e8d50: 6e67 2671 756f 743b 3c2f 7370 616e 3e20 ng" │ │ │ │ -000e8d60: 3c73 7061 6e20 636c 6173 733d 226b 6579 minOccurs< │ │ │ │ -000e8d80: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="2" │ │ │ │ -000e8db0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ma │ │ │ │ -000e8dd0: 784f 6363 7572 733c 2f73 7061 6e3e 3d3c xOccurs=< │ │ │ │ -000e8de0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000e8df0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000e8e00: 3b75 6e62 6f75 6e64 6564 2671 756f 743b ;unbounded" │ │ │ │ -000e8e10: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
</sequence< │ │ │ │ -000e8e60: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>>
.
</complexType>
. │ │ │ │ -000e8ec0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

You can also im │ │ │ │ -000e8ef0: 706c 656d 656e 7420 796f 7572 206f 776e plement your own │ │ │ │ -000e8f00: 2063 6f6e 7461 696e 6572 732e 2054 6865 containers. The │ │ │ │ -000e8f10: 2063 6f6e 7461 696e 6572 7320 6d75 7374 containers must │ │ │ │ -000e8f20: 2062 6520 636c 6173 7320 7465 6d70 6c61 be class templa │ │ │ │ -000e8f30: 7465 7320 616e 6420 7368 6f75 6c64 2064 tes and should d │ │ │ │ -000e8f40: 6566 696e 6520 6120 666f 7277 6172 6420 efine a forward │ │ │ │ -000e8f50: 6974 6572 6174 6f72 2074 7970 652c 2061 iterator type, a │ │ │ │ -000e8f60: 6e64 2070 726f 7669 6465 2074 6865 2066 nd provide the f │ │ │ │ -000e8f70: 6f6c 6c6f 7769 6e67 206d 6574 686f 6473 ollowing methods │ │ │ │ -000e8f80: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

.
    .
  • < │ │ │ │ -000e8f90: 636f 6465 3e76 6f69 6420 636c 6561 7228 code>void clear( │ │ │ │ -000e8fa0: 293c 2f63 6f64 653e 2065 6d70 7479 2074 ) empty t │ │ │ │ -000e8fb0: 6865 2063 6f6e 7461 696e 6572 3b3c 2f6c he container;.
  • ite │ │ │ │ -000e8fd0: 7261 746f 7220 6265 6769 6e28 293c 2f63 rator begin() return iter │ │ │ │ -000e8ff0: 6174 6f72 2074 6f20 6265 6769 6e6e 696e ator to beginnin │ │ │ │ -000e9000: 673b 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 g;
  • .
  • const_iterator │ │ │ │ -000e9020: 2062 6567 696e 2829 2063 6f6e 7374 3c2f begin() const return con │ │ │ │ -000e9040: 7374 2069 7465 7261 746f 7220 746f 2062 st iterator to b │ │ │ │ -000e9050: 6567 696e 6e69 6e67 3b3c 2f6c 693e 0a3c eginning;
  • .< │ │ │ │ -000e9060: 6c69 3e3c 636f 6465 3e69 7465 7261 746f li>iterato │ │ │ │ -000e9070: 7220 656e 6428 293c 2f63 6f64 653e 2072 r end() r │ │ │ │ -000e9080: 6574 7572 6e20 6974 6572 6174 6f72 2074 eturn iterator t │ │ │ │ -000e9090: 6f20 656e 643b 3c2f 6c69 3e0a 3c6c 693e o end;.
  • │ │ │ │ -000e90a0: 3c63 6f64 653e 636f 6e73 745f 6974 6572 const_iter │ │ │ │ -000e90b0: 6174 6f72 2065 6e64 2829 2063 6f6e 7374 ator end() const │ │ │ │ -000e90c0: 3c2f 636f 6465 3e20 7265 7475 726e 2063 return c │ │ │ │ -000e90d0: 6f6e 7374 2069 7465 7261 746f 7220 746f onst iterator to │ │ │ │ -000e90e0: 2065 6e64 3b3c 2f6c 693e 0a3c 6c69 3e3c end;
  • .
  • < │ │ │ │ -000e90f0: 636f 6465 3e73 697a 655f 7420 7369 7a65 code>size_t size │ │ │ │ -000e9100: 2829 3c2f 636f 6465 3e20 7265 7475 726e () return │ │ │ │ -000e9110: 2073 697a 653b 3c2f 6c69 3e0a 3c6c 693e size;
  • .
  • │ │ │ │ -000e9120: 3c63 6f64 653e 6974 6572 6174 6f72 2069 iterator i │ │ │ │ -000e9130: 6e73 6572 7428 6974 6572 6174 6f72 2070 nsert(iterator p │ │ │ │ -000e9140: 6f73 2c20 636f 6e73 745f 7265 6665 7265 os, const_refere │ │ │ │ -000e9150: 6e63 6520 7661 6c29 3c2f 636f 6465 3e20 nce val) │ │ │ │ -000e9160: 696e 7365 7274 2065 6c65 6d65 6e74 2e3c insert element.< │ │ │ │ -000e9170: 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e 5468 /li>.
.

Th │ │ │ │ -000e9180: 6520 3c63 6f64 653e 6974 6572 6174 6f72 e iterator │ │ │ │ -000e9190: 3c2f 636f 6465 3e20 7368 6f75 6c64 2062 should b │ │ │ │ -000e91a0: 6520 6120 666f 7277 6172 6420 6974 6572 e a forward iter │ │ │ │ -000e91b0: 6174 6f72 2077 6974 6820 6120 6465 7265 ator with a dere │ │ │ │ -000e91c0: 6665 7265 6e63 6520 6f70 6572 6174 6f72 ference operator │ │ │ │ -000e91d0: 2074 6f20 6163 6365 7373 2074 6865 2063 to access the c │ │ │ │ -000e91e0: 6f6e 7461 696e 6572 2773 2065 6c65 6d65 ontainer's eleme │ │ │ │ -000e91f0: 6e74 732c 2069 7420 6d75 7374 2062 6520 nts, it must be │ │ │ │ -000e9200: 636f 6d70 6172 6162 6c65 2028 6571 7561 comparable (equa │ │ │ │ -000e9210: 6c2f 756e 6571 7561 6c29 2c20 616e 6420 l/unequal), and │ │ │ │ -000e9220: 6265 2070 7265 2d69 6e63 7265 6d65 6e74 be pre-increment │ │ │ │ -000e9230: 6162 6c65 2028 3c63 6f64 653e 2b2b 6974 able (++it │ │ │ │ -000e9240: 3c2f 636f 6465 3e29 2e20 5468 6520 636f ). The co │ │ │ │ -000e9250: 6e73 7420 6974 6572 6174 6f72 2069 7320 nst iterator is │ │ │ │ -000e9260: 7573 6564 2062 7920 6974 7320 736f 6170 used by its soap │ │ │ │ -000e9270: 6370 7032 2d67 656e 6572 6174 6564 2073 cpp2-generated s │ │ │ │ -000e9280: 6572 6961 6c69 7a65 7220 746f 2073 656e erializer to sen │ │ │ │ -000e9290: 6420 6120 7365 7175 656e 6365 206f 6620 d a sequence of │ │ │ │ -000e92a0: 584d 4c20 656c 656d 656e 7420 7661 6c75 XML element valu │ │ │ │ -000e92b0: 6573 2e20 5468 6520 3c63 6f64 653e 696e es. The in │ │ │ │ -000e92c0: 7365 7274 3c2f 636f 6465 3e20 6d65 7468 sert meth │ │ │ │ -000e92d0: 6f64 2069 7320 7573 6564 2074 6f20 706f od is used to po │ │ │ │ -000e92e0: 7075 6c61 7465 2061 2063 6f6e 7461 696e pulate a contain │ │ │ │ -000e92f0: 6572 2077 6974 6820 3c63 6f64 653e 436f er with Co │ │ │ │ -000e9300: 6e74 6169 6e65 723a 3a69 7465 7261 746f ntainer::iterato │ │ │ │ -000e9310: 7220 6920 3d20 636f 6e74 6169 6e65 722e r i = container. │ │ │ │ -000e9320: 696e 7365 7274 2863 6f6e 7461 696e 6572 insert(container │ │ │ │ -000e9330: 2e65 6e64 2829 2c20 7661 6c29 3c2f 636f .end(), val).

.

Here │ │ │ │ -000e9350: 2069 7320 696e 2065 7861 6d70 6c65 2063 is in example c │ │ │ │ -000e9360: 6f6e 7461 696e 6572 2074 656d 706c 6174 ontainer templat │ │ │ │ -000e9370: 6520 636c 6173 733a 3c2f 703e 0a3c 6469 e class:

.
// si │ │ │ │ -000e93c0: 6d70 6c65 5f76 6563 746f 722e 6820 3c2f mple_vector.h
.
template <cl │ │ │ │ -000e9430: 6173 733c 2f73 7061 6e3e 2054 2667 743b ass T> │ │ │ │ -000e9440: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
│ │ │ │ -000e9470: 636c 6173 7320 3c2f 7370 616e 3e73 696d class sim │ │ │ │ -000e9480: 706c 655f 7665 6374 6f72 203c 2f64 6976 ple_vector
.
{ publ │ │ │ │ -000e94c0: 6963 3c2f 7370 616e 3e3a 203c 2f64 6976 ic:
.
ty │ │ │ │ -000e9500: 7065 6465 663c 2f73 7061 6e3e 2054 2020 pedef T │ │ │ │ -000e9510: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9520: 2020 2020 2076 616c 7565 5f74 7970 653b value_type; │ │ │ │ -000e9530: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
typedef value_type │ │ │ │ -000e9580: 2020 2020 2020 2020 202a 2070 6f69 6e74 * point │ │ │ │ -000e9590: 6572 3b20 3c2f 6469 763e 0a3c 6469 7620 er;
.
│ │ │ │ -000e95b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 typedef cons │ │ │ │ -000e95f0: 743c 2f73 7061 6e3e 2076 616c 7565 5f74 t value_t │ │ │ │ -000e9600: 7970 6520 2020 2020 202a 2063 6f6e 7374 ype * const │ │ │ │ -000e9610: 5f70 6f69 6e74 6572 3b20 3c2f 6469 763e _pointer;
│ │ │ │ -000e9620: 0a3c 6469 7620 636c 6173 733d 226c 696e .
typ │ │ │ │ -000e9650: 6564 6566 3c2f 7370 616e 3e20 7661 6c75 edef valu │ │ │ │ -000e9660: 655f 7479 7065 2020 2020 2020 2020 2020 e_type │ │ │ │ -000e9670: 2020 2661 6d70 3b20 7265 6665 7265 6e63 & referenc │ │ │ │ -000e9680: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
│ │ │ │ -000e96a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef const │ │ │ │ -000e96e0: 3c2f 7370 616e 3e20 7661 6c75 655f 7479 value_ty │ │ │ │ -000e96f0: 7065 2020 2020 2020 2661 6d70 3b20 636f pe & co │ │ │ │ -000e9700: 6e73 745f 7265 6665 7265 6e63 653b 203c nst_reference; < │ │ │ │ -000e9710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
typedef │ │ │ │ -000e9750: 2070 6f69 6e74 6572 2020 2020 2020 2020 pointer │ │ │ │ -000e9760: 2020 2020 2020 2020 2069 7465 7261 746f iterato │ │ │ │ -000e9770: 723b 203c 2f64 6976 3e0a 3c64 6976 2063 r;
.
│ │ │ │ -000e9790: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef const_point │ │ │ │ -000e97c0: 6572 2020 2020 2020 2020 2020 2063 6f6e er con │ │ │ │ -000e97d0: 7374 5f69 7465 7261 746f 723b 203c 2f64 st_iterator; .
pr │ │ │ │ -000e9810: 6f74 6563 7465 643c 2f73 7061 6e3e 3a20 otected: │ │ │ │ -000e9820: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
ite │ │ │ │ -000e9840: 7261 746f 7220 2020 2020 2020 2020 2020 rator │ │ │ │ -000e9850: 2020 2020 2020 2020 2020 2020 2068 6561 hea │ │ │ │ -000e9860: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
.
│ │ │ │ -000e9880: 6974 6572 6174 6f72 2020 2020 2020 2020 iterator │ │ │ │ -000e9890: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e98a0: 7461 696c 3b20 3c2f 6469 763e 0a3c 6469 tail;
. │ │ │ │ -000e98c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 siz │ │ │ │ -000e98e0: 655f 743c 2f73 7061 6e3e 2020 2020 2020 e_t │ │ │ │ -000e98f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9900: 2020 2020 6361 7061 6369 7479 3b20 3c2f capacity; .
p │ │ │ │ -000e9940: 7562 6c69 633c 2f73 7061 6e3e 3a20 3c2f ublic: .
│ │ │ │ -000e9970: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9980: 2020 2020 2020 2020 2020 2073 696d 706c simpl │ │ │ │ -000e9990: 655f 7665 6374 6f72 2829 2020 2020 2020 e_vector() │ │ │ │ -000e99a0: 207b 2068 6561 6420 3d20 7461 696c 203d { head = tail = │ │ │ │ -000e99b0: 204e 554c 4c3b 207d 203c 2f64 6976 3e0a NULL; }
. │ │ │ │ -000e99c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
│ │ │ │ -000e99e0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e99f0: 2020 2020 2020 7369 6d70 6c65 5f76 6563 simple_vec │ │ │ │ -000e9a00: 746f 7228 3c73 7061 6e20 636c 6173 733d tor(const< │ │ │ │ -000e9a20: 2f73 7061 6e3e 2073 696d 706c 655f 7665 /span> simple_ve │ │ │ │ -000e9a30: 6374 6f72 2661 6d70 3b20 7629 203c 2f64 ctor& v) .
│ │ │ │ +000e6800: 223e 2020 2020 2e2e 2e20 2020 2020 2020 "> ... │ │ │ │ +000e6810: 2020 2020 2020 2020 2020 2020 3c73 7061 // other membe │ │ │ │ +000e6840: 7273 2074 6861 7420 6172 6520 7365 7269 rs that are seri │ │ │ │ +000e6850: 616c 697a 6564 3c2f 7370 616e 3e3c 2f64 alized.
int _ │ │ │ │ +000e68a0: 5f73 697a 655f 6f66 5f61 7272 6179 313b _size_of_array1; │ │ │ │ +000e68b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // number │ │ │ │ +000e68d0: 206f 6620 656c 656d 656e 7473 2070 6f69 of elements poi │ │ │ │ +000e68e0: 6e74 6564 2074 6f20 3c2f 7370 616e 3e3c nted to < │ │ │ │ +000e68f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
Type │ │ │ │ +000e6910: 3120 2a61 7272 6179 313b 2020 2020 2020 1 *array1; │ │ │ │ +000e6920: 2020 3c73 7061 6e20 636c 6173 733d 2263 // point │ │ │ │ +000e6940: 6572 2074 6f20 6172 7261 7920 6f66 2065 er to array of e │ │ │ │ +000e6950: 6c65 6d65 6e74 7320 696e 206d 656d 6f72 lements in memor │ │ │ │ +000e6960: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
.< │ │ │ │ +000e6970: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e6980: 3e20 2020 202e 2e2e 2020 2020 2020 2020 > ... │ │ │ │ +000e6990: 2020 2020 2020 2020 2020 203c 7370 616e // other member │ │ │ │ +000e69c0: 7320 7468 6174 2061 7265 2073 6572 6961 s that are seria │ │ │ │ +000e69d0: 6c69 7a65 643c 2f73 7061 6e3e 3c2f 6469 lized.
int __ │ │ │ │ +000e6a20: 7369 7a65 5f6f 665f 6172 7261 7931 3b20 size_of_array1; │ │ │ │ +000e6a30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // number │ │ │ │ +000e6a50: 6f66 2065 6c65 6d65 6e74 7320 706f 696e of elements poin │ │ │ │ +000e6a60: 7465 6420 746f 203c 2f73 7061 6e3e 3c2f ted to .
Type2 │ │ │ │ +000e6a90: 202a 6172 7261 7932 3b20 2020 2020 2020 *array2; │ │ │ │ +000e6aa0: 203c 7370 616e 2063 6c61 7373 3d22 636f // pointe │ │ │ │ +000e6ac0: 7220 746f 2061 7272 6179 206f 6620 656c r to array of el │ │ │ │ +000e6ad0: 656d 656e 7473 2069 6e20 6d65 6d6f 7279 ements in memory │ │ │ │ +000e6ae0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ +000e6b00: 2020 2020 2e2e 2e20 2020 2020 2020 2020 ... │ │ │ │ +000e6b10: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +000e6b30: 2f2f 206f 7468 6572 206d 656d 6265 7273 // other members │ │ │ │ +000e6b40: 2074 6861 7420 6172 6520 7365 7269 616c that are serial │ │ │ │ +000e6b50: 697a 6564 3c2f 7370 616e 3e3c 2f64 6976 ized
.
};
.

The __size m │ │ │ │ +000e6bb0: 656d 6265 7220 7368 6f75 6c64 2062 6520 ember should be │ │ │ │ +000e6bc0: 616e 203c 636f 6465 3e69 6e74 3c2f 636f an int type and can │ │ │ │ +000e6be0: 6e6f 7420 6265 2061 203c 636f 6465 3e73 not be a s │ │ │ │ +000e6bf0: 697a 655f 743c 2f63 6f64 653e 2074 7970 ize_t typ │ │ │ │ +000e6c00: 6520 6f72 206f 7468 6572 2069 6e74 6567 e or other integ │ │ │ │ +000e6c10: 6572 2074 7970 652e 3c2f 703e 0a3c 703e er type.

.

│ │ │ │ +000e6c20: 466f 7220 6578 616d 706c 652c 2077 6520 For example, we │ │ │ │ +000e6c30: 6465 6669 6e65 2061 204d 6170 2073 7472 define a Map str │ │ │ │ +000e6c40: 7563 7475 7265 2074 6861 7420 636f 6e74 ucture that cont │ │ │ │ +000e6c50: 6169 6e73 2061 2073 6571 7565 6e63 6520 ains a sequence │ │ │ │ +000e6c60: 6f66 206b 6579 2d76 616c 2070 6169 7273 of key-val pairs │ │ │ │ +000e6c70: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
struct ns__Map
│ │ │ │ +000e6cd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
│ │ │ │ +000e6d00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int __size; // number of │ │ │ │ +000e6d50: 2070 6169 7273 203c 2f73 7061 6e3e 3c2f pairs .
struct n │ │ │ │ +000e6da0: 735f 5f50 6169 723c 2f64 6976 3e0a 3c64 s__Pair
. │ │ │ │ +000e6dc0: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
.
│ │ │ │ +000e6de0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +000e6e00: 6368 6172 3c2f 7370 616e 3e20 2a6b 6579 char *key │ │ │ │ +000e6e10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
.
│ │ │ │ +000e6e30: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ +000e6e50: 3c2f 7370 616e 3e20 2a76 616c 3b3c 2f64 *val;.
} *pai │ │ │ │ +000e6e80: 723b 2020 2020 3c73 7061 6e20 636c 6173 r; // a │ │ │ │ +000e6ea0: 7272 6179 206f 6620 7061 6972 733c 2f73 rray of pairs
.
};< │ │ │ │ +000e6ed0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

│ │ │ │ +000e6ef0: 5369 6e63 6520 322e 372e 3136 2069 7420 Since 2.7.16 it │ │ │ │ +000e6f00: 6973 2061 6c73 6f20 706f 7373 6962 6c65 is also possible │ │ │ │ +000e6f10: 2074 6f20 7573 6520 6120 273c 636f 6465 to use a '$' as a │ │ │ │ +000e6f30: 7370 6563 6961 6c20 6d61 726b 6572 2074 special marker t │ │ │ │ +000e6f40: 6f20 616e 6e6f 7461 7465 2061 2073 697a o annotate a siz │ │ │ │ +000e6f50: 6520 6d65 6d62 6572 2069 6e73 7465 6164 e member instead │ │ │ │ +000e6f60: 206f 6620 7265 7175 6972 696e 6720 7468 of requiring th │ │ │ │ +000e6f70: 6573 6520 6d65 6d62 6572 7320 746f 2073 ese members to s │ │ │ │ +000e6f80: 7461 7274 2077 6974 6820 3c63 6f64 653e tart with │ │ │ │ +000e6f90: 5f5f 7369 7a65 3c2f 636f 6465 3e3a 3c2f __size:.

struct n │ │ │ │ +000e6ff0: 735f 5f4d 6170 203c 2f64 6976 3e0a 3c64 s__Map
. │ │ │ │ +000e7010: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
$ int size; │ │ │ │ +000e7070: 2f2f 206e 756d 6265 7220 6f66 2070 6169 // number of pai │ │ │ │ +000e7080: 7273 203c 2f73 7061 6e3e 3c2f 6469 763e rs
│ │ │ │ +000e7090: 0a3c 6469 7620 636c 6173 733d 226c 696e .
str │ │ │ │ +000e70c0: 7563 7420 3c2f 7370 616e 3e6e 735f 5f50 uct ns__P │ │ │ │ +000e70d0: 6169 723c 2f64 6976 3e0a 3c64 6976 2063 air
.
│ │ │ │ +000e70f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
.
│ │ │ │ +000e7110: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ +000e7130: 3c2f 7370 616e 3e20 2a6b 6579 3b3c 2f64 *key;.
char *val;
. │ │ │ │ +000e7190: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
} *pair; │ │ │ │ +000e71b0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // array │ │ │ │ +000e71d0: 206f 6620 7061 6972 733c 2f73 7061 6e3e of pairs │ │ │ │ +000e71e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};
.

The │ │ │ │ +000e7220: 6172 7261 7920 7769 6c6c 2062 6520 7365 array will be se │ │ │ │ +000e7230: 7269 616c 697a 6564 2069 6e20 584d 4c20 rialized in XML │ │ │ │ +000e7240: 6173 2061 2073 6571 7565 6e63 6520 6f66 as a sequence of │ │ │ │ +000e7250: 2070 6169 7273 3a3c 2f70 3e0a 3c64 6976 pairs:

.
<ns:Map>
. │ │ │ │ +000e72e0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <p │ │ │ │ +000e7300: 6169 723c 2f73 7061 6e3e 2667 743b 203c air> < │ │ │ │ +000e7310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
< │ │ │ │ +000e7330: 3c73 7061 6e20 636c 6173 733d 226b 6579 key>Jo │ │ │ │ +000e7370: 653c 2f73 7061 6e3e 266c 743b 2f3c 7370 e</key>
. │ │ │ │ +000e73c0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <val>5 │ │ │ │ +000e73f0: 3535 2037 3720 3132 3334 266c 743b 2f3c 55 77 1234</< │ │ │ │ +000e7400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e7410: 6f72 6474 7970 6522 3e76 616c 3c2f 7370 ordtype">val>
.< │ │ │ │ +000e7430: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e7440: 3e20 2026 6c74 3b2f 3c73 7061 6e20 636c > </pair> │ │ │ │ +000e7470: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ +000e7490: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;pair< │ │ │ │ +000e74b0: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>>
.
<key │ │ │ │ +000e7500: 2667 743b 3c73 7061 6e20 636c 6173 733d >Susan< │ │ │ │ +000e7520: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></key& │ │ │ │ +000e7550: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
│ │ │ │ +000e7570: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <v │ │ │ │ +000e7590: 616c 3c2f 7370 616e 3e26 6774 3b35 3535 al>555 │ │ │ │ +000e75a0: 2031 3220 3637 3235 266c 743b 2f3c 7370 12 6725</val>
. │ │ │ │ +000e75f0: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </ │ │ │ │ +000e7610: 7061 6972 3c2f 7370 616e 3e26 6774 3b20 pair> │ │ │ │ +000e7620: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
<< │ │ │ │ +000e7640: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e7650: 6f72 6474 7970 6522 3e70 6169 723c 2f73 ordtype">pair>
. │ │ │ │ +000e7670: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<key&g │ │ │ │ +000e76b0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;Pete</key> │ │ │ │ +000e7700: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
&l │ │ │ │ +000e7720: 743b 3c73 7061 6e20 636c 6173 733d 226b t;val< │ │ │ │ +000e7740: 2f73 7061 6e3e 2667 743b 3535 3520 3939 /span>>555 99 │ │ │ │ +000e7750: 2034 3332 3126 6c74 3b2f 3c73 7061 6e20 4321</val&g │ │ │ │ +000e7780: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l │ │ │ │ +000e77a0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/pai │ │ │ │ +000e77c0: 723c 2f73 7061 6e3e 2667 743b 203c 2f64 r> .
</ns:Map>
.

De │ │ │ │ +000e7840: 7365 7269 616c 697a 6174 696f 6e20 6973 serialization is │ │ │ │ +000e7850: 206c 6573 7320 6566 6669 6369 656e 7420 less efficient │ │ │ │ +000e7860: 636f 6d70 6172 6564 2074 6f20 6120 534f compared to a SO │ │ │ │ +000e7870: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array │ │ │ │ +000e7880: 2c20 6265 6361 7573 6520 7468 6520 7369 , because the si │ │ │ │ +000e7890: 7a65 206f 6620 7468 6520 7365 7175 656e ze of the sequen │ │ │ │ +000e78a0: 6365 2069 7320 6e6f 7420 7061 7274 206f ce is not part o │ │ │ │ +000e78b0: 6620 7468 6520 534f 4150 2065 6e63 6f64 f the SOAP encod │ │ │ │ +000e78c0: 696e 672e 2042 7566 6665 7269 6e67 2069 ing. Buffering i │ │ │ │ +000e78d0: 7320 7573 6564 2062 7920 7468 6520 6465 s used by the de │ │ │ │ +000e78e0: 7365 7269 616c 697a 6572 2074 6f20 636f serializer to co │ │ │ │ +000e78f0: 6c6c 6563 7420 7468 6520 656c 656d 656e llect the elemen │ │ │ │ +000e7900: 7473 2069 6e20 6d65 6d6f 7279 2e20 5768 ts in memory. Wh │ │ │ │ +000e7910: 656e 2074 6865 2065 6e64 206f 6620 7468 en the end of th │ │ │ │ +000e7920: 6520 6c69 7374 2069 7320 7265 6163 6865 e list is reache │ │ │ │ +000e7930: 642c 2074 6865 2062 7566 6665 7265 6420 d, the buffered │ │ │ │ +000e7940: 656c 656d 656e 7473 2061 7265 2063 6f70 elements are cop │ │ │ │ +000e7950: 6965 6420 746f 2061 206e 6577 6c79 2061 ied to a newly a │ │ │ │ +000e7960: 6c6c 6f63 6174 6564 206d 616e 6167 6564 llocated managed │ │ │ │ +000e7970: 2073 7061 6365 206f 6e20 7468 6520 6865 space on the he │ │ │ │ +000e7980: 6170 2066 6f72 2074 6865 2064 796e 616d ap for the dynam │ │ │ │ +000e7990: 6963 2061 7272 6179 2e3c 2f70 3e0a 3c70 ic array.

.

Multiple arrays │ │ │ │ +000e79b0: 2063 616e 2062 6520 7061 7274 206f 6620 can be part of │ │ │ │ +000e79c0: 6120 7374 7275 6374 206f 7220 636c 6173 a struct or clas │ │ │ │ +000e79d0: 732e 2046 6f72 2065 7861 6d70 6c65 3a3c s. For example:< │ │ │ │ +000e79e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct │ │ │ │ +000e7a30: 6e73 5f5f 436f 6e74 6163 7420 3c2f 6469 ns__Contact .
{
. │ │ │ │ +000e7a70: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ +000e7a90: 723c 2f73 7061 6e3e 202a 6669 7273 744e r *firstN │ │ │ │ +000e7aa0: 616d 653b 203c 2f64 6976 3e0a 3c64 6976 ame;
.
│ │ │ │ +000e7ac0: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ +000e7ae0: 3c2f 7370 616e 3e20 2a6c 6173 744e 616d *lastNam │ │ │ │ +000e7af0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
.
$ │ │ │ │ +000e7b10: 3c73 7061 6e20 636c 6173 733d 226b 6579 int nPhones; │ │ │ │ +000e7b40: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ +000e7b60: 6e75 6d62 6572 206f 6620 5068 6f6e 6573 number of Phones │ │ │ │ +000e7b70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ +000e7b90: 2020 2020 3c61 2063 6c61 7373 3d22 636f ULONG64 *phoneNumber; │ │ │ │ +000e7c00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // array o │ │ │ │ +000e7c20: 6620 7068 6f6e 6520 6e75 6d62 6572 7320 f phone numbers │ │ │ │ +000e7c30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ +000e7c50: 2020 2420 3c73 7061 6e20 636c 6173 733d $ in │ │ │ │ +000e7c70: 743c 2f73 7061 6e3e 206e 456d 6169 6c73 t nEmails │ │ │ │ +000e7c80: 3b20 2020 2020 2020 2020 203c 7370 616e ; // number of em │ │ │ │ +000e7cb0: 6169 6c73 203c 2f73 7061 6e3e 3c2f 6469 ails .
char * │ │ │ │ +000e7d00: 2a65 6d61 696c 4164 6472 6573 733b 2020 *emailAddress; │ │ │ │ +000e7d10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // array o │ │ │ │ +000e7d30: 6620 656d 6169 6c20 6164 6472 6573 7365 f email addresse │ │ │ │ +000e7d40: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
. │ │ │ │ +000e7d50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

For │ │ │ │ +000e8340: 2043 2b2b 2c20 6120 6265 7474 6572 2061 C++, a better a │ │ │ │ +000e8350: 6c74 6572 6e61 7469 7665 2074 6f20 6172 lternative to ar │ │ │ │ +000e8360: 7261 7973 2061 7265 2063 6f6e 7461 696e rays are contain │ │ │ │ +000e8370: 6572 732c 2077 6869 6368 2061 7265 2064 ers, which are d │ │ │ │ +000e8380: 6573 6372 6962 6564 206e 6578 742e 3c2f escribed next..

.... Back to t │ │ │ │ +000e83b0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +000e83c0: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

.

.STL container │ │ │ │ +000e8400: 733c 2f68 333e 0a3c 703e 5468 6520 5354 s

.

The ST │ │ │ │ +000e8410: 4c20 636f 6e74 6169 6e65 7273 203c 636f L containers std::deque, std: │ │ │ │ +000e8440: 3a6c 6973 743c 2f63 6f64 653e 2c20 3c63 :list, std::set, and s │ │ │ │ +000e8470: 7464 3a3a 7665 6374 6f72 3c2f 636f 6465 td::vector are serializab │ │ │ │ +000e8490: 6c65 2069 6e20 584d 4c20 6279 2074 6865 le in XML by the │ │ │ │ +000e84a0: 2073 6f61 7063 7070 322d 6765 6e65 7261 soapcpp2-genera │ │ │ │ +000e84b0: 7465 6420 7365 7269 616c 697a 6572 732e ted serializers. │ │ │ │ +000e84c0: 3c2f 703e 0a3c 703e 496e 206f 7264 6572

.

In order │ │ │ │ +000e84d0: 2074 6f20 7573 6520 636f 6e74 6169 6e65 to use containe │ │ │ │ +000e84e0: 7273 2069 6e20 616e 2069 6e74 6572 6661 rs in an interfa │ │ │ │ +000e84f0: 6365 2068 6561 6465 7220 6669 6c65 2066 ce header file f │ │ │ │ +000e8500: 6f72 2073 6f61 7063 7070 322c 2069 6d70 or soapcpp2, imp │ │ │ │ +000e8510: 6f72 7420 3c65 6d3e 3c63 6f64 653e 7374 ort st │ │ │ │ +000e8520: 6c64 6571 7565 2e68 3c2f 636f 6465 3e3c ldeque.h< │ │ │ │ +000e8530: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, │ │ │ │ +000e8540: 7374 6c6c 6973 742e 683c 2f63 6f64 653e stllist.h │ │ │ │ +000e8550: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , stlset.h │ │ │ │ +000e8570: 3c2f 656d 3e2c 206f 7220 3c65 6d3e 3c63 , or stlvector.h< │ │ │ │ +000e8590: 2f63 6f64 653e 3c2f 656d 3e20 746f 2065 /code> to e │ │ │ │ +000e85a0: 6e61 626c 6520 3c63 6f64 653e 7374 643a nable std: │ │ │ │ +000e85b0: 3a64 6571 7565 3c2f 636f 6465 3e2c 203c :deque, < │ │ │ │ +000e85c0: 636f 6465 3e73 7464 3a3a 6c69 7374 3c2f code>std::list, std │ │ │ │ +000e85e0: 3a3a 7365 743c 2f63 6f64 653e 2c20 616e ::set, an │ │ │ │ +000e85f0: 6420 3c63 6f64 653e 7374 643a 3a76 6563 d std::vec │ │ │ │ +000e8600: 746f 723c 2f63 6f64 653e 2c20 7265 7370 tor, resp │ │ │ │ +000e8610: 6563 7469 7665 6c79 2e20 466f 7220 6578 ectively. For ex │ │ │ │ +000e8620: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

.
#i │ │ │ │ +000e8670: 6d70 6f72 7420 2671 756f 743b 7374 6c76 mport "stlv │ │ │ │ +000e8680: 6563 746f 722e 6826 7175 6f74 3b3c 2f73 ector.h"
.
class ns__myClass .
{ pu │ │ │ │ +000e8710: 626c 6963 3c2f 7370 616e 3e3a 203c 2f64 blic: .
std::v │ │ │ │ +000e8740: 6563 746f 7226 6c74 3b69 6e74 2667 743b ector<int> │ │ │ │ +000e8750: 2020 2020 2020 2020 2020 6e75 6d62 6572 number │ │ │ │ +000e8760: 2031 3a31 303b 203c 7370 616e 2063 6c61 1:10; // │ │ │ │ +000e8780: 3120 746f 2031 3020 6e75 6d62 6572 733c 1 to 10 numbers< │ │ │ │ +000e8790: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
. │ │ │ │ +000e87b0: 2020 2073 7464 3a3a 7665 6374 6f72 266c std::vector&l │ │ │ │ +000e87c0: 743b 7374 643a 3a73 7472 696e 6726 6774 t;std::string> │ │ │ │ +000e87d0: 3b20 2a6e 616d 6520 2020 323b 2020 2020 ; *name 2; │ │ │ │ +000e87e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // more th │ │ │ │ +000e8800: 616e 2032 206e 616d 6573 3c2f 7370 616e an 2 names
.
};.

The │ │ │ │ +000e8850: 2075 7365 206f 6620 706f 696e 7465 7220 use of pointer │ │ │ │ +000e8860: 6d65 6d62 6572 7320 7375 6368 2061 7320 members such as │ │ │ │ +000e8870: 666f 7220 3c63 6f64 653e 6e61 6d65 3c2f for name shown abov │ │ │ │ +000e8890: 6520 6973 2070 6f73 7369 626c 652c 2062 e is possible, b │ │ │ │ +000e88a0: 7574 206e 6f74 2072 6571 7569 7265 642e ut not required. │ │ │ │ +000e88b0: 2041 6c73 6f20 3c63 6f64 653e 6d69 6e4f Also minO │ │ │ │ +000e88c0: 6363 7572 7320 3a20 6d61 784f 6363 7572 ccurs : maxOccur │ │ │ │ +000e88d0: 733c 2f63 6f64 653e 2061 6e64 203c 636f s and minOccurs length const │ │ │ │ +000e8900: 7261 696e 7473 2063 616e 2062 6520 7370 raints can be sp │ │ │ │ +000e8910: 6563 6966 6965 6420 6173 2073 686f 776e ecified as shown │ │ │ │ +000e8920: 2069 6e20 7468 6520 6578 616d 706c 6520 in the example │ │ │ │ +000e8930: 6162 6f76 652e 2054 6865 2058 4d4c 2073 above. The XML s │ │ │ │ +000e8940: 6368 656d 6120 7468 6174 2063 6f72 7265 chema that corre │ │ │ │ +000e8950: 7370 6f6e 6473 2074 6f20 7468 6520 3c63 sponds to the ns__myClass< │ │ │ │ +000e8970: 2f63 6f64 653e 2074 7970 6520 6973 3a3c /code> type is:< │ │ │ │ +000e8980: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

&l │ │ │ │ +000e89c0: 743b 3c73 7061 6e20 636c 6173 733d 226b t;comp │ │ │ │ +000e89e0: 6c65 7854 7970 653c 2f73 7061 6e3e 203c lexType < │ │ │ │ +000e89f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e8a00: 6f72 6422 3e6e 616d 653c 2f73 7061 6e3e ord">name │ │ │ │ +000e8a10: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ +000e8a30: 6f74 3b6d 7943 6c61 7373 2671 756f 743b ot;myClass" │ │ │ │ +000e8a40: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
<sequence>
. │ │ │ │ +000e8aa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
<element name="number&qu │ │ │ │ +000e8b30: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; type="x │ │ │ │ +000e8b80: 7364 3a69 6e74 2671 756f 743b 3c2f 7370 sd:int" minOcc │ │ │ │ +000e8bb0: 7572 733c 2f73 7061 6e3e 3d3c 7370 616e urs="1&q │ │ │ │ +000e8be0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; maxOccurs=& │ │ │ │ +000e8c30: 7175 6f74 3b31 3026 7175 6f74 3b3c 2f73 quot;10"/>
│ │ │ │ +000e8c50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<element name="name&quo │ │ │ │ +000e8ce0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; │ │ │ │ +000e8d00: 7479 7065 3c2f 7370 616e 3e3d 3c73 7061 type="xs │ │ │ │ +000e8d30: 643a 7374 7269 6e67 2671 756f 743b 3c2f d:string" minO │ │ │ │ +000e8d60: 6363 7572 733c 2f73 7061 6e3e 3d3c 7370 ccurs="2 │ │ │ │ +000e8d90: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " maxOccurs="unbounded │ │ │ │ +000e8df0: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g │ │ │ │ +000e8e00: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
.
&l │ │ │ │ +000e8e20: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/seq │ │ │ │ +000e8e40: 7565 6e63 653c 2f73 7061 6e3e 2667 743b uence> │ │ │ │ +000e8e50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
</< │ │ │ │ +000e8e70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e8e80: 6f72 6474 7970 6522 3e63 6f6d 706c 6578 ordtype">complex │ │ │ │ +000e8e90: 5479 7065 3c2f 7370 616e 3e26 6774 3b3c Type>< │ │ │ │ +000e8ea0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

You can a │ │ │ │ +000e8ed0: 6c73 6f20 696d 706c 656d 656e 7420 796f lso implement yo │ │ │ │ +000e8ee0: 7572 206f 776e 2063 6f6e 7461 696e 6572 ur own container │ │ │ │ +000e8ef0: 732e 2054 6865 2063 6f6e 7461 696e 6572 s. The container │ │ │ │ +000e8f00: 7320 6d75 7374 2062 6520 636c 6173 7320 s must be class │ │ │ │ +000e8f10: 7465 6d70 6c61 7465 7320 616e 6420 7368 templates and sh │ │ │ │ +000e8f20: 6f75 6c64 2064 6566 696e 6520 6120 666f ould define a fo │ │ │ │ +000e8f30: 7277 6172 6420 6974 6572 6174 6f72 2074 rward iterator t │ │ │ │ +000e8f40: 7970 652c 2061 6e64 2070 726f 7669 6465 ype, and provide │ │ │ │ +000e8f50: 2074 6865 2066 6f6c 6c6f 7769 6e67 206d the following m │ │ │ │ +000e8f60: 6574 686f 6473 3a3c 2f70 3e0a 3c75 6c3e ethods:

.
    │ │ │ │ +000e8f70: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
  • void │ │ │ │ +000e8f80: 636c 6561 7228 293c 2f63 6f64 653e 2065 clear() e │ │ │ │ +000e8f90: 6d70 7479 2074 6865 2063 6f6e 7461 696e mpty the contain │ │ │ │ +000e8fa0: 6572 3b3c 2f6c 693e 0a3c 6c69 3e3c 636f er;
  • .
  • iterator begi │ │ │ │ +000e8fc0: 6e28 293c 2f63 6f64 653e 2072 6574 7572 n() retur │ │ │ │ +000e8fd0: 6e20 6974 6572 6174 6f72 2074 6f20 6265 n iterator to be │ │ │ │ +000e8fe0: 6769 6e6e 696e 673b 3c2f 6c69 3e0a 3c6c ginning;
  • .const_it │ │ │ │ +000e9000: 6572 6174 6f72 2062 6567 696e 2829 2063 erator begin() c │ │ │ │ +000e9010: 6f6e 7374 3c2f 636f 6465 3e20 7265 7475 onst retu │ │ │ │ +000e9020: 726e 2063 6f6e 7374 2069 7465 7261 746f rn const iterato │ │ │ │ +000e9030: 7220 746f 2062 6567 696e 6e69 6e67 3b3c r to beginning;< │ │ │ │ +000e9040: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e69 /li>.
  • i │ │ │ │ +000e9050: 7465 7261 746f 7220 656e 6428 293c 2f63 terator end() return iter │ │ │ │ +000e9070: 6174 6f72 2074 6f20 656e 643b 3c2f 6c69 ator to end;
  • .
  • cons │ │ │ │ +000e9090: 745f 6974 6572 6174 6f72 2065 6e64 2829 t_iterator end() │ │ │ │ +000e90a0: 2063 6f6e 7374 3c2f 636f 6465 3e20 7265 const re │ │ │ │ +000e90b0: 7475 726e 2063 6f6e 7374 2069 7465 7261 turn const itera │ │ │ │ +000e90c0: 746f 7220 746f 2065 6e64 3b3c 2f6c 693e tor to end;
  • │ │ │ │ +000e90d0: 0a3c 6c69 3e3c 636f 6465 3e73 697a 655f .
  • size_ │ │ │ │ +000e90e0: 7420 7369 7a65 2829 3c2f 636f 6465 3e20 t size() │ │ │ │ +000e90f0: 7265 7475 726e 2073 697a 653b 3c2f 6c69 return size;
  • .
  • iter │ │ │ │ +000e9110: 6174 6f72 2069 6e73 6572 7428 6974 6572 ator insert(iter │ │ │ │ +000e9120: 6174 6f72 2070 6f73 2c20 636f 6e73 745f ator pos, const_ │ │ │ │ +000e9130: 7265 6665 7265 6e63 6520 7661 6c29 3c2f reference val) insert ele │ │ │ │ +000e9150: 6d65 6e74 2e3c 2f6c 693e 0a3c 2f75 6c3e ment.
  • .
│ │ │ │ +000e9160: 0a3c 703e 5468 6520 3c63 6f64 653e 6974 .

The it │ │ │ │ +000e9170: 6572 6174 6f72 3c2f 636f 6465 3e20 7368 erator sh │ │ │ │ +000e9180: 6f75 6c64 2062 6520 6120 666f 7277 6172 ould be a forwar │ │ │ │ +000e9190: 6420 6974 6572 6174 6f72 2077 6974 6820 d iterator with │ │ │ │ +000e91a0: 6120 6465 7265 6665 7265 6e63 6520 6f70 a dereference op │ │ │ │ +000e91b0: 6572 6174 6f72 2074 6f20 6163 6365 7373 erator to access │ │ │ │ +000e91c0: 2074 6865 2063 6f6e 7461 696e 6572 2773 the container's │ │ │ │ +000e91d0: 2065 6c65 6d65 6e74 732c 2069 7420 6d75 elements, it mu │ │ │ │ +000e91e0: 7374 2062 6520 636f 6d70 6172 6162 6c65 st be comparable │ │ │ │ +000e91f0: 2028 6571 7561 6c2f 756e 6571 7561 6c29 (equal/unequal) │ │ │ │ +000e9200: 2c20 616e 6420 6265 2070 7265 2d69 6e63 , and be pre-inc │ │ │ │ +000e9210: 7265 6d65 6e74 6162 6c65 2028 3c63 6f64 rementable (++it). │ │ │ │ +000e9230: 5468 6520 636f 6e73 7420 6974 6572 6174 The const iterat │ │ │ │ +000e9240: 6f72 2069 7320 7573 6564 2062 7920 6974 or is used by it │ │ │ │ +000e9250: 7320 736f 6170 6370 7032 2d67 656e 6572 s soapcpp2-gener │ │ │ │ +000e9260: 6174 6564 2073 6572 6961 6c69 7a65 7220 ated serializer │ │ │ │ +000e9270: 746f 2073 656e 6420 6120 7365 7175 656e to send a sequen │ │ │ │ +000e9280: 6365 206f 6620 584d 4c20 656c 656d 656e ce of XML elemen │ │ │ │ +000e9290: 7420 7661 6c75 6573 2e20 5468 6520 3c63 t values. The insert method is used │ │ │ │ +000e92c0: 2074 6f20 706f 7075 6c61 7465 2061 2063 to populate a c │ │ │ │ +000e92d0: 6f6e 7461 696e 6572 2077 6974 6820 3c63 ontainer with Container::i │ │ │ │ +000e92f0: 7465 7261 746f 7220 6920 3d20 636f 6e74 terator i = cont │ │ │ │ +000e9300: 6169 6e65 722e 696e 7365 7274 2863 6f6e ainer.insert(con │ │ │ │ +000e9310: 7461 696e 6572 2e65 6e64 2829 2c20 7661 tainer.end(), va │ │ │ │ +000e9320: 6c29 3c2f 636f 6465 3e2e 3c2f 703e 0a3c l).

.< │ │ │ │ +000e9330: 703e 4865 7265 2069 7320 696e 2065 7861 p>Here is in exa │ │ │ │ +000e9340: 6d70 6c65 2063 6f6e 7461 696e 6572 2074 mple container t │ │ │ │ +000e9350: 656d 706c 6174 6520 636c 6173 733a 3c2f emplate class:.
// simple_vecto │ │ │ │ +000e93b0: 722e 6820 3c2f 7370 616e 3e3c 2f64 6976 r.h
.
templa │ │ │ │ +000e93f0: 7465 3c2f 7370 616e 3e20 266c 743b 3c73 te <class │ │ │ │ +000e9420: 2054 2667 743b 203c 2f64 6976 3e0a 3c64 T>
. │ │ │ │ +000e9440: 3c73 7061 6e20 636c 6173 733d 226b 6579 class simple_vector │ │ │ │ +000e9470: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
{ public: │ │ │ │ +000e94b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
typedef T │ │ │ │ +000e9500: 2020 2020 2020 2020 2020 2076 616c 7565 value │ │ │ │ +000e9510: 5f74 7970 653b 203c 2f64 6976 3e0a 3c64 _type;
. │ │ │ │ +000e9530: 2020 2020 3c73 7061 6e20 636c 6173 733d typede │ │ │ │ +000e9550: 663c 2f73 7061 6e3e 2076 616c 7565 5f74 f value_t │ │ │ │ +000e9560: 7970 6520 2020 2020 2020 2020 2020 202a ype * │ │ │ │ +000e9570: 2070 6f69 6e74 6572 3b20 3c2f 6469 763e pointer;
│ │ │ │ +000e9580: 0a3c 6469 7620 636c 6173 733d 226c 696e .
typ │ │ │ │ +000e95b0: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef const v │ │ │ │ +000e95e0: 616c 7565 5f74 7970 6520 2020 2020 202a alue_type * │ │ │ │ +000e95f0: 2063 6f6e 7374 5f70 6f69 6e74 6572 3b20 const_pointer; │ │ │ │ +000e9600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
typedef value_type │ │ │ │ +000e9650: 2020 2020 2020 2020 2661 6d70 3b20 7265 & re │ │ │ │ +000e9660: 6665 7265 6e63 653b 203c 2f64 6976 3e0a ference;
. │ │ │ │ +000e9670: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
type │ │ │ │ +000e96a0: 6465 663c 2f73 7061 6e3e 203c 7370 616e def const va │ │ │ │ +000e96d0: 6c75 655f 7479 7065 2020 2020 2020 2661 lue_type &a │ │ │ │ +000e96e0: 6d70 3b20 636f 6e73 745f 7265 6665 7265 mp; const_refere │ │ │ │ +000e96f0: 6e63 653b 203c 2f64 6976 3e0a 3c64 6976 nce;
.
│ │ │ │ +000e9710: 2020 3c73 7061 6e20 636c 6173 733d 226b typedef< │ │ │ │ +000e9730: 2f73 7061 6e3e 2070 6f69 6e74 6572 2020 /span> pointer │ │ │ │ +000e9740: 2020 2020 2020 2020 2020 2020 2020 2069 i │ │ │ │ +000e9750: 7465 7261 746f 723b 203c 2f64 6976 3e0a terator;
. │ │ │ │ +000e9760: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
type │ │ │ │ +000e9790: 6465 663c 2f73 7061 6e3e 2063 6f6e 7374 def const │ │ │ │ +000e97a0: 5f70 6f69 6e74 6572 2020 2020 2020 2020 _pointer │ │ │ │ +000e97b0: 2020 2063 6f6e 7374 5f69 7465 7261 746f const_iterato │ │ │ │ +000e97c0: 723b 203c 2f64 6976 3e0a 3c64 6976 2063 r;
.
protected:
. │ │ │ │ +000e9820: 2020 2069 7465 7261 746f 7220 2020 2020 iterator │ │ │ │ +000e9830: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9840: 2020 2068 6561 643b 203c 2f64 6976 3e0a head;
. │ │ │ │ +000e9850: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
iterator │ │ │ │ +000e9870: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9880: 2020 2020 2020 7461 696c 3b20 3c2f 6469 tail; .
size_t │ │ │ │ +000e98d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e98e0: 2020 2020 2020 2020 2020 6361 7061 6369 capaci │ │ │ │ +000e98f0: 7479 3b20 3c2f 6469 763e 0a3c 6469 7620 ty;
.
< │ │ │ │ +000e9910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e9920: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord">public:
.
│ │ │ │ +000e9950: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9960: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9970: 2073 696d 706c 655f 7665 6374 6f72 2829 simple_vector() │ │ │ │ +000e9980: 2020 2020 2020 207b 2068 6561 6420 3d20 { head = │ │ │ │ +000e9990: 7461 696c 203d 204e 554c 4c3b 207d 203c tail = NULL; } < │ │ │ │ +000e99a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ +000e99c0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e99d0: 2020 2020 2020 2020 2020 2020 7369 6d70 simp │ │ │ │ +000e99e0: 6c65 5f76 6563 746f 7228 3c73 7061 6e20 le_vector( │ │ │ │ +000e9a00: 636f 6e73 743c 2f73 7061 6e3e 2073 696d const sim │ │ │ │ +000e9a10: 706c 655f 7665 6374 6f72 2661 6d70 3b20 ple_vector& │ │ │ │ +000e9a20: 7629 203c 2f64 6976 3e0a 3c64 6976 2063 v)
.
│ │ │ │ +000e9a40: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9a50: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ 000e9a60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9a70: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9a80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9a90: 7b20 6f70 6572 6174 6f72 3d28 7629 3b20 { operator=(v); │ │ │ │ -000e9aa0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
.
│ │ │ │ -000e9ac0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9ad0: 2020 2020 2020 2020 2020 2020 2020 207e ~ │ │ │ │ -000e9ae0: 7369 6d70 6c65 5f76 6563 746f 7228 2920 simple_vector() │ │ │ │ -000e9af0: 2020 2020 207b 203c 7370 616e 2063 6c61 { if (head │ │ │ │ -000e9b20: 2920 3c73 7061 6e20 636c 6173 733d 226b ) delete[] head; } │ │ │ │ -000e9b50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
void │ │ │ │ -000e9ba0: 2020 2020 2020 2020 2020 2020 2020 636c cl │ │ │ │ -000e9bb0: 6561 7228 2920 2020 2020 2020 2020 2020 ear() │ │ │ │ -000e9bc0: 2020 2020 7b20 7461 696c 203d 2068 6561 { tail = hea │ │ │ │ -000e9bd0: 643b 207d 203c 2f64 6976 3e0a 3c64 6976 d; }
.
/* the membe │ │ │ │ -000e9c10: 7220 6675 6e63 7469 6f6e 7320 6265 6c6f r functions belo │ │ │ │ -000e9c20: 7720 6172 6520 7265 7175 6972 6564 2066 w are required f │ │ │ │ -000e9c30: 6f72 2073 6572 6961 6c69 7a61 7469 6f6e or serialization │ │ │ │ -000e9c40: 206f 6620 7465 6d70 6c61 7465 7320 2a2f of templates */ │ │ │ │ -000e9c50: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
.< │ │ │ │ -000e9c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000e9c70: 3e20 2020 2069 7465 7261 746f 7220 2020 > iterator │ │ │ │ -000e9c80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9c90: 2020 2020 2062 6567 696e 2829 2020 2020 begin() │ │ │ │ -000e9ca0: 2020 2020 2020 2020 2020 207b 203c 7370 { return head; } .
const_ │ │ │ │ -000e9d00: 6974 6572 6174 6f72 2020 2020 2020 2020 iterator │ │ │ │ -000e9d10: 2020 2020 2020 2020 2020 6265 6769 6e28 begin( │ │ │ │ -000e9d20: 293c 7370 616e 2063 6c61 7373 3d22 6b65 ) const { return h │ │ │ │ -000e9d70: 6561 643b 207d 203c 2f64 6976 3e0a 3c64 ead; }
. │ │ │ │ -000e9d90: 2020 2020 6974 6572 6174 6f72 2020 2020 iterator │ │ │ │ +000e9a70: 2020 2020 2020 7b20 6f70 6572 6174 6f72 { operator │ │ │ │ +000e9a80: 3d28 7629 3b20 7d20 3c2f 6469 763e 0a3c =(v); }
.< │ │ │ │ +000e9a90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000e9aa0: 3e20 2020 2020 2020 2020 2020 2020 2020 > │ │ │ │ +000e9ab0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9ac0: 2020 2020 207e 7369 6d70 6c65 5f76 6563 ~simple_vec │ │ │ │ +000e9ad0: 746f 7228 2920 2020 2020 207b 203c 7370 tor() { if │ │ │ │ +000e9b00: 2028 6865 6164 2920 3c73 7061 6e20 636c (head) de │ │ │ │ +000e9b20: 6c65 7465 3c2f 7370 616e 3e5b 5d20 6865 lete[] he │ │ │ │ +000e9b30: 6164 3b20 7d20 3c2f 6469 763e 0a3c 6469 ad; }
. │ │ │ │ +000e9b50: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ +000e9b70: 643c 2f73 7061 6e3e 2020 2020 2020 2020 d │ │ │ │ +000e9b80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9b90: 2020 2020 636c 6561 7228 2920 2020 2020 clear() │ │ │ │ +000e9ba0: 2020 2020 2020 2020 2020 7b20 7461 696c { tail │ │ │ │ +000e9bb0: 203d 2068 6561 643b 207d 203c 2f64 6976 = head; }
.
/* the │ │ │ │ +000e9bf0: 206d 656d 6265 7220 6675 6e63 7469 6f6e member function │ │ │ │ +000e9c00: 7320 6265 6c6f 7720 6172 6520 7265 7175 s below are requ │ │ │ │ +000e9c10: 6972 6564 2066 6f72 2073 6572 6961 6c69 ired for seriali │ │ │ │ +000e9c20: 7a61 7469 6f6e 206f 6620 7465 6d70 6c61 zation of templa │ │ │ │ +000e9c30: 7465 7320 2a2f 3c2f 7370 616e 3e20 3c2f tes */ .
itera │ │ │ │ +000e9c60: 746f 7220 2020 2020 2020 2020 2020 2020 tor │ │ │ │ +000e9c70: 2020 2020 2020 2020 2020 2062 6567 696e begin │ │ │ │ +000e9c80: 2829 2020 2020 2020 2020 2020 2020 2020 () │ │ │ │ +000e9c90: 207b 203c 7370 616e 2063 6c61 7373 3d22 { ret │ │ │ │ +000e9cb0: 7572 6e3c 2f73 7061 6e3e 2068 6561 643b urn head; │ │ │ │ +000e9cc0: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
.
│ │ │ │ +000e9ce0: 636f 6e73 745f 6974 6572 6174 6f72 2020 const_iterator │ │ │ │ +000e9cf0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9d00: 6265 6769 6e28 293c 7370 616e 2063 6c61 begin() co │ │ │ │ +000e9d20: 6e73 7420 3c2f 7370 616e 3e7b 203c 7370 nst { return head; } .
iterat │ │ │ │ +000e9d80: 6f72 2020 2020 2020 2020 2020 2020 2020 or │ │ │ │ +000e9d90: 2020 2020 2020 2020 2020 656e 6428 2920 end() │ │ │ │ 000e9da0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9db0: 2020 2020 656e 6428 2920 2020 2020 2020 end() │ │ │ │ -000e9dc0: 2020 2020 2020 2020 2020 7b20 3c73 7061 { return tail; } .
const_i │ │ │ │ -000e9e20: 7465 7261 746f 7220 2020 2020 2020 2020 terator │ │ │ │ -000e9e30: 2020 2020 2020 2020 2065 6e64 2829 3c73 end() const { re │ │ │ │ -000e9e80: 7475 726e 3c2f 7370 616e 3e20 7461 696c turn tail │ │ │ │ -000e9e90: 3b20 7d20 3c2f 6469 763e 0a3c 6469 7620 ; }
.
│ │ │ │ -000e9eb0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ │ -000e9ed0: 743c 2f73 7061 6e3e 2020 2020 2020 2020 t │ │ │ │ -000e9ee0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9ef0: 2020 7369 7a65 2829 3c73 7061 6e20 636c size() c │ │ │ │ -000e9f10: 6f6e 7374 203c 2f73 7061 6e3e 7b20 3c73 onst { return tail - hea │ │ │ │ -000e9f50: 643b 207d 203c 2f64 6976 3e0a 3c64 6976 d; }
.
│ │ │ │ -000e9f70: 2020 6974 6572 6174 6f72 2020 2020 2020 iterator │ │ │ │ -000e9f80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -000e9f90: 2020 696e 7365 7274 2869 7465 7261 746f insert(iterato │ │ │ │ -000e9fa0: 7220 706f 732c 2063 6f6e 7374 5f72 6566 r pos, const_ref │ │ │ │ -000e9fb0: 6572 656e 6365 2076 616c 2920 3c2f 6469 erence val) .
{
│ │ │ │ -000e9fe0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
if (!h │ │ │ │ -000ea020: 6561 6429 203c 2f64 6976 3e0a 3c64 6976 ead)
.
│ │ │ │ -000ea040: 2020 2020 2020 6865 6164 203d 2074 6169 head = tai │ │ │ │ -000ea050: 6c20 3d20 3c73 7061 6e20 636c 6173 733d l = new value_type[ │ │ │ │ -000ea080: 6361 7061 6369 7479 203d 2031 5d3b 203c capacity = 1]; < │ │ │ │ -000ea090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
else if │ │ │ │ -000ea0f0: 3c2f 7370 616e 3e20 2874 6169 6c20 2667 (tail &g │ │ │ │ -000ea100: 743b 3d20 6865 6164 202b 2063 6170 6163 t;= head + capac │ │ │ │ -000ea110: 6974 7929 203c 2f64 6976 3e0a 3c64 6976 ity)
.
│ │ │ │ -000ea130: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
.
│ │ │ │ -000ea150: 2020 2020 2020 6974 6572 6174 6f72 2069 iterator i │ │ │ │ -000ea160: 203d 2068 6561 643b 203c 2f64 6976 3e0a = head;
. │ │ │ │ -000ea170: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
iterat │ │ │ │ -000ea190: 6f72 206a 203d 203c 7370 616e 2063 6c61 or j = new │ │ │ │ -000ea1b0: 3c2f 7370 616e 3e20 7661 6c75 655f 7479 value_ty │ │ │ │ -000ea1c0: 7065 5b63 6170 6163 6974 7920 2a3d 2032 pe[capacity *= 2 │ │ │ │ -000ea1d0: 5d3b 203c 2f64 6976 3e0a 3c64 6976 2063 ];
.
│ │ │ │ -000ea1f0: 2020 2020 6974 6572 6174 6f72 206b 203d iterator k = │ │ │ │ -000ea200: 206a 3b20 3c2f 6469 763e 0a3c 6469 7620 j;
.
│ │ │ │ -000ea220: 2020 2020 203c 7370 616e 2063 6c61 7373 w │ │ │ │ -000ea240: 6869 6c65 3c2f 7370 616e 3e20 2869 2026 hile (i & │ │ │ │ -000ea250: 6c74 3b20 7461 696c 2920 3c2f 6469 763e lt; tail)
│ │ │ │ -000ea260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
*k+ │ │ │ │ -000ea280: 2b20 3d20 2a69 2b2b 3b20 3c2f 6469 763e + = *i++;
│ │ │ │ -000ea290: 0a3c 6469 7620 636c 6173 733d 226c 696e .
if ( │ │ │ │ -000ea2d0: 706f 7329 203c 2f64 6976 3e0a 3c64 6976 pos)
.
│ │ │ │ -000ea2f0: 2020 2020 2020 2020 706f 7320 3d20 6a20 pos = j │ │ │ │ -000ea300: 2b20 2870 6f73 202d 2068 6561 6429 3b20 + (pos - head); │ │ │ │ -000ea310: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -000ea330: 2074 6169 6c20 3d20 6a20 2b20 2874 6169 tail = j + (tai │ │ │ │ -000ea340: 6c20 2d20 6865 6164 293b 203c 2f64 6976 l - head);
.
delete[ │ │ │ │ -000ea390: 5d20 6865 6164 3b20 3c2f 6469 763e 0a3c ] head;
.< │ │ │ │ -000ea3a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000ea3b0: 3e20 2020 2020 2020 2068 6561 6420 3d20 > head = │ │ │ │ -000ea3c0: 6a3b 203c 2f64 6976 3e0a 3c64 6976 2063 j;
.
│ │ │ │ -000ea3e0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
.
│ │ │ │ -000ea400: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ -000ea420: 2f73 7061 6e3e 2028 706f 7320 2661 6d70 /span> (pos & │ │ │ │ -000ea430: 3b26 616d 703b 2070 6f73 2026 6774 3b3d ;& pos >= │ │ │ │ -000ea440: 2068 6561 6420 2661 6d70 3b26 616d 703b head && │ │ │ │ -000ea450: 2070 6f73 2026 6c74 3b20 7461 696c 2920 pos < tail) │ │ │ │ -000ea460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ │ │ │ │ -000ea480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -000ea4a0: 2069 7465 7261 746f 7220 6920 3d20 7461 iterator i = ta │ │ │ │ -000ea4b0: 696c 3b20 3c2f 6469 763e 0a3c 6469 7620 il;
.
│ │ │ │ -000ea4d0: 2020 2020 2069 7465 7261 746f 7220 6a20 iterator j │ │ │ │ -000ea4e0: 3d20 6920 2d20 313b 203c 2f64 6976 3e0a = i - 1;
. │ │ │ │ -000ea4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
while │ │ │ │ -000ea530: 2028 6a20 213d 2070 6f73 2920 3c2f 6469 (j != pos) .
│ │ │ │ -000ea560: 2a69 2d2d 203d 202a 6a2d 2d3b 203c 2f64 *i-- = *j--; .
*p │ │ │ │ -000ea590: 6f73 203d 2076 616c 3b20 3c2f 6469 763e os = val;
│ │ │ │ -000ea5a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.
else │ │ │ │ -000ea600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ │ │ │ │ -000ea620: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ -000ea640: 2070 6f73 203d 2074 6169 6c3b 203c 2f64 pos = tail; .
*t │ │ │ │ -000ea670: 6169 6c2b 2b20 3d20 7661 6c3b 203c 2f64 ail++ = val; .
} .
return pos;
│ │ │ │ -000ea6f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
. │ │ │ │ -000ea710: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
simple_vec │ │ │ │ -000ea730: 746f 7226 616d 703b 206f 7065 7261 746f tor& operato │ │ │ │ -000ea740: 723d 283c 7370 616e 2063 6c61 7373 3d22 r=(const simple_vec │ │ │ │ -000ea770: 746f 7226 616d 703b 2076 2920 3c2f 6469 tor& v) .
{
│ │ │ │ -000ea7a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
head = │ │ │ │ -000ea7c0: 7461 696c 203d 204e 554c 4c3b 203c 2f64 tail = NULL; .
capa │ │ │ │ -000ea7f0: 6369 7479 203d 2076 2e63 6170 6163 6974 city = v.capacit │ │ │ │ -000ea800: 793b 203c 2f64 6976 3e0a 3c64 6976 2063 y;
.
│ │ │ │ -000ea820: 2020 3c73 7061 6e20 636c 6173 733d 226b if (v.head) < │ │ │ │ -000ea850: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
{< │ │ │ │ -000ea870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ -000ea890: 6865 6164 203d 2074 6169 6c20 3d20 3c73 head = tail = new v │ │ │ │ -000ea8c0: 616c 7565 5f74 7970 655b 6361 7061 6369 alue_type[capaci │ │ │ │ -000ea8d0: 7479 5d3b 203c 2f64 6976 3e0a 3c64 6976 ty];
.
│ │ │ │ -000ea8f0: 2020 2020 2020 6974 6572 6174 6f72 2069 iterator i │ │ │ │ -000ea900: 203d 2076 2e68 6561 643b 203c 2f64 6976 = v.head;
.
while (i != v.tail) │ │ │ │ -000ea960: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
│ │ │ │ -000ea980: 2020 2020 2a74 6169 6c2b 2b20 3d20 2a69 *tail++ = *i │ │ │ │ -000ea990: 2b2b 3b20 3c2f 6469 763e 0a3c 6469 7620 ++;
.
│ │ │ │ -000ea9b0: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
.
│ │ │ │ -000ea9d0: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ -000ea9f0: 7475 726e 3c2f 7370 616e 3e20 2a3c 7370 turn *this; │ │ │ │ -000eaa20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
} < │ │ │ │ -000eaa40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
│ │ │ │ -000eaa60: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

To en │ │ │ │ -000eaa80: 6162 6c65 2074 6865 2063 6f6e 7461 696e able the contain │ │ │ │ -000eaa90: 6572 2c20 7765 2061 6464 2074 6865 2066 er, we add the f │ │ │ │ -000eaaa0: 6f6c 6c6f 7769 6e67 2074 776f 206c 696e ollowing two lin │ │ │ │ -000eaab0: 6573 2074 6f20 7468 6520 696e 7465 7266 es to the interf │ │ │ │ -000eaac0: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file │ │ │ │ -000eaad0: 666f 7220 736f 6170 6370 7032 3a3c 2f70 for soapcpp2:

.
#include &q │ │ │ │ -000eab30: 756f 743b 7369 6d70 6c65 5665 6374 6f72 uot;simpleVector │ │ │ │ -000eab40: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" │ │ │ │ -000eab50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
t │ │ │ │ -000eab80: 656d 706c 6174 653c 2f73 7061 6e3e 2026 emplate & │ │ │ │ -000eab90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;class T> class s │ │ │ │ -000eabe0: 696d 706c 6556 6563 746f 723b 3c2f 6469 impleVector;.

The │ │ │ │ -000eac10: 2063 6f6e 7461 696e 6572 2063 6c61 7373 container class │ │ │ │ -000eac20: 2069 7473 656c 6620 7368 6f75 6c64 206e itself should n │ │ │ │ -000eac30: 6f74 2062 6520 6465 6669 6e65 6420 696e ot be defined in │ │ │ │ -000eac40: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h │ │ │ │ -000eac50: 6561 6465 7220 6669 6c65 2c20 6f6e 6c79 eader file, only │ │ │ │ -000eac60: 2074 6865 2074 656d 706c 6174 6520 6465 the template de │ │ │ │ -000eac70: 636c 6172 6174 696f 6e20 7375 6666 6963 claration suffic │ │ │ │ -000eac80: 6573 2066 6f72 2073 6f61 7063 7070 3220 es for soapcpp2 │ │ │ │ -000eac90: 746f 2067 656e 6572 6174 6520 7365 7269 to generate seri │ │ │ │ -000eaca0: 616c 697a 6572 732e 2052 6563 616c 6c20 alizers. Recall │ │ │ │ -000eacb0: 7468 6174 2074 6865 203c 636f 6465 3e23 that the # │ │ │ │ -000eacc0: 696e 636c 7564 653c 2f63 6f64 653e 2064 include d │ │ │ │ -000eacd0: 6972 6563 7469 7665 7320 6172 6520 6e6f irectives are no │ │ │ │ -000eace0: 7420 6578 6563 7574 6564 2062 7920 736f t executed by so │ │ │ │ -000eacf0: 6170 6370 7032 2062 7574 2073 696d 706c apcpp2 but simpl │ │ │ │ -000ead00: 7920 7061 7373 6564 206f 6e20 746f 2074 y passed on to t │ │ │ │ -000ead10: 6865 2067 656e 6572 6174 6564 2073 6f75 he generated sou │ │ │ │ -000ead20: 7263 6520 636f 6465 2e20 5468 6973 2069 rce code. This i │ │ │ │ -000ead30: 6e63 6c75 6465 2073 7065 6369 6669 6573 nclude specifies │ │ │ │ -000ead40: 2069 6e20 7468 6520 6765 6e65 7261 7465 in the generate │ │ │ │ -000ead50: 6420 736f 7572 6365 2063 6f64 6520 7768 d source code wh │ │ │ │ -000ead60: 6572 6520 7468 6520 636f 6e74 6169 6e65 ere the containe │ │ │ │ -000ead70: 7220 6973 2061 6374 7561 6c6c 7920 6465 r is actually de │ │ │ │ -000ead80: 6669 6e65 642e 3c2f 703e 0a3c 703e f09f fined.

.

.. │ │ │ │ -000ead90: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ -000eada0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ -000eadb0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

│ │ │ │ -000eadc0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

.Polymorphic d │ │ │ │ -000eae00: 796e 616d 6963 2061 7272 6179 7320 616e ynamic arrays an │ │ │ │ -000eae10: 6420 6c69 7374 733c 2f68 333e 0a3c 703e d lists

.

│ │ │ │ -000eae20: 506f 6c79 6d6f 7270 6869 6320 6172 7261 Polymorphic arra │ │ │ │ -000eae30: 7973 2c20 7468 6174 2069 732c 2061 7272 ys, that is, arr │ │ │ │ -000eae40: 6179 7320 6f66 2076 616c 7565 7320 6f66 ays of values of │ │ │ │ -000eae50: 2061 6e79 2074 7970 652c 2063 616e 2062 any type, can b │ │ │ │ -000eae60: 6520 7365 7269 616c 697a 6564 2069 6e20 e serialized in │ │ │ │ -000eae70: 584d 4c20 7768 656e 2064 6563 6c61 7265 XML when declare │ │ │ │ -000eae80: 6420 6173 2061 6e20 6172 7261 7920 6f66 d as an array of │ │ │ │ -000eae90: 2070 6f69 6e74 6572 7320 746f 2061 2062 pointers to a b │ │ │ │ -000eaea0: 6173 6520 636c 6173 732e 2046 6f72 2065 ase class. For e │ │ │ │ -000eaeb0: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

.
class │ │ │ │ -000eaf00: 3c2f 7370 616e 3e6e 735f 5f4f 626a 6563 ns__Objec │ │ │ │ -000eaf10: 7420 3c2f 6469 763e 0a3c 6469 7620 636c t
.
{ public │ │ │ │ -000eaf50: 3a20 3c2f 6469 763e 0a3c 6469 7620 636c :
.
. │ │ │ │ -000eaf70: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // memb │ │ │ │ -000eaf90: 6572 7320 6f66 206e 735f 5f4f 626a 6563 ers of ns__Objec │ │ │ │ -000eafa0: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
.< │ │ │ │ -000eafb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000eafc0: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
.
class │ │ │ │ -000eb000: 6e73 5f5f 4461 7461 203a 203c 7370 616e ns__Data : public n │ │ │ │ -000eb030: 735f 5f4f 626a 6563 7420 3c2f 6469 763e s__Object
│ │ │ │ -000eb040: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ publi │ │ │ │ -000eb070: 633c 2f73 7061 6e3e 3a20 3c2f 6469 763e c:
│ │ │ │ -000eb080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
... // members of n │ │ │ │ -000eb0c0: 735f 5f44 6174 613c 2f73 7061 6e3e 3c2f s__Data.
};
│ │ │ │ -000eb0f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
class < │ │ │ │ -000eb120: 2f73 7061 6e3e 4172 7261 794f 664f 626a /span>ArrayOfObj │ │ │ │ -000eb130: 6563 7420 3c2f 6469 763e 0a3c 6469 7620 ect
.
{ < │ │ │ │ -000eb150: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000eb160: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord">public:
.
│ │ │ │ -000eb190: 206e 735f 5f4f 626a 6563 7420 2a2a 5f5f ns__Object **__ │ │ │ │ -000eb1a0: 7074 723b 203c 7370 616e 2063 6c61 7373 ptr; // po │ │ │ │ -000eb1c0: 696e 7465 7220 746f 2061 7272 6179 206f inter to array o │ │ │ │ -000eb1d0: 6620 706f 696e 7465 7273 2074 6f20 6261 f pointers to ba │ │ │ │ -000eb1e0: 7365 206f 7220 6465 7269 7665 6420 6f62 se or derived ob │ │ │ │ -000eb1f0: 6a65 6374 7320 3c2f 7370 616e 3e3c 2f64 jects .
int _ │ │ │ │ -000eb240: 5f73 697a 653b 2020 2020 2020 2020 203c _size; < │ │ │ │ -000eb250: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000eb260: 656e 7422 3e2f 2f20 7369 7a65 206f 6620 ent">// size of │ │ │ │ -000eb270: 7468 6520 6172 7261 793c 2f73 7061 6e3e the array │ │ │ │ -000eb280: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
}; .
class │ │ │ │ -000eb2d0: 203c 2f73 7061 6e3e 6e73 5f5f 4f62 6a65 ns__Obje │ │ │ │ -000eb2e0: 6374 7320 3c2f 6469 763e 0a3c 6469 7620 cts
.
{ < │ │ │ │ -000eb300: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000eb310: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord">public:
.
│ │ │ │ -000eb340: 2073 7464 3a3a 7665 6374 6f72 266c 743b std::vector< │ │ │ │ -000eb350: 6e73 5f5f 4f62 6a65 6374 2667 743b 206f ns__Object> o │ │ │ │ -000eb360: 626a 6563 7473 3b20 3c73 7061 6e20 636c bjects; // │ │ │ │ -000eb380: 2076 6563 746f 7220 6f66 2062 6173 6520 vector of base │ │ │ │ -000eb390: 6f72 2064 6572 6976 6564 206f 626a 6563 or derived objec │ │ │ │ -000eb3a0: 7473 203c 2f73 7061 6e3e 3c2f 6469 763e ts
│ │ │ │ -000eb3b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
};
.

The pointe │ │ │ │ -000eb3f0: 7273 2069 6e20 7468 6520 6172 7261 7920 rs in the array │ │ │ │ -000eb400: 6361 6e20 706f 696e 7420 746f 2074 6865 can point to the │ │ │ │ -000eb410: 203c 636f 6465 3e6e 735f 5f4f 626a 6563 ns__Objec │ │ │ │ -000eb420: 743c 2f63 6f64 653e 2062 6173 6520 696e t base in │ │ │ │ -000eb430: 7374 616e 6365 7320 6f72 203c 636f 6465 stances or ns__Data │ │ │ │ -000eb450: 2064 6572 6976 6564 2069 6e73 7461 6e63 derived instanc │ │ │ │ -000eb460: 6573 2c20 7768 6963 6820 7769 6c6c 2062 es, which will b │ │ │ │ -000eb470: 6520 7365 7269 616c 697a 6564 2061 6363 e serialized acc │ │ │ │ -000eb480: 6f72 6469 6e67 6c79 2069 6e20 584d 4c2e ordingly in XML. │ │ │ │ -000eb490: 2044 6572 6976 6564 2069 6e73 7461 6e63 Derived instanc │ │ │ │ -000eb4a0: 6573 2061 7265 2069 6e64 6963 6174 6564 es are indicated │ │ │ │ -000eb4b0: 2062 7920 3c65 6d3e 3c63 6f64 653e 7873 by xs │ │ │ │ -000eb4c0: 693a 7479 7065 3c2f 636f 6465 3e3c 2f65 i:type attribute in │ │ │ │ -000eb4e0: 584d 4c20 7769 7468 2074 6865 2071 7561 XML with the qua │ │ │ │ -000eb4f0: 6c69 6669 6564 206e 616d 6520 6f66 2074 lified name of t │ │ │ │ -000eb500: 6865 2063 6c61 7373 2c20 746f 2064 6973 he class, to dis │ │ │ │ -000eb510: 7469 6e67 7569 7368 2064 6572 6976 6564 tinguish derived │ │ │ │ -000eb520: 2069 6e73 7461 6e63 6573 2066 726f 6d20 instances from │ │ │ │ -000eb530: 7468 6520 6261 7365 2069 6e73 7461 6e63 the base instanc │ │ │ │ -000eb540: 6573 2e20 5769 7468 6f75 7420 7468 6973 es. Without this │ │ │ │ -000eb550: 2061 7474 7269 6275 7465 2074 6865 2064 attribute the d │ │ │ │ -000eb560: 6573 6572 6961 6c69 7a65 7220 7769 6c6c eserializer will │ │ │ │ -000eb570: 206e 6f74 2069 6e73 7461 6e74 6961 7465 not instantiate │ │ │ │ -000eb580: 2074 6865 2064 6572 6976 6564 2069 6e73 the derived ins │ │ │ │ -000eb590: 7461 6e63 6520 6275 7420 6120 6261 7365 tance but a base │ │ │ │ -000eb5a0: 2069 6e73 7461 6e63 6520 7369 6e63 6520 instance since │ │ │ │ -000eb5b0: 7468 6572 6520 6973 206e 6f20 6964 656e there is no iden │ │ │ │ -000eb5c0: 7469 6679 696e 6720 696e 666f 726d 6174 tifying informat │ │ │ │ -000eb5d0: 696f 6e20 746f 2064 6973 7469 6e67 7569 ion to distingui │ │ │ │ -000eb5e0: 7368 2074 6865 2058 4d4c 2066 6f72 6d73 sh the XML forms │ │ │ │ -000eb5f0: 2065 7863 6570 7420 666f 7220 7468 6520 except for the │ │ │ │ -000eb600: 3c65 6d3e 3c63 6f64 653e 7873 693a 7479 xsi:ty │ │ │ │ -000eb610: 7065 3c2f 636f 6465 3e3c 2f65 6d3e 2061 pe a │ │ │ │ -000eb620: 7474 7269 6275 7465 2e3c 2f70 3e0a 3c70 ttribute.

.

Since we cannot │ │ │ │ -000eb640: 2075 7365 2064 796e 616d 6963 2062 696e use dynamic bin │ │ │ │ -000eb650: 6469 6e67 2074 6f20 7375 7070 6f72 7420 ding to support │ │ │ │ -000eb660: 706f 6c79 6d6f 7270 6869 736d 2069 6e20 polymorphism in │ │ │ │ -000eb670: 432c 2061 6e6f 7468 6572 206d 6563 6861 C, another mecha │ │ │ │ -000eb680: 6e69 736d 2077 6520 6361 6e20 7573 6520 nism we can use │ │ │ │ -000eb690: 6973 2076 6f69 6420 706f 696e 7465 7273 is void pointers │ │ │ │ -000eb6a0: 202e 2048 6572 6520 6973 2061 6e20 6578 . Here is an ex │ │ │ │ -000eb6b0: 616d 706c 6520 6f66 2061 2070 6f6c 796d ample of a polym │ │ │ │ -000eb6c0: 6f72 7068 6963 2053 4f41 502d 656e 636f orphic SOAP-enco │ │ │ │ -000eb6d0: 6465 6420 6172 7261 7920 3c63 6f64 653e ded array │ │ │ │ -000eb6e0: 4172 7261 794f 664f 626a 6563 743c 2f63 ArrayOfObject and a non-S │ │ │ │ -000eb700: 4f41 5020 6479 6e61 6d69 6320 6172 7261 OAP dynamic arra │ │ │ │ -000eb710: 7920 3c63 6f64 653e 6e73 5f5f 4f62 6a65 y ns__Obje │ │ │ │ -000eb720: 6374 733c 2f63 6f64 653e 2074 6861 7420 cts that │ │ │ │ -000eb730: 686f 6c64 2076 616c 7565 7320 6f66 2061 hold values of a │ │ │ │ -000eb740: 6e79 2073 6572 6961 6c69 7a61 626c 6520 ny serializable │ │ │ │ -000eb750: 7479 7065 3a3c 2f70 3e0a 3c64 6976 2063 type:

.
│ │ │ │ -000eb770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
struct < │ │ │ │ -000eb7a0: 2f73 7061 6e3e 5f5f 7772 6170 7065 7220 /span>__wrapper │ │ │ │ +000e9db0: 7b20 3c73 7061 6e20 636c 6173 733d 226b { retu │ │ │ │ +000e9dd0: 726e 3c2f 7370 616e 3e20 7461 696c 3b20 rn tail; │ │ │ │ +000e9de0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
.
c │ │ │ │ +000e9e00: 6f6e 7374 5f69 7465 7261 746f 7220 2020 onst_iterator │ │ │ │ +000e9e10: 2020 2020 2020 2020 2020 2020 2020 2065 e │ │ │ │ +000e9e20: 6e64 2829 3c73 7061 6e20 636c 6173 733d nd() const │ │ │ │ +000e9e40: 203c 2f73 7061 6e3e 7b20 3c73 7061 6e20 { return tail; }
│ │ │ │ +000e9e80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
size_t │ │ │ │ +000e9ec0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9ed0: 2020 2020 2020 2020 7369 7a65 2829 3c73 size() const { re │ │ │ │ +000e9f20: 7475 726e 3c2f 7370 616e 3e20 7461 696c turn tail │ │ │ │ +000e9f30: 202d 2068 6561 643b 207d 203c 2f64 6976 - head; }
.
iterator │ │ │ │ +000e9f60: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +000e9f70: 2020 2020 2020 2020 696e 7365 7274 2869 insert(i │ │ │ │ +000e9f80: 7465 7261 746f 7220 706f 732c 2063 6f6e terator pos, con │ │ │ │ +000e9f90: 7374 5f72 6566 6572 656e 6365 2076 616c st_reference val │ │ │ │ +000e9fa0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
{ │ │ │ │ +000e9fc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
< │ │ │ │ +000e9fe0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000e9ff0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (!head)
.
head │ │ │ │ +000ea030: 203d 2074 6169 6c20 3d20 3c73 7061 6e20 = tail = │ │ │ │ +000ea050: 6e65 773c 2f73 7061 6e3e 2076 616c 7565 new value │ │ │ │ +000ea060: 5f74 7970 655b 6361 7061 6369 7479 203d _type[capacity = │ │ │ │ +000ea070: 2031 5d3b 203c 2f64 6976 3e0a 3c64 6976 1];
.
│ │ │ │ +000ea090: 2020 2020 3c73 7061 6e20 636c 6173 733d el │ │ │ │ +000ea0b0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se if (t │ │ │ │ +000ea0e0: 6169 6c20 2667 743b 3d20 6865 6164 202b ail >= head + │ │ │ │ +000ea0f0: 2063 6170 6163 6974 7929 203c 2f64 6976 capacity)
.
{
.
iter │ │ │ │ +000ea140: 6174 6f72 2069 203d 2068 6561 643b 203c ator i = head; < │ │ │ │ +000ea150: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ +000ea170: 6974 6572 6174 6f72 206a 203d 203c 7370 iterator j = new va │ │ │ │ +000ea1a0: 6c75 655f 7479 7065 5b63 6170 6163 6974 lue_type[capacit │ │ │ │ +000ea1b0: 7920 2a3d 2032 5d3b 203c 2f64 6976 3e0a y *= 2];
. │ │ │ │ +000ea1c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
iterat │ │ │ │ +000ea1e0: 6f72 206b 203d 206a 3b20 3c2f 6469 763e or k = j;
│ │ │ │ +000ea1f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
while (i < tail) │ │ │ │ +000ea240: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ +000ea260: 2020 202a 6b2b 2b20 3d20 2a69 2b2b 3b20 *k++ = *i++; │ │ │ │ +000ea270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
│ │ │ │ +000ea290: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (pos)
.
po │ │ │ │ +000ea2e0: 7320 3d20 6a20 2b20 2870 6f73 202d 2068 s = j + (pos - h │ │ │ │ +000ea2f0: 6561 6429 3b20 3c2f 6469 763e 0a3c 6469 ead);
. │ │ │ │ +000ea310: 2020 2020 2020 2074 6169 6c20 3d20 6a20 tail = j │ │ │ │ +000ea320: 2b20 2874 6169 6c20 2d20 6865 6164 293b + (tail - head); │ │ │ │ +000ea330: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
│ │ │ │ +000ea350: 2020 3c73 7061 6e20 636c 6173 733d 226b delete[] head; .
h │ │ │ │ +000ea3a0: 6561 6420 3d20 6a3b 203c 2f64 6976 3e0a ead = j;
. │ │ │ │ +000ea3b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
}
│ │ │ │ +000ea3d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
if (po │ │ │ │ +000ea410: 7320 2661 6d70 3b26 616d 703b 2070 6f73 s && pos │ │ │ │ +000ea420: 2026 6774 3b3d 2068 6561 6420 2661 6d70 >= head & │ │ │ │ +000ea430: 3b26 616d 703b 2070 6f73 2026 6c74 3b20 ;& pos < │ │ │ │ +000ea440: 7461 696c 2920 3c2f 6469 763e 0a3c 6469 tail)
. │ │ │ │ +000ea460: 2020 2020 207b 3c2f 6469 763e 0a3c 6469 {
. │ │ │ │ +000ea480: 2020 2020 2020 2069 7465 7261 746f 7220 iterator │ │ │ │ +000ea490: 6920 3d20 7461 696c 3b20 3c2f 6469 763e i = tail;
│ │ │ │ +000ea4a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
itera │ │ │ │ +000ea4c0: 746f 7220 6a20 3d20 6920 2d20 313b 203c tor j = i - 1; < │ │ │ │ +000ea4d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
│ │ │ │ +000ea4f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 while< │ │ │ │ +000ea510: 2f73 7061 6e3e 2028 6a20 213d 2070 6f73 /span> (j != pos │ │ │ │ +000ea520: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
│ │ │ │ +000ea540: 2020 2020 2020 2a69 2d2d 203d 202a 6a2d *i-- = *j- │ │ │ │ +000ea550: 2d3b 203c 2f64 6976 3e0a 3c64 6976 2063 -;
.
│ │ │ │ +000ea570: 2020 2020 2a70 6f73 203d 2076 616c 3b20 *pos = val; │ │ │ │ +000ea580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
} │ │ │ │ +000ea5a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
│ │ │ │ +000ea5c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
. │ │ │ │ +000ea600: 2020 2020 207b 3c2f 6469 763e 0a3c 6469 {
. │ │ │ │ +000ea620: 2020 2020 2020 2070 6f73 203d 2074 6169 pos = tai │ │ │ │ +000ea630: 6c3b 203c 2f64 6976 3e0a 3c64 6976 2063 l;
.
│ │ │ │ +000ea650: 2020 2020 2a74 6169 6c2b 2b20 3d20 7661 *tail++ = va │ │ │ │ +000ea660: 6c3b 203c 2f64 6976 3e0a 3c64 6976 2063 l;
.
│ │ │ │ +000ea680: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
.
│ │ │ │ +000ea6a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +000ea6c0: 7572 6e3c 2f73 7061 6e3e 2070 6f73 3b20 urn pos; │ │ │ │ +000ea6d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
} < │ │ │ │ +000ea6f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
simp │ │ │ │ +000ea710: 6c65 5f76 6563 746f 7226 616d 703b 206f le_vector& o │ │ │ │ +000ea720: 7065 7261 746f 723d 283c 7370 616e 2063 perator=(c │ │ │ │ +000ea740: 6f6e 7374 3c2f 7370 616e 3e20 7369 6d70 onst simp │ │ │ │ +000ea750: 6c65 5f76 6563 746f 7226 616d 703b 2076 le_vector& v │ │ │ │ +000ea760: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
.
{ │ │ │ │ +000ea780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
h │ │ │ │ +000ea7a0: 6561 6420 3d20 7461 696c 203d 204e 554c ead = tail = NUL │ │ │ │ +000ea7b0: 4c3b 203c 2f64 6976 3e0a 3c64 6976 2063 L;
.
│ │ │ │ +000ea7d0: 2020 6361 7061 6369 7479 203d 2076 2e63 capacity = v.c │ │ │ │ +000ea7e0: 6170 6163 6974 793b 203c 2f64 6976 3e0a apacity;
. │ │ │ │ +000ea7f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
if (v.h │ │ │ │ +000ea830: 6561 6429 203c 2f64 6976 3e0a 3c64 6976 ead)
.
│ │ │ │ +000ea850: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
.
│ │ │ │ +000ea870: 2020 2020 2020 6865 6164 203d 2074 6169 head = tai │ │ │ │ +000ea880: 6c20 3d20 3c73 7061 6e20 636c 6173 733d l = new value_type[ │ │ │ │ +000ea8b0: 6361 7061 6369 7479 5d3b 203c 2f64 6976 capacity];
.
iter │ │ │ │ +000ea8e0: 6174 6f72 2069 203d 2076 2e68 6561 643b ator i = v.head; │ │ │ │ +000ea8f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
│ │ │ │ +000ea910: 2020 3c73 7061 6e20 636c 6173 733d 226b whil │ │ │ │ +000ea930: 653c 2f73 7061 6e3e 2028 6920 213d 2076 e (i != v │ │ │ │ +000ea940: 2e74 6169 6c29 203c 2f64 6976 3e0a 3c64 .tail)
. │ │ │ │ +000ea960: 2020 2020 2020 2020 2020 2a74 6169 6c2b *tail+ │ │ │ │ +000ea970: 2b20 3d20 2a69 2b2b 3b20 3c2f 6469 763e + = *i++;
│ │ │ │ +000ea980: 0a3c 6469 7620 636c 6173 733d 226c 696e .
}
.
return *this;
. │ │ │ │ +000eaa20: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
.
}; │ │ │ │ +000eaa40: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
.

To enable the c │ │ │ │ +000eaa70: 6f6e 7461 696e 6572 2c20 7765 2061 6464 ontainer, we add │ │ │ │ +000eaa80: 2074 6865 2066 6f6c 6c6f 7769 6e67 2074 the following t │ │ │ │ +000eaa90: 776f 206c 696e 6573 2074 6f20 7468 6520 wo lines to the │ │ │ │ +000eaaa0: 696e 7465 7266 6163 6520 6865 6164 6572 interface header │ │ │ │ +000eaab0: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp │ │ │ │ +000eaac0: 7032 3a3c 2f70 3e0a 3c64 6976 2063 6c61 p2:

.
│ │ │ │ +000eaaf0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ +000eab10: 7564 6520 2671 756f 743b 7369 6d70 6c65 ude "simple │ │ │ │ +000eab20: 5665 6374 6f72 2e68 2671 756f 743b 3c2f Vector.h"
.< │ │ │ │ +000eab50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000eab60: 6f72 6422 3e74 656d 706c 6174 653c 2f73 ord">template
<c │ │ │ │ +000eab90: 6c61 7373 3c2f 7370 616e 3e20 5426 6774 lass T> │ │ │ │ +000eaba0: 3b20 3c73 7061 6e20 636c 6173 733d 226b ; class simpleVecto │ │ │ │ +000eabd0: 723b 3c2f 6469 763e 0a3c 2f64 6976 3e3c r;
.
< │ │ │ │ +000eabe0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +000eabf0: 3c70 3e54 6865 2063 6f6e 7461 696e 6572

The container │ │ │ │ +000eac00: 2063 6c61 7373 2069 7473 656c 6620 7368 class itself sh │ │ │ │ +000eac10: 6f75 6c64 206e 6f74 2062 6520 6465 6669 ould not be defi │ │ │ │ +000eac20: 6e65 6420 696e 2074 6865 2069 6e74 6572 ned in the inter │ │ │ │ +000eac30: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ +000eac40: 2c20 6f6e 6c79 2074 6865 2074 656d 706c , only the templ │ │ │ │ +000eac50: 6174 6520 6465 636c 6172 6174 696f 6e20 ate declaration │ │ │ │ +000eac60: 7375 6666 6963 6573 2066 6f72 2073 6f61 suffices for soa │ │ │ │ +000eac70: 7063 7070 3220 746f 2067 656e 6572 6174 pcpp2 to generat │ │ │ │ +000eac80: 6520 7365 7269 616c 697a 6572 732e 2052 e serializers. R │ │ │ │ +000eac90: 6563 616c 6c20 7468 6174 2074 6865 203c ecall that the < │ │ │ │ +000eaca0: 636f 6465 3e23 696e 636c 7564 653c 2f63 code>#include directives │ │ │ │ +000eacc0: 6172 6520 6e6f 7420 6578 6563 7574 6564 are not executed │ │ │ │ +000eacd0: 2062 7920 736f 6170 6370 7032 2062 7574 by soapcpp2 but │ │ │ │ +000eace0: 2073 696d 706c 7920 7061 7373 6564 206f simply passed o │ │ │ │ +000eacf0: 6e20 746f 2074 6865 2067 656e 6572 6174 n to the generat │ │ │ │ +000ead00: 6564 2073 6f75 7263 6520 636f 6465 2e20 ed source code. │ │ │ │ +000ead10: 5468 6973 2069 6e63 6c75 6465 2073 7065 This include spe │ │ │ │ +000ead20: 6369 6669 6573 2069 6e20 7468 6520 6765 cifies in the ge │ │ │ │ +000ead30: 6e65 7261 7465 6420 736f 7572 6365 2063 nerated source c │ │ │ │ +000ead40: 6f64 6520 7768 6572 6520 7468 6520 636f ode where the co │ │ │ │ +000ead50: 6e74 6169 6e65 7220 6973 2061 6374 7561 ntainer is actua │ │ │ │ +000ead60: 6c6c 7920 6465 6669 6e65 642e 3c2f 703e lly defined.

│ │ │ │ +000ead70: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

.... Back to tab │ │ │ │ +000ead90: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

.

.Polymor │ │ │ │ +000eade0: 7068 6963 2064 796e 616d 6963 2061 7272 phic dynamic arr │ │ │ │ +000eadf0: 6179 7320 616e 6420 6c69 7374 733c 2f68 ays and lists.

Polymorphi │ │ │ │ +000eae10: 6320 6172 7261 7973 2c20 7468 6174 2069 c arrays, that i │ │ │ │ +000eae20: 732c 2061 7272 6179 7320 6f66 2076 616c s, arrays of val │ │ │ │ +000eae30: 7565 7320 6f66 2061 6e79 2074 7970 652c ues of any type, │ │ │ │ +000eae40: 2063 616e 2062 6520 7365 7269 616c 697a can be serializ │ │ │ │ +000eae50: 6564 2069 6e20 584d 4c20 7768 656e 2064 ed in XML when d │ │ │ │ +000eae60: 6563 6c61 7265 6420 6173 2061 6e20 6172 eclared as an ar │ │ │ │ +000eae70: 7261 7920 6f66 2070 6f69 6e74 6572 7320 ray of pointers │ │ │ │ +000eae80: 746f 2061 2062 6173 6520 636c 6173 732e to a base class. │ │ │ │ +000eae90: 2046 6f72 2065 7861 6d70 6c65 3a3c 2f70 For example:

.
│ │ │ │ +000eaee0: 636c 6173 7320 3c2f 7370 616e 3e6e 735f class ns_ │ │ │ │ +000eaef0: 5f4f 626a 6563 7420 3c2f 6469 763e 0a3c _Object
.< │ │ │ │ +000eaf00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000eaf10: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public< │ │ │ │ +000eaf30: 2f73 7061 6e3e 3a20 3c2f 6469 763e 0a3c /span>:
.< │ │ │ │ +000eaf40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000eaf50: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... / │ │ │ │ +000eaf70: 2f20 6d65 6d62 6572 7320 6f66 206e 735f / members of ns_ │ │ │ │ +000eaf80: 5f4f 626a 6563 743c 2f73 7061 6e3e 3c2f _Object.
};
│ │ │ │ +000eafb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
class < │ │ │ │ +000eafe0: 2f73 7061 6e3e 6e73 5f5f 4461 7461 203a /span>ns__Data : │ │ │ │ +000eaff0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public ns__Object │ │ │ │ +000eb020: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{ public: │ │ │ │ +000eb060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
... │ │ │ │ +000eb080: 203c 7370 616e 2063 6c61 7373 3d22 636f // member │ │ │ │ +000eb0a0: 7320 6f66 206e 735f 5f44 6174 613c 2f73 s of ns__Data
.
}; │ │ │ │ +000eb0d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
c │ │ │ │ +000eb100: 6c61 7373 203c 2f73 7061 6e3e 4172 7261 lass Arra │ │ │ │ +000eb110: 794f 664f 626a 6563 7420 3c2f 6469 763e yOfObject
│ │ │ │ +000eb120: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ publi │ │ │ │ +000eb150: 633c 2f73 7061 6e3e 3a20 3c2f 6469 763e c:
│ │ │ │ +000eb160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
ns__Objec │ │ │ │ +000eb180: 7420 2a2a 5f5f 7074 723b 203c 7370 616e t **__ptr; // pointer to a │ │ │ │ +000eb1b0: 7272 6179 206f 6620 706f 696e 7465 7273 rray of pointers │ │ │ │ +000eb1c0: 2074 6f20 6261 7365 206f 7220 6465 7269 to base or deri │ │ │ │ +000eb1d0: 7665 6420 6f62 6a65 6374 7320 3c2f 7370 ved objects
.
│ │ │ │ +000eb200: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __size; │ │ │ │ +000eb230: 2020 2020 203c 7370 616e 2063 6c61 7373 // si │ │ │ │ +000eb250: 7a65 206f 6620 7468 6520 6172 7261 793c ze of the array< │ │ │ │ +000eb260: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.} │ │ │ │ +000eb280: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;

.
class ns │ │ │ │ +000eb2c0: 5f5f 4f62 6a65 6374 7320 3c2f 6469 763e __Objects
│ │ │ │ +000eb2d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{ publi │ │ │ │ +000eb300: 633c 2f73 7061 6e3e 3a20 3c2f 6469 763e c:
│ │ │ │ +000eb310: 0a3c 6469 7620 636c 6173 733d 226c 696e .
std::vect │ │ │ │ +000eb330: 6f72 266c 743b 6e73 5f5f 4f62 6a65 6374 or<ns__Object │ │ │ │ +000eb340: 2667 743b 206f 626a 6563 7473 3b20 3c73 > objects; // vector of │ │ │ │ +000eb370: 2062 6173 6520 6f72 2064 6572 6976 6564 base or derived │ │ │ │ +000eb380: 206f 626a 6563 7473 203c 2f73 7061 6e3e objects │ │ │ │ +000eb390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};
.

The │ │ │ │ +000eb3d0: 706f 696e 7465 7273 2069 6e20 7468 6520 pointers in the │ │ │ │ +000eb3e0: 6172 7261 7920 6361 6e20 706f 696e 7420 array can point │ │ │ │ +000eb3f0: 746f 2074 6865 203c 636f 6465 3e6e 735f to the ns_ │ │ │ │ +000eb400: 5f4f 626a 6563 743c 2f63 6f64 653e 2062 _Object b │ │ │ │ +000eb410: 6173 6520 696e 7374 616e 6365 7320 6f72 ase instances or │ │ │ │ +000eb420: 203c 636f 6465 3e6e 735f 5f44 6174 613c ns__Data< │ │ │ │ +000eb430: 2f63 6f64 653e 2064 6572 6976 6564 2069 /code> derived i │ │ │ │ +000eb440: 6e73 7461 6e63 6573 2c20 7768 6963 6820 nstances, which │ │ │ │ +000eb450: 7769 6c6c 2062 6520 7365 7269 616c 697a will be serializ │ │ │ │ +000eb460: 6564 2061 6363 6f72 6469 6e67 6c79 2069 ed accordingly i │ │ │ │ +000eb470: 6e20 584d 4c2e 2044 6572 6976 6564 2069 n XML. Derived i │ │ │ │ +000eb480: 6e73 7461 6e63 6573 2061 7265 2069 6e64 nstances are ind │ │ │ │ +000eb490: 6963 6174 6564 2062 7920 3c65 6d3e 3c63 icated by xsi:type attribu │ │ │ │ +000eb4c0: 7465 2069 6e20 584d 4c20 7769 7468 2074 te in XML with t │ │ │ │ +000eb4d0: 6865 2071 7561 6c69 6669 6564 206e 616d he qualified nam │ │ │ │ +000eb4e0: 6520 6f66 2074 6865 2063 6c61 7373 2c20 e of the class, │ │ │ │ +000eb4f0: 746f 2064 6973 7469 6e67 7569 7368 2064 to distinguish d │ │ │ │ +000eb500: 6572 6976 6564 2069 6e73 7461 6e63 6573 erived instances │ │ │ │ +000eb510: 2066 726f 6d20 7468 6520 6261 7365 2069 from the base i │ │ │ │ +000eb520: 6e73 7461 6e63 6573 2e20 5769 7468 6f75 nstances. Withou │ │ │ │ +000eb530: 7420 7468 6973 2061 7474 7269 6275 7465 t this attribute │ │ │ │ +000eb540: 2074 6865 2064 6573 6572 6961 6c69 7a65 the deserialize │ │ │ │ +000eb550: 7220 7769 6c6c 206e 6f74 2069 6e73 7461 r will not insta │ │ │ │ +000eb560: 6e74 6961 7465 2074 6865 2064 6572 6976 ntiate the deriv │ │ │ │ +000eb570: 6564 2069 6e73 7461 6e63 6520 6275 7420 ed instance but │ │ │ │ +000eb580: 6120 6261 7365 2069 6e73 7461 6e63 6520 a base instance │ │ │ │ +000eb590: 7369 6e63 6520 7468 6572 6520 6973 206e since there is n │ │ │ │ +000eb5a0: 6f20 6964 656e 7469 6679 696e 6720 696e o identifying in │ │ │ │ +000eb5b0: 666f 726d 6174 696f 6e20 746f 2064 6973 formation to dis │ │ │ │ +000eb5c0: 7469 6e67 7569 7368 2074 6865 2058 4d4c tinguish the XML │ │ │ │ +000eb5d0: 2066 6f72 6d73 2065 7863 6570 7420 666f forms except fo │ │ │ │ +000eb5e0: 7220 7468 6520 3c65 6d3e 3c63 6f64 653e r the │ │ │ │ +000eb5f0: 7873 693a 7479 7065 3c2f 636f 6465 3e3c xsi:type< │ │ │ │ +000eb600: 2f65 6d3e 2061 7474 7269 6275 7465 2e3c /em> attribute.< │ │ │ │ +000eb610: 2f70 3e0a 3c70 3e53 696e 6365 2077 6520 /p>.

Since we │ │ │ │ +000eb620: 6361 6e6e 6f74 2075 7365 2064 796e 616d cannot use dynam │ │ │ │ +000eb630: 6963 2062 696e 6469 6e67 2074 6f20 7375 ic binding to su │ │ │ │ +000eb640: 7070 6f72 7420 706f 6c79 6d6f 7270 6869 pport polymorphi │ │ │ │ +000eb650: 736d 2069 6e20 432c 2061 6e6f 7468 6572 sm in C, another │ │ │ │ +000eb660: 206d 6563 6861 6e69 736d 2077 6520 6361 mechanism we ca │ │ │ │ +000eb670: 6e20 7573 6520 6973 2076 6f69 6420 706f n use is void po │ │ │ │ +000eb680: 696e 7465 7273 202e 2048 6572 6520 6973 inters . Here is │ │ │ │ +000eb690: 2061 6e20 6578 616d 706c 6520 6f66 2061 an example of a │ │ │ │ +000eb6a0: 2070 6f6c 796d 6f72 7068 6963 2053 4f41 polymorphic SOA │ │ │ │ +000eb6b0: 502d 656e 636f 6465 6420 6172 7261 7920 P-encoded array │ │ │ │ +000eb6c0: 3c63 6f64 653e 4172 7261 794f 664f 626a ArrayOfObj │ │ │ │ +000eb6d0: 6563 743c 2f63 6f64 653e 2061 6e64 2061 ect and a │ │ │ │ +000eb6e0: 206e 6f6e 2d53 4f41 5020 6479 6e61 6d69 non-SOAP dynami │ │ │ │ +000eb6f0: 6320 6172 7261 7920 3c63 6f64 653e 6e73 c array ns │ │ │ │ +000eb700: 5f5f 4f62 6a65 6374 733c 2f63 6f64 653e __Objects │ │ │ │ +000eb710: 2074 6861 7420 686f 6c64 2076 616c 7565 that hold value │ │ │ │ +000eb720: 7320 6f66 2061 6e79 2073 6572 6961 6c69 s of any seriali │ │ │ │ +000eb730: 7a61 626c 6520 7479 7065 3a3c 2f70 3e0a zable type:

. │ │ │ │ +000eb740: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st │ │ │ │ +000eb780: 7275 6374 203c 2f73 7061 6e3e 5f5f 7772 ruct __wr │ │ │ │ +000eb790: 6170 7065 7220 3c2f 6469 763e 0a3c 6469 apper
.{ │ │ │ │ 000eb7b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
│ │ │ │ -000eb7d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int __ty │ │ │ │ -000eb810: 7065 3b20 2020 3c73 7061 6e20 636c 6173 pe; // i │ │ │ │ -000eb830: 6465 6e74 6966 7920 7468 6520 7479 7065 dentify the type │ │ │ │ -000eb840: 2062 656c 6f77 2062 7920 534f 4150 5f54 below by SOAP_T │ │ │ │ -000eb850: 5950 455f 5420 3c2f 7370 616e 3e3c 2f64 YPE_T .
void │ │ │ │ -000eb8a0: 2a5f 5f69 7465 6d3b 203c 7370 616e 2063 *__item; / │ │ │ │ -000eb8c0: 2f20 706f 696e 7465 7220 746f 2064 6174 / pointer to dat │ │ │ │ -000eb8d0: 6120 6f66 2074 7970 6520 5420 3c2f 7370 a of type T
.
}; < │ │ │ │ -000eb900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
st │ │ │ │ -000eb930: 7275 6374 203c 2f73 7061 6e3e 4172 7261 ruct Arra │ │ │ │ -000eb940: 794f 664f 626a 6563 7420 3c2f 6469 763e yOfObject
│ │ │ │ +000eb7c0: 733d 226c 696e 6522 3e20 2020 203c 7370 s="line"> int __type; // identify th │ │ │ │ +000eb820: 6520 7479 7065 2062 656c 6f77 2062 7920 e type below by │ │ │ │ +000eb830: 534f 4150 5f54 5950 455f 5420 3c2f 7370 SOAP_TYPE_T
.
│ │ │ │ +000eb860: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *__item; < │ │ │ │ +000eb890: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000eb8a0: 656e 7422 3e2f 2f20 706f 696e 7465 7220 ent">// pointer │ │ │ │ +000eb8b0: 746f 2064 6174 6120 6f66 2074 7970 6520 to data of type │ │ │ │ +000eb8c0: 5420 3c2f 7370 616e 3e3c 2f64 6976 3e0a T
. │ │ │ │ +000eb8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.
struct ArrayOfObject │ │ │ │ +000eb930: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
{
│ │ │ │ 000eb950: 0a3c 6469 7620 636c 6173 733d 226c 696e .
{
.
│ │ │ │ -000eb980: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct __wrapper * │ │ │ │ -000eb9b0: 5f5f 7074 723b 203c 7370 616e 2063 6c61 __ptr; // │ │ │ │ -000eb9d0: 706f 696e 7465 7220 746f 2061 7272 6179 pointer to array │ │ │ │ -000eb9e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
. │ │ │ │ -000eba00: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -000eba20: 743c 2f73 7061 6e3e 205f 5f73 697a 653b t __size; │ │ │ │ -000eba30: 2020 2020 2020 2020 2020 2020 2020 3c73 // size of t │ │ │ │ -000eba60: 6865 2061 7272 6179 3c2f 7370 616e 3e3c he array< │ │ │ │ -000eba70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
.
struct │ │ │ │ -000ebac0: 203c 2f73 7061 6e3e 6e73 5f5f 4f62 6a65 ns__Obje │ │ │ │ -000ebad0: 6374 7320 3c2f 6469 763e 0a3c 6469 7620 cts
.
{.
int │ │ │ │ -000ebb30: 5f5f 7369 7a65 3b20 2020 2020 2020 2020 __size; │ │ │ │ -000ebb40: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -000ebb60: 7369 7a65 206f 6620 7468 6520 6172 7261 size of the arra │ │ │ │ -000ebb70: 793c 2f73 7061 6e3e 3c2f 6469 763e 0a3c y
.< │ │ │ │ -000ebb80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000ebb90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc │ │ │ │ -000ebbb0: 7420 3c2f 7370 616e 3e5f 5f77 7261 7070 t __wrapp │ │ │ │ -000ebbc0: 6572 202a 6f62 6a65 6374 733b 203c 7370 er *objects; // pointer to │ │ │ │ -000ebbf0: 2061 7272 6179 3c2f 7370 616e 3e3c 2f64 array.
};
.< │ │ │ │ -000ebc20: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

This ex │ │ │ │ -000ebc40: 616d 706c 6520 7573 6573 2061 6e20 2269 ample uses an "i │ │ │ │ -000ebc50: 6e76 6973 6962 6c65 2220 7479 7065 203c nvisible" type < │ │ │ │ -000ebc60: 636f 6465 3e5f 5f77 7261 7070 6572 3c2f code>__wrapper and member │ │ │ │ -000ebc80: 203c 636f 6465 3e5f 5f61 7272 6179 3c2f __array, which sta │ │ │ │ -000ebca0: 7274 2077 6974 6820 6120 646f 7562 6c65 rt with a double │ │ │ │ -000ebcb0: 2075 6e64 6572 7363 6f72 652e 2054 6865 underscore. The │ │ │ │ -000ebcc0: 7365 206e 616d 6573 2061 7265 206e 6576 se names are nev │ │ │ │ -000ebcd0: 6572 2076 6973 6962 6c65 2069 6e20 7365 er visible in se │ │ │ │ -000ebce0: 7269 616c 697a 6564 2058 4d4c 2e20 5468 rialized XML. Th │ │ │ │ -000ebcf0: 6520 3c63 6f64 653e 5f5f 7479 7065 3c2f e __type member of │ │ │ │ -000ebd10: 3c63 6f64 653e 5f5f 7772 6170 7065 723c __wrapper< │ │ │ │ -000ebd20: 2f63 6f64 653e 2069 7320 6120 3c63 6f64 /code> is a SOAP_TYPE_T value that │ │ │ │ -000ebd50: 6964 656e 7469 6669 6573 2074 6865 2074 identifies the t │ │ │ │ -000ebd60: 7970 6520 3c63 6f64 653e 543c 2f63 6f64 ype T that __ │ │ │ │ -000ebd80: 6974 656d 3c2f 636f 6465 3e20 706f 696e item poin │ │ │ │ -000ebd90: 7473 2074 6f2c 2073 6565 2053 6563 7469 ts to, see Secti │ │ │ │ -000ebda0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Void poi │ │ │ │ -000ebdd0: 6e74 6572 2073 6572 6961 6c69 7a61 7469 nter serializati │ │ │ │ -000ebde0: 6f6e 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 on.

.

. │ │ │ │ -000ebdf0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -000ebe00: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -000ebe10: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

.

.How │ │ │ │ -000ebe50: 2074 6f20 6368 616e 6765 2074 6865 2074 to change the t │ │ │ │ -000ebe60: 6167 206e 616d 6573 206f 6620 6172 7261 ag names of arra │ │ │ │ -000ebe70: 7920 6974 656d 2065 6c65 6d65 6e74 733c y item elements< │ │ │ │ -000ebe80: 2f68 333e 0a3c 703e 5468 6520 6465 6661 /h3>.

The defa │ │ │ │ -000ebe90: 756c 7420 584d 4c20 656c 656d 656e 7420 ult XML element │ │ │ │ -000ebea0: 7461 6720 6e61 6d65 2066 6f72 2061 7272 tag name for arr │ │ │ │ -000ebeb0: 6179 2065 6c65 6d65 6e74 7320 6973 203c ay elements is < │ │ │ │ -000ebec0: 656d 3e3c 636f 6465 3e69 7465 6d3c 2f63 em>item, which │ │ │ │ -000ebee0: 2063 616e 2062 6520 6368 616e 6765 642e can be changed. │ │ │ │ -000ebef0: 2054 6865 203c 636f 6465 3e5f 5f70 7472 The __ptr │ │ │ │ -000ebf00: 3c2f 636f 6465 3e20 6d65 6d62 6572 2069 member i │ │ │ │ -000ebf10: 6e20 6120 7374 7275 6374 206f 7220 636c n a struct or cl │ │ │ │ -000ebf20: 6173 7320 6f66 2061 2064 796e 616d 6963 ass of a dynamic │ │ │ │ -000ebf30: 2061 7272 6179 206d 6179 2068 6176 6520 array may have │ │ │ │ -000ebf40: 616e 206f 7074 696f 6e61 6c20 7375 6666 an optional suff │ │ │ │ -000ebf50: 6978 2070 6172 7420 7468 6174 2073 7065 ix part that spe │ │ │ │ -000ebf60: 6369 6669 6573 2074 6865 206e 616d 6520 cifies the name │ │ │ │ -000ebf70: 6f66 2074 6865 2065 6c65 6d65 6e74 2074 of the element t │ │ │ │ -000ebf80: 6167 2069 6e20 584d 4c2e 2054 6861 7420 ag in XML. That │ │ │ │ -000ebf90: 6973 2c20 7468 6520 7375 6666 6978 2069 is, the suffix i │ │ │ │ -000ebfa0: 7320 7061 7274 206f 6620 7468 6520 3c63 s part of the __ptr │ │ │ │ -000ebfc0: 206d 656d 6265 7220 6e61 6d65 3a3c 2f70 member name:

.
Type * │ │ │ │ -000ec000: 5f5f 7074 7261 7272 6179 5f65 6c74 5f6e __ptrarray_elt_n │ │ │ │ -000ec010: 616d 653c 2f64 6976 3e0a 3c2f 6469 763e ame
.
│ │ │ │ -000ec020: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

T │ │ │ │ +000ebc20: 6869 7320 6578 616d 706c 6520 7573 6573 his example uses │ │ │ │ +000ebc30: 2061 6e20 2269 6e76 6973 6962 6c65 2220 an "invisible" │ │ │ │ +000ebc40: 7479 7065 203c 636f 6465 3e5f 5f77 7261 type __wra │ │ │ │ +000ebc50: 7070 6572 3c2f 636f 6465 3e20 616e 6420 pper and │ │ │ │ +000ebc60: 6d65 6d62 6572 203c 636f 6465 3e5f 5f61 member __a │ │ │ │ +000ebc70: 7272 6179 3c2f 636f 6465 3e2c 2077 6869 rray, whi │ │ │ │ +000ebc80: 6368 2073 7461 7274 2077 6974 6820 6120 ch start with a │ │ │ │ +000ebc90: 646f 7562 6c65 2075 6e64 6572 7363 6f72 double underscor │ │ │ │ +000ebca0: 652e 2054 6865 7365 206e 616d 6573 2061 e. These names a │ │ │ │ +000ebcb0: 7265 206e 6576 6572 2076 6973 6962 6c65 re never visible │ │ │ │ +000ebcc0: 2069 6e20 7365 7269 616c 697a 6564 2058 in serialized X │ │ │ │ +000ebcd0: 4d4c 2e20 5468 6520 3c63 6f64 653e 5f5f ML. The __ │ │ │ │ +000ebce0: 7479 7065 3c2f 636f 6465 3e20 6d65 6d62 type memb │ │ │ │ +000ebcf0: 6572 206f 6620 3c63 6f64 653e 5f5f 7772 er of __wr │ │ │ │ +000ebd00: 6170 7065 723c 2f63 6f64 653e 2069 7320 apper is │ │ │ │ +000ebd10: 6120 3c63 6f64 653e 534f 4150 5f54 5950 a SOAP_TYP │ │ │ │ +000ebd20: 455f 543c 2f63 6f64 653e 2076 616c 7565 E_T value │ │ │ │ +000ebd30: 2074 6861 7420 6964 656e 7469 6669 6573 that identifies │ │ │ │ +000ebd40: 2074 6865 2074 7970 6520 3c63 6f64 653e the type │ │ │ │ +000ebd50: 543c 2f63 6f64 653e 2074 6861 7420 3c63 T that __item points to, see │ │ │ │ +000ebd80: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Vo │ │ │ │ +000ebdb0: 6964 2070 6f69 6e74 6572 2073 6572 6961 id pointer seria │ │ │ │ +000ebdc0: 6c69 7a61 7469 6f6e 3c2f 613e 2e3c 2f70 lization.

.

.... Back to ta │ │ │ │ +000ebdf0: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +000ebe00: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

.

.How to change │ │ │ │ +000ebe40: 2074 6865 2074 6167 206e 616d 6573 206f the tag names o │ │ │ │ +000ebe50: 6620 6172 7261 7920 6974 656d 2065 6c65 f array item ele │ │ │ │ +000ebe60: 6d65 6e74 733c 2f68 333e 0a3c 703e 5468 ments

.

Th │ │ │ │ +000ebe70: 6520 6465 6661 756c 7420 584d 4c20 656c e default XML el │ │ │ │ +000ebe80: 656d 656e 7420 7461 6720 6e61 6d65 2066 ement tag name f │ │ │ │ +000ebe90: 6f72 2061 7272 6179 2065 6c65 6d65 6e74 or array element │ │ │ │ +000ebea0: 7320 6973 203c 656d 3e3c 636f 6465 3e69 s is i │ │ │ │ +000ebeb0: 7465 6d3c 2f63 6f64 653e 3c2f 656d 3e2c tem, │ │ │ │ +000ebec0: 2077 6869 6368 2063 616e 2062 6520 6368 which can be ch │ │ │ │ +000ebed0: 616e 6765 642e 2054 6865 203c 636f 6465 anged. The __ptr me │ │ │ │ +000ebef0: 6d62 6572 2069 6e20 6120 7374 7275 6374 mber in a struct │ │ │ │ +000ebf00: 206f 7220 636c 6173 7320 6f66 2061 2064 or class of a d │ │ │ │ +000ebf10: 796e 616d 6963 2061 7272 6179 206d 6179 ynamic array may │ │ │ │ +000ebf20: 2068 6176 6520 616e 206f 7074 696f 6e61 have an optiona │ │ │ │ +000ebf30: 6c20 7375 6666 6978 2070 6172 7420 7468 l suffix part th │ │ │ │ +000ebf40: 6174 2073 7065 6369 6669 6573 2074 6865 at specifies the │ │ │ │ +000ebf50: 206e 616d 6520 6f66 2074 6865 2065 6c65 name of the ele │ │ │ │ +000ebf60: 6d65 6e74 2074 6167 2069 6e20 584d 4c2e ment tag in XML. │ │ │ │ +000ebf70: 2054 6861 7420 6973 2c20 7468 6520 7375 That is, the su │ │ │ │ +000ebf80: 6666 6978 2069 7320 7061 7274 206f 6620 ffix is part of │ │ │ │ +000ebf90: 7468 6520 3c63 6f64 653e 5f5f 7074 723c the __ptr< │ │ │ │ +000ebfa0: 2f63 6f64 653e 206d 656d 6265 7220 6e61 /code> member na │ │ │ │ +000ebfb0: 6d65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 me:

.
│ │ │ │ +000ebfe0: 5479 7065 202a 5f5f 7074 7261 7272 6179 Type *__ptrarray │ │ │ │ +000ebff0: 5f65 6c74 5f6e 616d 653c 2f64 6976 3e0a _elt_name
. │ │ │ │ +000ec000: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

Consid │ │ │ │ +000ec020: 6572 2066 6f72 2065 7861 6d70 6c65 3a3c er for example:< │ │ │ │ +000ec030: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

.
< │ │ │ │ -000ec0e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000ec0f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char* *__ptrstri │ │ │ │ -000ec110: 6e67 3b3c 2f64 6976 3e0a 3c64 6976 2063 ng;
.
│ │ │ │ -000ec130: 3c73 7061 6e20 636c 6173 733d 226b 6579 int __size;.
};
.

The arra │ │ │ │ -000ec1a0: 7920 6973 2073 6572 6961 6c69 7a65 6420 y is serialized │ │ │ │ -000ec1b0: 6173 3a3c 2f70 3e0a 3c64 6976 2063 6c61 as:

.
│ │ │ │ -000ec1e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
< │ │ │ │ -000ec210: 534f 4150 2d45 4e43 3a41 7272 6179 3c2f SOAP-ENC:Array SOAP │ │ │ │ -000ec240: 2d45 4e43 3a61 7272 6179 5479 7065 3c2f -ENC:arrayType="xsd:stri │ │ │ │ -000ec280: 6e67 5b32 5d26 7175 6f74 3b3c 2f73 7061 ng[2]">
. │ │ │ │ -000ec2b0: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ -000ec2d0: 7374 7269 6e67 3c2f 7370 616e 3e26 6774 string> │ │ │ │ -000ec2e0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;Hello</string& │ │ │ │ -000ec330: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
.
& │ │ │ │ -000ec350: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;str │ │ │ │ -000ec370: 696e 673c 2f73 7061 6e3e 2667 743b 3c73 ing>World │ │ │ │ -000ec3a0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </s │ │ │ │ -000ec3c0: 7472 696e 673c 2f73 7061 6e3e 2667 743b tring> │ │ │ │ -000ec3d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
.
</< │ │ │ │ -000ec3f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000ec400: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype">SOAP-EN │ │ │ │ -000ec410: 433a 4172 7261 793c 2f73 7061 6e3e 2667 C:Array&g │ │ │ │ -000ec420: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
.
< │ │ │ │ -000ec430: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -000ec440: 203c 2f64 6976 3e3c 703e 534f 4150 2031

SOAP 1 │ │ │ │ -000ec450: 2e31 2f31 2e32 2064 6f65 7320 6e6f 7420 .1/1.2 does not │ │ │ │ -000ec460: 6d61 6e64 6174 6520 6120 7370 6563 6966 mandate a specif │ │ │ │ -000ec470: 6963 2074 6167 206e 616d 6520 666f 7220 ic tag name for │ │ │ │ -000ec480: 534f 4150 2d65 6e63 6f64 6564 2061 7272 SOAP-encoded arr │ │ │ │ -000ec490: 6179 2065 6c65 6d65 6e74 7320 616e 6420 ay elements and │ │ │ │ -000ec4a0: 7468 6520 736f 6170 6370 7032 2d67 656e the soapcpp2-gen │ │ │ │ -000ec4b0: 6572 6174 6564 2073 6572 6961 6c69 7a65 erated serialize │ │ │ │ -000ec4c0: 7273 2077 696c 6c20 6967 6e6f 7265 2074 rs will ignore t │ │ │ │ -000ec4d0: 6865 206e 616d 6520 7573 6564 2074 6f20 he name used to │ │ │ │ -000ec4e0: 6974 656d 697a 6520 534f 4150 2d65 6e63 itemize SOAP-enc │ │ │ │ -000ec4f0: 6f64 6564 2061 7272 6179 2076 616c 7565 oded array value │ │ │ │ -000ec500: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

.

.... < │ │ │ │ -000ec510: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -000ec520: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -000ec530: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

.

.base64 │ │ │ │ -000ec570: 4269 6e61 7279 2073 6572 6961 6c69 7a61 Binary serializa │ │ │ │ -000ec580: 7469 6f6e 3c2f 6832 3e0a 3c70 3e54 6865 tion

.

The │ │ │ │ -000ec590: 203c 656d 3e3c 636f 6465 3e62 6173 6536 base6 │ │ │ │ -000ec5a0: 3442 696e 6172 793c 2f63 6f64 653e 3c2f 4Binary XSD type is │ │ │ │ -000ec5c0: 696e 7472 6f64 7563 6564 2069 6e20 616e introduced in an │ │ │ │ -000ec5d0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ -000ec5e0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc │ │ │ │ -000ec5f0: 7070 3220 7573 696e 6720 6120 7374 7275 pp2 using a stru │ │ │ │ -000ec600: 6374 206f 7220 636c 6173 7320 7468 6174 ct or class that │ │ │ │ -000ec610: 2063 6f6e 7461 696e 7320 616e 2061 7272 contains an arr │ │ │ │ -000ec620: 6179 206f 6620 3c63 6f64 653e 756e 7369 ay of unsi │ │ │ │ -000ec630: 676e 6564 2063 6861 723c 2f63 6f64 653e gned char │ │ │ │ -000ec640: 2076 616c 7565 733a 3c2f 703e 0a3c 6469 values:

..{ │ │ │ │ -000ec700: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
unsigned< │ │ │ │ -000ec740: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *__ptr │ │ │ │ -000ec7d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ -000ec7f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000ec800: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int __s │ │ │ │ -000ec870: 697a 653c 2f61 3e3b 203c 2f64 6976 3e0a ize;
. │ │ │ │ -000ec880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
};
.

Th │ │ │ │ +000ec180: 6520 6172 7261 7920 6973 2073 6572 6961 e array is seria │ │ │ │ +000ec190: 6c69 7a65 6420 6173 3a3c 2f70 3e0a 3c64 lized as:

. │ │ │ │ +000ec1b0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<SOAP-ENC:A │ │ │ │ +000ec200: 7272 6179 3c2f 7370 616e 3e20 3c73 7061 rray SOAP-ENC:array │ │ │ │ +000ec230: 5479 7065 3c2f 7370 616e 3e3d 3c73 7061 Type="xs │ │ │ │ +000ec260: 643a 7374 7269 6e67 5b32 5d26 7175 6f74 d:string[2]" │ │ │ │ +000ec270: 3b3c 2f73 7061 6e3e 2667 743b 203c 2f64 ;> .
<string>Hel │ │ │ │ +000ec2e0: 6c6f 3c2f 7370 616e 3e26 6c74 3b2f 3c73 lo</string>
│ │ │ │ +000ec320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
<string │ │ │ │ +000ec360: 2667 743b 3c73 7061 6e20 636c 6173 733d >World< │ │ │ │ +000ec380: 2f73 7061 6e3e 266c 743b 2f3c 7370 616e /span></string>
. │ │ │ │ +000ec3d0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </S │ │ │ │ +000ec3f0: 4f41 502d 454e 433a 4172 7261 793c 2f73 OAP-ENC:Array
>
.< │ │ │ │ +000ec410: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

│ │ │ │ +000ec430: 534f 4150 2031 2e31 2f31 2e32 2064 6f65 SOAP 1.1/1.2 doe │ │ │ │ +000ec440: 7320 6e6f 7420 6d61 6e64 6174 6520 6120 s not mandate a │ │ │ │ +000ec450: 7370 6563 6966 6963 2074 6167 206e 616d specific tag nam │ │ │ │ +000ec460: 6520 666f 7220 534f 4150 2d65 6e63 6f64 e for SOAP-encod │ │ │ │ +000ec470: 6564 2061 7272 6179 2065 6c65 6d65 6e74 ed array element │ │ │ │ +000ec480: 7320 616e 6420 7468 6520 736f 6170 6370 s and the soapcp │ │ │ │ +000ec490: 7032 2d67 656e 6572 6174 6564 2073 6572 p2-generated ser │ │ │ │ +000ec4a0: 6961 6c69 7a65 7273 2077 696c 6c20 6967 ializers will ig │ │ │ │ +000ec4b0: 6e6f 7265 2074 6865 206e 616d 6520 7573 nore the name us │ │ │ │ +000ec4c0: 6564 2074 6f20 6974 656d 697a 6520 534f ed to itemize SO │ │ │ │ +000ec4d0: 4150 2d65 6e63 6f64 6564 2061 7272 6179 AP-encoded array │ │ │ │ +000ec4e0: 2076 616c 7565 732e 3c2f 703e 0a3c 703e values.

.

│ │ │ │ +000ec4f0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +000ec510: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

. │ │ │ │ +000ec550: 6261 7365 3634 4269 6e61 7279 2073 6572 base64Binary ser │ │ │ │ +000ec560: 6961 6c69 7a61 7469 6f6e 3c2f 6832 3e0a ialization

. │ │ │ │ +000ec570: 3c70 3e54 6865 203c 656d 3e3c 636f 6465

The base64Binary XSD ty │ │ │ │ +000ec5a0: 7065 2069 7320 696e 7472 6f64 7563 6564 pe is introduced │ │ │ │ +000ec5b0: 2069 6e20 616e 2069 6e74 6572 6661 6365 in an interface │ │ │ │ +000ec5c0: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for │ │ │ │ +000ec5d0: 2073 6f61 7063 7070 3220 7573 696e 6720 soapcpp2 using │ │ │ │ +000ec5e0: 6120 7374 7275 6374 206f 7220 636c 6173 a struct or clas │ │ │ │ +000ec5f0: 7320 7468 6174 2063 6f6e 7461 696e 7320 s that contains │ │ │ │ +000ec600: 616e 2061 7272 6179 206f 6620 3c63 6f64 an array of unsigned char< │ │ │ │ +000ec620: 2f63 6f64 653e 2076 616c 7565 733a 3c2f /code> values:.

struct < │ │ │ │ +000ec680: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000ec690: 7265 663d 2273 7472 7563 7478 7364 5f5f ref="structxsd__ │ │ │ │ +000ec6a0: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary. │ │ │ │ +000ec6b0: 6874 6d6c 223e 7873 645f 5f62 6173 6536 html">xsd__base6 │ │ │ │ +000ec6c0: 3442 696e 6172 793c 2f61 3e20 3c2f 6469 4Binary .
{
. │ │ │ │ +000ec700: 2020 203c 7370 616e 2063 6c61 7373 3d22 uns │ │ │ │ +000ec720: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char *__p │ │ │ │ +000ec7b0: 7472 3c2f 613e 3b20 3c2f 6469 763e 0a3c tr;
.< │ │ │ │ +000ec7c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000ec7d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i │ │ │ │ +000ec7f0: 6e74 3c2f 7370 616e 3e20 3c61 2063 6c61 nt __size; < │ │ │ │ +000ec860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
};
│ │ │ │ +000ec880: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

The a │ │ │ │ +000ec8a0: 6476 616e 7461 6765 206f 6620 7468 6973 dvantage of this │ │ │ │ +000ec8b0: 2073 7472 7563 7420 6f72 2063 6c61 7373 struct or class │ │ │ │ +000ec8c0: 2069 7320 7468 6520 6162 696c 6974 7920 is the ability │ │ │ │ +000ec8d0: 746f 2073 6572 6961 6c69 7a65 7220 7261 to serializer ra │ │ │ │ +000ec8e0: 7720 6269 6e61 7279 2064 6174 6120 6672 w binary data fr │ │ │ │ +000ec8f0: 6f6d 206d 656d 6f72 792c 2073 696e 6365 om memory, since │ │ │ │ +000ec900: 2074 6865 2073 6f61 7063 7070 322d 6765 the soapcpp2-ge │ │ │ │ +000ec910: 6e65 7261 7465 6420 7365 7269 616c 697a nerated serializ │ │ │ │ +000ec920: 6572 2063 6f6e 7665 7274 7320 7468 6520 er converts the │ │ │ │ +000ec930: 6269 6e61 7279 2064 6174 6120 746f 2f66 binary data to/f │ │ │ │ +000ec940: 726f 6d20 6261 7365 3634 2069 6e20 584d rom base64 in XM │ │ │ │ +000ec950: 4c2e 3c2f 703e 0a3c 703e 546f 2069 6e74 L.

.

To int │ │ │ │ +000ec960: 726f 6475 6365 2061 206e 6577 2058 4d4c roduce a new XML │ │ │ │ +000ec970: 2073 6368 656d 6120 7479 7065 2064 6572 schema type der │ │ │ │ +000ec980: 6976 6564 2066 726f 6d20 3c65 6d3e 3c63 ived from base64Binary │ │ │ │ +000ec9a0: 3c2f 636f 6465 3e3c 2f65 6d3e 2075 7365 use │ │ │ │ +000ec9b0: 2074 6865 2073 616d 6520 7374 7275 6374 the same struct │ │ │ │ +000ec9c0: 206f 7220 636c 6173 7320 7374 7275 6374 or class struct │ │ │ │ +000ec9d0: 7572 652c 2062 7574 2077 6974 6820 616e ure, but with an │ │ │ │ +000ec9e0: 6f74 6865 7220 6e61 6d65 2e20 466f 7220 other name. For │ │ │ │ +000ec9f0: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

.
struc │ │ │ │ +000eca40: 7420 3c2f 7370 616e 3e6e 735f 5f62 696e t ns__bin │ │ │ │ +000eca50: 6172 793c 2f64 6976 3e0a 3c64 6976 2063 ary
.
{.
{
. │ │ │ │ -000ecaa0: 2020 2020 3c73 7061 6e20 636c 6173 733d un │ │ │ │ -000ecac0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char *__ptr; .
int __ │ │ │ │ -000ecb40: 7369 7a65 3b20 3c2f 6469 763e 0a3c 6469 size;
.} │ │ │ │ -000ecb60: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
< │ │ │ │ -000ecb80: 703e 5468 6520 7265 7375 6c74 696e 6720 p>The resulting │ │ │ │ -000ecb90: 584d 4c20 7363 6865 6d61 2074 7970 6520 XML schema type │ │ │ │ -000ecba0: 6973 3a3c 2f70 3e0a 3c64 6976 2063 6c61 is:

.
│ │ │ │ -000ecbd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
< │ │ │ │ -000ecc00: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType name= │ │ │ │ -000ecc50: 2671 756f 743b 6269 6e61 7279 2671 756f "binary&quo │ │ │ │ -000ecc60: 743b 3c2f 7370 616e 3e26 6774 3b3c 2f64 t;>.
<restrictio │ │ │ │ -000eccb0: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n b │ │ │ │ -000eccd0: 6173 653c 2f73 7061 6e3e 3d3c 7370 616e ase="xsd │ │ │ │ -000ecd00: 3a62 6173 6536 3442 696e 6172 7926 7175 :base64Binary&qu │ │ │ │ -000ecd10: 6f74 3b3c 2f73 7061 6e3e 2667 743b 3c2f ot;>.
</restrict │ │ │ │ -000ecd60: 696f 6e3c 2f73 7061 6e3e 2667 743b 3c2f ion>.
</simpleType │ │ │ │ -000ecdb0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >
.
│ │ │ │ -000ecde0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

.... Back to tabl │ │ │ │ -000ece00: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

.

. │ │ │ │ -000ece40: 6865 7842 696e 6172 7920 7365 7269 616c hexBinary serial │ │ │ │ -000ece50: 697a 6174 696f 6e3c 2f68 323e 0a3c 703e ization

.

│ │ │ │ -000ece60: 5468 6520 3c65 6d3e 3c63 6f64 653e 6261 The ba │ │ │ │ -000ece70: 7365 3634 4269 6e61 7279 3c2f 636f 6465 se64Binary XSD type │ │ │ │ -000ece90: 6973 2069 6e74 726f 6475 6365 6420 696e is introduced in │ │ │ │ -000ecea0: 2061 6e20 696e 7465 7266 6163 6520 6865 an interface he │ │ │ │ -000eceb0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so │ │ │ │ -000ecec0: 6170 6370 7032 2075 7369 6e67 2061 2073 apcpp2 using a s │ │ │ │ -000eced0: 7472 7563 7420 6f72 2063 6c61 7373 2074 truct or class t │ │ │ │ -000ecee0: 6861 7420 636f 6e74 6169 6e73 2061 6e20 hat contains an │ │ │ │ -000ecef0: 6172 7261 7920 6f66 203c 636f 6465 3e75 array of u │ │ │ │ -000ecf00: 6e73 6967 6e65 6420 6368 6172 3c2f 636f nsigned char values:

. │ │ │ │ -000ecf20: 3c64 6976 2063 6c61 7373 3d22 6672 6167
st │ │ │ │ -000ecf60: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct │ │ │ │ -000ecfa0: 7873 645f 5f68 6578 4269 6e61 7279 3c2f xsd__hexBinary
.
{.
unsigned ch │ │ │ │ -000ed030: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *__ptr; .
int __size; │ │ │ │ -000ed140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
};
.

The │ │ │ │ -000ed180: 6164 7661 6e74 6167 6520 6f66 2074 6869 advantage of thi │ │ │ │ -000ed190: 7320 7374 7275 6374 206f 7220 636c 6173 s struct or clas │ │ │ │ -000ed1a0: 7320 6973 2074 6865 2061 6269 6c69 7479 s is the ability │ │ │ │ -000ed1b0: 2074 6f20 7365 7269 616c 697a 6572 2072 to serializer r │ │ │ │ -000ed1c0: 6177 2062 696e 6172 7920 6461 7461 2066 aw binary data f │ │ │ │ -000ed1d0: 726f 6d20 6d65 6d6f 7279 2c20 7369 6e63 rom memory, sinc │ │ │ │ -000ed1e0: 6520 7468 6520 736f 6170 6370 7032 2d67 e the soapcpp2-g │ │ │ │ -000ed1f0: 656e 6572 6174 6564 2073 6572 6961 6c69 enerated seriali │ │ │ │ -000ed200: 7a65 7220 636f 6e76 6572 7473 2074 6865 zer converts the │ │ │ │ -000ed210: 2062 696e 6172 7920 6461 7461 2074 6f2f binary data to/ │ │ │ │ -000ed220: 6672 6f6d 2068 6578 6164 6563 696d 616c from hexadecimal │ │ │ │ -000ed230: 2069 6e20 584d 4c2e 3c2f 703e 0a3c 703e in XML.

.

│ │ │ │ -000ed240: 4966 2061 2062 696e 6172 7920 7479 7065 If a binary type │ │ │ │ -000ed250: 2073 7563 6820 6173 203c 636f 6465 3e3c such as < │ │ │ │ -000ed260: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -000ed270: 663d 2273 7472 7563 7478 7364 5f5f 5f5f f="structxsd____ │ │ │ │ -000ed280: 6261 7365 3634 5f62 696e 6172 792e 6874 base64_binary.ht │ │ │ │ -000ed290: 6d6c 2220 7469 746c 653d 2258 5344 2062 ml" title="XSD b │ │ │ │ -000ed2a0: 6173 6536 3442 696e 6172 7920 7374 7275 ase64Binary stru │ │ │ │ -000ed2b0: 6374 7572 6520 7769 7468 2061 7474 6163 cture with attac │ │ │ │ -000ed2c0: 686d 656e 7420 6461 7461 2e22 3e78 7364 hment data.">xsd │ │ │ │ -000ed2d0: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary is alr │ │ │ │ -000ed2f0: 6561 6479 2064 6566 696e 6564 2c20 7468 eady defined, th │ │ │ │ -000ed300: 656e 2077 6520 6361 6e20 7369 6d70 6c79 en we can simply │ │ │ │ -000ed310: 2075 7365 2061 203c 636f 6465 3e74 7970 use a typ │ │ │ │ -000ed320: 6564 6566 3c2f 636f 6465 3e20 746f 2069 edef to i │ │ │ │ -000ed330: 6e74 726f 6475 6365 2074 6865 2068 6578 ntroduce the hex │ │ │ │ -000ed340: 2076 6172 6961 6e74 3a3c 2f70 3e0a 3c64 variant:

..
{ │ │ │ │ -000ed400: 3c73 7061 6e20 636c 6173 733d 226b 6579 public:
.
│ │ │ │ -000ed440: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi │ │ │ │ -000ed460: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned char *__pt │ │ │ │ -000ed4f0: 723c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 r;
. │ │ │ │ -000ed510: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -000ed530: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t __size; .
};
│ │ │ │ -000ed5c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
typedef │ │ │ │ -000ed5f0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 x │ │ │ │ -000ed630: 7364 5f5f 6261 7365 3634 4269 6e61 7279 sd__base64Binary │ │ │ │ -000ed640: 3c2f 613e 203c 6120 636c 6173 733d 2263 xsd__he │ │ │ │ -000ed680: 7842 696e 6172 793c 2f61 3e3b 203c 7370 xBinary; // serializes │ │ │ │ -000ed6b0: 2069 6e74 6f20 6865 7820 636f 6e74 656e into hex conten │ │ │ │ -000ed6c0: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
.< │ │ │ │ -000ed6d0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

This le │ │ │ │ -000ed6f0: 7473 2073 6f61 7063 7070 3220 6765 6e65 ts soapcpp2 gene │ │ │ │ -000ed700: 7261 7465 203c 656d 3e3c 636f 6465 3e78 rate x │ │ │ │ -000ed710: 7364 3a62 6173 6536 3442 696e 6172 793c sd:base64Binary< │ │ │ │ -000ed720: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ -000ed730: 3c65 6d3e 3c63 6f64 653e 7873 643a 6865 xsd:he │ │ │ │ -000ed740: 7842 696e 6172 793c 2f63 6f64 653e 3c2f xBinary serializers. │ │ │ │ -000ed760: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

.

.... Back to │ │ │ │ -000ed780: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ -000ed790: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

.

< │ │ │ │ -000ed7a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ -000ed7b0: 2069 643d 226c 6974 6572 616c 223e 3c2f id="literal">.SOAP RPC enco │ │ │ │ -000ed7d0: 6465 6420 7665 7273 7573 2064 6f63 756d ded versus docum │ │ │ │ -000ed7e0: 656e 742f 6c69 7465 7261 6c20 7374 796c ent/literal styl │ │ │ │ -000ed7f0: 653c 2f68 323e 0a3c 703e 534f 4150 2068 e

.

SOAP h │ │ │ │ -000ed800: 6173 2073 6576 6572 616c 2073 7479 6c65 as several style │ │ │ │ -000ed810: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

.
    .
  • │ │ │ │ -000ed820: 534f 4150 2052 5043 2065 6e63 6f64 696e SOAP RPC encodin │ │ │ │ -000ed830: 6720 7573 6573 2058 4d4c 2074 6861 7420 g uses XML that │ │ │ │ -000ed840: 6973 2072 6573 7472 6963 7465 6420 746f is restricted to │ │ │ │ -000ed850: 2053 4f41 5020 7374 7275 6374 7572 6573 SOAP structures │ │ │ │ -000ed860: 2074 6f20 656e 7375 7265 2070 726f 6772 to ensure progr │ │ │ │ -000ed870: 616d 6d69 6e67 2d6c 616e 6775 6167 6520 amming-language │ │ │ │ -000ed880: 696e 7465 726f 7065 7261 6269 6c69 7479 interoperability │ │ │ │ -000ed890: 2e20 4e6f 7420 616c 6c6f 7765 6420 6172 . Not allowed ar │ │ │ │ -000ed8a0: 6520 7661 6c75 6573 2073 6572 6961 6c69 e values seriali │ │ │ │ -000ed8b0: 7a65 6420 6173 2058 4d4c 2061 7474 7269 zed as XML attri │ │ │ │ -000ed8c0: 6275 7465 732c 2061 7272 6179 7320 7368 butes, arrays sh │ │ │ │ -000ed8d0: 6f75 6c64 2062 6520 7365 7269 616c 697a ould be serializ │ │ │ │ -000ed8e0: 6564 2061 7320 534f 4150 2d65 6e63 6f64 ed as SOAP-encod │ │ │ │ -000ed8f0: 6564 2061 7272 6179 7320 696e 7374 6561 ed arrays instea │ │ │ │ -000ed900: 6420 6f66 2058 4d4c 2065 6c65 6d65 6e74 d of XML element │ │ │ │ -000ed910: 2072 6570 6574 6974 696f 6e73 2028 692e repetitions (i. │ │ │ │ -000ed920: 652e 203c 656d 3e3c 636f 6465 3e78 7364 e. xsd │ │ │ │ -000ed930: 3a73 6571 7565 6e63 6520 6d61 784f 6363 :sequence maxOcc │ │ │ │ -000ed940: 7572 733d 2275 6e62 6f75 6e64 6564 223c urs="unbounded"< │ │ │ │ -000ed950: 2f63 6f64 653e 3c2f 656d 3e20 6973 206e /code> is n │ │ │ │ -000ed960: 6f74 2061 6c6c 6f77 6564 292c 2061 6e64 ot allowed), and │ │ │ │ -000ed970: 203c 656d 3e3c 636f 6465 3e78 7364 3a63 xsd:c │ │ │ │ -000ed980: 686f 6963 653c 2f63 6f64 653e 3c2f 656d hoice components are │ │ │ │ -000ed9a0: 206e 6f74 2061 6c6c 6f77 6564 2e20 4d75 not allowed. Mu │ │ │ │ -000ed9b0: 6c74 692d 7265 6665 7265 6e63 6564 2065 lti-referenced e │ │ │ │ -000ed9c0: 6c65 6d65 6e74 7320 6172 6520 7573 6564 lements are used │ │ │ │ -000ed9d0: 2074 6f20 7365 7269 616c 697a 6520 6461 to serialize da │ │ │ │ -000ed9e0: 7461 2073 7472 7563 7475 7265 2067 7261 ta structure gra │ │ │ │ -000ed9f0: 7068 732e 2042 6563 6175 7365 2061 6464 phs. Because add │ │ │ │ -000eda00: 6974 696f 6e61 6c20 534f 4150 2d65 6e63 itional SOAP-enc │ │ │ │ -000eda10: 6f64 696e 6720 7370 6563 6966 6963 2061 oding specific a │ │ │ │ -000eda20: 7474 7269 6275 7465 7320 6172 6520 7072 ttributes are pr │ │ │ │ -000eda30: 6573 656e 7420 7468 6174 2061 7265 206e esent that are n │ │ │ │ -000eda40: 6f74 2064 6566 696e 6564 2069 6e20 7468 ot defined in th │ │ │ │ -000eda50: 6520 584d 4c20 7363 6865 6d61 2028 6f66 e XML schema (of │ │ │ │ -000eda60: 2074 6865 2057 5344 4c29 2c20 7374 7269 the WSDL), stri │ │ │ │ -000eda70: 6374 2058 4d4c 2073 6368 656d 6120 7661 ct XML schema va │ │ │ │ -000eda80: 6c69 6461 746f 7273 206d 6179 2072 656a lidators may rej │ │ │ │ -000eda90: 6563 7420 534f 4150 2d65 6e63 6f64 6564 ect SOAP-encoded │ │ │ │ -000edaa0: 2063 6f6e 7465 6e74 2e20 5468 6520 534f content. The SO │ │ │ │ -000edab0: 4150 2042 6f64 7920 636f 6e74 6169 6e73 AP Body contains │ │ │ │ -000edac0: 2061 7420 6d6f 7374 206f 6e65 2073 6572 at most one ser │ │ │ │ -000edad0: 7669 6365 206f 7065 7261 7469 6f6e 2072 vice operation r │ │ │ │ -000edae0: 6571 7565 7374 2065 6c65 6d65 6e74 206f equest element o │ │ │ │ -000edaf0: 7220 6174 206d 6f73 7420 6f6e 6520 7365 r at most one se │ │ │ │ -000edb00: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation │ │ │ │ -000edb10: 7265 7370 6f6e 7365 2065 6c65 6d65 6e74 response element │ │ │ │ -000edb20: 2061 6e64 2074 6865 2065 6e63 6f64 696e and the encodin │ │ │ │ -000edb30: 6720 7374 796c 6520 6973 2069 6e64 6963 g style is indic │ │ │ │ -000edb40: 6174 6564 2077 6974 6820 7468 6520 3c65 ated with the SOAP-ENV │ │ │ │ -000edb60: 3a65 6e63 6f64 696e 6753 7479 6c65 3d22 :encodingStyle=" │ │ │ │ -000edb70: 2e2e 2e22 3c2f 636f 6465 3e3c 2f65 6d3e ..." │ │ │ │ -000edb80: 2061 7474 7269 6275 7465 2069 6e20 7468 attribute in th │ │ │ │ -000edb90: 6520 534f 4150 2042 6f64 7920 6f72 206f e SOAP Body or o │ │ │ │ -000edba0: 6e65 206f 7220 6d6f 7265 206f 6620 6974 ne or more of it │ │ │ │ -000edbb0: 7320 7375 622d 656c 656d 656e 7473 2e20 s sub-elements. │ │ │ │ -000edbc0: 5468 6973 2073 7479 6c65 2069 7320 7370 This style is sp │ │ │ │ -000edbd0: 6563 6966 6965 6420 666f 7220 7468 6520 ecified for the │ │ │ │ -000edbe0: 656e 7469 7265 2073 6572 7669 6365 2064 entire service d │ │ │ │ -000edbf0: 6563 6c61 7265 6420 756e 6465 7220 6e61 eclared under na │ │ │ │ -000edc00: 6d65 7370 6163 6520 7072 6566 6978 203c mespace prefix < │ │ │ │ -000edc10: 636f 6465 3e6e 733c 2f63 6f64 653e 2077 code>ns w │ │ │ │ -000edc20: 6974 683a 203c 6469 7620 636c 6173 733d ith:
    //gsoap ns se │ │ │ │ -000edc70: 7276 6963 6520 7374 796c 653a 2020 2020 rvice style: │ │ │ │ -000edc80: 7270 633c 2f73 7061 6e3e 3c2f 6469 763e rpc
    │ │ │ │ -000edc90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ -000edcc0: 206e 7320 7365 7276 6963 6520 656e 636f ns service enco │ │ │ │ -000edcd0: 6469 6e67 3a20 656e 636f 6465 643c 2f73 ding: encoded
    .
    │ │ │ │ -000ee0f0: 3c2f 6c69 3e0a 3c6c 693e 534f 4150 2052
  • .
  • SOAP R │ │ │ │ -000ee100: 5043 206c 6974 6572 616c 2061 6c73 6f20 PC literal also │ │ │ │ -000ee110: 7573 6573 2058 4d4c 2063 6f6e 7374 7261 uses XML constra │ │ │ │ -000ee120: 696e 6564 2074 6f20 7468 6520 584d 4c20 ined to the XML │ │ │ │ -000ee130: 7363 6865 6d61 2074 6861 7420 6465 6669 schema that defi │ │ │ │ -000ee140: 6e65 7320 7468 6520 584d 4c20 636f 6e74 nes the XML cont │ │ │ │ -000ee150: 656e 742e 2054 6865 2064 6966 6665 7265 ent. The differe │ │ │ │ -000ee160: 6e63 6520 7769 7468 2064 6f63 756d 656e nce with documen │ │ │ │ -000ee170: 742f 6c69 7465 7261 6c20 6973 2074 6861 t/literal is tha │ │ │ │ -000ee180: 7420 7468 6520 534f 4150 2042 6f64 7920 t the SOAP Body │ │ │ │ -000ee190: 636f 6e74 6169 6e73 2061 7420 6d6f 7374 contains at most │ │ │ │ -000ee1a0: 206f 6e65 2073 6572 7669 6365 206f 7065 one service ope │ │ │ │ -000ee1b0: 7261 7469 6f6e 2072 6571 7565 7374 2065 ration request e │ │ │ │ -000ee1c0: 6c65 6d65 6e74 206f 7220 6174 206d 6f73 lement or at mos │ │ │ │ -000ee1d0: 7420 6f6e 6520 7365 7276 6963 6520 6f70 t one service op │ │ │ │ -000ee1e0: 6572 6174 696f 6e20 7265 7370 6f6e 7365 eration response │ │ │ │ -000ee1f0: 2065 6c65 6d65 6e74 2e20 4e6f 203c 656d element. No SOAP-ENV: │ │ │ │ -000ee210: 656e 636f 6469 6e67 5374 796c 653d 222e encodingStyle=". │ │ │ │ -000ee220: 2e2e 223c 2f63 6f64 653e 3c2f 656d 3e20 .." │ │ │ │ -000ee230: 6174 7472 6962 7574 6520 7368 6f75 6c64 attribute should │ │ │ │ -000ee240: 2061 7070 6561 7220 696e 206c 6974 6572 appear in liter │ │ │ │ -000ee250: 616c 2063 6f6e 7465 6e74 2e20 5468 6973 al content. This │ │ │ │ -000ee260: 2073 7479 6c65 2069 7320 7370 6563 6966 style is specif │ │ │ │ -000ee270: 6965 6420 666f 7220 7468 6520 656e 7469 ied for the enti │ │ │ │ -000ee280: 7265 2073 6572 7669 6365 2064 6563 6c61 re service decla │ │ │ │ -000ee290: 7265 6420 756e 6465 7220 6e61 6d65 7370 red under namesp │ │ │ │ -000ee2a0: 6163 6520 7072 6566 6978 203c 636f 6465 ace prefix ns with: │ │ │ │ -000ee2c0: 203c 6469 7620 636c 6173 733d 2266 7261
    / │ │ │ │ -000ee300: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -000ee310: 6520 7374 796c 653a 2020 2020 7270 633c e style: rpc< │ │ │ │ -000ee320: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -000ee340: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000ee350: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ -000ee360: 7365 7276 6963 6520 656e 636f 6469 6e67 service encoding │ │ │ │ -000ee370: 3a20 6c69 7465 7261 6c3c 2f73 7061 6e3e : literal │ │ │ │ -000ee380: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
..

Bes │ │ │ │ -000ee3b0: 6964 6573 203c 636f 6465 3e2f 2f67 736f ides //gso │ │ │ │ -000ee3c0: 6170 206e 7320 7365 7276 6963 6520 7374 ap ns service st │ │ │ │ -000ee3d0: 796c 653c 2f63 6f64 653e 2061 6e64 203c yle and < │ │ │ │ -000ee3e0: 636f 6465 3e2f 2f67 736f 6170 206e 7320 code>//gsoap ns │ │ │ │ -000ee3f0: 7365 7276 6963 6520 656e 636f 6469 6e67 service encoding │ │ │ │ -000ee400: 3c2f 636f 6465 3e20 7468 6572 6520 6172 there ar │ │ │ │ -000ee410: 6520 616c 736f 2074 6865 2073 6572 7669 e also the servi │ │ │ │ -000ee420: 6365 206f 7065 7261 7469 6f6e 2073 7065 ce operation spe │ │ │ │ -000ee430: 6369 6669 6320 7665 7273 696f 6e73 203c cific versions < │ │ │ │ -000ee440: 636f 6465 3e2f 2f67 736f 6170 206e 7320 code>//gsoap ns │ │ │ │ -000ee450: 7365 7276 6963 6520 6d65 7468 6f64 2d73 service method-s │ │ │ │ -000ee460: 7479 6c65 3c2f 636f 6465 3e2c 203c 636f tyle, //gsoap ns se │ │ │ │ -000ee480: 7276 6963 6520 6d65 7468 6f64 2d72 6573 rvice method-res │ │ │ │ -000ee490: 706f 6e73 652d 7374 796c 653c 2f63 6f64 ponse-style, //gsoa │ │ │ │ -000ee4b0: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met │ │ │ │ -000ee4c0: 686f 642d 656e 636f 6469 6e67 3c2f 636f hod-encoding, and / │ │ │ │ -000ee4e0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -000ee4f0: 6520 6d65 7468 6f64 2d72 6573 706f 6e73 e method-respons │ │ │ │ -000ee500: 652d 656e 636f 6469 6e67 3c2f 636f 6465 e-encoding that explicitl │ │ │ │ -000ee520: 7920 7370 6563 6966 7920 534f 4150 2052 y specify SOAP R │ │ │ │ -000ee530: 5043 2065 6e63 6f64 6564 2c20 646f 6375 PC encoded, docu │ │ │ │ -000ee540: 6d65 6e74 2f6c 6974 6572 616c 2c20 6f72 ment/literal, or │ │ │ │ -000ee550: 2052 5043 206c 6974 6572 616c 2073 7479 RPC literal sty │ │ │ │ -000ee560: 6c65 206d 6573 7361 6765 7320 666f 7220 le messages for │ │ │ │ -000ee570: 7468 6520 696e 6469 6361 7465 6420 7365 the indicated se │ │ │ │ -000ee580: 7276 6963 6520 6f70 6572 6174 696f 6e20 rvice operation │ │ │ │ -000ee590: 6d65 7468 6f64 732e 3c2f 703e 0a3c 703e methods.

.

│ │ │ │ -000ee5a0: 546f 2065 6e61 626c 6520 534f 4150 2052 To enable SOAP R │ │ │ │ -000ee5b0: 5043 2065 6e63 6f64 696e 6720 666f 7220 PC encoding for │ │ │ │ -000ee5c0: 6120 7061 7274 6963 756c 6172 2073 6572 a particular ser │ │ │ │ -000ee5d0: 7669 6365 206f 7065 7261 7469 6f6e 2c20 vice operation, │ │ │ │ -000ee5e0: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

.
< │ │ │ │ -000ee600: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000ee610: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ -000ee630: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ -000ee640: 2d73 7479 6c65 3a20 2020 2077 6562 6d65 -style: webme │ │ │ │ -000ee650: 7468 6f64 2072 7063 203c 2f73 7061 6e3e thod rpc │ │ │ │ -000ee660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
/ │ │ │ │ -000ee690: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -000ee6a0: 6520 6d65 7468 6f64 2d65 6e63 6f64 696e e method-encodin │ │ │ │ -000ee6b0: 673a 2077 6562 6d65 7468 6f64 2065 6e63 g: webmethod enc │ │ │ │ -000ee6c0: 6f64 6564 203c 2f73 7061 6e3e 3c2f 6469 oded .
i │ │ │ │ -000ee700: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7765 nt ns__we │ │ │ │ -000ee710: 626d 6574 686f 6428 2e2e 2e29 3c2f 6469 bmethod(...).

To │ │ │ │ -000ee740: 656e 6162 6c65 2053 4f41 5020 5250 4320 enable SOAP RPC │ │ │ │ -000ee750: 656e 636f 6469 6e67 2066 6f72 2061 2070 encoding for a p │ │ │ │ -000ee760: 6172 7469 6375 6c61 7220 7365 7276 6963 articular servic │ │ │ │ -000ee770: 6520 6f70 6572 6174 696f 6e20 7265 7370 e operation resp │ │ │ │ -000ee780: 6f6e 7365 2c20 7573 653a 3c2f 703e 0a3c onse, use:

.< │ │ │ │ -000ee790: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -000ee7a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
//g │ │ │ │ -000ee7d0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ -000ee7e0: 6d65 7468 6f64 2d72 6573 706f 6e73 652d method-response- │ │ │ │ -000ee7f0: 7374 796c 653a 2020 2020 7765 626d 6574 style: webmet │ │ │ │ -000ee800: 686f 6420 7270 6320 3c2f 7370 616e 3e3c hod rpc < │ │ │ │ -000ee810: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
// │ │ │ │ -000ee840: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ -000ee850: 206d 6574 686f 642d 7265 7370 6f6e 7365 method-response │ │ │ │ -000ee860: 2d65 6e63 6f64 696e 673a 2077 6562 6d65 -encoding: webme │ │ │ │ -000ee870: 7468 6f64 2065 6e63 6f64 6564 203c 2f73 thod encoded
.
int ns__webmethod( │ │ │ │ -000ee8d0: 2e2e 2e29 3c2f 6469 763e 0a3c 2f64 6976 ...)
.
< │ │ │ │ -000eef60: 703e 4f72 2075 7365 2061 2077 6964 6520 p>Or use a wide │ │ │ │ -000eef70: 6368 6172 6163 7465 7220 7374 7269 6e67 character string │ │ │ │ -000eef80: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
typedef std::wstring │ │ │ │ -000eefe0: 584d 4c3b 3c2f 6469 763e 0a3c 2f64 6976 XML;
.

The differ │ │ │ │ -000ef100: 656e 6365 7320 6265 7477 6565 6e20 7468 ences between th │ │ │ │ -000ef110: 6520 7573 6520 6f66 2072 6567 756c 6172 e use of regular │ │ │ │ -000ef120: 2038 2d62 6974 2073 7472 696e 6773 2076 8-bit strings v │ │ │ │ -000ef130: 6572 7375 7320 7769 6465 2063 6861 7261 ersus wide chara │ │ │ │ -000ef140: 6374 6572 2073 7472 696e 6773 2066 6f72 cter strings for │ │ │ │ -000ef150: 2058 4d4c 2064 6f63 756d 656e 7473 2061 XML documents a │ │ │ │ -000ef160: 7265 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 re:

.
    .
  • XML literal str │ │ │ │ -000ef180: 696e 6773 206d 7573 7420 686f 6c64 2055 ings must hold U │ │ │ │ -000ef190: 5446 2d38 2058 4d4c 2063 6f6e 7465 6e74 TF-8 XML content │ │ │ │ -000ef1a0: 2e3c 2f6c 693e 0a3c 6c69 3e57 6964 6520 .
  • .
  • Wide │ │ │ │ -000ef1b0: 6368 6172 6163 7465 7220 584d 4c20 6c69 character XML li │ │ │ │ -000ef1c0: 7465 7261 6c20 7374 7269 6e67 7320 6172 teral strings ar │ │ │ │ -000ef1d0: 6520 636f 6e76 6572 7465 6420 746f 2061 e converted to a │ │ │ │ -000ef1e0: 6e64 2066 726f 6d20 5554 462d 382e 3c2f nd from UTF-8..
.

... │ │ │ │ -000ef200: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -000ef210: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -000ef220: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

. │ │ │ │ -000ef230: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

.XML v │ │ │ │ -000ef260: 616c 6964 6174 696f 6e3c 2f68 313e 0a3c alidation

.< │ │ │ │ -000ef270: 703e 536f 6d65 2058 4d4c 2076 616c 6964 p>Some XML valid │ │ │ │ -000ef280: 6174 696f 6e20 636f 6e73 7472 6169 6e74 ation constraint │ │ │ │ -000ef290: 7320 6172 6520 6e6f 7420 6175 746f 6d61 s are not automa │ │ │ │ -000ef2a0: 7469 6361 6c6c 7920 7665 7269 6669 6564 tically verified │ │ │ │ -000ef2b0: 2075 6e6c 6573 7320 6578 706c 6963 6974 unless explicit │ │ │ │ -000ef2c0: 6c79 2073 6574 2075 7369 6e67 2074 6865 ly set using the │ │ │ │ -000ef2d0: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML │ │ │ │ -000ef2e0: 5f53 5452 4943 543c 2f63 6f64 653e 2066 _STRICT f │ │ │ │ -000ef2f0: 6c61 672e 2053 4f41 5020 5250 4320 656e lag. SOAP RPC en │ │ │ │ -000ef300: 636f 6469 6e67 2069 7320 616e 2058 4d4c coding is an XML │ │ │ │ -000ef310: 2066 6f72 6d61 7420 7468 6174 2064 6f65 format that doe │ │ │ │ -000ef320: 7320 6e6f 7420 6166 666f 7264 2073 7472 s not afford str │ │ │ │ -000ef330: 6963 7420 584d 4c20 7661 6c69 6461 7469 ict XML validati │ │ │ │ -000ef340: 6f6e 2c20 6265 6361 7573 6520 6f66 2074 on, because of t │ │ │ │ -000ef350: 6865 2061 6464 6974 696f 6e20 6f66 2053 he addition of S │ │ │ │ -000ef360: 4f41 502d 7370 6563 6966 6963 2061 7474 OAP-specific att │ │ │ │ -000ef370: 7269 6275 7465 7320 616e 6420 6f74 6865 ributes and othe │ │ │ │ -000ef380: 7220 736d 616c 6c20 6465 7669 6174 696f r small deviatio │ │ │ │ -000ef390: 6e73 2074 6861 7420 7769 6c6c 2062 6520 ns that will be │ │ │ │ -000ef3a0: 6465 7465 6374 6564 2062 7920 616e 2061 detected by an a │ │ │ │ -000ef3b0: 6767 7265 7373 6976 6520 584d 4c20 7661 ggressive XML va │ │ │ │ -000ef3c0: 6c69 6461 746f 722c 206c 6561 6469 6e67 lidator, leading │ │ │ │ -000ef3d0: 2074 6865 206d 6573 7361 6769 6e67 2066 the messaging f │ │ │ │ -000ef3e0: 6169 6c75 7265 732e 2042 7920 746f 6e69 ailures. By toni │ │ │ │ -000ef3f0: 6e67 2058 4d4c 2076 616c 6964 6174 696f ng XML validatio │ │ │ │ -000ef400: 6e20 646f 776e 2c20 6974 2068 656c 7073 n down, it helps │ │ │ │ -000ef410: 2074 6f20 696d 7072 6f76 6520 534f 4150 to improve SOAP │ │ │ │ -000ef420: 2052 5043 2065 6e63 6f64 696e 6720 696e RPC encoding in │ │ │ │ -000ef430: 7465 726f 7065 7261 6269 6c69 7479 2e3c teroperability.< │ │ │ │ -000ef440: 2f70 3e0a 3c70 3e53 7472 6963 7420 7661 /p>.

Strict va │ │ │ │ -000ef450: 6c69 6461 7469 6f6e 2063 6f6e 7374 7261 lidation constra │ │ │ │ -000ef460: 696e 7473 2061 7265 2065 6e61 626c 6564 ints are enabled │ │ │ │ -000ef470: 2077 6974 6820 7468 6520 3c63 6f64 653e with the │ │ │ │ -000ef480: 2353 4f41 505f 584d 4c5f 5354 5249 4354 #SOAP_XML_STRICT │ │ │ │ -000ef490: 3c2f 636f 6465 3e20 6d6f 6465 2066 6c61 mode fla │ │ │ │ -000ef4a0: 6720 7365 742c 2065 2e67 2e20 7769 7468 g set, e.g. with │ │ │ │ -000ef4b0: 203c 636f 6465 3e73 6f61 705f 7365 745f soap_set_ │ │ │ │ -000ef4c0: 696d 6f64 6528 736f 6170 2c20 534f 4150 imode(soap, SOAP │ │ │ │ -000ef4d0: 5f58 4d4c 5f53 5452 4943 5429 3c2f 636f _XML_STRICT) or soa │ │ │ │ -000ef4f0: 705f 6e65 7728 534f 4150 5f58 4d4c 5f53 p_new(SOAP_XML_S │ │ │ │ -000ef500: 5452 4943 5429 3c2f 636f 6465 3e2c 2073 TRICT), s │ │ │ │ -000ef510: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Run-time flags< │ │ │ │ -000ef550: 2f61 3e20 666f 7220 7468 6520 636f 6d70 /a> for the comp │ │ │ │ -000ef560: 6c65 7465 206c 6973 7420 6f66 2066 6c61 lete list of fla │ │ │ │ -000ef570: 6773 2e3c 2f70 3e0a 3c70 3e54 6865 206e gs.

.

The n │ │ │ │ -000ef580: 6578 7420 7365 6374 696f 6e73 2064 6573 ext sections des │ │ │ │ -000ef590: 6372 6962 6520 7468 6520 7479 7065 206f cribe the type o │ │ │ │ -000ef5a0: 6620 636f 6e73 7472 6169 6e74 7320 7661 f constraints va │ │ │ │ -000ef5b0: 6c69 6461 7465 6420 7768 656e 203c 636f lidated when #SOAP_XML_STR │ │ │ │ -000ef5d0: 4943 543c 2f63 6f64 653e 2069 7320 656e ICT is en │ │ │ │ -000ef5e0: 6162 6c65 6420 616e 6420 7661 6c69 6461 abled and valida │ │ │ │ -000ef5f0: 7469 6f6e 2063 6f6e 7374 7261 696e 7473 tion constraints │ │ │ │ -000ef600: 2061 7265 2073 7065 6369 6669 6564 2069 are specified i │ │ │ │ -000ef610: 6e20 7468 6520 696e 7465 7266 6163 6520 n the interface │ │ │ │ -000ef620: 6865 6164 6572 2066 696c 652e 3c2f 703e header file.

│ │ │ │ -000ef630: 0a3c 703e 5573 6520 636f 6d70 696c 6572 .

Use compiler │ │ │ │ -000ef640: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT │ │ │ │ -000ef650: 485f 5245 504c 4143 455f 494c 4c45 4741 H_REPLACE_ILLEGA │ │ │ │ -000ef660: 4c5f 5554 4638 3c2f 636f 6465 3e20 746f L_UTF8 to │ │ │ │ -000ef670: 2066 6f72 6365 2073 7472 6963 7420 5554 force strict UT │ │ │ │ -000ef680: 462d 3820 7465 7874 2063 6f6e 7665 7273 F-8 text convers │ │ │ │ -000ef690: 696f 6e73 2c20 7768 6963 6820 7265 706c ions, which repl │ │ │ │ -000ef6a0: 6163 6573 2069 6e76 616c 6964 2055 5446 aces invalid UTF │ │ │ │ -000ef6b0: 2d38 2077 6974 6820 552b 4646 4644 2e3c -8 with U+FFFD.< │ │ │ │ -000ef6c0: 2f70 3e0a 3c70 3e53 6565 2061 6c73 6f20 /p>.

See also │ │ │ │ -000ef6d0: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f64 C an │ │ │ │ -000ef700: 6420 432b 2b20 584d 4c20 6461 7461 2062 d C++ XML data b │ │ │ │ -000ef710: 696e 6469 6e67 733c 2f61 3e20 646f 6375 indings docu │ │ │ │ -000ef720: 6d65 6e74 6174 696f 6e20 666f 7220 6d6f mentation for mo │ │ │ │ -000ef730: 7265 2064 6574 6169 6c73 2e3c 2f70 3e0a re details.

. │ │ │ │ -000ef740: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

.... Back to tabl │ │ │ │ -000ef760: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

.

< │ │ │ │ -000ef7a0: 2f61 3e0a 4465 6661 756c 7420 7661 6c75 /a>.Default valu │ │ │ │ -000ef7b0: 6573 3c2f 6832 3e0a 3c70 3e44 6566 6175 es

.

Defau │ │ │ │ -000ef7c0: 6c74 2076 616c 7565 7320 6361 6e20 6265 lt values can be │ │ │ │ -000ef7d0: 2064 6566 696e 6564 2066 6f72 206f 7074 defined for opt │ │ │ │ -000ef7e0: 696f 6e61 6c20 656c 656d 656e 7473 2061 ional elements a │ │ │ │ -000ef7f0: 6e64 2061 7474 7269 6275 7465 732c 2077 nd attributes, w │ │ │ │ -000ef800: 6869 6368 206d 6561 6e73 2074 6861 7420 hich means that │ │ │ │ -000ef810: 7468 6520 6465 6661 756c 7420 7661 6c75 the default valu │ │ │ │ -000ef820: 6520 7769 6c6c 2062 6520 7573 6564 2077 e will be used w │ │ │ │ -000ef830: 6865 6e20 7468 6520 656c 656d 656e 7420 hen the element │ │ │ │ -000ef840: 6f72 2061 7474 7269 6275 7465 2076 616c or attribute val │ │ │ │ -000ef850: 7565 2069 7320 6e6f 7420 7072 6573 656e ue is not presen │ │ │ │ -000ef860: 7420 696e 2074 6865 2070 6172 7365 6420 t in the parsed │ │ │ │ -000ef870: 584d 4c2e 2053 6565 2061 6c73 6f20 5365 XML. See also Se │ │ │ │ -000ef880: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction De │ │ │ │ -000ef8b0: 6661 756c 7420 7661 6c75 6573 2066 6f72 fault values for │ │ │ │ -000ef8c0: 206f 6d69 7474 6564 2058 4d4c 2065 6c65 omitted XML ele │ │ │ │ -000ef8d0: 6d65 6e74 7320 616e 6420 6174 7472 6962 ments and attrib │ │ │ │ -000ef8e0: 7574 6573 3c2f 613e 2061 6e64 2065 7861 utes and exa │ │ │ │ -000ef8f0: 6d70 6c65 7320 696e 2073 7562 7365 7175 mples in subsequ │ │ │ │ -000ef900: 656e 7420 7375 6273 6563 7469 6f6e 7320 ent subsections │ │ │ │ -000ef910: 6265 6c6f 772e 3c2f 703e 0a3c 703e 4465 below.

.

De │ │ │ │ -000ef920: 6661 756c 7420 7661 6c75 6573 206d 7573 fault values mus │ │ │ │ -000ef930: 7420 6265 2070 7269 6d69 7469 7665 2074 t be primitive t │ │ │ │ -000ef940: 7970 6573 2c20 696e 7465 6765 722c 2066 ypes, integer, f │ │ │ │ -000ef950: 6c6f 6174 2c20 7374 7269 6e67 2c20 6574 loat, string, et │ │ │ │ -000ef960: 632e 206f 7220 706f 696e 7465 7273 2074 c. or pointers t │ │ │ │ -000ef970: 6f20 7072 696d 6974 6976 6520 7479 7065 o primitive type │ │ │ │ -000ef980: 732e 2044 6566 6175 6c74 2076 616c 7565 s. Default value │ │ │ │ -000ef990: 7320 6361 6e20 6265 2073 7065 6369 6669 s can be specifi │ │ │ │ -000ef9a0: 6564 2066 6f72 2073 7472 7563 7420 616e ed for struct an │ │ │ │ -000ef9b0: 6420 636c 6173 7320 6d65 6d62 6572 732c d class members, │ │ │ │ -000ef9c0: 2061 7320 7368 6f77 6e20 696e 2074 6865 as shown in the │ │ │ │ -000ef9d0: 2065 7861 6d70 6c65 2062 656c 6f77 3a3c example below:< │ │ │ │ -000ef9e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

struct │ │ │ │ -000efa30: 6e73 5f5f 4d79 5265 636f 7264 203c 2f64 ns__MyRecord unsigned ch │ │ │ │ +000ecad0: 6172 3c2f 7370 616e 3e20 2a5f 5f70 7472 ar *__ptr │ │ │ │ +000ecae0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ +000ecb00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000ecb10: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int __size; .
};
.

The resu │ │ │ │ +000ecb70: 6c74 696e 6720 584d 4c20 7363 6865 6d61 lting XML schema │ │ │ │ +000ecb80: 2074 7970 6520 6973 3a3c 2f70 3e0a 3c64 type is:

. │ │ │ │ +000ecba0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
<simpleType │ │ │ │ +000ecbf0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na │ │ │ │ +000ecc10: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="bina │ │ │ │ +000ecc40: 7279 2671 756f 743b 3c2f 7370 616e 3e26 ry"& │ │ │ │ +000ecc50: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
.
&l │ │ │ │ +000ecc70: 743b 3c73 7061 6e20 636c 6173 733d 226b t;rest │ │ │ │ +000ecc90: 7269 6374 696f 6e3c 2f73 7061 6e3e 203c riction < │ │ │ │ +000ecca0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000eccb0: 6f72 6422 3e62 6173 653c 2f73 7061 6e3e ord">base │ │ │ │ +000eccc0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ +000ecce0: 6f74 3b78 7364 3a62 6173 6536 3442 696e ot;xsd:base64Bin │ │ │ │ +000eccf0: 6172 7926 7175 6f74 3b3c 2f73 7061 6e3e ary" │ │ │ │ +000ecd00: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
& │ │ │ │ +000ecd20: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/re │ │ │ │ +000ecd40: 7374 7269 6374 696f 6e3c 2f73 7061 6e3e striction │ │ │ │ +000ecd50: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
.
< │ │ │ │ +000ecd70: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/simp │ │ │ │ +000ecd90: 6c65 5479 7065 3c2f 7370 616e 3e26 6774 leType> │ │ │ │ +000ecda0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.
│ │ │ │ +000ecdc0: 3c2f 6469 763e 3c70 3ef0 9f94 9d20 3c61

.... Back t │ │ │ │ +000ecde0: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ +000ecdf0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 323e nts

.

│ │ │ │ +000ece00: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .hexBinary │ │ │ │ +000ece30: 7365 7269 616c 697a 6174 696f 6e3c 2f68 serialization.

The base64Binary │ │ │ │ +000ece60: 3c2f 636f 6465 3e3c 2f65 6d3e 2058 5344 XSD │ │ │ │ +000ece70: 2074 7970 6520 6973 2069 6e74 726f 6475 type is introdu │ │ │ │ +000ece80: 6365 6420 696e 2061 6e20 696e 7465 7266 ced in an interf │ │ │ │ +000ece90: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file │ │ │ │ +000ecea0: 666f 7220 736f 6170 6370 7032 2075 7369 for soapcpp2 usi │ │ │ │ +000eceb0: 6e67 2061 2073 7472 7563 7420 6f72 2063 ng a struct or c │ │ │ │ +000ecec0: 6c61 7373 2074 6861 7420 636f 6e74 6169 lass that contai │ │ │ │ +000eced0: 6e73 2061 6e20 6172 7261 7920 6f66 203c ns an array of < │ │ │ │ +000ecee0: 636f 6465 3e75 6e73 6967 6e65 6420 6368 code>unsigned ch │ │ │ │ +000ecef0: 6172 3c2f 636f 6465 3e20 7661 6c75 6573 ar values │ │ │ │ +000ecf00: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

.
. │ │ │ │ +000ecfa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
{
.
│ │ │ │ +000ecfd0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +000ecff0: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char │ │ │ │ +000ed020: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *__ptr │ │ │ │ +000ed080: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
.
< │ │ │ │ +000ed0a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000ed0b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int __size │ │ │ │ +000ed120: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
.} │ │ │ │ +000ed140: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
.

< │ │ │ │ +000ed160: 703e 5468 6520 6164 7661 6e74 6167 6520 p>The advantage │ │ │ │ +000ed170: 6f66 2074 6869 7320 7374 7275 6374 206f of this struct o │ │ │ │ +000ed180: 7220 636c 6173 7320 6973 2074 6865 2061 r class is the a │ │ │ │ +000ed190: 6269 6c69 7479 2074 6f20 7365 7269 616c bility to serial │ │ │ │ +000ed1a0: 697a 6572 2072 6177 2062 696e 6172 7920 izer raw binary │ │ │ │ +000ed1b0: 6461 7461 2066 726f 6d20 6d65 6d6f 7279 data from memory │ │ │ │ +000ed1c0: 2c20 7369 6e63 6520 7468 6520 736f 6170 , since the soap │ │ │ │ +000ed1d0: 6370 7032 2d67 656e 6572 6174 6564 2073 cpp2-generated s │ │ │ │ +000ed1e0: 6572 6961 6c69 7a65 7220 636f 6e76 6572 erializer conver │ │ │ │ +000ed1f0: 7473 2074 6865 2062 696e 6172 7920 6461 ts the binary da │ │ │ │ +000ed200: 7461 2074 6f2f 6672 6f6d 2068 6578 6164 ta to/from hexad │ │ │ │ +000ed210: 6563 696d 616c 2069 6e20 584d 4c2e 3c2f ecimal in XML..

If a binar │ │ │ │ +000ed230: 7920 7479 7065 2073 7563 6820 6173 203c y type such as < │ │ │ │ +000ed240: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>xsd__base64Bi │ │ │ │ +000ed2c0: 6e61 7279 3c2f 613e 3c2f 636f 6465 3e20 nary │ │ │ │ +000ed2d0: 6973 2061 6c72 6561 6479 2064 6566 696e is already defin │ │ │ │ +000ed2e0: 6564 2c20 7468 656e 2077 6520 6361 6e20 ed, then we can │ │ │ │ +000ed2f0: 7369 6d70 6c79 2075 7365 2061 203c 636f simply use a typedef to introduce t │ │ │ │ +000ed320: 6865 2068 6578 2076 6172 6961 6e74 3a3c he hex variant:< │ │ │ │ +000ed330: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

class < │ │ │ │ +000ed380: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000ed390: 7265 663d 2273 7472 7563 7478 7364 5f5f ref="structxsd__ │ │ │ │ +000ed3a0: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary. │ │ │ │ +000ed3b0: 6874 6d6c 223e 7873 645f 5f62 6173 6536 html">xsd__base6 │ │ │ │ +000ed3c0: 3442 696e 6172 793c 2f61 3e3c 2f64 6976 4Binary
.
{ publ │ │ │ │ +000ed400: 6963 3c2f 7370 616e 3e3a 203c 2f64 6976 ic:
.
unsigned char │ │ │ │ +000ed470: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *__ptr; .
int < │ │ │ │ +000ed520: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000ed530: 7265 663d 2273 7472 7563 7478 7364 5f5f ref="structxsd__ │ │ │ │ +000ed540: 5f5f 6261 7365 3634 5f62 696e 6172 792e __base64_binary. │ │ │ │ +000ed550: 6874 6d6c 2361 6132 6466 6434 6439 3966 html#aa2dfd4d99f │ │ │ │ +000ed560: 3832 3830 6334 3133 6239 6666 3235 6136 8280c413b9ff25a6 │ │ │ │ +000ed570: 3961 3837 3239 223e 5f5f 7369 7a65 3c2f 9a8729">__size;
.
}; │ │ │ │ +000ed5a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
.
t │ │ │ │ +000ed5d0: 7970 6564 6566 3c2f 7370 616e 3e20 3c61 ypedef xsd__base64 │ │ │ │ +000ed620: 4269 6e61 7279 3c2f 613e 203c 6120 636c Binary x │ │ │ │ +000ed660: 7364 5f5f 6865 7842 696e 6172 793c 2f61 sd__hexBinary; // seri │ │ │ │ +000ed690: 616c 697a 6573 2069 6e74 6f20 6865 7820 alizes into hex │ │ │ │ +000ed6a0: 636f 6e74 656e 743c 2f73 7061 6e3e 3c2f content.

T │ │ │ │ +000ed6d0: 6869 7320 6c65 7473 2073 6f61 7063 7070 his lets soapcpp │ │ │ │ +000ed6e0: 3220 6765 6e65 7261 7465 203c 656d 3e3c 2 generate < │ │ │ │ +000ed6f0: 636f 6465 3e78 7364 3a62 6173 6536 3442 code>xsd:base64B │ │ │ │ +000ed700: 696e 6172 793c 2f63 6f64 653e 3c2f 656d inary and │ │ │ │ +000ed720: 7873 643a 6865 7842 696e 6172 793c 2f63 xsd:hexBinary serial │ │ │ │ +000ed740: 697a 6572 732e 3c2f 703e 0a3c 703e f09f izers.

.

.. │ │ │ │ +000ed750: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ +000ed760: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ +000ed770: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

│ │ │ │ +000ed780: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

.SOAP RP │ │ │ │ +000ed7b0: 4320 656e 636f 6465 6420 7665 7273 7573 C encoded versus │ │ │ │ +000ed7c0: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera │ │ │ │ +000ed7d0: 6c20 7374 796c 653c 2f68 323e 0a3c 703e l style

.

│ │ │ │ +000ed7e0: 534f 4150 2068 6173 2073 6576 6572 616c SOAP has several │ │ │ │ +000ed7f0: 2073 7479 6c65 733a 3c2f 703e 0a3c 756c styles:

.
    .
  • SOAP RPC e │ │ │ │ +000ed810: 6e63 6f64 696e 6720 7573 6573 2058 4d4c ncoding uses XML │ │ │ │ +000ed820: 2074 6861 7420 6973 2072 6573 7472 6963 that is restric │ │ │ │ +000ed830: 7465 6420 746f 2053 4f41 5020 7374 7275 ted to SOAP stru │ │ │ │ +000ed840: 6374 7572 6573 2074 6f20 656e 7375 7265 ctures to ensure │ │ │ │ +000ed850: 2070 726f 6772 616d 6d69 6e67 2d6c 616e programming-lan │ │ │ │ +000ed860: 6775 6167 6520 696e 7465 726f 7065 7261 guage interopera │ │ │ │ +000ed870: 6269 6c69 7479 2e20 4e6f 7420 616c 6c6f bility. Not allo │ │ │ │ +000ed880: 7765 6420 6172 6520 7661 6c75 6573 2073 wed are values s │ │ │ │ +000ed890: 6572 6961 6c69 7a65 6420 6173 2058 4d4c erialized as XML │ │ │ │ +000ed8a0: 2061 7474 7269 6275 7465 732c 2061 7272 attributes, arr │ │ │ │ +000ed8b0: 6179 7320 7368 6f75 6c64 2062 6520 7365 ays should be se │ │ │ │ +000ed8c0: 7269 616c 697a 6564 2061 7320 534f 4150 rialized as SOAP │ │ │ │ +000ed8d0: 2d65 6e63 6f64 6564 2061 7272 6179 7320 -encoded arrays │ │ │ │ +000ed8e0: 696e 7374 6561 6420 6f66 2058 4d4c 2065 instead of XML e │ │ │ │ +000ed8f0: 6c65 6d65 6e74 2072 6570 6574 6974 696f lement repetitio │ │ │ │ +000ed900: 6e73 2028 692e 652e 203c 656d 3e3c 636f ns (i.e. xsd:sequence │ │ │ │ +000ed920: 6d61 784f 6363 7572 733d 2275 6e62 6f75 maxOccurs="unbou │ │ │ │ +000ed930: 6e64 6564 223c 2f63 6f64 653e 3c2f 656d nded" is not allowed │ │ │ │ +000ed950: 292c 2061 6e64 203c 656d 3e3c 636f 6465 ), and xsd:choice componen │ │ │ │ +000ed980: 7473 2061 7265 206e 6f74 2061 6c6c 6f77 ts are not allow │ │ │ │ +000ed990: 6564 2e20 4d75 6c74 692d 7265 6665 7265 ed. Multi-refere │ │ │ │ +000ed9a0: 6e63 6564 2065 6c65 6d65 6e74 7320 6172 nced elements ar │ │ │ │ +000ed9b0: 6520 7573 6564 2074 6f20 7365 7269 616c e used to serial │ │ │ │ +000ed9c0: 697a 6520 6461 7461 2073 7472 7563 7475 ize data structu │ │ │ │ +000ed9d0: 7265 2067 7261 7068 732e 2042 6563 6175 re graphs. Becau │ │ │ │ +000ed9e0: 7365 2061 6464 6974 696f 6e61 6c20 534f se additional SO │ │ │ │ +000ed9f0: 4150 2d65 6e63 6f64 696e 6720 7370 6563 AP-encoding spec │ │ │ │ +000eda00: 6966 6963 2061 7474 7269 6275 7465 7320 ific attributes │ │ │ │ +000eda10: 6172 6520 7072 6573 656e 7420 7468 6174 are present that │ │ │ │ +000eda20: 2061 7265 206e 6f74 2064 6566 696e 6564 are not defined │ │ │ │ +000eda30: 2069 6e20 7468 6520 584d 4c20 7363 6865 in the XML sche │ │ │ │ +000eda40: 6d61 2028 6f66 2074 6865 2057 5344 4c29 ma (of the WSDL) │ │ │ │ +000eda50: 2c20 7374 7269 6374 2058 4d4c 2073 6368 , strict XML sch │ │ │ │ +000eda60: 656d 6120 7661 6c69 6461 746f 7273 206d ema validators m │ │ │ │ +000eda70: 6179 2072 656a 6563 7420 534f 4150 2d65 ay reject SOAP-e │ │ │ │ +000eda80: 6e63 6f64 6564 2063 6f6e 7465 6e74 2e20 ncoded content. │ │ │ │ +000eda90: 5468 6520 534f 4150 2042 6f64 7920 636f The SOAP Body co │ │ │ │ +000edaa0: 6e74 6169 6e73 2061 7420 6d6f 7374 206f ntains at most o │ │ │ │ +000edab0: 6e65 2073 6572 7669 6365 206f 7065 7261 ne service opera │ │ │ │ +000edac0: 7469 6f6e 2072 6571 7565 7374 2065 6c65 tion request ele │ │ │ │ +000edad0: 6d65 6e74 206f 7220 6174 206d 6f73 7420 ment or at most │ │ │ │ +000edae0: 6f6e 6520 7365 7276 6963 6520 6f70 6572 one service oper │ │ │ │ +000edaf0: 6174 696f 6e20 7265 7370 6f6e 7365 2065 ation response e │ │ │ │ +000edb00: 6c65 6d65 6e74 2061 6e64 2074 6865 2065 lement and the e │ │ │ │ +000edb10: 6e63 6f64 696e 6720 7374 796c 6520 6973 ncoding style is │ │ │ │ +000edb20: 2069 6e64 6963 6174 6564 2077 6974 6820 indicated with │ │ │ │ +000edb30: 7468 6520 3c65 6d3e 3c63 6f64 653e 534f the SO │ │ │ │ +000edb40: 4150 2d45 4e56 3a65 6e63 6f64 696e 6753 AP-ENV:encodingS │ │ │ │ +000edb50: 7479 6c65 3d22 2e2e 2e22 3c2f 636f 6465 tyle="..." attribute │ │ │ │ +000edb70: 2069 6e20 7468 6520 534f 4150 2042 6f64 in the SOAP Bod │ │ │ │ +000edb80: 7920 6f72 206f 6e65 206f 7220 6d6f 7265 y or one or more │ │ │ │ +000edb90: 206f 6620 6974 7320 7375 622d 656c 656d of its sub-elem │ │ │ │ +000edba0: 656e 7473 2e20 5468 6973 2073 7479 6c65 ents. This style │ │ │ │ +000edbb0: 2069 7320 7370 6563 6966 6965 6420 666f is specified fo │ │ │ │ +000edbc0: 7220 7468 6520 656e 7469 7265 2073 6572 r the entire ser │ │ │ │ +000edbd0: 7669 6365 2064 6563 6c61 7265 6420 756e vice declared un │ │ │ │ +000edbe0: 6465 7220 6e61 6d65 7370 6163 6520 7072 der namespace pr │ │ │ │ +000edbf0: 6566 6978 203c 636f 6465 3e6e 733c 2f63 efix ns with:
    //gsoap │ │ │ │ +000edc50: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl │ │ │ │ +000edc60: 653a 2020 2020 7270 633c 2f73 7061 6e3e e: rpc │ │ │ │ +000edc70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +000edca0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ +000edcb0: 6520 656e 636f 6469 6e67 3a20 656e 636f e encoding: enco │ │ │ │ +000edcc0: 6465 643c 2f73 7061 6e3e 3c2f 6469 763e ded
    │ │ │ │ +000edcd0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
  • .SOAP document/ │ │ │ │ +000edd00: 6c69 7465 7261 6c20 7573 6573 2058 4d4c literal uses XML │ │ │ │ +000edd10: 2063 6f6e 7374 7261 696e 6564 2074 6f20 constrained to │ │ │ │ +000edd20: 7468 6520 584d 4c20 7363 6865 6d61 2074 the XML schema t │ │ │ │ +000edd30: 6861 7420 6465 6669 6e65 7320 7468 6520 hat defines the │ │ │ │ +000edd40: 584d 4c20 636f 6e74 656e 742e 2054 6865 XML content. The │ │ │ │ +000edd50: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o │ │ │ │ +000edd60: 6620 7472 6565 2d62 6173 6564 2064 6174 f tree-based dat │ │ │ │ +000edd70: 6120 7374 7275 6374 7572 6573 2069 7320 a structures is │ │ │ │ +000edd80: 6163 6375 7261 7465 2069 6e20 584d 4c2e accurate in XML. │ │ │ │ +000edd90: 2054 6865 2073 6572 6961 6c69 7a61 7469 The serializati │ │ │ │ +000edda0: 6f6e 206f 6620 6469 6772 6170 682d 7368 on of digraph-sh │ │ │ │ +000eddb0: 6170 6564 2064 6174 6120 7374 7275 6374 aped data struct │ │ │ │ +000eddc0: 7572 6573 2072 6573 756c 7473 2069 6e20 ures results in │ │ │ │ +000eddd0: 7468 6520 6475 706c 6963 6174 696f 6e20 the duplication │ │ │ │ +000edde0: 6f66 2064 6174 6120 6e6f 6465 7320 7468 of data nodes th │ │ │ │ +000eddf0: 6174 2061 7265 2063 6f2d 7265 6665 7265 at are co-refere │ │ │ │ +000ede00: 6e63 6573 2e20 4379 636c 6963 2064 6174 nces. Cyclic dat │ │ │ │ +000ede10: 6120 7374 7275 6374 7572 6573 2063 616e a structures can │ │ │ │ +000ede20: 6e6f 7420 6265 2061 6363 7572 6174 656c not be accuratel │ │ │ │ +000ede30: 7920 7365 7269 616c 697a 6564 2c20 6275 y serialized, bu │ │ │ │ +000ede40: 7420 796f 7520 6361 6e20 7573 6520 3c63 t you can use #SOAP_XML_GR │ │ │ │ +000ede60: 4150 483c 2f63 6f64 653e 2074 6f20 666f APH to fo │ │ │ │ +000ede70: 7263 6520 7468 6520 7573 6520 6f66 2069 rce the use of i │ │ │ │ +000ede80: 642d 7265 6620 746f 2061 6363 7572 6174 d-ref to accurat │ │ │ │ +000ede90: 656c 7920 7365 7269 616c 697a 6520 6469 ely serialize di │ │ │ │ +000edea0: 6772 6170 6873 2061 6e64 2063 7963 6c69 graphs and cycli │ │ │ │ +000edeb0: 6320 6461 7461 2073 7472 7563 7475 7265 c data structure │ │ │ │ +000edec0: 732e 2054 6865 2053 4f41 5020 426f 6479 s. The SOAP Body │ │ │ │ +000eded0: 206d 6179 2063 6f6e 7461 696e 2061 6e79 may contain any │ │ │ │ +000edee0: 206e 756d 6265 7220 6f66 2058 4d4c 2065 number of XML e │ │ │ │ +000edef0: 6c65 6d65 6e74 732c 2061 7320 6966 2074 lements, as if t │ │ │ │ +000edf00: 6865 2053 4f41 5020 426f 6479 2069 7320 he SOAP Body is │ │ │ │ +000edf10: 7468 6520 726f 6f74 206f 6620 616e 2058 the root of an X │ │ │ │ +000edf20: 4d4c 2064 6f63 756d 656e 742e 204e 6f20 ML document. No │ │ │ │ +000edf30: 3c65 6d3e 3c63 6f64 653e 534f 4150 2d45 SOAP-E │ │ │ │ +000edf40: 4e56 3a65 6e63 6f64 696e 6753 7479 6c65 NV:encodingStyle │ │ │ │ +000edf50: 3d22 2e2e 2e22 3c2f 636f 6465 3e3c 2f65 ="..." attribute sho │ │ │ │ +000edf70: 756c 6420 6170 7065 6172 2069 6e20 6c69 uld appear in li │ │ │ │ +000edf80: 7465 7261 6c20 636f 6e74 656e 742e 2054 teral content. T │ │ │ │ +000edf90: 6869 7320 7374 796c 6520 6973 2073 7065 his style is spe │ │ │ │ +000edfa0: 6369 6669 6564 2066 6f72 2074 6865 2065 cified for the e │ │ │ │ +000edfb0: 6e74 6972 6520 7365 7276 6963 6520 6465 ntire service de │ │ │ │ +000edfc0: 636c 6172 6564 2075 6e64 6572 206e 616d clared under nam │ │ │ │ +000edfd0: 6573 7061 6365 2070 7265 6669 7820 3c63 espace prefix ns wi │ │ │ │ +000edff0: 7468 3a20 3c64 6976 2063 6c61 7373 3d22 th:
    //gsoap ns ser │ │ │ │ +000ee040: 7669 6365 2073 7479 6c65 3a20 2020 2064 vice style: d │ │ │ │ +000ee050: 6f63 756d 656e 743c 2f73 7061 6e3e 3c2f ocument.
    //g │ │ │ │ +000ee090: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ +000ee0a0: 656e 636f 6469 6e67 3a20 6c69 7465 7261 encoding: litera │ │ │ │ +000ee0b0: 6c3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c l
    .< │ │ │ │ +000ee0c0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>.
  • │ │ │ │ +000ee0e0: 534f 4150 2052 5043 206c 6974 6572 616c SOAP RPC literal │ │ │ │ +000ee0f0: 2061 6c73 6f20 7573 6573 2058 4d4c 2063 also uses XML c │ │ │ │ +000ee100: 6f6e 7374 7261 696e 6564 2074 6f20 7468 onstrained to th │ │ │ │ +000ee110: 6520 584d 4c20 7363 6865 6d61 2074 6861 e XML schema tha │ │ │ │ +000ee120: 7420 6465 6669 6e65 7320 7468 6520 584d t defines the XM │ │ │ │ +000ee130: 4c20 636f 6e74 656e 742e 2054 6865 2064 L content. The d │ │ │ │ +000ee140: 6966 6665 7265 6e63 6520 7769 7468 2064 ifference with d │ │ │ │ +000ee150: 6f63 756d 656e 742f 6c69 7465 7261 6c20 ocument/literal │ │ │ │ +000ee160: 6973 2074 6861 7420 7468 6520 534f 4150 is that the SOAP │ │ │ │ +000ee170: 2042 6f64 7920 636f 6e74 6169 6e73 2061 Body contains a │ │ │ │ +000ee180: 7420 6d6f 7374 206f 6e65 2073 6572 7669 t most one servi │ │ │ │ +000ee190: 6365 206f 7065 7261 7469 6f6e 2072 6571 ce operation req │ │ │ │ +000ee1a0: 7565 7374 2065 6c65 6d65 6e74 206f 7220 uest element or │ │ │ │ +000ee1b0: 6174 206d 6f73 7420 6f6e 6520 7365 7276 at most one serv │ │ │ │ +000ee1c0: 6963 6520 6f70 6572 6174 696f 6e20 7265 ice operation re │ │ │ │ +000ee1d0: 7370 6f6e 7365 2065 6c65 6d65 6e74 2e20 sponse element. │ │ │ │ +000ee1e0: 4e6f 203c 656d 3e3c 636f 6465 3e53 4f41 No SOA │ │ │ │ +000ee1f0: 502d 454e 563a 656e 636f 6469 6e67 5374 P-ENV:encodingSt │ │ │ │ +000ee200: 796c 653d 222e 2e2e 223c 2f63 6f64 653e yle="..." │ │ │ │ +000ee210: 3c2f 656d 3e20 6174 7472 6962 7574 6520 attribute │ │ │ │ +000ee220: 7368 6f75 6c64 2061 7070 6561 7220 696e should appear in │ │ │ │ +000ee230: 206c 6974 6572 616c 2063 6f6e 7465 6e74 literal content │ │ │ │ +000ee240: 2e20 5468 6973 2073 7479 6c65 2069 7320 . This style is │ │ │ │ +000ee250: 7370 6563 6966 6965 6420 666f 7220 7468 specified for th │ │ │ │ +000ee260: 6520 656e 7469 7265 2073 6572 7669 6365 e entire service │ │ │ │ +000ee270: 2064 6563 6c61 7265 6420 756e 6465 7220 declared under │ │ │ │ +000ee280: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix │ │ │ │ +000ee290: 203c 636f 6465 3e6e 733c 2f63 6f64 653e ns │ │ │ │ +000ee2a0: 2077 6974 683a 203c 6469 7620 636c 6173 with:
    < │ │ │ │ +000ee2d0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000ee2e0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +000ee2f0: 7365 7276 6963 6520 7374 796c 653a 2020 service style: │ │ │ │ +000ee300: 2020 7270 633c 2f73 7061 6e3e 3c2f 6469 rpc.
    //gso │ │ │ │ +000ee340: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en │ │ │ │ +000ee350: 636f 6469 6e67 3a20 6c69 7465 7261 6c3c coding: literal< │ │ │ │ +000ee360: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .
  • .
. │ │ │ │ +000ee390: 3c70 3e42 6573 6964 6573 203c 636f 6465

Besides //gsoap ns serv │ │ │ │ +000ee3b0: 6963 6520 7374 796c 653c 2f63 6f64 653e ice style │ │ │ │ +000ee3c0: 2061 6e64 203c 636f 6465 3e2f 2f67 736f and //gso │ │ │ │ +000ee3d0: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en │ │ │ │ +000ee3e0: 636f 6469 6e67 3c2f 636f 6465 3e20 7468 coding th │ │ │ │ +000ee3f0: 6572 6520 6172 6520 616c 736f 2074 6865 ere are also the │ │ │ │ +000ee400: 2073 6572 7669 6365 206f 7065 7261 7469 service operati │ │ │ │ +000ee410: 6f6e 2073 7065 6369 6669 6320 7665 7273 on specific vers │ │ │ │ +000ee420: 696f 6e73 203c 636f 6465 3e2f 2f67 736f ions //gso │ │ │ │ +000ee430: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me │ │ │ │ +000ee440: 7468 6f64 2d73 7479 6c65 3c2f 636f 6465 thod-style, //gsoap │ │ │ │ +000ee460: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth │ │ │ │ +000ee470: 6f64 2d72 6573 706f 6e73 652d 7374 796c od-response-styl │ │ │ │ +000ee480: 653c 2f63 6f64 653e 2c20 3c63 6f64 653e e, │ │ │ │ +000ee490: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi │ │ │ │ +000ee4a0: 6365 206d 6574 686f 642d 656e 636f 6469 ce method-encodi │ │ │ │ +000ee4b0: 6e67 3c2f 636f 6465 3e2c 2061 6e64 203c ng, and < │ │ │ │ +000ee4c0: 636f 6465 3e2f 2f67 736f 6170 206e 7320 code>//gsoap ns │ │ │ │ +000ee4d0: 7365 7276 6963 6520 6d65 7468 6f64 2d72 service method-r │ │ │ │ +000ee4e0: 6573 706f 6e73 652d 656e 636f 6469 6e67 esponse-encoding │ │ │ │ +000ee4f0: 3c2f 636f 6465 3e20 7468 6174 2065 7870 that exp │ │ │ │ +000ee500: 6c69 6369 746c 7920 7370 6563 6966 7920 licitly specify │ │ │ │ +000ee510: 534f 4150 2052 5043 2065 6e63 6f64 6564 SOAP RPC encoded │ │ │ │ +000ee520: 2c20 646f 6375 6d65 6e74 2f6c 6974 6572 , document/liter │ │ │ │ +000ee530: 616c 2c20 6f72 2052 5043 206c 6974 6572 al, or RPC liter │ │ │ │ +000ee540: 616c 2073 7479 6c65 206d 6573 7361 6765 al style message │ │ │ │ +000ee550: 7320 666f 7220 7468 6520 696e 6469 6361 s for the indica │ │ │ │ +000ee560: 7465 6420 7365 7276 6963 6520 6f70 6572 ted service oper │ │ │ │ +000ee570: 6174 696f 6e20 6d65 7468 6f64 732e 3c2f ation methods..

To enable │ │ │ │ +000ee590: 534f 4150 2052 5043 2065 6e63 6f64 696e SOAP RPC encodin │ │ │ │ +000ee5a0: 6720 666f 7220 6120 7061 7274 6963 756c g for a particul │ │ │ │ +000ee5b0: 6172 2073 6572 7669 6365 206f 7065 7261 ar service opera │ │ │ │ +000ee5c0: 7469 6f6e 2c20 7573 653a 3c2f 703e 0a3c tion, use:

.< │ │ │ │ +000ee5d0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +000ee5e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
//g │ │ │ │ +000ee610: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ +000ee620: 6d65 7468 6f64 2d73 7479 6c65 3a20 2020 method-style: │ │ │ │ +000ee630: 2077 6562 6d65 7468 6f64 2072 7063 203c webmethod rpc < │ │ │ │ +000ee640: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
.< │ │ │ │ +000ee660: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000ee670: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +000ee680: 7365 7276 6963 6520 6d65 7468 6f64 2d65 service method-e │ │ │ │ +000ee690: 6e63 6f64 696e 673a 2077 6562 6d65 7468 ncoding: webmeth │ │ │ │ +000ee6a0: 6f64 2065 6e63 6f64 6564 203c 2f73 7061 od encoded
.
int │ │ │ │ +000ee6f0: 6e73 5f5f 7765 626d 6574 686f 6428 2e2e ns__webmethod(.. │ │ │ │ +000ee700: 2e29 3c2f 6469 763e 0a3c 2f64 6976 3e3c .)
.
< │ │ │ │ +000ee710: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +000ee720: 3c70 3e54 6f20 656e 6162 6c65 2053 4f41

To enable SOA │ │ │ │ +000ee730: 5020 5250 4320 656e 636f 6469 6e67 2066 P RPC encoding f │ │ │ │ +000ee740: 6f72 2061 2070 6172 7469 6375 6c61 7220 or a particular │ │ │ │ +000ee750: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio │ │ │ │ +000ee760: 6e20 7265 7370 6f6e 7365 2c20 7573 653a n response, use: │ │ │ │ +000ee770: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

.
//gsoap ns se │ │ │ │ +000ee7c0: 7276 6963 6520 6d65 7468 6f64 2d72 6573 rvice method-res │ │ │ │ +000ee7d0: 706f 6e73 652d 7374 796c 653a 2020 2020 ponse-style: │ │ │ │ +000ee7e0: 7765 626d 6574 686f 6420 7270 6320 3c2f webmethod rpc
.
//gsoap ns s │ │ │ │ +000ee830: 6572 7669 6365 206d 6574 686f 642d 7265 ervice method-re │ │ │ │ +000ee840: 7370 6f6e 7365 2d65 6e63 6f64 696e 673a sponse-encoding: │ │ │ │ +000ee850: 2077 6562 6d65 7468 6f64 2065 6e63 6f64 webmethod encod │ │ │ │ +000ee860: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
│ │ │ │ +000ee870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
int │ │ │ │ +000ee8a0: 3c2f 7370 616e 3e20 6e73 5f5f 7765 626d ns__webm │ │ │ │ +000ee8b0: 6574 686f 6428 2e2e 2e29 3c2f 6469 763e ethod(...)
│ │ │ │ +000ee8c0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

Likew │ │ │ │ +000ee8e0: 6973 652c 2079 6f75 2063 616e 2073 7065 ise, you can spe │ │ │ │ +000ee8f0: 6369 6679 2064 6f63 756d 656e 742f 6c69 cify document/li │ │ │ │ +000ee900: 7465 7261 6c20 616e 6420 5250 4320 6c69 teral and RPC li │ │ │ │ +000ee910: 7465 7261 6c20 6d65 7373 6167 6573 2e20 teral messages. │ │ │ │ +000ee920: 5468 6520 6465 6661 756c 7420 7374 796c The default styl │ │ │ │ +000ee930: 6520 6973 2064 6f63 756d 656e 742f 6c69 e is document/li │ │ │ │ +000ee940: 7465 7261 6c2c 2075 6e6c 6573 7320 3c62 teral, unless soapcpp2 │ │ │ │ +000ee960: 2d65 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -e op │ │ │ │ +000ee970: 7469 6f6e 203c 623e 3c63 6f64 653e 2d65 tion -e │ │ │ │ +000ee980: 3c2f 636f 6465 3e3c 2f62 3e20 6973 2075 is u │ │ │ │ +000ee990: 7365 6420 746f 2073 6574 2053 4f41 5020 sed to set SOAP │ │ │ │ +000ee9a0: 5250 4320 656e 636f 6469 6e67 2062 7920 RPC encoding by │ │ │ │ +000ee9b0: 6465 6661 756c 742e 3c2f 703e 0a3c 703e default.

.

│ │ │ │ +000ee9c0: 466f 7220 7468 6520 3c63 6f64 653e 7374 For the st │ │ │ │ +000ee9d0: 796c 653c 2f63 6f64 653e 2064 6972 6563 yle direc │ │ │ │ +000ee9e0: 7469 7665 7320 796f 7520 6361 6e20 7370 tives you can sp │ │ │ │ +000ee9f0: 6563 6966 7920 3c63 6f64 653e 7270 633c ecify rpc< │ │ │ │ +000eea00: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or │ │ │ │ +000eea10: 646f 6375 6d65 6e74 3c2f 636f 6465 3e2e document. │ │ │ │ +000eea20: 2046 6f72 2074 6865 203c 636f 6465 3e65 For the e │ │ │ │ +000eea30: 6e63 6f64 696e 673c 2f63 6f64 653e 2064 ncoding d │ │ │ │ +000eea40: 6972 6563 7469 7665 7320 796f 7520 6361 irectives you ca │ │ │ │ +000eea50: 6e20 7370 6563 6966 7920 3c63 6f64 653e n specify │ │ │ │ +000eea60: 6c69 7465 7261 6c3c 2f63 6f64 653e 2c20 literal, │ │ │ │ +000eea70: 3c63 6f64 653e 656e 636f 6465 643c 2f63 encoded, or even a │ │ │ │ +000eea90: 6375 7374 6f6d 2055 5249 2074 6861 7420 custom URI that │ │ │ │ +000eeaa0: 696e 6469 6361 7465 7320 736f 6d65 2063 indicates some c │ │ │ │ +000eeab0: 7573 746f 6d20 6f72 2070 726f 7072 6965 ustom or proprie │ │ │ │ +000eeac0: 7461 7279 2065 6e63 6f64 696e 6720 666f tary encoding fo │ │ │ │ +000eead0: 726d 6174 2069 6e20 584d 4c20 7768 6963 rmat in XML whic │ │ │ │ +000eeae0: 6820 7769 6c6c 206e 6f74 2069 6e74 6572 h will not inter │ │ │ │ +000eeaf0: 6f70 6572 6174 6520 7769 7468 2053 4f41 operate with SOA │ │ │ │ +000eeb00: 5020 7072 6f63 6573 736f 7273 2074 6861 P processors tha │ │ │ │ +000eeb10: 7420 6172 6520 6e6f 7420 636f 6d70 6174 t are not compat │ │ │ │ +000eeb20: 6962 6c65 2077 6974 6820 7468 6520 7370 ible with the sp │ │ │ │ +000eeb30: 6563 6966 6965 6420 656e 636f 6469 6e67 ecified encoding │ │ │ │ +000eeb40: 2066 6f72 6d61 742e 2053 6565 2061 6c73 format. See als │ │ │ │ +000eeb50: 6f20 5365 6374 696f 6e20 3c61 2063 6c61 o Section Directives< │ │ │ │ +000eeb90: 2f61 3e2e 3c2f 703e 0a3c 703e 5365 6520 /a>.

.

See │ │ │ │ +000eeba0: 616c 736f 203c 6120 6872 6566 3d22 2e2e also C and C++ XML d │ │ │ │ +000eebe0: 6174 6120 6269 6e64 696e 6773 3c2f 613e ata bindings │ │ │ │ +000eebf0: 2064 6f63 756d 656e 7461 7469 6f6e 2066 documentation f │ │ │ │ +000eec00: 6f72 2064 6966 6665 7265 6e63 6573 2069 or differences i │ │ │ │ +000eec10: 6e20 584d 4c20 7365 7269 616c 697a 6174 n XML serializat │ │ │ │ +000eec20: 696f 6e20 7768 656e 2075 7369 6e67 2074 ion when using t │ │ │ │ +000eec30: 6865 2053 4f41 5020 5250 4320 656e 636f he SOAP RPC enco │ │ │ │ +000eec40: 6465 6420 616e 6420 646f 6375 6d65 6e74 ded and document │ │ │ │ +000eec50: 2f6c 6974 6572 616c 206d 6573 7361 6769 /literal messagi │ │ │ │ +000eec60: 6e67 2073 7479 6c65 732e 3c2f 703e 0a3c ng styles.

.< │ │ │ │ +000eec70: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ +000eec90: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ +000eeca0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

.

.Se │ │ │ │ +000eecd0: 7269 616c 697a 696e 6720 6d69 7865 6420 rializing mixed │ │ │ │ +000eece0: 636f 6e74 656e 7420 7769 7468 206c 6974 content with lit │ │ │ │ +000eecf0: 6572 616c 2058 4d4c 2073 7472 696e 6773 eral XML strings │ │ │ │ +000eed00: 3c2f 6833 3e0a 3c70 3e58 4d4c 2069 7320

.

XML is │ │ │ │ +000eed10: 7374 6f72 6564 2069 6e20 226c 6974 6572 stored in "liter │ │ │ │ +000eed20: 616c 2220 584d 4c20 7374 7269 6e67 7320 al" XML strings │ │ │ │ +000eed30: 7768 6963 6820 6172 6520 7468 6520 6275 which are the bu │ │ │ │ +000eed40: 696c 742d 696e 203c 636f 6465 3e5f 584d ilt-in _XM │ │ │ │ +000eed50: 4c3c 2f63 6f64 653e 2074 7970 6520 7468 L type th │ │ │ │ +000eed60: 6174 2069 7320 6120 7265 6775 6c61 7220 at is a regular │ │ │ │ +000eed70: 3c63 6f64 653e 6368 6172 2a3c 2f63 6f64 char* string or you │ │ │ │ +000eed90: 2063 616e 2064 6563 6c61 7265 2061 2077 can declare a w │ │ │ │ +000eeda0: 6964 6520 6368 6172 6163 7465 7220 7374 ide character st │ │ │ │ +000eedb0: 7269 6e67 2069 6e20 616e 2069 6e74 6572 ring in an inter │ │ │ │ +000eedc0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ +000eedd0: 2066 6f72 2073 6f61 7063 7070 3220 6173 for soapcpp2 as │ │ │ │ +000eede0: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c64 follows:

.
type │ │ │ │ +000eee30: 6465 663c 2f73 7061 6e3e 203c 7370 616e def wchar_t *XML;
. │ │ │ │ +000eee70: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

To dec │ │ │ │ +000eee90: 6c61 7265 2061 2043 2b2b 203c 636f 6465 lare a C++ std::string literal XML │ │ │ │ +000eeec0: 7479 7065 3a3c 2f70 3e0a 3c64 6976 2063 type:

.
│ │ │ │ +000eeee0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
typedef< │ │ │ │ +000eef10: 2f73 7061 6e3e 2073 7464 3a3a 7374 7269 /span> std::stri │ │ │ │ +000eef20: 6e67 2058 4d4c 3b3c 2f64 6976 3e0a 3c2f ng XML;
.

Or use a │ │ │ │ +000eef50: 2077 6964 6520 6368 6172 6163 7465 7220 wide character │ │ │ │ +000eef60: 7374 7269 6e67 3a3c 2f70 3e0a 3c64 6976 string:

.
typede │ │ │ │ +000eefb0: 663c 2f73 7061 6e3e 2073 7464 3a3a 7773 f std::ws │ │ │ │ +000eefc0: 7472 696e 6720 584d 4c3b 3c2f 6469 763e tring XML;
│ │ │ │ +000eefd0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

To us │ │ │ │ +000eeff0: 6520 626f 7468 2061 7420 7468 6520 7361 e both at the sa │ │ │ │ +000ef000: 6d65 2074 696d 653a 3c2f 703e 0a3c 6469 me time:

.
typed │ │ │ │ +000ef050: 6566 3c2f 7370 616e 3e20 7374 643a 3a73 ef std::s │ │ │ │ +000ef060: 7472 696e 6720 2058 4d4c 3b3c 2f64 6976 tring XML;
.
typede │ │ │ │ +000ef0a0: 663c 2f73 7061 6e3e 2073 7464 3a3a 7773 f std::ws │ │ │ │ +000ef0b0: 7472 696e 6720 584d 4c5f 3b3c 2f64 6976 tring XML_;
.

The │ │ │ │ +000ef0e0: 6469 6666 6572 656e 6365 7320 6265 7477 differences betw │ │ │ │ +000ef0f0: 6565 6e20 7468 6520 7573 6520 6f66 2072 een the use of r │ │ │ │ +000ef100: 6567 756c 6172 2038 2d62 6974 2073 7472 egular 8-bit str │ │ │ │ +000ef110: 696e 6773 2076 6572 7375 7320 7769 6465 ings versus wide │ │ │ │ +000ef120: 2063 6861 7261 6374 6572 2073 7472 696e character strin │ │ │ │ +000ef130: 6773 2066 6f72 2058 4d4c 2064 6f63 756d gs for XML docum │ │ │ │ +000ef140: 656e 7473 2061 7265 3a3c 2f70 3e0a 3c75 ents are:

..
  • XML liter │ │ │ │ +000ef160: 616c 2073 7472 696e 6773 206d 7573 7420 al strings must │ │ │ │ +000ef170: 686f 6c64 2055 5446 2d38 2058 4d4c 2063 hold UTF-8 XML c │ │ │ │ +000ef180: 6f6e 7465 6e74 2e3c 2f6c 693e 0a3c 6c69 ontent.
  • .
  • Wide character │ │ │ │ +000ef1a0: 584d 4c20 6c69 7465 7261 6c20 7374 7269 XML literal stri │ │ │ │ +000ef1b0: 6e67 7320 6172 6520 636f 6e76 6572 7465 ngs are converte │ │ │ │ +000ef1c0: 6420 746f 2061 6e64 2066 726f 6d20 5554 d to and from UT │ │ │ │ +000ef1d0: 462d 382e 3c2f 6c69 3e0a 3c2f 756c 3e0a F-8.
  • .. │ │ │ │ +000ef1e0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +000ef200: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    │ │ │ │ +000ef240: 0a58 4d4c 2076 616c 6964 6174 696f 6e3c .XML validation< │ │ │ │ +000ef250: 2f68 313e 0a3c 703e 536f 6d65 2058 4d4c /h1>.

    Some XML │ │ │ │ +000ef260: 2076 616c 6964 6174 696f 6e20 636f 6e73 validation cons │ │ │ │ +000ef270: 7472 6169 6e74 7320 6172 6520 6e6f 7420 traints are not │ │ │ │ +000ef280: 6175 746f 6d61 7469 6361 6c6c 7920 7665 automatically ve │ │ │ │ +000ef290: 7269 6669 6564 2075 6e6c 6573 7320 6578 rified unless ex │ │ │ │ +000ef2a0: 706c 6963 6974 6c79 2073 6574 2075 7369 plicitly set usi │ │ │ │ +000ef2b0: 6e67 2074 6865 203c 636f 6465 3e23 534f ng the #SO │ │ │ │ +000ef2c0: 4150 5f58 4d4c 5f53 5452 4943 543c 2f63 AP_XML_STRICT flag. SOAP │ │ │ │ +000ef2e0: 5250 4320 656e 636f 6469 6e67 2069 7320 RPC encoding is │ │ │ │ +000ef2f0: 616e 2058 4d4c 2066 6f72 6d61 7420 7468 an XML format th │ │ │ │ +000ef300: 6174 2064 6f65 7320 6e6f 7420 6166 666f at does not affo │ │ │ │ +000ef310: 7264 2073 7472 6963 7420 584d 4c20 7661 rd strict XML va │ │ │ │ +000ef320: 6c69 6461 7469 6f6e 2c20 6265 6361 7573 lidation, becaus │ │ │ │ +000ef330: 6520 6f66 2074 6865 2061 6464 6974 696f e of the additio │ │ │ │ +000ef340: 6e20 6f66 2053 4f41 502d 7370 6563 6966 n of SOAP-specif │ │ │ │ +000ef350: 6963 2061 7474 7269 6275 7465 7320 616e ic attributes an │ │ │ │ +000ef360: 6420 6f74 6865 7220 736d 616c 6c20 6465 d other small de │ │ │ │ +000ef370: 7669 6174 696f 6e73 2074 6861 7420 7769 viations that wi │ │ │ │ +000ef380: 6c6c 2062 6520 6465 7465 6374 6564 2062 ll be detected b │ │ │ │ +000ef390: 7920 616e 2061 6767 7265 7373 6976 6520 y an aggressive │ │ │ │ +000ef3a0: 584d 4c20 7661 6c69 6461 746f 722c 206c XML validator, l │ │ │ │ +000ef3b0: 6561 6469 6e67 2074 6865 206d 6573 7361 eading the messa │ │ │ │ +000ef3c0: 6769 6e67 2066 6169 6c75 7265 732e 2042 ging failures. B │ │ │ │ +000ef3d0: 7920 746f 6e69 6e67 2058 4d4c 2076 616c y toning XML val │ │ │ │ +000ef3e0: 6964 6174 696f 6e20 646f 776e 2c20 6974 idation down, it │ │ │ │ +000ef3f0: 2068 656c 7073 2074 6f20 696d 7072 6f76 helps to improv │ │ │ │ +000ef400: 6520 534f 4150 2052 5043 2065 6e63 6f64 e SOAP RPC encod │ │ │ │ +000ef410: 696e 6720 696e 7465 726f 7065 7261 6269 ing interoperabi │ │ │ │ +000ef420: 6c69 7479 2e3c 2f70 3e0a 3c70 3e53 7472 lity.

    .

    Str │ │ │ │ +000ef430: 6963 7420 7661 6c69 6461 7469 6f6e 2063 ict validation c │ │ │ │ +000ef440: 6f6e 7374 7261 696e 7473 2061 7265 2065 onstraints are e │ │ │ │ +000ef450: 6e61 626c 6564 2077 6974 6820 7468 6520 nabled with the │ │ │ │ +000ef460: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_ │ │ │ │ +000ef470: 5354 5249 4354 3c2f 636f 6465 3e20 6d6f STRICT mo │ │ │ │ +000ef480: 6465 2066 6c61 6720 7365 742c 2065 2e67 de flag set, e.g │ │ │ │ +000ef490: 2e20 7769 7468 203c 636f 6465 3e73 6f61 . with soa │ │ │ │ +000ef4a0: 705f 7365 745f 696d 6f64 6528 736f 6170 p_set_imode(soap │ │ │ │ +000ef4b0: 2c20 534f 4150 5f58 4d4c 5f53 5452 4943 , SOAP_XML_STRIC │ │ │ │ +000ef4c0: 5429 3c2f 636f 6465 3e20 6f72 203c 636f T) or soap_new(SOAP │ │ │ │ +000ef4e0: 5f58 4d4c 5f53 5452 4943 5429 3c2f 636f _XML_STRICT), see Section │ │ │ │ +000ef500: 203c 6120 636c 6173 733d 2265 6c22 2068 Run-time │ │ │ │ +000ef530: 666c 6167 733c 2f61 3e20 666f 7220 7468 flags for th │ │ │ │ +000ef540: 6520 636f 6d70 6c65 7465 206c 6973 7420 e complete list │ │ │ │ +000ef550: 6f66 2066 6c61 6773 2e3c 2f70 3e0a 3c70 of flags.

    .

    The next sectio │ │ │ │ +000ef570: 6e73 2064 6573 6372 6962 6520 7468 6520 ns describe the │ │ │ │ +000ef580: 7479 7065 206f 6620 636f 6e73 7472 6169 type of constrai │ │ │ │ +000ef590: 6e74 7320 7661 6c69 6461 7465 6420 7768 nts validated wh │ │ │ │ +000ef5a0: 656e 203c 636f 6465 3e23 534f 4150 5f58 en #SOAP_X │ │ │ │ +000ef5b0: 4d4c 5f53 5452 4943 543c 2f63 6f64 653e ML_STRICT │ │ │ │ +000ef5c0: 2069 7320 656e 6162 6c65 6420 616e 6420 is enabled and │ │ │ │ +000ef5d0: 7661 6c69 6461 7469 6f6e 2063 6f6e 7374 validation const │ │ │ │ +000ef5e0: 7261 696e 7473 2061 7265 2073 7065 6369 raints are speci │ │ │ │ +000ef5f0: 6669 6564 2069 6e20 7468 6520 696e 7465 fied in the inte │ │ │ │ +000ef600: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil │ │ │ │ +000ef610: 652e 3c2f 703e 0a3c 703e 5573 6520 636f e.

    .

    Use co │ │ │ │ +000ef620: 6d70 696c 6572 2066 6c61 6720 3c63 6f64 mpiler flag #WITH_REPLACE_ │ │ │ │ +000ef640: 494c 4c45 4741 4c5f 5554 4638 3c2f 636f ILLEGAL_UTF8 to force str │ │ │ │ +000ef660: 6963 7420 5554 462d 3820 7465 7874 2063 ict UTF-8 text c │ │ │ │ +000ef670: 6f6e 7665 7273 696f 6e73 2c20 7768 6963 onversions, whic │ │ │ │ +000ef680: 6820 7265 706c 6163 6573 2069 6e76 616c h replaces inval │ │ │ │ +000ef690: 6964 2055 5446 2d38 2077 6974 6820 552b id UTF-8 with U+ │ │ │ │ +000ef6a0: 4646 4644 2e3c 2f70 3e0a 3c70 3e53 6565 FFFD.

    .

    See │ │ │ │ +000ef6b0: 2061 6c73 6f20 3c61 2068 7265 663d 222e also C and C++ XML │ │ │ │ +000ef6f0: 6461 7461 2062 696e 6469 6e67 733c 2f61 data bindings documentation │ │ │ │ +000ef710: 666f 7220 6d6f 7265 2064 6574 6169 6c73 for more details │ │ │ │ +000ef720: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ +000ef740: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ +000ef750: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 323e nts

    .

    │ │ │ │ +000ef760: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Defaul │ │ │ │ +000ef790: 7420 7661 6c75 6573 3c2f 6832 3e0a 3c70 t values

    .

    Default values │ │ │ │ +000ef7b0: 6361 6e20 6265 2064 6566 696e 6564 2066 can be defined f │ │ │ │ +000ef7c0: 6f72 206f 7074 696f 6e61 6c20 656c 656d or optional elem │ │ │ │ +000ef7d0: 656e 7473 2061 6e64 2061 7474 7269 6275 ents and attribu │ │ │ │ +000ef7e0: 7465 732c 2077 6869 6368 206d 6561 6e73 tes, which means │ │ │ │ +000ef7f0: 2074 6861 7420 7468 6520 6465 6661 756c that the defaul │ │ │ │ +000ef800: 7420 7661 6c75 6520 7769 6c6c 2062 6520 t value will be │ │ │ │ +000ef810: 7573 6564 2077 6865 6e20 7468 6520 656c used when the el │ │ │ │ +000ef820: 656d 656e 7420 6f72 2061 7474 7269 6275 ement or attribu │ │ │ │ +000ef830: 7465 2076 616c 7565 2069 7320 6e6f 7420 te value is not │ │ │ │ +000ef840: 7072 6573 656e 7420 696e 2074 6865 2070 present in the p │ │ │ │ +000ef850: 6172 7365 6420 584d 4c2e 2053 6565 2061 arsed XML. See a │ │ │ │ +000ef860: 6c73 6f20 5365 6374 696f 6e20 3c61 2063 lso Section Default valu │ │ │ │ +000ef8a0: 6573 2066 6f72 206f 6d69 7474 6564 2058 es for omitted X │ │ │ │ +000ef8b0: 4d4c 2065 6c65 6d65 6e74 7320 616e 6420 ML elements and │ │ │ │ +000ef8c0: 6174 7472 6962 7574 6573 3c2f 613e 2061 attributes a │ │ │ │ +000ef8d0: 6e64 2065 7861 6d70 6c65 7320 696e 2073 nd examples in s │ │ │ │ +000ef8e0: 7562 7365 7175 656e 7420 7375 6273 6563 ubsequent subsec │ │ │ │ +000ef8f0: 7469 6f6e 7320 6265 6c6f 772e 3c2f 703e tions below.

    │ │ │ │ +000ef900: 0a3c 703e 4465 6661 756c 7420 7661 6c75 .

    Default valu │ │ │ │ +000ef910: 6573 206d 7573 7420 6265 2070 7269 6d69 es must be primi │ │ │ │ +000ef920: 7469 7665 2074 7970 6573 2c20 696e 7465 tive types, inte │ │ │ │ +000ef930: 6765 722c 2066 6c6f 6174 2c20 7374 7269 ger, float, stri │ │ │ │ +000ef940: 6e67 2c20 6574 632e 206f 7220 706f 696e ng, etc. or poin │ │ │ │ +000ef950: 7465 7273 2074 6f20 7072 696d 6974 6976 ters to primitiv │ │ │ │ +000ef960: 6520 7479 7065 732e 2044 6566 6175 6c74 e types. Default │ │ │ │ +000ef970: 2076 616c 7565 7320 6361 6e20 6265 2073 values can be s │ │ │ │ +000ef980: 7065 6369 6669 6564 2066 6f72 2073 7472 pecified for str │ │ │ │ +000ef990: 7563 7420 616e 6420 636c 6173 7320 6d65 uct and class me │ │ │ │ +000ef9a0: 6d62 6572 732c 2061 7320 7368 6f77 6e20 mbers, as shown │ │ │ │ +000ef9b0: 696e 2074 6865 2065 7861 6d70 6c65 2062 in the example b │ │ │ │ +000ef9c0: 656c 6f77 3a3c 2f70 3e0a 3c64 6976 2063 elow:

    .
    │ │ │ │ +000ef9e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ +000efa10: 2f73 7061 6e3e 6e73 5f5f 4d79 5265 636f /span>ns__MyReco │ │ │ │ +000efa20: 7264 203c 2f64 6976 3e0a 3c64 6976 2063 rd
    .
    {.
    {
    . │ │ │ │ -000efa70: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -000efa90: 743c 2f73 7061 6e3e 206e 203d 2035 3b20 t n = 5; │ │ │ │ -000efaa0: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ -000efac0: 2f2f 206f 7074 696f 6e61 6c20 656c 656d // optional elem │ │ │ │ -000efad0: 656e 7420 7769 7468 2064 6566 6175 6c74 ent with default │ │ │ │ -000efae0: 2076 616c 7565 2035 203c 2f73 7061 6e3e value 5 │ │ │ │ -000efaf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *name = "non │ │ │ │ -000efb60: 6526 7175 6f74 3b3c 2f73 7061 6e3e 3b20 e"; │ │ │ │ -000efb70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona │ │ │ │ -000efb90: 6c20 656c 656d 656e 7420 7769 7468 2064 l element with d │ │ │ │ -000efba0: 6566 6175 6c74 2076 616c 7565 2026 7175 efault value &qu │ │ │ │ -000efbb0: 6f74 3b6e 6f6e 6526 7175 6f74 3b20 3c2f ot;none"
    .
    │ │ │ │ -000efbe0: 4020 3c73 7061 6e20 636c 6173 733d 226b @ enum ns__color { │ │ │ │ -000efc10: 5245 442c 2057 4849 5445 2c20 424c 5545 RED, WHITE, BLUE │ │ │ │ -000efc20: 207d 2063 6f6c 6f72 203d 2052 4544 3b20 } color = RED; │ │ │ │ -000efc30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona │ │ │ │ -000efc50: 6c20 6174 7472 6962 7574 6520 7769 7468 l attribute with │ │ │ │ -000efc60: 2064 6566 6175 6c74 2076 616c 7565 2052 default value R │ │ │ │ -000efc70: 4544 203c 2f73 7061 6e3e 3c2f 6469 763e ED
    │ │ │ │ -000efc80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    Upon deser │ │ │ │ -000efcc0: 6961 6c69 7a61 7469 6f6e 206f 6620 6162 ialization of ab │ │ │ │ -000efcd0: 7365 6e74 2064 6174 612c 2074 6865 7365 sent data, these │ │ │ │ -000efce0: 206d 656d 6265 7273 2077 696c 6c20 6265 members will be │ │ │ │ -000efcf0: 2073 6574 2061 6363 6f72 6469 6e67 6c79 set accordingly │ │ │ │ -000efd00: 2e20 5768 656e 2063 6c61 7373 6573 2061 . When classes a │ │ │ │ -000efd10: 7265 2069 6e73 7461 6e74 6961 7465 6420 re instantiated │ │ │ │ -000efd20: 7769 7468 203c 636f 6465 3e73 6f61 705f with soap_ │ │ │ │ -000efd30: 6e65 775f 436c 6173 734e 616d 653c 2f63 new_ClassName the instanc │ │ │ │ -000efd50: 6520 7769 6c6c 2062 6520 696e 6974 6961 e will be initia │ │ │ │ -000efd60: 6c69 7a65 6420 7769 7468 2064 6566 6175 lized with defau │ │ │ │ -000efd70: 6c74 2076 616c 7565 732e 3c2f 703e 0a3c lt values.

    .< │ │ │ │ -000efd80: 703e 5365 6520 616c 736f 203c 6120 6872 p>See also C and C++ │ │ │ │ -000efdc0: 2058 4d4c 2064 6174 6120 6269 6e64 696e XML data bindin │ │ │ │ -000efdd0: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta │ │ │ │ -000efde0: 7469 6f6e 2066 6f72 206d 6f72 6520 6465 tion for more de │ │ │ │ -000efdf0: 7461 696c 732e 3c2f 703e 0a3c 703e f09f tails.

    .

    .. │ │ │ │ -000efe00: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ -000efe10: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ -000efe20: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ -000efe30: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .Occu │ │ │ │ -000efe60: 7272 656e 6365 2063 6f6e 7374 7261 696e rrence constrain │ │ │ │ -000efe70: 7473 3c2f 6832 3e0a 3c70 3e4f 6363 7572 ts

    .

    Occur │ │ │ │ -000efe80: 7265 6e63 6520 636f 6e73 7472 6169 6e74 rence constraint │ │ │ │ -000efe90: 7320 7370 6563 6966 7920 7468 6520 6d69 s specify the mi │ │ │ │ -000efea0: 6e69 6d75 6d20 616e 642f 6f72 206d 6178 nimum and/or max │ │ │ │ -000efeb0: 696d 756d 2066 7265 7175 656e 6379 206f imum frequency o │ │ │ │ -000efec0: 7220 6f70 7469 6f6e 616c 6974 7920 6f66 r optionality of │ │ │ │ -000efed0: 206f 6620 6174 7472 6962 7574 6573 2061 of attributes a │ │ │ │ -000efee0: 6e64 2065 6c65 6d65 6e74 732e 3c2f 703e nd elements.

    │ │ │ │ -000efef0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -000eff10: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .El │ │ │ │ -000eff50: 656d 656e 7473 2077 6974 6820 6d69 6e4f ements with minO │ │ │ │ -000eff60: 6363 7572 7320 616e 6420 6d61 784f 6363 ccurs and maxOcc │ │ │ │ -000eff70: 7572 7320 7265 7374 7269 6374 696f 6e73 urs restrictions │ │ │ │ -000eff80: 3c2f 6833 3e0a 3c70 3e54 6f20 666f 7263

    .

    To forc │ │ │ │ -000eff90: 6520 7468 6520 7661 6c69 6461 7469 6f6e e the validation │ │ │ │ -000effa0: 206f 6620 6d69 6e4f 6363 7572 7320 616e of minOccurs an │ │ │ │ -000effb0: 6420 6d61 784f 6363 7572 7320 636f 6e73 d maxOccurs cons │ │ │ │ -000effc0: 7472 6169 6e74 7320 7468 6520 3c63 6f64 traints the #SOAP_XML_STRI │ │ │ │ -000effe0: 4354 3c2f 636f 6465 3e20 696e 7075 7420 CT input │ │ │ │ -000efff0: 6d6f 6465 2066 6c61 6720 6d75 7374 2062 mode flag must b │ │ │ │ -000f0000: 6520 7365 742e 2054 6865 206d 696e 4f63 e set. The minOc │ │ │ │ -000f0010: 6375 7273 2061 6e64 206d 6178 4f63 6375 curs and maxOccu │ │ │ │ -000f0020: 7273 2063 6f6e 7374 7261 696e 7473 2061 rs constraints a │ │ │ │ -000f0030: 7265 2073 7065 6369 6669 6564 2066 6f72 re specified for │ │ │ │ -000f0040: 206d 656d 6265 7273 206f 6620 6120 7374 members of a st │ │ │ │ -000f0050: 7275 6374 2061 6e64 206d 656d 6265 7273 ruct and members │ │ │ │ -000f0060: 206f 6620 6120 636c 6173 7320 696e 2061 of a class in a │ │ │ │ -000f0070: 2068 6561 6465 7220 6669 6c65 2075 7369 header file usi │ │ │ │ -000f0080: 6e67 2074 6865 2066 6f6c 6c6f 7769 6e67 ng the following │ │ │ │ -000f0090: 2073 796e 7461 783a 3c2f 703e 0a3c 6469 syntax:

    .
    Type member │ │ │ │ -000f00d0: 6e61 6d65 203c 7370 616e 2063 6c61 7373 name nullp │ │ │ │ -000f00f0: 7472 3c2f 7370 616e 3e20 6d69 6e4f 6363 tr minOcc │ │ │ │ -000f0100: 7572 7320 3a20 6d61 784f 6363 7572 7320 urs : maxOccurs │ │ │ │ -000f0110: 3d20 7661 6c75 653b 3c2f 6469 763e 0a3c = value;
    .< │ │ │ │ -000f0120: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The nullptr is optional an │ │ │ │ -000f0160: 6420 696e 6469 6361 7465 7320 7468 6174 d indicates that │ │ │ │ -000f0170: 2074 6865 206d 656d 6265 7220 6973 206e the member is n │ │ │ │ -000f0180: 696c 6c61 626c 6520 2867 534f 4150 2076 illable (gSOAP v │ │ │ │ -000f0190: 6572 7369 6f6e 2032 2e38 2e32 3420 6f72 ersion 2.8.24 or │ │ │ │ -000f01a0: 2067 7265 6174 6572 292c 2077 6869 6368 greater), which │ │ │ │ -000f01b0: 206d 6561 6e73 2074 6861 7420 7768 656e means that when │ │ │ │ -000f01c0: 204e 554c 4c20 616e 2065 6d70 7479 2065 NULL an empty e │ │ │ │ -000f01d0: 6c65 6d65 6e74 2077 6974 6820 3c65 6d3e lement with │ │ │ │ -000f01e0: 3c63 6f64 653e 7873 693a 6e69 6c3d 2274 xsi:nil="t │ │ │ │ -000f01f0: 7275 6522 3c2f 636f 6465 3e3c 2f65 6d3e rue" │ │ │ │ -000f0200: 2069 7320 6164 6465 6420 696e 2074 6865 is added in the │ │ │ │ -000f0210: 2073 6572 6961 6c69 7a65 6420 584d 4c2e serialized XML. │ │ │ │ -000f0220: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The minOccurs and max │ │ │ │ -000f0250: 4f63 6375 7273 3c2f 636f 6465 3e20 6172 Occurs ar │ │ │ │ -000f0260: 6520 6f70 7469 6f6e 616c 2076 616c 7565 e optional value │ │ │ │ -000f0270: 7320 7468 6174 206d 7573 7420 6265 2069 s that must be i │ │ │ │ -000f0280: 6e74 6567 6572 206c 6974 6572 616c 732e nteger literals. │ │ │ │ -000f0290: 2057 6865 6e20 3c63 6f64 653e 6d61 784f When maxO │ │ │ │ -000f02a0: 6363 7572 733c 2f63 6f64 653e 2069 7320 ccurs is │ │ │ │ -000f02b0: 6e6f 7420 7370 6563 6966 6965 6420 7468 not specified th │ │ │ │ -000f02c0: 656e 2074 6865 2063 6f6c 6f6e 2063 616e en the colon can │ │ │ │ -000f02d0: 2062 6520 6f6d 6974 7465 642e 2057 6865 be omitted. Whe │ │ │ │ -000f02e0: 6e20 3c63 6f64 653e 6d69 6e4f 6363 7572 n minOccur │ │ │ │ -000f02f0: 733c 2f63 6f64 653e 2069 7320 6e6f 7420 s is not │ │ │ │ -000f0300: 7370 6563 6966 6965 6420 6974 2069 7320 specified it is │ │ │ │ -000f0310: 6173 7375 6d65 6420 746f 2062 6520 6f6e assumed to be on │ │ │ │ -000f0320: 6520 2831 2920 666f 7220 6e6f 6e2d 706f e (1) for non-po │ │ │ │ -000f0330: 696e 7465 7220 6d65 6d62 6572 7320 7468 inter members th │ │ │ │ -000f0340: 6174 2061 7265 2065 6c65 6d65 6e74 7320 at are elements │ │ │ │ -000f0350: 616e 6420 7a65 726f 2028 3029 2066 6f72 and zero (0) for │ │ │ │ -000f0360: 206d 656d 6265 7273 2074 6861 7420 6172 members that ar │ │ │ │ -000f0370: 6520 706f 696e 7465 7273 206f 7220 6172 e pointers or ar │ │ │ │ -000f0380: 6520 6174 7472 6962 7574 6573 2028 692e e attributes (i. │ │ │ │ -000f0390: 652e 2068 6176 6520 6120 3c63 6f64 653e e. have a │ │ │ │ -000f03a0: 403c 2f63 6f64 653e 2071 7561 6c69 6669 @ qualifi │ │ │ │ -000f03b0: 6572 292e 3c2f 703e 0a3c 703e 4120 6465 er).

    .

    A de │ │ │ │ -000f03c0: 6661 756c 7420 696e 6974 6961 6c69 7a61 fault initializa │ │ │ │ -000f03d0: 7469 6f6e 203c 636f 6465 3e76 616c 7565 tion value │ │ │ │ -000f03e0: 3c2f 636f 6465 3e20 6d61 7920 6265 2070 may be p │ │ │ │ -000f03f0: 726f 7669 6465 6420 616e 6420 6973 206f rovided and is o │ │ │ │ -000f0400: 7074 696f 6e61 6c2e 3c2f 703e 0a3c 703e ptional.

    .

    │ │ │ │ -000f0410: 4120 6669 7865 6420 696e 6974 6961 6c69 A fixed initiali │ │ │ │ -000f0420: 7a61 7469 6f6e 2076 616c 7565 2063 616e zation value can │ │ │ │ -000f0430: 2062 6520 7370 6563 6966 6965 6420 7769 be specified wi │ │ │ │ -000f0440: 7468 203c 636f 6465 3e3d 3d3c 2f63 6f64 th == (gSOAP versio │ │ │ │ -000f0460: 6e20 322e 382e 3438 206f 7220 6772 6561 n 2.8.48 or grea │ │ │ │ -000f0470: 7465 7229 2e3c 2f70 3e0a 3c70 3e46 6f72 ter).

    .

    For │ │ │ │ -000f0480: 2065 7861 6d70 6c65 3c2f 703e 0a3c 6469 example

    .
    struc │ │ │ │ -000f04d0: 7420 3c2f 7370 616e 3e6e 735f 5f4d 7952 t ns__MyR │ │ │ │ -000f04e0: 6563 6f72 6420 3c2f 6469 763e 0a3c 6469 ecord
    .{ │ │ │ │ -000f0500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int n 0 = 5; │ │ │ │ -000f0550: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // element │ │ │ │ -000f0570: 2077 6974 6820 6465 6661 756c 7420 7661 with default va │ │ │ │ -000f0580: 6c75 6520 352c 206d 696e 4f63 6375 7273 lue 5, minOccurs │ │ │ │ -000f0590: 3d30 2c20 6d61 784f 6363 7572 733d 313c =0, maxOccurs=1< │ │ │ │ -000f05a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -000f05c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -000f05e0: 3c2f 7370 616e 3e20 6d3b 2020 2020 2020 m; │ │ │ │ -000f05f0: 2020 2020 2020 3c73 7061 6e20 636c 6173 // e │ │ │ │ -000f0610: 6c65 6d65 6e74 2077 6974 6820 6d69 6e4f lement with minO │ │ │ │ -000f0620: 6363 7572 733d 3120 3c2f 7370 616e 3e3c ccurs=1 < │ │ │ │ -000f0630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int │ │ │ │ -000f0670: 202a 6b20 3c73 7061 6e20 636c 6173 733d *k nullpt │ │ │ │ -000f0690: 723c 2f73 7061 6e3e 2031 3b20 3c73 7061 r 1; // element wit │ │ │ │ -000f06c0: 6820 6d69 6e4f 6363 7572 733d 3120 616e h minOccurs=1 an │ │ │ │ -000f06d0: 6420 6e69 6c6c 6162 6c65 3d74 7275 6520 d nillable=true │ │ │ │ -000f06e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -000f0700: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -000f0720: 743c 2f73 7061 6e3e 2076 203d 3d20 323b t v == 2; │ │ │ │ -000f0730: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -000f0750: 656c 656d 656e 7420 7769 7468 206d 696e element with min │ │ │ │ -000f0760: 4f63 6375 7273 3d31 2061 6e64 2066 6978 Occurs=1 and fix │ │ │ │ -000f0770: 6564 2076 616c 7565 2032 203c 2f73 7061 ed value 2

    .
    < │ │ │ │ -000f07a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f07b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int __size 0:10; │ │ │ │ -000f07d0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // seque │ │ │ │ -000f07f0: 6e63 6520 266c 743b 6974 656d 2667 743b nce <item> │ │ │ │ -000f0800: 2077 6974 6820 6d69 6e4f 6363 7572 733d with minOccurs= │ │ │ │ -000f0810: 302c 206d 6178 4f63 6375 7273 3d31 303c 0, maxOccurs=10< │ │ │ │ -000f0820: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -000f0840: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -000f0860: 3c2f 7370 616e 3e20 2a69 7465 6d3b 203c *item; < │ │ │ │ -000f0870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    std: │ │ │ │ -000f0890: 3a76 6563 746f 7226 6c74 3b64 6f75 626c :vector<doubl │ │ │ │ -000f08a0: 6526 6774 3b20 6e75 6d73 2032 3b20 3c73 e> nums 2; // sequence │ │ │ │ -000f08d0: 266c 743b 6e75 6d73 2667 743b 2077 6974 <nums> wit │ │ │ │ -000f08e0: 6820 6d69 6e4f 6363 7572 733d 322c 206d h minOccurs=2, m │ │ │ │ -000f08f0: 6178 4f63 6375 7273 3d75 6e62 6f75 6e64 axOccurs=unbound │ │ │ │ -000f0900: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    │ │ │ │ -000f0910: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    . │ │ │ │ -000f0940: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ -000f0970: 7472 7563 7420 3c2f 7370 616e 3e61 7272 truct arr │ │ │ │ -000f0980: 6179 4f66 696e 7420 3c2f 6469 763e 0a3c ayOfint
    .< │ │ │ │ +000efa50: 6c69 6e65 223e 2020 2020 3c73 7061 6e20 line"> int n │ │ │ │ +000efa80: 203d 2035 3b20 2020 2020 2020 2020 2020 = 5; │ │ │ │ +000efa90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona │ │ │ │ +000efab0: 6c20 656c 656d 656e 7420 7769 7468 2064 l element with d │ │ │ │ +000efac0: 6566 6175 6c74 2076 616c 7565 2035 203c efault value 5 < │ │ │ │ +000efad0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +000efaf0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ +000efb10: 723c 2f73 7061 6e3e 202a 6e61 6d65 203d r *name = │ │ │ │ +000efb20: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +000efb40: 6f74 3b6e 6f6e 6526 7175 6f74 3b3c 2f73 ot;none"; // o │ │ │ │ +000efb70: 7074 696f 6e61 6c20 656c 656d 656e 7420 ptional element │ │ │ │ +000efb80: 7769 7468 2064 6566 6175 6c74 2076 616c with default val │ │ │ │ +000efb90: 7565 2026 7175 6f74 3b6e 6f6e 6526 7175 ue "none&qu │ │ │ │ +000efba0: 6f74 3b20 3c2f 7370 616e 3e3c 2f64 6976 ot;
    .
    @ en │ │ │ │ +000efbe0: 756d 3c2f 7370 616e 3e20 6e73 5f5f 636f um ns__co │ │ │ │ +000efbf0: 6c6f 7220 7b20 5245 442c 2057 4849 5445 lor { RED, WHITE │ │ │ │ +000efc00: 2c20 424c 5545 207d 2063 6f6c 6f72 203d , BLUE } color = │ │ │ │ +000efc10: 2052 4544 3b20 3c73 7061 6e20 636c 6173 RED; // o │ │ │ │ +000efc30: 7074 696f 6e61 6c20 6174 7472 6962 7574 ptional attribut │ │ │ │ +000efc40: 6520 7769 7468 2064 6566 6175 6c74 2076 e with default v │ │ │ │ +000efc50: 616c 7565 2052 4544 203c 2f73 7061 6e3e alue RED │ │ │ │ +000efc60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    Upon │ │ │ │ +000efca0: 2064 6573 6572 6961 6c69 7a61 7469 6f6e deserialization │ │ │ │ +000efcb0: 206f 6620 6162 7365 6e74 2064 6174 612c of absent data, │ │ │ │ +000efcc0: 2074 6865 7365 206d 656d 6265 7273 2077 these members w │ │ │ │ +000efcd0: 696c 6c20 6265 2073 6574 2061 6363 6f72 ill be set accor │ │ │ │ +000efce0: 6469 6e67 6c79 2e20 5768 656e 2063 6c61 dingly. When cla │ │ │ │ +000efcf0: 7373 6573 2061 7265 2069 6e73 7461 6e74 sses are instant │ │ │ │ +000efd00: 6961 7465 6420 7769 7468 203c 636f 6465 iated with soap_new_ClassN │ │ │ │ +000efd20: 616d 653c 2f63 6f64 653e 2074 6865 2069 ame the i │ │ │ │ +000efd30: 6e73 7461 6e63 6520 7769 6c6c 2062 6520 nstance will be │ │ │ │ +000efd40: 696e 6974 6961 6c69 7a65 6420 7769 7468 initialized with │ │ │ │ +000efd50: 2064 6566 6175 6c74 2076 616c 7565 732e default values. │ │ │ │ +000efd60: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

    .

    See also │ │ │ │ +000efd70: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f C a │ │ │ │ +000efda0: 6e64 2043 2b2b 2058 4d4c 2064 6174 6120 nd C++ XML data │ │ │ │ +000efdb0: 6269 6e64 696e 6773 3c2f 613e 2064 6f63 bindings doc │ │ │ │ +000efdc0: 756d 656e 7461 7469 6f6e 2066 6f72 206d umentation for m │ │ │ │ +000efdd0: 6f72 6520 6465 7461 696c 732e 3c2f 703e ore details.

    │ │ │ │ +000efde0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ +000efe00: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Occurrence con │ │ │ │ +000efe50: 7374 7261 696e 7473 3c2f 6832 3e0a 3c70 straints

    .

    Occurrence cons │ │ │ │ +000efe70: 7472 6169 6e74 7320 7370 6563 6966 7920 traints specify │ │ │ │ +000efe80: 7468 6520 6d69 6e69 6d75 6d20 616e 642f the minimum and/ │ │ │ │ +000efe90: 6f72 206d 6178 696d 756d 2066 7265 7175 or maximum frequ │ │ │ │ +000efea0: 656e 6379 206f 7220 6f70 7469 6f6e 616c ency or optional │ │ │ │ +000efeb0: 6974 7920 6f66 206f 6620 6174 7472 6962 ity of of attrib │ │ │ │ +000efec0: 7574 6573 2061 6e64 2065 6c65 6d65 6e74 utes and element │ │ │ │ +000efed0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ +000efee0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +000efef0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +000eff00: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    < │ │ │ │ +000eff30: 2f61 3e0a 456c 656d 656e 7473 2077 6974 /a>.Elements wit │ │ │ │ +000eff40: 6820 6d69 6e4f 6363 7572 7320 616e 6420 h minOccurs and │ │ │ │ +000eff50: 6d61 784f 6363 7572 7320 7265 7374 7269 maxOccurs restri │ │ │ │ +000eff60: 6374 696f 6e73 3c2f 6833 3e0a 3c70 3e54 ctions

    .

    T │ │ │ │ +000eff70: 6f20 666f 7263 6520 7468 6520 7661 6c69 o force the vali │ │ │ │ +000eff80: 6461 7469 6f6e 206f 6620 6d69 6e4f 6363 dation of minOcc │ │ │ │ +000eff90: 7572 7320 616e 6420 6d61 784f 6363 7572 urs and maxOccur │ │ │ │ +000effa0: 7320 636f 6e73 7472 6169 6e74 7320 7468 s constraints th │ │ │ │ +000effb0: 6520 3c63 6f64 653e 2353 4f41 505f 584d e #SOAP_XM │ │ │ │ +000effc0: 4c5f 5354 5249 4354 3c2f 636f 6465 3e20 L_STRICT │ │ │ │ +000effd0: 696e 7075 7420 6d6f 6465 2066 6c61 6720 input mode flag │ │ │ │ +000effe0: 6d75 7374 2062 6520 7365 742e 2054 6865 must be set. The │ │ │ │ +000efff0: 206d 696e 4f63 6375 7273 2061 6e64 206d minOccurs and m │ │ │ │ +000f0000: 6178 4f63 6375 7273 2063 6f6e 7374 7261 axOccurs constra │ │ │ │ +000f0010: 696e 7473 2061 7265 2073 7065 6369 6669 ints are specifi │ │ │ │ +000f0020: 6564 2066 6f72 206d 656d 6265 7273 206f ed for members o │ │ │ │ +000f0030: 6620 6120 7374 7275 6374 2061 6e64 206d f a struct and m │ │ │ │ +000f0040: 656d 6265 7273 206f 6620 6120 636c 6173 embers of a clas │ │ │ │ +000f0050: 7320 696e 2061 2068 6561 6465 7220 6669 s in a header fi │ │ │ │ +000f0060: 6c65 2075 7369 6e67 2074 6865 2066 6f6c le using the fol │ │ │ │ +000f0070: 6c6f 7769 6e67 2073 796e 7461 783a 3c2f lowing syntax:.

    Type │ │ │ │ +000f00b0: 6d65 6d62 6572 6e61 6d65 203c 7370 616e membername nullptr │ │ │ │ +000f00e0: 6d69 6e4f 6363 7572 7320 3a20 6d61 784f minOccurs : maxO │ │ │ │ +000f00f0: 6363 7572 7320 3d20 7661 6c75 653b 3c2f ccurs = value;.

    T │ │ │ │ +000f0120: 6865 203c 636f 6465 3e6e 756c 6c70 7472 he nullptr │ │ │ │ +000f0130: 3c2f 636f 6465 3e20 6973 206f 7074 696f is optio │ │ │ │ +000f0140: 6e61 6c20 616e 6420 696e 6469 6361 7465 nal and indicate │ │ │ │ +000f0150: 7320 7468 6174 2074 6865 206d 656d 6265 s that the membe │ │ │ │ +000f0160: 7220 6973 206e 696c 6c61 626c 6520 2867 r is nillable (g │ │ │ │ +000f0170: 534f 4150 2076 6572 7369 6f6e 2032 2e38 SOAP version 2.8 │ │ │ │ +000f0180: 2e32 3420 6f72 2067 7265 6174 6572 292c .24 or greater), │ │ │ │ +000f0190: 2077 6869 6368 206d 6561 6e73 2074 6861 which means tha │ │ │ │ +000f01a0: 7420 7768 656e 204e 554c 4c20 616e 2065 t when NULL an e │ │ │ │ +000f01b0: 6d70 7479 2065 6c65 6d65 6e74 2077 6974 mpty element wit │ │ │ │ +000f01c0: 6820 3c65 6d3e 3c63 6f64 653e 7873 693a h xsi: │ │ │ │ +000f01d0: 6e69 6c3d 2274 7275 6522 3c2f 636f 6465 nil="true" is added │ │ │ │ +000f01f0: 696e 2074 6865 2073 6572 6961 6c69 7a65 in the serialize │ │ │ │ +000f0200: 6420 584d 4c2e 3c2f 703e 0a3c 703e 5468 d XML.

    .

    Th │ │ │ │ +000f0210: 6520 3c63 6f64 653e 6d69 6e4f 6363 7572 e minOccur │ │ │ │ +000f0220: 733c 2f63 6f64 653e 2061 6e64 203c 636f s and maxOccurs are optional │ │ │ │ +000f0250: 2076 616c 7565 7320 7468 6174 206d 7573 values that mus │ │ │ │ +000f0260: 7420 6265 2069 6e74 6567 6572 206c 6974 t be integer lit │ │ │ │ +000f0270: 6572 616c 732e 2057 6865 6e20 3c63 6f64 erals. When maxOccurs is not specif │ │ │ │ +000f02a0: 6965 6420 7468 656e 2074 6865 2063 6f6c ied then the col │ │ │ │ +000f02b0: 6f6e 2063 616e 2062 6520 6f6d 6974 7465 on can be omitte │ │ │ │ +000f02c0: 642e 2057 6865 6e20 3c63 6f64 653e 6d69 d. When mi │ │ │ │ +000f02d0: 6e4f 6363 7572 733c 2f63 6f64 653e 2069 nOccurs i │ │ │ │ +000f02e0: 7320 6e6f 7420 7370 6563 6966 6965 6420 s not specified │ │ │ │ +000f02f0: 6974 2069 7320 6173 7375 6d65 6420 746f it is assumed to │ │ │ │ +000f0300: 2062 6520 6f6e 6520 2831 2920 666f 7220 be one (1) for │ │ │ │ +000f0310: 6e6f 6e2d 706f 696e 7465 7220 6d65 6d62 non-pointer memb │ │ │ │ +000f0320: 6572 7320 7468 6174 2061 7265 2065 6c65 ers that are ele │ │ │ │ +000f0330: 6d65 6e74 7320 616e 6420 7a65 726f 2028 ments and zero ( │ │ │ │ +000f0340: 3029 2066 6f72 206d 656d 6265 7273 2074 0) for members t │ │ │ │ +000f0350: 6861 7420 6172 6520 706f 696e 7465 7273 hat are pointers │ │ │ │ +000f0360: 206f 7220 6172 6520 6174 7472 6962 7574 or are attribut │ │ │ │ +000f0370: 6573 2028 692e 652e 2068 6176 6520 6120 es (i.e. have a │ │ │ │ +000f0380: 3c63 6f64 653e 403c 2f63 6f64 653e 2071 @ q │ │ │ │ +000f0390: 7561 6c69 6669 6572 292e 3c2f 703e 0a3c ualifier).

    .< │ │ │ │ +000f03a0: 703e 4120 6465 6661 756c 7420 696e 6974 p>A default init │ │ │ │ +000f03b0: 6961 6c69 7a61 7469 6f6e 203c 636f 6465 ialization value ma │ │ │ │ +000f03d0: 7920 6265 2070 726f 7669 6465 6420 616e y be provided an │ │ │ │ +000f03e0: 6420 6973 206f 7074 696f 6e61 6c2e 3c2f d is optional..

    A fixed in │ │ │ │ +000f0400: 6974 6961 6c69 7a61 7469 6f6e 2076 616c itialization val │ │ │ │ +000f0410: 7565 2063 616e 2062 6520 7370 6563 6966 ue can be specif │ │ │ │ +000f0420: 6965 6420 7769 7468 203c 636f 6465 3e3d ied with = │ │ │ │ +000f0430: 3d3c 2f63 6f64 653e 2028 6753 4f41 5020 = (gSOAP │ │ │ │ +000f0440: 7665 7273 696f 6e20 322e 382e 3438 206f version 2.8.48 o │ │ │ │ +000f0450: 7220 6772 6561 7465 7229 2e3c 2f70 3e0a r greater).

    . │ │ │ │ +000f0460: 3c70 3e46 6f72 2065 7861 6d70 6c65 3c2f

    For example.

    struct n │ │ │ │ +000f04c0: 735f 5f4d 7952 6563 6f72 6420 3c2f 6469 s__MyRecord .
    {
    . │ │ │ │ +000f0500: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ +000f0520: 3c2f 7370 616e 3e20 6e20 3020 3d20 353b n 0 = 5; │ │ │ │ +000f0530: 2020 2020 2020 3c73 7061 6e20 636c 6173 // e │ │ │ │ +000f0550: 6c65 6d65 6e74 2077 6974 6820 6465 6661 lement with defa │ │ │ │ +000f0560: 756c 7420 7661 6c75 6520 352c 206d 696e ult value 5, min │ │ │ │ +000f0570: 4f63 6375 7273 3d30 2c20 6d61 784f 6363 Occurs=0, maxOcc │ │ │ │ +000f0580: 7572 733d 313c 2f73 7061 6e3e 3c2f 6469 urs=1.
    int m; │ │ │ │ +000f05d0: 2020 2020 2020 2020 2020 2020 3c73 7061 // element wit │ │ │ │ +000f0600: 6820 6d69 6e4f 6363 7572 733d 3120 3c2f h minOccurs=1
    .
    │ │ │ │ +000f0630: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +000f0650: 2f73 7061 6e3e 202a 6b20 3c73 7061 6e20 /span> *k │ │ │ │ +000f0670: 6e75 6c6c 7074 723c 2f73 7061 6e3e 2031 nullptr 1 │ │ │ │ +000f0680: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // eleme │ │ │ │ +000f06a0: 6e74 2077 6974 6820 6d69 6e4f 6363 7572 nt with minOccur │ │ │ │ +000f06b0: 733d 3120 616e 6420 6e69 6c6c 6162 6c65 s=1 and nillable │ │ │ │ +000f06c0: 3d74 7275 6520 3c2f 7370 616e 3e3c 2f64 =true .
    int v │ │ │ │ +000f0710: 203d 3d20 323b 2020 2020 2020 203c 7370 == 2; // element wi │ │ │ │ +000f0740: 7468 206d 696e 4f63 6375 7273 3d31 2061 th minOccurs=1 a │ │ │ │ +000f0750: 6e64 2066 6978 6564 2076 616c 7565 2032 nd fixed value 2 │ │ │ │ +000f0760: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +000f0770: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f0780: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i │ │ │ │ +000f07a0: 6e74 3c2f 7370 616e 3e20 5f5f 7369 7a65 nt __size │ │ │ │ +000f07b0: 2030 3a31 303b 2020 3c73 7061 6e20 636c 0:10; // │ │ │ │ +000f07d0: 2073 6571 7565 6e63 6520 266c 743b 6974 sequence <it │ │ │ │ +000f07e0: 656d 2667 743b 2077 6974 6820 6d69 6e4f em> with minO │ │ │ │ +000f07f0: 6363 7572 733d 302c 206d 6178 4f63 6375 ccurs=0, maxOccu │ │ │ │ +000f0800: 7273 3d31 303c 2f73 7061 6e3e 3c2f 6469 rs=10.
    int *i │ │ │ │ +000f0850: 7465 6d3b 203c 2f64 6976 3e0a 3c64 6976 tem;
    .
    │ │ │ │ +000f0870: 2020 7374 643a 3a76 6563 746f 7226 6c74 std::vector< │ │ │ │ +000f0880: 3b64 6f75 626c 6526 6774 3b20 6e75 6d73 ;double> nums │ │ │ │ +000f0890: 2032 3b20 3c73 7061 6e20 636c 6173 733d 2; // seq │ │ │ │ +000f08b0: 7565 6e63 6520 266c 743b 6e75 6d73 2667 uence <nums&g │ │ │ │ +000f08c0: 743b 2077 6974 6820 6d69 6e4f 6363 7572 t; with minOccur │ │ │ │ +000f08d0: 733d 322c 206d 6178 4f63 6375 7273 3d75 s=2, maxOccurs=u │ │ │ │ +000f08e0: 6e62 6f75 6e64 6564 203c 2f73 7061 6e3e nbounded │ │ │ │ +000f08f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    .< │ │ │ │ +000f0940: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000f0950: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct arrayOfint .
    {
    .< │ │ │ │ 000f0990: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f09a0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    < │ │ │ │ -000f09c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f09d0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int *__ptr 1:100 │ │ │ │ -000f09f0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // minOc │ │ │ │ -000f0a10: 6375 7273 3d31 2c20 6d61 784f 6363 7572 curs=1, maxOccur │ │ │ │ -000f0a20: 733d 3130 3020 3c2f 7370 616e 3e3c 2f64 s=100 .
    int s │ │ │ │ -000f0a70: 697a 653b 203c 2f64 6976 3e0a 3c64 6976 ize;
    .
    }; │ │ │ │ -000f0a90: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    See also C and C++ │ │ │ │ -000f0af0: 584d 4c20 6461 7461 2062 696e 6469 6e67 XML data binding │ │ │ │ -000f0b00: 733c 2f61 3e20 646f 6375 6d65 6e74 6174 s documentat │ │ │ │ -000f0b10: 696f 6e20 666f 7220 6d6f 7265 2064 6574 ion for more det │ │ │ │ -000f0b20: 6169 6c73 2e3c 2f70 3e0a 3c70 3ef0 9f94 ails.

    .

    ... │ │ │ │ -000f0b30: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -000f0b40: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -000f0b50: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -000f0b60: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .Required a │ │ │ │ -000f0ba0: 6e64 2070 726f 6869 6269 7465 6420 6174 nd prohibited at │ │ │ │ -000f0bb0: 7472 6962 7574 6573 3c2f 6833 3e0a 3c70 tributes

    .

    Similar to the │ │ │ │ -000f0bd0: 6d69 6e4f 6363 7572 7320 616e 6420 6d61 minOccurs and ma │ │ │ │ -000f0be0: 784f 6363 7572 7320 616e 6e6f 7461 7469 xOccurs annotati │ │ │ │ -000f0bf0: 6f6e 7320 6465 6669 6e65 6420 696e 2074 ons defined in t │ │ │ │ -000f0c00: 6865 2070 7265 7669 6f75 7320 7365 6374 he previous sect │ │ │ │ -000f0c10: 696f 6e2c 2061 7474 7269 6275 7465 7320 ion, attributes │ │ │ │ -000f0c20: 696e 2061 2073 7472 7563 7420 6f72 2063 in a struct or c │ │ │ │ -000f0c30: 6c61 7373 2063 616e 2062 6520 616e 6e6f lass can be anno │ │ │ │ -000f0c40: 7461 7465 6420 7769 7468 206f 6363 7572 tated with occur │ │ │ │ -000f0c50: 7265 6e63 6520 636f 6e73 7472 6169 6e74 rence constraint │ │ │ │ -000f0c60: 7320 746f 206d 616b 6520 7468 656d 206f s to make them o │ │ │ │ -000f0c70: 7074 696f 6e61 6c20 2830 292c 2072 6571 ptional (0), req │ │ │ │ -000f0c80: 7569 7265 6420 2831 292c 206f 7220 7072 uired (1), or pr │ │ │ │ -000f0c90: 6f68 6962 6974 6564 2028 303a 3029 2e20 ohibited (0:0). │ │ │ │ -000f0ca0: 4465 6661 756c 7420 7661 6c75 6573 2063 Default values c │ │ │ │ -000f0cb0: 616e 2062 6520 6173 7369 676e 6564 2074 an be assigned t │ │ │ │ -000f0cc0: 6f20 6f70 7469 6f6e 616c 2061 7474 7269 o optional attri │ │ │ │ -000f0cd0: 6275 7465 732e 3c2f 703e 0a3c 703e 466f butes.

    .

    Fo │ │ │ │ -000f0ce0: 7220 6578 616d 706c 653c 2f70 3e0a 3c64 r example

    .
    stru │ │ │ │ -000f0d30: 6374 203c 2f73 7061 6e3e 6e73 5f5f 4d79 ct ns__My │ │ │ │ -000f0d40: 5265 636f 7264 203c 2f64 6976 3e0a 3c64 Record
    . i │ │ │ │ +000f09c0: 6e74 3c2f 7370 616e 3e20 2a5f 5f70 7472 nt *__ptr │ │ │ │ +000f09d0: 2031 3a31 3030 3b20 3c73 7061 6e20 636c 1:100; // │ │ │ │ +000f09f0: 206d 696e 4f63 6375 7273 3d31 2c20 6d61 minOccurs=1, ma │ │ │ │ +000f0a00: 784f 6363 7572 733d 3130 3020 3c2f 7370 xOccurs=100
    .
    │ │ │ │ +000f0a30: 3c73 7061 6e20 636c 6173 733d 226b 6579 int size;
    .
    };
    .

    See also │ │ │ │ +000f0aa0: 3c61 2068 7265 663d 222e 2e2f 2e2e 2f64 C an │ │ │ │ +000f0ad0: 6420 432b 2b20 584d 4c20 6461 7461 2062 d C++ XML data b │ │ │ │ +000f0ae0: 696e 6469 6e67 733c 2f61 3e20 646f 6375 indings docu │ │ │ │ +000f0af0: 6d65 6e74 6174 696f 6e20 666f 7220 6d6f mentation for mo │ │ │ │ +000f0b00: 7265 2064 6574 6169 6c73 2e3c 2f70 3e0a re details.

    . │ │ │ │ +000f0b10: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +000f0b30: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .Requ │ │ │ │ +000f0b80: 6972 6564 2061 6e64 2070 726f 6869 6269 ired and prohibi │ │ │ │ +000f0b90: 7465 6420 6174 7472 6962 7574 6573 3c2f ted attributes.

    Similar t │ │ │ │ +000f0bb0: 6f20 7468 6520 6d69 6e4f 6363 7572 7320 o the minOccurs │ │ │ │ +000f0bc0: 616e 6420 6d61 784f 6363 7572 7320 616e and maxOccurs an │ │ │ │ +000f0bd0: 6e6f 7461 7469 6f6e 7320 6465 6669 6e65 notations define │ │ │ │ +000f0be0: 6420 696e 2074 6865 2070 7265 7669 6f75 d in the previou │ │ │ │ +000f0bf0: 7320 7365 6374 696f 6e2c 2061 7474 7269 s section, attri │ │ │ │ +000f0c00: 6275 7465 7320 696e 2061 2073 7472 7563 butes in a struc │ │ │ │ +000f0c10: 7420 6f72 2063 6c61 7373 2063 616e 2062 t or class can b │ │ │ │ +000f0c20: 6520 616e 6e6f 7461 7465 6420 7769 7468 e annotated with │ │ │ │ +000f0c30: 206f 6363 7572 7265 6e63 6520 636f 6e73 occurrence cons │ │ │ │ +000f0c40: 7472 6169 6e74 7320 746f 206d 616b 6520 traints to make │ │ │ │ +000f0c50: 7468 656d 206f 7074 696f 6e61 6c20 2830 them optional (0 │ │ │ │ +000f0c60: 292c 2072 6571 7569 7265 6420 2831 292c ), required (1), │ │ │ │ +000f0c70: 206f 7220 7072 6f68 6962 6974 6564 2028 or prohibited ( │ │ │ │ +000f0c80: 303a 3029 2e20 4465 6661 756c 7420 7661 0:0). Default va │ │ │ │ +000f0c90: 6c75 6573 2063 616e 2062 6520 6173 7369 lues can be assi │ │ │ │ +000f0ca0: 676e 6564 2074 6f20 6f70 7469 6f6e 616c gned to optional │ │ │ │ +000f0cb0: 2061 7474 7269 6275 7465 732e 3c2f 703e attributes.

    │ │ │ │ +000f0cc0: 0a3c 703e 466f 7220 6578 616d 706c 653c .

    For example< │ │ │ │ +000f0cd0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct │ │ │ │ +000f0d20: 6e73 5f5f 4d79 5265 636f 7264 203c 2f64 ns__MyRecord .
    {
    . │ │ │ │ -000f0d60: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    @ int m 1; │ │ │ │ -000f0dc0: 2f2f 2072 6571 7569 7265 6420 6174 7472 // required attr │ │ │ │ -000f0dd0: 6962 7574 6520 286f 6363 7572 7320 6174 ibute (occurs at │ │ │ │ -000f0de0: 206c 6561 7374 206f 6e63 6529 203c 2f73 least once)
    .
    @ │ │ │ │ -000f0e10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int n = 5; // optional a │ │ │ │ -000f0e60: 7474 7269 6275 7465 2077 6974 6820 6465 ttribute with de │ │ │ │ -000f0e70: 6661 756c 7420 7661 6c75 6520 353c 2f73 fault value 5
    .
    @ │ │ │ │ -000f0ea0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int o 0; // optional a │ │ │ │ -000f0ef0: 7474 7269 6275 7465 2028 6d61 7920 6f72 ttribute (may or │ │ │ │ -000f0f00: 206d 6179 206e 6f74 206f 6363 7572 2920 may not occur) │ │ │ │ -000f0f10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -000f0f30: 2020 4020 3c73 7061 6e20 636c 6173 733d @ in │ │ │ │ -000f0f50: 743c 2f73 7061 6e3e 2070 2030 3a30 3b20 t p 0:0; │ │ │ │ -000f0f60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // prohibi │ │ │ │ -000f0f80: 7465 6420 6174 7472 6962 7574 6520 3c2f ted attribute
    .
    }; │ │ │ │ -000f0fb0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    Remember to set │ │ │ │ -000f0fe0: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP │ │ │ │ -000f0ff0: 5f58 4d4c 5f53 5452 4943 543c 2f63 6f64 _XML_STRICT input mode fl │ │ │ │ -000f1010: 6167 2074 6f20 656e 6162 6c65 2074 6865 ag to enable the │ │ │ │ -000f1020: 2076 616c 6964 6174 696f 6e20 6f66 2061 validation of a │ │ │ │ -000f1030: 7474 7269 6275 7465 206f 6363 7572 7265 ttribute occurre │ │ │ │ -000f1040: 6e63 6520 636f 6e73 7472 6169 6e74 732e nce constraints. │ │ │ │ -000f1050: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

    .

    See also │ │ │ │ -000f1060: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f C a │ │ │ │ -000f1090: 6e64 2043 2b2b 2058 4d4c 2064 6174 6120 nd C++ XML data │ │ │ │ -000f10a0: 6269 6e64 696e 6773 3c2f 613e 2064 6f63 bindings doc │ │ │ │ -000f10b0: 756d 656e 7461 7469 6f6e 2066 6f72 206d umentation for m │ │ │ │ -000f10c0: 6f72 6520 6465 7461 696c 732e 3c2f 703e ore details.

    │ │ │ │ -000f10d0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -000f10f0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Value co │ │ │ │ -000f1140: 6e73 7472 6169 6e74 733c 2f68 323e 0a3c nstraints

    .< │ │ │ │ -000f1150: 703e 5661 6c75 6520 636f 6e73 7472 6169 p>Value constrai │ │ │ │ -000f1160: 6e74 7320 7265 7374 7269 6374 2074 6865 nts restrict the │ │ │ │ -000f1170: 206c 656e 6774 6820 6f66 2073 7472 696e length of strin │ │ │ │ -000f1180: 6773 2061 6e64 2074 6865 2072 616e 6765 gs and the range │ │ │ │ -000f1190: 206f 6620 7661 6c75 6573 206f 6620 6e75 of values of nu │ │ │ │ -000f11a0: 6d65 7269 6320 7479 7065 732e 3c2f 703e meric types.

    │ │ │ │ -000f11b0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -000f11d0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Data le │ │ │ │ -000f1220: 6e67 7468 2072 6573 7472 6963 7469 6f6e ngth restriction │ │ │ │ -000f1230: 733c 2f68 333e 0a3c 703e 4120 7363 6865 s

    .

    A sche │ │ │ │ -000f1240: 6d61 2073 696d 706c 6554 7970 6520 6973 ma simpleType is │ │ │ │ -000f1250: 2064 6566 696e 6564 2077 6974 6820 6120 defined with a │ │ │ │ -000f1260: 3c63 6f64 653e 7479 7065 6465 663c 2f63 typedef by taking a │ │ │ │ -000f1280: 2062 6173 6520 7072 696d 6974 6976 6520 base primitive │ │ │ │ -000f1290: 746f 2064 6566 696e 6564 2061 2064 6572 to defined a der │ │ │ │ -000f12a0: 6976 6564 2073 696d 706c 6554 7970 652e ived simpleType. │ │ │ │ -000f12b0: 2046 6f72 2065 7861 6d70 6c65 3a3c 2f70 For example:

    .
    │ │ │ │ -000f1300: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef < │ │ │ │ -000f1310: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f1320: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int time__second │ │ │ │ -000f1340: 733b 3c2f 6469 763e 0a3c 2f64 6976 3e3c s;
    .
    < │ │ │ │ -000f1350: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -000f1360: 3c70 3e54 6869 7320 6465 6669 6e65 7320

    This defines │ │ │ │ -000f1370: 7468 6520 666f 6c6c 6f77 696e 6720 7363 the following sc │ │ │ │ -000f1380: 6865 6d61 2074 7970 6520 696e 203c 656d hema type in time.xsd< │ │ │ │ -000f13a0: 2f63 6f64 653e 3c2f 656d 3e3a 3c2f 703e /code>:

    │ │ │ │ -000f13b0: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
    << │ │ │ │ -000f13f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f1400: 6f72 6474 7970 6522 3e73 696d 706c 6554 ordtype">simpleT │ │ │ │ -000f1410: 7970 653c 2f73 7061 6e3e 203c 7370 616e ype name="s │ │ │ │ -000f1460: 6563 6f6e 6473 2671 756f 743b 3c2f 7370 econds">
    .< │ │ │ │ -000f1480: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f1490: 3e20 2026 6c74 3b3c 7370 616e 2063 6c61 > <restriction base="xsd:int& │ │ │ │ -000f1510: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/> │ │ │ │ -000f1520: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    </ │ │ │ │ -000f1540: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple │ │ │ │ -000f1560: 5479 7065 3c2f 7370 616e 3e26 6774 3b3c Type>< │ │ │ │ -000f1570: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    A complex │ │ │ │ -000f15a0: 5479 7065 2077 6974 6820 7369 6d70 6c65 Type with simple │ │ │ │ -000f15b0: 436f 6e74 656e 7420 6973 2064 6566 696e Content is defin │ │ │ │ -000f15c0: 6564 2077 6974 6820 6120 7772 6170 7065 ed with a wrappe │ │ │ │ -000f15d0: 7220 7374 7275 6374 2f63 6c61 7373 3a3c r struct/class:< │ │ │ │ -000f15e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct │ │ │ │ -000f1630: 7469 6d65 5f5f 6461 7465 203c 2f64 6976 time__date
    in │ │ │ │ +000f0d80: 743c 2f73 7061 6e3e 206d 2031 3b20 2020 t m 1; │ │ │ │ +000f0d90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // require │ │ │ │ +000f0db0: 6420 6174 7472 6962 7574 6520 286f 6363 d attribute (occ │ │ │ │ +000f0dc0: 7572 7320 6174 206c 6561 7374 206f 6e63 urs at least onc │ │ │ │ +000f0dd0: 6529 203c 2f73 7061 6e3e 3c2f 6469 763e e)
    │ │ │ │ +000f0de0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    @ int n = │ │ │ │ +000f0e20: 353b 203c 7370 616e 2063 6c61 7373 3d22 5; // opti │ │ │ │ +000f0e40: 6f6e 616c 2061 7474 7269 6275 7465 2077 onal attribute w │ │ │ │ +000f0e50: 6974 6820 6465 6661 756c 7420 7661 6c75 ith default valu │ │ │ │ +000f0e60: 6520 353c 2f73 7061 6e3e 3c2f 6469 763e e 5
    │ │ │ │ +000f0e70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    @ int o 0; │ │ │ │ +000f0eb0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // opti │ │ │ │ +000f0ed0: 6f6e 616c 2061 7474 7269 6275 7465 2028 onal attribute ( │ │ │ │ +000f0ee0: 6d61 7920 6f72 206d 6179 206e 6f74 206f may or may not o │ │ │ │ +000f0ef0: 6363 7572 2920 3c2f 7370 616e 3e3c 2f64 ccur) .
    @ int p │ │ │ │ +000f0f40: 2030 3a30 3b20 3c73 7061 6e20 636c 6173 0:0; // p │ │ │ │ +000f0f60: 726f 6869 6269 7465 6420 6174 7472 6962 rohibited attrib │ │ │ │ +000f0f70: 7574 6520 3c2f 7370 616e 3e3c 2f64 6976 ute
    .
    };
    .

    Remember │ │ │ │ +000f0fc0: 746f 2073 6574 2074 6865 203c 636f 6465 to set the #SOAP_XML_STRIC │ │ │ │ +000f0fe0: 543c 2f63 6f64 653e 2069 6e70 7574 206d T input m │ │ │ │ +000f0ff0: 6f64 6520 666c 6167 2074 6f20 656e 6162 ode flag to enab │ │ │ │ +000f1000: 6c65 2074 6865 2076 616c 6964 6174 696f le the validatio │ │ │ │ +000f1010: 6e20 6f66 2061 7474 7269 6275 7465 206f n of attribute o │ │ │ │ +000f1020: 6363 7572 7265 6e63 6520 636f 6e73 7472 ccurrence constr │ │ │ │ +000f1030: 6169 6e74 732e 3c2f 703e 0a3c 703e 5365 aints.

    .

    Se │ │ │ │ +000f1040: 6520 616c 736f 203c 6120 6872 6566 3d22 e also C and C++ XML │ │ │ │ +000f1080: 2064 6174 6120 6269 6e64 696e 6773 3c2f data bindings documentation │ │ │ │ +000f10a0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail │ │ │ │ +000f10b0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ +000f10c0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +000f10d0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +000f10e0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Va │ │ │ │ +000f1120: 6c75 6520 636f 6e73 7472 6169 6e74 733c lue constraints< │ │ │ │ +000f1130: 2f68 323e 0a3c 703e 5661 6c75 6520 636f /h2>.

    Value co │ │ │ │ +000f1140: 6e73 7472 6169 6e74 7320 7265 7374 7269 nstraints restri │ │ │ │ +000f1150: 6374 2074 6865 206c 656e 6774 6820 6f66 ct the length of │ │ │ │ +000f1160: 2073 7472 696e 6773 2061 6e64 2074 6865 strings and the │ │ │ │ +000f1170: 2072 616e 6765 206f 6620 7661 6c75 6573 range of values │ │ │ │ +000f1180: 206f 6620 6e75 6d65 7269 6320 7479 7065 of numeric type │ │ │ │ +000f1190: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ +000f11a0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +000f11b0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +000f11c0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    .D │ │ │ │ +000f1200: 6174 6120 6c65 6e67 7468 2072 6573 7472 ata length restr │ │ │ │ +000f1210: 6963 7469 6f6e 733c 2f68 333e 0a3c 703e ictions

    .

    │ │ │ │ +000f1220: 4120 7363 6865 6d61 2073 696d 706c 6554 A schema simpleT │ │ │ │ +000f1230: 7970 6520 6973 2064 6566 696e 6564 2077 ype is defined w │ │ │ │ +000f1240: 6974 6820 6120 3c63 6f64 653e 7479 7065 ith a type │ │ │ │ +000f1250: 6465 663c 2f63 6f64 653e 2062 7920 7461 def by ta │ │ │ │ +000f1260: 6b69 6e67 2061 2062 6173 6520 7072 696d king a base prim │ │ │ │ +000f1270: 6974 6976 6520 746f 2064 6566 696e 6564 itive to defined │ │ │ │ +000f1280: 2061 2064 6572 6976 6564 2073 696d 706c a derived simpl │ │ │ │ +000f1290: 6554 7970 652e 2046 6f72 2065 7861 6d70 eType. For examp │ │ │ │ +000f12a0: 6c65 3a3c 2f70 3e0a 3c64 6976 2063 6c61 le:

    .
    │ │ │ │ +000f12d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef i │ │ │ │ +000f1310: 6e74 3c2f 7370 616e 3e20 7469 6d65 5f5f nt time__ │ │ │ │ +000f1320: 7365 636f 6e64 733b 3c2f 6469 763e 0a3c seconds;
    .< │ │ │ │ +000f1330: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This de │ │ │ │ +000f1350: 6669 6e65 7320 7468 6520 666f 6c6c 6f77 fines the follow │ │ │ │ +000f1360: 696e 6720 7363 6865 6d61 2074 7970 6520 ing schema type │ │ │ │ +000f1370: 696e 203c 656d 3e3c 636f 6465 3e74 696d in tim │ │ │ │ +000f1380: 652e 7873 643c 2f63 6f64 653e 3c2f 656d e.xsd:

    .
    < │ │ │ │ +000f13c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f13d0: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><s │ │ │ │ +000f13f0: 696d 706c 6554 7970 653c 2f73 7061 6e3e impleType │ │ │ │ +000f1400: 203c 7370 616e 2063 6c61 7373 3d22 6b65 name=& │ │ │ │ +000f1440: 7175 6f74 3b73 6563 6f6e 6473 2671 756f quot;seconds&quo │ │ │ │ +000f1450: 743b 3c2f 7370 616e 3e26 6774 3b20 3c2f t;> .
    <restricti │ │ │ │ +000f14a0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on │ │ │ │ +000f14c0: 6261 7365 3c2f 7370 616e 3e3d 3c73 7061 base="xs │ │ │ │ +000f14f0: 643a 696e 7426 7175 6f74 3b3c 2f73 7061 d:int"/>
    .< │ │ │ │ +000f1510: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f1520: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></ │ │ │ │ +000f1540: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType>
    .

    A c │ │ │ │ +000f1580: 6f6d 706c 6578 5479 7065 2077 6974 6820 omplexType with │ │ │ │ +000f1590: 7369 6d70 6c65 436f 6e74 656e 7420 6973 simpleContent is │ │ │ │ +000f15a0: 2064 6566 696e 6564 2077 6974 6820 6120 defined with a │ │ │ │ +000f15b0: 7772 6170 7065 7220 7374 7275 6374 2f63 wrapper struct/c │ │ │ │ +000f15c0: 6c61 7373 3a3c 2f70 3e0a 3c64 6976 2063 lass:

    .
    │ │ │ │ +000f15e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ +000f1610: 2f73 7061 6e3e 7469 6d65 5f5f 6461 7465 /span>time__date │ │ │ │ +000f1620: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    {
    .
    │ │ │ │ -000f1670: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ -000f1690: 3c2f 7370 616e 3e20 2a5f 5f69 7465 6d3b *__item; │ │ │ │ -000f16a0: 203c 7370 616e 2063 6c61 7373 3d22 636f // some c │ │ │ │ -000f16c0: 7573 746f 6d20 666f 726d 6174 2064 6174 ustom format dat │ │ │ │ -000f16d0: 6520 2872 6573 7472 6963 7469 6f6e 206f e (restriction o │ │ │ │ -000f16e0: 6620 7374 7269 6e67 2920 3c2f 7370 616e f string)
    .
    @ enum │ │ │ │ -000f1730: 7469 6d65 5f5f 7a6f 6e65 207b 2045 5354 time__zone { EST │ │ │ │ -000f1740: 2c20 474d 542c 202e 2e2e 207d 207a 6f6e , GMT, ... } zon │ │ │ │ -000f1750: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    }.

    Th │ │ │ │ -000f1790: 6973 2064 6566 696e 6573 2074 6865 2066 is defines the f │ │ │ │ -000f17a0: 6f6c 6c6f 7769 6e67 2073 6368 656d 6120 ollowing schema │ │ │ │ -000f17b0: 7479 7065 2069 6e20 3c65 6d3e 3c63 6f64 type in time.xsd:

    .
    <complexType< │ │ │ │ -000f1840: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nam │ │ │ │ -000f1860: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="date& │ │ │ │ -000f1890: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;> │ │ │ │ -000f18a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    < │ │ │ │ -000f18c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple │ │ │ │ -000f18e0: 436f 6e74 656e 743c 2f73 7061 6e3e 2667 Content&g │ │ │ │ -000f18f0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    │ │ │ │ -000f1910: 266c 743b 3c73 7061 6e20 636c 6173 733d <ex │ │ │ │ -000f1930: 7465 6e73 696f 6e3c 2f73 7061 6e3e 203c tension < │ │ │ │ -000f1940: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f1950: 6f72 6422 3e62 6173 653c 2f73 7061 6e3e ord">base │ │ │ │ -000f1960: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000f1980: 6f74 3b78 7364 3a73 7472 696e 6726 7175 ot;xsd:string&qu │ │ │ │ -000f1990: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> │ │ │ │ -000f19a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </ │ │ │ │ -000f19c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 simple │ │ │ │ -000f19e0: 436f 6e74 656e 743c 2f73 7061 6e3e 2667 Content&g │ │ │ │ -000f19f0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    &l │ │ │ │ -000f1a10: 743b 3c73 7061 6e20 636c 6173 733d 226b t;attr │ │ │ │ -000f1a30: 6962 7574 653c 2f73 7061 6e3e 203c 7370 ibute name=< │ │ │ │ -000f1a60: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000f1a70: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000f1a80: 3b7a 6f6e 6526 7175 6f74 3b3c 2f73 7061 ;zone" type="time:zone │ │ │ │ -000f1ae0: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " use=< │ │ │ │ -000f1b10: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000f1b20: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000f1b30: 3b6f 7074 696f 6e61 6c26 7175 6f74 3b3c ;optional"< │ │ │ │ -000f1b40: 2f73 7061 6e3e 2f26 6774 3b20 3c2f 6469 /span>/> .
    </complexType< │ │ │ │ -000f1b90: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    │ │ │ │ -000f1ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <simpleType name="zone" │ │ │ │ -000f1c30: 3b3c 2f73 7061 6e3e 2667 743b 203c 2f64 ;> .
    <restrictio │ │ │ │ -000f1c80: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n b │ │ │ │ -000f1ca0: 6173 653c 2f73 7061 6e3e 3d3c 7370 616e ase="xsd │ │ │ │ -000f1cd0: 3a73 7472 696e 6726 7175 6f74 3b3c 2f73 :string">
    . │ │ │ │ -000f1cf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <enumeration< │ │ │ │ -000f1d30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val │ │ │ │ -000f1d50: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="EST& │ │ │ │ -000f1d80: 7175 6f74 3b3c 2f73 7061 6e3e 2f26 6774 quot;/> │ │ │ │ -000f1d90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    & │ │ │ │ -000f1db0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;enu │ │ │ │ -000f1dd0: 6d65 7261 7469 6f6e 3c2f 7370 616e 3e20 meration │ │ │ │ -000f1de0: 3c73 7061 6e20 636c 6173 733d 226b 6579 value=& │ │ │ │ -000f1e20: 7175 6f74 3b47 4d54 2671 756f 743b 3c2f quot;GMT"/>
    .
    ... .
    </restrictio │ │ │ │ -000f1ea0: 6e3c 2f73 7061 6e3e 2667 743b 203c 2f64 n> .
    </simpleType< │ │ │ │ -000f1ef0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    │ │ │ │ -000f1f00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    < │ │ │ │ -000f1f20: 703e 4461 7461 2076 616c 7565 206c 656e p>Data value len │ │ │ │ -000f1f30: 6774 6820 636f 6e73 7472 6169 6e74 7320 gth constraints │ │ │ │ -000f1f40: 6f66 2073 696d 706c 6554 7970 6573 2061 of simpleTypes a │ │ │ │ -000f1f50: 6e64 2063 6f6d 706c 6578 5479 7065 7320 nd complexTypes │ │ │ │ -000f1f60: 7769 7468 2073 696d 706c 6543 6f6e 7465 with simpleConte │ │ │ │ -000f1f70: 6e74 2061 7265 2064 6566 696e 6564 2061 nt are defined a │ │ │ │ -000f1f80: 7320 666f 6c6c 6f77 733a 3c2f 703e 0a3c s follows:

    .< │ │ │ │ -000f1f90: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -000f1fa0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    typ │ │ │ │ -000f1fd0: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef char *ns__string256 │ │ │ │ -000f2010: 2030 3a32 3536 3b20 3c73 7061 6e20 636c 0:256; // │ │ │ │ -000f2030: 2073 696d 706c 6554 7970 6520 7265 7374 simpleType rest │ │ │ │ -000f2040: 7269 6374 696f 6e20 6f66 2073 7472 696e riction of strin │ │ │ │ -000f2050: 6720 7769 7468 206d 6178 206c 656e 6774 g with max lengt │ │ │ │ -000f2060: 6820 3235 3620 6368 6172 6163 7465 7273 h 256 characters │ │ │ │ -000f2070: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -000f2080: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f2090: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef │ │ │ │ -000f20d0: 6368 6172 3c2f 7370 616e 3e20 2a6e 735f char *ns_ │ │ │ │ -000f20e0: 5f73 7472 696e 6731 3020 3130 3a31 303b _string10 10:10; │ │ │ │ -000f20f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // simple │ │ │ │ -000f2110: 5479 7065 2072 6573 7472 6963 7469 6f6e Type restriction │ │ │ │ -000f2120: 206f 6620 7374 7269 6e67 2077 6974 6820 of string with │ │ │ │ -000f2130: 6c65 6e67 7468 206f 6620 3130 2063 6861 length of 10 cha │ │ │ │ -000f2140: 7261 6374 6572 7320 3c2f 7370 616e 3e3c racters < │ │ │ │ -000f2150: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ty │ │ │ │ -000f2180: 7065 6465 663c 2f73 7061 6e3e 2073 7464 pedef std │ │ │ │ -000f2190: 3a3a 7374 7269 6e67 202a 6e73 5f5f 7374 ::string *ns__st │ │ │ │ -000f21a0: 7269 6e67 3820 383b 203c 7370 616e 2063 ring8 8; / │ │ │ │ -000f21c0: 2f20 7369 6d70 6c65 5479 7065 2072 6573 / simpleType res │ │ │ │ -000f21d0: 7472 6963 7469 6f6e 206f 6620 7374 7269 triction of stri │ │ │ │ -000f21e0: 6e67 2077 6974 6820 6174 206c 6561 7374 ng with at least │ │ │ │ -000f21f0: 2038 2063 6861 7261 6374 6572 7320 3c2f 8 characters
    .
    struct ns__data // simpleConten │ │ │ │ -000f2270: 7420 7772 6170 7065 7220 3c2f 7370 616e t wrapper
    .
    {
    .
    char *_ │ │ │ │ -000f22e0: 5f69 7465 6d20 3a32 3536 3b20 3c73 7061 _item :256; // simpleConte │ │ │ │ -000f2310: 6e74 2077 6974 6820 6174 206d 6f73 7420 nt with at most │ │ │ │ -000f2320: 3235 3620 6368 6172 6163 7465 7273 203c 256 characters < │ │ │ │ -000f2330: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -000f2350: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha │ │ │ │ -000f2370: 723c 2f73 7061 6e3e 202a 6e61 6d65 2031 r *name 1 │ │ │ │ -000f2380: 3b20 2020 2020 203c 7370 616e 2063 6c61 ; // │ │ │ │ -000f23a0: 7265 7175 6972 6564 206e 616d 6520 6174 required name at │ │ │ │ -000f23b0: 7472 6962 7574 6520 3c2f 7370 616e 3e3c tribute < │ │ │ │ -000f23c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    .
    struct │ │ │ │ -000f2410: 203c 2f73 7061 6e3e 7469 6d65 5f5f 6461 time__da │ │ │ │ -000f2420: 7465 203c 7370 616e 2063 6c61 7373 3d22 te // simp │ │ │ │ -000f2440: 6c65 436f 6e74 656e 7420 7772 6170 7065 leContent wrappe │ │ │ │ -000f2450: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    . │ │ │ │ +000f1650: 6e65 223e 2020 2020 3c73 7061 6e20 636c ne"> char *_ │ │ │ │ +000f1680: 5f69 7465 6d3b 203c 7370 616e 2063 6c61 _item; // │ │ │ │ +000f16a0: 736f 6d65 2063 7573 746f 6d20 666f 726d some custom form │ │ │ │ +000f16b0: 6174 2064 6174 6520 2872 6573 7472 6963 at date (restric │ │ │ │ +000f16c0: 7469 6f6e 206f 6620 7374 7269 6e67 2920 tion of string) │ │ │ │ +000f16d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +000f16f0: 2020 4020 3c73 7061 6e20 636c 6173 733d @ enum time__zone │ │ │ │ +000f1720: 207b 2045 5354 2c20 474d 542c 202e 2e2e { EST, GMT, ... │ │ │ │ +000f1730: 207d 207a 6f6e 653b 203c 2f64 6976 3e0a } zone;
    . │ │ │ │ +000f1740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    │ │ │ │ +000f1760: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d < │ │ │ │ +000f1f00: 2f64 6976 3e3c 703e 4461 7461 2076 616c /div>

    Data val │ │ │ │ +000f1f10: 7565 206c 656e 6774 6820 636f 6e73 7472 ue length constr │ │ │ │ +000f1f20: 6169 6e74 7320 6f66 2073 696d 706c 6554 aints of simpleT │ │ │ │ +000f1f30: 7970 6573 2061 6e64 2063 6f6d 706c 6578 ypes and complex │ │ │ │ +000f1f40: 5479 7065 7320 7769 7468 2073 696d 706c Types with simpl │ │ │ │ +000f1f50: 6543 6f6e 7465 6e74 2061 7265 2064 6566 eContent are def │ │ │ │ +000f1f60: 696e 6564 2061 7320 666f 6c6c 6f77 733a ined as follows: │ │ │ │ +000f1f70: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    typedef char │ │ │ │ +000f1fe0: 3c2f 7370 616e 3e20 2a6e 735f 5f73 7472 *ns__str │ │ │ │ +000f1ff0: 696e 6732 3536 2030 3a32 3536 3b20 3c73 ing256 0:256; // simpleTyp │ │ │ │ +000f2020: 6520 7265 7374 7269 6374 696f 6e20 6f66 e restriction of │ │ │ │ +000f2030: 2073 7472 696e 6720 7769 7468 206d 6178 string with max │ │ │ │ +000f2040: 206c 656e 6774 6820 3235 3620 6368 6172 length 256 char │ │ │ │ +000f2050: 6163 7465 7273 203c 2f73 7061 6e3e 3c2f acters .
    typ │ │ │ │ +000f2090: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef char *ns__string10 │ │ │ │ +000f20d0: 3130 3a31 303b 203c 7370 616e 2063 6c61 10:10; // │ │ │ │ +000f20f0: 7369 6d70 6c65 5479 7065 2072 6573 7472 simpleType restr │ │ │ │ +000f2100: 6963 7469 6f6e 206f 6620 7374 7269 6e67 iction of string │ │ │ │ +000f2110: 2077 6974 6820 6c65 6e67 7468 206f 6620 with length of │ │ │ │ +000f2120: 3130 2063 6861 7261 6374 6572 7320 3c2f 10 characters
    .
    typedef std::string * │ │ │ │ +000f2180: 6e73 5f5f 7374 7269 6e67 3820 383b 203c ns__string8 8; < │ │ │ │ +000f2190: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000f21a0: 656e 7422 3e2f 2f20 7369 6d70 6c65 5479 ent">// simpleTy │ │ │ │ +000f21b0: 7065 2072 6573 7472 6963 7469 6f6e 206f pe restriction o │ │ │ │ +000f21c0: 6620 7374 7269 6e67 2077 6974 6820 6174 f string with at │ │ │ │ +000f21d0: 206c 6561 7374 2038 2063 6861 7261 6374 least 8 charact │ │ │ │ +000f21e0: 6572 7320 3c2f 7370 616e 3e3c 2f64 6976 ers
    .
    struct │ │ │ │ +000f2220: 203c 2f73 7061 6e3e 6e73 5f5f 6461 7461 ns__data │ │ │ │ +000f2230: 203c 7370 616e 2063 6c61 7373 3d22 636f // simple │ │ │ │ +000f2250: 436f 6e74 656e 7420 7772 6170 7065 7220 Content wrapper │ │ │ │ +000f2260: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +000f2280: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    char *__item :256 │ │ │ │ +000f22d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // simpl │ │ │ │ +000f22f0: 6543 6f6e 7465 6e74 2077 6974 6820 6174 eContent with at │ │ │ │ +000f2300: 206d 6f73 7420 3235 3620 6368 6172 6163 most 256 charac │ │ │ │ +000f2310: 7465 7273 203c 2f73 7061 6e3e 3c2f 6469 ters .
    @ char * │ │ │ │ +000f2360: 6e61 6d65 2031 3b20 2020 2020 203c 7370 name 1; // required n │ │ │ │ +000f2390: 616d 6520 6174 7472 6962 7574 6520 3c2f ame attribute
    .
    }; │ │ │ │ +000f23c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +000f23f0: 7374 7275 6374 203c 2f73 7061 6e3e 7469 struct ti │ │ │ │ +000f2400: 6d65 5f5f 6461 7465 203c 7370 616e 2063 me__date / │ │ │ │ +000f2420: 2f20 7369 6d70 6c65 436f 6e74 656e 7420 / simpleContent │ │ │ │ +000f2430: 7772 6170 7065 7220 3c2f 7370 616e 3e3c wrapper < │ │ │ │ +000f2440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 000f2460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ -000f2490: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *__item :1 │ │ │ │ -000f24c0: 3030 3b20 3c2f 6469 763e 0a3c 6469 7620 00;
    .
    @ │ │ │ │ -000f24e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 enum time__zone { │ │ │ │ -000f2510: 4553 542c 2047 4d54 2c20 2e2e 2e20 7d20 EST, GMT, ... } │ │ │ │ -000f2520: 7a6f 6e65 203d 2047 4d54 3b20 3c2f 6469 zone = GMT; .
    }
    .

    Set the < │ │ │ │ -000f2570: 636f 6465 3e23 534f 4150 5f58 4d4c 5f53 code>#SOAP_XML_S │ │ │ │ -000f2580: 5452 4943 543c 2f63 6f64 653e 206d 6f64 TRICT mod │ │ │ │ -000f2590: 6520 666c 6167 2074 6f20 656e 6162 6c65 e flag to enable │ │ │ │ -000f25a0: 2074 6865 2076 616c 6964 6174 696f 6e20 the validation │ │ │ │ -000f25b0: 6f66 2076 616c 7565 206c 656e 6774 6820 of value length │ │ │ │ -000f25c0: 636f 6e73 7472 6169 6e74 732e 3c2f 703e constraints.

    │ │ │ │ -000f25d0: 0a3c 703e 5365 6520 616c 736f 203c 6120 .

    See also C and C │ │ │ │ -000f2610: 2b2b 2058 4d4c 2064 6174 6120 6269 6e64 ++ XML data bind │ │ │ │ -000f2620: 696e 6773 3c2f 613e 2064 6f63 756d 656e ings documen │ │ │ │ -000f2630: 7461 7469 6f6e 2066 6f72 206d 6f72 6520 tation for more │ │ │ │ -000f2640: 6465 7461 696c 732e 3c2f 703e 0a3c 703e details.

    .

    │ │ │ │ -000f2650: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -000f2670: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Value r │ │ │ │ -000f26c0: 616e 6765 2072 6573 7472 6963 7469 6f6e ange restriction │ │ │ │ -000f26d0: 733c 2f68 333e 0a3c 703e 5369 6d69 6c61 s

    .

    Simila │ │ │ │ -000f26e0: 7220 746f 2064 6174 6120 6c65 6e67 7468 r to data length │ │ │ │ -000f26f0: 2063 6f6e 7374 7261 696e 7473 2066 6f72 constraints for │ │ │ │ -000f2700: 2073 7472 696e 672d 6261 7365 6420 6461 string-based da │ │ │ │ -000f2710: 7461 2c20 696e 7465 6765 7220 616e 6420 ta, integer and │ │ │ │ -000f2720: 666c 6f61 7469 6e67 2070 6f69 6e74 2076 floating point v │ │ │ │ -000f2730: 616c 7565 2072 616e 6765 2063 6f6e 7374 alue range const │ │ │ │ -000f2740: 7261 696e 7473 206f 6e20 6e75 6d65 7269 raints on numeri │ │ │ │ -000f2750: 6320 7369 6d70 6c65 5479 7065 7320 616e c simpleTypes an │ │ │ │ -000f2760: 6420 636f 6d70 6c65 7854 7970 6573 2077 d complexTypes w │ │ │ │ -000f2770: 6974 6820 7369 6d70 6c65 436f 6e74 656e ith simpleConten │ │ │ │ -000f2780: 7420 6172 6520 6465 636c 6172 6564 2077 t are declared w │ │ │ │ -000f2790: 6974 6820 3c63 6f64 653e 6c6f 7720 3a20 ith low : │ │ │ │ -000f27a0: 6869 6768 3c2f 636f 6465 3e2c 2077 6865 high, whe │ │ │ │ -000f27b0: 7265 203c 636f 6465 3e6c 6f77 3c2f 636f re low and hi │ │ │ │ -000f27d0: 6768 3c2f 636f 6465 3e20 6172 6520 6f70 gh are op │ │ │ │ -000f27e0: 7469 6f6e 616c 2e3c 2f70 3e0a 3c70 3e41 tional.

    .

    A │ │ │ │ -000f27f0: 7320 6f66 2067 534f 4150 2032 2e38 2e32 s of gSOAP 2.8.2 │ │ │ │ -000f2800: 362c 2066 6c6f 6174 696e 6720 706f 696e 6, floating poin │ │ │ │ -000f2810: 7420 7661 6c75 6520 7261 6e67 6573 2061 t value ranges a │ │ │ │ -000f2820: 6e64 2069 6e74 6567 6572 2072 616e 6765 nd integer range │ │ │ │ -000f2830: 7320 6361 6e20 6265 2065 7863 6c75 7369 s can be exclusi │ │ │ │ -000f2840: 7665 2062 7920 6164 6469 6e67 203c 636f ve by adding < o │ │ │ │ -000f2860: 6e20 6569 7468 6572 2073 6964 6520 6f66 n either side of │ │ │ │ -000f2870: 2074 6865 203c 636f 6465 3e3a 3c2f 636f the : range operat │ │ │ │ -000f2890: 6f72 3a3c 2f70 3e0a 3c74 6162 6c65 2063 or:

    ...< │ │ │ │ -000f2940: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.. │ │ │ │ -000f29c0: 3120 266c 743b 3d20 7820 2020 203c 2f74 1 <= x ....< │ │ │ │ -000f2a90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -000f2aa0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -000f2ab0: 3e3c 636f 6465 3e3a 2031 303c 2f63 6f64 >: 10 < │ │ │ │ -000f2b00: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>....< │ │ │ │ -000f2c10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -000f2c20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -000f2c30: 3e31 2026 6c74 3b20 7820 266c 743b 2031 >1 < x < 1 │ │ │ │ -000f2c40: 3020 2020 203c 2f74 643e 3c2f 7472 3e0a 0 . │ │ │ │ -000f2c50: 3c74 7220 636c 6173 733d 226d 6172 6b64 .........< │ │ │ │ -000f2ef0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -000f2f00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -000f2f10: 3e3c 636f 6465 3e31 2026 6c74 3b20 3a3c >1 < :< │ │ │ │ -000f2f20: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> │ │ │ │ -000f2f50: 3120 266c 743b 2078 2020 2020 3c2f 7464 1 < x .... │ │ │ │ -000f3020: 3c74 6420 636c 6173 733d 226d 6172 6b64 .
    range < │ │ │ │ -000f2900: 2f74 683e 3c74 6820 636c 6173 733d 226d /th>validation │ │ │ │ -000f2930: 2063 6865 636b 2020 2020 3c2f 7468 3e3c check
    1< │ │ │ │ -000f2990: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    1 : < │ │ │ │ -000f2a30: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>1 <= x │ │ │ │ -000f2a60: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    x &l │ │ │ │ -000f2af0: 743b 3d20 3130 2020 2020 3c2f 7464 3e3c t;= 10
    1 │ │ │ │ -000f2b50: 203a 2031 303c 2f63 6f64 653e 2020 203c : 10 < │ │ │ │ -000f2b60: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>1 <= x │ │ │ │ -000f2b90: 266c 743b 3d20 3130 2020 2020 3c2f 7464 <= 10
    │ │ │ │ -000f2bf0: 3120 266c 743b 203a 2026 6c74 3b20 3130 1 < : < 10 │ │ │ │ -000f2c00: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    1 < │ │ │ │ -000f2ca0: 2031 303c 2f63 6f64 653e 2020 203c 2f74 10 1 < x < │ │ │ │ -000f2ce0: 3b20 3130 2020 2020 3c2f 7464 3e3c 2f74 ; 10
    1 : │ │ │ │ -000f2d40: 266c 743b 2031 303c 2f63 6f64 653e 2020 < 10 │ │ │ │ -000f2d50: 203c 2f74 643e 3c74 6420 636c 6173 733d 1 <= │ │ │ │ -000f2d80: 7820 266c 743b 2031 3020 2020 203c 2f74 x < 10
    : < 10 x &l │ │ │ │ -000f2e20: 743b 2031 3020 2020 203c 2f74 643e 3c2f t; 10
    < │ │ │ │ -000f2e80: 3b20 3130 3c2f 636f 6465 3e20 2020 3c2f ; 10 x < 10 │ │ │ │ -000f2ec0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    │ │ │ │ -000f2fb0: 3120 266c 743b 3c2f 636f 6465 3e20 2020 1 < │ │ │ │ -000f2fc0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 < x │ │ │ │ -000f2ff0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    1 < : │ │ │ │ -000f3050: 2031 303c 2f63 6f64 653e 2020 203c 2f74 10 1 < x < │ │ │ │ -000f3090: 3b3d 2031 3020 2020 3c2f 7464 3e3c 2f74 ;= 10
    .

    F │ │ │ │ -000f30b0: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ -000f30c0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    ty │ │ │ │ -000f3100: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef int ns__int10 0:10 │ │ │ │ -000f3140: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // simpl │ │ │ │ -000f3160: 6554 7970 6520 7265 7374 7269 6374 696f eType restrictio │ │ │ │ -000f3170: 6e20 6f66 2069 6e74 2030 2e2e 3130 203c n of int 0..10 < │ │ │ │ -000f3180: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -000f31a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f31b0: 6f72 6422 3e74 7970 6564 6566 3c2f 7370 ord">typedef LONG64 │ │ │ │ -000f3220: 206e 735f 5f6c 6f6e 6720 2d31 3030 3030 ns__long -10000 │ │ │ │ -000f3230: 3030 3a31 3030 3030 3030 3b20 3c73 7061 00:1000000; // simpleType │ │ │ │ -000f3260: 7265 7374 7269 6374 696f 6e20 6f66 206c restriction of l │ │ │ │ -000f3270: 6f6e 6736 3420 2d31 3030 3030 3030 2e2e ong64 -1000000.. │ │ │ │ -000f3280: 3130 3030 3030 3020 3c2f 7370 616e 3e3c 1000000 < │ │ │ │ -000f3290: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ty │ │ │ │ -000f32c0: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef float ns__float -1 │ │ │ │ -000f3300: 2e30 2026 6c74 3b3a 266c 743b 2031 302e .0 <:< 10. │ │ │ │ -000f3310: 353b 203c 7370 616e 2063 6c61 7373 3d22 5; // simp │ │ │ │ -000f3330: 6c65 5479 7065 2072 6573 7472 6963 7469 leType restricti │ │ │ │ -000f3340: 6f6e 206f 6620 666c 6f61 7420 696e 2028 on of float in ( │ │ │ │ -000f3350: 2d31 2c31 302e 3529 203c 2f73 7061 6e3e -1,10.5) │ │ │ │ -000f3360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ -000f3390: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ -000f33a0: 5f64 6174 6120 3c73 7061 6e20 636c 6173 _data // s │ │ │ │ -000f33c0: 696d 706c 6543 6f6e 7465 6e74 2077 7261 impleContent wra │ │ │ │ -000f33d0: 7070 6572 203c 2f73 7061 6e3e 3c2f 6469 pper │ │ │ │ +000f2490: 6368 6172 3c2f 7370 616e 3e20 2a5f 5f69 char *__i │ │ │ │ +000f24a0: 7465 6d20 3a31 3030 3b20 3c2f 6469 763e tem :100;
    │ │ │ │ +000f24b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    @ enu │ │ │ │ +000f24e0: 6d3c 2f73 7061 6e3e 2074 696d 655f 5f7a m time__z │ │ │ │ +000f24f0: 6f6e 6520 7b20 4553 542c 2047 4d54 2c20 one { EST, GMT, │ │ │ │ +000f2500: 2e2e 2e20 7d20 7a6f 6e65 203d 2047 4d54 ... } zone = GMT │ │ │ │ +000f2510: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.

    Set │ │ │ │ +000f2550: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP │ │ │ │ +000f2560: 5f58 4d4c 5f53 5452 4943 543c 2f63 6f64 _XML_STRICT mode flag to │ │ │ │ +000f2580: 656e 6162 6c65 2074 6865 2076 616c 6964 enable the valid │ │ │ │ +000f2590: 6174 696f 6e20 6f66 2076 616c 7565 206c ation of value l │ │ │ │ +000f25a0: 656e 6774 6820 636f 6e73 7472 6169 6e74 ength constraint │ │ │ │ +000f25b0: 732e 3c2f 703e 0a3c 703e 5365 6520 616c s.

    .

    See al │ │ │ │ +000f25c0: 736f 203c 6120 6872 6566 3d22 2e2e 2f2e so C │ │ │ │ +000f25f0: 2061 6e64 2043 2b2b 2058 4d4c 2064 6174 and C++ XML dat │ │ │ │ +000f2600: 6120 6269 6e64 696e 6773 3c2f 613e 2064 a bindings d │ │ │ │ +000f2610: 6f63 756d 656e 7461 7469 6f6e 2066 6f72 ocumentation for │ │ │ │ +000f2620: 206d 6f72 6520 6465 7461 696c 732e 3c2f more details..

    .... Back to t │ │ │ │ +000f2650: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +000f2660: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

    .

    .V │ │ │ │ +000f26a0: 616c 7565 2072 616e 6765 2072 6573 7472 alue range restr │ │ │ │ +000f26b0: 6963 7469 6f6e 733c 2f68 333e 0a3c 703e ictions

    .

    │ │ │ │ +000f26c0: 5369 6d69 6c61 7220 746f 2064 6174 6120 Similar to data │ │ │ │ +000f26d0: 6c65 6e67 7468 2063 6f6e 7374 7261 696e length constrain │ │ │ │ +000f26e0: 7473 2066 6f72 2073 7472 696e 672d 6261 ts for string-ba │ │ │ │ +000f26f0: 7365 6420 6461 7461 2c20 696e 7465 6765 sed data, intege │ │ │ │ +000f2700: 7220 616e 6420 666c 6f61 7469 6e67 2070 r and floating p │ │ │ │ +000f2710: 6f69 6e74 2076 616c 7565 2072 616e 6765 oint value range │ │ │ │ +000f2720: 2063 6f6e 7374 7261 696e 7473 206f 6e20 constraints on │ │ │ │ +000f2730: 6e75 6d65 7269 6320 7369 6d70 6c65 5479 numeric simpleTy │ │ │ │ +000f2740: 7065 7320 616e 6420 636f 6d70 6c65 7854 pes and complexT │ │ │ │ +000f2750: 7970 6573 2077 6974 6820 7369 6d70 6c65 ypes with simple │ │ │ │ +000f2760: 436f 6e74 656e 7420 6172 6520 6465 636c Content are decl │ │ │ │ +000f2770: 6172 6564 2077 6974 6820 3c63 6f64 653e ared with │ │ │ │ +000f2780: 6c6f 7720 3a20 6869 6768 3c2f 636f 6465 low : high, where l │ │ │ │ +000f27a0: 6f77 3c2f 636f 6465 3e20 616e 6420 3c63 ow and high │ │ │ │ +000f27c0: 6172 6520 6f70 7469 6f6e 616c 2e3c 2f70 are optional.

    .

    As of gSOAP │ │ │ │ +000f27e0: 2032 2e38 2e32 362c 2066 6c6f 6174 696e 2.8.26, floatin │ │ │ │ +000f27f0: 6720 706f 696e 7420 7661 6c75 6520 7261 g point value ra │ │ │ │ +000f2800: 6e67 6573 2061 6e64 2069 6e74 6567 6572 nges and integer │ │ │ │ +000f2810: 2072 616e 6765 7320 6361 6e20 6265 2065 ranges can be e │ │ │ │ +000f2820: 7863 6c75 7369 7665 2062 7920 6164 6469 xclusive by addi │ │ │ │ +000f2830: 6e67 203c 636f 6465 3e26 6c74 3b3c 2f63 ng < on either s │ │ │ │ +000f2850: 6964 6520 6f66 2074 6865 203c 636f 6465 ide of the : range │ │ │ │ +000f2870: 6f70 6572 6174 6f72 3a3c 2f70 3e0a 3c74 operator:

    ...ran │ │ │ │ +000f28e0: 6765 2020 203c 2f74 683e 3c74 6820 636c ge vali │ │ │ │ +000f2910: 6461 7469 6f6e 2063 6865 636b 2020 2020 dation check │ │ │ │ +000f2920: 3c2f 7468 3e3c 2f74 723e 0a3c 7472 2063 ..1 < │ │ │ │ +000f2980: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>1 <= x │ │ │ │ +000f29b0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 .. │ │ │ │ +000f29e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 1 : 1 &l │ │ │ │ +000f2a40: 743b 3d20 7820 2020 203c 2f74 643e 3c2f t;= x ..: 1 │ │ │ │ +000f2aa0: 303c 2f63 6f64 653e 2020 203c 2f74 643e 0 │ │ │ │ +000f2ab0: 3c74 6420 636c 6173 733d 226d 6172 6b64 x <= 10 │ │ │ │ +000f2ae0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..< │ │ │ │ +000f2b30: 636f 6465 3e31 203a 2031 303c 2f63 6f64 code>1 : 10 1 &l │ │ │ │ +000f2b70: 743b 3d20 7820 266c 743b 3d20 3130 2020 t;= x <= 10 │ │ │ │ +000f2b80: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 .. │ │ │ │ +000f2bd0: 3c63 6f64 653e 3120 266c 743b 203a 2026 1 < : & │ │ │ │ +000f2be0: 6c74 3b20 3130 3c2f 636f 6465 3e20 2020 lt; 10 │ │ │ │ +000f2bf0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 1 < x │ │ │ │ +000f2c20: 266c 743b 2031 3020 2020 203c 2f74 643e < 10 │ │ │ │ +000f2c30: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +000f2c80: 3120 266c 743b 2031 303c 2f63 6f64 653e 1 < 10 │ │ │ │ +000f2c90: 2020 203c 2f74 643e 3c74 6420 636c 6173 1 < │ │ │ │ +000f2cc0: 2078 2026 6c74 3b20 3130 2020 2020 3c2f x < 10 ..1 : < 10 1 │ │ │ │ +000f2d60: 266c 743b 3d20 7820 266c 743b 2031 3020 <= x < 10 │ │ │ │ +000f2d70: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 .. │ │ │ │ +000f2da0: 3c74 6420 636c 6173 733d 226d 6172 6b64 : < 1 │ │ │ │ +000f2dd0: 303c 2f63 6f64 653e 2020 203c 2f74 643e 0 │ │ │ │ +000f2de0: 3c74 6420 636c 6173 733d 226d 6172 6b64 x < 10 < │ │ │ │ +000f2e10: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..< 10 x < │ │ │ │ +000f2ea0: 3b20 3130 2020 2020 3c2f 7464 3e3c 2f74 ; 10 ..1 & │ │ │ │ +000f2f00: 6c74 3b20 3a3c 2f63 6f64 653e 2020 203c lt; : < │ │ │ │ +000f2f10: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>1 < x │ │ │ │ +000f2f40: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 .. │ │ │ │ +000f2f90: 3c63 6f64 653e 3120 266c 743b 3c2f 636f 1 < 1 & │ │ │ │ +000f2fd0: 6c74 3b20 7820 2020 203c 2f74 643e 3c2f lt; x ..1 │ │ │ │ +000f3030: 266c 743b 203a 2031 303c 2f63 6f64 653e < : 10 │ │ │ │ +000f3040: 2020 203c 2f74 643e 3c74 6420 636c 6173 1 < │ │ │ │ +000f3070: 2078 2026 6c74 3b3d 2031 3020 2020 3c2f x <= 10 ..

    For example │ │ │ │ +000f30a0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    typedef int │ │ │ │ +000f3110: 3c2f 7370 616e 3e20 6e73 5f5f 696e 7431 ns__int1 │ │ │ │ +000f3120: 3020 303a 3130 3b20 3c73 7061 6e20 636c 0 0:10; // │ │ │ │ +000f3140: 2073 696d 706c 6554 7970 6520 7265 7374 simpleType rest │ │ │ │ +000f3150: 7269 6374 696f 6e20 6f66 2069 6e74 2030 riction of int 0 │ │ │ │ +000f3160: 2e2e 3130 203c 2f73 7061 6e3e 3c2f 6469 ..10 .
    typed │ │ │ │ +000f31a0: 6566 3c2f 7370 616e 3e20 3c61 2063 6c61 ef LONG │ │ │ │ +000f3200: 3634 3c2f 613e 206e 735f 5f6c 6f6e 6720 64 ns__long │ │ │ │ +000f3210: 2d31 3030 3030 3030 3a31 3030 3030 3030 -1000000:1000000 │ │ │ │ +000f3220: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // simpl │ │ │ │ +000f3240: 6554 7970 6520 7265 7374 7269 6374 696f eType restrictio │ │ │ │ +000f3250: 6e20 6f66 206c 6f6e 6736 3420 2d31 3030 n of long64 -100 │ │ │ │ +000f3260: 3030 3030 2e2e 3130 3030 3030 3020 3c2f 0000..1000000
    .
    typedef flo │ │ │ │ +000f32d0: 6174 3c2f 7370 616e 3e20 6e73 5f5f 666c at ns__fl │ │ │ │ +000f32e0: 6f61 7420 2d31 2e30 2026 6c74 3b3a 266c oat -1.0 <:&l │ │ │ │ +000f32f0: 743b 2031 302e 353b 203c 7370 616e 2063 t; 10.5; / │ │ │ │ +000f3310: 2f20 7369 6d70 6c65 5479 7065 2072 6573 / simpleType res │ │ │ │ +000f3320: 7472 6963 7469 6f6e 206f 6620 666c 6f61 triction of floa │ │ │ │ +000f3330: 7420 696e 2028 2d31 2c31 302e 3529 203c t in (-1,10.5) < │ │ │ │ +000f3340: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +000f3360: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000f3370: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct ns__data // simpleConte │ │ │ │ +000f33b0: 6e74 2077 7261 7070 6572 203c 2f73 7061 nt wrapper
    .
    {.
    {
    . │ │ │ │ -000f3410: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -000f3430: 3c2f 7370 616e 3e20 5f5f 6974 656d 2030 __item 0 │ │ │ │ -000f3440: 3a31 303b 203c 7370 616e 2063 6c61 7373 :10; // si │ │ │ │ -000f3460: 6d70 6c65 436f 6e74 656e 7420 7261 6e67 mpleContent rang │ │ │ │ -000f3470: 6520 302e 2e31 3020 3c2f 7370 616e 3e3c e 0..10 < │ │ │ │ -000f3480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    @ char *name 1; // required │ │ │ │ -000f34f0: 6e61 6d65 2061 7474 7269 6275 7465 203c name attribute < │ │ │ │ -000f3500: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .} │ │ │ │ -000f3520: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    < │ │ │ │ -000f3540: 703e 5365 7420 7468 6520 3c63 6f64 653e p>Set the │ │ │ │ -000f3550: 2353 4f41 505f 584d 4c5f 5354 5249 4354 #SOAP_XML_STRICT │ │ │ │ -000f3560: 3c2f 636f 6465 3e20 6d6f 6465 2066 6c61 mode fla │ │ │ │ -000f3570: 6720 746f 2065 6e61 626c 6520 7468 6520 g to enable the │ │ │ │ -000f3580: 7661 6c69 6461 7469 6f6e 206f 6620 7661 validation of va │ │ │ │ -000f3590: 6c75 6520 7261 6e67 6520 636f 6e73 7472 lue range constr │ │ │ │ -000f35a0: 6169 6e74 732e 3c2f 703e 0a3c 703e 5365 aints.

    .

    Se │ │ │ │ -000f35b0: 6520 616c 736f 203c 6120 6872 6566 3d22 e also C and C++ XML │ │ │ │ -000f35f0: 2064 6174 6120 6269 6e64 696e 6773 3c2f data bindings documentation │ │ │ │ -000f3610: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail │ │ │ │ -000f3620: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ -000f3630: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -000f3640: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -000f3650: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    . │ │ │ │ -000f3690: 5061 7474 6572 6e20 7265 7374 7269 6374 Pattern restrict │ │ │ │ -000f36a0: 696f 6e73 3c2f 6833 3e0a 3c70 3e50 6174 ions

    .

    Pat │ │ │ │ -000f36b0: 7465 726e 7320 6361 6e20 6265 2064 6566 terns can be def │ │ │ │ -000f36c0: 696e 6564 2066 6f72 2073 696d 706c 6554 ined for simpleT │ │ │ │ -000f36d0: 7970 6520 636f 6e74 656e 742e 2048 6f77 ype content. How │ │ │ │ -000f36e0: 6576 6572 2c20 7061 7474 6572 6e20 7661 ever, pattern va │ │ │ │ -000f36f0: 6c69 6461 7469 6f6e 2069 7320 6e6f 7420 lidation is not │ │ │ │ -000f3700: 656e 666f 7263 6564 2075 6e6c 6573 7320 enforced unless │ │ │ │ -000f3710: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the │ │ │ │ -000f37b0: 736f 6170 3a3a 6673 7661 6c69 6461 7465 soap::fsvalidate │ │ │ │ -000f37c0: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and │ │ │ │ -000f37d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fwvalidat │ │ │ │ -000f3880: 653c 2f61 3e3c 2f63 6f64 653e 2063 616c e cal │ │ │ │ -000f3890: 6c62 6163 6b73 2061 7265 2073 6574 2074 lbacks are set t │ │ │ │ -000f38a0: 6f20 6120 7265 6765 7820 6d61 7463 6865 o a regex matche │ │ │ │ -000f38b0: 722e 3c2f 703e 0a3c 703e 546f 2061 7373 r.

    .

    To ass │ │ │ │ -000f38c0: 6f63 6961 7465 2061 2070 6174 7465 726e ociate a pattern │ │ │ │ -000f38d0: 2077 6974 6820 6120 7369 6d70 6c65 5479 with a simpleTy │ │ │ │ -000f38e0: 7065 2c20 796f 7520 6361 6e20 6465 6669 pe, you can defi │ │ │ │ -000f38f0: 6e65 2061 2073 696d 706c 6554 7970 6520 ne a simpleType │ │ │ │ -000f3900: 7769 7468 2061 203c 636f 6465 3e74 7970 with a typ │ │ │ │ -000f3910: 6564 6566 3c2f 636f 6465 3e20 616e 6420 edef and │ │ │ │ -000f3920: 6120 7061 7474 6572 6e20 7374 7269 6e67 a pattern string │ │ │ │ -000f3930: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    typedef int │ │ │ │ -000f39a0: 3c2f 7370 616e 3e20 7469 6d65 5f5f 7365 time__se │ │ │ │ -000f39b0: 636f 6e64 203c 7370 616e 2063 6c61 7373 cond "[1-5]?[0- │ │ │ │ -000f39e0: 395d 7c36 3026 7175 6f74 3b3c 2f73 7061 9]|60";
    .
    │ │ │ │ -000f3a00: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Th │ │ │ │ -000f3d60: 6520 7061 7474 6572 6e20 7374 7269 6e67 e pattern string │ │ │ │ -000f3d70: 206d 7573 7420 636f 6e74 6169 6e20 6120 must contain a │ │ │ │ -000f3d80: 7661 6c69 6420 7265 6775 6c61 7220 6578 valid regular ex │ │ │ │ -000f3d90: 7072 6573 7369 6f6e 2e3c 2f70 3e0a 3c70 pression.

    .

    A special case │ │ │ │ -000f3db0: 666f 7220 4320 666f 726d 6174 2073 7472 for C format str │ │ │ │ -000f3dc0: 696e 6720 7061 7474 6572 6e73 2069 7320 ing patterns is │ │ │ │ -000f3dd0: 696e 7472 6f64 7563 6564 2069 6e20 6753 introduced in gS │ │ │ │ -000f3de0: 4f41 5020 322e 382e 3138 2e20 5768 656e OAP 2.8.18. When │ │ │ │ -000f3df0: 203c 656d 3e3c 636f 6465 3e78 7364 3a74 xsd:t │ │ │ │ -000f3e00: 6f74 616c 4469 6769 7473 3c2f 636f 6465 otalDigits and < │ │ │ │ -000f3e20: 636f 6465 3e78 7364 3a66 7261 6374 696f code>xsd:fractio │ │ │ │ -000f3e30: 6e44 6967 6974 733c 2f63 6f64 653e 3c2f nDigits are given in │ │ │ │ -000f3e50: 2061 2058 5344 2066 696c 652c 2074 6865 a XSD file, the │ │ │ │ -000f3e60: 6e20 6120 4320 666f 726d 6174 2073 7472 n a C format str │ │ │ │ -000f3e70: 696e 6720 6973 2070 726f 6475 6365 6420 ing is produced │ │ │ │ -000f3e80: 746f 206f 7574 7075 7420 666c 6f61 7469 to output floati │ │ │ │ -000f3e90: 6e67 2070 6f69 6e74 2076 616c 7565 7320 ng point values │ │ │ │ -000f3ea0: 7769 7468 2074 6865 2070 726f 7065 7220 with the proper │ │ │ │ -000f3eb0: 7072 6563 6973 696f 6e20 616e 6420 7363 precision and sc │ │ │ │ -000f3ec0: 616c 652e 2046 6f72 2065 7861 6d70 6c65 ale. For example │ │ │ │ -000f3ed0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    │ │ │ │ -000f3f10: 266c 743b 3c73 7061 6e20 636c 6173 733d <si │ │ │ │ -000f3f30: 6d70 6c65 5479 7065 3c2f 7370 616e 3e20 mpleType │ │ │ │ -000f3f40: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q │ │ │ │ -000f3f80: 756f 743b 7261 7469 6f26 7175 6f74 3b3c uot;ratio"< │ │ │ │ -000f3f90: 2f73 7061 6e3e 2667 743b 203c 2f64 6976 /span>>
    .
    <restriction< │ │ │ │ -000f3fe0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> bas │ │ │ │ -000f4000: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:f │ │ │ │ -000f4030: 6c6f 6174 2671 756f 743b 3c2f 7370 616e loat">
    . │ │ │ │ -000f4060: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <totalDigits value< │ │ │ │ -000f40b0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="5" │ │ │ │ -000f40e0: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
    <fraction │ │ │ │ -000f4130: 4469 6769 7473 3c2f 7370 616e 3e20 3c73 Digits value │ │ │ │ -000f4160: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000f4180: 6f74 3b32 2671 756f 743b 3c2f 7370 616e ot;2"/>
    . │ │ │ │ -000f41b0: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </restriction>
    .< │ │ │ │ -000f41f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f4200: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></ │ │ │ │ -000f4220: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType>
    .

    pro │ │ │ │ -000f4260: 6475 6365 733a 3c2f 703e 0a3c 6469 7620 duces:

    .
    typedef │ │ │ │ -000f42b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c float t │ │ │ │ -000f42e0: 696d 655f 5f72 6174 696f 203c 7370 616e ime__ratio "%5. │ │ │ │ -000f4310: 3266 2671 756f 743b 3c2f 7370 616e 3e3b 2f"; │ │ │ │ -000f4320: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The format stri │ │ │ │ -000f4350: 6e67 2069 7320 7573 6564 2074 6f20 666f ng is used to fo │ │ │ │ -000f4360: 726d 6174 2074 6865 206f 7574 7075 7420 rmat the output │ │ │ │ -000f4370: 7468 6520 666c 6f61 7469 6e67 2070 6f69 the floating poi │ │ │ │ -000f4380: 6e74 2076 616c 7565 2069 6e20 584d 4c2e nt value in XML. │ │ │ │ -000f4390: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

    .

    See also │ │ │ │ -000f43a0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f C a │ │ │ │ -000f43d0: 6e64 2043 2b2b 2058 4d4c 2064 6174 6120 nd C++ XML data │ │ │ │ -000f43e0: 6269 6e64 696e 6773 3c2f 613e 2064 6f63 bindings doc │ │ │ │ -000f43f0: 756d 656e 7461 7469 6f6e 2066 6f72 206d umentation for m │ │ │ │ -000f4400: 6f72 6520 6465 7461 696c 732e 3c2f 703e ore details.

    │ │ │ │ -000f4410: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -000f4430: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    │ │ │ │ -000f4470: 0a45 6c65 6d65 6e74 2061 6e64 2061 7474 .Element and att │ │ │ │ -000f4480: 7269 6275 7465 2071 7561 6c69 6669 6564 ribute qualified │ │ │ │ -000f4490: 2f75 6e71 7561 6c69 6669 6564 2066 6f72 /unqualified for │ │ │ │ -000f44a0: 6d73 3c2f 6832 3e0a 3c70 3e53 7472 7563 ms

    .

    Struc │ │ │ │ -000f44b0: 742c 2063 6c61 7373 2c20 616e 6420 756e t, class, and un │ │ │ │ -000f44c0: 696f 6e20 6d65 6d62 6572 7320 7265 7072 ion members repr │ │ │ │ -000f44d0: 6573 656e 7420 656c 656d 656e 7473 2061 esent elements a │ │ │ │ -000f44e0: 6e64 2061 7474 7269 6275 7465 7320 7468 nd attributes th │ │ │ │ -000f44f0: 6174 2061 7265 2061 7574 6f6d 6174 6963 at are automatic │ │ │ │ -000f4500: 616c 6c79 2071 7561 6c69 6669 6564 206f ally qualified o │ │ │ │ -000f4510: 7220 756e 7175 616c 6966 6965 6420 6465 r unqualified de │ │ │ │ -000f4520: 7065 6e64 696e 6720 6f6e 2074 6865 2073 pending on the s │ │ │ │ -000f4530: 6368 656d 6120 656c 656d 656e 7420 616e chema element an │ │ │ │ -000f4540: 6420 6174 7472 6962 7574 6520 6465 6661 d attribute defa │ │ │ │ -000f4550: 756c 7420 666f 726d 7320 7370 6563 6966 ult forms specif │ │ │ │ -000f4560: 6965 642e 2054 6865 2065 6e67 696e 6520 ied. The engine │ │ │ │ -000f4570: 616c 7761 7973 2076 616c 6964 6174 6573 always validates │ │ │ │ -000f4580: 2074 6865 2070 7265 6669 7865 7320 6f66 the prefixes of │ │ │ │ -000f4590: 2065 6c65 6d65 6e74 7320 616e 6420 6174 elements and at │ │ │ │ -000f45a0: 7472 6962 7574 6573 2e20 5768 656e 2061 tributes. When a │ │ │ │ -000f45b0: 206e 616d 6573 7061 6365 206d 6973 6d61 namespace misma │ │ │ │ -000f45c0: 7463 6820 6f63 6375 7273 2c20 7468 6520 tch occurs, the │ │ │ │ -000f45d0: 656c 656d 656e 7420 6f72 2061 7474 7269 element or attri │ │ │ │ -000f45e0: 6275 7465 2069 7320 6e6f 7420 636f 6e73 bute is not cons │ │ │ │ -000f45f0: 756d 6564 2077 6869 6368 2063 616e 206c umed which can l │ │ │ │ -000f4600: 6561 6420 746f 2061 2076 616c 6964 6174 ead to a validat │ │ │ │ -000f4610: 696f 6e20 6572 726f 7220 2875 6e6c 6573 ion error (unles │ │ │ │ -000f4620: 7320 7468 6520 636f 6d70 6c65 7854 7970 s the complexTyp │ │ │ │ -000f4630: 6520 6973 2065 7874 656e 7369 626c 6520 e is extensible │ │ │ │ -000f4640: 6f72 2077 6865 6e20 3c63 6f64 653e 2353 or when #S │ │ │ │ -000f4650: 4f41 505f 584d 4c5f 5354 5249 4354 3c2f OAP_XML_STRICT is turned │ │ │ │ -000f4670: 6f66 6629 2e3c 2f70 3e0a 3c70 3e43 6f6e off).

    .

    Con │ │ │ │ -000f4680: 7369 6465 7220 666f 7220 6578 616d 706c sider for exampl │ │ │ │ -000f4690: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ -000f46c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000f46d0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ -000f46e0: 7363 6865 6d61 2065 6c65 6d65 6e74 466f schema elementFo │ │ │ │ -000f46f0: 726d 3a20 7175 616c 6966 6965 6420 3c2f rm: qualified
    .
    //gsoap ns s │ │ │ │ -000f4740: 6368 656d 6120 6174 7472 6962 7574 6546 chema attributeF │ │ │ │ -000f4750: 6f72 6d3a 2075 6e71 7561 6c69 6669 6564 orm: unqualified │ │ │ │ -000f4760: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -000f4770: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f4780: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__record │ │ │ │ +000f33f0: 696e 6522 3e20 2020 203c 7370 616e 2063 ine"> int __ │ │ │ │ +000f3420: 6974 656d 2030 3a31 303b 203c 7370 616e item 0:10; // simpleConten │ │ │ │ +000f3450: 7420 7261 6e67 6520 302e 2e31 3020 3c2f t range 0..10
    .
    │ │ │ │ +000f3480: 4020 3c73 7061 6e20 636c 6173 733d 226b @ char │ │ │ │ +000f34a0: 3c2f 7370 616e 3e20 2a6e 616d 6520 313b *name 1; │ │ │ │ +000f34b0: 2020 2020 3c73 7061 6e20 636c 6173 733d // req │ │ │ │ +000f34d0: 7569 7265 6420 6e61 6d65 2061 7474 7269 uired name attri │ │ │ │ +000f34e0: 6275 7465 203c 2f73 7061 6e3e 3c2f 6469 bute .
    };
    .

    Set the │ │ │ │ +000f3530: 3c63 6f64 653e 2353 4f41 505f 584d 4c5f #SOAP_XML_ │ │ │ │ +000f3540: 5354 5249 4354 3c2f 636f 6465 3e20 6d6f STRICT mo │ │ │ │ +000f3550: 6465 2066 6c61 6720 746f 2065 6e61 626c de flag to enabl │ │ │ │ +000f3560: 6520 7468 6520 7661 6c69 6461 7469 6f6e e the validation │ │ │ │ +000f3570: 206f 6620 7661 6c75 6520 7261 6e67 6520 of value range │ │ │ │ +000f3580: 636f 6e73 7472 6169 6e74 732e 3c2f 703e constraints.

    │ │ │ │ +000f3590: 0a3c 703e 5365 6520 616c 736f 203c 6120 .

    See also C and C │ │ │ │ +000f35d0: 2b2b 2058 4d4c 2064 6174 6120 6269 6e64 ++ XML data bind │ │ │ │ +000f35e0: 696e 6773 3c2f 613e 2064 6f63 756d 656e ings documen │ │ │ │ +000f35f0: 7461 7469 6f6e 2066 6f72 206d 6f72 6520 tation for more │ │ │ │ +000f3600: 6465 7461 696c 732e 3c2f 703e 0a3c 703e details.

    .

    │ │ │ │ +000f3610: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +000f3630: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Pattern re │ │ │ │ +000f3680: 7374 7269 6374 696f 6e73 3c2f 6833 3e0a strictions

    . │ │ │ │ +000f3690: 3c70 3e50 6174 7465 726e 7320 6361 6e20

    Patterns can │ │ │ │ +000f36a0: 6265 2064 6566 696e 6564 2066 6f72 2073 be defined for s │ │ │ │ +000f36b0: 696d 706c 6554 7970 6520 636f 6e74 656e impleType conten │ │ │ │ +000f36c0: 742e 2048 6f77 6576 6572 2c20 7061 7474 t. However, patt │ │ │ │ +000f36d0: 6572 6e20 7661 6c69 6461 7469 6f6e 2069 ern validation i │ │ │ │ +000f36e0: 7320 6e6f 7420 656e 666f 7263 6564 2075 s not enforced u │ │ │ │ +000f36f0: 6e6c 6573 7320 7468 6520 3c63 6f64 653e nless the │ │ │ │ +000f3700: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fsva │ │ │ │ +000f37a0: 6c69 6461 7465 3c2f 613e 3c2f 636f 6465 lidate and soap::fwv │ │ │ │ +000f3860: 616c 6964 6174 653c 2f61 3e3c 2f63 6f64 alidate callbacks are │ │ │ │ +000f3880: 2073 6574 2074 6f20 6120 7265 6765 7820 set to a regex │ │ │ │ +000f3890: 6d61 7463 6865 722e 3c2f 703e 0a3c 703e matcher.

    .

    │ │ │ │ +000f38a0: 546f 2061 7373 6f63 6961 7465 2061 2070 To associate a p │ │ │ │ +000f38b0: 6174 7465 726e 2077 6974 6820 6120 7369 attern with a si │ │ │ │ +000f38c0: 6d70 6c65 5479 7065 2c20 796f 7520 6361 mpleType, you ca │ │ │ │ +000f38d0: 6e20 6465 6669 6e65 2061 2073 696d 706c n define a simpl │ │ │ │ +000f38e0: 6554 7970 6520 7769 7468 2061 203c 636f eType with a typedef and a pattern │ │ │ │ +000f3910: 7374 7269 6e67 3a3c 2f70 3e0a 3c64 6976 string:

    .
    typede │ │ │ │ +000f3960: 663c 2f73 7061 6e3e 203c 7370 616e 2063 f int ti │ │ │ │ +000f3990: 6d65 5f5f 7365 636f 6e64 203c 7370 616e me__second "[1- │ │ │ │ +000f39c0: 355d 3f5b 302d 395d 7c36 3026 7175 6f74 5]?[0-9]|60" │ │ │ │ +000f39d0: 3b3c 2f73 7061 6e3e 3b3c 2f64 6976 3e0a ;;
    . │ │ │ │ +000f39e0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    This d │ │ │ │ +000f3a00: 6566 696e 6573 2074 6865 2066 6f6c 6c6f efines the follo │ │ │ │ +000f3a10: 7769 6e67 2073 6368 656d 6120 7479 7065 wing schema type │ │ │ │ +000f3a20: 2069 6e20 3c65 6d3e 3c63 6f64 653e 7469 in ti │ │ │ │ +000f3a30: 6d65 2e78 7364 3c2f 636f 6465 3e3c 2f65 me.xsd:

    .
    │ │ │ │ +000f3a70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000f3aa0: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType name= │ │ │ │ +000f3af0: 2671 756f 743b 7365 636f 6e64 2671 756f "second&quo │ │ │ │ +000f3b00: 743b 3c2f 7370 616e 3e26 6774 3b20 3c2f t;> .
    <restricti │ │ │ │ +000f3b50: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on │ │ │ │ +000f3b70: 6261 7365 3c2f 7370 616e 3e3d 3c73 7061 base="xs │ │ │ │ +000f3ba0: 643a 696e 7426 7175 6f74 3b3c 2f73 7061 d:int">
    . │ │ │ │ +000f3bd0: 2020 2020 266c 743b 3c73 7061 6e20 636c <pattern │ │ │ │ +000f3c00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value= │ │ │ │ +000f3c40: 2671 756f 743b 5b31 2d35 5d3f 5b30 2d39 "[1-5]?[0-9 │ │ │ │ +000f3c50: 5d7c 3630 2671 756f 743b 3c2f 7370 616e ]|60"/>
    . │ │ │ │ +000f3c80: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </restriction>
    .< │ │ │ │ +000f3cc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f3cd0: 3e26 6c74 3b2f 3c73 7061 6e20 636c 6173 ></ │ │ │ │ +000f3cf0: 7369 6d70 6c65 5479 7065 3c2f 7370 616e simpleType>
    .
    │ │ │ │ +000f3d40: 3c70 3e20 5468 6520 7061 7474 6572 6e20

    The pattern │ │ │ │ +000f3d50: 7374 7269 6e67 206d 7573 7420 636f 6e74 string must cont │ │ │ │ +000f3d60: 6169 6e20 6120 7661 6c69 6420 7265 6775 ain a valid regu │ │ │ │ +000f3d70: 6c61 7220 6578 7072 6573 7369 6f6e 2e3c lar expression.< │ │ │ │ +000f3d80: 2f70 3e0a 3c70 3e41 2073 7065 6369 616c /p>.

    A special │ │ │ │ +000f3d90: 2063 6173 6520 666f 7220 4320 666f 726d case for C form │ │ │ │ +000f3da0: 6174 2073 7472 696e 6720 7061 7474 6572 at string patter │ │ │ │ +000f3db0: 6e73 2069 7320 696e 7472 6f64 7563 6564 ns is introduced │ │ │ │ +000f3dc0: 2069 6e20 6753 4f41 5020 322e 382e 3138 in gSOAP 2.8.18 │ │ │ │ +000f3dd0: 2e20 5768 656e 203c 656d 3e3c 636f 6465 . When xsd:totalDigits │ │ │ │ +000f3df0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and │ │ │ │ +000f3e00: 203c 656d 3e3c 636f 6465 3e78 7364 3a66 xsd:f │ │ │ │ +000f3e10: 7261 6374 696f 6e44 6967 6974 733c 2f63 ractionDigits are gi │ │ │ │ +000f3e30: 7665 6e20 696e 2061 2058 5344 2066 696c ven in a XSD fil │ │ │ │ +000f3e40: 652c 2074 6865 6e20 6120 4320 666f 726d e, then a C form │ │ │ │ +000f3e50: 6174 2073 7472 696e 6720 6973 2070 726f at string is pro │ │ │ │ +000f3e60: 6475 6365 6420 746f 206f 7574 7075 7420 duced to output │ │ │ │ +000f3e70: 666c 6f61 7469 6e67 2070 6f69 6e74 2076 floating point v │ │ │ │ +000f3e80: 616c 7565 7320 7769 7468 2074 6865 2070 alues with the p │ │ │ │ +000f3e90: 726f 7065 7220 7072 6563 6973 696f 6e20 roper precision │ │ │ │ +000f3ea0: 616e 6420 7363 616c 652e 2046 6f72 2065 and scale. For e │ │ │ │ +000f3eb0: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

    .
    <simpleType name │ │ │ │ +000f3f40: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="ratio& │ │ │ │ +000f3f70: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;> │ │ │ │ +000f3f80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    < │ │ │ │ +000f3fa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 restri │ │ │ │ +000f3fc0: 6374 696f 6e3c 2f73 7061 6e3e 203c 7370 ction base=< │ │ │ │ +000f3ff0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f4000: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f4010: 3b78 7364 3a66 6c6f 6174 2671 756f 743b ;xsd:float" │ │ │ │ +000f4020: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
    <totalDigi │ │ │ │ +000f4070: 7473 3c2f 7370 616e 3e20 3c73 7061 6e20 ts │ │ │ │ +000f4090: 7661 6c75 653c 2f73 7061 6e3e 3d3c 7370 value="5 │ │ │ │ +000f40c0: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g │ │ │ │ +000f40d0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    │ │ │ │ +000f40f0: 266c 743b 3c73 7061 6e20 636c 6173 733d <fr │ │ │ │ +000f4110: 6163 7469 6f6e 4469 6769 7473 3c2f 7370 actionDigits value< │ │ │ │ +000f4140: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="2" │ │ │ │ +000f4170: 3c2f 7370 616e 3e2f 2667 743b 203c 2f64 /> .
    </restricti │ │ │ │ +000f41c0: 6f6e 3c2f 7370 616e 3e26 6774 3b20 3c2f on> .
    </simpleType │ │ │ │ +000f4210: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >
    .
    │ │ │ │ +000f4240: 3c70 3e70 726f 6475 6365 733a 3c2f 703e

    produces:

    │ │ │ │ +000f4250: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    t │ │ │ │ +000f4290: 7970 6564 6566 3c2f 7370 616e 3e20 3c73 ypedef float time__ratio │ │ │ │ +000f42d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +000f42f0: 6f74 3b25 352e 3266 2671 756f 743b 3c2f ot;%5.2f";
    .

    The forma │ │ │ │ +000f4330: 7420 7374 7269 6e67 2069 7320 7573 6564 t string is used │ │ │ │ +000f4340: 2074 6f20 666f 726d 6174 2074 6865 206f to format the o │ │ │ │ +000f4350: 7574 7075 7420 7468 6520 666c 6f61 7469 utput the floati │ │ │ │ +000f4360: 6e67 2070 6f69 6e74 2076 616c 7565 2069 ng point value i │ │ │ │ +000f4370: 6e20 584d 4c2e 3c2f 703e 0a3c 703e 5365 n XML.

    .

    Se │ │ │ │ +000f4380: 6520 616c 736f 203c 6120 6872 6566 3d22 e also C and C++ XML │ │ │ │ +000f43c0: 2064 6174 6120 6269 6e64 696e 6773 3c2f data bindings documentation │ │ │ │ +000f43e0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail │ │ │ │ +000f43f0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ +000f4400: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +000f4410: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +000f4420: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Element a │ │ │ │ +000f4460: 6e64 2061 7474 7269 6275 7465 2071 7561 nd attribute qua │ │ │ │ +000f4470: 6c69 6669 6564 2f75 6e71 7561 6c69 6669 lified/unqualifi │ │ │ │ +000f4480: 6564 2066 6f72 6d73 3c2f 6832 3e0a 3c70 ed forms

    .

    Struct, class, │ │ │ │ +000f44a0: 616e 6420 756e 696f 6e20 6d65 6d62 6572 and union member │ │ │ │ +000f44b0: 7320 7265 7072 6573 656e 7420 656c 656d s represent elem │ │ │ │ +000f44c0: 656e 7473 2061 6e64 2061 7474 7269 6275 ents and attribu │ │ │ │ +000f44d0: 7465 7320 7468 6174 2061 7265 2061 7574 tes that are aut │ │ │ │ +000f44e0: 6f6d 6174 6963 616c 6c79 2071 7561 6c69 omatically quali │ │ │ │ +000f44f0: 6669 6564 206f 7220 756e 7175 616c 6966 fied or unqualif │ │ │ │ +000f4500: 6965 6420 6465 7065 6e64 696e 6720 6f6e ied depending on │ │ │ │ +000f4510: 2074 6865 2073 6368 656d 6120 656c 656d the schema elem │ │ │ │ +000f4520: 656e 7420 616e 6420 6174 7472 6962 7574 ent and attribut │ │ │ │ +000f4530: 6520 6465 6661 756c 7420 666f 726d 7320 e default forms │ │ │ │ +000f4540: 7370 6563 6966 6965 642e 2054 6865 2065 specified. The e │ │ │ │ +000f4550: 6e67 696e 6520 616c 7761 7973 2076 616c ngine always val │ │ │ │ +000f4560: 6964 6174 6573 2074 6865 2070 7265 6669 idates the prefi │ │ │ │ +000f4570: 7865 7320 6f66 2065 6c65 6d65 6e74 7320 xes of elements │ │ │ │ +000f4580: 616e 6420 6174 7472 6962 7574 6573 2e20 and attributes. │ │ │ │ +000f4590: 5768 656e 2061 206e 616d 6573 7061 6365 When a namespace │ │ │ │ +000f45a0: 206d 6973 6d61 7463 6820 6f63 6375 7273 mismatch occurs │ │ │ │ +000f45b0: 2c20 7468 6520 656c 656d 656e 7420 6f72 , the element or │ │ │ │ +000f45c0: 2061 7474 7269 6275 7465 2069 7320 6e6f attribute is no │ │ │ │ +000f45d0: 7420 636f 6e73 756d 6564 2077 6869 6368 t consumed which │ │ │ │ +000f45e0: 2063 616e 206c 6561 6420 746f 2061 2076 can lead to a v │ │ │ │ +000f45f0: 616c 6964 6174 696f 6e20 6572 726f 7220 alidation error │ │ │ │ +000f4600: 2875 6e6c 6573 7320 7468 6520 636f 6d70 (unless the comp │ │ │ │ +000f4610: 6c65 7854 7970 6520 6973 2065 7874 656e lexType is exten │ │ │ │ +000f4620: 7369 626c 6520 6f72 2077 6865 6e20 3c63 sible or when #SOAP_XML_ST │ │ │ │ +000f4640: 5249 4354 3c2f 636f 6465 3e20 6973 2074 RICT is t │ │ │ │ +000f4650: 7572 6e65 6420 6f66 6629 2e3c 2f70 3e0a urned off).

    . │ │ │ │ +000f4660: 3c70 3e43 6f6e 7369 6465 7220 666f 7220

    Consider for │ │ │ │ +000f4670: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .
    //gso │ │ │ │ +000f46c0: 6170 206e 7320 7363 6865 6d61 2065 6c65 ap ns schema ele │ │ │ │ +000f46d0: 6d65 6e74 466f 726d 3a20 7175 616c 6966 mentForm: qualif │ │ │ │ +000f46e0: 6965 6420 3c2f 7370 616e 3e3c 2f64 6976 ied
    .
    //gsoa │ │ │ │ +000f4720: 7020 6e73 2073 6368 656d 6120 6174 7472 p ns schema attr │ │ │ │ +000f4730: 6962 7574 6546 6f72 6d3a 2075 6e71 7561 ibuteForm: unqua │ │ │ │ +000f4740: 6c69 6669 6564 203c 2f73 7061 6e3e 3c2f lified .
    str │ │ │ │ +000f4780: 7563 7420 3c2f 7370 616e 3e6e 735f 5f72 uct ns__r │ │ │ │ +000f4790: 6563 6f72 6420 3c2f 6469 763e 0a3c 6469 ecord
    .{ │ │ │ │ 000f47b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ -000f47d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    @ char * t │ │ │ │ -000f4810: 7970 653b 203c 2f64 6976 3e0a 3c64 6976 ype;
    .
    │ │ │ │ -000f4830: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ -000f4850: 3c2f 7370 616e 3e20 2a20 6e61 6d65 3b20 * name; │ │ │ │ -000f4860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    Here │ │ │ │ -000f48a0: 2c20 7468 6520 3c63 6f64 653e 6e73 5f5f , the ns__ │ │ │ │ -000f48b0: 7265 636f 7264 3c2f 636f 6465 3e20 7374 record st │ │ │ │ -000f48c0: 7275 6374 2069 7320 7365 7269 616c 697a ruct is serializ │ │ │ │ -000f48d0: 6564 2077 6974 6820 7175 616c 6966 6965 ed with qualifie │ │ │ │ -000f48e0: 6420 656c 656d 656e 7420 3c63 6f64 653e d element │ │ │ │ -000f48f0: 6e61 6d65 3c2f 636f 6465 3e20 616e 6420 name and │ │ │ │ -000f4900: 756e 7175 616c 6966 6965 6420 6174 7472 unqualified attr │ │ │ │ -000f4910: 6962 7574 6520 3c63 6f64 653e 7479 7065 ibute type │ │ │ │ -000f4920: 3c2f 636f 6465 3e3a 3c2f 703e 0a3c 6469 :

    . < │ │ │ │ -000f4940: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -000f4950: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    <ns:record type │ │ │ │ -000f49b0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="...&qu │ │ │ │ -000f49e0: 6f74 3b3c 2f73 7061 6e3e 2667 743b 203c ot;> < │ │ │ │ -000f49f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <ns:name< │ │ │ │ -000f4a30: 2f73 7061 6e3e 2667 743b 2e2e 2e26 6c74 /span>>...< │ │ │ │ -000f4a40: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/ns:n │ │ │ │ -000f4a60: 616d 653c 2f73 7061 6e3e 2667 743b 203c ame> < │ │ │ │ -000f4a70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    </ns:record │ │ │ │ -000f4ab0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >
    .
    │ │ │ │ -000f4ae0: 3c70 3e54 6865 2022 636f 6c6f 6e20 6e6f

    The "colon no │ │ │ │ -000f4af0: 7461 7469 6f6e 2220 666f 7220 7374 7275 tation" for stru │ │ │ │ -000f4b00: 6374 2f63 6c61 7373 2f75 6e69 6f6e 206d ct/class/union m │ │ │ │ -000f4b10: 656d 6265 7220 6e61 6d65 7320 6973 2075 ember names is u │ │ │ │ -000f4b20: 7365 6420 746f 206f 7665 7272 6964 6520 sed to override │ │ │ │ -000f4b30: 656c 656d 656e 7420 616e 6420 6174 7472 element and attr │ │ │ │ -000f4b40: 6962 7574 6520 7175 616c 6966 6965 6420 ibute qualified │ │ │ │ -000f4b50: 6f72 2075 6e71 7561 6c69 6669 6564 2066 or unqualified f │ │ │ │ -000f4b60: 6f72 6d73 2e20 546f 206f 7665 7272 6964 orms. To overrid │ │ │ │ -000f4b70: 6520 7468 6520 666f 726d 2066 6f72 2069 e the form for i │ │ │ │ -000f4b80: 6e64 6976 6964 7561 6c20 6d65 6d62 6572 ndividual member │ │ │ │ -000f4b90: 7320 7468 6174 2072 6570 7265 7365 6e74 s that represent │ │ │ │ -000f4ba0: 2065 6c65 6d65 6e74 7320 616e 6420 6174 elements and at │ │ │ │ -000f4bb0: 7472 6962 7574 6573 2c20 7573 6520 6120 tributes, use a │ │ │ │ -000f4bc0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix │ │ │ │ -000f4bd0: 2061 6e64 2063 6f6c 6f6e 2077 6974 6820 and colon with │ │ │ │ -000f4be0: 7468 6520 6d65 6d62 6572 206e 616d 653a the member name: │ │ │ │ -000f4bf0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns sc │ │ │ │ -000f4c40: 6865 6d61 2065 6c65 6d65 6e74 466f 726d hema elementForm │ │ │ │ -000f4c50: 3a20 7175 616c 6966 6965 6420 3c2f 7370 : qualified
    .
    //gsoap ns sch │ │ │ │ -000f4ca0: 656d 6120 6174 7472 6962 7574 6546 6f72 ema attributeFor │ │ │ │ -000f4cb0: 6d3a 2075 6e71 7561 6c69 6669 6564 203c m: unqualified < │ │ │ │ -000f4cc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -000f4ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f4cf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct ns__record @ char * type;
    .
    char * │ │ │ │ +000f4840: 6e61 6d65 3b20 3c2f 6469 763e 0a3c 6469 name;
    .} │ │ │ │ +000f4860: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    < │ │ │ │ +000f4880: 703e 4865 7265 2c20 7468 6520 3c63 6f64 p>Here, the ns__record struct is se │ │ │ │ +000f48b0: 7269 616c 697a 6564 2077 6974 6820 7175 rialized with qu │ │ │ │ +000f48c0: 616c 6966 6965 6420 656c 656d 656e 7420 alified element │ │ │ │ +000f48d0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name and unqualifie │ │ │ │ +000f48f0: 6420 6174 7472 6962 7574 6520 3c63 6f64 d attribute type
    :.
    < │ │ │ │ +000f4950: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;ns:re │ │ │ │ +000f4970: 636f 7264 3c2f 7370 616e 3e20 3c73 7061 cord type=" │ │ │ │ +000f49c0: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..." │ │ │ │ +000f49d0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    .
    │ │ │ │ +000f49f0: 266c 743b 3c73 7061 6e20 636c 6173 733d <ns │ │ │ │ +000f4a10: 3a6e 616d 653c 2f73 7061 6e3e 2667 743b :name> │ │ │ │ +000f4a20: 2e2e 2e26 6c74 3b2f 3c73 7061 6e20 636c ...</ns:name │ │ │ │ +000f4a50: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    .
    &l │ │ │ │ +000f4a70: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ns: │ │ │ │ +000f4a90: 7265 636f 7264 3c2f 7370 616e 3e26 6774 record> │ │ │ │ +000f4aa0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    │ │ │ │ +000f4ac0: 3c2f 6469 763e 3c70 3e54 6865 2022 636f

    The "co │ │ │ │ +000f4ad0: 6c6f 6e20 6e6f 7461 7469 6f6e 2220 666f lon notation" fo │ │ │ │ +000f4ae0: 7220 7374 7275 6374 2f63 6c61 7373 2f75 r struct/class/u │ │ │ │ +000f4af0: 6e69 6f6e 206d 656d 6265 7220 6e61 6d65 nion member name │ │ │ │ +000f4b00: 7320 6973 2075 7365 6420 746f 206f 7665 s is used to ove │ │ │ │ +000f4b10: 7272 6964 6520 656c 656d 656e 7420 616e rride element an │ │ │ │ +000f4b20: 6420 6174 7472 6962 7574 6520 7175 616c d attribute qual │ │ │ │ +000f4b30: 6966 6965 6420 6f72 2075 6e71 7561 6c69 ified or unquali │ │ │ │ +000f4b40: 6669 6564 2066 6f72 6d73 2e20 546f 206f fied forms. To o │ │ │ │ +000f4b50: 7665 7272 6964 6520 7468 6520 666f 726d verride the form │ │ │ │ +000f4b60: 2066 6f72 2069 6e64 6976 6964 7561 6c20 for individual │ │ │ │ +000f4b70: 6d65 6d62 6572 7320 7468 6174 2072 6570 members that rep │ │ │ │ +000f4b80: 7265 7365 6e74 2065 6c65 6d65 6e74 7320 resent elements │ │ │ │ +000f4b90: 616e 6420 6174 7472 6962 7574 6573 2c20 and attributes, │ │ │ │ +000f4ba0: 7573 6520 6120 6e61 6d65 7370 6163 6520 use a namespace │ │ │ │ +000f4bb0: 7072 6566 6978 2061 6e64 2063 6f6c 6f6e prefix and colon │ │ │ │ +000f4bc0: 2077 6974 6820 7468 6520 6d65 6d62 6572 with the member │ │ │ │ +000f4bd0: 206e 616d 653a 3c2f 703e 0a3c 6469 7620 name:

    .
    //gsoap │ │ │ │ +000f4c20: 206e 7320 7363 6865 6d61 2065 6c65 6d65 ns schema eleme │ │ │ │ +000f4c30: 6e74 466f 726d 3a20 7175 616c 6966 6965 ntForm: qualifie │ │ │ │ +000f4c40: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    . │ │ │ │ +000f4c50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ +000f4c80: 6e73 2073 6368 656d 6120 6174 7472 6962 ns schema attrib │ │ │ │ +000f4c90: 7574 6546 6f72 6d3a 2075 6e71 7561 6c69 uteForm: unquali │ │ │ │ +000f4ca0: 6669 6564 203c 2f73 7061 6e3e 3c2f 6469 fied .
    struc │ │ │ │ +000f4ce0: 7420 3c2f 7370 616e 3e6e 735f 5f72 6563 t ns__rec │ │ │ │ +000f4cf0: 6f72 6420 3c2f 6469 763e 0a3c 6469 7620 ord
    .
    {.
    {
    .< │ │ │ │ -000f4d30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f4d40: 3e20 2040 203c 7370 616e 2063 6c61 7373 > @ c │ │ │ │ -000f4d60: 6861 723c 2f73 7061 6e3e 202a 206e 733a har * ns: │ │ │ │ -000f4d70: 7479 7065 3b20 3c2f 6469 763e 0a3c 6469 type;
    . │ │ │ │ -000f4d90: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ -000f4db0: 723c 2f73 7061 6e3e 202a 203a 6e61 6d65 r * :name │ │ │ │ -000f4dc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    };.

    wh │ │ │ │ -000f4e00: 6572 6520 3c63 6f64 653e 6e61 6d65 3c2f ere name is unquali │ │ │ │ -000f4e20: 6669 6564 2061 6e64 203c 636f 6465 3e74 fied and t │ │ │ │ -000f4e30: 7970 653c 2f63 6f64 653e 2069 7320 7175 ype is qu │ │ │ │ -000f4e40: 616c 6966 6965 643a 3c2f 703e 0a3c 6469 alified:

    . < │ │ │ │ -000f4e60: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -000f4e70: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    <ns:record ns:t │ │ │ │ -000f4ed0: 7970 653c 2f73 7061 6e3e 3d3c 7370 616e ype="... │ │ │ │ -000f4f00: 2671 756f 743b 3c2f 7370 616e 3e26 6774 "> │ │ │ │ -000f4f10: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ -000f4f30: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;name< │ │ │ │ -000f4f50: 2f73 7061 6e3e 2667 743b 2e2e 2e26 6c74 /span>>...< │ │ │ │ -000f4f60: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/name │ │ │ │ -000f4f80: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
    </ns:record>
    .< │ │ │ │ -000f4fe0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    │ │ │ │ -000f5000: 5468 6520 636f 6c6f 6e20 6e6f 7461 7469 The colon notati │ │ │ │ -000f5010: 6f6e 2069 7320 6120 7379 6e74 6163 7469 on is a syntacti │ │ │ │ -000f5020: 6320 6e6f 7461 7469 6f6e 2075 7365 6420 c notation used │ │ │ │ -000f5030: 6f6e 6c79 2069 6e20 7468 6520 696e 7465 only in the inte │ │ │ │ -000f5040: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil │ │ │ │ -000f5050: 6520 7379 6e74 6178 2c20 6974 2069 7320 e syntax, it is │ │ │ │ -000f5060: 6e6f 7420 7472 616e 736c 6174 6564 2074 not translated t │ │ │ │ -000f5070: 6f20 7468 6520 432f 432b 2b20 6f75 7470 o the C/C++ outp │ │ │ │ -000f5080: 7574 2e3c 2f70 3e0a 3c70 3e54 6865 2063 ut.

    .

    The c │ │ │ │ -000f5090: 6f6c 6f6e 206e 6f74 6174 696f 6e20 646f olon notation do │ │ │ │ -000f50a0: 6573 206e 6f74 2061 766f 6964 206e 616d es not avoid nam │ │ │ │ -000f50b0: 6520 636c 6173 6865 7320 6265 7477 6565 e clashes betwee │ │ │ │ -000f50c0: 6e20 6d65 6d62 6572 732e 2046 6f72 2065 n members. For e │ │ │ │ -000f50d0: 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 xample:

    .
    struct │ │ │ │ -000f5120: 203c 2f73 7061 6e3e 785f 5f72 6563 6f72 x__recor │ │ │ │ -000f5130: 6420 3c2f 6469 763e 0a3c 6469 7620 636c d
    .
    {.
    @ char * │ │ │ │ -000f5190: 206e 616d 653b 203c 2f64 6976 3e0a 3c64 name;
    . │ │ │ │ -000f51b0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ -000f51d0: 6172 3c2f 7370 616e 3e20 2a20 783a 6e61 ar * x:na │ │ │ │ -000f51e0: 6d65 3b20 3c2f 6469 763e 0a3c 6469 7620 me;
    .
    };< │ │ │ │ -000f5200: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -000f5220: 7265 7375 6c74 7320 696e 2061 2072 6564 results in a red │ │ │ │ -000f5230: 6566 696e 6974 696f 6e20 6572 726f 722c efinition error, │ │ │ │ -000f5240: 2073 696e 6365 2062 6f74 6820 6d65 6d62 since both memb │ │ │ │ -000f5250: 6572 7320 6861 7665 2074 6865 2073 616d ers have the sam │ │ │ │ -000f5260: 6520 6e61 6d65 2e20 546f 2061 766f 6964 e name. To avoid │ │ │ │ -000f5270: 206e 616d 6520 636c 6173 6865 732c 2075 name clashes, u │ │ │ │ -000f5280: 7365 2061 2075 6e64 6572 7363 6f72 6520 se a underscore │ │ │ │ -000f5290: 7375 6666 6978 3a3c 2f70 3e0a 3c64 6976 suffix:

    .
    struct │ │ │ │ -000f52e0: 203c 2f73 7061 6e3e 785f 5f72 6563 6f72 x__recor │ │ │ │ -000f52f0: 6420 3c2f 6469 763e 0a3c 6469 7620 636c d
    .
    {.
    @ char * │ │ │ │ -000f5350: 206e 616d 653b 203c 2f64 6976 3e0a 3c64 name;
    . │ │ │ │ -000f5370: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ -000f5390: 6172 3c2f 7370 616e 3e20 2a20 783a 6e61 ar * x:na │ │ │ │ -000f53a0: 6d65 5f3b 203c 2f64 6976 3e0a 3c64 6976 me_;
    .
    }; │ │ │ │ -000f53c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    Not that the na │ │ │ │ -000f53f0: 6d65 7370 6163 6520 7072 6566 6978 2063 mespace prefix c │ │ │ │ -000f5400: 6f6e 7665 6e74 696f 6e20 6361 6e20 6265 onvention can be │ │ │ │ -000f5410: 2075 7365 6420 696e 7374 6561 643a 3c2f used instead:.

    struct x │ │ │ │ -000f5470: 5f5f 7265 636f 7264 203c 2f64 6976 3e0a __record
    . │ │ │ │ +000f4d20: 226c 696e 6522 3e20 2040 203c 7370 616e "line"> @ char │ │ │ │ +000f4d50: 202a 206e 733a 7479 7065 3b20 3c2f 6469 * ns:type; .
    char * │ │ │ │ +000f4da0: 203a 6e61 6d65 3b20 3c2f 6469 763e 0a3c :name;
    .< │ │ │ │ +000f4db0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f4dc0: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    │ │ │ │ +000f4dd0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The colon │ │ │ │ +000f4ff0: 6e6f 7461 7469 6f6e 2069 7320 6120 7379 notation is a sy │ │ │ │ +000f5000: 6e74 6163 7469 6320 6e6f 7461 7469 6f6e ntactic notation │ │ │ │ +000f5010: 2075 7365 6420 6f6e 6c79 2069 6e20 7468 used only in th │ │ │ │ +000f5020: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head │ │ │ │ +000f5030: 6572 2066 696c 6520 7379 6e74 6178 2c20 er file syntax, │ │ │ │ +000f5040: 6974 2069 7320 6e6f 7420 7472 616e 736c it is not transl │ │ │ │ +000f5050: 6174 6564 2074 6f20 7468 6520 432f 432b ated to the C/C+ │ │ │ │ +000f5060: 2b20 6f75 7470 7574 2e3c 2f70 3e0a 3c70 + output.

    .

    The colon notat │ │ │ │ +000f5080: 696f 6e20 646f 6573 206e 6f74 2061 766f ion does not avo │ │ │ │ +000f5090: 6964 206e 616d 6520 636c 6173 6865 7320 id name clashes │ │ │ │ +000f50a0: 6265 7477 6565 6e20 6d65 6d62 6572 732e between members. │ │ │ │ +000f50b0: 2046 6f72 2065 7861 6d70 6c65 3a3c 2f70 For example:

    .
    │ │ │ │ +000f5100: 7374 7275 6374 203c 2f73 7061 6e3e 785f struct x_ │ │ │ │ +000f5110: 5f72 6563 6f72 6420 3c2f 6469 763e 0a3c _record
    .< │ │ │ │ +000f5120: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f5130: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    @ < │ │ │ │ +000f5150: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000f5160: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char * name; .
    char │ │ │ │ +000f51c0: 2a20 783a 6e61 6d65 3b20 3c2f 6469 763e * x:name;
    │ │ │ │ +000f51d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    results in │ │ │ │ +000f5210: 2061 2072 6564 6566 696e 6974 696f 6e20 a redefinition │ │ │ │ +000f5220: 6572 726f 722c 2073 696e 6365 2062 6f74 error, since bot │ │ │ │ +000f5230: 6820 6d65 6d62 6572 7320 6861 7665 2074 h members have t │ │ │ │ +000f5240: 6865 2073 616d 6520 6e61 6d65 2e20 546f he same name. To │ │ │ │ +000f5250: 2061 766f 6964 206e 616d 6520 636c 6173 avoid name clas │ │ │ │ +000f5260: 6865 732c 2075 7365 2061 2075 6e64 6572 hes, use a under │ │ │ │ +000f5270: 7363 6f72 6520 7375 6666 6978 3a3c 2f70 score suffix:

    .
    │ │ │ │ +000f52c0: 7374 7275 6374 203c 2f73 7061 6e3e 785f struct x_ │ │ │ │ +000f52d0: 5f72 6563 6f72 6420 3c2f 6469 763e 0a3c _record
    .< │ │ │ │ +000f52e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f52f0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    @ < │ │ │ │ +000f5310: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000f5320: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char * name; .
    char │ │ │ │ +000f5380: 2a20 783a 6e61 6d65 5f3b 203c 2f64 6976 * x:name_;
    .
    };
    .

    Not that │ │ │ │ +000f53d0: 7468 6520 6e61 6d65 7370 6163 6520 7072 the namespace pr │ │ │ │ +000f53e0: 6566 6978 2063 6f6e 7665 6e74 696f 6e20 efix convention │ │ │ │ +000f53f0: 6361 6e20 6265 2075 7365 6420 696e 7374 can be used inst │ │ │ │ +000f5400: 6561 643a 3c2f 703e 0a3c 6469 7620 636c ead:

    .
    < │ │ │ │ +000f5420: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f5430: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct x__record < │ │ │ │ +000f5460: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 000f5480: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    @ │ │ │ │ -000f54b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * name; .
    char │ │ │ │ -000f5520: 202a 2078 5f5f 6e61 6d65 3b20 3c2f 6469 * x__name; .
    };
    .

    which av │ │ │ │ -000f5570: 6f69 6473 2074 6865 206e 616d 6520 636c oids the name cl │ │ │ │ -000f5580: 6173 682e 2048 6f77 6576 6572 2c20 7468 ash. However, th │ │ │ │ -000f5590: 6520 7265 7375 6c74 696e 6720 7363 6865 e resulting sche │ │ │ │ -000f55a0: 6d61 2069 7320 6469 6666 6572 656e 7420 ma is different │ │ │ │ -000f55b0: 7369 6e63 6520 7468 6520 6c61 7374 2065 since the last e │ │ │ │ -000f55c0: 7861 6d70 6c65 2067 656e 6572 6174 6573 xample generates │ │ │ │ -000f55d0: 2061 2067 6c6f 6261 6c20 3c63 6f64 653e a global │ │ │ │ -000f55e0: 6e61 6d65 3c2f 636f 6465 3e20 656c 656d name elem │ │ │ │ -000f55f0: 656e 7420 6465 6669 6e69 7469 6f6e 2074 ent definition t │ │ │ │ -000f5600: 6861 7420 6973 2072 6566 6572 656e 6365 hat is reference │ │ │ │ -000f5610: 6420 6279 2074 6865 206c 6f63 616c 2065 d by the local e │ │ │ │ -000f5620: 6c65 6d65 6e74 2e3c 2f70 3e0a 3c70 3e4d lement.

    .

    M │ │ │ │ -000f5630: 6f72 6520 7370 6563 6966 6963 616c 6c79 ore specifically │ │ │ │ -000f5640: 2c20 7468 6520 6469 6666 6572 656e 6365 , the difference │ │ │ │ -000f5650: 2062 6574 7765 656e 2074 6865 206e 616d between the nam │ │ │ │ -000f5660: 6573 7061 6365 2070 7265 6669 7820 636f espace prefix co │ │ │ │ -000f5670: 6e76 656e 7469 6f6e 2077 6974 6820 646f nvention with do │ │ │ │ -000f5680: 7562 6c65 2075 6e64 6572 7363 6f72 6573 uble underscores │ │ │ │ -000f5690: 2061 6e64 2063 6f6c 6f6e 206e 6f74 6174 and colon notat │ │ │ │ -000f56a0: 696f 6e20 6973 2074 6861 7420 7468 6520 ion is that the │ │ │ │ -000f56b0: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix │ │ │ │ -000f56c0: 2063 6f6e 7665 6e74 696f 6e20 6765 6e65 convention gene │ │ │ │ -000f56d0: 7261 7465 7320 7363 6865 6d61 2065 6c65 rates schema ele │ │ │ │ -000f56e0: 6d65 6e74 2f61 7474 7269 6275 7465 2072 ment/attribute r │ │ │ │ -000f56f0: 6566 6572 656e 6365 7320 746f 2065 6c65 eferences to ele │ │ │ │ -000f5700: 6d65 6e74 732f 6174 7472 6962 7574 6573 ments/attributes │ │ │ │ -000f5710: 2061 7420 7468 6520 746f 7020 6c65 7665 at the top leve │ │ │ │ -000f5720: 6c2c 2077 6869 6c65 2074 6865 2063 6f6c l, while the col │ │ │ │ -000f5730: 6f6e 206e 6f74 6174 696f 6e20 6f6e 6c79 on notation only │ │ │ │ -000f5740: 2061 6666 6563 7473 2074 6865 206c 6f63 affects the loc │ │ │ │ -000f5750: 616c 2065 6c65 6d65 6e74 2f61 7474 7269 al element/attri │ │ │ │ -000f5760: 6275 7465 206e 616d 6573 7061 6365 2071 bute namespace q │ │ │ │ -000f5770: 7561 6c69 6669 6361 7469 6f6e 2062 7920 ualification by │ │ │ │ -000f5780: 666f 726d 206f 7665 7272 6964 696e 672e form overriding. │ │ │ │ -000f5790: 2054 6869 7320 6973 2062 6573 7420 696c This is best il │ │ │ │ -000f57a0: 6c75 7374 7261 7465 6420 6279 2061 6e20 lustrated by an │ │ │ │ -000f57b0: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    .
    struc │ │ │ │ -000f5800: 7420 3c2f 7370 616e 3e78 5f5f 7265 636f t x__reco │ │ │ │ -000f5810: 7264 203c 2f64 6976 3e0a 3c64 6976 2063 rd
    .
    {.
    char │ │ │ │ -000f5870: 2a20 3a6e 616d 653b 203c 2f64 6976 3e0a * :name;
    . │ │ │ │ -000f5880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -000f58b0: 6368 6172 3c2f 7370 616e 3e20 2a20 783a char * x: │ │ │ │ -000f58c0: 7068 6f6e 653b 203c 2f64 6976 3e0a 3c64 phone;
    . │ │ │ │ -000f58e0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ -000f5900: 6172 3c2f 7370 616e 3e20 2a20 785f 5f66 ar * x__f │ │ │ │ -000f5910: 6178 3b20 3c2f 6469 763e 0a3c 6469 7620 ax;
    .
    │ │ │ │ -000f5930: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -000f5950: 2f73 7061 6e3e 202a 2079 5f5f 7a69 703b /span> * y__zip; │ │ │ │ -000f5960: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    };.

    whi │ │ │ │ -000f59a0: 6368 2067 656e 6572 6174 6573 2074 6865 ch generates the │ │ │ │ -000f59b0: 2066 6f6c 6c6f 7769 6e67 203c 656d 3e3c following < │ │ │ │ -000f59c0: 636f 6465 3e78 2e78 7364 3c2f 636f 6465 code>x.xsdschema:

    .
    < │ │ │ │ -000f5a20: 3c73 7061 6e20 636c 6173 733d 226b 6579 comple │ │ │ │ -000f5a40: 7854 7970 653c 2f73 7061 6e3e 203c 7370 xType name=< │ │ │ │ -000f5a70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000f5a80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000f5a90: 3b72 6563 6f72 6426 7175 6f74 3b3c 2f73 ;record">
    . │ │ │ │ -000f5ab0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <sequence>
    . │ │ │ │ -000f5b10: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <element │ │ │ │ -000f5b40: 3c73 7061 6e20 636c 6173 733d 226b 6579 name=&q │ │ │ │ -000f5b80: 756f 743b 6e61 6d65 2671 756f 743b 3c2f uot;name" type │ │ │ │ -000f5bb0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="xsd:st │ │ │ │ -000f5be0: 7269 6e67 2671 756f 743b 3c2f 7370 616e ring" minOccur │ │ │ │ -000f5c10: 733c 2f73 7061 6e3e 3d3c 7370 616e 2063 s="0&quo │ │ │ │ -000f5c40: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; │ │ │ │ -000f5c60: 6d61 784f 6363 7572 733c 2f73 7061 6e3e maxOccurs │ │ │ │ -000f5c70: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000f5c90: 6f74 3b31 2671 756f 743b 3c2f 7370 616e ot;1" nillable │ │ │ │ -000f5cc0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="true&q │ │ │ │ -000f5cf0: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; form=" │ │ │ │ -000f5d40: 756e 7175 616c 6966 6965 6426 7175 6f74 unqualified" │ │ │ │ -000f5d50: 3b3c 2f73 7061 6e3e 2f26 6774 3b20 3c2f ;/> .
    << │ │ │ │ -000f5d80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f5d90: 6f72 6474 7970 6522 3e65 6c65 6d65 6e74 ordtype">element │ │ │ │ -000f5da0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na │ │ │ │ -000f5dc0: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="phon │ │ │ │ -000f5df0: 6526 7175 6f74 3b3c 2f73 7061 6e3e 203c e" < │ │ │ │ -000f5e00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f5e10: 6f72 6422 3e74 7970 653c 2f73 7061 6e3e ord">type │ │ │ │ -000f5e20: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000f5e40: 6f74 3b78 7364 3a73 7472 696e 6726 7175 ot;xsd:string&qu │ │ │ │ -000f5e50: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; minOccurs=&q │ │ │ │ -000f5ea0: 756f 743b 3026 7175 6f74 3b3c 2f73 7061 uot;0" maxOccu │ │ │ │ -000f5ed0: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="1&qu │ │ │ │ -000f5f00: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; nillable │ │ │ │ -000f5f30: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000f5f50: 6f74 3b74 7275 6526 7175 6f74 3b3c 2f73 ot;true" form< │ │ │ │ -000f5f80: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="qualifi │ │ │ │ -000f5fb0: 6564 2671 756f 743b 3c2f 7370 616e 3e2f ed"/ │ │ │ │ -000f5fc0: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    .
    │ │ │ │ -000f5fe0: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ -000f6000: 656c 656d 656e 743c 2f73 7061 6e3e 203c element < │ │ │ │ -000f6010: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f6020: 6f72 6422 3e72 6566 3c2f 7370 616e 3e3d ord">ref= │ │ │ │ -000f6030: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -000f6050: 743b 783a 6661 7826 7175 6f74 3b3c 2f73 t;x:fax" minOc │ │ │ │ -000f6080: 6375 7273 3c2f 7370 616e 3e3d 3c73 7061 curs="0& │ │ │ │ -000f60b0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; maxOccurs= │ │ │ │ -000f6100: 2671 756f 743b 3126 7175 6f74 3b3c 2f73 "1"/>
    │ │ │ │ -000f6120: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <element ref="y:zip&quo │ │ │ │ -000f61b0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; │ │ │ │ -000f61d0: 6d69 6e4f 6363 7572 733c 2f73 7061 6e3e minOccurs │ │ │ │ -000f61e0: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000f6200: 6f74 3b30 2671 756f 743b 3c2f 7370 616e ot;0" maxOccur │ │ │ │ -000f6230: 733c 2f73 7061 6e3e 3d3c 7370 616e 2063 s="1&quo │ │ │ │ -000f6260: 743b 3c2f 7370 616e 3e2f 2667 743b 203c t;/> < │ │ │ │ -000f6270: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    </< │ │ │ │ -000f6290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f62a0: 6f72 6474 7970 6522 3e73 6571 7565 6e63 ordtype">sequenc │ │ │ │ -000f62b0: 653c 2f73 7061 6e3e 2667 743b 203c 2f64 e> .
    </complexType │ │ │ │ -000f6300: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
    <element name= │ │ │ │ -000f6390: 2671 756f 743b 6661 7826 7175 6f74 3b3c "fax"< │ │ │ │ -000f63a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ │ │ │ │ -000f63c0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="xsd:s │ │ │ │ -000f63f0: 7472 696e 6726 7175 6f74 3b3c 2f73 7061 tring"/>
    .

    a │ │ │ │ -000f6430: 6e64 2074 6865 203c 656d 3e3c 636f 6465 nd the y.xsd schema define │ │ │ │ -000f6460: 7320 636f 6e74 6169 6e73 3a3c 2f70 3e0a s contains:

    . │ │ │ │ -000f6470: 3c64 6976 2063 6c61 7373 3d22 616c 7422
    <element< │ │ │ │ -000f64d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> nam │ │ │ │ -000f64f0: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="zip&q │ │ │ │ -000f6520: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; type=" │ │ │ │ -000f6570: 7873 643a 7374 7269 6e67 2671 756f 743b xsd:string" │ │ │ │ -000f6580: 3c2f 7370 616e 3e2f 2667 743b 3c2f 6469 />.

    See also C and C │ │ │ │ -000f65f0: 2b2b 2058 4d4c 2064 6174 6120 6269 6e64 ++ XML data bind │ │ │ │ -000f6600: 696e 6773 3c2f 613e 2064 6f63 756d 656e ings documen │ │ │ │ -000f6610: 7461 7469 6f6e 2066 6f72 206d 6f72 6520 tation for more │ │ │ │ -000f6620: 6465 7461 696c 732e 3c2f 703e 0a3c 703e details.

    .

    │ │ │ │ -000f6630: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -000f6650: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .XML n │ │ │ │ -000f6690: 616d 6573 7061 6365 7320 616e 6420 7468 amespaces and th │ │ │ │ -000f66a0: 6520 6e61 6d65 7370 6163 6520 6d61 7070 e namespace mapp │ │ │ │ -000f66b0: 696e 6720 7461 626c 653c 2f68 313e 0a3c ing table

    .< │ │ │ │ -000f66c0: 703e 4120 6e61 6d65 7370 6163 6520 6d61 p>A namespace ma │ │ │ │ -000f66d0: 7070 696e 6720 7461 626c 6520 7368 6f75 pping table shou │ │ │ │ -000f66e0: 6c64 2062 6520 696e 636c 7564 6564 2069 ld be included i │ │ │ │ -000f66f0: 6e20 7468 6520 736f 7572 6365 2063 6f64 n the source cod │ │ │ │ -000f6700: 6520 6f66 2063 6c69 656e 7420 616e 6420 e of client and │ │ │ │ -000f6710: 7365 7276 6963 6520 6170 706c 6963 6174 service applicat │ │ │ │ -000f6720: 696f 6e73 2e20 5468 6520 6d61 7070 696e ions. The mappin │ │ │ │ -000f6730: 6720 7461 626c 6520 6973 2075 7365 6420 g table is used │ │ │ │ -000f6740: 6279 2074 6865 2073 6572 6961 6c69 7a65 by the serialize │ │ │ │ -000f6750: 7273 2061 6e64 2064 6573 6572 6961 6c69 rs and deseriali │ │ │ │ -000f6760: 7a65 7273 206f 6620 7468 6520 7374 7562 zers of the stub │ │ │ │ -000f6770: 2061 6e64 2073 6b65 6c65 746f 6e20 6675 and skeleton fu │ │ │ │ -000f6780: 6e63 7469 6f6e 7320 746f 2070 726f 6475 nctions to produ │ │ │ │ -000f6790: 6365 2076 616c 6964 2058 4d4c 206d 6573 ce valid XML mes │ │ │ │ -000f67a0: 7361 6765 7320 616e 6420 746f 2070 6172 sages and to par │ │ │ │ -000f67b0: 7365 2061 6e64 2076 616c 6964 6174 6520 se and validate │ │ │ │ -000f67c0: 584d 4c20 6d65 7373 6167 6573 2e20 4120 XML messages. A │ │ │ │ -000f67d0: 7479 7069 6361 6c20 6d61 7070 696e 6720 typical mapping │ │ │ │ -000f67e0: 7461 626c 6520 6973 2073 686f 776e 2062 table is shown b │ │ │ │ -000f67f0: 656c 6f77 3a3c 2f70 3e0a 3c64 6976 2063 elow:

    .
    │ │ │ │ -000f6810: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -000f6840: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace │ │ │ │ -000f6880: 203c 6120 636c 6173 733d 2263 6f64 6522 namespac │ │ │ │ -000f68e0: 6573 3c2f 613e 5b5d 203d 203c 2f64 6976 es[] =
    @ │ │ │ │ +000f54b0: 6368 6172 3c2f 7370 616e 3e20 2a20 6e61 char * na │ │ │ │ +000f54c0: 6d65 3b20 3c2f 6469 763e 0a3c 6469 7620 me;
    .
    │ │ │ │ +000f54e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +000f5500: 2f73 7061 6e3e 202a 2078 5f5f 6e61 6d65 /span> * x__name │ │ │ │ +000f5510: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    };.

    wh │ │ │ │ +000f5550: 6963 6820 6176 6f69 6473 2074 6865 206e ich avoids the n │ │ │ │ +000f5560: 616d 6520 636c 6173 682e 2048 6f77 6576 ame clash. Howev │ │ │ │ +000f5570: 6572 2c20 7468 6520 7265 7375 6c74 696e er, the resultin │ │ │ │ +000f5580: 6720 7363 6865 6d61 2069 7320 6469 6666 g schema is diff │ │ │ │ +000f5590: 6572 656e 7420 7369 6e63 6520 7468 6520 erent since the │ │ │ │ +000f55a0: 6c61 7374 2065 7861 6d70 6c65 2067 656e last example gen │ │ │ │ +000f55b0: 6572 6174 6573 2061 2067 6c6f 6261 6c20 erates a global │ │ │ │ +000f55c0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name element defini │ │ │ │ +000f55e0: 7469 6f6e 2074 6861 7420 6973 2072 6566 tion that is ref │ │ │ │ +000f55f0: 6572 656e 6365 6420 6279 2074 6865 206c erenced by the l │ │ │ │ +000f5600: 6f63 616c 2065 6c65 6d65 6e74 2e3c 2f70 ocal element.

    .

    More specif │ │ │ │ +000f5620: 6963 616c 6c79 2c20 7468 6520 6469 6666 ically, the diff │ │ │ │ +000f5630: 6572 656e 6365 2062 6574 7765 656e 2074 erence between t │ │ │ │ +000f5640: 6865 206e 616d 6573 7061 6365 2070 7265 he namespace pre │ │ │ │ +000f5650: 6669 7820 636f 6e76 656e 7469 6f6e 2077 fix convention w │ │ │ │ +000f5660: 6974 6820 646f 7562 6c65 2075 6e64 6572 ith double under │ │ │ │ +000f5670: 7363 6f72 6573 2061 6e64 2063 6f6c 6f6e scores and colon │ │ │ │ +000f5680: 206e 6f74 6174 696f 6e20 6973 2074 6861 notation is tha │ │ │ │ +000f5690: 7420 7468 6520 6e61 6d65 7370 6163 6520 t the namespace │ │ │ │ +000f56a0: 7072 6566 6978 2063 6f6e 7665 6e74 696f prefix conventio │ │ │ │ +000f56b0: 6e20 6765 6e65 7261 7465 7320 7363 6865 n generates sche │ │ │ │ +000f56c0: 6d61 2065 6c65 6d65 6e74 2f61 7474 7269 ma element/attri │ │ │ │ +000f56d0: 6275 7465 2072 6566 6572 656e 6365 7320 bute references │ │ │ │ +000f56e0: 746f 2065 6c65 6d65 6e74 732f 6174 7472 to elements/attr │ │ │ │ +000f56f0: 6962 7574 6573 2061 7420 7468 6520 746f ibutes at the to │ │ │ │ +000f5700: 7020 6c65 7665 6c2c 2077 6869 6c65 2074 p level, while t │ │ │ │ +000f5710: 6865 2063 6f6c 6f6e 206e 6f74 6174 696f he colon notatio │ │ │ │ +000f5720: 6e20 6f6e 6c79 2061 6666 6563 7473 2074 n only affects t │ │ │ │ +000f5730: 6865 206c 6f63 616c 2065 6c65 6d65 6e74 he local element │ │ │ │ +000f5740: 2f61 7474 7269 6275 7465 206e 616d 6573 /attribute names │ │ │ │ +000f5750: 7061 6365 2071 7561 6c69 6669 6361 7469 pace qualificati │ │ │ │ +000f5760: 6f6e 2062 7920 666f 726d 206f 7665 7272 on by form overr │ │ │ │ +000f5770: 6964 696e 672e 2054 6869 7320 6973 2062 iding. This is b │ │ │ │ +000f5780: 6573 7420 696c 6c75 7374 7261 7465 6420 est illustrated │ │ │ │ +000f5790: 6279 2061 6e20 6578 616d 706c 653a 3c2f by an example:.

    struct x │ │ │ │ +000f57f0: 5f5f 7265 636f 7264 203c 2f64 6976 3e0a __record
    . │ │ │ │ +000f5800: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ +000f5830: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * :name; < │ │ │ │ +000f5860: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char * x:phone; .
    char │ │ │ │ +000f58f0: 2a20 785f 5f66 6178 3b20 3c2f 6469 763e * x__fax;
    │ │ │ │ +000f5900: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char * y │ │ │ │ +000f5940: 5f5f 7a69 703b 203c 2f64 6976 3e0a 3c64 __zip;
    . │ │ │ │ +000f5960: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .
    < │ │ │ │ +000f5970: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +000f5980: 3c70 3e77 6869 6368 2067 656e 6572 6174

    which generat │ │ │ │ +000f5990: 6573 2074 6865 2066 6f6c 6c6f 7769 6e67 es the following │ │ │ │ +000f59a0: 203c 656d 3e3c 636f 6465 3e78 2e78 7364 x.xsd │ │ │ │ +000f59b0: 3c2f 636f 6465 3e3c 2f65 6d3e 7363 6865 sche │ │ │ │ +000f59c0: 6d61 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ma:

    .
    │ │ │ │ +000f59f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000f5a20: 636f 6d70 6c65 7854 7970 653c 2f73 7061 complexType name="record&qu │ │ │ │ +000f5a80: 6f74 3b3c 2f73 7061 6e3e 2667 743b 203c ot;> < │ │ │ │ +000f5a90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <sequence │ │ │ │ +000f5ad0: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
    <element name │ │ │ │ +000f5b40: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="name&q │ │ │ │ +000f5b70: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; type=" │ │ │ │ +000f5bc0: 7873 643a 7374 7269 6e67 2671 756f 743b xsd:string" │ │ │ │ +000f5bd0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c mi │ │ │ │ +000f5bf0: 6e4f 6363 7572 733c 2f73 7061 6e3e 3d3c nOccurs=< │ │ │ │ +000f5c00: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f5c10: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f5c20: 3b30 2671 756f 743b 3c2f 7370 616e 3e20 ;0" │ │ │ │ +000f5c30: 3c73 7061 6e20 636c 6173 733d 226b 6579 maxOccurs< │ │ │ │ +000f5c50: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="1" │ │ │ │ +000f5c80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ni │ │ │ │ +000f5ca0: 6c6c 6162 6c65 3c2f 7370 616e 3e3d 3c73 llable=" │ │ │ │ +000f5cd0: 7472 7565 2671 756f 743b 3c2f 7370 616e true" form= │ │ │ │ +000f5d20: 2671 756f 743b 756e 7175 616c 6966 6965 "unqualifie │ │ │ │ +000f5d30: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2f26 d"/& │ │ │ │ +000f5d40: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    │ │ │ │ +000f5d60: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <e │ │ │ │ +000f5d80: 6c65 6d65 6e74 3c2f 7370 616e 3e20 3c73 lement name= │ │ │ │ +000f5db0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000f5dd0: 743b 7068 6f6e 6526 7175 6f74 3b3c 2f73 t;phone" type< │ │ │ │ +000f5e00: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="xsd:str │ │ │ │ +000f5e30: 696e 6726 7175 6f74 3b3c 2f73 7061 6e3e ing" │ │ │ │ +000f5e40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 minOccurs │ │ │ │ +000f5e60: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="0" │ │ │ │ +000f5e90: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; m │ │ │ │ +000f5eb0: 6178 4f63 6375 7273 3c2f 7370 616e 3e3d axOccurs= │ │ │ │ +000f5ec0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000f5ee0: 743b 3126 7175 6f74 3b3c 2f73 7061 6e3e t;1" │ │ │ │ +000f5ef0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 nillable< │ │ │ │ +000f5f10: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="true&qu │ │ │ │ +000f5f40: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; form="q │ │ │ │ +000f5f90: 7561 6c69 6669 6564 2671 756f 743b 3c2f ualified"/>
    .
    <element ref="x:fax&qu │ │ │ │ +000f6040: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; minOccurs=&q │ │ │ │ +000f6090: 756f 743b 3026 7175 6f74 3b3c 2f73 7061 uot;0" maxOccu │ │ │ │ +000f60c0: 7273 3c2f 7370 616e 3e3d 3c73 7061 6e20 rs="1&qu │ │ │ │ +000f60f0: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b20 ot;/> │ │ │ │ +000f6100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +000f6120: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;eleme │ │ │ │ +000f6140: 6e74 3c2f 7370 616e 3e20 3c73 7061 6e20 nt │ │ │ │ +000f6160: 7265 663c 2f73 7061 6e3e 3d3c 7370 616e ref="y:z │ │ │ │ +000f6190: 6970 2671 756f 743b 3c2f 7370 616e 3e20 ip" │ │ │ │ +000f61a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 minOccurs< │ │ │ │ +000f61c0: 2f73 7061 6e3e 3d3c 7370 616e 2063 6c61 /span>="0" │ │ │ │ +000f61f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c ma │ │ │ │ +000f6210: 784f 6363 7572 733c 2f73 7061 6e3e 3d3c xOccurs=< │ │ │ │ +000f6220: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f6230: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f6240: 3b31 2671 756f 743b 3c2f 7370 616e 3e2f ;1"/ │ │ │ │ +000f6250: 2667 743b 203c 2f64 6976 3e0a 3c64 6976 >
    .
    │ │ │ │ +000f6270: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </s │ │ │ │ +000f6290: 6571 7565 6e63 653c 2f73 7061 6e3e 2667 equence&g │ │ │ │ +000f62a0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    < │ │ │ │ +000f62c0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /compl │ │ │ │ +000f62e0: 6578 5479 7065 3c2f 7370 616e 3e26 6774 exType> │ │ │ │ +000f62f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    << │ │ │ │ +000f6310: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000f6320: 6f72 6474 7970 6522 3e65 6c65 6d65 6e74 ordtype">element │ │ │ │ +000f6330: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na │ │ │ │ +000f6350: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="fax& │ │ │ │ +000f6380: 7175 6f74 3b3c 2f73 7061 6e3e 203c 7370 quot; type=< │ │ │ │ +000f63b0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f63c0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f63d0: 3b78 7364 3a73 7472 696e 6726 7175 6f74 ;xsd:string" │ │ │ │ +000f63e0: 3b3c 2f73 7061 6e3e 2f26 6774 3b3c 2f64 ;/>.

    and the y.xsd schema │ │ │ │ +000f6440: 6465 6669 6e65 7320 636f 6e74 6169 6e73 defines contains │ │ │ │ +000f6450: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    │ │ │ │ +000f6490: 266c 743b 3c73 7061 6e20 636c 6173 733d <el │ │ │ │ +000f64b0: 656d 656e 743c 2f73 7061 6e3e 203c 7370 ement name=< │ │ │ │ +000f64e0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f64f0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f6500: 3b7a 6970 2671 756f 743b 3c2f 7370 616e ;zip" type= │ │ │ │ +000f6550: 2671 756f 743b 7873 643a 7374 7269 6e67 "xsd:string │ │ │ │ +000f6560: 2671 756f 743b 3c2f 7370 616e 3e2f 2667 "/&g │ │ │ │ +000f6570: 743b 3c2f 6469 763e 0a3c 2f64 6976 3e3c t;
    .
    < │ │ │ │ +000f6580: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +000f6590: 203c 2f64 6976 3e3c 703e 5365 6520 616c

    See al │ │ │ │ +000f65a0: 736f 203c 6120 6872 6566 3d22 2e2e 2f2e so C │ │ │ │ +000f65d0: 2061 6e64 2043 2b2b 2058 4d4c 2064 6174 and C++ XML dat │ │ │ │ +000f65e0: 6120 6269 6e64 696e 6773 3c2f 613e 2064 a bindings d │ │ │ │ +000f65f0: 6f63 756d 656e 7461 7469 6f6e 2066 6f72 ocumentation for │ │ │ │ +000f6600: 206d 6f72 6520 6465 7461 696c 732e 3c2f more details..

    .... Back to t │ │ │ │ +000f6630: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +000f6640: 3c2f 613e 3c2f 703e 0a3c 6831 3e3c 6120

    .

    │ │ │ │ +000f6670: 0a58 4d4c 206e 616d 6573 7061 6365 7320 .XML namespaces │ │ │ │ +000f6680: 616e 6420 7468 6520 6e61 6d65 7370 6163 and the namespac │ │ │ │ +000f6690: 6520 6d61 7070 696e 6720 7461 626c 653c e mapping table< │ │ │ │ +000f66a0: 2f68 313e 0a3c 703e 4120 6e61 6d65 7370 /h1>.

    A namesp │ │ │ │ +000f66b0: 6163 6520 6d61 7070 696e 6720 7461 626c ace mapping tabl │ │ │ │ +000f66c0: 6520 7368 6f75 6c64 2062 6520 696e 636c e should be incl │ │ │ │ +000f66d0: 7564 6564 2069 6e20 7468 6520 736f 7572 uded in the sour │ │ │ │ +000f66e0: 6365 2063 6f64 6520 6f66 2063 6c69 656e ce code of clien │ │ │ │ +000f66f0: 7420 616e 6420 7365 7276 6963 6520 6170 t and service ap │ │ │ │ +000f6700: 706c 6963 6174 696f 6e73 2e20 5468 6520 plications. The │ │ │ │ +000f6710: 6d61 7070 696e 6720 7461 626c 6520 6973 mapping table is │ │ │ │ +000f6720: 2075 7365 6420 6279 2074 6865 2073 6572 used by the ser │ │ │ │ +000f6730: 6961 6c69 7a65 7273 2061 6e64 2064 6573 ializers and des │ │ │ │ +000f6740: 6572 6961 6c69 7a65 7273 206f 6620 7468 erializers of th │ │ │ │ +000f6750: 6520 7374 7562 2061 6e64 2073 6b65 6c65 e stub and skele │ │ │ │ +000f6760: 746f 6e20 6675 6e63 7469 6f6e 7320 746f ton functions to │ │ │ │ +000f6770: 2070 726f 6475 6365 2076 616c 6964 2058 produce valid X │ │ │ │ +000f6780: 4d4c 206d 6573 7361 6765 7320 616e 6420 ML messages and │ │ │ │ +000f6790: 746f 2070 6172 7365 2061 6e64 2076 616c to parse and val │ │ │ │ +000f67a0: 6964 6174 6520 584d 4c20 6d65 7373 6167 idate XML messag │ │ │ │ +000f67b0: 6573 2e20 4120 7479 7069 6361 6c20 6d61 es. A typical ma │ │ │ │ +000f67c0: 7070 696e 6720 7461 626c 6520 6973 2073 pping table is s │ │ │ │ +000f67d0: 686f 776e 2062 656c 6f77 3a3c 2f70 3e0a hown below:

    . │ │ │ │ +000f67e0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ +000f6820: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct Namespa │ │ │ │ +000f6860: 6365 3c2f 613e 203c 6120 636c 6173 733d ce na │ │ │ │ +000f68c0: 6d65 7370 6163 6573 3c2f 613e 5b5d 203d mespaces[] = │ │ │ │ +000f68d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    {
    .
    │ │ │ │ -000f6920: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // { " │ │ │ │ -000f6940: 3b70 7265 6669 7826 7175 6f74 3b2c 2026 ;prefix", & │ │ │ │ -000f6950: 7175 6f74 3b55 5249 2671 756f 743b 2c20 quot;URI", │ │ │ │ -000f6960: 2671 756f 743b 5552 492d 7061 7474 6572 "URI-patter │ │ │ │ -000f6970: 6e26 7175 6f74 3b20 286f 7074 696f 6e61 n" (optiona │ │ │ │ -000f6980: 6c29 207d 203c 2f73 7061 6e3e 3c2f 6469 l) } .
    { "SOAP- │ │ │ │ -000f69d0: 454e 5626 7175 6f74 3b3c 2f73 7061 6e3e ENV" │ │ │ │ -000f69e0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -000f6a00: 756f 743b 6874 7470 3a2f 2f73 6368 656d uot;http://schem │ │ │ │ -000f6a10: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f73 as.xmlsoap.org/s │ │ │ │ -000f6a20: 6f61 702f 656e 7665 6c6f 7065 2f26 7175 oap/envelope/&qu │ │ │ │ -000f6a30: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c73 ot; }, // must be f │ │ │ │ -000f6a60: 6972 7374 203c 2f73 7061 6e3e 3c2f 6469 irst .
    { "SOAP- │ │ │ │ -000f6ab0: 454e 4326 7175 6f74 3b3c 2f73 7061 6e3e ENC" │ │ │ │ -000f6ac0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -000f6ae0: 756f 743b 6874 7470 3a2f 2f73 6368 656d uot;http://schem │ │ │ │ -000f6af0: 6173 2e78 6d6c 736f 6170 2e6f 7267 2f73 as.xmlsoap.org/s │ │ │ │ -000f6b00: 6f61 702f 656e 636f 6469 6e67 2f26 7175 oap/encoding/&qu │ │ │ │ -000f6b10: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c73 ot; }, // must be s │ │ │ │ -000f6b40: 6563 6f6e 6420 3c2f 7370 616e 3e3c 2f64 econd .
    { "xsi& │ │ │ │ -000f6b90: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -000f6ba0: 2020 203c 7370 616e 2063 6c61 7373 3d22 & │ │ │ │ -000f6bc0: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www. │ │ │ │ -000f6bd0: 7733 2e6f 7267 2f32 3030 312f 584d 4c53 w3.org/2001/XMLS │ │ │ │ -000f6be0: 6368 656d 612d 696e 7374 616e 6365 2671 chema-instance&q │ │ │ │ -000f6bf0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, < │ │ │ │ -000f6c00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000f6c10: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent">// must be │ │ │ │ -000f6c20: 7468 6972 6420 3c2f 7370 616e 3e3c 2f64 third .
    { "xsd& │ │ │ │ -000f6c70: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -000f6c80: 2020 203c 7370 616e 2063 6c61 7373 3d22 & │ │ │ │ -000f6ca0: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www. │ │ │ │ -000f6cb0: 7733 2e6f 7267 2f32 3030 312f 584d 4c53 w3.org/2001/XMLS │ │ │ │ -000f6cc0: 6368 656d 6126 7175 6f74 3b3c 2f73 7061 chema" }, < │ │ │ │ -000f6ce0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000f6cf0: 656e 7422 3e2f 2f20 6d75 7374 2062 6520 ent">// must be │ │ │ │ -000f6d00: 666f 7572 7468 3c2f 7370 616e 3e3c 2f64 fourth.
    { "ns&q │ │ │ │ -000f6d50: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, │ │ │ │ -000f6d60: 2020 203c 7370 616e 2063 6c61 7373 3d22 & │ │ │ │ -000f6d80: 7175 6f74 3b75 726e 3a6d 792d 7365 7276 quot;urn:my-serv │ │ │ │ -000f6d90: 6963 652d 5552 4926 7175 6f74 3b3c 2f73 ice-URI" }, // │ │ │ │ -000f6dc0: 2062 696e 6473 2026 7175 6f74 3b6e 7326 binds "ns& │ │ │ │ -000f6dd0: 7175 6f74 3b20 6e61 6d65 7370 6163 6520 quot; namespace │ │ │ │ -000f6de0: 7072 6566 6978 2074 6f20 7363 6865 6d61 prefix to schema │ │ │ │ -000f6df0: 2055 5249 3c2f 7370 616e 3e3c 2f64 6976 URI
    .
    { NULL, NU │ │ │ │ -000f6e20: 4c4c 207d 203c 7370 616e 2063 6c61 7373 LL } // en │ │ │ │ -000f6e40: 6420 6f66 2074 6162 6c65 203c 2f73 7061 d of table
    .
    }; .

    E │ │ │ │ -000f6e90: 6163 6820 6e61 6d65 7370 6163 6520 7072 ach namespace pr │ │ │ │ -000f6ea0: 6566 6978 2075 7365 6420 6279 2061 2069 efix used by a i │ │ │ │ -000f6eb0: 6465 6e74 6966 6965 7220 6e61 6d65 2069 dentifier name i │ │ │ │ -000f6ec0: 6e20 7468 6520 6865 6164 6572 2066 696c n the header fil │ │ │ │ -000f6ed0: 6520 7370 6563 6966 6963 6174 696f 6e2c e specification, │ │ │ │ -000f6ee0: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section C/C++ ident │ │ │ │ -000f6f20: 6966 6965 7220 6e61 6d65 2074 6f20 584d ifier name to XM │ │ │ │ -000f6f30: 4c20 7461 6720 6e61 6d65 2074 7261 6e73 L tag name trans │ │ │ │ -000f6f40: 6c61 7469 6f6e 3c2f 613e 2c20 6d75 7374 lation, must │ │ │ │ -000f6f50: 2068 6176 6520 6120 6269 6e64 696e 6720 have a binding │ │ │ │ -000f6f60: 746f 2061 206e 616d 6573 7061 6365 2055 to a namespace U │ │ │ │ -000f6f70: 5249 2069 6e20 7468 6520 6d61 7070 696e RI in the mappin │ │ │ │ -000f6f80: 6720 7461 626c 652e 2054 6865 2065 6e64 g table. The end │ │ │ │ -000f6f90: 206f 6620 7468 6520 6e61 6d65 7370 6163 of the namespac │ │ │ │ -000f6fa0: 6520 6d61 7070 696e 6720 7461 626c 6520 e mapping table │ │ │ │ -000f6fb0: 6d75 7374 2062 6520 696e 6469 6361 7465 must be indicate │ │ │ │ -000f6fc0: 6420 6279 2074 6865 204e 554c 4c20 7061 d by the NULL pa │ │ │ │ -000f6fd0: 6972 2e20 5468 6520 6e61 6d65 7370 6163 ir. The namespac │ │ │ │ -000f6fe0: 6520 5552 4920 6d61 7463 6869 6e67 2069 e URI matching i │ │ │ │ -000f6ff0: 7320 6361 7365 2069 6e73 656e 7369 7469 s case insensiti │ │ │ │ -000f7000: 7665 2e20 4120 6e61 6d65 7370 6163 6520 ve. A namespace │ │ │ │ -000f7010: 7072 6566 6978 2069 7320 6469 7374 696e prefix is distin │ │ │ │ -000f7020: 6775 6973 6865 6420 6279 2074 6865 206f guished by the o │ │ │ │ -000f7030: 6363 7572 7265 6e63 6520 6f66 2061 2070 ccurrence of a p │ │ │ │ -000f7040: 6169 7220 6f66 2075 6e64 6572 7363 6f72 air of underscor │ │ │ │ -000f7050: 6573 2028 3c63 6f64 653e 5f5f 3c2f 636f es (__) in an ident │ │ │ │ -000f7070: 6966 6965 7220 6f72 2062 7920 7573 696e ifier or by usin │ │ │ │ -000f7080: 6720 636f 6c6f 6e20 6e6f 7461 7469 6f6e g colon notation │ │ │ │ -000f7090: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section C/C++ iden │ │ │ │ -000f70d0: 7469 6669 6572 206e 616d 6520 746f 2058 tifier name to X │ │ │ │ -000f70e0: 4d4c 2074 6167 206e 616d 6520 7472 616e ML tag name tran │ │ │ │ -000f70f0: 736c 6174 696f 6e3c 2f61 3e2e 3c2f 703e slation.

    │ │ │ │ -000f7100: 0a3c 703e 416e 206f 7074 696f 6e61 6c20 .

    An optional │ │ │ │ -000f7110: 7468 6972 6420 636f 6c75 6d6e 2069 6e20 third column in │ │ │ │ -000f7120: 7468 6520 6e61 6d65 7370 6163 6520 6d61 the namespace ma │ │ │ │ -000f7130: 7070 696e 6720 7461 626c 6520 6d61 7920 pping table may │ │ │ │ -000f7140: 6265 2073 7065 6369 6669 6564 2074 6861 be specified tha │ │ │ │ -000f7150: 7420 636f 6e74 6169 6e73 2061 206e 616d t contains a nam │ │ │ │ -000f7160: 6573 7061 6365 2055 5249 2070 6174 7465 espace URI patte │ │ │ │ -000f7170: 726e 2e20 5468 6520 7061 7474 6572 6e73 rn. The patterns │ │ │ │ -000f7180: 2070 726f 7669 6465 2061 6e20 616c 7465 provide an alte │ │ │ │ -000f7190: 726e 6174 6976 6520 6e61 6d65 7370 6163 rnative namespac │ │ │ │ -000f71a0: 6520 666f 7220 7468 6520 7661 6c69 6461 e for the valida │ │ │ │ -000f71b0: 7469 6f6e 206f 6620 7061 7273 6564 2058 tion of parsed X │ │ │ │ -000f71c0: 4d4c 206d 6573 7361 6765 732e 2049 6e20 ML messages. In │ │ │ │ -000f71d0: 7468 6973 2070 6174 7465 726e 2c20 6461 this pattern, da │ │ │ │ -000f71e0: 7368 6573 2028 3c63 6f64 653e 2d3c 2f63 shes (-) are single │ │ │ │ -000f7200: 2d63 6861 7261 6374 6572 2077 696c 6463 -character wildc │ │ │ │ -000f7210: 6172 6473 2061 6e64 2061 7374 6572 6973 ards and asteris │ │ │ │ -000f7220: 6b73 2028 3c63 6f64 653e 2a3c 2f63 6f64 ks (*) are multi-ch │ │ │ │ -000f7240: 6172 6163 7465 7220 7769 6c64 6361 7264 aracter wildcard │ │ │ │ -000f7250: 732e 2046 6f72 2065 7861 6d70 6c65 2c20 s. For example, │ │ │ │ -000f7260: 746f 2061 6363 6570 7420 616c 7465 726e to accept altern │ │ │ │ -000f7270: 6174 6976 6520 7665 7273 696f 6e73 206f ative versions o │ │ │ │ -000f7280: 6620 584d 4c20 7363 6865 6d61 7320 7769 f XML schemas wi │ │ │ │ -000f7290: 7468 2064 6966 6665 7265 6e74 2061 7574 th different aut │ │ │ │ -000f72a0: 686f 7269 6e67 2064 6174 6573 2c20 666f horing dates, fo │ │ │ │ -000f72b0: 7572 2064 6173 6865 7320 6361 6e20 6265 ur dashes can be │ │ │ │ -000f72c0: 2075 7365 6420 696e 2070 6c61 6365 206f used in place o │ │ │ │ -000f72d0: 6620 7468 6520 7370 6563 6966 6963 2064 f the specific d │ │ │ │ -000f72e0: 6174 6573 2069 6e20 7468 6520 6e61 6d65 ates in the name │ │ │ │ -000f72f0: 7370 6163 6520 6d61 7070 696e 6720 7461 space mapping ta │ │ │ │ -000f7300: 626c 6520 7061 7474 6572 6e3a 3c2f 703e ble pattern:

    │ │ │ │ -000f7310: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s │ │ │ │ -000f7350: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct Namesp │ │ │ │ -000f7390: 6163 653c 2f61 3e20 3c61 2063 6c61 7373 ace n │ │ │ │ -000f73f0: 616d 6573 7061 6365 733c 2f61 3e5b 5d20 amespaces[] │ │ │ │ -000f7400: 3d20 3c2f 6469 763e 0a3c 6469 7620 636c =
    .
    {.
    // │ │ │ │ -000f7450: 7b20 2671 756f 743b 7072 6566 6978 2671 { "prefix&q │ │ │ │ -000f7460: 756f 743b 2c20 2671 756f 743b 5552 4926 uot;, "URI& │ │ │ │ -000f7470: 7175 6f74 3b2c 2026 7175 6f74 3b55 5249 quot;, "URI │ │ │ │ -000f7480: 2d70 6174 7465 726e 2671 756f 743b 2028 -pattern" ( │ │ │ │ -000f7490: 6f70 7469 6f6e 616c 2920 7d20 3c2f 7370 optional) }
    .
    { │ │ │ │ -000f74c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -000f74e0: 743b 534f 4150 2d45 4e56 2671 756f 743b t;SOAP-ENV" │ │ │ │ -000f74f0: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "http: │ │ │ │ -000f7520: 2f2f 7363 6865 6d61 732e 786d 6c73 6f61 //schemas.xmlsoa │ │ │ │ -000f7530: 702e 6f72 672f 736f 6170 2f65 6e76 656c p.org/soap/envel │ │ │ │ -000f7540: 6f70 652f 2671 756f 743b 3c2f 7370 616e ope/" }, // mu │ │ │ │ -000f7570: 7374 2062 6520 6669 7273 7420 3c2f 7370 st be first
    .
    { │ │ │ │ -000f75a0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -000f75c0: 743b 534f 4150 2d45 4e43 2671 756f 743b t;SOAP-ENC" │ │ │ │ -000f75d0: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "http: │ │ │ │ -000f7600: 2f2f 7363 6865 6d61 732e 786d 6c73 6f61 //schemas.xmlsoa │ │ │ │ -000f7610: 702e 6f72 672f 736f 6170 2f65 6e63 6f64 p.org/soap/encod │ │ │ │ -000f7620: 696e 672f 2671 756f 743b 3c2f 7370 616e ing/" }, // mu │ │ │ │ -000f7650: 7374 2062 6520 7365 636f 6e64 203c 2f73 st be second
    .
    { │ │ │ │ -000f7680: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -000f76a0: 6f74 3b78 7369 2671 756f 743b 3c2f 7370 ot;xsi", "http │ │ │ │ -000f76e0: 3a2f 2f77 7777 2e77 332e 6f72 672f 3230 ://www.w3.org/20 │ │ │ │ -000f76f0: 3031 2f58 4d4c 5363 6865 6d61 2d69 6e73 01/XMLSchema-ins │ │ │ │ -000f7700: 7461 6e63 6526 7175 6f74 3b3c 2f73 7061 tance", │ │ │ │ -000f7730: 2671 756f 743b 6874 7470 3a2f 2f77 7777 "http://www │ │ │ │ -000f7740: 2e77 332e 6f72 672f 2d2d 2d2d 2f58 4d4c .w3.org/----/XML │ │ │ │ -000f7750: 5363 6865 6d61 2d69 6e73 7461 6e63 6526 Schema-instance& │ │ │ │ -000f7760: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, │ │ │ │ -000f7770: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x │ │ │ │ -000f77b0: 7364 2671 756f 743b 3c2f 7370 616e 3e2c sd", │ │ │ │ -000f77c0: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w │ │ │ │ -000f77f0: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X │ │ │ │ -000f7800: 4d4c 5363 6865 6d61 2671 756f 743b 3c2f MLSchema", "http:// │ │ │ │ -000f7840: 7777 772e 7733 2e6f 7267 2f2d 2d2d 2d2f www.w3.org/----/ │ │ │ │ -000f7850: 584d 4c53 6368 656d 6126 7175 6f74 3b3c XMLSchema"< │ │ │ │ -000f7860: 2f73 7061 6e3e 207d 2c20 3c2f 6469 763e /span> },
    │ │ │ │ -000f7870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ -000f78a0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ -000f78b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f78c0: 3e20 207b 204e 554c 4c2c 204e 554c 4c20 > { NULL, NULL │ │ │ │ -000f78d0: 7d20 3c73 7061 6e20 636c 6173 733d 2263 } // end o │ │ │ │ -000f78f0: 6620 7461 626c 6520 3c2f 7370 616e 3e3c f table < │ │ │ │ -000f7900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    │ │ │ │ -000f7920: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Or al │ │ │ │ -000f7940: 7465 726e 6174 6976 656c 792c 2061 7374 ternatively, ast │ │ │ │ -000f7950: 6572 6973 6b73 2063 616e 2062 6520 7573 erisks can be us │ │ │ │ -000f7960: 6564 2061 7320 7769 6c64 6361 7264 7320 ed as wildcards │ │ │ │ -000f7970: 666f 7220 6d75 6c74 6970 6c65 2063 6861 for multiple cha │ │ │ │ -000f7980: 7261 6374 6572 733a 3c2f 703e 0a3c 6469 racters:

    .
    struc │ │ │ │ -000f79d0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t Namespace< │ │ │ │ -000f7a10: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> names │ │ │ │ -000f7a70: 7061 6365 733c 2f61 3e5b 5d20 3d20 3c2f paces[] = // { │ │ │ │ +000f6920: 2026 7175 6f74 3b70 7265 6669 7826 7175 "prefix&qu │ │ │ │ +000f6930: 6f74 3b2c 2026 7175 6f74 3b55 5249 2671 ot;, "URI&q │ │ │ │ +000f6940: 756f 743b 2c20 2671 756f 743b 5552 492d uot;, "URI- │ │ │ │ +000f6950: 7061 7474 6572 6e26 7175 6f74 3b20 286f pattern" (o │ │ │ │ +000f6960: 7074 696f 6e61 6c29 207d 203c 2f73 7061 ptional) }
    .
    { < │ │ │ │ +000f6990: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f69a0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f69b0: 3b53 4f41 502d 454e 5626 7175 6f74 3b3c ;SOAP-ENV"< │ │ │ │ +000f69c0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/ │ │ │ │ +000f69f0: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap │ │ │ │ +000f6a00: 2e6f 7267 2f73 6f61 702f 656e 7665 6c6f .org/soap/envelo │ │ │ │ +000f6a10: 7065 2f26 7175 6f74 3b3c 2f73 7061 6e3e pe/" │ │ │ │ +000f6a20: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // mus │ │ │ │ +000f6a40: 7420 6265 2066 6972 7374 203c 2f73 7061 t be first
    .
    { < │ │ │ │ +000f6a70: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f6a80: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f6a90: 3b53 4f41 502d 454e 4326 7175 6f74 3b3c ;SOAP-ENC"< │ │ │ │ +000f6aa0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "http:/ │ │ │ │ +000f6ad0: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap │ │ │ │ +000f6ae0: 2e6f 7267 2f73 6f61 702f 656e 636f 6469 .org/soap/encodi │ │ │ │ +000f6af0: 6e67 2f26 7175 6f74 3b3c 2f73 7061 6e3e ng/" │ │ │ │ +000f6b00: 207d 2c20 3c73 7061 6e20 636c 6173 733d }, // mus │ │ │ │ +000f6b20: 7420 6265 2073 6563 6f6e 6420 3c2f 7370 t be second
    .
    { │ │ │ │ +000f6b50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000f6b70: 743b 7873 6926 7175 6f74 3b3c 2f73 7061 t;xsi", "http: │ │ │ │ +000f6bb0: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200 │ │ │ │ +000f6bc0: 312f 584d 4c53 6368 656d 612d 696e 7374 1/XMLSchema-inst │ │ │ │ +000f6bd0: 616e 6365 2671 756f 743b 3c2f 7370 616e ance" }, // mu │ │ │ │ +000f6c00: 7374 2062 6520 7468 6972 6420 3c2f 7370 st be third
    .
    { │ │ │ │ +000f6c30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000f6c50: 743b 7873 6426 7175 6f74 3b3c 2f73 7061 t;xsd", "http: │ │ │ │ +000f6c90: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200 │ │ │ │ +000f6ca0: 312f 584d 4c53 6368 656d 6126 7175 6f74 1/XMLSchema" │ │ │ │ +000f6cb0: 3b3c 2f73 7061 6e3e 207d 2c20 2020 2020 ; }, │ │ │ │ +000f6cc0: 2020 2020 203c 7370 616e 2063 6c61 7373 // mu │ │ │ │ +000f6ce0: 7374 2062 6520 666f 7572 7468 3c2f 7370 st be fourth
    .
    { │ │ │ │ +000f6d10: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000f6d30: 743b 6e73 2671 756f 743b 3c2f 7370 616e t;ns", "urn:m │ │ │ │ +000f6d70: 792d 7365 7276 6963 652d 5552 4926 7175 y-service-URI&qu │ │ │ │ +000f6d80: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c73 ot; }, // binds &qu │ │ │ │ +000f6db0: 6f74 3b6e 7326 7175 6f74 3b20 6e61 6d65 ot;ns" name │ │ │ │ +000f6dc0: 7370 6163 6520 7072 6566 6978 2074 6f20 space prefix to │ │ │ │ +000f6dd0: 7363 6865 6d61 2055 5249 3c2f 7370 616e schema URI
    .
    { NU │ │ │ │ +000f6e00: 4c4c 2c20 4e55 4c4c 207d 203c 7370 616e LL, NULL } // end of table │ │ │ │ +000f6e30: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +000f6e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f6e50: 3e7d 3b20 3c2f 6469 763e 0a3c 2f64 6976 >};
    .

    Or alternativel │ │ │ │ +000f7930: 792c 2061 7374 6572 6973 6b73 2063 616e y, asterisks can │ │ │ │ +000f7940: 2062 6520 7573 6564 2061 7320 7769 6c64 be used as wild │ │ │ │ +000f7950: 6361 7264 7320 666f 7220 6d75 6c74 6970 cards for multip │ │ │ │ +000f7960: 6c65 2063 6861 7261 6374 6572 733a 3c2f le characters:.

    struct < │ │ │ │ +000f79c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000f79d0: 7265 663d 2273 7472 7563 745f 6e61 6d65 ref="struct_name │ │ │ │ +000f79e0: 7370 6163 652e 6874 6d6c 223e 4e61 6d65 space.html">Name │ │ │ │ +000f79f0: 7370 6163 653c 2f61 3e20 3c61 2063 6c61 space namespaces[ │ │ │ │ +000f7a60: 5d20 3d20 3c2f 6469 763e 0a3c 6469 7620 ] =
    .
    {.
    {
    .< │ │ │ │ -000f7aa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f7ab0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // { &q │ │ │ │ -000f7ad0: 756f 743b 7072 6566 6978 2671 756f 743b uot;prefix" │ │ │ │ -000f7ae0: 2c20 2671 756f 743b 5552 4926 7175 6f74 , "URI" │ │ │ │ -000f7af0: 3b2c 2026 7175 6f74 3b55 5249 2d70 6174 ;, "URI-pat │ │ │ │ -000f7b00: 7465 726e 2671 756f 743b 2028 6f70 7469 tern" (opti │ │ │ │ -000f7b10: 6f6e 616c 2920 7d20 3c2f 7370 616e 3e3c onal) } < │ │ │ │ -000f7b20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "SO │ │ │ │ -000f7b60: 4150 2d45 4e56 2671 756f 743b 3c2f 7370 AP-ENV", "http://sc │ │ │ │ -000f7ba0: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or │ │ │ │ -000f7bb0: 672f 736f 6170 2f65 6e76 656c 6f70 652f g/soap/envelope/ │ │ │ │ -000f7bc0: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " }, │ │ │ │ -000f7bd0: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b │ │ │ │ -000f7bf0: 6520 6669 7273 7420 3c2f 7370 616e 3e3c e first < │ │ │ │ -000f7c00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "SO │ │ │ │ -000f7c40: 4150 2d45 4e43 2671 756f 743b 3c2f 7370 AP-ENC", "http://sc │ │ │ │ -000f7c80: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or │ │ │ │ -000f7c90: 672f 736f 6170 2f65 6e63 6f64 696e 672f g/soap/encoding/ │ │ │ │ -000f7ca0: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " }, │ │ │ │ -000f7cb0: 203c 7370 616e 2063 6c61 7373 3d22 636f // must b │ │ │ │ -000f7cd0: 6520 7365 636f 6e64 203c 2f73 7061 6e3e e second │ │ │ │ -000f7ce0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "x │ │ │ │ -000f7d20: 7369 2671 756f 743b 3c2f 7370 616e 3e2c si", │ │ │ │ -000f7d30: 2020 2020 2020 3c73 7061 6e20 636c 6173 "http://w │ │ │ │ -000f7d60: 7777 2e77 332e 6f72 672f 3230 3031 2f58 ww.w3.org/2001/X │ │ │ │ -000f7d70: 4d4c 5363 6865 6d61 2d69 6e73 7461 6e63 MLSchema-instanc │ │ │ │ -000f7d80: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", │ │ │ │ -000f7d90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -000f7db0: 743b 6874 7470 3a2f 2f77 7777 2e77 332e t;http://www.w3. │ │ │ │ -000f7dc0: 6f72 672f 2a2f 584d 4c53 6368 656d 612d org/*/XMLSchema- │ │ │ │ -000f7dd0: 696e 7374 616e 6365 2671 756f 743b 3c2f instance" },
    . │ │ │ │ -000f7df0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "xsd" │ │ │ │ -000f7e30: 3b3c 2f73 7061 6e3e 2c20 2020 2020 203c ;, < │ │ │ │ -000f7e40: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000f7e50: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000f7e60: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o │ │ │ │ -000f7e70: 7267 2f32 3030 312f 584d 4c53 6368 656d rg/2001/XMLSchem │ │ │ │ -000f7e80: 6126 7175 6f74 3b3c 2f73 7061 6e3e 2c20 a", │ │ │ │ -000f7e90: 2020 2020 2020 2020 203c 7370 616e 2063 "http: │ │ │ │ -000f7ec0: 2f2f 7777 772e 7733 2e6f 7267 2f2a 2f58 //www.w3.org/*/X │ │ │ │ -000f7ed0: 4d4c 5363 6865 6d61 2671 756f 743b 3c2f MLSchema" },
    . │ │ │ │ -000f7ef0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // │ │ │ │ -000f7f20: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -000f7f40: 2020 7b20 4e55 4c4c 2c20 4e55 4c4c 7d20 { NULL, NULL} │ │ │ │ -000f7f50: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // end of │ │ │ │ -000f7f70: 7461 626c 6520 3c2f 7370 616e 3e3c 2f64 table .
    };
    .< │ │ │ │ -000f7fa0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    A names │ │ │ │ -000f7fc0: 7061 6365 206d 6170 7069 6e67 2074 6162 pace mapping tab │ │ │ │ -000f7fd0: 6c65 2069 7320 6175 746f 6d61 7469 6361 le is automatica │ │ │ │ -000f7fe0: 6c6c 7920 6765 6e65 7261 7465 6420 7769 lly generated wi │ │ │ │ -000f7ff0: 7468 2070 7265 6669 7865 7320 616e 6420 th prefixes and │ │ │ │ -000f8000: 5552 4973 2069 6e20 7468 6520 7461 626c URIs in the tabl │ │ │ │ -000f8010: 6520 7468 6174 2061 7265 2064 6563 6c61 e that are decla │ │ │ │ -000f8020: 7265 6420 7769 7468 203c 636f 6465 3e2f red with / │ │ │ │ -000f8030: 2f67 736f 6170 2026 6c74 3b70 7265 6669 /gsoap <prefi │ │ │ │ -000f8040: 7826 6774 3b20 7363 6865 6d61 206e 616d x> schema nam │ │ │ │ -000f8050: 6573 7061 6365 3a3c 2f63 6f64 653e 2064 espace: d │ │ │ │ -000f8060: 6972 6563 7469 7665 7320 696e 2074 6865 irectives in the │ │ │ │ -000f8070: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ -000f8080: 7220 6669 6c65 2c20 7365 6520 5365 6374 r file, see Sect │ │ │ │ -000f8090: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion D │ │ │ │ -000f80c0: 6972 6563 7469 7665 733c 2f61 3e2e 2049 irectives. I │ │ │ │ -000f80d0: 6620 6469 7265 6374 6976 6573 2061 7265 f directives are │ │ │ │ -000f80e0: 206e 6f74 2070 726f 7669 6465 6420 696e not provided in │ │ │ │ -000f80f0: 2074 6865 2068 6561 6465 7220 6669 6c65 the header file │ │ │ │ -000f8100: 2074 6865 6e20 6465 6661 756c 7420 5552 then default UR │ │ │ │ -000f8110: 4973 206f 6620 7468 6520 666f 726d 203c Is of the form < │ │ │ │ -000f8120: 656d 3e3c 636f 6465 3e3c 6120 6872 6566 em>http://tempuri. │ │ │ │ -000f8160: 6f72 672f 7072 6566 6978 2e78 7364 3c2f org/prefix.xsd f │ │ │ │ -000f8180: 6f72 2065 6163 6820 6e61 6d65 7370 6163 or each namespac │ │ │ │ -000f8190: 6520 3c65 6d3e 3c63 6f64 653e 7072 6566 e pref │ │ │ │ -000f81a0: 6978 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 ix. │ │ │ │ -000f81b0: 5468 6520 736f 6170 6370 7032 2074 6f6f The soapcpp2 too │ │ │ │ -000f81c0: 6c20 616c 736f 2067 656e 6572 6174 6573 l also generates │ │ │ │ -000f81d0: 2061 2057 5344 4c20 616e 6420 6f6e 6520 a WSDL and one │ │ │ │ -000f81e0: 6f72 206d 6f72 6520 5853 4420 6669 6c65 or more XSD file │ │ │ │ -000f81f0: 732c 206f 6e65 2066 6f72 2065 6163 6820 s, one for each │ │ │ │ -000f8200: 584d 4c20 6e61 6d65 7370 6163 652e 3c2f XML namespace..

    When parsi │ │ │ │ -000f8220: 6e67 2058 4d4c 2061 6e64 2064 6573 6572 ng XML and deser │ │ │ │ -000f8230: 6961 6c69 7a69 6e67 2064 6174 612c 206e ializing data, n │ │ │ │ -000f8240: 616d 6573 7061 6365 2055 5249 7320 696e amespace URIs in │ │ │ │ -000f8250: 2074 6865 2058 4d4c 206d 6573 7361 6765 the XML message │ │ │ │ -000f8260: 7320 6172 6520 6d61 7463 6865 6420 6167 s are matched ag │ │ │ │ -000f8270: 6169 6e73 7420 7468 6520 7365 636f 6e64 ainst the second │ │ │ │ -000f8280: 2061 6e64 2074 6869 7264 2063 6f6c 756d and third colum │ │ │ │ -000f8290: 6e20 6f66 2074 6865 206e 616d 6573 7061 n of the namespa │ │ │ │ -000f82a0: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table │ │ │ │ -000f82b0: 2c20 7365 6172 6368 696e 6720 6672 6f6d , searching from │ │ │ │ -000f82c0: 2074 6865 2074 6f70 2074 6f20 7468 6520 the top to the │ │ │ │ -000f82d0: 626f 7474 6f6d 206f 6620 7468 6520 7461 bottom of the ta │ │ │ │ -000f82e0: 626c 652e 2054 6865 2061 6374 7561 6c20 ble. The actual │ │ │ │ -000f82f0: 7072 6566 6978 2075 7365 6420 696e 2074 prefix used in t │ │ │ │ -000f8300: 6865 2058 4d4c 206d 6573 7361 6765 2069 he XML message i │ │ │ │ -000f8310: 7320 6972 7265 6c65 7661 6e74 2061 7320 s irrelevant as │ │ │ │ -000f8320: 7468 6520 5552 4920 6173 736f 6369 6174 the URI associat │ │ │ │ -000f8330: 6564 2077 6974 6820 7468 6520 7072 6566 ed with the pref │ │ │ │ -000f8340: 6978 2069 7320 7265 6c65 7661 6e74 2074 ix is relevant t │ │ │ │ -000f8350: 6f20 6465 6669 6e65 2074 6865 2058 4d4c o define the XML │ │ │ │ -000f8360: 206e 616d 6573 7061 6365 2074 6f20 7768 namespace to wh │ │ │ │ -000f8370: 6963 6820 6120 7175 616c 6966 6965 6420 ich a qualified │ │ │ │ -000f8380: 656c 656d 656e 7420 6f72 2061 7474 7269 element or attri │ │ │ │ -000f8390: 6275 7465 2062 656c 6f6e 6773 2e20 5768 bute belongs. Wh │ │ │ │ -000f83a0: 656e 2061 206d 6174 6368 2069 7320 666f en a match is fo │ │ │ │ -000f83b0: 756e 642c 2074 6865 206e 616d 6573 7061 und, the namespa │ │ │ │ -000f83c0: 6365 2070 7265 6669 7820 696e 2074 6865 ce prefix in the │ │ │ │ -000f83d0: 2066 6972 7374 2063 6f6c 756d 6e20 6f66 first column of │ │ │ │ -000f83e0: 2074 6865 2074 6162 6c65 2069 7320 636f the table is co │ │ │ │ -000f83f0: 6e73 6964 6572 6564 2073 656d 616e 7469 nsidered semanti │ │ │ │ -000f8400: 6361 6c6c 7920 6964 656e 7469 6361 6c20 cally identical │ │ │ │ -000f8410: 746f 2074 6865 206e 616d 6573 7061 6365 to the namespace │ │ │ │ -000f8420: 2070 7265 6669 7820 7573 6564 2062 7920 prefix used by │ │ │ │ -000f8430: 7468 6520 7175 616c 6966 6965 6420 584d the qualified XM │ │ │ │ -000f8440: 4c20 656c 656d 656e 7420 616e 6420 6174 L element and at │ │ │ │ -000f8450: 7472 6962 7574 6520 7061 7273 6564 2c20 tribute parsed, │ │ │ │ -000f8460: 6576 656e 2077 6865 6e20 7468 6520 7072 even when the pr │ │ │ │ -000f8470: 6566 6978 206e 616d 6573 2064 6966 6665 efix names diffe │ │ │ │ -000f8480: 722e 2054 6869 7320 6e6f 726d 616c 697a r. This normaliz │ │ │ │ -000f8490: 6174 696f 6e20 6f66 2070 7265 6669 7865 ation of prefixe │ │ │ │ -000f84a0: 7320 6973 2069 6e76 6973 6962 6c65 2074 s is invisible t │ │ │ │ -000f84b0: 6f20 7468 6520 7573 6572 206f 6620 6753 o the user of gS │ │ │ │ -000f84c0: 4f41 5020 616e 6420 6d61 6b65 7320 636f OAP and makes co │ │ │ │ -000f84d0: 6469 6e67 2077 6974 6820 584d 4c20 6561 ding with XML ea │ │ │ │ -000f84e0: 7369 6572 2e20 466f 7220 6578 616d 706c sier. For exampl │ │ │ │ -000f84f0: 652c 2077 6865 6e20 5853 4420 514e 616d e, when XSD QNam │ │ │ │ -000f8500: 6573 2061 7265 2070 6172 7365 6420 696e es are parsed in │ │ │ │ -000f8510: 746f 2073 7472 696e 6773 2075 7369 6e67 to strings using │ │ │ │ -000f8520: 2074 6865 2062 7569 6c74 2d69 6e20 736f the built-in so │ │ │ │ -000f8530: 6170 6370 7032 203c 636f 6465 3e5f 514e apcpp2 _QN │ │ │ │ -000f8540: 616d 653c 2f63 6f64 653e 2074 7970 6520 ame type │ │ │ │ -000f8550: 6f72 2061 2051 4e61 6d65 2064 6563 6c61 or a QName decla │ │ │ │ -000f8560: 7265 6420 7769 7468 203c 636f 6465 3e74 red with t │ │ │ │ -000f8570: 7970 6564 6566 2073 7464 3a3a 7374 7269 ypedef std::stri │ │ │ │ -000f8580: 6e67 2078 7364 5f5f 514e 616d 653c 2f63 ng xsd__QName, then this │ │ │ │ -000f85a0: 514e 616d 6520 7374 7269 6e67 2077 696c QName string wil │ │ │ │ -000f85b0: 6c20 616c 7761 7973 2063 6f6e 7461 696e l always contain │ │ │ │ -000f85c0: 2071 7561 6c69 6669 6564 206e 616d 6573 qualified names │ │ │ │ -000f85d0: 2077 6974 6820 6e6f 726d 616c 697a 6564 with normalized │ │ │ │ -000f85e0: 2070 7265 6669 7865 732c 2069 2e65 2e20 prefixes, i.e. │ │ │ │ -000f85f0: 7072 6566 6978 6573 2064 6566 696e 6564 prefixes defined │ │ │ │ -000f8600: 2069 6e20 7468 6520 6e61 6d65 7370 6163 in the namespac │ │ │ │ -000f8610: 6520 6d61 7070 696e 6720 7461 626c 652c e mapping table, │ │ │ │ -000f8620: 2075 6e6c 6573 7320 7468 6520 7461 626c unless the tabl │ │ │ │ -000f8630: 6520 6861 7320 6e6f 2065 6e74 7279 2c20 e has no entry, │ │ │ │ -000f8640: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section How to use QNa │ │ │ │ -000f8680: 6d65 2061 7474 7269 6275 7465 7320 616e me attributes an │ │ │ │ -000f8690: 6420 656c 656d 656e 7473 3c2f 613e 2e3c d elements.< │ │ │ │ -000f86a0: 2f70 3e0a 3c70 3e46 6f72 2065 7861 6d70 /p>.

    For examp │ │ │ │ -000f86b0: 6c65 2c20 6c65 7427 7320 7361 7920 7765 le, let's say we │ │ │ │ -000f86c0: 2068 6176 6520 7468 6520 666f 6c6c 6f77 have the follow │ │ │ │ -000f86d0: 696e 6720 7374 7275 6374 733a 3c2f 703e ing structs:

    │ │ │ │ -000f86e0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s │ │ │ │ -000f8720: 7472 7563 7420 3c2f 7370 616e 3e61 5f5f truct a__ │ │ │ │ -000f8730: 656c 7420 7b20 2e2e 2e20 7d3b 203c 2f64 elt { ... }; .
    stru │ │ │ │ -000f8770: 6374 203c 2f73 7061 6e3e 625f 5f65 6c74 ct b__elt │ │ │ │ -000f8780: 207b 202e 2e2e 207d 3b20 3c2f 6469 763e { ... };
    │ │ │ │ -000f8790: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struct │ │ │ │ -000f87c0: 3c2f 7370 616e 3e6b 5f5f 656c 7420 7b20 k__elt { │ │ │ │ -000f87d0: 2e2e 2e20 7d3b 203c 2f64 6976 3e0a 3c2f ... };
    .

    The name │ │ │ │ -000f8800: 7370 6163 6520 6d61 7070 696e 6720 7461 space mapping ta │ │ │ │ -000f8810: 626c 6520 6765 6e65 7261 7465 6420 6279 ble generated by │ │ │ │ -000f8820: 2073 6f61 7063 7070 3220 6861 7320 7468 soapcpp2 has th │ │ │ │ -000f8830: 6520 666f 6c6c 6f77 696e 6720 656e 7472 e following entr │ │ │ │ -000f8840: 6965 733a 3c2f 703e 0a3c 6469 7620 636c ies:

    .
    < │ │ │ │ -000f8860: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000f8870: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct Namespace │ │ │ │ -000f88d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 namespace │ │ │ │ -000f8930: 733c 2f61 3e5b 5d20 3d20 3c2f 6469 763e s[] =
    │ │ │ │ +000f7a90: 226c 696e 6522 3e20 203c 7370 616e 2063 "line"> / │ │ │ │ +000f7ab0: 2f20 7b20 2671 756f 743b 7072 6566 6978 / { "prefix │ │ │ │ +000f7ac0: 2671 756f 743b 2c20 2671 756f 743b 5552 ", "UR │ │ │ │ +000f7ad0: 4926 7175 6f74 3b2c 2026 7175 6f74 3b55 I", "U │ │ │ │ +000f7ae0: 5249 2d70 6174 7465 726e 2671 756f 743b RI-pattern" │ │ │ │ +000f7af0: 2028 6f70 7469 6f6e 616c 2920 7d20 3c2f (optional) }
    .
    │ │ │ │ +000f7b20: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q │ │ │ │ +000f7b40: 756f 743b 534f 4150 2d45 4e56 2671 756f uot;SOAP-ENV&quo │ │ │ │ +000f7b50: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt │ │ │ │ +000f7b80: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls │ │ │ │ +000f7b90: 6f61 702e 6f72 672f 736f 6170 2f65 6e76 oap.org/soap/env │ │ │ │ +000f7ba0: 656c 6f70 652f 2671 756f 743b 3c2f 7370 elope/" }, // │ │ │ │ +000f7bd0: 6d75 7374 2062 6520 6669 7273 7420 3c2f must be first
    .
    │ │ │ │ +000f7c00: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q │ │ │ │ +000f7c20: 756f 743b 534f 4150 2d45 4e43 2671 756f uot;SOAP-ENC&quo │ │ │ │ +000f7c30: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt │ │ │ │ +000f7c60: 703a 2f2f 7363 6865 6d61 732e 786d 6c73 p://schemas.xmls │ │ │ │ +000f7c70: 6f61 702e 6f72 672f 736f 6170 2f65 6e63 oap.org/soap/enc │ │ │ │ +000f7c80: 6f64 696e 672f 2671 756f 743b 3c2f 7370 oding/" }, // │ │ │ │ +000f7cb0: 6d75 7374 2062 6520 7365 636f 6e64 203c must be second < │ │ │ │ +000f7cc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +000f7ce0: 207b 203c 7370 616e 2063 6c61 7373 3d22 { & │ │ │ │ +000f7d00: 7175 6f74 3b78 7369 2671 756f 743b 3c2f quot;xsi", "ht │ │ │ │ +000f7d40: 7470 3a2f 2f77 7777 2e77 332e 6f72 672f tp://www.w3.org/ │ │ │ │ +000f7d50: 3230 3031 2f58 4d4c 5363 6865 6d61 2d69 2001/XMLSchema-i │ │ │ │ +000f7d60: 6e73 7461 6e63 6526 7175 6f74 3b3c 2f73 nstance"
    , "http://w │ │ │ │ +000f7da0: 7777 2e77 332e 6f72 672f 2a2f 584d 4c53 ww.w3.org/*/XMLS │ │ │ │ +000f7db0: 6368 656d 612d 696e 7374 616e 6365 2671 chema-instance&q │ │ │ │ +000f7dc0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, < │ │ │ │ +000f7dd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "xs │ │ │ │ +000f7e10: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 d", │ │ │ │ +000f7e20: 2020 2020 203c 7370 616e 2063 6c61 7373 "http://ww │ │ │ │ +000f7e50: 772e 7733 2e6f 7267 2f32 3030 312f 584d w.w3.org/2001/XM │ │ │ │ +000f7e60: 4c53 6368 656d 6126 7175 6f74 3b3c 2f73 LSchema", < │ │ │ │ +000f7e80: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f7e90: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f7ea0: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f ;http://www.w3.o │ │ │ │ +000f7eb0: 7267 2f2a 2f58 4d4c 5363 6865 6d61 2671 rg/*/XMLSchema&q │ │ │ │ +000f7ec0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, < │ │ │ │ +000f7ed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    { NULL, │ │ │ │ +000f7f30: 4e55 4c4c 7d20 3c73 7061 6e20 636c 6173 NULL} // e │ │ │ │ +000f7f50: 6e64 206f 6620 7461 626c 6520 3c2f 7370 nd of table
    .
    };.

    A │ │ │ │ +000f7fa0: 206e 616d 6573 7061 6365 206d 6170 7069 namespace mappi │ │ │ │ +000f7fb0: 6e67 2074 6162 6c65 2069 7320 6175 746f ng table is auto │ │ │ │ +000f7fc0: 6d61 7469 6361 6c6c 7920 6765 6e65 7261 matically genera │ │ │ │ +000f7fd0: 7465 6420 7769 7468 2070 7265 6669 7865 ted with prefixe │ │ │ │ +000f7fe0: 7320 616e 6420 5552 4973 2069 6e20 7468 s and URIs in th │ │ │ │ +000f7ff0: 6520 7461 626c 6520 7468 6174 2061 7265 e table that are │ │ │ │ +000f8000: 2064 6563 6c61 7265 6420 7769 7468 203c declared with < │ │ │ │ +000f8010: 636f 6465 3e2f 2f67 736f 6170 2026 6c74 code>//gsoap < │ │ │ │ +000f8020: 3b70 7265 6669 7826 6774 3b20 7363 6865 ;prefix> sche │ │ │ │ +000f8030: 6d61 206e 616d 6573 7061 6365 3a3c 2f63 ma namespace: directives │ │ │ │ +000f8050: 696e 2074 6865 2069 6e74 6572 6661 6365 in the interface │ │ │ │ +000f8060: 2068 6561 6465 7220 6669 6c65 2c20 7365 header file, se │ │ │ │ +000f8070: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Directives< │ │ │ │ +000f80b0: 2f61 3e2e 2049 6620 6469 7265 6374 6976 /a>. If directiv │ │ │ │ +000f80c0: 6573 2061 7265 206e 6f74 2070 726f 7669 es are not provi │ │ │ │ +000f80d0: 6465 6420 696e 2074 6865 2068 6561 6465 ded in the heade │ │ │ │ +000f80e0: 7220 6669 6c65 2074 6865 6e20 6465 6661 r file then defa │ │ │ │ +000f80f0: 756c 7420 5552 4973 206f 6620 7468 6520 ult URIs of the │ │ │ │ +000f8100: 666f 726d 203c 656d 3e3c 636f 6465 3e3c form < │ │ │ │ +000f8110: 6120 6872 6566 3d22 6874 7470 3a2f 2f74 a href="http://t │ │ │ │ +000f8120: 656d 7075 7269 2e6f 7267 2f70 7265 6669 empuri.org/prefi │ │ │ │ +000f8130: 782e 7873 6422 3e68 7474 703a 2f2f 7465 x.xsd">http://te │ │ │ │ +000f8140: 6d70 7572 692e 6f72 672f 7072 6566 6978 mpuri.org/prefix │ │ │ │ +000f8150: 2e78 7364 3c2f 613e 3c2f 636f 6465 3e3c .xsd< │ │ │ │ +000f8160: 2f65 6d3e 2066 6f72 2065 6163 6820 6e61 /em> for each na │ │ │ │ +000f8170: 6d65 7370 6163 6520 3c65 6d3e 3c63 6f64 mespace prefix< │ │ │ │ +000f8190: 2f65 6d3e 2e20 5468 6520 736f 6170 6370 /em>. The soapcp │ │ │ │ +000f81a0: 7032 2074 6f6f 6c20 616c 736f 2067 656e p2 tool also gen │ │ │ │ +000f81b0: 6572 6174 6573 2061 2057 5344 4c20 616e erates a WSDL an │ │ │ │ +000f81c0: 6420 6f6e 6520 6f72 206d 6f72 6520 5853 d one or more XS │ │ │ │ +000f81d0: 4420 6669 6c65 732c 206f 6e65 2066 6f72 D files, one for │ │ │ │ +000f81e0: 2065 6163 6820 584d 4c20 6e61 6d65 7370 each XML namesp │ │ │ │ +000f81f0: 6163 652e 3c2f 703e 0a3c 703e 5768 656e ace.

    .

    When │ │ │ │ +000f8200: 2070 6172 7369 6e67 2058 4d4c 2061 6e64 parsing XML and │ │ │ │ +000f8210: 2064 6573 6572 6961 6c69 7a69 6e67 2064 deserializing d │ │ │ │ +000f8220: 6174 612c 206e 616d 6573 7061 6365 2055 ata, namespace U │ │ │ │ +000f8230: 5249 7320 696e 2074 6865 2058 4d4c 206d RIs in the XML m │ │ │ │ +000f8240: 6573 7361 6765 7320 6172 6520 6d61 7463 essages are matc │ │ │ │ +000f8250: 6865 6420 6167 6169 6e73 7420 7468 6520 hed against the │ │ │ │ +000f8260: 7365 636f 6e64 2061 6e64 2074 6869 7264 second and third │ │ │ │ +000f8270: 2063 6f6c 756d 6e20 6f66 2074 6865 206e column of the n │ │ │ │ +000f8280: 616d 6573 7061 6365 206d 6170 7069 6e67 amespace mapping │ │ │ │ +000f8290: 2074 6162 6c65 2c20 7365 6172 6368 696e table, searchin │ │ │ │ +000f82a0: 6720 6672 6f6d 2074 6865 2074 6f70 2074 g from the top t │ │ │ │ +000f82b0: 6f20 7468 6520 626f 7474 6f6d 206f 6620 o the bottom of │ │ │ │ +000f82c0: 7468 6520 7461 626c 652e 2054 6865 2061 the table. The a │ │ │ │ +000f82d0: 6374 7561 6c20 7072 6566 6978 2075 7365 ctual prefix use │ │ │ │ +000f82e0: 6420 696e 2074 6865 2058 4d4c 206d 6573 d in the XML mes │ │ │ │ +000f82f0: 7361 6765 2069 7320 6972 7265 6c65 7661 sage is irreleva │ │ │ │ +000f8300: 6e74 2061 7320 7468 6520 5552 4920 6173 nt as the URI as │ │ │ │ +000f8310: 736f 6369 6174 6564 2077 6974 6820 7468 sociated with th │ │ │ │ +000f8320: 6520 7072 6566 6978 2069 7320 7265 6c65 e prefix is rele │ │ │ │ +000f8330: 7661 6e74 2074 6f20 6465 6669 6e65 2074 vant to define t │ │ │ │ +000f8340: 6865 2058 4d4c 206e 616d 6573 7061 6365 he XML namespace │ │ │ │ +000f8350: 2074 6f20 7768 6963 6820 6120 7175 616c to which a qual │ │ │ │ +000f8360: 6966 6965 6420 656c 656d 656e 7420 6f72 ified element or │ │ │ │ +000f8370: 2061 7474 7269 6275 7465 2062 656c 6f6e attribute belon │ │ │ │ +000f8380: 6773 2e20 5768 656e 2061 206d 6174 6368 gs. When a match │ │ │ │ +000f8390: 2069 7320 666f 756e 642c 2074 6865 206e is found, the n │ │ │ │ +000f83a0: 616d 6573 7061 6365 2070 7265 6669 7820 amespace prefix │ │ │ │ +000f83b0: 696e 2074 6865 2066 6972 7374 2063 6f6c in the first col │ │ │ │ +000f83c0: 756d 6e20 6f66 2074 6865 2074 6162 6c65 umn of the table │ │ │ │ +000f83d0: 2069 7320 636f 6e73 6964 6572 6564 2073 is considered s │ │ │ │ +000f83e0: 656d 616e 7469 6361 6c6c 7920 6964 656e emantically iden │ │ │ │ +000f83f0: 7469 6361 6c20 746f 2074 6865 206e 616d tical to the nam │ │ │ │ +000f8400: 6573 7061 6365 2070 7265 6669 7820 7573 espace prefix us │ │ │ │ +000f8410: 6564 2062 7920 7468 6520 7175 616c 6966 ed by the qualif │ │ │ │ +000f8420: 6965 6420 584d 4c20 656c 656d 656e 7420 ied XML element │ │ │ │ +000f8430: 616e 6420 6174 7472 6962 7574 6520 7061 and attribute pa │ │ │ │ +000f8440: 7273 6564 2c20 6576 656e 2077 6865 6e20 rsed, even when │ │ │ │ +000f8450: 7468 6520 7072 6566 6978 206e 616d 6573 the prefix names │ │ │ │ +000f8460: 2064 6966 6665 722e 2054 6869 7320 6e6f differ. This no │ │ │ │ +000f8470: 726d 616c 697a 6174 696f 6e20 6f66 2070 rmalization of p │ │ │ │ +000f8480: 7265 6669 7865 7320 6973 2069 6e76 6973 refixes is invis │ │ │ │ +000f8490: 6962 6c65 2074 6f20 7468 6520 7573 6572 ible to the user │ │ │ │ +000f84a0: 206f 6620 6753 4f41 5020 616e 6420 6d61 of gSOAP and ma │ │ │ │ +000f84b0: 6b65 7320 636f 6469 6e67 2077 6974 6820 kes coding with │ │ │ │ +000f84c0: 584d 4c20 6561 7369 6572 2e20 466f 7220 XML easier. For │ │ │ │ +000f84d0: 6578 616d 706c 652c 2077 6865 6e20 5853 example, when XS │ │ │ │ +000f84e0: 4420 514e 616d 6573 2061 7265 2070 6172 D QNames are par │ │ │ │ +000f84f0: 7365 6420 696e 746f 2073 7472 696e 6773 sed into strings │ │ │ │ +000f8500: 2075 7369 6e67 2074 6865 2062 7569 6c74 using the built │ │ │ │ +000f8510: 2d69 6e20 736f 6170 6370 7032 203c 636f -in soapcpp2 _QName │ │ │ │ +000f8530: 2074 7970 6520 6f72 2061 2051 4e61 6d65 type or a QName │ │ │ │ +000f8540: 2064 6563 6c61 7265 6420 7769 7468 203c declared with < │ │ │ │ +000f8550: 636f 6465 3e74 7970 6564 6566 2073 7464 code>typedef std │ │ │ │ +000f8560: 3a3a 7374 7269 6e67 2078 7364 5f5f 514e ::string xsd__QN │ │ │ │ +000f8570: 616d 653c 2f63 6f64 653e 2c20 7468 656e ame, then │ │ │ │ +000f8580: 2074 6869 7320 514e 616d 6520 7374 7269 this QName stri │ │ │ │ +000f8590: 6e67 2077 696c 6c20 616c 7761 7973 2063 ng will always c │ │ │ │ +000f85a0: 6f6e 7461 696e 2071 7561 6c69 6669 6564 ontain qualified │ │ │ │ +000f85b0: 206e 616d 6573 2077 6974 6820 6e6f 726d names with norm │ │ │ │ +000f85c0: 616c 697a 6564 2070 7265 6669 7865 732c alized prefixes, │ │ │ │ +000f85d0: 2069 2e65 2e20 7072 6566 6978 6573 2064 i.e. prefixes d │ │ │ │ +000f85e0: 6566 696e 6564 2069 6e20 7468 6520 6e61 efined in the na │ │ │ │ +000f85f0: 6d65 7370 6163 6520 6d61 7070 696e 6720 mespace mapping │ │ │ │ +000f8600: 7461 626c 652c 2075 6e6c 6573 7320 7468 table, unless th │ │ │ │ +000f8610: 6520 7461 626c 6520 6861 7320 6e6f 2065 e table has no e │ │ │ │ +000f8620: 6e74 7279 2c20 7365 6520 5365 6374 696f ntry, see Sectio │ │ │ │ +000f8630: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How to u │ │ │ │ +000f8660: 7365 2051 4e61 6d65 2061 7474 7269 6275 se QName attribu │ │ │ │ +000f8670: 7465 7320 616e 6420 656c 656d 656e 7473 tes and elements │ │ │ │ +000f8680: 3c2f 613e 2e3c 2f70 3e0a 3c70 3e46 6f72 .

    .

    For │ │ │ │ +000f8690: 2065 7861 6d70 6c65 2c20 6c65 7427 7320 example, let's │ │ │ │ +000f86a0: 7361 7920 7765 2068 6176 6520 7468 6520 say we have the │ │ │ │ +000f86b0: 666f 6c6c 6f77 696e 6720 7374 7275 6374 following struct │ │ │ │ +000f86c0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    < │ │ │ │ +000f86f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000f8700: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct a__elt { ... │ │ │ │ +000f8720: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    struct │ │ │ │ +000f8760: 625f 5f65 6c74 207b 202e 2e2e 207d 3b20 b__elt { ... }; │ │ │ │ +000f8770: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ +000f87a0: 7472 7563 7420 3c2f 7370 616e 3e6b 5f5f truct k__ │ │ │ │ +000f87b0: 656c 7420 7b20 2e2e 2e20 7d3b 203c 2f64 elt { ... }; .

    Th │ │ │ │ +000f87e0: 6520 6e61 6d65 7370 6163 6520 6d61 7070 e namespace mapp │ │ │ │ +000f87f0: 696e 6720 7461 626c 6520 6765 6e65 7261 ing table genera │ │ │ │ +000f8800: 7465 6420 6279 2073 6f61 7063 7070 3220 ted by soapcpp2 │ │ │ │ +000f8810: 6861 7320 7468 6520 666f 6c6c 6f77 696e has the followin │ │ │ │ +000f8820: 6720 656e 7472 6965 733a 3c2f 703e 0a3c g entries:

    .< │ │ │ │ +000f8830: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +000f8840: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    str │ │ │ │ +000f8870: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct Namespac │ │ │ │ +000f88b0: 653c 2f61 3e20 3c61 2063 6c61 7373 3d22 e nam │ │ │ │ +000f8910: 6573 7061 6365 733c 2f61 3e5b 5d20 3d20 espaces[] = │ │ │ │ +000f8920: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 000f8940: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ -000f8970: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000f8980: 656e 7422 3e2f 2f20 7b20 2671 756f 743b ent">// { " │ │ │ │ -000f8990: 7072 6566 6978 2671 756f 743b 2c20 2671 prefix", &q │ │ │ │ -000f89a0: 756f 743b 5552 4926 7175 6f74 3b2c 2026 uot;URI", & │ │ │ │ -000f89b0: 7175 6f74 3b55 5249 2d70 6174 7465 726e quot;URI-pattern │ │ │ │ -000f89c0: 2671 756f 743b 2028 6f70 7469 6f6e 616c " (optional │ │ │ │ -000f89d0: 2920 7d20 3c2f 7370 616e 3e3c 2f64 6976 ) }
    .
    ... │ │ │ │ -000f8a10: 2f2f 2074 6865 2066 6f75 7220 534f 4150 // the four SOAP │ │ │ │ -000f8a20: 2061 6e64 2058 5344 206e 616d 6573 7061 and XSD namespa │ │ │ │ -000f8a30: 6365 2062 696e 6469 6e67 733c 2f73 7061 ce bindings
    .
    { < │ │ │ │ -000f8a60: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -000f8a70: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -000f8a80: 3b61 2671 756f 743b 3c2f 7370 616e 3e2c ;a", │ │ │ │ -000f8a90: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -000f8ab0: 6f74 3b68 7474 703a 2f2f 7465 6d70 7572 ot;http://tempur │ │ │ │ -000f8ac0: 692e 6f72 672f 612e 7873 6426 7175 6f74 i.org/a.xsd" │ │ │ │ -000f8ad0: 3b3c 2f73 7061 6e3e 207d 2c20 3c2f 6469 ; }, .
    { "b&quo │ │ │ │ -000f8b20: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt │ │ │ │ -000f8b50: 703a 2f2f 7465 6d70 7572 692e 6f72 672f p://tempuri.org/ │ │ │ │ -000f8b60: 622e 7873 6426 7175 6f74 3b3c 2f73 7061 b.xsd" },
    . │ │ │ │ -000f8b90: 207b 203c 7370 616e 2063 6c61 7373 3d22 { & │ │ │ │ -000f8bb0: 7175 6f74 3b63 2671 756f 743b 3c2f 7370 quot;c", "http://te │ │ │ │ -000f8bf0: 6d70 7572 692e 6f72 672f 632e 7873 6426 mpuri.org/c.xsd& │ │ │ │ -000f8c00: 7175 6f74 3b3c 2f73 7061 6e3e 207d 2c20 quot; }, │ │ │ │ -000f8c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ -000f8c30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000f8c40: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    { NULL, │ │ │ │ -000f8c70: 204e 554c 4c20 7d3c 2f64 6976 3e0a 3c64 NULL }
    . │ │ │ │ -000f8c90: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .
    < │ │ │ │ -000f8ca0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -000f8cb0: 3c70 3e54 6865 6e2c 2074 6865 2066 6f6c

    Then, the fol │ │ │ │ -000f8cc0: 6c6f 7769 6e67 2058 4d4c 2065 6c65 6d65 lowing XML eleme │ │ │ │ -000f8cd0: 6e74 7320 7769 6c6c 206d 6174 6368 2074 nts will match t │ │ │ │ -000f8ce0: 6865 7365 2073 7472 7563 7473 3a3c 2f70 hese structs:

    .
    < │ │ │ │ -000f8d30: 3c73 7061 6e20 636c 6173 733d 226b 6579 x:elt< │ │ │ │ -000f8d50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> xml │ │ │ │ -000f8d70: 6e73 3a78 3c2f 7370 616e 3e3d 3c73 7061 ns:x="ht │ │ │ │ -000f8da0: 7470 3a2f 2f74 656d 7075 7269 2e6f 7267 tp://tempuri.org │ │ │ │ -000f8db0: 2f61 2e78 7364 2671 756f 743b 3c2f 7370 /a.xsd">...</< │ │ │ │ -000f8dd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f8de0: 6f72 6474 7970 6522 3e78 3a65 6c74 3c2f ordtype">x:elt>
    . │ │ │ │ -000f8e00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000f8e30: 656c 743c 2f73 7061 6e3e 203c 7370 616e elt xmlns=" │ │ │ │ -000f8e80: 6874 7470 3a2f 2f74 656d 7075 7269 2e6f http://tempuri.o │ │ │ │ -000f8e90: 7267 2f62 2e78 7364 2671 756f 743b 3c2f rg/b.xsd">...< │ │ │ │ -000f8eb0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /elt>
    . │ │ │ │ -000f8ee0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ -000f8f10: 7a7a 7a3a 656c 743c 2f73 7061 6e3e 203c zzz:elt < │ │ │ │ -000f8f20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000f8f30: 6f72 6422 3e78 6d6c 6e73 3a7a 7a7a 3c2f ord">xmlns:zzz=http │ │ │ │ -000f8f60: 3a3c 2f73 7061 6e3e 2f2f 3c73 7061 6e20 :// │ │ │ │ -000f8f80: 7465 6d70 7572 692e 6f72 673c 2f73 7061 tempuri.org/c.xsd">. │ │ │ │ -000f8fc0: 2e2e 266c 743b 2f3c 7370 616e 2063 6c61 ..</zzz:elt& │ │ │ │ -000f8ff0: 6774 3b3c 2f64 6976 3e0a 3c2f 6469 763e gt;
    .
    │ │ │ │ -000f9000: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Likewise │ │ │ │ -000f9850: 2c20 6f6e 2074 6865 2073 6572 7665 7220 , on the server │ │ │ │ -000f9860: 7369 6465 2063 616c 6c20 3c63 6f64 653e side call │ │ │ │ -000f9870: 3c61 2063 6c61 7373 3d22 656c 2220 6872 │ │ │ │ -000f9930: 736f 6170 5f73 6574 5f6e 616d 6573 7061 soap_set_namespa │ │ │ │ -000f9940: 6365 733c 2f61 3e3c 2f63 6f64 653e 2062 ces b │ │ │ │ -000f9950: 6566 6f72 6520 6361 6c6c 696e 6720 3c63 efore calling soap_serve. Changi │ │ │ │ -000f99f0: 6e67 2074 6865 206e 616d 6573 7061 6365 ng the namespace │ │ │ │ -000f9a00: 7320 7461 626c 6520 696e 2073 6572 7669 s table in servi │ │ │ │ -000f9a10: 6365 206f 7065 7261 7469 6f6e 7320 6861 ce operations ha │ │ │ │ -000f9a20: 7320 6e6f 2065 6666 6563 742e 3c2f 703e s no effect.

    │ │ │ │ -000f9a30: 0a3c 703e 5468 6520 584d 4c20 6d65 7373 .

    The XML mess │ │ │ │ -000f9a40: 6167 6573 2070 726f 6475 6365 6420 6279 ages produced by │ │ │ │ -000f9a50: 2074 6865 2067 534f 4150 2065 6e67 696e the gSOAP engin │ │ │ │ -000f9a60: 6520 696e 636c 7564 6520 616c 6c20 3c65 e include all xmlsn namesp │ │ │ │ -000f9a90: 6163 6520 6269 6e64 696e 6773 2069 6e20 ace bindings in │ │ │ │ -000f9aa0: 7468 6520 726f 6f74 2065 6c65 6d65 6e74 the root element │ │ │ │ -000f9ab0: 2c20 7768 6963 6820 6973 2067 656e 6572 , which is gener │ │ │ │ -000f9ac0: 616c 6c79 206d 6f72 6520 6566 6669 6369 ally more effici │ │ │ │ -000f9ad0: 656e 7420 666f 7220 6c61 7267 6572 2058 ent for larger X │ │ │ │ -000f9ae0: 4d4c 2064 6f63 756d 656e 7473 2069 6e20 ML documents in │ │ │ │ -000f9af0: 7768 6963 6820 6f74 6865 7277 6973 6520 which otherwise │ │ │ │ -000f9b00: 7468 6520 3c65 6d3e 3c63 6f64 653e 786d the xm │ │ │ │ -000f9b10: 6c73 6e3c 2f63 6f64 653e 3c2f 656d 3e20 lsn │ │ │ │ -000f9b20: 6e61 6d65 7370 6163 6520 6269 6e64 696e namespace bindin │ │ │ │ -000f9b30: 6773 2077 696c 6c20 6265 2073 7072 696e gs will be sprin │ │ │ │ -000f9b40: 6b6c 6564 2074 6872 6f75 6768 6f75 742e kled throughout. │ │ │ │ -000f9b50: 2042 7920 636f 6e74 7261 7374 2c20 6361 By contrast, ca │ │ │ │ -000f9b60: 6e6f 6e69 6361 6c20 584d 4c20 7265 7175 nonical XML requ │ │ │ │ -000f9b70: 6972 6573 203c 656d 3e3c 636f 6465 3e78 ires x │ │ │ │ -000f9b80: 6d6c 736e 3c2f 636f 6465 3e3c 2f65 6d3e mlsn │ │ │ │ -000f9b90: 206e 616d 6573 7061 6365 2062 696e 6469 namespace bindi │ │ │ │ -000f9ba0: 6e67 7320 6f6e 6c79 2074 6f20 6265 2069 ngs only to be i │ │ │ │ -000f9bb0: 6e63 6c75 6465 6420 7768 656e 2075 7469 ncluded when uti │ │ │ │ -000f9bc0: 6c69 7a65 642e 2054 6865 7265 666f 7265 lized. Therefore │ │ │ │ -000f9bd0: 2c20 7468 6520 3c63 6f64 653e 2353 4f41 , the #SOA │ │ │ │ -000f9be0: 505f 584d 4c5f 4341 4e4f 4e49 4341 4c3c P_XML_CANONICAL< │ │ │ │ -000f9bf0: 2f63 6f64 653e 2063 6f6e 7465 7874 2066 /code> context f │ │ │ │ -000f9c00: 6c61 6720 7072 6f64 7563 6573 2043 3134 lag produces C14 │ │ │ │ -000f9c10: 4e20 6578 636c 7573 6976 6520 584d 4c20 N exclusive XML │ │ │ │ -000f9c20: 6d65 7373 6167 6573 2061 6e64 2064 6f63 messages and doc │ │ │ │ -000f9c30: 756d 656e 7473 2c20 7768 6963 6820 656c uments, which el │ │ │ │ -000f9c40: 696d 696e 6174 6573 2075 6e75 7365 6420 iminates unused │ │ │ │ -000f9c50: 3c65 6d3e 3c63 6f64 653e 786d 6c73 6e3c xmlsn< │ │ │ │ -000f9c60: 2f63 6f64 653e 3c2f 656d 3e20 6e61 6d65 /code> name │ │ │ │ -000f9c70: 7370 6163 6520 6269 6e64 696e 6773 2066 space bindings f │ │ │ │ -000f9c80: 726f 6d20 584d 4c2e 2055 6e66 6f72 7475 rom XML. Unfortu │ │ │ │ -000f9c90: 6e61 7465 6c79 2c20 7468 6520 6375 7272 nately, the curr │ │ │ │ -000f9ca0: 656e 7420 4331 344e 2073 7461 6e64 6172 ent C14N standar │ │ │ │ -000f9cb0: 6420 6973 2062 7567 6779 2077 6974 6820 d is buggy with │ │ │ │ -000f9cc0: 7265 7370 6563 7420 746f 2058 5344 2051 respect to XSD Q │ │ │ │ -000f9cd0: 4e61 6d65 2063 6f6e 7465 6e74 2c20 6265 Name content, be │ │ │ │ -000f9ce0: 6361 7573 6520 7072 6566 6978 6573 2075 cause prefixes u │ │ │ │ -000f9cf0: 7365 6420 696e 2051 4e61 6d65 2063 6f6e sed in QName con │ │ │ │ -000f9d00: 7465 6e74 2061 7265 206e 6f74 2063 6f6e tent are not con │ │ │ │ -000f9d10: 7369 6465 7265 6420 7574 696c 697a 6564 sidered utilized │ │ │ │ -000f9d20: 2e20 5468 6520 6753 4f41 5020 656e 6769 . The gSOAP engi │ │ │ │ -000f9d30: 6e65 2063 6f6e 7369 6465 7273 2051 4e61 ne considers QNa │ │ │ │ -000f9d40: 6d65 2063 6f6e 7465 6e74 2070 7265 6669 me content prefi │ │ │ │ -000f9d50: 7865 7320 7574 696c 697a 6564 2061 6e64 xes utilized and │ │ │ │ -000f9d60: 2074 6865 7265 666f 7265 2070 726f 6475 therefore produ │ │ │ │ -000f9d70: 6365 7320 636f 7272 6563 7465 6420 6361 ces corrected ca │ │ │ │ -000f9d80: 6e6f 6e69 6361 6c69 7a65 6420 584d 4c20 nonicalized XML │ │ │ │ -000f9d90: 6f75 7470 7574 2074 6861 7420 7072 6576 output that prev │ │ │ │ -000f9da0: 656e 7473 2074 6865 206c 6f73 7320 6f66 ents the loss of │ │ │ │ -000f9db0: 206e 616d 6573 7061 6365 2069 6e66 6f72 namespace infor │ │ │ │ -000f9dc0: 6d61 7469 6f6e 2066 6f72 2051 4e61 6d65 mation for QName │ │ │ │ -000f9dd0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ -000f9de0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -000f9df0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -000f9e00: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6831 ents

    .

    < │ │ │ │ -000f9e30: 2f61 3e0a 534f 4150 2048 6561 6465 7220 /a>.SOAP Header │ │ │ │ -000f9e40: 7072 6f63 6573 7369 6e67 3c2f 6831 3e0a processing

    . │ │ │ │ -000f9e50: 3c70 3e41 2062 7569 6c74 2d69 6e20 534f

    A built-in SO │ │ │ │ -000f9e60: 4150 2048 6561 6465 7220 6461 7461 2073 AP Header data s │ │ │ │ -000f9e70: 7472 7563 7475 7265 203c 636f 6465 3e3c tructure < │ │ │ │ -000f9e80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -000f9e90: 663d 2273 7472 7563 745f 735f 6f5f 615f f="struct_s_o_a_ │ │ │ │ -000f9ea0: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he │ │ │ │ -000f9eb0: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html" title │ │ │ │ -000f9ec0: 3d22 534f 4150 2048 6561 6465 7220 7374 ="SOAP Header st │ │ │ │ -000f9ed0: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.">SOAP_E │ │ │ │ -000f9ee0: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header is generat │ │ │ │ -000f9f00: 6564 2062 7920 7468 6520 736f 6170 6370 ed by the soapcp │ │ │ │ -000f9f10: 7032 2074 6f6f 6c20 666f 7220 6578 6368 p2 tool for exch │ │ │ │ -000f9f20: 616e 6769 6e67 2053 4f41 5020 6865 6164 anging SOAP head │ │ │ │ -000f9f30: 6572 7320 696e 2053 4f41 5020 6d65 7373 ers in SOAP mess │ │ │ │ -000f9f40: 6167 6573 2e20 5468 6973 2073 7472 7563 ages. This struc │ │ │ │ -000f9f50: 7475 7265 2069 7320 656d 7074 7920 756e ture is empty un │ │ │ │ -000f9f60: 6c65 7373 2068 6561 6465 7273 2061 7265 less headers are │ │ │ │ -000f9f70: 2061 6464 6564 2062 7920 706c 7567 696e added by plugin │ │ │ │ -000f9f80: 7320 616e 6420 6865 6164 6572 7320 7370 s and headers sp │ │ │ │ -000f9f90: 6563 6966 6965 6420 6279 2057 5344 4c20 ecified by WSDL │ │ │ │ -000f9fa0: 7370 6563 6966 6963 6174 696f 6e73 2028 specifications ( │ │ │ │ -000f9fb0: 692e 652e 2077 7364 6c32 6820 6164 6473 i.e. wsdl2h adds │ │ │ │ -000f9fc0: 2053 4f41 5020 4865 6164 6572 7329 2e3c SOAP Headers).< │ │ │ │ -000f9fd0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2063 /p>.

    You can c │ │ │ │ -000f9fe0: 7265 6174 6520 796f 7572 206f 776e 2053 reate your own S │ │ │ │ -000f9ff0: 4f41 5020 4865 6164 6572 2073 7472 7563 OAP Header struc │ │ │ │ -000fa000: 7420 7369 6d70 6c79 2062 7920 6465 636c t simply by decl │ │ │ │ -000fa010: 6172 696e 6720 6974 2069 6e20 616e 2069 aring it in an i │ │ │ │ -000fa020: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header │ │ │ │ -000fa030: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp │ │ │ │ -000fa040: 3220 616e 6420 6279 2061 6464 696e 6720 2 and by adding │ │ │ │ -000fa050: 6d65 6d62 6572 7320 7468 6174 206d 7573 members that mus │ │ │ │ -000fa060: 7420 6265 2071 7561 6c69 6669 6564 2077 t be qualified w │ │ │ │ -000fa070: 6974 6820 6e61 6d65 7370 6163 6520 7072 ith namespace pr │ │ │ │ -000fa080: 6566 6978 6573 2074 6f20 636f 6e66 6f72 efixes to confor │ │ │ │ -000fa090: 6d20 746f 2074 6865 2053 4f41 5020 4865 m to the SOAP He │ │ │ │ -000fa0a0: 6164 6572 2070 726f 6365 7373 696e 6720 ader processing │ │ │ │ -000fa0b0: 7265 7175 6972 656d 656e 7473 2074 6861 requirements tha │ │ │ │ -000fa0c0: 7420 534f 4150 2048 6561 6465 7220 656c t SOAP Header el │ │ │ │ -000fa0d0: 656d 656e 7473 206d 7573 7420 6265 206e ements must be n │ │ │ │ -000fa0e0: 616d 6573 7061 6365 2071 7561 6c69 6669 amespace qualifi │ │ │ │ -000fa0f0: 6564 2e3c 2f70 3e0a 3c70 3e46 6f72 2065 ed.

    .

    For e │ │ │ │ -000fa100: 7861 6d70 6c65 2c20 6173 7375 6d65 2074 xample, assume t │ │ │ │ -000fa110: 6861 7420 7472 616e 7361 6374 696f 6e20 hat transaction │ │ │ │ -000fa120: 6461 7461 2073 686f 756c 6420 6265 2070 data should be p │ │ │ │ -000fa130: 6967 6779 2d62 6163 6b65 6420 7769 7468 iggy-backed with │ │ │ │ -000fa140: 2053 4f41 5020 6d65 7373 6167 6573 2069 SOAP messages i │ │ │ │ -000fa150: 6e20 534f 4150 2048 6561 6465 723a 3c2f n SOAP Header:.

    struct t │ │ │ │ -000fa1b0: 5f5f 7472 616e 7361 6374 696f 6e3c 2f64 __transaction // { │ │ │ │ +000f8970: 2671 756f 743b 7072 6566 6978 2671 756f "prefix&quo │ │ │ │ +000f8980: 743b 2c20 2671 756f 743b 5552 4926 7175 t;, "URI&qu │ │ │ │ +000f8990: 6f74 3b2c 2026 7175 6f74 3b55 5249 2d70 ot;, "URI-p │ │ │ │ +000f89a0: 6174 7465 726e 2671 756f 743b 2028 6f70 attern" (op │ │ │ │ +000f89b0: 7469 6f6e 616c 2920 7d20 3c2f 7370 616e tional) }
    .
    ... │ │ │ │ +000f89e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // the fou │ │ │ │ +000f8a00: 7220 534f 4150 2061 6e64 2058 5344 206e r SOAP and XSD n │ │ │ │ +000f8a10: 616d 6573 7061 6365 2062 696e 6469 6e67 amespace binding │ │ │ │ +000f8a20: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ +000f8a30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000f8a40: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "a", "http:// │ │ │ │ +000f8aa0: 7465 6d70 7572 692e 6f72 672f 612e 7873 tempuri.org/a.xs │ │ │ │ +000f8ab0: 6426 7175 6f74 3b3c 2f73 7061 6e3e 207d d" } │ │ │ │ +000f8ac0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    { < │ │ │ │ +000f8ae0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000f8af0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000f8b00: 3b62 2671 756f 743b 3c2f 7370 616e 3e2c ;b", │ │ │ │ +000f8b10: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +000f8b30: 6f74 3b68 7474 703a 2f2f 7465 6d70 7572 ot;http://tempur │ │ │ │ +000f8b40: 692e 6f72 672f 622e 7873 6426 7175 6f74 i.org/b.xsd" │ │ │ │ +000f8b50: 3b3c 2f73 7061 6e3e 207d 2c20 3c2f 6469 ; }, .
    { "c&quo │ │ │ │ +000f8ba0: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "htt │ │ │ │ +000f8bd0: 703a 2f2f 7465 6d70 7572 692e 6f72 672f p://tempuri.org/ │ │ │ │ +000f8be0: 632e 7873 6426 7175 6f74 3b3c 2f73 7061 c.xsd" },
    . │ │ │ │ +000f8c10: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
    .
    { │ │ │ │ +000f8c50: 204e 554c 4c2c 204e 554c 4c20 7d3c 2f64 NULL, NULL }.
    };
    .< │ │ │ │ +000f8c80: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Then, t │ │ │ │ +000f8ca0: 6865 2066 6f6c 6c6f 7769 6e67 2058 4d4c he following XML │ │ │ │ +000f8cb0: 2065 6c65 6d65 6e74 7320 7769 6c6c 206d elements will m │ │ │ │ +000f8cc0: 6174 6368 2074 6865 7365 2073 7472 7563 atch these struc │ │ │ │ +000f8cd0: 7473 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ts:

    .
    │ │ │ │ +000f8d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    < │ │ │ │ +000f8d30: 783a 656c 743c 2f73 7061 6e3e 203c 7370 x:elt xmlns:x=&q │ │ │ │ +000f8d80: 756f 743b 6874 7470 3a2f 2f74 656d 7075 uot;http://tempu │ │ │ │ +000f8d90: 7269 2e6f 7267 2f61 2e78 7364 2671 756f ri.org/a.xsd&quo │ │ │ │ +000f8da0: 743b 3c2f 7370 616e 3e26 6774 3b2e 2e2e t;>... │ │ │ │ +000f8db0: 266c 743b 2f3c 7370 616e 2063 6c61 7373 </x │ │ │ │ +000f8dd0: 3a65 6c74 3c2f 7370 616e 3e26 6774 3b3c :elt>< │ │ │ │ +000f8de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <elt │ │ │ │ +000f8e20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 xmlns= │ │ │ │ +000f8e60: 2671 756f 743b 6874 7470 3a2f 2f74 656d "http://tem │ │ │ │ +000f8e70: 7075 7269 2e6f 7267 2f62 2e78 7364 2671 puri.org/b.xsd&q │ │ │ │ +000f8e80: 756f 743b 3c2f 7370 616e 3e26 6774 3b2e uot;>. │ │ │ │ +000f8e90: 2e2e 266c 743b 2f3c 7370 616e 2063 6c61 ..</elt>< │ │ │ │ +000f8ec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <zzz:elt xmlns │ │ │ │ +000f8f20: 3a7a 7a7a 3c2f 7370 616e 3e3d 3c73 7061 :zzz=http:// │ │ │ │ +000f8f50: 3c73 7061 6e20 636c 6173 733d 226b 6579 tempuri.or │ │ │ │ +000f8f70: 673c 2f73 7061 6e3e 2f3c 7370 616e 2063 g/c │ │ │ │ +000f8f90: 2e78 7364 3c2f 7370 616e 3e26 7175 6f74 .xsd" │ │ │ │ +000f8fa0: 3b26 6774 3b2e 2e2e 266c 743b 2f3c 7370 ;>...</zzz:elt>
    . │ │ │ │ +000f8fe0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Instead of one │ │ │ │ +000f9010: 6269 6720 6e61 6d65 7370 6163 6520 7461 big namespace ta │ │ │ │ +000f9020: 626c 6520 7468 6174 2063 6f6e 7461 696e ble that contain │ │ │ │ +000f9030: 7320 616c 6c20 584d 4c20 6e61 6d65 7370 s all XML namesp │ │ │ │ +000f9040: 6163 6520 7072 6566 6978 6573 2077 6974 ace prefixes wit │ │ │ │ +000f9050: 6820 7468 6569 7220 5552 4973 2c20 7468 h their URIs, th │ │ │ │ +000f9060: 6572 6520 6172 6520 6361 7365 7320 7768 ere are cases wh │ │ │ │ +000f9070: 656e 2069 7420 6973 2064 6573 6972 6162 en it is desirab │ │ │ │ +000f9080: 6c65 2074 6f20 7573 6520 6d75 6c74 6970 le to use multip │ │ │ │ +000f9090: 6c65 206e 616d 6573 7061 6365 2074 6162 le namespace tab │ │ │ │ +000f90a0: 6c65 732c 206f 6e65 2066 6f72 2065 6163 les, one for eac │ │ │ │ +000f90b0: 6820 7365 7276 6963 652e 2054 6869 7320 h service. This │ │ │ │ +000f90c0: 6176 6f69 6473 206c 6561 6b69 6e67 206e avoids leaking n │ │ │ │ +000f90d0: 616d 6573 7061 6365 2070 7265 6669 7865 amespace prefixe │ │ │ │ +000f90e0: 7320 696e 2058 4d4c 206d 6573 7361 6765 s in XML message │ │ │ │ +000f90f0: 7320 7468 6174 2068 6176 6520 6e6f 7468 s that have noth │ │ │ │ +000f9100: 696e 6720 746f 2064 6f20 7769 7468 2074 ing to do with t │ │ │ │ +000f9110: 6865 2073 6572 7669 6365 2069 6e76 6f6b he service invok │ │ │ │ +000f9120: 6564 2e20 496e 2070 7269 6e63 6970 6c65 ed. In principle │ │ │ │ +000f9130: 2074 6865 7265 2069 7320 6e6f 2068 6172 there is no har │ │ │ │ +000f9140: 6d20 746f 206c 6561 6b20 7468 6573 6520 m to leak these │ │ │ │ +000f9150: 6e61 6d65 7370 6163 6520 7072 6566 6978 namespace prefix │ │ │ │ +000f9160: 6573 2c20 6275 7420 7468 6520 6d65 7373 es, but the mess │ │ │ │ +000f9170: 6167 6573 2061 7265 206c 6573 7320 636f ages are less co │ │ │ │ +000f9180: 6d70 6163 7420 616e 6420 6e6f 7420 6173 mpact and not as │ │ │ │ +000f9190: 2063 6c65 616e 2e20 546f 2075 7365 206d clean. To use m │ │ │ │ +000f91a0: 756c 7469 706c 6520 6e61 6d65 7370 6163 ultiple namespac │ │ │ │ +000f91b0: 6520 7461 626c 6573 2061 7420 7468 6520 e tables at the │ │ │ │ +000f91c0: 636c 6965 6e74 2073 6964 6520 6973 2064 client side is d │ │ │ │ +000f91d0: 6f6e 6520 6173 2066 6f6c 6c6f 7773 3a3c one as follows:< │ │ │ │ +000f91e0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct │ │ │ │ +000f9230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam │ │ │ │ +000f9260: 6573 7061 6365 3c2f 613e 206e 616d 6573 espace names │ │ │ │ +000f9270: 7061 6365 7354 6162 6c65 315b 5d20 3d20 pacesTable1[] = │ │ │ │ +000f9280: 7b20 2e2e 2e20 7d3b 203c 2f64 6976 3e0a { ... };
    . │ │ │ │ +000f9290: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ +000f92c0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>Namespace │ │ │ │ +000f9300: 206e 616d 6573 7061 6365 7354 6162 6c65 namespacesTable │ │ │ │ +000f9310: 325b 5d20 3d20 7b20 2e2e 2e20 7d3b 203c 2[] = { ... }; < │ │ │ │ +000f9320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ +000f9350: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct Namespa │ │ │ │ +000f9390: 6365 3c2f 613e 206e 616d 6573 7061 6365 ce namespace │ │ │ │ +000f93a0: 7354 6162 6c65 335b 5d20 3d20 7b20 2e2e sTable3[] = { .. │ │ │ │ +000f93b0: 2e20 7d3b 203c 2f64 6976 3e0a 3c64 6976 . };
    ..
    .. │ │ │ │ +000f94b0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    │ │ │ │ +000f9500: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *< │ │ │ │ +000f9540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000f9550: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +000f9560: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html">soap = │ │ │ │ +000f9570: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    .< │ │ │ │ +000f95f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000f9600: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +000f9610: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm │ │ │ │ +000f9620: 6c23 6761 3565 6339 3133 6163 6363 3730 l#ga5ec913accc70 │ │ │ │ +000f9630: 3563 6361 3332 3936 6162 3735 6261 6539 5cca3296ab75bae9 │ │ │ │ +000f9640: 3535 6135 223e 736f 6170 5f73 6574 5f6e 55a5">soap_set_n │ │ │ │ +000f9650: 616d 6573 7061 6365 733c 2f61 3e28 3c61 amespaces(soap, n │ │ │ │ +000f9690: 616d 6573 7061 6365 5461 626c 6531 293b amespaceTable1); │ │ │ │ +000f96a0: 203c 7370 616e 2063 6c61 7373 3d22 636f // use th │ │ │ │ +000f96c0: 6520 6669 7273 7420 6e61 6d65 7370 6163 e first namespac │ │ │ │ +000f96d0: 6520 7461 626c 653c 2f73 7061 6e3e 3c2f e table.
    if (soap │ │ │ │ +000f9720: 5f63 616c 6c5f 7265 6d6f 7465 5f6d 6574 _call_remote_met │ │ │ │ +000f9730: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap< │ │ │ │ +000f9760: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, en │ │ │ │ +000f97b0: 6470 6f69 6e74 3c2f 613e 2c20 4163 7469 dpoint, Acti │ │ │ │ +000f97c0: 6f6e 2c20 2e2e 2e29 293c 2f64 6976 3e0a on, ...))
    . │ │ │ │ +000f97d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // │ │ │ │ +000f9800: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.

    Li │ │ │ │ +000f9830: 6b65 7769 7365 2c20 6f6e 2074 6865 2073 kewise, on the s │ │ │ │ +000f9840: 6572 7665 7220 7369 6465 2063 616c 6c20 erver side call │ │ │ │ +000f9850: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_set_n │ │ │ │ +000f9920: 616d 6573 7061 6365 733c 2f61 3e3c 2f63 amespaces before call │ │ │ │ +000f9940: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing soap_se │ │ │ │ +000f99c0: 7276 653c 2f61 3e3c 2f63 6f64 653e 2e20 rve. │ │ │ │ +000f99d0: 4368 616e 6769 6e67 2074 6865 206e 616d Changing the nam │ │ │ │ +000f99e0: 6573 7061 6365 7320 7461 626c 6520 696e espaces table in │ │ │ │ +000f99f0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati │ │ │ │ +000f9a00: 6f6e 7320 6861 7320 6e6f 2065 6666 6563 ons has no effec │ │ │ │ +000f9a10: 742e 3c2f 703e 0a3c 703e 5468 6520 584d t.

    .

    The XM │ │ │ │ +000f9a20: 4c20 6d65 7373 6167 6573 2070 726f 6475 L messages produ │ │ │ │ +000f9a30: 6365 6420 6279 2074 6865 2067 534f 4150 ced by the gSOAP │ │ │ │ +000f9a40: 2065 6e67 696e 6520 696e 636c 7564 6520 engine include │ │ │ │ +000f9a50: 616c 6c20 3c65 6d3e 3c63 6f64 653e 786d all xm │ │ │ │ +000f9a60: 6c73 6e3c 2f63 6f64 653e 3c2f 656d 3e20 lsn │ │ │ │ +000f9a70: 6e61 6d65 7370 6163 6520 6269 6e64 696e namespace bindin │ │ │ │ +000f9a80: 6773 2069 6e20 7468 6520 726f 6f74 2065 gs in the root e │ │ │ │ +000f9a90: 6c65 6d65 6e74 2c20 7768 6963 6820 6973 lement, which is │ │ │ │ +000f9aa0: 2067 656e 6572 616c 6c79 206d 6f72 6520 generally more │ │ │ │ +000f9ab0: 6566 6669 6369 656e 7420 666f 7220 6c61 efficient for la │ │ │ │ +000f9ac0: 7267 6572 2058 4d4c 2064 6f63 756d 656e rger XML documen │ │ │ │ +000f9ad0: 7473 2069 6e20 7768 6963 6820 6f74 6865 ts in which othe │ │ │ │ +000f9ae0: 7277 6973 6520 7468 6520 3c65 6d3e 3c63 rwise the xmlsn │ │ │ │ +000f9b00: 3c2f 656d 3e20 6e61 6d65 7370 6163 6520 namespace │ │ │ │ +000f9b10: 6269 6e64 696e 6773 2077 696c 6c20 6265 bindings will be │ │ │ │ +000f9b20: 2073 7072 696e 6b6c 6564 2074 6872 6f75 sprinkled throu │ │ │ │ +000f9b30: 6768 6f75 742e 2042 7920 636f 6e74 7261 ghout. By contra │ │ │ │ +000f9b40: 7374 2c20 6361 6e6f 6e69 6361 6c20 584d st, canonical XM │ │ │ │ +000f9b50: 4c20 7265 7175 6972 6573 203c 656d 3e3c L requires < │ │ │ │ +000f9b60: 636f 6465 3e78 6d6c 736e 3c2f 636f 6465 code>xmlsn namespace │ │ │ │ +000f9b80: 2062 696e 6469 6e67 7320 6f6e 6c79 2074 bindings only t │ │ │ │ +000f9b90: 6f20 6265 2069 6e63 6c75 6465 6420 7768 o be included wh │ │ │ │ +000f9ba0: 656e 2075 7469 6c69 7a65 642e 2054 6865 en utilized. The │ │ │ │ +000f9bb0: 7265 666f 7265 2c20 7468 6520 3c63 6f64 refore, the #SOAP_XML_CANO │ │ │ │ +000f9bd0: 4e49 4341 4c3c 2f63 6f64 653e 2063 6f6e NICAL con │ │ │ │ +000f9be0: 7465 7874 2066 6c61 6720 7072 6f64 7563 text flag produc │ │ │ │ +000f9bf0: 6573 2043 3134 4e20 6578 636c 7573 6976 es C14N exclusiv │ │ │ │ +000f9c00: 6520 584d 4c20 6d65 7373 6167 6573 2061 e XML messages a │ │ │ │ +000f9c10: 6e64 2064 6f63 756d 656e 7473 2c20 7768 nd documents, wh │ │ │ │ +000f9c20: 6963 6820 656c 696d 696e 6174 6573 2075 ich eliminates u │ │ │ │ +000f9c30: 6e75 7365 6420 3c65 6d3e 3c63 6f64 653e nused │ │ │ │ +000f9c40: 786d 6c73 6e3c 2f63 6f64 653e 3c2f 656d xmlsn namespace bind │ │ │ │ +000f9c60: 696e 6773 2066 726f 6d20 584d 4c2e 2055 ings from XML. U │ │ │ │ +000f9c70: 6e66 6f72 7475 6e61 7465 6c79 2c20 7468 nfortunately, th │ │ │ │ +000f9c80: 6520 6375 7272 656e 7420 4331 344e 2073 e current C14N s │ │ │ │ +000f9c90: 7461 6e64 6172 6420 6973 2062 7567 6779 tandard is buggy │ │ │ │ +000f9ca0: 2077 6974 6820 7265 7370 6563 7420 746f with respect to │ │ │ │ +000f9cb0: 2058 5344 2051 4e61 6d65 2063 6f6e 7465 XSD QName conte │ │ │ │ +000f9cc0: 6e74 2c20 6265 6361 7573 6520 7072 6566 nt, because pref │ │ │ │ +000f9cd0: 6978 6573 2075 7365 6420 696e 2051 4e61 ixes used in QNa │ │ │ │ +000f9ce0: 6d65 2063 6f6e 7465 6e74 2061 7265 206e me content are n │ │ │ │ +000f9cf0: 6f74 2063 6f6e 7369 6465 7265 6420 7574 ot considered ut │ │ │ │ +000f9d00: 696c 697a 6564 2e20 5468 6520 6753 4f41 ilized. The gSOA │ │ │ │ +000f9d10: 5020 656e 6769 6e65 2063 6f6e 7369 6465 P engine conside │ │ │ │ +000f9d20: 7273 2051 4e61 6d65 2063 6f6e 7465 6e74 rs QName content │ │ │ │ +000f9d30: 2070 7265 6669 7865 7320 7574 696c 697a prefixes utiliz │ │ │ │ +000f9d40: 6564 2061 6e64 2074 6865 7265 666f 7265 ed and therefore │ │ │ │ +000f9d50: 2070 726f 6475 6365 7320 636f 7272 6563 produces correc │ │ │ │ +000f9d60: 7465 6420 6361 6e6f 6e69 6361 6c69 7a65 ted canonicalize │ │ │ │ +000f9d70: 6420 584d 4c20 6f75 7470 7574 2074 6861 d XML output tha │ │ │ │ +000f9d80: 7420 7072 6576 656e 7473 2074 6865 206c t prevents the l │ │ │ │ +000f9d90: 6f73 7320 6f66 206e 616d 6573 7061 6365 oss of namespace │ │ │ │ +000f9da0: 2069 6e66 6f72 6d61 7469 6f6e 2066 6f72 information for │ │ │ │ +000f9db0: 2051 4e61 6d65 732e 3c2f 703e 0a3c 703e QNames.

    .

    │ │ │ │ +000f9dc0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +000f9de0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .SOAP H │ │ │ │ +000f9e20: 6561 6465 7220 7072 6f63 6573 7369 6e67 eader processing │ │ │ │ +000f9e30: 3c2f 6831 3e0a 3c70 3e41 2062 7569 6c74

    .

    A built │ │ │ │ +000f9e40: 2d69 6e20 534f 4150 2048 6561 6465 7220 -in SOAP Header │ │ │ │ +000f9e50: 6461 7461 2073 7472 7563 7475 7265 203c data structure < │ │ │ │ +000f9e60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code> │ │ │ │ +000f9ec0: 534f 4150 5f45 4e56 5f5f 4865 6164 6572 SOAP_ENV__Header │ │ │ │ +000f9ed0: 3c2f 613e 3c2f 636f 6465 3e20 6973 2067 is g │ │ │ │ +000f9ee0: 656e 6572 6174 6564 2062 7920 7468 6520 enerated by the │ │ │ │ +000f9ef0: 736f 6170 6370 7032 2074 6f6f 6c20 666f soapcpp2 tool fo │ │ │ │ +000f9f00: 7220 6578 6368 616e 6769 6e67 2053 4f41 r exchanging SOA │ │ │ │ +000f9f10: 5020 6865 6164 6572 7320 696e 2053 4f41 P headers in SOA │ │ │ │ +000f9f20: 5020 6d65 7373 6167 6573 2e20 5468 6973 P messages. This │ │ │ │ +000f9f30: 2073 7472 7563 7475 7265 2069 7320 656d structure is em │ │ │ │ +000f9f40: 7074 7920 756e 6c65 7373 2068 6561 6465 pty unless heade │ │ │ │ +000f9f50: 7273 2061 7265 2061 6464 6564 2062 7920 rs are added by │ │ │ │ +000f9f60: 706c 7567 696e 7320 616e 6420 6865 6164 plugins and head │ │ │ │ +000f9f70: 6572 7320 7370 6563 6966 6965 6420 6279 ers specified by │ │ │ │ +000f9f80: 2057 5344 4c20 7370 6563 6966 6963 6174 WSDL specificat │ │ │ │ +000f9f90: 696f 6e73 2028 692e 652e 2077 7364 6c32 ions (i.e. wsdl2 │ │ │ │ +000f9fa0: 6820 6164 6473 2053 4f41 5020 4865 6164 h adds SOAP Head │ │ │ │ +000f9fb0: 6572 7329 2e3c 2f70 3e0a 3c70 3e59 6f75 ers).

    .

    You │ │ │ │ +000f9fc0: 2063 616e 2063 7265 6174 6520 796f 7572 can create your │ │ │ │ +000f9fd0: 206f 776e 2053 4f41 5020 4865 6164 6572 own SOAP Header │ │ │ │ +000f9fe0: 2073 7472 7563 7420 7369 6d70 6c79 2062 struct simply b │ │ │ │ +000f9ff0: 7920 6465 636c 6172 696e 6720 6974 2069 y declaring it i │ │ │ │ +000fa000: 6e20 616e 2069 6e74 6572 6661 6365 2068 n an interface h │ │ │ │ +000fa010: 6561 6465 7220 6669 6c65 2066 6f72 2073 eader file for s │ │ │ │ +000fa020: 6f61 7063 7070 3220 616e 6420 6279 2061 oapcpp2 and by a │ │ │ │ +000fa030: 6464 696e 6720 6d65 6d62 6572 7320 7468 dding members th │ │ │ │ +000fa040: 6174 206d 7573 7420 6265 2071 7561 6c69 at must be quali │ │ │ │ +000fa050: 6669 6564 2077 6974 6820 6e61 6d65 7370 fied with namesp │ │ │ │ +000fa060: 6163 6520 7072 6566 6978 6573 2074 6f20 ace prefixes to │ │ │ │ +000fa070: 636f 6e66 6f72 6d20 746f 2074 6865 2053 conform to the S │ │ │ │ +000fa080: 4f41 5020 4865 6164 6572 2070 726f 6365 OAP Header proce │ │ │ │ +000fa090: 7373 696e 6720 7265 7175 6972 656d 656e ssing requiremen │ │ │ │ +000fa0a0: 7473 2074 6861 7420 534f 4150 2048 6561 ts that SOAP Hea │ │ │ │ +000fa0b0: 6465 7220 656c 656d 656e 7473 206d 7573 der elements mus │ │ │ │ +000fa0c0: 7420 6265 206e 616d 6573 7061 6365 2071 t be namespace q │ │ │ │ +000fa0d0: 7561 6c69 6669 6564 2e3c 2f70 3e0a 3c70 ualified.

    .

    For example, as │ │ │ │ +000fa0f0: 7375 6d65 2074 6861 7420 7472 616e 7361 sume that transa │ │ │ │ +000fa100: 6374 696f 6e20 6461 7461 2073 686f 756c ction data shoul │ │ │ │ +000fa110: 6420 6265 2070 6967 6779 2d62 6163 6b65 d be piggy-backe │ │ │ │ +000fa120: 6420 7769 7468 2053 4f41 5020 6d65 7373 d with SOAP mess │ │ │ │ +000fa130: 6167 6573 2069 6e20 534f 4150 2048 6561 ages in SOAP Hea │ │ │ │ +000fa140: 6465 723a 3c2f 703e 0a3c 6469 7620 636c der:

    .
    < │ │ │ │ +000fa160: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000fa170: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct t__transact │ │ │ │ +000fa1a0: 696f 6e3c 2f64 6976 3e0a 3c64 6976 2063 ion
    .
    {.
    {
    . │ │ │ │ -000fa1f0: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -000fa210: 743c 2f73 7061 6e3e 206e 756d 6265 723b t number; │ │ │ │ -000fa220: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    const │ │ │ │ -000fa260: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *dscriptio │ │ │ │ -000fa290: 6e3b 3c2f 6469 763e 0a3c 6469 7620 636c n;
    .
    };.
    stru │ │ │ │ -000fa2e0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV │ │ │ │ -000fa330: 5f5f 4865 6164 6572 3c2f 613e 203c 2f64 __Header int n │ │ │ │ +000fa200: 756d 6265 723b 3c2f 6469 763e 0a3c 6469 umber;
    . │ │ │ │ +000fa220: 2020 203c 7370 616e 2063 6c61 7373 3d22 const │ │ │ │ +000fa260: 6368 6172 3c2f 7370 616e 3e20 2a64 7363 char *dsc │ │ │ │ +000fa270: 7269 7074 696f 6e3b 3c2f 6469 763e 0a3c ription;
    .< │ │ │ │ +000fa280: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000fa290: 3e7d 3b3c 2f64 6976 3e0a 3c64 6976 2063 >};
    .
    struct │ │ │ │ +000fa2d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SO │ │ │ │ +000fa310: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header
    .
    {.
    {
    . │ │ │ │ -000fa370: 2020 2020 6d75 7374 556e 6465 7273 7461 mustUndersta │ │ │ │ -000fa380: 6e64 203c 7370 616e 2063 6c61 7373 3d22 nd struct │ │ │ │ -000fa3a0: 3c2f 7370 616e 3e74 5f5f 7472 616e 7361 t__transa │ │ │ │ -000fa3b0: 6374 696f 6e20 2a74 5f5f 7472 616e 7361 ction *t__transa │ │ │ │ -000fa3c0: 6374 696f 6e3b 203c 2f64 6976 3e0a 3c64 ction;
    . │ │ │ │ -000fa3e0: 7d3b 3c2f 6469 763e 0a3c 6469 7620 636c };
    .
    //gsoap ns serv │ │ │ │ -000fa420: 6963 6520 6d65 7468 6f64 2d69 6e70 7574 ice method-input │ │ │ │ -000fa430: 2d68 6561 6465 722d 7061 7274 3a20 7765 -header-part: we │ │ │ │ -000fa440: 626d 6574 686f 6420 745f 5f74 7261 6e73 bmethod t__trans │ │ │ │ -000fa450: 6163 7469 6f6e 3c2f 7370 616e 3e3c 2f64 action.
    │ │ │ │ -000fa490: 696e 743c 2f73 7061 6e3e 206e 735f 5f77 int ns__w │ │ │ │ -000fa4a0: 6562 6d65 7468 6f64 282e 2e2e 293b 3c2f ebmethod(...);.

    T │ │ │ │ -000fa4d0: 6865 203c 636f 6465 3e6d 7573 7455 6e64 he mustUnd │ │ │ │ -000fa4e0: 6572 7374 616e 643c 2f63 6f64 653e 2071 erstand q │ │ │ │ -000fa4f0: 7561 6c69 6669 6572 2073 7065 6369 6669 ualifier specifi │ │ │ │ -000fa500: 6573 2074 6861 7420 7468 6520 656c 656d es that the elem │ │ │ │ -000fa510: 656e 7420 6d75 7374 2062 6520 7072 6f63 ent must be proc │ │ │ │ -000fa520: 6573 7365 6420 6279 2074 6865 2053 4f41 essed by the SOA │ │ │ │ -000fa530: 5020 7072 6f63 6573 736f 7220 616e 6420 P processor and │ │ │ │ -000fa540: 6361 6e6e 6f74 2062 6520 6967 6e6f 7265 cannot be ignore │ │ │ │ -000fa550: 6420 6966 2074 6865 2070 726f 6365 7373 d if the process │ │ │ │ -000fa560: 6f72 2068 6173 206e 6f20 6c6f 6769 6320 or has no logic │ │ │ │ -000fa570: 696e 2070 6c61 6365 2066 6f72 2074 6869 in place for thi │ │ │ │ -000fa580: 7320 534f 4150 2068 6561 6465 722c 2077 s SOAP header, w │ │ │ │ -000fa590: 6869 6368 2069 7320 646f 6e65 2062 7920 hich is done by │ │ │ │ -000fa5a0: 6164 6469 6e67 2061 203c 656d 3e3c 636f adding a SOAP-ENV:must │ │ │ │ -000fa5c0: 556e 6465 7273 7461 6e64 3d22 7472 7565 Understand="true │ │ │ │ -000fa5d0: 223c 2f63 6f64 653e 3c2f 656d 3e20 6174 " at │ │ │ │ -000fa5e0: 7472 6962 7574 6520 746f 2074 6865 203c tribute to the < │ │ │ │ -000fa5f0: 656d 3e3c 636f 6465 3e74 3a74 7261 6e73 em>t:trans │ │ │ │ -000fa600: 6163 7469 6f6e 3c2f 636f 6465 3e3c 2f65 action element. The │ │ │ │ -000fa620: 736f 6170 6370 7032 2d67 656e 6572 6174 soapcpp2-generat │ │ │ │ -000fa630: 6564 2073 6572 6961 6c69 7a65 7273 206f ed serializers o │ │ │ │ -000fa640: 6265 7920 7468 6973 2073 6166 6574 7920 bey this safety │ │ │ │ -000fa650: 7072 696e 6369 706c 652e 3c2f 703e 0a3c principle.

    .< │ │ │ │ -000fa660: 703e 5468 6973 2064 6563 6c61 7265 7320 p>This declares │ │ │ │ -000fa670: 6120 7365 7276 6963 6520 6f70 6572 6174 a service operat │ │ │ │ -000fa680: 696f 6e20 7468 6174 2073 656e 6473 206d ion that sends m │ │ │ │ -000fa690: 6573 7361 6765 7320 7769 7468 2061 6e20 essages with an │ │ │ │ -000fa6a0: 696e 7075 7420 534f 4150 2068 6561 6465 input SOAP heade │ │ │ │ -000fa6b0: 7220 3c63 6f64 653e 745f 5f74 7261 6e73 r t__trans │ │ │ │ -000fa6c0: 6163 7469 6f6e 3c2f 636f 6465 3e2c 2061 action, a │ │ │ │ -000fa6d0: 7320 6361 6e20 6265 2073 6565 6e20 696e s can be seen in │ │ │ │ -000fa6e0: 2074 6865 2067 656e 6572 6174 6564 2057 the generated W │ │ │ │ -000fa6f0: 5344 4c20 6269 6e64 696e 673a 3c2f 703e SDL binding:

    │ │ │ │ -000fa700: 0a3c 6469 7620 636c 6173 733d 2261 6c74 .
    << │ │ │ │ -000fa740: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000fa750: 6f72 6474 7970 6522 3e62 696e 6469 6e67 ordtype">binding │ │ │ │ -000fa760: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c na │ │ │ │ -000fa780: 6d65 3c2f 7370 616e 3e3d 3c73 7061 6e20 me="Serv │ │ │ │ -000fa7b0: 6963 6526 7175 6f74 3b3c 2f73 7061 6e3e ice" │ │ │ │ -000fa7c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 type=& │ │ │ │ -000fa800: 7175 6f74 3b74 6e73 3a53 6572 7669 6365 quot;tns:Service │ │ │ │ -000fa810: 506f 7274 5479 7065 2671 756f 743b 3c2f PortType">
    . │ │ │ │ -000fa830: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <SOAP:binding styl │ │ │ │ -000fa890: 653c 2f73 7061 6e3e 3d3c 7370 616e 2063 e="docum │ │ │ │ -000fa8c0: 656e 7426 7175 6f74 3b3c 2f73 7061 6e3e ent" │ │ │ │ -000fa8d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 transport │ │ │ │ -000fa8f0: 3c2f 7370 616e 3e3d 3c73 7061 6e20 636c ="http:/ │ │ │ │ -000fa920: 2f73 6368 656d 6173 2e78 6d6c 736f 6170 /schemas.xmlsoap │ │ │ │ -000fa930: 2e6f 7267 2f73 6f61 702f 6874 7470 2671 .org/soap/http&q │ │ │ │ -000fa940: 756f 743b 3c2f 7370 616e 3e2f 2667 743b uot;/> │ │ │ │ -000fa950: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    << │ │ │ │ -000fa970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000fa980: 6f72 6474 7970 6522 3e6f 7065 7261 7469 ordtype">operati │ │ │ │ -000fa990: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on │ │ │ │ -000fa9b0: 6e61 6d65 3c2f 7370 616e 3e3d 3c73 7061 name="we │ │ │ │ -000fa9e0: 626d 6574 686f 6426 7175 6f74 3b3c 2f73 bmethod">
    .< │ │ │ │ -000faa00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000faa10: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <SOAP:operatio │ │ │ │ -000faa40: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n s │ │ │ │ -000faa60: 6f61 7041 6374 696f 6e3c 2f73 7061 6e3e oapAction │ │ │ │ -000faa70: 3d3c 7370 616e 2063 6c61 7373 3d22 7374 =&qu │ │ │ │ -000faa90: 6f74 3b26 7175 6f74 3b3c 2f73 7061 6e3e ot;" │ │ │ │ -000faaa0: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
    .
    │ │ │ │ -000faac0: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ -000faae0: 696e 7075 743c 2f73 7061 6e3e 2667 743b input> │ │ │ │ -000faaf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -000fab10: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP:body use=& │ │ │ │ -000fab80: 7175 6f74 3b6c 6974 6572 616c 2671 756f quot;literal&quo │ │ │ │ -000fab90: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; │ │ │ │ -000fabb0: 7061 7274 733c 2f73 7061 6e3e 3d3c 7370 parts="B │ │ │ │ -000fabe0: 6f64 7926 7175 6f74 3b3c 2f73 7061 6e3e ody" │ │ │ │ -000fabf0: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
    .
    │ │ │ │ -000fac10: 2020 2020 2020 2020 266c 743b 3c73 7061 <SOAP:heade │ │ │ │ -000fac40: 723c 2f73 7061 6e3e 203c 7370 616e 2063 r u │ │ │ │ -000fac60: 7365 3c2f 7370 616e 3e3d 3c73 7061 6e20 se="lite │ │ │ │ -000fac90: 7261 6c26 7175 6f74 3b3c 2f73 7061 6e3e ral" │ │ │ │ -000faca0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 message="tns:Serv │ │ │ │ -000facf0: 6963 6548 6561 6465 7226 7175 6f74 3b3c iceHeader"< │ │ │ │ -000fad00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> par │ │ │ │ -000fad20: 743c 2f73 7061 6e3e 3d3c 7370 616e 2063 t="trans │ │ │ │ -000fad50: 6163 7469 6f6e 2671 756f 743b 3c2f 7370 action"/>
    .< │ │ │ │ -000fad70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000fad80: 3e20 2020 2026 6c74 3b2f 3c73 7061 6e20 > </input │ │ │ │ -000fadb0: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    │ │ │ │ -000fadd0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <o │ │ │ │ -000fadf0: 7574 7075 743c 2f73 7061 6e3e 2667 743b utput> │ │ │ │ -000fae00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -000fae20: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP:body use=& │ │ │ │ -000fae90: 7175 6f74 3b6c 6974 6572 616c 2671 756f quot;literal&quo │ │ │ │ -000faea0: 743b 3c2f 7370 616e 3e20 3c73 7061 6e20 t; │ │ │ │ -000faec0: 7061 7274 733c 2f73 7061 6e3e 3d3c 7370 parts="B │ │ │ │ -000faef0: 6f64 7926 7175 6f74 3b3c 2f73 7061 6e3e ody" │ │ │ │ -000faf00: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
    .
    │ │ │ │ -000faf20: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </output&g │ │ │ │ -000faf50: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    < │ │ │ │ -000faf70: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/oper │ │ │ │ -000faf90: 6174 696f 6e3c 2f73 7061 6e3e 2667 743b ation> │ │ │ │ -000fafa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </binding< │ │ │ │ -000fafe0: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    │ │ │ │ -000faff0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    < │ │ │ │ -000fb010: 703e 4c69 6b65 7769 7365 2c20 796f 7520 p>Likewise, you │ │ │ │ -000fb020: 6361 6e20 7370 6563 6966 7920 7468 6174 can specify that │ │ │ │ -000fb030: 2062 6f74 6820 696e 7075 7420 616e 6420 both input and │ │ │ │ -000fb040: 6f75 7470 7574 206d 6573 7361 6765 7320 output messages │ │ │ │ -000fb050: 6861 7665 2074 6865 2073 616d 6520 6865 have the same he │ │ │ │ -000fb060: 6164 6572 2077 6974 6820 3c63 6f64 653e ader with │ │ │ │ -000fb070: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi │ │ │ │ -000fb080: 6365 206d 6574 686f 642d 6865 6164 6572 ce method-header │ │ │ │ -000fb090: 2d70 6172 743a 3c2f 636f 6465 3e20 6f72 -part: or │ │ │ │ -000fb0a0: 2074 6865 206f 7574 7075 7420 6d65 7373 the output mess │ │ │ │ -000fb0b0: 6167 6520 6861 7320 6120 6865 6164 6572 age has a header │ │ │ │ -000fb0c0: 2077 6974 6820 3c63 6f64 653e 2f2f 6773 with //gs │ │ │ │ -000fb0d0: 6f61 7020 6e73 2073 6572 7669 6365 206d oap ns service m │ │ │ │ -000fb0e0: 6574 686f 642d 6f75 7470 7574 2d68 6561 ethod-output-hea │ │ │ │ -000fb0f0: 6465 722d 7061 7274 3a3c 2f63 6f64 653e der-part: │ │ │ │ -000fb100: 2e20 4d75 6c74 6970 6c65 2068 6561 6465 . Multiple heade │ │ │ │ -000fb110: 7273 2063 616e 2062 6520 7370 6563 6966 rs can be specif │ │ │ │ -000fb120: 6965 6420 7468 6973 2077 6179 2e3c 2f70 ied this way.

    .

    To set up a │ │ │ │ -000fb140: 2053 4f41 5020 4865 6164 6572 2061 7420 SOAP Header at │ │ │ │ -000fb150: 7468 6520 636c 6965 6e74 2073 6964 6520 the client side │ │ │ │ -000fb160: 7468 6174 2063 6f6e 7461 696e 7320 7468 that contains th │ │ │ │ -000fb170: 6520 3c63 6f64 653e 745f 5f74 7261 6e73 e t__trans │ │ │ │ -000fb180: 6163 7469 6f6e 3c2f 636f 6465 3e20 6d65 action me │ │ │ │ -000fb190: 6d62 6572 3a3c 2f70 3e0a 3c64 6976 2063 mber:

    .
    │ │ │ │ -000fb1b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -000fb1e0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -000fb210: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -000fb240: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so │ │ │ │ -000fb2a0: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
    ... //
    │ │ │ │ -000fb2f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.head │ │ │ │ -000fb380: 6572 3c2f 613e 203d 204e 554c 4c3b 203c er = NULL; < │ │ │ │ -000fb390: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -000fb3a0: 656e 7422 3e2f 2f20 6572 6173 6520 616e ent">// erase an │ │ │ │ -000fb3b0: 7920 534f 4150 2048 6561 6465 7220 7765 y SOAP Header we │ │ │ │ -000fb3c0: 2068 6176 6520 736f 2066 6172 3c2f 7370 have so far
    .
    │ │ │ │ -000fb440: 736f 6170 5f68 6561 6465 723c 2f61 3e28 soap_header( │ │ │ │ -000fb450: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -000fb480: 3b20 203c 7370 616e 2063 6c61 7373 3d22 ; // allo │ │ │ │ -000fb4a0: 6361 7465 2061 6e64 2069 6e69 7469 616c cate and initial │ │ │ │ -000fb4b0: 697a 6520 6120 6e65 7720 534f 4150 2048 ize a new SOAP H │ │ │ │ -000fb4c0: 6561 6465 723c 2f73 7061 6e3e 3c2f 6469 eader.
    soap │ │ │ │ -000fb510: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->header-> │ │ │ │ -000fb570: 3b74 5f5f 7472 616e 7361 6374 696f 6e20 ;t__transaction │ │ │ │ -000fb580: 3d20 736f 6170 5f6e 6577 5f74 5f5f 7472 = soap_new_t__tr │ │ │ │ -000fb590: 616e 7361 6374 696f 6e28 3c61 2063 6c61 ansaction(soap, -1);< │ │ │ │ -000fb5d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ -000fb610: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->header- │ │ │ │ -000fb670: 2667 743b 745f 5f74 7261 6e73 6163 7469 >t__transacti │ │ │ │ -000fb680: 6f6e 2d26 6774 3b6e 756d 6265 7220 3d20 on->number = │ │ │ │ -000fb690: 6e75 6d3b 3c2f 6469 763e 0a3c 6469 7620 num;
    .
    soap-> │ │ │ │ -000fb6e0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;header │ │ │ │ -000fb730: 3c2f 613e 2d26 6774 3b74 5f5f 7472 616e ->t__tran │ │ │ │ -000fb740: 7361 6374 696f 6e2d 2667 743b 6465 7363 saction->desc │ │ │ │ -000fb750: 7269 7074 696f 6e20 3d20 3c73 7061 6e20 ription = "Tran │ │ │ │ -000fb780: 7361 6374 696f 6e61 6c20 6461 7461 2671 sactional data&q │ │ │ │ -000fb790: 756f 743b 3c2f 7370 616e 3e3b 3c2f 6469 uot;;.
    i │ │ │ │ -000fb7d0: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c │ │ │ │ -000fb7e0: 616c 6c5f 7765 626d 6574 686f 6428 3c61 all_webmethod(soap, < │ │ │ │ -000fb820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -000fb830: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -000fb840: 6874 6d6c 2361 6564 3162 3836 6238 6133 html#aed1b86b8a3 │ │ │ │ -000fb850: 3461 6561 3836 3130 3337 3531 6139 3332 4aea86103751a932 │ │ │ │ -000fb860: 6339 6463 6539 223e 656e 6470 6f69 6e74 c9dce9">endpoint │ │ │ │ -000fb870: 3c2f 613e 2c20 4e55 4c4c 2c20 2e2e 2e29 , NULL, ...) │ │ │ │ -000fb880: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    ... │ │ │ │ -000fb8a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    .
    s │ │ │ │ -000fb990: 7472 7563 7420 534f 4150 5f45 4e56 5f5f truct SOAP_ENV__ │ │ │ │ -000fb9a0: 4865 6164 6572 202a 2068 6561 6465 723c Header * header< │ │ │ │ -000fb9b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    The soap │ │ │ │ -000fb9d0: 3a3a 6865 6164 6572 2070 6f69 6e74 7320 ::header points │ │ │ │ -000fb9e0: 746f 2061 2053 4f41 505f 454e 565f 5f48 to a SOAP_ENV__H │ │ │ │ -000fb9f0: 6561 6465 7220 7374 7275 6374 7572 6520 eader structure │ │ │ │ -000fba00: 7769 7468 2074 6865 2053 4f41 5020 4865 with the SOAP He │ │ │ │ -000fba10: 6164 6572 2074 6861 7420 7761 7320 7265 ader that was re │ │ │ │ -000fba20: 6365 6976 6564 206f 7220 7468 612e 2e2e ceived or tha... │ │ │ │ -000fba30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -000fba50: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -000fba60: 6f61 7032 2e68 3a32 3935 353c 2f64 6976 oap2.h:2955
    .
    < │ │ │ │ -000fba90: 703e 5468 6520 534f 4150 2057 6562 2073 p>The SOAP Web s │ │ │ │ -000fbaa0: 6572 7669 6365 2072 6571 7565 7374 2069 ervice request i │ │ │ │ -000fbab0: 6e63 6c75 6465 7320 7468 6520 534f 4150 ncludes the SOAP │ │ │ │ -000fbac0: 2048 6561 6465 7220 7769 7468 2074 6865 Header with the │ │ │ │ -000fbad0: 2074 7261 6e73 6163 7469 6f6e 2064 6174 transaction dat │ │ │ │ -000fbae0: 613a 3c2f 703e 0a3c 6469 7620 636c 6173 a:

    .
    < │ │ │ │ -000fbb10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000fbb20: 3e26 6c74 3b3c 7370 616e 2063 6c61 7373 ><S │ │ │ │ -000fbb40: 4f41 502d 454e 563a 456e 7665 6c6f 7065 OAP-ENV:Envelope │ │ │ │ -000fbb50: 3c2f 7370 616e 3e20 2e2e 2e26 6774 3b20 ...> │ │ │ │ -000fbb60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    << │ │ │ │ -000fbb80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -000fbb90: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype">SOAP-EN │ │ │ │ -000fbba0: 563a 4865 6164 6572 3c2f 7370 616e 3e26 V:Header& │ │ │ │ -000fbbb0: 6774 3b20 3c2f 6469 763e 0a3c 6469 7620 gt;
    .
    │ │ │ │ -000fbbd0: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <t │ │ │ │ -000fbbf0: 3a74 7261 6e73 6163 7469 6f6e 3c2f 7370 :transaction SOAP-E │ │ │ │ -000fbc20: 4e56 3a6d 7573 7455 6e64 6572 7374 616e NV:mustUnderstan │ │ │ │ -000fbc30: 643c 2f73 7061 6e3e 3d3c 7370 616e 2063 d="true& │ │ │ │ -000fbc60: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;> │ │ │ │ -000fbc70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    & │ │ │ │ -000fbc90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;num │ │ │ │ -000fbcb0: 6265 723c 2f73 7061 6e3e 2667 743b 3132 ber>12 │ │ │ │ -000fbcc0: 3334 3526 6c74 3b2f 3c73 7061 6e20 636c 345</number& │ │ │ │ -000fbcf0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    │ │ │ │ -000fbd10: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ -000fbd30: 6465 7363 7269 7074 696f 6e3c 2f73 7061 description>Tran │ │ │ │ -000fbd60: 7361 6374 696f 6e61 6c3c 2f73 7061 6e3e sactional │ │ │ │ -000fbd70: 203c 7370 616e 2063 6c61 7373 3d22 6b65 data</description>
    . │ │ │ │ -000fbde0: 2020 2020 266c 743b 2f3c 7370 616e 2063 </t:transaction │ │ │ │ -000fbe10: 3c2f 7370 616e 3e26 6774 3b20 3c2f 6469 > .
    </SOAP-ENV:H │ │ │ │ -000fbe60: 6561 6465 723c 2f73 7061 6e3e 2667 743b eader> │ │ │ │ -000fbe70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    < │ │ │ │ -000fbe90: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E │ │ │ │ -000fbeb0: 4e56 3a42 6f64 793c 2f73 7061 6e3e 2667 NV:Body&g │ │ │ │ -000fbec0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    │ │ │ │ -000fbee0: 266c 743b 3c73 7061 6e20 636c 6173 733d <ns │ │ │ │ -000fbf00: 3a77 6562 6d65 7468 6f64 3c2f 7370 616e :webmethod>
    .
    │ │ │ │ -000fbf30: 2020 2020 2e2e 2e3c 2f64 6976 3e0a 3c64 ...
    . │ │ │ │ -000fbf50: 2020 2020 266c 743b 2f3c 7370 616e 2063 </ns:webmethod< │ │ │ │ -000fbf80: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    │ │ │ │ -000fbf90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </SOAP-ENV:Bod │ │ │ │ -000fbfd0: 793c 2f73 7061 6e3e 2667 743b 203c 2f64 y> .
    </SOAP-ENV:En │ │ │ │ -000fc020: 7665 6c6f 7065 3c2f 7370 616e 3e26 6774 velope> │ │ │ │ -000fc030: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    │ │ │ │ -000fc050: 3c2f 6469 763e 3c70 3e41 7420 7468 6520

    At the │ │ │ │ -000fc060: 7265 6365 6976 696e 6720 7369 6465 2c20 receiving side, │ │ │ │ -000fc070: 6120 534f 4150 2048 6561 6465 7220 6361 a SOAP Header ca │ │ │ │ -000fc080: 6e20 6265 2069 6e73 7065 6374 6564 2062 n be inspected b │ │ │ │ -000fc090: 7920 6368 6563 6b69 6e67 2066 6f72 2061 y checking for a │ │ │ │ -000fc0a0: 206e 6f6e 2d4e 554c 4c20 3c63 6f64 653e non-NULL │ │ │ │ -000fc0b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::he │ │ │ │ -000fc170: 6164 6572 3c2f 613e 3c2f 636f 6465 3e2e ader. │ │ │ │ -000fc180: 3c2f 703e 0a3c 646c 2063 6c61 7373 3d22

    .
    Warning
    When SOAP H │ │ │ │ -000fc1c0: 6561 6465 7273 2061 7265 2075 7365 642c eaders are used, │ │ │ │ -000fc1d0: 2079 6f75 206d 7573 7420 6d61 6b65 2073 you must make s │ │ │ │ -000fc1e0: 7572 6520 746f 2073 6574 203c 636f 6465 ure to set soap::h │ │ │ │ -000fc2b0: 6561 6465 723c 2f61 3e3c 2f63 6f64 653e eader │ │ │ │ -000fc2c0: 2074 6f20 4e55 4c4c 2077 6865 6e20 6e6f to NULL when no │ │ │ │ -000fc2d0: 2053 4f41 5020 4865 6164 6572 2073 686f SOAP Header sho │ │ │ │ -000fc2e0: 756c 6420 6265 2073 656e 742c 206f 7468 uld be sent, oth │ │ │ │ -000fc2f0: 6572 7769 7365 2061 6e79 2053 4f41 5020 erwise any SOAP │ │ │ │ -000fc300: 4865 6164 6572 7320 6375 7272 656e 746c Headers currentl │ │ │ │ -000fc310: 7920 7072 6573 656e 7420 696e 2074 6865 y present in the │ │ │ │ -000fc320: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV__Head │ │ │ │ -000fc390: 6572 3c2f 613e 3c2f 636f 6465 3e20 7374 er st │ │ │ │ -000fc3a0: 7275 6374 2070 6f69 6e74 6564 2074 6f20 ruct pointed to │ │ │ │ -000fc3b0: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap::header will be │ │ │ │ -000fc490: 2069 6e63 6c75 6465 6420 696e 2074 6865 included in the │ │ │ │ -000fc4a0: 206d 6573 7361 6765 2e3c 2f64 643e 3c2f message.
    .

    At the cl │ │ │ │ -000fc4c0: 6965 6e74 2073 6964 652c 2074 6865 203c ient side, the < │ │ │ │ -000fc4d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -000fc590: 703a 3a61 6374 6f72 3c2f 613e 3c2f 636f p::actor string varia │ │ │ │ -000fc5b0: 626c 6520 6361 6e20 6265 2073 6574 2074 ble can be set t │ │ │ │ -000fc5c0: 6f20 7365 7420 7468 6520 534f 4150 203c o set the SOAP < │ │ │ │ -000fc5d0: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN │ │ │ │ -000fc5e0: 563a 6163 746f 723c 2f63 6f64 653e 3c2f V:actor attribute. T │ │ │ │ -000fc600: 6865 203c 656d 3e3c 636f 6465 3e53 4f41 he SOA │ │ │ │ -000fc610: 502d 454e 563a 6d75 7374 556e 6465 7273 P-ENV:mustUnders │ │ │ │ -000fc620: 7461 6e64 3d22 7472 7565 223c 2f63 6f64 tand="true" attribut │ │ │ │ -000fc640: 6520 7468 656e 2069 6e64 6963 6174 6573 e then indicates │ │ │ │ -000fc650: 2074 6865 2072 6571 7569 7265 6d65 6e74 the requirement │ │ │ │ -000fc660: 2074 6861 7420 7468 6520 7265 6369 7069 that the recipi │ │ │ │ -000fc670: 656e 7420 636f 7272 6573 706f 6e64 696e ent correspondin │ │ │ │ -000fc680: 6720 746f 2074 6865 203c 656d 3e3c 636f g to the SOAP-ENV:acto │ │ │ │ -000fc6a0: 723c 2f63 6f64 653e 3c2f 656d 3e20 6174 r at │ │ │ │ -000fc6b0: 7472 6962 7574 6520 7661 6c75 6520 6973 tribute value is │ │ │ │ -000fc6c0: 2072 6573 706f 6e73 6962 6c65 2074 6f20 responsible to │ │ │ │ -000fc6d0: 7072 6f63 6573 7320 7468 6520 534f 4150 process the SOAP │ │ │ │ -000fc6e0: 2048 6561 6465 7220 656c 656d 656e 742e Header element. │ │ │ │ -000fc6f0: 2054 6865 2064 6574 6169 6c73 206f 6620 The details of │ │ │ │ -000fc700: 7768 6963 6820 6361 6e20 6265 2066 6f75 which can be fou │ │ │ │ -000fc710: 6e64 2069 6e20 7468 6520 534f 4150 2031 nd in the SOAP 1 │ │ │ │ -000fc720: 2e31 2f31 2e32 2073 7065 6369 6669 6361 .1/1.2 specifica │ │ │ │ -000fc730: 7469 6f6e 7320 7468 6174 2074 6865 2067 tions that the g │ │ │ │ -000fc740: 534f 4150 2074 6f6f 6c73 2063 6f6e 666f SOAP tools confo │ │ │ │ -000fc750: 726d 2074 6f2e 3c2f 703e 0a3c 703e 5468 rm to.

    .

    Th │ │ │ │ -000fc760: 6520 534f 4150 2048 6561 6465 7220 7374 e SOAP Header st │ │ │ │ -000fc770: 7275 6374 7572 6520 3c63 6f64 653e 3c61 ructure SOAP_EN │ │ │ │ -000fc7e0: 565f 5f48 6561 6465 723c 2f61 3e3c 2f63 V__Header is declared │ │ │ │ -000fc800: 203c 636f 6465 3e6d 7574 6162 6c65 3c2f mutable, which mea │ │ │ │ -000fc820: 6e73 2074 6861 7420 7265 2d64 6563 6c61 ns that re-decla │ │ │ │ -000fc830: 7261 7469 6f6e 7320 6f66 2074 6865 2073 rations of the s │ │ │ │ -000fc840: 7472 7563 7475 7265 7320 6172 6520 7065 tructures are pe │ │ │ │ -000fc850: 726d 6974 7465 6420 616e 6420 6164 6469 rmitted and addi │ │ │ │ -000fc860: 7469 6f6e 616c 206d 656d 6265 7273 2061 tional members a │ │ │ │ -000fc870: 7265 2063 6f6c 6c65 6374 6564 2069 6e74 re collected int │ │ │ │ -000fc880: 6f20 6f6e 6520 6669 6e61 6c20 7374 7275 o one final stru │ │ │ │ -000fc890: 6374 7572 6520 6279 2074 6865 2073 6f61 cture by the soa │ │ │ │ -000fc8a0: 7063 7070 3220 746f 6f6c 2e3c 2f70 3e0a pcpp2 tool.

    . │ │ │ │ -000fc8b0: 3c70 3e46 6f72 2061 6e6f 7468 6572 2065

    For another e │ │ │ │ -000fc8c0: 7861 6d70 6c65 2c20 636f 6e73 6964 6572 xample, consider │ │ │ │ -000fc8d0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    .
    {< │ │ │ │ -000fc990: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *h__transactio │ │ │ │ -000fc9e0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    │ │ │ │ -000fca00: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct UserAuth *h_ │ │ │ │ -000fca30: 5f61 7574 6865 6e74 6963 6174 696f 6e3b _authentication; │ │ │ │ -000fca40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    };.

    Sup │ │ │ │ -000fca80: 706f 7365 206d 6574 686f 6420 3c63 6f64 pose method ns__login uses both hea │ │ │ │ -000fcab0: 6465 7220 7061 7274 7320 2861 7420 6d6f der parts (at mo │ │ │ │ -000fcac0: 7374 292c 2074 6865 6e20 7468 6973 2069 st), then this i │ │ │ │ -000fcad0: 7320 6465 636c 6172 6564 2061 733a 3c2f s declared as:.

    //gsoap ns serv │ │ │ │ -000fcb30: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade │ │ │ │ -000fcb40: 722d 7061 7274 3a20 6c6f 6769 6e20 685f r-part: login h_ │ │ │ │ -000fcb50: 5f74 7261 6e73 6163 7469 6f6e 203c 2f73 _transaction
    .
    //gsoap ns se │ │ │ │ -000fcba0: 7276 6963 6520 6d65 7468 6f64 2d68 6561 rvice method-hea │ │ │ │ -000fcbb0: 6465 722d 7061 7274 3a20 6c6f 6769 6e20 der-part: login │ │ │ │ -000fcbc0: 685f 5f61 7574 6865 6e74 6963 6174 696f h__authenticatio │ │ │ │ -000fcbd0: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    . │ │ │ │ -000fcbe0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ -000fcc10: 2f73 7061 6e3e 206e 735f 5f6c 6f67 696e /span> ns__login │ │ │ │ -000fcc20: 282e 2e2e 293b 3c2f 6469 763e 0a3c 2f64 (...);
    .

    Suppose m │ │ │ │ -000fcc50: 6574 686f 6420 3c63 6f64 653e 6e73 5f5f ethod ns__ │ │ │ │ -000fcc60: 7365 6172 6368 3c2f 636f 6465 3e20 7573 search us │ │ │ │ -000fcc70: 6573 206f 6e6c 7920 7468 6520 6669 7273 es only the firs │ │ │ │ -000fcc80: 7420 6865 6164 6572 2070 6172 742c 2074 t header part, t │ │ │ │ -000fcc90: 6865 6e20 7468 6973 2069 7320 6465 636c hen this is decl │ │ │ │ -000fcca0: 6172 6564 2061 733a 3c2f 703e 0a3c 6469 ared as:

    .
    //gso │ │ │ │ -000fccf0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me │ │ │ │ -000fcd00: 7468 6f64 2d68 6561 6465 722d 7061 7274 thod-header-part │ │ │ │ -000fcd10: 3a20 7365 6172 6368 2068 5f5f 7472 616e : search h__tran │ │ │ │ -000fcd20: 7361 6374 696f 6e20 3c2f 7370 616e 3e3c saction < │ │ │ │ -000fcd30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_ │ │ │ │ -000fcd70: 5f73 6561 7263 6828 2e2e 2e29 3b3c 2f64 _search(...);.

    No │ │ │ │ -000fcda0: 7465 2074 6861 7420 7468 6520 6d65 7468 te that the meth │ │ │ │ -000fcdb0: 6f64 206e 616d 6520 616e 6420 6865 6164 od name and head │ │ │ │ -000fcdc0: 6572 2070 6172 7420 6e61 6d65 7320 6d75 er part names mu │ │ │ │ -000fcdd0: 7374 2062 6520 6e61 6d65 7370 6163 6520 st be namespace │ │ │ │ -000fcde0: 7175 616c 6966 6965 642e 2054 6865 2068 qualified. The h │ │ │ │ -000fcdf0: 6561 6465 7273 206d 7573 7420 6265 2070 eaders must be p │ │ │ │ -000fce00: 7265 7365 6e74 2069 6e20 616c 6c20 6f70 resent in all op │ │ │ │ -000fce10: 6572 6174 696f 6e73 2074 6861 7420 6465 erations that de │ │ │ │ -000fce20: 636c 6172 6564 2074 6865 2068 6561 6465 clared the heade │ │ │ │ -000fce30: 7220 7061 7274 732e 3c2f 703e 0a3c 703e r parts.

    .

    │ │ │ │ -000fce40: 546f 2073 7065 6369 6679 2074 6865 2068 To specify the h │ │ │ │ -000fce50: 6561 6465 7220 7061 7274 7320 666f 7220 eader parts for │ │ │ │ -000fce60: 7468 6520 6d65 7468 6f64 2069 6e70 7574 the method input │ │ │ │ -000fce70: 2028 6d65 7468 6f64 2072 6571 7565 7374 (method request │ │ │ │ -000fce80: 206d 6573 7361 6765 292c 2075 7365 3a3c message), use:< │ │ │ │ -000fce90: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    //gsoap namesp │ │ │ │ -000fcee0: 6163 652d 7072 6566 6978 2073 6572 7669 ace-prefix servi │ │ │ │ -000fcef0: 6365 206d 6574 686f 642d 696e 7075 742d ce method-input- │ │ │ │ -000fcf00: 6865 6164 6572 2d70 6172 743a 206d 6574 header-part: met │ │ │ │ -000fcf10: 686f 642d 6e61 6d65 2068 6561 6465 722d hod-name header- │ │ │ │ -000fcf20: 7061 7274 3c2f 7370 616e 3e3c 2f64 6976 part
    .

    Simi │ │ │ │ -000fcf50: 6c61 726c 792c 2074 6f20 7370 6563 6966 larly, to specif │ │ │ │ -000fcf60: 7920 7468 6520 6865 6164 6572 2070 6172 y the header par │ │ │ │ -000fcf70: 7473 2066 6f72 2074 6865 206d 6574 686f ts for the metho │ │ │ │ -000fcf80: 6420 6f75 7470 7574 2028 6d65 7468 6f64 d output (method │ │ │ │ -000fcf90: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag │ │ │ │ -000fcfa0: 6529 2c20 7573 653a 3c2f 703e 0a3c 6469 e), use:

    .
    //gso │ │ │ │ -000fcff0: 6170 206e 616d 6573 7061 6365 2d70 7265 ap namespace-pre │ │ │ │ -000fd000: 6669 7820 7365 7276 6963 6520 6d65 7468 fix service meth │ │ │ │ -000fd010: 6f64 2d6f 7574 7075 742d 6865 6164 6572 od-output-header │ │ │ │ -000fd020: 2d70 6172 743a 206d 6574 686f 642d 6e61 -part: method-na │ │ │ │ -000fd030: 6d65 2068 6561 6465 722d 7061 7274 3c2f me header-part
    .

    The declar │ │ │ │ -000fd070: 6174 696f 6e73 206f 6e6c 7920 6166 6665 ations only affe │ │ │ │ -000fd080: 6374 2074 6865 2057 5344 4c2e 2046 6f72 ct the WSDL. For │ │ │ │ -000fd090: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

    .
    stru │ │ │ │ -000fd0e0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct SOAP_ENV │ │ │ │ -000fd130: 5f5f 4865 6164 6572 3c2f 613e 203c 2f64 __Header mustUn │ │ │ │ +000fa360: 6465 7273 7461 6e64 203c 7370 616e 2063 derstand s │ │ │ │ +000fa380: 7472 7563 7420 3c2f 7370 616e 3e74 5f5f truct t__ │ │ │ │ +000fa390: 7472 616e 7361 6374 696f 6e20 2a74 5f5f transaction *t__ │ │ │ │ +000fa3a0: 7472 616e 7361 6374 696f 6e3b 203c 2f64 transaction; .
    };
    .< │ │ │ │ +000fa3d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000fa3e0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ +000fa400: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ +000fa410: 2d69 6e70 7574 2d68 6561 6465 722d 7061 -input-header-pa │ │ │ │ +000fa420: 7274 3a20 7765 626d 6574 686f 6420 745f rt: webmethod t_ │ │ │ │ +000fa430: 5f74 7261 6e73 6163 7469 6f6e 3c2f 7370 _transaction
    .
    int │ │ │ │ +000fa480: 206e 735f 5f77 6562 6d65 7468 6f64 282e ns__webmethod(. │ │ │ │ +000fa490: 2e2e 293b 3c2f 6469 763e 0a3c 2f64 6976 ..);
    .
    < │ │ │ │ +000faff0: 2f64 6976 3e3c 703e 4c69 6b65 7769 7365 /div>

    Likewise │ │ │ │ +000fb000: 2c20 796f 7520 6361 6e20 7370 6563 6966 , you can specif │ │ │ │ +000fb010: 7920 7468 6174 2062 6f74 6820 696e 7075 y that both inpu │ │ │ │ +000fb020: 7420 616e 6420 6f75 7470 7574 206d 6573 t and output mes │ │ │ │ +000fb030: 7361 6765 7320 6861 7665 2074 6865 2073 sages have the s │ │ │ │ +000fb040: 616d 6520 6865 6164 6572 2077 6974 6820 ame header with │ │ │ │ +000fb050: 3c63 6f64 653e 2f2f 6773 6f61 7020 6e73 //gsoap ns │ │ │ │ +000fb060: 2073 6572 7669 6365 206d 6574 686f 642d service method- │ │ │ │ +000fb070: 6865 6164 6572 2d70 6172 743a 3c2f 636f header-part: or the outpu │ │ │ │ +000fb090: 7420 6d65 7373 6167 6520 6861 7320 6120 t message has a │ │ │ │ +000fb0a0: 6865 6164 6572 2077 6974 6820 3c63 6f64 header with //gsoap ns ser │ │ │ │ +000fb0c0: 7669 6365 206d 6574 686f 642d 6f75 7470 vice method-outp │ │ │ │ +000fb0d0: 7574 2d68 6561 6465 722d 7061 7274 3a3c ut-header-part:< │ │ │ │ +000fb0e0: 2f63 6f64 653e 2e20 4d75 6c74 6970 6c65 /code>. Multiple │ │ │ │ +000fb0f0: 2068 6561 6465 7273 2063 616e 2062 6520 headers can be │ │ │ │ +000fb100: 7370 6563 6966 6965 6420 7468 6973 2077 specified this w │ │ │ │ +000fb110: 6179 2e3c 2f70 3e0a 3c70 3e54 6f20 7365 ay.

    .

    To se │ │ │ │ +000fb120: 7420 7570 2061 2053 4f41 5020 4865 6164 t up a SOAP Head │ │ │ │ +000fb130: 6572 2061 7420 7468 6520 636c 6965 6e74 er at the client │ │ │ │ +000fb140: 2073 6964 6520 7468 6174 2063 6f6e 7461 side that conta │ │ │ │ +000fb150: 696e 7320 7468 6520 3c63 6f64 653e 745f ins the t_ │ │ │ │ +000fb160: 5f74 7261 6e73 6163 7469 6f6e 3c2f 636f _transaction member:

    . │ │ │ │ +000fb180: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ +000fb1c0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = < │ │ │ │ +000fb230: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000fb240: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +000fb250: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ +000fb260: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68 │ │ │ │ +000fb270: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498 │ │ │ │ +000fb280: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c">soap_new │ │ │ │ +000fb290: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    ... │ │ │ │ +000fb2b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ +000fb2d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +000fb310: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.header = N │ │ │ │ +000fb370: 554c 4c3b 203c 7370 616e 2063 6c61 7373 ULL; // er │ │ │ │ +000fb390: 6173 6520 616e 7920 534f 4150 2048 6561 ase any SOAP Hea │ │ │ │ +000fb3a0: 6465 7220 7765 2068 6176 6520 736f 2066 der we have so f │ │ │ │ +000fb3b0: 6172 3c2f 7370 616e 3e3c 2f64 6976 3e0a ar
    . │ │ │ │ +000fb3c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_heade │ │ │ │ +000fb430: 723c 2f61 3e28 3c61 2063 6c61 7373 3d22 r(soa │ │ │ │ +000fb460: 703c 2f61 3e29 3b20 203c 7370 616e 2063 p); / │ │ │ │ +000fb480: 2f20 616c 6c6f 6361 7465 2061 6e64 2069 / allocate and i │ │ │ │ +000fb490: 6e69 7469 616c 697a 6520 6120 6e65 7720 nitialize a new │ │ │ │ +000fb4a0: 534f 4150 2048 6561 6465 723c 2f73 7061 SOAP Header
    .
    soap->< │ │ │ │ +000fb500: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +000fb510: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +000fb520: 6874 6d6c 2361 6330 3931 6466 6534 6530 html#ac091dfe4e0 │ │ │ │ +000fb530: 3162 3661 3038 3264 3931 3663 3338 3165 1b6a082d916c381e │ │ │ │ +000fb540: 3730 3036 6261 223e 6865 6164 6572 3c2f 7006ba">header->t__transa │ │ │ │ +000fb560: 6374 696f 6e20 3d20 736f 6170 5f6e 6577 ction = soap_new │ │ │ │ +000fb570: 5f74 5f5f 7472 616e 7361 6374 696f 6e28 _t__transaction( │ │ │ │ +000fb580: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +000fb5b0: 202d 3129 3b3c 2f64 6976 3e0a 3c64 6976 -1);
    .
    soap-&g │ │ │ │ +000fb600: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;heade │ │ │ │ +000fb650: 723c 2f61 3e2d 2667 743b 745f 5f74 7261 r->t__tra │ │ │ │ +000fb660: 6e73 6163 7469 6f6e 2d26 6774 3b6e 756d nsaction->num │ │ │ │ +000fb670: 6265 7220 3d20 6e75 6d3b 3c2f 6469 763e ber = num;
    │ │ │ │ +000fb680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap-> │ │ │ │ +000fb710: 6865 6164 6572 3c2f 613e 2d26 6774 3b74 header->t │ │ │ │ +000fb720: 5f5f 7472 616e 7361 6374 696f 6e2d 2667 __transaction-&g │ │ │ │ +000fb730: 743b 6465 7363 7269 7074 696f 6e20 3d20 t;description = │ │ │ │ +000fb740: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +000fb760: 743b 5472 616e 7361 6374 696f 6e61 6c20 t;Transactional │ │ │ │ +000fb770: 6461 7461 2671 756f 743b 3c2f 7370 616e data";
    .
    if ( │ │ │ │ +000fb7c0: 736f 6170 5f63 616c 6c5f 7765 626d 6574 soap_call_webmet │ │ │ │ +000fb7d0: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap< │ │ │ │ +000fb800: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, en │ │ │ │ +000fb850: 6470 6f69 6e74 3c2f 613e 2c20 4e55 4c4c dpoint, NULL │ │ │ │ +000fb860: 2c20 2e2e 2e29 293c 2f64 6976 3e0a 3c64 , ...))
    . │ │ │ │ +000fb880: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e │ │ │ │ +000fb8a0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror
    .
    < │ │ │ │ +000fb910: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ +000fb920: 6170 2e68 746d 6c23 6163 3039 3164 6665 ap.html#ac091dfe │ │ │ │ +000fb930: 3465 3031 6236 6130 3832 6439 3136 6333 4e01b6a082d916c3 │ │ │ │ +000fb940: 3831 6537 3030 3662 6122 3e73 6f61 703a 81e7006ba">soap: │ │ │ │ +000fb950: 3a68 6561 6465 723c 2f61 3e3c 2f64 6976 :header
    struct SOAP │ │ │ │ +000fb980: 5f45 4e56 5f5f 4865 6164 6572 202a 2068 _ENV__Header * h │ │ │ │ +000fb990: 6561 6465 723c 2f64 6976 3e3c 6469 7620 eader
    Th │ │ │ │ +000fb9b0: 6520 736f 6170 3a3a 6865 6164 6572 2070 e soap::header p │ │ │ │ +000fb9c0: 6f69 6e74 7320 746f 2061 2053 4f41 505f oints to a SOAP_ │ │ │ │ +000fb9d0: 454e 565f 5f48 6561 6465 7220 7374 7275 ENV__Header stru │ │ │ │ +000fb9e0: 6374 7572 6520 7769 7468 2074 6865 2053 cture with the S │ │ │ │ +000fb9f0: 4f41 5020 4865 6164 6572 2074 6861 7420 OAP Header that │ │ │ │ +000fba00: 7761 7320 7265 6365 6976 6564 206f 7220 was received or │ │ │ │ +000fba10: 7468 612e 2e2e 3c2f 6469 763e 3c64 6976 tha...
    < │ │ │ │ +000fba30: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:295 │ │ │ │ +000fba50: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 5
    .

    The SOAP │ │ │ │ +000fba80: 2057 6562 2073 6572 7669 6365 2072 6571 Web service req │ │ │ │ +000fba90: 7565 7374 2069 6e63 6c75 6465 7320 7468 uest includes th │ │ │ │ +000fbaa0: 6520 534f 4150 2048 6561 6465 7220 7769 e SOAP Header wi │ │ │ │ +000fbab0: 7468 2074 6865 2074 7261 6e73 6163 7469 th the transacti │ │ │ │ +000fbac0: 6f6e 2064 6174 613a 3c2f 703e 0a3c 6469 on data:

    . < │ │ │ │ +000fbae0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +000fbaf0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    <SOAP-ENV:En │ │ │ │ +000fbb30: 7665 6c6f 7065 3c2f 7370 616e 3e20 2e2e velope .. │ │ │ │ +000fbb40: 2e26 6774 3b20 3c2f 6469 763e 0a3c 6469 .>
    . │ │ │ │ +000fbb60: 2026 6c74 3b3c 7370 616e 2063 6c61 7373 <S │ │ │ │ +000fbb80: 4f41 502d 454e 563a 4865 6164 6572 3c2f OAP-ENV:Header>
    │ │ │ │ +000fbba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    <t:transacti │ │ │ │ +000fbbe0: 6f6e 3c2f 7370 616e 3e20 3c73 7061 6e20 on │ │ │ │ +000fbc00: 534f 4150 2d45 4e56 3a6d 7573 7455 6e64 SOAP-ENV:mustUnd │ │ │ │ +000fbc10: 6572 7374 616e 643c 2f73 7061 6e3e 3d3c erstand=< │ │ │ │ +000fbc20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +000fbc30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +000fbc40: 3b74 7275 6526 7175 6f74 3b3c 2f73 7061 ;true">
    . │ │ │ │ +000fbc70: 2020 2020 2026 6c74 3b3c 7370 616e 2063 <number │ │ │ │ +000fbca0: 2667 743b 3132 3334 3526 6c74 3b2f 3c73 >12345</number>
    . │ │ │ │ +000fbce0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <descriptio │ │ │ │ +000fbd20: 6e3c 2f73 7061 6e3e 2667 743b 3c73 7061 n>Transactional< │ │ │ │ +000fbd50: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> dat │ │ │ │ +000fbd70: 613c 2f73 7061 6e3e 266c 743b 2f3c 7370 a</descripti │ │ │ │ +000fbda0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
    </< │ │ │ │ +000fbdd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000fbde0: 6f72 6474 7970 6522 3e74 3a74 7261 6e73 ordtype">t:trans │ │ │ │ +000fbdf0: 6163 7469 6f6e 3c2f 7370 616e 3e26 6774 action> │ │ │ │ +000fbe00: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ +000fbe20: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/SOAP │ │ │ │ +000fbe40: 2d45 4e56 3a48 6561 6465 723c 2f73 7061 -ENV:Header>
    . │ │ │ │ +000fbe70: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ +000fbe90: 534f 4150 2d45 4e56 3a42 6f64 793c 2f73 SOAP-ENV:Body
    >
    . │ │ │ │ +000fbeb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <ns:webmethod │ │ │ │ +000fbef0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >
    .
    ....
    </< │ │ │ │ +000fbf40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +000fbf50: 6f72 6474 7970 6522 3e6e 733a 7765 626d ordtype">ns:webm │ │ │ │ +000fbf60: 6574 686f 643c 2f73 7061 6e3e 2667 743b ethod> │ │ │ │ +000fbf70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </ │ │ │ │ +000fbf90: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E │ │ │ │ +000fbfb0: 4e56 3a42 6f64 793c 2f73 7061 6e3e 2667 NV:Body&g │ │ │ │ +000fbfc0: 743b 203c 2f64 6976 3e0a 3c64 6976 2063 t;
    .
    < │ │ │ │ +000fbfe0: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /SOAP- │ │ │ │ +000fc000: 454e 563a 456e 7665 6c6f 7065 3c2f 7370 ENV:Envelope>
    .

    A │ │ │ │ +000fc040: 7420 7468 6520 7265 6365 6976 696e 6720 t the receiving │ │ │ │ +000fc050: 7369 6465 2c20 6120 534f 4150 2048 6561 side, a SOAP Hea │ │ │ │ +000fc060: 6465 7220 6361 6e20 6265 2069 6e73 7065 der can be inspe │ │ │ │ +000fc070: 6374 6564 2062 7920 6368 6563 6b69 6e67 cted by checking │ │ │ │ +000fc080: 2066 6f72 2061 206e 6f6e 2d4e 554c 4c20 for a non-NULL │ │ │ │ +000fc090: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +000fc150: 6170 3a3a 6865 6164 6572 3c2f 613e 3c2f ap::header.

    .
    Warni │ │ │ │ +000fc190: 6e67 3c2f 6474 3e3c 6464 3e57 6865 6e20 ng
    When │ │ │ │ +000fc1a0: 534f 4150 2048 6561 6465 7273 2061 7265 SOAP Headers are │ │ │ │ +000fc1b0: 2075 7365 642c 2079 6f75 206d 7573 7420 used, you must │ │ │ │ +000fc1c0: 6d61 6b65 2073 7572 6520 746f 2073 6574 make sure to set │ │ │ │ +000fc1d0: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +000fc290: 6f61 703a 3a68 6561 6465 723c 2f61 3e3c oap::header< │ │ │ │ +000fc2a0: 2f63 6f64 653e 2074 6f20 4e55 4c4c 2077 /code> to NULL w │ │ │ │ +000fc2b0: 6865 6e20 6e6f 2053 4f41 5020 4865 6164 hen no SOAP Head │ │ │ │ +000fc2c0: 6572 2073 686f 756c 6420 6265 2073 656e er should be sen │ │ │ │ +000fc2d0: 742c 206f 7468 6572 7769 7365 2061 6e79 t, otherwise any │ │ │ │ +000fc2e0: 2053 4f41 5020 4865 6164 6572 7320 6375 SOAP Headers cu │ │ │ │ +000fc2f0: 7272 656e 746c 7920 7072 6573 656e 7420 rrently present │ │ │ │ +000fc300: 696e 2074 6865 203c 636f 6465 3e3c 6120 in the SOAP_ENV │ │ │ │ +000fc370: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header struct point │ │ │ │ +000fc390: 6564 2074 6f20 6279 203c 636f 6465 3e3c ed to by < │ │ │ │ +000fc3a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +000fc3b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +000fc3c0: 6d6c 2361 6330 3931 6466 6534 6530 3162 ml#ac091dfe4e01b │ │ │ │ +000fc3d0: 3661 3038 3264 3931 3663 3338 3165 3730 6a082d916c381e70 │ │ │ │ +000fc3e0: 3036 6261 2220 7469 746c 653d 2254 6865 06ba" title="The │ │ │ │ +000fc3f0: 2073 6f61 703a 3a68 6561 6465 7220 706f soap::header po │ │ │ │ +000fc400: 696e 7473 2074 6f20 6120 534f 4150 5f45 ints to a SOAP_E │ │ │ │ +000fc410: 4e56 5f5f 4865 6164 6572 2073 7472 7563 NV__Header struc │ │ │ │ +000fc420: 7475 7265 2077 6974 6820 7468 6520 534f ture with the SO │ │ │ │ +000fc430: 4150 2048 6561 6465 7220 7468 6174 2077 AP Header that w │ │ │ │ +000fc440: 6173 2072 6563 6569 7665 6420 6f72 2074 as received or t │ │ │ │ +000fc450: 6861 2e2e 2e22 3e73 6f61 703a 3a68 6561 ha...">soap::hea │ │ │ │ +000fc460: 6465 723c 2f61 3e3c 2f63 6f64 653e 2077 der w │ │ │ │ +000fc470: 696c 6c20 6265 2069 6e63 6c75 6465 6420 ill be included │ │ │ │ +000fc480: 696e 2074 6865 206d 6573 7361 6765 2e3c in the message.< │ │ │ │ +000fc490: 2f64 643e 3c2f 646c 3e0a 3c70 3e41 7420 /dd>
    .

    At │ │ │ │ +000fc4a0: 7468 6520 636c 6965 6e74 2073 6964 652c the client side, │ │ │ │ +000fc4b0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::actor string │ │ │ │ +000fc590: 2076 6172 6961 626c 6520 6361 6e20 6265 variable can be │ │ │ │ +000fc5a0: 2073 6574 2074 6f20 7365 7420 7468 6520 set to set the │ │ │ │ +000fc5b0: 534f 4150 203c 656d 3e3c 636f 6465 3e53 SOAP S │ │ │ │ +000fc5c0: 4f41 502d 454e 563a 6163 746f 723c 2f63 OAP-ENV:actor attrib │ │ │ │ +000fc5e0: 7574 652e 2054 6865 203c 656d 3e3c 636f ute. The SOAP-ENV:must │ │ │ │ +000fc600: 556e 6465 7273 7461 6e64 3d22 7472 7565 Understand="true │ │ │ │ +000fc610: 223c 2f63 6f64 653e 3c2f 656d 3e20 6174 " at │ │ │ │ +000fc620: 7472 6962 7574 6520 7468 656e 2069 6e64 tribute then ind │ │ │ │ +000fc630: 6963 6174 6573 2074 6865 2072 6571 7569 icates the requi │ │ │ │ +000fc640: 7265 6d65 6e74 2074 6861 7420 7468 6520 rement that the │ │ │ │ +000fc650: 7265 6369 7069 656e 7420 636f 7272 6573 recipient corres │ │ │ │ +000fc660: 706f 6e64 696e 6720 746f 2074 6865 203c ponding to the < │ │ │ │ +000fc670: 656d 3e3c 636f 6465 3e53 4f41 502d 454e em>SOAP-EN │ │ │ │ +000fc680: 563a 6163 746f 723c 2f63 6f64 653e 3c2f V:actor attribute va │ │ │ │ +000fc6a0: 6c75 6520 6973 2072 6573 706f 6e73 6962 lue is responsib │ │ │ │ +000fc6b0: 6c65 2074 6f20 7072 6f63 6573 7320 7468 le to process th │ │ │ │ +000fc6c0: 6520 534f 4150 2048 6561 6465 7220 656c e SOAP Header el │ │ │ │ +000fc6d0: 656d 656e 742e 2054 6865 2064 6574 6169 ement. The detai │ │ │ │ +000fc6e0: 6c73 206f 6620 7768 6963 6820 6361 6e20 ls of which can │ │ │ │ +000fc6f0: 6265 2066 6f75 6e64 2069 6e20 7468 6520 be found in the │ │ │ │ +000fc700: 534f 4150 2031 2e31 2f31 2e32 2073 7065 SOAP 1.1/1.2 spe │ │ │ │ +000fc710: 6369 6669 6361 7469 6f6e 7320 7468 6174 cifications that │ │ │ │ +000fc720: 2074 6865 2067 534f 4150 2074 6f6f 6c73 the gSOAP tools │ │ │ │ +000fc730: 2063 6f6e 666f 726d 2074 6f2e 3c2f 703e conform to.

    │ │ │ │ +000fc740: 0a3c 703e 5468 6520 534f 4150 2048 6561 .

    The SOAP Hea │ │ │ │ +000fc750: 6465 7220 7374 7275 6374 7572 6520 3c63 der structure S │ │ │ │ +000fc7c0: 4f41 505f 454e 565f 5f48 6561 6465 723c OAP_ENV__Header< │ │ │ │ +000fc7d0: 2f61 3e3c 2f63 6f64 653e 2069 7320 6465 /a> is de │ │ │ │ +000fc7e0: 636c 6172 6564 203c 636f 6465 3e6d 7574 clared mut │ │ │ │ +000fc7f0: 6162 6c65 3c2f 636f 6465 3e2c 2077 6869 able, whi │ │ │ │ +000fc800: 6368 206d 6561 6e73 2074 6861 7420 7265 ch means that re │ │ │ │ +000fc810: 2d64 6563 6c61 7261 7469 6f6e 7320 6f66 -declarations of │ │ │ │ +000fc820: 2074 6865 2073 7472 7563 7475 7265 7320 the structures │ │ │ │ +000fc830: 6172 6520 7065 726d 6974 7465 6420 616e are permitted an │ │ │ │ +000fc840: 6420 6164 6469 7469 6f6e 616c 206d 656d d additional mem │ │ │ │ +000fc850: 6265 7273 2061 7265 2063 6f6c 6c65 6374 bers are collect │ │ │ │ +000fc860: 6564 2069 6e74 6f20 6f6e 6520 6669 6e61 ed into one fina │ │ │ │ +000fc870: 6c20 7374 7275 6374 7572 6520 6279 2074 l structure by t │ │ │ │ +000fc880: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool │ │ │ │ +000fc890: 2e3c 2f70 3e0a 3c70 3e46 6f72 2061 6e6f .

    .

    For ano │ │ │ │ +000fc8a0: 7468 6572 2065 7861 6d70 6c65 2c20 636f ther example, co │ │ │ │ +000fc8b0: 6e73 6964 6572 3a3c 2f70 3e0a 3c64 6976 nsider:

    .
    .
    {
    .
    │ │ │ │ +000fc990: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ +000fc9b0: 3c2f 7370 616e 3e20 2a68 5f5f 7472 616e *h__tran │ │ │ │ +000fc9c0: 7361 6374 696f 6e3b 203c 2f64 6976 3e0a saction;
    . │ │ │ │ +000fc9d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    stru │ │ │ │ +000fca00: 6374 203c 2f73 7061 6e3e 5573 6572 4175 ct UserAu │ │ │ │ +000fca10: 7468 202a 685f 5f61 7574 6865 6e74 6963 th *h__authentic │ │ │ │ +000fca20: 6174 696f 6e3b 203c 2f64 6976 3e0a 3c64 ation;
    . │ │ │ │ +000fca40: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .
    < │ │ │ │ +000fca50: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +000fca60: 3c70 3e53 7570 706f 7365 206d 6574 686f

    Suppose metho │ │ │ │ +000fca70: 6420 3c63 6f64 653e 6e73 5f5f 6c6f 6769 d ns__logi │ │ │ │ +000fca80: 6e3c 2f63 6f64 653e 2075 7365 7320 626f n uses bo │ │ │ │ +000fca90: 7468 2068 6561 6465 7220 7061 7274 7320 th header parts │ │ │ │ +000fcaa0: 2861 7420 6d6f 7374 292c 2074 6865 6e20 (at most), then │ │ │ │ +000fcab0: 7468 6973 2069 7320 6465 636c 6172 6564 this is declared │ │ │ │ +000fcac0: 2061 733a 3c2f 703e 0a3c 6469 7620 636c as:

    .
    < │ │ │ │ +000fcae0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +000fcaf0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ +000fcb10: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ +000fcb20: 2d68 6561 6465 722d 7061 7274 3a20 6c6f -header-part: lo │ │ │ │ +000fcb30: 6769 6e20 685f 5f74 7261 6e73 6163 7469 gin h__transacti │ │ │ │ +000fcb40: 6f6e 203c 2f73 7061 6e3e 3c2f 6469 763e on
    │ │ │ │ +000fcb50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ +000fcb80: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth │ │ │ │ +000fcb90: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: │ │ │ │ +000fcba0: 6c6f 6769 6e20 685f 5f61 7574 6865 6e74 login h__authent │ │ │ │ +000fcbb0: 6963 6174 696f 6e20 3c2f 7370 616e 3e3c ication < │ │ │ │ +000fcbc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_ │ │ │ │ +000fcc00: 5f6c 6f67 696e 282e 2e2e 293b 3c2f 6469 _login(...);.

    Sup │ │ │ │ +000fcc30: 706f 7365 206d 6574 686f 6420 3c63 6f64 pose method ns__search uses only th │ │ │ │ +000fcc60: 6520 6669 7273 7420 6865 6164 6572 2070 e first header p │ │ │ │ +000fcc70: 6172 742c 2074 6865 6e20 7468 6973 2069 art, then this i │ │ │ │ +000fcc80: 7320 6465 636c 6172 6564 2061 733a 3c2f s declared as:.

    //gsoap ns serv │ │ │ │ +000fcce0: 6963 6520 6d65 7468 6f64 2d68 6561 6465 ice method-heade │ │ │ │ +000fccf0: 722d 7061 7274 3a20 7365 6172 6368 2068 r-part: search h │ │ │ │ +000fcd00: 5f5f 7472 616e 7361 6374 696f 6e20 3c2f __transaction
    .
    int ns__search(.. │ │ │ │ +000fcd60: 2e29 3b3c 2f64 6976 3e0a 3c2f 6469 763e .);
    .
    │ │ │ │ +000fcd70: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d < │ │ │ │ +000fcf30: 703e 5369 6d69 6c61 726c 792c 2074 6f20 p>Similarly, to │ │ │ │ +000fcf40: 7370 6563 6966 7920 7468 6520 6865 6164 specify the head │ │ │ │ +000fcf50: 6572 2070 6172 7473 2066 6f72 2074 6865 er parts for the │ │ │ │ +000fcf60: 206d 6574 686f 6420 6f75 7470 7574 2028 method output ( │ │ │ │ +000fcf70: 6d65 7468 6f64 2072 6573 706f 6e73 6520 method response │ │ │ │ +000fcf80: 6d65 7373 6167 6529 2c20 7573 653a 3c2f message), use:.
    //gsoap namespa │ │ │ │ +000fcfe0: 6365 2d70 7265 6669 7820 7365 7276 6963 ce-prefix servic │ │ │ │ +000fcff0: 6520 6d65 7468 6f64 2d6f 7574 7075 742d e method-output- │ │ │ │ +000fd000: 6865 6164 6572 2d70 6172 743a 206d 6574 header-part: met │ │ │ │ +000fd010: 686f 642d 6e61 6d65 2068 6561 6465 722d hod-name header- │ │ │ │ +000fd020: 7061 7274 3c2f 7370 616e 3e3c 2f64 6976 part
    .

    The │ │ │ │ +000fd050: 6465 636c 6172 6174 696f 6e73 206f 6e6c declarations onl │ │ │ │ +000fd060: 7920 6166 6665 6374 2074 6865 2057 5344 y affect the WSD │ │ │ │ +000fd070: 4c2e 2046 6f72 2065 7861 6d70 6c65 3a3c L. For example:< │ │ │ │ +000fd080: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct │ │ │ │ +000fd0d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SO │ │ │ │ +000fd110: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header
    .
    {.
    {
    . │ │ │ │ -000fd170: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ -000fd190: 6172 3c2f 7370 616e 3e20 2a68 5f5f 7472 ar *h__tr │ │ │ │ -000fd1a0: 616e 7361 6374 696f 6e3b 203c 2f64 6976 ansaction;
    .
    st │ │ │ │ -000fd1e0: 7275 6374 203c 2f73 7061 6e3e 5573 6572 ruct User │ │ │ │ -000fd1f0: 4175 7468 202a 685f 5f61 7574 6865 6e74 Auth *h__authent │ │ │ │ -000fd200: 6963 6174 696f 6e3b 203c 2f64 6976 3e0a ication;
    . │ │ │ │ -000fd210: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .
    //gsoap ns s │ │ │ │ -000fd260: 6572 7669 6365 206d 6574 686f 642d 696e ervice method-in │ │ │ │ -000fd270: 7075 742d 6865 6164 6572 2d70 6172 743a put-header-part: │ │ │ │ -000fd280: 206c 6f67 696e 2068 5f5f 6175 7468 656e login h__authen │ │ │ │ -000fd290: 7469 6361 7469 6f6e 203c 2f73 7061 6e3e tication │ │ │ │ -000fd2a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -000fd2d0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -000fd2e0: 6520 6d65 7468 6f64 2d69 6e70 7574 2d68 e method-input-h │ │ │ │ -000fd2f0: 6561 6465 722d 7061 7274 3a20 6c6f 6769 eader-part: logi │ │ │ │ -000fd300: 6e20 685f 5f74 7261 6e73 6163 7469 6f6e n h__transaction │ │ │ │ -000fd310: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -000fd320: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000fd330: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ -000fd350: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ -000fd360: 2d6f 7574 7075 742d 6865 6164 6572 2d70 -output-header-p │ │ │ │ -000fd370: 6172 743a 206c 6f67 696e 2068 5f5f 7472 art: login h__tr │ │ │ │ -000fd380: 616e 7361 6374 696f 6e20 3c2f 7370 616e ansaction
    .
    int n │ │ │ │ -000fd3d0: 735f 5f6c 6f67 696e 282e 2e2e 293b 3c2f s__login(...);.

    T │ │ │ │ -000fd400: 6865 2068 6561 6465 7273 206d 7573 7420 he headers must │ │ │ │ -000fd410: 6265 2070 7265 7365 6e74 2069 6e20 616c be present in al │ │ │ │ -000fd420: 6c20 6f70 6572 6174 696f 6e73 2074 6861 l operations tha │ │ │ │ -000fd430: 7420 6465 636c 6172 6564 2074 6865 2068 t declared the h │ │ │ │ -000fd440: 6561 6465 7220 7061 7274 732e 3c2f 703e eader parts.

    │ │ │ │ -000fd450: 0a3c 703e 5365 6520 616c 736f 2041 5049 .

    See also API │ │ │ │ -000fd460: 2064 6f63 756d 656e 7461 7469 6f6e 204d documentation M │ │ │ │ -000fd470: 6f64 756c 6520 3c61 2063 6c61 7373 3d22 odule Header stru │ │ │ │ -000fd4b0: 6374 7572 6520 616e 6420 6675 6e63 7469 cture and functi │ │ │ │ -000fd4c0: 6f6e 733c 2f61 3e2e 3c2f 703e 0a3c 703e ons.

    .

    │ │ │ │ -000fd4d0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -000fd4f0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .SOAP Fa │ │ │ │ -000fd530: 756c 7420 7072 6f63 6573 7369 6e67 3c2f ult processing.

    A built-i │ │ │ │ -000fd550: 6e20 534f 4150 2046 6175 6c74 2064 6174 n SOAP Fault dat │ │ │ │ -000fd560: 6120 7374 7275 6374 7572 6520 3c63 6f64 a structure SOAP_ │ │ │ │ -000fd5d0: 454e 565f 5f46 6175 6c74 3c2f 613e 3c2f ENV__Fault is generat │ │ │ │ -000fd5f0: 6564 2062 7920 7468 6520 736f 6170 6370 ed by the soapcp │ │ │ │ -000fd600: 7032 2074 6f6f 6c20 666f 7220 6578 6368 p2 tool for exch │ │ │ │ -000fd610: 616e 6769 6e67 2065 7863 6570 7469 6f6e anging exception │ │ │ │ -000fd620: 206d 6573 7361 6765 732e 2054 6869 7320 messages. This │ │ │ │ -000fd630: 7374 7275 6374 7572 6520 6861 7320 7468 structure has th │ │ │ │ -000fd640: 6520 6765 6e65 7261 6c20 666f 726d 3a3c e general form:< │ │ │ │ -000fd650: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    .
    char *< │ │ │ │ -000fd920: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -000fd930: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ -000fd940: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ -000fd950: 6661 756c 742e 6874 6d6c 2361 6534 6335 fault.html#ae4c5 │ │ │ │ -000fd960: 3363 6530 3838 3465 6337 3537 6434 3863 3ce0884ec757d48c │ │ │ │ -000fd970: 3166 3632 6135 3136 6564 6365 223e 6661 1f62a516edce">fa │ │ │ │ -000fd980: 756c 7461 6374 6f72 3c2f 613e 3b20 3c2f ultactor; .
    struct < │ │ │ │ -000fd9d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -000fd9e0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ -000fd9f0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ -000fda00: 6465 7461 696c 2e68 746d 6c22 3e53 4f41 detail.html">SOA │ │ │ │ -000fda10: 505f 454e 565f 5f44 6574 6169 6c3c 2f61 P_ENV__Detail *detail; .
    struct < │ │ │ │ -000fdad0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -000fdae0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ -000fdaf0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ -000fdb00: 636f 6465 2e68 746d 6c22 3e53 4f41 505f code.html">SOAP_ │ │ │ │ -000fdb10: 454e 565f 5f43 6f64 653c 2f61 3e20 2a3c ENV__Code *< │ │ │ │ -000fdb20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -000fdb30: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ -000fdb40: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ -000fdb50: 6661 756c 742e 6874 6d6c 2361 6365 6331 fault.html#acec1 │ │ │ │ -000fdb60: 3738 3466 3136 6666 6431 3461 3639 6139 784f16ffd14a69a9 │ │ │ │ -000fdb70: 3262 3932 6630 6464 6431 3566 223e 534f 2b92f0ddd15f">SO │ │ │ │ -000fdb80: 4150 5f45 4e56 5f5f 436f 6465 3c2f 613e AP_ENV__Code │ │ │ │ -000fdb90: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // must │ │ │ │ -000fdbb0: 6265 2061 2053 4f41 505f 454e 565f 5f43 be a SOAP_ENV__C │ │ │ │ -000fdbc0: 6f64 6520 7374 7275 6374 2064 6566 696e ode struct defin │ │ │ │ -000fdbd0: 6564 2062 656c 6f77 203c 2f73 7061 6e3e ed below │ │ │ │ -000fdbe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .. │ │ │ │ -000fdca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -000fdcd0: 6368 6172 3c2f 7370 616e 3e20 2a3c 6120 char *SOAP │ │ │ │ -000fdd40: 5f45 4e56 5f5f 4e6f 6465 3c2f 613e 3b20 _ENV__Node; │ │ │ │ -000fdd50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .. │ │ │ │ -000fde20: 2020 2020 3c73 7061 6e20 636c 6173 733d struct │ │ │ │ -000fde40: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 SOAP_ENV__ │ │ │ │ -000fde90: 4465 7461 696c 3c2f 613e 202a 3c61 2063 Detail *SOAP_ │ │ │ │ -000fdf00: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3b ENV__Detail; │ │ │ │ -000fdf10: 203c 7370 616e 2063 6c61 7373 3d22 636f // SOAP 1 │ │ │ │ -000fdf30: 2e32 2064 6574 6169 6c20 6d65 6d62 6572 .2 detail member │ │ │ │ -000fdf40: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -000fdf50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -000fdf60: 3e7d 3b20 3c2f 6469 763e 0a3c 6469 7620 >};
    .
    struct SOA │ │ │ │ -000fdfe0: 505f 454e 565f 5f43 6f64 653c 2f61 3e20 P_ENV__Code │ │ │ │ +000fd150: 6c69 6e65 223e 2020 2020 3c73 7061 6e20 line"> char │ │ │ │ +000fd180: 2a68 5f5f 7472 616e 7361 6374 696f 6e3b *h__transaction; │ │ │ │ +000fd190: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct UserAuth *h__a │ │ │ │ +000fd1e0: 7574 6865 6e74 6963 6174 696f 6e3b 203c uthentication; < │ │ │ │ +000fd1f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    .
    //gsoa │ │ │ │ +000fd240: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met │ │ │ │ +000fd250: 686f 642d 696e 7075 742d 6865 6164 6572 hod-input-header │ │ │ │ +000fd260: 2d70 6172 743a 206c 6f67 696e 2068 5f5f -part: login h__ │ │ │ │ +000fd270: 6175 7468 656e 7469 6361 7469 6f6e 203c authentication < │ │ │ │ +000fd280: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +000fd2a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +000fd2b0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +000fd2c0: 7365 7276 6963 6520 6d65 7468 6f64 2d69 service method-i │ │ │ │ +000fd2d0: 6e70 7574 2d68 6561 6465 722d 7061 7274 nput-header-part │ │ │ │ +000fd2e0: 3a20 6c6f 6769 6e20 685f 5f74 7261 6e73 : login h__trans │ │ │ │ +000fd2f0: 6163 7469 6f6e 203c 2f73 7061 6e3e 3c2f action .
    //g │ │ │ │ +000fd330: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ +000fd340: 6d65 7468 6f64 2d6f 7574 7075 742d 6865 method-output-he │ │ │ │ +000fd350: 6164 6572 2d70 6172 743a 206c 6f67 696e ader-part: login │ │ │ │ +000fd360: 2068 5f5f 7472 616e 7361 6374 696f 6e20 h__transaction │ │ │ │ +000fd370: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +000fd390: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    ns__login(. │ │ │ │ +000fd3c0: 2e2e 293b 3c2f 6469 763e 0a3c 2f64 6976 ..);
    .

    │ │ │ │ -00100010: 3c70 3e54 6865 2066 6972 7374 2066 6f75

    The first fou │ │ │ │ -00100020: 7220 6d65 6d62 6572 7320 696e 203c 636f r members in SOAP │ │ │ │ -00100090: 5f45 4e56 5f5f 4661 756c 743c 2f61 3e3c _ENV__Fault< │ │ │ │ -001000a0: 2f63 6f64 653e 2061 7265 2053 4f41 5020 /code> are SOAP │ │ │ │ -001000b0: 312e 3120 7370 6563 6966 6963 2e20 5468 1.1 specific. Th │ │ │ │ -001000c0: 6520 6c61 7374 2066 6976 6520 6d65 6d62 e last five memb │ │ │ │ -001000d0: 6572 7320 6172 6520 534f 4150 2031 2e32 ers are SOAP 1.2 │ │ │ │ -001000e0: 2073 7065 6369 6669 632e 2059 6f75 2063 specific. You c │ │ │ │ -001000f0: 616e 2072 6564 6566 696e 6520 7468 6573 an redefine thes │ │ │ │ -00100100: 6520 7374 7275 6374 7572 6573 2069 6e20 e structures in │ │ │ │ -00100110: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he │ │ │ │ -00100120: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so │ │ │ │ -00100130: 6170 6370 7032 2e20 466f 7220 6578 616d apcpp2. For exam │ │ │ │ -00100140: 706c 652c 2079 6f75 2063 616e 2075 7365 ple, you can use │ │ │ │ -00100150: 2061 203c 636f 6465 3e63 6c61 7373 3c2f a class for the SOA │ │ │ │ -001001d0: 505f 454e 565f 5f46 6175 6c74 3c2f 613e P_ENV__Fault │ │ │ │ -001001e0: 3c2f 636f 6465 3e20 616e 6420 6164 6420 and add │ │ │ │ -001001f0: 6d65 7468 6f64 7320 666f 7220 636f 6e76 methods for conv │ │ │ │ -00100200: 656e 6965 6e63 652e 3c2f 703e 0a3c 703e enience.

    .

    │ │ │ │ -00100210: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The SOAP_ │ │ │ │ -00100280: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3c ENV__Detail< │ │ │ │ -00100290: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure │ │ │ │ -001002a0: 2063 616e 2062 6520 6368 616e 6765 6420 can be changed │ │ │ │ -001002b0: 746f 2074 6865 206e 6565 6473 206f 6620 to the needs of │ │ │ │ -001002c0: 5765 6220 7365 7276 6963 6520 6170 706c Web service appl │ │ │ │ -001002d0: 6963 6174 696f 6e20 746f 2063 6f6d 6d75 ication to commu │ │ │ │ -001002e0: 6e69 6361 7465 2073 7065 6369 6669 6320 nicate specific │ │ │ │ -001002f0: 6661 756c 7420 6461 7461 2073 7472 7563 fault data struc │ │ │ │ -00100300: 7475 7265 732c 2062 7574 2074 6869 7320 tures, but this │ │ │ │ -00100310: 6973 2067 656e 6572 616c 6c79 206e 6f74 is generally not │ │ │ │ -00100320: 206e 6563 6573 7361 7279 2062 6563 6175 necessary becau │ │ │ │ -00100330: 7365 2074 6865 2061 7070 6c69 6361 7469 se the applicati │ │ │ │ -00100340: 6f6e 2d73 7065 6369 6669 6320 534f 4150 on-specific SOAP │ │ │ │ -00100350: 2046 6175 6c74 2064 6574 6169 6c73 2063 Fault details c │ │ │ │ -00100360: 616e 2062 6520 7365 7269 616c 697a 6564 an be serialized │ │ │ │ -00100370: 2076 6961 2074 6865 203c 636f 6465 3e5f via the _ │ │ │ │ -00100380: 5f74 7970 653c 2f63 6f64 653e 2061 6e64 _type and │ │ │ │ -00100390: 203c 636f 6465 3e66 6175 6c74 3c2f 636f fault members in t │ │ │ │ -001003b0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he SOAP_E │ │ │ │ -00100420: 4e56 5f5f 4465 7461 696c 3c2f 613e 3c2f NV__Detail member, se │ │ │ │ -00100440: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section V │ │ │ │ -00100470: 6f69 6420 706f 696e 7465 7220 7365 7269 oid pointer seri │ │ │ │ -00100480: 616c 697a 6174 696f 6e3c 2f61 3e20 6f6e alization on │ │ │ │ -00100490: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati │ │ │ │ -001004a0: 6f6e 206f 6620 6461 7461 2072 6566 6572 on of data refer │ │ │ │ -001004b0: 7265 6420 746f 2062 7920 3c63 6f64 653e red to by │ │ │ │ -001004c0: 5f5f 7479 7065 3c2f 636f 6465 3e20 616e __type an │ │ │ │ -001004d0: 6420 3c63 6f64 653e 6661 756c 743c 2f63 d fault.

    .

    Whe │ │ │ │ -001004f0: 6e20 6120 7573 6572 2d64 6566 696e 6520 n a user-define │ │ │ │ -00100500: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio │ │ │ │ -00100510: 6e20 6675 6e63 7469 6f6e 2072 6574 7572 n function retur │ │ │ │ -00100520: 6e73 2061 6e20 6572 726f 7220 7769 7468 ns an error with │ │ │ │ -00100530: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sender │ │ │ │ -001005e0: 5f66 6175 6c74 3c2f 613e 3c2f 636f 6465 _fault or soap_ │ │ │ │ -001006a0: 7265 6365 6976 6572 5f66 6175 6c74 3c2f receiver_fault, then │ │ │ │ -001006c0: 7468 6520 534f 4150 2046 6175 6c74 2073 the SOAP Fault s │ │ │ │ -001006d0: 7472 7563 7475 7265 2069 7320 706f 7075 tructure is popu │ │ │ │ -001006e0: 6c61 7465 6420 616e 6420 3c63 6f64 653e lated and │ │ │ │ -001006f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fa │ │ │ │ -001007b0: 756c 743c 2f61 3e3c 2f63 6f64 653e 2070 ult p │ │ │ │ -001007c0: 6f69 6e74 7320 746f 2074 6869 7320 534f oints to this SO │ │ │ │ -001007d0: 4150 2046 6175 6c74 2e20 5468 6520 534f AP Fault. The SO │ │ │ │ -001007e0: 4150 2046 6175 6c74 2069 7320 7365 6e74 AP Fault is sent │ │ │ │ -001007f0: 2074 6f20 7468 6520 636c 6965 6e74 2e20 to the client. │ │ │ │ -00100800: 5468 6520 636c 6965 6e74 2070 6f70 756c The client popul │ │ │ │ -00100810: 6174 6573 2061 2053 4f41 5020 4661 756c ates a SOAP Faul │ │ │ │ -00100820: 7420 7374 7275 6374 7572 6520 7468 6174 t structure that │ │ │ │ -00100830: 2063 6f6e 7461 696e 7320 7468 6520 534f contains the SO │ │ │ │ -00100840: 4150 2046 6175 6c74 206d 6573 7361 6765 AP Fault message │ │ │ │ -00100850: 2077 6974 6820 6465 7461 696c 732e 3c2f with details..

    Server-sid │ │ │ │ -00100870: 6520 6661 756c 7473 2061 7265 2072 6169 e faults are rai │ │ │ │ -00100880: 7365 6420 7769 7468 203c 636f 6465 3e3c sed with < │ │ │ │ -00100890: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001008a0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -001008b0: 5f66 6175 6c74 2e68 746d 6c23 6761 6332 _fault.html#gac2 │ │ │ │ -001008c0: 3063 3835 3639 3833 3330 3533 3331 3831 0c85698330533181 │ │ │ │ -001008d0: 3936 6438 3938 6665 3235 3636 6166 2220 96d898fe2566af" │ │ │ │ -001008e0: 7469 746c 653d 2253 6574 2053 4f41 5020 title="Set SOAP │ │ │ │ -001008f0: 312e 3120 636c 6965 6e74 2066 6175 6c74 1.1 client fault │ │ │ │ -00100900: 202f 2053 4f41 5020 312e 3220 7365 6e64 / SOAP 1.2 send │ │ │ │ -00100910: 6572 2066 6175 6c74 2073 7472 696e 6720 er fault string │ │ │ │ -00100920: 616e 6420 6465 7461 696c 2e22 3e73 6f61 and detail.">soa │ │ │ │ -00100930: 705f 7365 6e64 6572 5f66 6175 6c74 3c2f p_sender_fault or soap_receiver │ │ │ │ -00100a00: 5f66 6175 6c74 3c2f 613e 3c2f 636f 6465 _fault. The soap_ │ │ │ │ -00100ac0: 7365 6e64 6572 5f66 6175 6c74 3c2f 613e sender_fault │ │ │ │ -00100ad0: 3c2f 636f 6465 3e20 6361 6c6c 2073 686f call sho │ │ │ │ -00100ae0: 756c 6420 6265 2075 7365 6420 746f 2069 uld be used to i │ │ │ │ -00100af0: 6e66 6f72 6d20 7468 6174 2074 6865 2073 nform that the s │ │ │ │ -00100b00: 656e 6465 7220 6973 2061 7420 6661 756c ender is at faul │ │ │ │ -00100b10: 7420 616e 6420 7468 6520 7365 6e64 6572 t and the sender │ │ │ │ -00100b20: 2028 636c 6965 6e74 2920 7368 6f75 6c64 (client) should │ │ │ │ -00100b30: 206e 6f74 2072 652d 7365 6e64 2074 6865 not re-send the │ │ │ │ -00100b40: 2072 6571 7565 7374 2e20 5468 6520 3c63 request. The soap_receive │ │ │ │ -00100c00: 725f 6661 756c 743c 2f61 3e3c 2f63 6f64 r_fault call should b │ │ │ │ -00100c20: 6520 7573 6564 2074 6f20 696e 6469 6361 e used to indica │ │ │ │ -00100c30: 7465 2061 2074 656d 706f 7261 7279 2073 te a temporary s │ │ │ │ -00100c40: 6572 7665 722d 7369 6465 2070 726f 626c erver-side probl │ │ │ │ -00100c50: 656d 2c20 736f 2061 2073 656e 6465 7220 em, so a sender │ │ │ │ -00100c60: 2863 6c69 656e 7429 2063 616e 2072 652d (client) can re- │ │ │ │ -00100c70: 7365 6e64 2074 6865 2072 6571 7565 7374 send the request │ │ │ │ -00100c80: 206c 6174 6572 2e20 466f 7220 6578 616d later. For exam │ │ │ │ -00100c90: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    < │ │ │ │ -00100cb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00100cc0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns1__myMet │ │ │ │ -00100cf0: 686f 6428 3c73 7061 6e20 636c 6173 733d hod(struct │ │ │ │ -00100d10: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ -00100d40: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ -00100d70: 736f 6170 3c2f 613e 2c20 2e2e 2e29 203c soap, ...) < │ │ │ │ +000fe2c0: 6522 3e20 2020 203c 7370 616e 2063 6c61 e"> int __ty │ │ │ │ +000fe350: 7065 3c2f 613e 3b20 203c 7370 616e 2063 pe; / │ │ │ │ +000fe370: 2f20 5468 6520 534f 4150 5f54 5950 455f / The SOAP_TYPE_ │ │ │ │ +000fe380: 206f 6620 7468 6520 6f62 6a65 6374 2073 of the object s │ │ │ │ +000fe390: 6572 6961 6c69 7a65 6420 6173 2046 6175 erialized as Fau │ │ │ │ +000fe3a0: 6c74 2064 6574 6169 6c20 3c2f 7370 616e lt detail
    .
    void *fault; │ │ │ │ +000fe460: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // pointer │ │ │ │ +000fe480: 2074 6f20 7468 6520 6661 756c 7420 6f62 to the fault ob │ │ │ │ +000fe490: 6a65 6374 2c20 6f72 204e 554c 4c20 3c2f ject, or NULL
    .
    │ │ │ │ +000fe4c0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 _XML __ │ │ │ │ +000fe580: 616e 793c 2f61 3e3b 2020 3c73 7061 6e20 any; │ │ │ │ +000fe5a0: 2f2f 2061 6e79 206f 7468 6572 2064 6574 // any other det │ │ │ │ +000fe5b0: 6169 6c20 656c 656d 656e 7420 636f 6e74 ail element cont │ │ │ │ +000fe5c0: 656e 7420 2873 746f 7265 6420 696e 2058 ent (stored in X │ │ │ │ +000fe5d0: 4d4c 2066 6f72 6d61 7429 203c 2f73 7061 ML format)
    .
    };.
    │ │ │ │ +000fe640: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    SO │ │ │ │ +000fe6b0: 4150 2046 6175 6c74 2043 6f64 6520 7374 AP Fault Code st │ │ │ │ +000fe6c0: 7275 6374 7572 652e 3c2f 6469 763e 3c64 ructure.
    Definition:< │ │ │ │ +000fe6f0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9 │ │ │ │ +000fe700: 3437 313c 2f64 6976 3e3c 2f64 6976 3e0a 471
    . │ │ │ │ +000fe710: 3c64 6976 2063 6c61 7373 3d22 7474 6322 struct SOAP_EN │ │ │ │ +000fe820: 565f 5f43 6f64 6520 2a20 534f 4150 5f45 V__Code * SOAP_E │ │ │ │ +000fe830: 4e56 5f5f 5375 6263 6f64 653c 2f64 6976 NV__Subcode
    Optional ele │ │ │ │ +000fe860: 6d65 6e74 2053 4f41 502d 454e 563a 5375 ment SOAP-ENV:Su │ │ │ │ +000fe870: 6263 6f64 6520 6f66 2058 5344 2074 7970 bcode of XSD typ │ │ │ │ +000fe880: 6520 534f 4150 2d45 4e56 3a43 6f64 653c e SOAP-ENV:Code< │ │ │ │ +000fe890: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +000fe8b0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +000fe8c0: 6170 322e 683a 3934 3735 3c2f 6469 763e ap2.h:9475
    │ │ │ │ +000fe8d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    SOAP_E │ │ │ │ +000fe9a0: 4e56 5f5f 436f 6465 3a3a 534f 4150 5f45 NV__Code::SOAP_E │ │ │ │ +000fe9b0: 4e56 5f5f 5661 6c75 653c 2f61 3e3c 2f64 NV__Value
    _QName SO │ │ │ │ +000fe9e0: 4150 5f45 4e56 5f5f 5661 6c75 653c 2f64 AP_ENV__Value
    Optional e │ │ │ │ +000fea10: 6c65 6d65 6e74 2053 4f41 502d 454e 563a lement SOAP-ENV: │ │ │ │ +000fea20: 5661 6c75 6520 6f66 2058 5344 2074 7970 Value of XSD typ │ │ │ │ +000fea30: 6520 7873 643a 514e 616d 653c 2f64 6976 e xsd:QName
    Definitio │ │ │ │ +000fea60: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +000fea70: 683a 3934 3733 3c2f 6469 763e 3c2f 6469 h:9473
    .
    │ │ │ │ +000feb20: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    SOAP Fault De │ │ │ │ +000feb40: 7461 696c 2073 7472 7563 7475 7265 2e3c tail structure.< │ │ │ │ +000feb50: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +000feb70: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +000feb80: 6170 322e 683a 3934 3832 3c2f 6469 763e ap2.h:9482
    │ │ │ │ +000feb90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +000fec80: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +000fec90: 6922 3e76 6f69 6420 2a20 6661 756c 743c i">void * fault< │ │ │ │ +000feca0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Any data │ │ │ │ +000fecc0: 206f 6620 736f 6d65 2074 7970 6520 5420 of some type T │ │ │ │ +000fecd0: 7365 7269 616c 697a 6564 2061 7320 6661 serialized as fa │ │ │ │ +000fece0: 756c 7420 656c 656d 656e 7420 7768 656e ult element when │ │ │ │ +000fecf0: 2069 7473 2053 4f41 505f 5459 5045 5f54 its SOAP_TYPE_T │ │ │ │ +000fed00: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to │ │ │ │ +000fed10: 5f5f 7479 7065 3c2f 6469 763e 3c64 6976 __type
    < │ │ │ │ +000fed30: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:948 │ │ │ │ +000fed50: 363c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6
    .SOAP_ENV__D │ │ │ │ +000fee30: 6574 6169 6c3a 3a5f 5f61 6e79 3c2f 613e etail::__any │ │ │ │ +000fee40: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    _XML _ │ │ │ │ +000fee60: 5f61 6e79 3c2f 6469 763e 3c64 6976 2063 _any
    Any │ │ │ │ +000fee80: 2058 4d4c 2063 6f6e 7465 6e74 2e3c 2f64 XML content.
    Definit │ │ │ │ +000feeb0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +000feec0: 322e 683a 3934 3838 3c2f 6469 763e 3c2f 2.h:9488
    .
    int __type
    Any data of │ │ │ │ +000ff000: 2073 6f6d 6520 7479 7065 2054 2073 6572 some type T ser │ │ │ │ +000ff010: 6961 6c69 7a65 6420 6173 2066 6175 6c74 ialized as fault │ │ │ │ +000ff020: 2065 6c65 6d65 6e74 2077 6865 6e20 6974 element when it │ │ │ │ +000ff030: 7320 534f 4150 5f54 5950 455f 5420 6973 s SOAP_TYPE_T is │ │ │ │ +000ff040: 2061 7373 6967 6e65 6420 746f 205f 5f74 assigned to __t │ │ │ │ +000ff050: 7970 653c 2f64 6976 3e3c 6469 7620 636c ype
    D │ │ │ │ +000ff070: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +000ff080: 7464 736f 6170 322e 683a 3934 3834 3c2f tdsoap2.h:9484
    ..
    .
    char * SOAP │ │ │ │ +000ff520: 5f45 4e56 5f5f 526f 6c65 3c2f 6469 763e _ENV__Role
    │ │ │ │ +000ff530: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Optional elem │ │ │ │ +000ff550: 656e 7420 534f 4150 2d45 4e56 3a52 6f6c ent SOAP-ENV:Rol │ │ │ │ +000ff560: 6520 6f66 2058 5344 2074 7970 6520 7873 e of XSD type xs │ │ │ │ +000ff570: 643a 7374 7269 6e67 3c2f 6469 763e 3c64 d:string
    Definition:< │ │ │ │ +000ff5a0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9 │ │ │ │ +000ff5b0: 3436 323c 2f64 6976 3e3c 2f64 6976 3e0a 462
    . │ │ │ │ +000ff5c0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    < │ │ │ │ +000ff620: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +000ff630: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">SOAP_ENV__F │ │ │ │ +000ff690: 6175 6c74 3a3a 534f 4150 5f45 4e56 5f5f ault::SOAP_ENV__ │ │ │ │ +000ff6a0: 5265 6173 6f6e 3c2f 613e 3c2f 6469 763e Reason
    │ │ │ │ +000ff6b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    struct SOAP_ │ │ │ │ +000ff6d0: 454e 565f 5f52 6561 736f 6e20 2a20 534f ENV__Reason * SO │ │ │ │ +000ff6e0: 4150 5f45 4e56 5f5f 5265 6173 6f6e 3c2f AP_ENV__Reason
    Optional │ │ │ │ +000ff710: 656c 656d 656e 7420 534f 4150 2d45 4e56 element SOAP-ENV │ │ │ │ +000ff720: 3a52 6561 736f 6e20 6f66 2058 5344 2074 :Reason of XSD t │ │ │ │ +000ff730: 7970 6520 534f 4150 2d45 4e56 3a52 6561 ype SOAP-ENV:Rea │ │ │ │ +000ff740: 736f 6e3c 2f64 6976 3e3c 6469 7620 636c son
    D │ │ │ │ +000ff760: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +000ff770: 7464 736f 6170 322e 683a 3934 3538 3c2f tdsoap2.h:9458
    .
    char * │ │ │ │ +000ff890: 2066 6175 6c74 7374 7269 6e67 3c2f 6469 faultstring
    Optional el │ │ │ │ +000ff8c0: 656d 656e 7420 6661 756c 7473 7472 696e ement faultstrin │ │ │ │ +000ff8d0: 6720 6f66 2058 5344 2074 7970 6520 7873 g of XSD type xs │ │ │ │ +000ff8e0: 643a 7374 7269 6e67 3c2f 6469 763e 3c64 d:string
    Definition:< │ │ │ │ +000ff910: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9 │ │ │ │ +000ff920: 3435 303c 2f64 6976 3e3c 2f64 6976 3e0a 450
    . │ │ │ │ +000ff930: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    < │ │ │ │ +000ff990: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +000ff9a0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">SOAP_ENV__F │ │ │ │ +000ffa00: 6175 6c74 3a3a 534f 4150 5f45 4e56 5f5f ault::SOAP_ENV__ │ │ │ │ +000ffa10: 436f 6465 3c2f 613e 3c2f 6469 763e 3c64 Code
    struct SOAP_EN │ │ │ │ +000ffa40: 565f 5f43 6f64 6520 2a20 534f 4150 5f45 V__Code * SOAP_E │ │ │ │ +000ffa50: 4e56 5f5f 436f 6465 3c2f 6469 763e 3c64 NV__Code
    Optional elemen │ │ │ │ +000ffa80: 7420 534f 4150 2d45 4e56 3a43 6f64 6520 t SOAP-ENV:Code │ │ │ │ +000ffa90: 6f66 2058 5344 2074 7970 6520 534f 4150 of XSD type SOAP │ │ │ │ +000ffaa0: 2d45 4e56 3a43 6f64 653c 2f64 6976 3e3c -ENV:Code
    < │ │ │ │ +000ffab0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +000ffac0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +000ffad0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +000ffae0: 3934 3536 3c2f 6469 763e 3c2f 6469 763e 9456
    │ │ │ │ +000ffaf0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ +000ffb50: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    _Q │ │ │ │ +000ffbf0: 4e61 6d65 2066 6175 6c74 636f 6465 3c2f Name faultcode
    Optional │ │ │ │ +000ffc20: 656c 656d 656e 7420 6661 756c 7463 6f64 element faultcod │ │ │ │ +000ffc30: 6520 6f66 2058 5344 2074 7970 6520 7873 e of XSD type xs │ │ │ │ +000ffc40: 643a 514e 616d 653c 2f64 6976 3e3c 6469 d:QName
    │ │ │ │ +000ffc60: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:94 │ │ │ │ +000ffc80: 3438 3c2f 6469 763e 3c2f 6469 763e 0a3c 48
    .< │ │ │ │ +000ffc90: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +000ffca0: 6964 3d22 6173 7472 7563 745f 735f 6f5f id="astruct_s_o_ │ │ │ │ +000ffcb0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ +000ffcc0: 6661 756c 745f 6874 6d6c 5f61 6534 6335 fault_html_ae4c5 │ │ │ │ +000ffcd0: 3363 6530 3838 3465 6337 3537 6434 3863 3ce0884ec757d48c │ │ │ │ +000ffce0: 3166 3632 6135 3136 6564 6365 223e 3c64 1f62a516edce">SOAP_ENV__Fa │ │ │ │ +000ffd60: 756c 743a 3a66 6175 6c74 6163 746f 723c ult::faultactor< │ │ │ │ +000ffd70: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    │ │ │ │ +000ffe30: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ +000ffe90: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    struc │ │ │ │ +000fff30: 7420 534f 4150 5f45 4e56 5f5f 4465 7461 t SOAP_ENV__Deta │ │ │ │ +000fff40: 696c 202a 2064 6574 6169 6c3c 2f64 6976 il * detail
    Optional ele │ │ │ │ +000fff70: 6d65 6e74 2064 6574 6169 6c20 6f66 2058 ment detail of X │ │ │ │ +000fff80: 5344 2074 7970 6520 534f 4150 2d45 4e56 SD type SOAP-ENV │ │ │ │ +000fff90: 3a44 6574 6169 6c3c 2f64 6976 3e3c 6469 :Detail
    │ │ │ │ +000fffb0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:94 │ │ │ │ +000fffd0: 3534 3c2f 6469 763e 3c2f 6469 763e 0a3c 54
    .< │ │ │ │ +000fffe0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The fir │ │ │ │ +00100000: 7374 2066 6f75 7220 6d65 6d62 6572 7320 st four members │ │ │ │ +00100010: 696e 203c 636f 6465 3e3c 6120 636c 6173 in SOAP_ENV__Faul │ │ │ │ +00100080: 743c 2f61 3e3c 2f63 6f64 653e 2061 7265 t are │ │ │ │ +00100090: 2053 4f41 5020 312e 3120 7370 6563 6966 SOAP 1.1 specif │ │ │ │ +001000a0: 6963 2e20 5468 6520 6c61 7374 2066 6976 ic. The last fiv │ │ │ │ +001000b0: 6520 6d65 6d62 6572 7320 6172 6520 534f e members are SO │ │ │ │ +001000c0: 4150 2031 2e32 2073 7065 6369 6669 632e AP 1.2 specific. │ │ │ │ +001000d0: 2059 6f75 2063 616e 2072 6564 6566 696e You can redefin │ │ │ │ +001000e0: 6520 7468 6573 6520 7374 7275 6374 7572 e these structur │ │ │ │ +001000f0: 6573 2069 6e20 7468 6520 696e 7465 7266 es in the interf │ │ │ │ +00100100: 6163 6520 6865 6164 6572 2066 696c 6520 ace header file │ │ │ │ +00100110: 666f 7220 736f 6170 6370 7032 2e20 466f for soapcpp2. Fo │ │ │ │ +00100120: 7220 6578 616d 706c 652c 2079 6f75 2063 r example, you c │ │ │ │ +00100130: 616e 2075 7365 2061 203c 636f 6465 3e63 an use a c │ │ │ │ +00100140: 6c61 7373 3c2f 636f 6465 3e20 666f 7220 lass for │ │ │ │ +00100150: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the SOAP_ENV__Fau │ │ │ │ +001001c0: 6c74 3c2f 613e 3c2f 636f 6465 3e20 616e lt an │ │ │ │ +001001d0: 6420 6164 6420 6d65 7468 6f64 7320 666f d add methods fo │ │ │ │ +001001e0: 7220 636f 6e76 656e 6965 6e63 652e 3c2f r convenience..

    The │ │ │ │ +00100200: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_ENV__Detai │ │ │ │ +00100270: 6c3c 2f61 3e3c 2f63 6f64 653e 2073 7472 l str │ │ │ │ +00100280: 7563 7475 7265 2063 616e 2062 6520 6368 ucture can be ch │ │ │ │ +00100290: 616e 6765 6420 746f 2074 6865 206e 6565 anged to the nee │ │ │ │ +001002a0: 6473 206f 6620 5765 6220 7365 7276 6963 ds of Web servic │ │ │ │ +001002b0: 6520 6170 706c 6963 6174 696f 6e20 746f e application to │ │ │ │ +001002c0: 2063 6f6d 6d75 6e69 6361 7465 2073 7065 communicate spe │ │ │ │ +001002d0: 6369 6669 6320 6661 756c 7420 6461 7461 cific fault data │ │ │ │ +001002e0: 2073 7472 7563 7475 7265 732c 2062 7574 structures, but │ │ │ │ +001002f0: 2074 6869 7320 6973 2067 656e 6572 616c this is general │ │ │ │ +00100300: 6c79 206e 6f74 206e 6563 6573 7361 7279 ly not necessary │ │ │ │ +00100310: 2062 6563 6175 7365 2074 6865 2061 7070 because the app │ │ │ │ +00100320: 6c69 6361 7469 6f6e 2d73 7065 6369 6669 lication-specifi │ │ │ │ +00100330: 6320 534f 4150 2046 6175 6c74 2064 6574 c SOAP Fault det │ │ │ │ +00100340: 6169 6c73 2063 616e 2062 6520 7365 7269 ails can be seri │ │ │ │ +00100350: 616c 697a 6564 2076 6961 2074 6865 203c alized via the < │ │ │ │ +00100360: 636f 6465 3e5f 5f74 7970 653c 2f63 6f64 code>__type and fau │ │ │ │ +00100380: 6c74 3c2f 636f 6465 3e20 6d65 6d62 6572 lt member │ │ │ │ +00100390: 7320 696e 2074 6865 203c 636f 6465 3e3c s in the < │ │ │ │ +001003a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +001003b0: 663d 2273 7472 7563 745f 735f 6f5f 615f f="struct_s_o_a_ │ │ │ │ +001003c0: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6465 p___e_n_v_____de │ │ │ │ +001003d0: 7461 696c 2e68 746d 6c22 2074 6974 6c65 tail.html" title │ │ │ │ +001003e0: 3d22 534f 4150 2046 6175 6c74 2044 6574 ="SOAP Fault Det │ │ │ │ +001003f0: 6169 6c20 7374 7275 6374 7572 652e 223e ail structure."> │ │ │ │ +00100400: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail │ │ │ │ +00100410: 3c2f 613e 3c2f 636f 6465 3e20 6d65 6d62 memb │ │ │ │ +00100420: 6572 2c20 7365 6520 5365 6374 696f 6e20 er, see Section │ │ │ │ +00100430: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Void pointe │ │ │ │ +00100460: 7220 7365 7269 616c 697a 6174 696f 6e3c r serialization< │ │ │ │ +00100470: 2f61 3e20 6f6e 2074 6865 2073 6572 6961 /a> on the seria │ │ │ │ +00100480: 6c69 7a61 7469 6f6e 206f 6620 6461 7461 lization of data │ │ │ │ +00100490: 2072 6566 6572 7265 6420 746f 2062 7920 referred to by │ │ │ │ +001004a0: 3c63 6f64 653e 5f5f 7479 7065 3c2f 636f __type and fa │ │ │ │ +001004c0: 756c 743c 2f63 6f64 653e 2e3c 2f70 3e0a ult.

    . │ │ │ │ +001004d0: 3c70 3e57 6865 6e20 6120 7573 6572 2d64

    When a user-d │ │ │ │ +001004e0: 6566 696e 6520 7365 7276 6963 6520 6f70 efine service op │ │ │ │ +001004f0: 6572 6174 696f 6e20 6675 6e63 7469 6f6e eration function │ │ │ │ +00100500: 2072 6574 7572 6e73 2061 6e20 6572 726f returns an erro │ │ │ │ +00100510: 7220 7769 7468 203c 636f 6465 3e3c 6120 r with soap_ │ │ │ │ +001005c0: 7365 6e64 6572 5f66 6175 6c74 3c2f 613e sender_fault │ │ │ │ +001005d0: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or soap_receiver_f │ │ │ │ +00100690: 6175 6c74 3c2f 613e 3c2f 636f 6465 3e2c ault, │ │ │ │ +001006a0: 2074 6865 6e20 7468 6520 534f 4150 2046 then the SOAP F │ │ │ │ +001006b0: 6175 6c74 2073 7472 7563 7475 7265 2069 ault structure i │ │ │ │ +001006c0: 7320 706f 7075 6c61 7465 6420 616e 6420 s populated and │ │ │ │ +001006d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +00100790: 6170 3a3a 6661 756c 743c 2f61 3e3c 2f63 ap::fault points to t │ │ │ │ +001007b0: 6869 7320 534f 4150 2046 6175 6c74 2e20 his SOAP Fault. │ │ │ │ +001007c0: 5468 6520 534f 4150 2046 6175 6c74 2069 The SOAP Fault i │ │ │ │ +001007d0: 7320 7365 6e74 2074 6f20 7468 6520 636c s sent to the cl │ │ │ │ +001007e0: 6965 6e74 2e20 5468 6520 636c 6965 6e74 ient. The client │ │ │ │ +001007f0: 2070 6f70 756c 6174 6573 2061 2053 4f41 populates a SOA │ │ │ │ +00100800: 5020 4661 756c 7420 7374 7275 6374 7572 P Fault structur │ │ │ │ +00100810: 6520 7468 6174 2063 6f6e 7461 696e 7320 e that contains │ │ │ │ +00100820: 7468 6520 534f 4150 2046 6175 6c74 206d the SOAP Fault m │ │ │ │ +00100830: 6573 7361 6765 2077 6974 6820 6465 7461 essage with deta │ │ │ │ +00100840: 696c 732e 3c2f 703e 0a3c 703e 5365 7276 ils.

    .

    Serv │ │ │ │ +00100850: 6572 2d73 6964 6520 6661 756c 7473 2061 er-side faults a │ │ │ │ +00100860: 7265 2072 6169 7365 6420 7769 7468 203c re raised with < │ │ │ │ +00100870: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_sender_f │ │ │ │ +00100920: 6175 6c74 3c2f 613e 3c2f 636f 6465 3e20 ault │ │ │ │ +00100930: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap_re │ │ │ │ +001009e0: 6365 6976 6572 5f66 6175 6c74 3c2f 613e ceiver_fault │ │ │ │ +001009f0: 3c2f 636f 6465 3e2e 2054 6865 203c 636f . The soap_sender_fau │ │ │ │ +00100ab0: 6c74 3c2f 613e 3c2f 636f 6465 3e20 6361 lt ca │ │ │ │ +00100ac0: 6c6c 2073 686f 756c 6420 6265 2075 7365 ll should be use │ │ │ │ +00100ad0: 6420 746f 2069 6e66 6f72 6d20 7468 6174 d to inform that │ │ │ │ +00100ae0: 2074 6865 2073 656e 6465 7220 6973 2061 the sender is a │ │ │ │ +00100af0: 7420 6661 756c 7420 616e 6420 7468 6520 t fault and the │ │ │ │ +00100b00: 7365 6e64 6572 2028 636c 6965 6e74 2920 sender (client) │ │ │ │ +00100b10: 7368 6f75 6c64 206e 6f74 2072 652d 7365 should not re-se │ │ │ │ +00100b20: 6e64 2074 6865 2072 6571 7565 7374 2e20 nd the request. │ │ │ │ +00100b30: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap_r │ │ │ │ +00100be0: 6563 6569 7665 725f 6661 756c 743c 2f61 eceiver_fault call sh │ │ │ │ +00100c00: 6f75 6c64 2062 6520 7573 6564 2074 6f20 ould be used to │ │ │ │ +00100c10: 696e 6469 6361 7465 2061 2074 656d 706f indicate a tempo │ │ │ │ +00100c20: 7261 7279 2073 6572 7665 722d 7369 6465 rary server-side │ │ │ │ +00100c30: 2070 726f 626c 656d 2c20 736f 2061 2073 problem, so a s │ │ │ │ +00100c40: 656e 6465 7220 2863 6c69 656e 7429 2063 ender (client) c │ │ │ │ +00100c50: 616e 2072 652d 7365 6e64 2074 6865 2072 an re-send the r │ │ │ │ +00100c60: 6571 7565 7374 206c 6174 6572 2e20 466f equest later. Fo │ │ │ │ +00100c70: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

    .< │ │ │ │ +00100c80: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +00100c90: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    int ns1_ │ │ │ │ +00100cd0: 5f6d 794d 6574 686f 6428 3c73 7061 6e20 _myMethod( │ │ │ │ +00100cf0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +00100d30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00100d40: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00100d50: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +00100d60: 2e2e 2e29 203c 2f64 6976 3e0a 3c64 6976 ...)
    .
    {< │ │ │ │ 00100d80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -00100da0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // │ │ │ │ -00100dd0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00100df0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ -00100e10: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soa │ │ │ │ -00100e70: 705f 7265 6365 6976 6572 5f66 6175 6c74 p_receiver_fault │ │ │ │ -00100e80: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -00100eb0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "Resource │ │ │ │ -00100ee0: 2074 656d 706f 7261 7269 6c79 2075 6e61 temporarily una │ │ │ │ -00100ef0: 7661 696c 6162 6c65 2671 756f 743b 3c2f vailable", NULL); // return fa │ │ │ │ -00100f30: 756c 7420 746f 2073 656e 6465 7220 3c2f ult to sender
    .
    }< │ │ │ │ -00100f60: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -00100f80: 496e 2074 6865 2065 7861 6d70 6c65 2c20 In the example, │ │ │ │ -00100f90: 7468 6520 534f 4150 2046 6175 6c74 2064 the SOAP Fault d │ │ │ │ -00100fa0: 6574 6169 6c73 2077 6572 6520 656d 7074 etails were empt │ │ │ │ -00100fb0: 7920 284e 554c 4c29 2e20 596f 7520 6d61 y (NULL). You ma │ │ │ │ -00100fc0: 7920 7061 7373 2061 6e20 584d 4c20 6672 y pass an XML fr │ │ │ │ -00100fd0: 6167 6d65 6e74 2c20 7768 6963 6820 7769 agment, which wi │ │ │ │ -00100fe0: 6c6c 2062 6520 6c69 7465 7261 6c6c 7920 ll be literally │ │ │ │ -00100ff0: 696e 636c 7564 6564 2069 6e20 7468 6520 included in the │ │ │ │ -00101000: 534f 4150 2046 6175 6c74 206d 6573 7361 SOAP Fault messa │ │ │ │ -00101010: 6765 2e20 466f 7220 5753 2d49 2042 6173 ge. For WS-I Bas │ │ │ │ -00101020: 6963 2050 726f 6669 6c65 2063 6f6d 706c ic Profile compl │ │ │ │ -00101030: 6961 6e63 652c 2079 6f75 206d 7573 7420 iance, you must │ │ │ │ -00101040: 7061 7373 2061 6e20 584d 4c20 7374 7269 pass an XML stri │ │ │ │ -00101050: 6e67 2077 6974 6820 6f6e 6520 6f72 206d ng with one or m │ │ │ │ -00101060: 6f72 6520 6e61 6d65 7370 6163 6520 7175 ore namespace qu │ │ │ │ -00101070: 616c 6966 6965 6420 656c 656d 656e 7473 alified elements │ │ │ │ -00101080: 2c20 7375 6368 2061 733a 3c2f 703e 0a3c , such as:

    .< │ │ │ │ -00101090: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -001010a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    return < │ │ │ │ -001010e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001010f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00101100: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga │ │ │ │ -00101110: 3931 6463 3662 6363 3363 3566 3335 6530 91dc6bcc3c5f35e0 │ │ │ │ -00101120: 3233 6237 3861 3666 3436 6137 3965 6436 23b78a6f46a79ed6 │ │ │ │ -00101130: 223e 736f 6170 5f72 6563 6569 7665 725f ">soap_receiver_ │ │ │ │ -00101140: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap, "Res │ │ │ │ -001011a0: 6f75 7263 6520 7465 6d70 6f72 6172 696c ource temporaril │ │ │ │ -001011b0: 7920 756e 6176 6169 6c61 626c 6526 7175 y unavailable&qu │ │ │ │ -001011c0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "&l │ │ │ │ -001011f0: 743b 6572 726f 7263 6f64 6520 786d 6c6e t;errorcode xmln │ │ │ │ -00101200: 733d 2623 3339 3b68 7474 703a 2f2f 7465 s='http://te │ │ │ │ -00101210: 6d70 7572 692e 6f72 6726 2333 393b 2667 mpuri.org'&g │ │ │ │ -00101220: 743b 3132 3326 6c74 3b2f 6572 726f 7263 t;123</errorc │ │ │ │ -00101230: 6f64 6526 6774 3b26 6c74 3b65 7272 6f72 ode><error │ │ │ │ -00101240: 696e 666f 2078 6d6c 6e73 3d26 2333 393b info xmlns=' │ │ │ │ -00101250: 6874 7470 3a2f 2f74 656d 7075 7269 2e6f http://tempuri.o │ │ │ │ -00101260: 7267 2623 3339 3b26 6774 3b61 6263 266c rg'>abc&l │ │ │ │ -00101270: 743b 2f65 7272 6f72 696e 666f 2667 743b t;/errorinfo> │ │ │ │ -00101280: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");< │ │ │ │ -00101290: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -001012b0: 5768 656e 2061 2073 6572 7669 6365 206f When a service o │ │ │ │ -001012c0: 7065 7261 7469 6f6e 206e 6565 6473 2074 peration needs t │ │ │ │ -001012d0: 6f20 706f 7075 6c61 7465 2053 4f41 5020 o populate SOAP │ │ │ │ -001012e0: 4661 756c 7420 6465 7461 696c 7320 7769 Fault details wi │ │ │ │ -001012f0: 7468 2061 2061 7070 6c69 6361 7469 6f6e th a application │ │ │ │ -00101300: 2d73 7065 6369 6669 6320 6461 7461 2c20 -specific data, │ │ │ │ -00101310: 6974 2064 6f65 7320 736f 2062 7920 6173 it does so by as │ │ │ │ -00101320: 7369 676e 696e 6720 7468 6520 3c63 6f64 signing the soap:: │ │ │ │ -001013f0: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault │ │ │ │ -00101400: 206d 656d 6265 7220 6f66 2074 6865 2063 member of the c │ │ │ │ -00101410: 7572 7265 6e74 2072 6566 6572 656e 6365 urrent reference │ │ │ │ -00101420: 2074 6f20 7468 6520 636f 6e74 6578 7420 to the context │ │ │ │ -00101430: 7769 7468 2061 7070 726f 7072 6961 7465 with appropriate │ │ │ │ -00101440: 2064 6174 6120 6173 736f 6369 6174 6564 data associated │ │ │ │ -00101450: 2077 6974 6820 7468 6520 6578 6365 7074 with the except │ │ │ │ -00101460: 696f 6e20 616e 6420 6279 2072 6574 7572 ion and by retur │ │ │ │ -00101470: 6e69 6e67 2074 6865 2065 7272 6f72 203c ning the error < │ │ │ │ -00101480: 636f 6465 3e23 534f 4150 5f46 4155 4c54 code>#SOAP_FAULT │ │ │ │ -00101490: 3c2f 636f 6465 3e2e 2046 6f72 2065 7861 . For exa │ │ │ │ -001014a0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    │ │ │ │ -001014c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_receiv │ │ │ │ -00101530: 6572 5f66 6175 6c74 3c2f 613e 283c 6120 er_fault(soap, " │ │ │ │ -00101590: 4572 726f 7220 6d65 7373 6167 6526 7175 Error message&qu │ │ │ │ -001015a0: 6f74 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c ot;, NULL │ │ │ │ -001015b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if │ │ │ │ -001015f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -00101620: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ve │ │ │ │ -00101670: 7273 696f 6e3c 2f61 3e20 3d3d 2032 2920 rsion == 2) │ │ │ │ -00101680: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // SOAP 1. │ │ │ │ -001016a0: 3220 6973 2075 7365 6420 3c2f 7370 616e 2 is used
    .
    {
    .
    soa │ │ │ │ -00101710: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->fault-> │ │ │ │ -00101770: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ; │ │ │ │ -001017d0: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail │ │ │ │ -001017e0: 3c2f 613e 203d 2073 6f61 705f 6e65 775f = soap_new_ │ │ │ │ -001017f0: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail │ │ │ │ -00101800: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -00101830: 2c20 2d31 293b 3c2f 6469 763e 0a3c 6469 , -1);
    . │ │ │ │ -00101850: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -00101880: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fa │ │ │ │ -001018d0: 756c 743c 2f61 3e2d 2667 743b 3c61 2063 ult->SOAP_ │ │ │ │ -00101940: 454e 565f 5f44 6574 6169 6c3c 2f61 3e2d ENV__Detail- │ │ │ │ -00101950: 2667 743b 3c61 2063 6c61 7373 3d22 636f >__type = │ │ │ │ -001019c0: 2053 4f41 505f 5459 5045 5f6e 7331 5f5f SOAP_TYPE_ns1__ │ │ │ │ -001019d0: 6d79 5374 6163 6b44 6174 6154 7970 653b myStackDataType; │ │ │ │ -001019e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // stack │ │ │ │ -00101a00: 7479 7065 203c 2f73 7061 6e3e 3c2f 6469 type .. │ │ │ │ -00101c00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -00101c30: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fa │ │ │ │ -00101c80: 756c 743c 2f61 3e2d 2667 743b 3c61 2063 ult->SOAP_ │ │ │ │ -00101cf0: 454e 565f 5f44 6574 6169 6c3c 2f61 3e2d ENV__Detail- │ │ │ │ -00101d00: 2667 743b 3c61 2063 6c61 7373 3d22 636f >__any = │ │ │ │ -00101d70: 4e55 4c4c 3b20 2020 2020 2020 2020 2020 NULL; │ │ │ │ -00101d80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00101d90: 203c 7370 616e 2063 6c61 7373 3d22 636f // no oth │ │ │ │ -00101db0: 6572 2058 4d4c 2064 6174 6120 3c2f 7370 er XML data
    .
    } .
    else ... //.
    return │ │ │ │ +00100e00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_receiver │ │ │ │ +00100e60: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, "Re │ │ │ │ +00100ec0: 736f 7572 6365 2074 656d 706f 7261 7269 source temporari │ │ │ │ +00100ed0: 6c79 2075 6e61 7661 696c 6162 6c65 2671 ly unavailable&q │ │ │ │ +00100ee0: 756f 743b 3c2f 7370 616e 3e2c 204e 554c uot;, NUL │ │ │ │ +00100ef0: 4c29 3b20 3c73 7061 6e20 636c 6173 733d L); // ret │ │ │ │ +00100f10: 7572 6e20 6661 756c 7420 746f 2073 656e urn fault to sen │ │ │ │ +00100f20: 6465 7220 3c2f 7370 616e 3e3c 2f64 6976 der
    .
    }
    .

    In the exa │ │ │ │ +00100f70: 6d70 6c65 2c20 7468 6520 534f 4150 2046 mple, the SOAP F │ │ │ │ +00100f80: 6175 6c74 2064 6574 6169 6c73 2077 6572 ault details wer │ │ │ │ +00100f90: 6520 656d 7074 7920 284e 554c 4c29 2e20 e empty (NULL). │ │ │ │ +00100fa0: 596f 7520 6d61 7920 7061 7373 2061 6e20 You may pass an │ │ │ │ +00100fb0: 584d 4c20 6672 6167 6d65 6e74 2c20 7768 XML fragment, wh │ │ │ │ +00100fc0: 6963 6820 7769 6c6c 2062 6520 6c69 7465 ich will be lite │ │ │ │ +00100fd0: 7261 6c6c 7920 696e 636c 7564 6564 2069 rally included i │ │ │ │ +00100fe0: 6e20 7468 6520 534f 4150 2046 6175 6c74 n the SOAP Fault │ │ │ │ +00100ff0: 206d 6573 7361 6765 2e20 466f 7220 5753 message. For WS │ │ │ │ +00101000: 2d49 2042 6173 6963 2050 726f 6669 6c65 -I Basic Profile │ │ │ │ +00101010: 2063 6f6d 706c 6961 6e63 652c 2079 6f75 compliance, you │ │ │ │ +00101020: 206d 7573 7420 7061 7373 2061 6e20 584d must pass an XM │ │ │ │ +00101030: 4c20 7374 7269 6e67 2077 6974 6820 6f6e L string with on │ │ │ │ +00101040: 6520 6f72 206d 6f72 6520 6e61 6d65 7370 e or more namesp │ │ │ │ +00101050: 6163 6520 7175 616c 6966 6965 6420 656c ace qualified el │ │ │ │ +00101060: 656d 656e 7473 2c20 7375 6368 2061 733a ements, such as: │ │ │ │ +00101070: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    return soap_rec │ │ │ │ +00101120: 6569 7665 725f 6661 756c 743c 2f61 3e28 eiver_fault( │ │ │ │ +00101130: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00101160: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +00101180: 6f74 3b52 6573 6f75 7263 6520 7465 6d70 ot;Resource temp │ │ │ │ +00101190: 6f72 6172 696c 7920 756e 6176 6169 6c61 orarily unavaila │ │ │ │ +001011a0: 626c 6526 7175 6f74 3b3c 2f73 7061 6e3e ble" │ │ │ │ +001011b0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ +001011d0: 756f 743b 266c 743b 6572 726f 7263 6f64 uot;<errorcod │ │ │ │ +001011e0: 6520 786d 6c6e 733d 2623 3339 3b68 7474 e xmlns='htt │ │ │ │ +001011f0: 703a 2f2f 7465 6d70 7572 692e 6f72 6726 p://tempuri.org& │ │ │ │ +00101200: 2333 393b 2667 743b 3132 3326 6c74 3b2f #39;>123</ │ │ │ │ +00101210: 6572 726f 7263 6f64 6526 6774 3b26 6c74 errorcode>< │ │ │ │ +00101220: 3b65 7272 6f72 696e 666f 2078 6d6c 6e73 ;errorinfo xmlns │ │ │ │ +00101230: 3d26 2333 393b 6874 7470 3a2f 2f74 656d ='http://tem │ │ │ │ +00101240: 7075 7269 2e6f 7267 2623 3339 3b26 6774 puri.org'> │ │ │ │ +00101250: 3b61 6263 266c 743b 2f65 7272 6f72 696e ;abc</errorin │ │ │ │ +00101260: 666f 2667 743b 2671 756f 743b 3c2f 7370 fo>");
    .

    When a ser │ │ │ │ +001012a0: 7669 6365 206f 7065 7261 7469 6f6e 206e vice operation n │ │ │ │ +001012b0: 6565 6473 2074 6f20 706f 7075 6c61 7465 eeds to populate │ │ │ │ +001012c0: 2053 4f41 5020 4661 756c 7420 6465 7461 SOAP Fault deta │ │ │ │ +001012d0: 696c 7320 7769 7468 2061 2061 7070 6c69 ils with a appli │ │ │ │ +001012e0: 6361 7469 6f6e 2d73 7065 6369 6669 6320 cation-specific │ │ │ │ +001012f0: 6461 7461 2c20 6974 2064 6f65 7320 736f data, it does so │ │ │ │ +00101300: 2062 7920 6173 7369 676e 696e 6720 7468 by assigning th │ │ │ │ +00101310: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e │ │ │ │ +001013d0: 736f 6170 3a3a 6661 756c 743c 2f61 3e3c soap::fault< │ │ │ │ +001013e0: 2f63 6f64 653e 206d 656d 6265 7220 6f66 /code> member of │ │ │ │ +001013f0: 2074 6865 2063 7572 7265 6e74 2072 6566 the current ref │ │ │ │ +00101400: 6572 656e 6365 2074 6f20 7468 6520 636f erence to the co │ │ │ │ +00101410: 6e74 6578 7420 7769 7468 2061 7070 726f ntext with appro │ │ │ │ +00101420: 7072 6961 7465 2064 6174 6120 6173 736f priate data asso │ │ │ │ +00101430: 6369 6174 6564 2077 6974 6820 7468 6520 ciated with the │ │ │ │ +00101440: 6578 6365 7074 696f 6e20 616e 6420 6279 exception and by │ │ │ │ +00101450: 2072 6574 7572 6e69 6e67 2074 6865 2065 returning the e │ │ │ │ +00101460: 7272 6f72 203c 636f 6465 3e23 534f 4150 rror #SOAP │ │ │ │ +00101470: 5f46 4155 4c54 3c2f 636f 6465 3e2e 2046 _FAULT. F │ │ │ │ +00101480: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ +00101490: 3c64 6976 2063 6c61 7373 3d22 6672 6167 .
    soap-> │ │ │ │ +00101700: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fault->SOAP_ENV__ │ │ │ │ +001017c0: 4465 7461 696c 3c2f 613e 203d 2073 6f61 Detail = soa │ │ │ │ +001017d0: 705f 6e65 775f 534f 4150 5f45 4e56 5f5f p_new_SOAP_ENV__ │ │ │ │ +001017e0: 4465 7461 696c 283c 6120 636c 6173 733d Detail(so │ │ │ │ +00101810: 6170 3c2f 613e 2c20 2d31 293b 3c2f 6469 ap, -1);.
    so │ │ │ │ +00101860: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fault-&g │ │ │ │ +001018c0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;SOAP_ENV__Detai │ │ │ │ +00101930: 6c3c 2f61 3e2d 2667 743b 3c61 2063 6c61 l->__type │ │ │ │ +001019a0: 3c2f 613e 203d 2053 4f41 505f 5459 5045 = SOAP_TYPE │ │ │ │ +001019b0: 5f6e 7331 5f5f 6d79 5374 6163 6b44 6174 _ns1__myStackDat │ │ │ │ +001019c0: 6154 7970 653b 203c 7370 616e 2063 6c61 aType; // │ │ │ │ +001019e0: 7374 6163 6b20 7479 7065 203c 2f73 7061 stack type
    .
    soap-> │ │ │ │ +00101a40: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;fault< │ │ │ │ +00101a90: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->SOAP_ENV_ │ │ │ │ +00101b00: 5f44 6574 6169 6c3c 2f61 3e2d 2667 743b _Detail-> │ │ │ │ +00101b10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 │ │ │ │ +00101b70: 6661 756c 743c 2f61 3e20 3d20 7370 3b20 fault = sp; │ │ │ │ +00101b80: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00101b90: 2020 2020 2020 2020 2020 2020 203c 7370 // point to s │ │ │ │ +00101bc0: 7461 636b 203c 2f73 7061 6e3e 3c2f 6469 tack .. │ │ │ │ +00101db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    else
    .
    {.
    {
    . │ │ │ │ -00101e50: 2020 3c61 2063 6c61 7373 3d22 636f 6465
    soap->f │ │ │ │ -00101ed0: 6175 6c74 3c2f 613e 2d26 6774 3b3c 6120 ault->deta │ │ │ │ -00101f40: 696c 3c2f 613e 203d 2073 6f61 705f 6e65 il = soap_ne │ │ │ │ -00101f50: 775f 534f 4150 5f45 4e56 5f5f 4465 7461 w_SOAP_ENV__Deta │ │ │ │ -00101f60: 696c 283c 6120 636c 6173 733d 2263 6f64 il(soap, -1);
    . │ │ │ │ -00101fa0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap< │ │ │ │ -00101fe0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault->< │ │ │ │ -00102040: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00102050: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ -00102060: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ -00102070: 6661 756c 742e 6874 6d6c 2361 6634 3963 fault.html#af49c │ │ │ │ -00102080: 3261 3139 3236 6562 6634 6338 3635 6464 2a1926ebf4c865dd │ │ │ │ -00102090: 6434 3434 3936 3062 3961 6462 223e 6465 d444960b9adb">de │ │ │ │ -001020a0: 7461 696c 3c2f 613e 2d26 6774 3b3c 6120 tail->__t │ │ │ │ -00102110: 7970 653c 2f61 3e20 3d20 534f 4150 5f54 ype = SOAP_T │ │ │ │ -00102120: 5950 455f 6e73 315f 5f6d 7953 7461 636b YPE_ns1__myStack │ │ │ │ -00102130: 4461 7461 5479 7065 3b20 3c73 7061 6e20 DataType; │ │ │ │ -00102150: 2f2f 2073 7461 636b 2074 7970 6520 3c2f // stack type
    ...< │ │ │ │ -00102510: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00102520: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    return SOAP_FAU │ │ │ │ -001025c0: 4c54 3c2f 613e 3b20 3c73 7061 6e20 636c LT; // │ │ │ │ -001025e0: 2072 6574 7572 6e20 6672 6f6d 2073 6572 return from ser │ │ │ │ -001025f0: 7669 6365 206f 7065 7261 7469 6f6e 2063 vice operation c │ │ │ │ -00102600: 616c 6c20 7769 7468 2074 6865 2066 6175 all with the fau │ │ │ │ -00102610: 6c74 3c2f 7370 616e 3e3c 2f64 6976 3e0a lt
    . │ │ │ │ -00102620: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ -001026d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    short versio │ │ │ │ -001026f0: 6e3c 2f64 6976 3e3c 6469 7620 636c 6173 n
    SOAP v │ │ │ │ -00102710: 6572 7369 6f6e 2028 3020 3d20 6e6f 2053 ersion (0 = no S │ │ │ │ -00102720: 4f41 502c 2031 203d 2053 4f41 5020 312e OAP, 1 = SOAP 1. │ │ │ │ -00102730: 312c 2032 203d 2053 4f41 5020 312e 3229 1, 2 = SOAP 1.2) │ │ │ │ -00102740: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -00102760: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -00102770: 6f61 7032 2e68 3a32 3835 313c 2f64 6976 oap2.h:2851
    .
    < │ │ │ │ -001027a0: 703e 4865 7265 2c20 3c63 6f64 653e 3c61 p>Here, so │ │ │ │ -00102850: 6170 5f72 6563 6569 7665 725f 6661 756c ap_receiver_faul │ │ │ │ -00102860: 743c 2f61 3e3c 2f63 6f64 653e 2061 6c6c t all │ │ │ │ -00102870: 6f63 6174 6573 2061 2066 6175 6c74 2073 ocates a fault s │ │ │ │ -00102880: 7472 7563 7420 7468 656e 2077 6520 7365 truct then we se │ │ │ │ -00102890: 7420 7468 6520 534f 4150 2046 6175 6c74 t the SOAP Fault │ │ │ │ -001028a0: 2064 6574 6169 6c73 2061 7320 7368 6f77 details as show │ │ │ │ -001028b0: 6e2e 3c2f 703e 0a3c 703e 4e6f 7465 2074 n.

    .

    Note t │ │ │ │ -001028c0: 6861 7420 534f 4150 2031 2e32 2073 7570 hat SOAP 1.2 sup │ │ │ │ -001028d0: 706f 7274 7320 6e65 7374 6564 2066 6175 ports nested fau │ │ │ │ -001028e0: 6c74 2073 7562 2d63 6f64 6573 2e20 5468 lt sub-codes. Th │ │ │ │ -001028f0: 6573 6520 6361 6e20 6265 2073 6574 2061 ese can be set a │ │ │ │ -00102900: 7320 666f 6c6c 6f77 733a 3c2f 703e 0a3c s follows:

    .< │ │ │ │ -00102910: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -00102920: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    str │ │ │ │ -00102950: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct SOAP_ENV_ │ │ │ │ -001029a0: 5f43 6f64 653c 2f61 3e20 2a73 7562 636f _Code *subco │ │ │ │ -001029b0: 6465 3120 3d20 736f 6170 5f6e 6577 5f53 de1 = soap_new_S │ │ │ │ -001029c0: 4f41 505f 454e 565f 5f43 6f64 6528 3c61 OAP_ENV__Code(soap);< │ │ │ │ -00102a00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ -00102a30: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_ENV │ │ │ │ -00102a80: 5f5f 436f 6465 3c2f 613e 202a 7375 6263 __Code *subc │ │ │ │ -00102a90: 6f64 6532 203d 2073 6f61 705f 6e65 775f ode2 = soap_new_ │ │ │ │ -00102aa0: 534f 4150 5f45 4e56 5f5f 436f 6465 283c SOAP_ENV__Code(< │ │ │ │ -00102ab0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00102ac0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00102ad0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ -00102ae0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap │ │ │ │ -00102b50: 5f73 656e 6465 725f 6661 756c 743c 2f61 _sender_fault(soap, & │ │ │ │ -00102bb0: 7175 6f74 3b54 6865 2072 6571 7565 7374 quot;The request │ │ │ │ -00102bc0: 6564 2070 726f 6669 6c65 2074 6f6b 656e ed profile token │ │ │ │ -00102bd0: 2050 726f 6669 6c65 546f 6b65 6e20 646f ProfileToken do │ │ │ │ -00102be0: 6573 206e 6f74 2065 7869 7374 2e26 7175 es not exist.&qu │ │ │ │ -00102bf0: 6f74 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c ot;, NULL │ │ │ │ -00102c00: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    subc │ │ │ │ -00102c20: 6f64 6531 2d26 6774 3b3c 6120 636c 6173 ode1->SOAP_ENV_ │ │ │ │ -00102c90: 5f56 616c 7565 3c2f 613e 203d 2028 3c73 _Value = (char*)"ter:Inval │ │ │ │ -00102cf0: 6964 4172 6773 2671 756f 743b 3c2f 7370 idArgs"; // a │ │ │ │ -00102d20: 514e 616d 6520 7661 6c75 653c 2f73 7061 QName value
    .
    subco │ │ │ │ -00102d50: 6465 312d 2667 743b 3c61 2063 6c61 7373 de1->SOAP_ENV__ │ │ │ │ -00102dc0: 5375 6263 6f64 653c 2f61 3e20 3d20 7375 Subcode = su │ │ │ │ -00102dd0: 6263 6f64 6532 3b3c 2f64 6976 3e0a 3c64 bcode2;
    . │ │ │ │ -00102df0: 7375 6263 6f64 6532 2d26 6774 3b3c 6120 subcode2->SOAP_ │ │ │ │ -00102e60: 454e 565f 5f56 616c 7565 3c2f 613e 203d ENV__Value = │ │ │ │ -00102e70: 2028 3c73 7061 6e20 636c 6173 733d 226b (char │ │ │ │ -00102e90: 3c2f 7370 616e 3e2a 293c 7370 616e 2063 *)"ter:N │ │ │ │ -00102ec0: 6f50 726f 6669 6c65 2671 756f 743b 3c2f oProfile"; // │ │ │ │ -00102ef0: 6120 514e 616d 6520 7661 6c75 653c 2f73 a QName value
    .
    sub │ │ │ │ -00102f20: 636f 6465 322d 2667 743b 3c61 2063 6c61 code2->SOAP_ENV │ │ │ │ -00102f90: 5f5f 5375 6263 6f64 653c 2f61 3e20 3d20 __Subcode = │ │ │ │ -00102fa0: 4e55 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 NULL;
    .
    soap-&g │ │ │ │ -00102ff0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;fault │ │ │ │ -00103040: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->SOAP_ENV │ │ │ │ -001030b0: 5f5f 436f 6465 3c2f 613e 2d26 6774 3b3c __Code->< │ │ │ │ -001030c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001030d0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ -001030e0: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ -001030f0: 636f 6465 2e68 746d 6c23 6132 6434 3461 code.html#a2d44a │ │ │ │ -00103100: 6338 3630 6237 3939 3536 6366 6632 3631 c860b79956cff261 │ │ │ │ -00103110: 3331 6661 3638 6234 6335 6122 3e53 4f41 31fa68b4c5a">SOA │ │ │ │ -00103120: 505f 454e 565f 5f53 7562 636f 6465 3c2f P_ENV__Subcode = subcode1;.
    return < │ │ │ │ -00103180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00103190: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001031a0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ -001031b0: 6166 3237 6431 6631 3031 3330 6534 6461 af27d1f10130e4da │ │ │ │ -001031c0: 3038 3039 3735 3731 3161 3731 3932 6630 080975711a7192f0 │ │ │ │ -001031d0: 3722 3e53 4f41 505f 4641 554c 543c 2f61 7">SOAP_FAULT;
    .
    < │ │ │ │ -001031f0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -00103200: 3c70 3e54 6869 7320 7072 6f64 7563 6573

    This produces │ │ │ │ -00103210: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    │ │ │ │ -00103250: 266c 743b 3c73 7061 6e20 636c 6173 733d <SO │ │ │ │ -00103270: 4150 2d45 4e56 3a46 6175 6c74 3c2f 7370 AP-ENV:Fault>
    . │ │ │ │ -001032a0: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ -001032c0: 534f 4150 2d45 4e56 3a43 6f64 653c 2f73 SOAP-ENV:Code
    >
    .< │ │ │ │ -001032e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001032f0: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <SOAP-ENV:Valu │ │ │ │ -00103320: 653c 2f73 7061 6e3e 2667 743b 3c73 7061 e>SOAP-ENV:Sende │ │ │ │ -00103350: 723c 2f73 7061 6e3e 266c 743b 2f3c 7370 r</SOAP-ENV: │ │ │ │ -00103380: 5661 6c75 653c 2f73 7061 6e3e 2667 743b Value> │ │ │ │ -00103390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -001033b0: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;SOAP- │ │ │ │ -001033d0: 454e 563a 5375 6263 6f64 653c 2f73 7061 ENV:Subcode>
    . │ │ │ │ -00103400: 2020 2020 2026 6c74 3b3c 7370 616e 2063 <SOAP-ENV:Valu │ │ │ │ -00103430: 653c 2f73 7061 6e3e 2667 743b 3c73 7061 e>ter:InvalidArg │ │ │ │ -00103460: 733c 2f73 7061 6e3e 266c 743b 2f3c 7370 s</SOAP-ENV: │ │ │ │ -00103490: 5661 6c75 653c 2f73 7061 6e3e 2667 743b Value> │ │ │ │ -001034a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    & │ │ │ │ -001034c0: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA │ │ │ │ -001034e0: 502d 454e 563a 5375 6263 6f64 653c 2f73 P-ENV:Subcode>
    .< │ │ │ │ -00103500: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00103510: 3e20 2020 2020 2020 2026 6c74 3b3c 7370 > <SOAP-ENV: │ │ │ │ -00103540: 5661 6c75 653c 2f73 7061 6e3e 2667 743b Value> │ │ │ │ -00103550: 3c73 7061 6e20 636c 6173 733d 226b 6579 ter:NoProf │ │ │ │ -00103570: 696c 653c 2f73 7061 6e3e 2026 6c74 3b2f ile </ │ │ │ │ -00103580: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E │ │ │ │ -001035a0: 4e56 3a56 616c 7565 3c2f 7370 616e 3e26 NV:Value& │ │ │ │ -001035b0: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    │ │ │ │ -001035d0: 2020 266c 743b 2f3c 7370 616e 2063 6c61 </SOAP-ENV:Subcod │ │ │ │ -00103600: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.
    </SOAP-ENV │ │ │ │ -00103650: 3a53 7562 636f 6465 3c2f 7370 616e 3e26 :Subcode& │ │ │ │ -00103660: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    &l │ │ │ │ -00103680: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/SOA │ │ │ │ -001036a0: 502d 454e 563a 436f 6465 3c2f 7370 616e P-ENV:Code>
    .
    │ │ │ │ -001036d0: 266c 743b 3c73 7061 6e20 636c 6173 733d <SO │ │ │ │ -001036f0: 4150 2d45 4e56 3a52 6561 736f 6e3c 2f73 AP-ENV:Reason>
    .< │ │ │ │ -00103710: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00103720: 3e20 2020 2026 6c74 3b3c 7370 616e 2063 > <SOAP-ENV:Text │ │ │ │ -00103750: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c xm │ │ │ │ -00103770: 6c3a 6c61 6e67 3c2f 7370 616e 3e3d 3c73 l:lang=" │ │ │ │ -001037a0: 656e 2671 756f 743b 3c2f 7370 616e 3e26 en"& │ │ │ │ -001037b0: 6774 3b3c 7370 616e 2063 6c61 7373 3d22 gt;The reques │ │ │ │ -001037f0: 7465 643c 2f73 7061 6e3e 203c 7370 616e ted profile │ │ │ │ -00103820: 3c73 7061 6e20 636c 6173 733d 226b 6579 token Profile │ │ │ │ -00103860: 546f 6b65 6e3c 2f73 7061 6e3e 203c 7370 Token does < │ │ │ │ -00103890: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001038a0: 6f72 6422 3e6e 6f74 3c2f 7370 616e 3e20 ord">not │ │ │ │ -001038b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 exist.</SOAP-ENV:Text< │ │ │ │ -00103900: 2f73 7061 6e3e 2667 743b 3c2f 6469 763e /span>>
    │ │ │ │ -00103910: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    </SOAP-ENV:Rea │ │ │ │ -00103950: 736f 6e3c 2f73 7061 6e3e 2667 743b 3c2f son>.
    </SOAP-ENV:F │ │ │ │ -001039a0: 6175 6c74 3c2f 7370 616e 3e26 6774 3b3c ault>< │ │ │ │ -001039b0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    Service o │ │ │ │ -001039e0: 7065 7261 7469 6f6e 7320 696d 706c 656d perations implem │ │ │ │ -001039f0: 656e 7461 7469 6f6e 2069 6e20 6120 5765 entation in a We │ │ │ │ -00103a00: 6220 7365 7276 6963 6520 6170 706c 6963 b service applic │ │ │ │ -00103a10: 6174 696f 6e20 6361 6e20 7265 7475 726e ation can return │ │ │ │ -00103a20: 2076 6172 696f 7573 2053 4f41 5020 4661 various SOAP Fa │ │ │ │ -00103a30: 756c 7473 2063 7573 746f 6d69 7a65 6420 ults customized │ │ │ │ -00103a40: 696e 2074 6869 7320 7761 792e 3c2f 703e in this way.

    │ │ │ │ -00103a50: 0a3c 703e 534f 4150 2046 6175 6c74 2073 .

    SOAP Fault s │ │ │ │ -00103a60: 7472 7563 7475 7265 7320 6172 6520 6465 tructures are de │ │ │ │ -00103a70: 636c 6172 6564 203c 636f 6465 3e6d 7574 clared mut │ │ │ │ -00103a80: 6162 6c65 3c2f 636f 6465 3e2c 2077 6869 able, whi │ │ │ │ -00103a90: 6368 206d 6561 6e73 2074 6861 7420 7265 ch means that re │ │ │ │ -00103aa0: 2d64 6563 6c61 7261 7469 6f6e 7320 6f66 -declarations of │ │ │ │ -00103ab0: 2074 6865 2073 7472 7563 7475 7265 7320 the structures │ │ │ │ -00103ac0: 6172 6520 7065 726d 6974 7465 6420 616e are permitted an │ │ │ │ -00103ad0: 6420 6164 6469 7469 6f6e 616c 206d 656d d additional mem │ │ │ │ -00103ae0: 6265 7273 2061 7265 2063 6f6c 6c65 6374 bers are collect │ │ │ │ -00103af0: 6564 2069 6e74 6f20 6f6e 6520 6669 6e61 ed into one fina │ │ │ │ -00103b00: 6c20 7374 7275 6374 7572 6520 6279 2074 l structure by t │ │ │ │ -00103b10: 6865 2073 6f61 7063 7070 3220 746f 6f6c he soapcpp2 tool │ │ │ │ -00103b20: 2e3c 2f70 3e0a 3c70 3e46 6f72 2061 6e20 .

    .

    For an │ │ │ │ -00103b30: 6578 616d 706c 6520 7468 6174 2075 7365 example that use │ │ │ │ -00103b40: 6420 7468 6520 534f 4150 2046 6175 6c74 d the SOAP Fault │ │ │ │ -00103b50: 2064 6574 6169 6c20 7374 7275 6374 7572 detail structur │ │ │ │ -00103b60: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ -00103b90: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00103ba0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct SOAP_ENV__Detai │ │ │ │ -00103c00: 6c3c 2f61 3e20 3c2f 6469 763e 0a3c 6469 l
    .{ │ │ │ │ -00103c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    const │ │ │ │ -00103c60: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *f__invali │ │ │ │ -00103c90: 643b 3c2f 6469 763e 0a3c 6469 7620 636c d;
    .
    < │ │ │ │ -00103cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00103cc0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ -00103cf0: 3c2f 7370 616e 3e20 2a66 5f5f 756e 6176 *f__unav │ │ │ │ -00103d00: 6169 6c61 626c 653b 3c2f 6469 763e 0a3c ailable;
    .< │ │ │ │ -00103d10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00103d20: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i │ │ │ │ -00103d40: 6e74 3c2f 7370 616e 3e20 3c61 2063 6c61 nt __type │ │ │ │ -00103db0: 3c2f 613e 3b3c 2f64 6976 3e0a 3c64 6976 ;
    .
    │ │ │ │ -00103dd0: 2020 3c73 7061 6e20 636c 6173 733d 226b void │ │ │ │ -00103df0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *fault;
    ..} │ │ │ │ -00103f60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    //gsoap ns serv │ │ │ │ -00103fa0: 6963 6520 6d65 7468 6f64 2d66 6175 6c74 ice method-fault │ │ │ │ -00103fb0: 3a20 6c6f 6769 6e20 665f 5f69 6e76 616c : login f__inval │ │ │ │ -00103fc0: 6964 203c 2f73 7061 6e3e 3c2f 6469 763e id
    │ │ │ │ -00103fd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ -00104000: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth │ │ │ │ -00104010: 6f64 2d66 6175 6c74 3a20 6c6f 6769 6e20 od-fault: login │ │ │ │ -00104020: 665f 5f75 6e61 7661 696c 6162 6c65 203c f__unavailable < │ │ │ │ -00104030: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -00104050: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00104060: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int ns__login(.. │ │ │ │ -00104080: 2e29 3b3c 2f64 6976 3e0a 3c2f 6469 763e .);
    .
    │ │ │ │ -00104090: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Th │ │ │ │ -00106f60: 6520 3c63 6f64 653e 636c 6169 6d5f 5f66 e claim__f │ │ │ │ -00106f70: 6f72 6d3c 2f63 6f64 653e 2073 7472 7563 orm struc │ │ │ │ -00106f80: 7420 6973 2064 6563 6c61 7265 6420 696e t is declared in │ │ │ │ -00106f90: 2074 6865 2069 6e74 6572 6661 6365 2068 the interface h │ │ │ │ -00106fa0: 6561 6465 7220 6669 6c65 2061 733a 3c2f eader file as:.

    struct c │ │ │ │ -00107000: 6c61 696d 5f5f 666f 726d 203c 2f64 6976 laim__form
    s │ │ │ │ +00101e60: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->fault-& │ │ │ │ +00101ec0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;detail = s │ │ │ │ +00101f30: 6f61 705f 6e65 775f 534f 4150 5f45 4e56 oap_new_SOAP_ENV │ │ │ │ +00101f40: 5f5f 4465 7461 696c 283c 6120 636c 6173 __Detail( │ │ │ │ +00101f70: 736f 6170 3c2f 613e 2c20 2d31 293b 203c soap, -1); < │ │ │ │ +00101f80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->fault │ │ │ │ +00102020: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->detail-& │ │ │ │ +00102090: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;__type = │ │ │ │ +00102100: 534f 4150 5f54 5950 455f 6e73 315f 5f6d SOAP_TYPE_ns1__m │ │ │ │ +00102110: 7953 7461 636b 4461 7461 5479 7065 3b20 yStackDataType; │ │ │ │ +00102120: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // stack t │ │ │ │ +00102140: 7970 6520 3c2f 7370 616e 3e3c 2f64 6976 ype
    .
    soa │ │ │ │ +00102190: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->fault-> │ │ │ │ +001021f0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ; │ │ │ │ +00102250: 6465 7461 696c 3c2f 613e 2d26 6774 3b3c detail->< │ │ │ │ +00102260: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00102270: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ +00102280: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ +00102290: 6465 7461 696c 2e68 746d 6c23 6131 3539 detail.html#a159 │ │ │ │ +001022a0: 6433 3434 3735 3963 3036 6638 3265 6165 d344759c06f82eae │ │ │ │ +001022b0: 3139 3439 6165 6131 3061 3163 6622 3e66 1949aea10a1cf">f │ │ │ │ +001022c0: 6175 6c74 3c2f 613e 203d 2073 703b 2020 ault = sp; │ │ │ │ +001022d0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +001022e0: 2020 2020 2020 2020 2020 2020 3c73 7061 // point to st │ │ │ │ +00102310: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack
    .
    soa │ │ │ │ +00102360: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->fault-> │ │ │ │ +001023c0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ; │ │ │ │ +00102420: 6465 7461 696c 3c2f 613e 2d26 6774 3b3c detail->< │ │ │ │ +00102430: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00102440: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ +00102450: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ +00102460: 6465 7461 696c 2e68 746d 6c23 6132 3631 detail.html#a261 │ │ │ │ +00102470: 6534 3239 3231 3637 3361 3238 6264 3038 e42921673a28bd08 │ │ │ │ +00102480: 3561 3437 6434 6564 3635 6365 3622 3e5f 5a47d4ed65ce6">_ │ │ │ │ +00102490: 5f61 6e79 3c2f 613e 203d 204e 554c 4c3b _any = NULL; │ │ │ │ +001024a0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +001024b0: 2020 2020 2020 2020 2020 2020 3c73 7061 // no other XM │ │ │ │ +001024e0: 4c20 6461 7461 203c 2f73 7061 6e3e 3c2f L data .
    }
    . │ │ │ │ +00102510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    retu │ │ │ │ +00102540: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO │ │ │ │ +001025a0: 4150 5f46 4155 4c54 3c2f 613e 3b20 3c73 AP_FAULT; // return fr │ │ │ │ +001025d0: 6f6d 2073 6572 7669 6365 206f 7065 7261 om service opera │ │ │ │ +001025e0: 7469 6f6e 2063 616c 6c20 7769 7468 2074 tion call with t │ │ │ │ +001025f0: 6865 2066 6175 6c74 3c2f 7370 616e 3e3c he fault< │ │ │ │ +00102600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00102650: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +00102660: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ +001026a0: 6f61 703a 3a76 6572 7369 6f6e 3c2f 613e oap::version │ │ │ │ +001026b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    short │ │ │ │ +001026d0: 7665 7273 696f 6e3c 2f64 6976 3e3c 6469 version
    │ │ │ │ +001026f0: 534f 4150 2076 6572 7369 6f6e 2028 3020 SOAP version (0 │ │ │ │ +00102700: 3d20 6e6f 2053 4f41 502c 2031 203d 2053 = no SOAP, 1 = S │ │ │ │ +00102710: 4f41 5020 312e 312c 2032 203d 2053 4f41 OAP 1.1, 2 = SOA │ │ │ │ +00102720: 5020 312e 3229 3c2f 6469 763e 3c64 6976 P 1.2)
    < │ │ │ │ +00102740: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:285 │ │ │ │ +00102760: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 1
    .

    Here, soap_receive │ │ │ │ +00102840: 725f 6661 756c 743c 2f61 3e3c 2f63 6f64 r_fault allocates a f │ │ │ │ +00102860: 6175 6c74 2073 7472 7563 7420 7468 656e ault struct then │ │ │ │ +00102870: 2077 6520 7365 7420 7468 6520 534f 4150 we set the SOAP │ │ │ │ +00102880: 2046 6175 6c74 2064 6574 6169 6c73 2061 Fault details a │ │ │ │ +00102890: 7320 7368 6f77 6e2e 3c2f 703e 0a3c 703e s shown.

    .

    │ │ │ │ +001028a0: 4e6f 7465 2074 6861 7420 534f 4150 2031 Note that SOAP 1 │ │ │ │ +001028b0: 2e32 2073 7570 706f 7274 7320 6e65 7374 .2 supports nest │ │ │ │ +001028c0: 6564 2066 6175 6c74 2073 7562 2d63 6f64 ed fault sub-cod │ │ │ │ +001028d0: 6573 2e20 5468 6573 6520 6361 6e20 6265 es. These can be │ │ │ │ +001028e0: 2073 6574 2061 7320 666f 6c6c 6f77 733a set as follows: │ │ │ │ +001028f0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct SOA │ │ │ │ +00102980: 505f 454e 565f 5f43 6f64 653c 2f61 3e20 P_ENV__Code │ │ │ │ +00102990: 2a73 7562 636f 6465 3120 3d20 736f 6170 *subcode1 = soap │ │ │ │ +001029a0: 5f6e 6577 5f53 4f41 505f 454e 565f 5f43 _new_SOAP_ENV__C │ │ │ │ +001029b0: 6f64 6528 3c61 2063 6c61 7373 3d22 636f ode(soap< │ │ │ │ +001029e0: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .
    struct SO │ │ │ │ +00102a60: 4150 5f45 4e56 5f5f 436f 6465 3c2f 613e AP_ENV__Code │ │ │ │ +00102a70: 202a 7375 6263 6f64 6532 203d 2073 6f61 *subcode2 = soa │ │ │ │ +00102a80: 705f 6e65 775f 534f 4150 5f45 4e56 5f5f p_new_SOAP_ENV__ │ │ │ │ +00102a90: 436f 6465 283c 6120 636c 6173 733d 2263 Code(soap │ │ │ │ +00102ac0: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    .< │ │ │ │ +00102ae0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00102af0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00102b00: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga │ │ │ │ +00102b10: 6332 3063 3835 3639 3833 3330 3533 3331 c20c856983305331 │ │ │ │ +00102b20: 3831 3936 6438 3938 6665 3235 3636 6166 8196d898fe2566af │ │ │ │ +00102b30: 223e 736f 6170 5f73 656e 6465 725f 6661 ">soap_sender_fa │ │ │ │ +00102b40: 756c 743c 2f61 3e28 3c61 2063 6c61 7373 ult(s │ │ │ │ +00102b70: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "The r │ │ │ │ +00102ba0: 6571 7565 7374 6564 2070 726f 6669 6c65 equested profile │ │ │ │ +00102bb0: 2074 6f6b 656e 2050 726f 6669 6c65 546f token ProfileTo │ │ │ │ +00102bc0: 6b65 6e20 646f 6573 206e 6f74 2065 7869 ken does not exi │ │ │ │ +00102bd0: 7374 2e26 7175 6f74 3b3c 2f73 7061 6e3e st." │ │ │ │ +00102be0: 2c20 4e55 4c4c 293b 203c 2f64 6976 3e0a , NULL);
    . │ │ │ │ +00102bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    subcode1->< │ │ │ │ +00102c10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00102c20: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ +00102c30: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ +00102c40: 636f 6465 2e68 746d 6c23 6136 3238 3562 code.html#a6285b │ │ │ │ +00102c50: 3165 6438 6232 6361 6463 3331 3864 3733 1ed8b2cadc318d73 │ │ │ │ +00102c60: 3066 3937 3135 6232 3935 3822 3e53 4f41 0f9715b2958">SOA │ │ │ │ +00102c70: 505f 454e 565f 5f56 616c 7565 3c2f 613e P_ENV__Value │ │ │ │ +00102c80: 203d 2028 3c73 7061 6e20 636c 6173 733d = (ch │ │ │ │ +00102ca0: 6172 3c2f 7370 616e 3e2a 293c 7370 616e ar*)"ter │ │ │ │ +00102cd0: 3a49 6e76 616c 6964 4172 6773 2671 756f :InvalidArgs&quo │ │ │ │ +00102ce0: 743b 3c2f 7370 616e 3e3b 203c 7370 616e t;; // a QName valu │ │ │ │ +00102d10: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ +00102d20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00102d30: 3e73 7562 636f 6465 312d 2667 743b 3c61 >subcode1->SOAP │ │ │ │ +00102da0: 5f45 4e56 5f5f 5375 6263 6f64 653c 2f61 _ENV__Subcode = subcode2;.
    subcode2-& │ │ │ │ +00102de0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;SOAP_ENV__Value │ │ │ │ +00102e50: 3c2f 613e 203d 2028 3c73 7061 6e20 636c = (char*)< │ │ │ │ +00102e80: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +00102e90: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +00102ea0: 3b74 6572 3a4e 6f50 726f 6669 6c65 2671 ;ter:NoProfile&q │ │ │ │ +00102eb0: 756f 743b 3c2f 7370 616e 3e3b 203c 7370 uot;; // a QName va │ │ │ │ +00102ee0: 6c75 653c 2f73 7061 6e3e 3c2f 6469 763e lue
    │ │ │ │ +00102ef0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    soap< │ │ │ │ +00102fd0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->fault->< │ │ │ │ +00103030: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00103040: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ +00103050: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ +00103060: 6661 756c 742e 6874 6d6c 2361 6365 6331 fault.html#acec1 │ │ │ │ +00103070: 3738 3466 3136 6666 6431 3461 3639 6139 784f16ffd14a69a9 │ │ │ │ +00103080: 3262 3932 6630 6464 6431 3566 223e 534f 2b92f0ddd15f">SO │ │ │ │ +00103090: 4150 5f45 4e56 5f5f 436f 6465 3c2f 613e AP_ENV__Code │ │ │ │ +001030a0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->SOAP_ENV__Sub │ │ │ │ +00103110: 636f 6465 3c2f 613e 203d 2073 7562 636f code = subco │ │ │ │ +00103120: 6465 313b 3c2f 6469 763e 0a3c 6469 7620 de1;
    .
    .< │ │ │ │ +001031d0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This pr │ │ │ │ +001031f0: 6f64 7563 6573 3a3c 2f70 3e0a 3c64 6976 oduces:

    .
    <SOAP-ENV:Fau │ │ │ │ +00103260: 6c74 3c2f 7370 616e 3e26 6774 3b3c 2f64 lt>.
    <SOAP-ENV:C │ │ │ │ +001032b0: 6f64 653c 2f73 7061 6e3e 2667 743b 3c2f ode>.
    << │ │ │ │ +001032e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001032f0: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype">SOAP-EN │ │ │ │ +00103300: 563a 5661 6c75 653c 2f73 7061 6e3e 2667 V:Value&g │ │ │ │ +00103310: 743b 3c73 7061 6e20 636c 6173 733d 226b t;SOAP-ENV │ │ │ │ +00103330: 3a53 656e 6465 723c 2f73 7061 6e3e 266c :Sender&l │ │ │ │ +00103340: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/SOA │ │ │ │ +00103360: 502d 454e 563a 5661 6c75 653c 2f73 7061 P-ENV:Value>
    . │ │ │ │ +00103390: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <SOAP-ENV:Subcod │ │ │ │ +001033c0: 653c 2f73 7061 6e3e 2667 743b 3c2f 6469 e>.
    << │ │ │ │ +001033f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00103400: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype">SOAP-EN │ │ │ │ +00103410: 563a 5661 6c75 653c 2f73 7061 6e3e 2667 V:Value&g │ │ │ │ +00103420: 743b 3c73 7061 6e20 636c 6173 733d 226b t;ter:Inva │ │ │ │ +00103440: 6c69 6441 7267 733c 2f73 7061 6e3e 266c lidArgs&l │ │ │ │ +00103450: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/SOA │ │ │ │ +00103470: 502d 454e 563a 5661 6c75 653c 2f73 7061 P-ENV:Value>
    . │ │ │ │ +001034a0: 2020 2020 2026 6c74 3b3c 7370 616e 2063 <SOAP-ENV:Subc │ │ │ │ +001034d0: 6f64 653c 2f73 7061 6e3e 2667 743b 3c2f ode>.
    & │ │ │ │ +00103500: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;SOA │ │ │ │ +00103520: 502d 454e 563a 5661 6c75 653c 2f73 7061 P-ENV:Value>ter: │ │ │ │ +00103550: 4e6f 5072 6f66 696c 653c 2f73 7061 6e3e NoProfile │ │ │ │ +00103560: 2026 6c74 3b2f 3c73 7061 6e20 636c 6173 </ │ │ │ │ +00103580: 534f 4150 2d45 4e56 3a56 616c 7565 3c2f SOAP-ENV:Value>
    . │ │ │ │ +001035a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </SOAP-ENV: │ │ │ │ +001035e0: 5375 6263 6f64 653c 2f73 7061 6e3e 2667 Subcode&g │ │ │ │ +001035f0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    & │ │ │ │ +00103610: 6c74 3b2f 3c73 7061 6e20 636c 6173 733d lt;/SO │ │ │ │ +00103630: 4150 2d45 4e56 3a53 7562 636f 6465 3c2f AP-ENV:Subcode>
    . │ │ │ │ +00103650: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </SOAP-ENV:Code │ │ │ │ +00103690: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >
    .
    <SOAP-ENV:Rea │ │ │ │ +001036e0: 736f 6e3c 2f73 7061 6e3e 2667 743b 3c2f son>.
    << │ │ │ │ +00103710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00103720: 6f72 6474 7970 6522 3e53 4f41 502d 454e ordtype">SOAP-EN │ │ │ │ +00103730: 563a 5465 7874 3c2f 7370 616e 3e20 3c73 V:Text xml:lang= │ │ │ │ +00103780: 2671 756f 743b 656e 2671 756f 743b 3c2f "en">T │ │ │ │ +001037b0: 6865 3c2f 7370 616e 3e20 3c73 7061 6e20 he │ │ │ │ +001037d0: 7265 7175 6573 7465 643c 2f73 7061 6e3e requested │ │ │ │ +001037e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 profile toke │ │ │ │ +00103820: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n P │ │ │ │ +00103840: 726f 6669 6c65 546f 6b65 6e3c 2f73 7061 rofileToken does not exis │ │ │ │ +001038b0: 742e 3c2f 7370 616e 3e26 6c74 3b2f 3c73 t.</SOAP-ENV │ │ │ │ +001038e0: 3a54 6578 743c 2f73 7061 6e3e 2667 743b :Text> │ │ │ │ +001038f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    </ │ │ │ │ +00103910: 3c73 7061 6e20 636c 6173 733d 226b 6579 SOAP-E │ │ │ │ +00103930: 4e56 3a52 6561 736f 6e3c 2f73 7061 6e3e NV:Reason │ │ │ │ +00103940: 2667 743b 3c2f 6469 763e 0a3c 6469 7620 >
    .
    < │ │ │ │ +00103960: 3b2f 3c73 7061 6e20 636c 6173 733d 226b ;/SOAP │ │ │ │ +00103980: 2d45 4e56 3a46 6175 6c74 3c2f 7370 616e -ENV:Fault>
    .

    Ser │ │ │ │ +001039c0: 7669 6365 206f 7065 7261 7469 6f6e 7320 vice operations │ │ │ │ +001039d0: 696d 706c 656d 656e 7461 7469 6f6e 2069 implementation i │ │ │ │ +001039e0: 6e20 6120 5765 6220 7365 7276 6963 6520 n a Web service │ │ │ │ +001039f0: 6170 706c 6963 6174 696f 6e20 6361 6e20 application can │ │ │ │ +00103a00: 7265 7475 726e 2076 6172 696f 7573 2053 return various S │ │ │ │ +00103a10: 4f41 5020 4661 756c 7473 2063 7573 746f OAP Faults custo │ │ │ │ +00103a20: 6d69 7a65 6420 696e 2074 6869 7320 7761 mized in this wa │ │ │ │ +00103a30: 792e 3c2f 703e 0a3c 703e 534f 4150 2046 y.

    .

    SOAP F │ │ │ │ +00103a40: 6175 6c74 2073 7472 7563 7475 7265 7320 ault structures │ │ │ │ +00103a50: 6172 6520 6465 636c 6172 6564 203c 636f are declared mutable, which means t │ │ │ │ +00103a80: 6861 7420 7265 2d64 6563 6c61 7261 7469 hat re-declarati │ │ │ │ +00103a90: 6f6e 7320 6f66 2074 6865 2073 7472 7563 ons of the struc │ │ │ │ +00103aa0: 7475 7265 7320 6172 6520 7065 726d 6974 tures are permit │ │ │ │ +00103ab0: 7465 6420 616e 6420 6164 6469 7469 6f6e ted and addition │ │ │ │ +00103ac0: 616c 206d 656d 6265 7273 2061 7265 2063 al members are c │ │ │ │ +00103ad0: 6f6c 6c65 6374 6564 2069 6e74 6f20 6f6e ollected into on │ │ │ │ +00103ae0: 6520 6669 6e61 6c20 7374 7275 6374 7572 e final structur │ │ │ │ +00103af0: 6520 6279 2074 6865 2073 6f61 7063 7070 e by the soapcpp │ │ │ │ +00103b00: 3220 746f 6f6c 2e3c 2f70 3e0a 3c70 3e46 2 tool.

    .

    F │ │ │ │ +00103b10: 6f72 2061 6e20 6578 616d 706c 6520 7468 or an example th │ │ │ │ +00103b20: 6174 2075 7365 6420 7468 6520 534f 4150 at used the SOAP │ │ │ │ +00103b30: 2046 6175 6c74 2064 6574 6169 6c20 7374 Fault detail st │ │ │ │ +00103b40: 7275 6374 7572 653a 3c2f 703e 0a3c 6469 ructure:

    .
    struc │ │ │ │ +00103b90: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t SOAP_ENV_ │ │ │ │ +00103be0: 5f44 6574 6169 6c3c 2f61 3e20 3c2f 6469 _Detail .
    {
    . │ │ │ │ +00103c20: 2020 203c 7370 616e 2063 6c61 7373 3d22 const │ │ │ │ +00103c60: 6368 6172 3c2f 7370 616e 3e20 2a66 5f5f char *f__ │ │ │ │ +00103c70: 696e 7661 6c69 643b 3c2f 6469 763e 0a3c invalid;
    .< │ │ │ │ +00103c80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00103c90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > const │ │ │ │ +00103cb0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *f │ │ │ │ +00103ce0: 5f5f 756e 6176 6169 6c61 626c 653b 3c2f __unavailable;.
    int │ │ │ │ +00103d30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 │ │ │ │ +00103d90: 5f5f 7479 7065 3c2f 613e 3b3c 2f64 6976 __type;
    .
    void *< │ │ │ │ +00103de0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00103df0: 7265 663d 2273 7472 7563 745f 735f 6f5f ref="struct_s_o_ │ │ │ │ +00103e00: 615f 705f 5f5f 655f 6e5f 765f 5f5f 5f5f a_p___e_n_v_____ │ │ │ │ +00103e10: 6465 7461 696c 2e68 746d 6c23 6131 3539 detail.html#a159 │ │ │ │ +00103e20: 6433 3434 3735 3963 3036 6638 3265 6165 d344759c06f82eae │ │ │ │ +00103e30: 3139 3439 6165 6131 3061 3163 6622 3e66 1949aea10a1cf">f │ │ │ │ +00103e40: 6175 6c74 3c2f 613e 3b3c 2f64 6976 3e0a ault;
    . │ │ │ │ +00103e50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    _XML __any;.
    };
    .< │ │ │ │ +00103f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00103f60: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ +00103f80: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ +00103f90: 2d66 6175 6c74 3a20 6c6f 6769 6e20 665f -fault: login f_ │ │ │ │ +00103fa0: 5f69 6e76 616c 6964 203c 2f73 7061 6e3e _invalid │ │ │ │ +00103fb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +00103fe0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ +00103ff0: 6520 6d65 7468 6f64 2d66 6175 6c74 3a20 e method-fault: │ │ │ │ +00104000: 6c6f 6769 6e20 665f 5f75 6e61 7661 696c login f__unavail │ │ │ │ +00104010: 6162 6c65 203c 2f73 7061 6e3e 3c2f 6469 able .
    i │ │ │ │ +00104050: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6c6f nt ns__lo │ │ │ │ +00104060: 6769 6e28 2e2e 2e29 3b3c 2f64 6976 3e0a gin(...);
    . │ │ │ │ +00104070: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    See al │ │ │ │ +00104090: 736f 2041 5049 2064 6f63 756d 656e 7461 so API documenta │ │ │ │ +001040a0: 7469 6f6e 204d 6f64 756c 6520 3c61 2063 tion Module Fault │ │ │ │ +001040e0: 7374 7275 6374 7572 6520 616e 6420 6675 structure and fu │ │ │ │ +001040f0: 6e63 7469 6f6e 733c 2f61 3e2e 3c2f 703e nctions.

    │ │ │ │ +00104100: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ +00104120: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .MIME │ │ │ │ +00104160: 2061 7474 6163 686d 656e 7473 3c2f 6831 attachments

    .

    The gSOAP t │ │ │ │ +00104180: 6f6f 6c6b 6974 2073 7570 706f 7274 7320 oolkit supports │ │ │ │ +00104190: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments │ │ │ │ +001041a0: 2061 7320 7065 7220 534f 4150 2077 6974 as per SOAP wit │ │ │ │ +001041b0: 6820 4174 7461 6368 6d65 6e74 7320 2853 h Attachments (S │ │ │ │ +001041c0: 7741 2920 7370 6563 6966 6963 6174 696f wA) specificatio │ │ │ │ +001041d0: 6e20 3c61 2068 7265 663d 2268 7474 703a n http://www.w3. │ │ │ │ +00104210: 6f72 672f 5452 2f53 4f41 502d 6174 7461 org/TR/SOAP-atta │ │ │ │ +00104220: 6368 6d65 6e74 733c 2f61 3e2e 3c2f 703e chments.

    │ │ │ │ +00104230: 0a3c 703e 4d54 4f4d 2061 7474 6163 686d .

    MTOM attachm │ │ │ │ +00104240: 656e 7473 2074 6861 7420 6172 6520 6573 ents that are es │ │ │ │ +00104250: 7365 6e74 6961 6c6c 7920 4d49 4d45 2061 sentially MIME a │ │ │ │ +00104260: 7474 6163 686d 656e 7473 2074 6861 7420 ttachments that │ │ │ │ +00104270: 636f 6e66 6f72 6d20 746f 2074 6865 204d conform to the M │ │ │ │ +00104280: 544f 4d20 7370 6563 6966 6963 6174 696f TOM specificatio │ │ │ │ +00104290: 6e20 3c61 2068 7265 663d 2268 7474 703a n htt │ │ │ │ +001042c0: 703a 2f2f 7777 772e 7733 2e6f 7267 2f54 p://www.w3.org/T │ │ │ │ +001042d0: 522f 736f 6170 3132 2d6d 746f 6d3c 2f61 R/soap12-mtom are also suppo │ │ │ │ +001042f0: 7274 6564 2077 6869 6368 2061 7265 2074 rted which are t │ │ │ │ +00104300: 6865 2070 7265 6665 7272 6564 2077 6179 he preferred way │ │ │ │ +00104310: 2074 6f20 696e 636c 7564 6520 4d49 4d45 to include MIME │ │ │ │ +00104320: 2061 7474 6163 686d 656e 7473 2077 6974 attachments wit │ │ │ │ +00104330: 6820 534f 4150 206d 6573 7361 6765 732c h SOAP messages, │ │ │ │ +00104340: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section MTOM attachmen │ │ │ │ +00104380: 7473 3c2f 613e 2e3c 2f70 3e0a 3c70 3e49 ts.

    .

    I │ │ │ │ +00104390: 6e20 7468 6520 666f 6c6c 6f77 696e 6720 n the following │ │ │ │ +001043a0: 6469 7363 7573 7369 6f6e 2c20 4d49 4d45 discussion, MIME │ │ │ │ +001043b0: 2061 7474 6163 686d 656e 7420 6461 7461 attachment data │ │ │ │ +001043c0: 2069 7320 6173 7375 6d65 6420 746f 2062 is assumed to b │ │ │ │ +001043d0: 6520 7265 7369 6465 6e74 2069 6e20 6d65 e resident in me │ │ │ │ +001043e0: 6d6f 7279 2066 6f72 2073 656e 6469 6e67 mory for sending │ │ │ │ +001043f0: 206f 7065 7261 7469 6f6e 7320 616e 6420 operations and │ │ │ │ +00104400: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments │ │ │ │ +00104410: 2072 6563 6569 7665 6420 7769 6c6c 2062 received will b │ │ │ │ +00104420: 6520 7374 6f72 6564 2069 6e20 6d65 6d6f e stored in memo │ │ │ │ +00104430: 7279 206d 616e 6167 6564 2062 7920 7468 ry managed by th │ │ │ │ +00104440: 6520 636f 6e74 6578 742e 204d 544f 4d20 e context. MTOM │ │ │ │ +00104450: 616e 6420 4449 4d45 2061 7474 6163 686d and DIME attachm │ │ │ │ +00104460: 656e 7473 206f 6e20 7468 6520 6f74 6865 ents on the othe │ │ │ │ +00104470: 7220 6861 6e64 2063 616e 2062 6520 7374 r hand can be st │ │ │ │ +00104480: 7265 616d 6564 2061 6e64 2074 6865 7265 reamed and there │ │ │ │ +00104490: 666f 7265 204d 544f 4d2f 4449 4d45 2061 fore MTOM/DIME a │ │ │ │ +001044a0: 7474 6163 686d 656e 7420 6461 7461 2064 ttachment data d │ │ │ │ +001044b0: 6f65 7320 6e6f 7420 6e65 6564 2074 6f20 oes not need to │ │ │ │ +001044c0: 6265 2073 746f 7265 6420 696e 206d 656d be stored in mem │ │ │ │ +001044d0: 6f72 792c 2073 6565 2053 6563 7469 6f6e ory, see Section │ │ │ │ +001044e0: 7320 3c61 2063 6c61 7373 3d22 656c 2220 s DIME atta │ │ │ │ +00104510: 6368 6d65 6e74 733c 2f61 3e20 616e 6420 chments and │ │ │ │ +00104520: 3c61 2063 6c61 7373 3d22 656c 2220 6872 MTOM attach │ │ │ │ +00104550: 6d65 6e74 733c 2f61 3e20 2e3c 2f70 3e0a ments .

    . │ │ │ │ +00104560: 3c70 3e54 7261 6e73 6d69 7474 696e 6720

    Transmitting │ │ │ │ +00104570: 6d75 6c74 6970 6172 742f 7265 6c61 7465 multipart/relate │ │ │ │ +00104580: 6420 4d49 4d45 2061 7474 6163 686d 656e d MIME attachmen │ │ │ │ +00104590: 7473 2077 6974 6820 6120 534f 4150 2f58 ts with a SOAP/X │ │ │ │ +001045a0: 4d4c 206d 6573 7361 6765 2069 7320 6163 ML message is ac │ │ │ │ +001045b0: 636f 6d70 6c69 7368 6564 2077 6974 6820 complished with │ │ │ │ +001045c0: 7477 6f20 6675 6e63 7469 6f6e 732c 203c two functions, < │ │ │ │ +001045d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_set_m │ │ │ │ +00104650: 696d 653c 2f61 3e3c 2f63 6f64 653e 2061 ime a │ │ │ │ +00104660: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd │ │ │ │ +001046f0: 736f 6170 5f73 6574 5f6d 696d 655f 6174 soap_set_mime_at │ │ │ │ +00104700: 7461 6368 6d65 6e74 3c2f 613e 3c2f 636f tachment. The first f │ │ │ │ +00104720: 756e 6374 696f 6e20 6973 2066 6f72 2069 unction is for i │ │ │ │ +00104730: 6e69 7469 616c 697a 6174 696f 6e20 7075 nitialization pu │ │ │ │ +00104740: 7270 6f73 6573 2061 6e64 2074 6865 206c rposes and the l │ │ │ │ +00104750: 6174 7465 7220 6675 6e63 7469 6f6e 2069 atter function i │ │ │ │ +00104760: 7320 7573 6564 2074 6f20 7370 6563 6966 s used to specif │ │ │ │ +00104770: 7920 6d65 7461 2064 6174 6120 616e 6420 y meta data and │ │ │ │ +00104780: 636f 6e74 656e 7420 6461 7461 2066 6f72 content data for │ │ │ │ +00104790: 2065 6163 6820 6174 7461 6368 6d65 6e74 each attachment │ │ │ │ +001047a0: 2e3c 2f70 3e0a 3c70 3e53 6565 2061 6c73 .

    .

    See als │ │ │ │ +001047b0: 6f20 4150 4920 646f 6375 6d65 6e74 6174 o API documentat │ │ │ │ +001047c0: 696f 6e20 4d6f 6475 6c65 203c 6120 636c ion Module MIME att │ │ │ │ +00104800: 6163 686d 656e 7420 6675 6e63 7469 6f6e achment function │ │ │ │ +00104810: 733c 2f61 3e2e 3c2f 703e 0a3c 703e f09f s.

    .

    .. │ │ │ │ +00104820: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ +00104830: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ +00104840: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ +00104850: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .Send │ │ │ │ +00104880: 696e 6720 6120 636f 6c6c 6563 7469 6f6e ing a collection │ │ │ │ +00104890: 206f 6620 4d49 4d45 2061 7474 6163 686d of MIME attachm │ │ │ │ +001048a0: 656e 7473 2028 5377 4129 3c2f 6832 3e0a ents (SwA)

    . │ │ │ │ +001048b0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following │ │ │ │ +001048c0: 2066 756e 6374 696f 6e73 2061 7265 2075 functions are u │ │ │ │ +001048d0: 7365 6420 746f 2073 6574 2075 7020 6120 sed to set up a │ │ │ │ +001048e0: 636f 6c6c 6563 7469 6f6e 206f 6620 6d75 collection of mu │ │ │ │ +001048f0: 6c74 6970 6172 742f 7265 6c61 7465 6420 ltipart/related │ │ │ │ +00104900: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments │ │ │ │ +00104910: 2066 6f72 2074 7261 6e73 6d69 7373 696f for transmissio │ │ │ │ +00104920: 6e20 7769 7468 2061 2053 4f41 5020 6f72 n with a SOAP or │ │ │ │ +00104930: 2058 4d4c 206d 6573 7361 6765 2e3c 2f70 XML message.

    .
      .
    • void soap_set_ │ │ │ │ +001049d0: 6d69 6d65 2873 7472 7563 7420 736f 6170 mime(struct soap │ │ │ │ +001049e0: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch │ │ │ │ +001049f0: 6172 202a 626f 756e 6461 7279 2c20 636f ar *boundary, co │ │ │ │ +00104a00: 6e73 7420 6368 6172 202a 7374 6172 7429 nst char *start) │ │ │ │ +00104a10: 3c2f 613e 3c2f 636f 6465 3e20 5468 6973 This │ │ │ │ +00104a20: 2066 756e 6374 696f 6e20 656e 6162 6c65 function enable │ │ │ │ +00104a30: 7320 7365 6e64 696e 6720 4d49 4d45 2061 s sending MIME a │ │ │ │ +00104a40: 7474 6163 686d 656e 7473 2e20 5468 6973 ttachments. This │ │ │ │ +00104a50: 2066 756e 6374 696f 6e20 6973 2067 656e function is gen │ │ │ │ +00104a60: 6572 616c 6c79 206e 6f74 2072 6571 7569 erally not requi │ │ │ │ +00104a70: 7265 6420 7768 656e 2074 6865 2063 6f6e red when the con │ │ │ │ +00104a80: 7465 7874 2069 7320 696e 6974 6961 6c69 text is initiali │ │ │ │ +00104a90: 7a65 6420 7769 7468 203c 636f 6465 3e23 zed with # │ │ │ │ +00104aa0: 534f 4150 5f45 4e43 5f4d 494d 453c 2f63 SOAP_ENC_MIME, because MI │ │ │ │ +00104ac0: 4d45 2061 7474 6163 686d 656e 7473 2061 ME attachments a │ │ │ │ +00104ad0: 7265 2061 7574 6f6d 6174 6963 616c 6c79 re automatically │ │ │ │ +00104ae0: 2064 6574 6563 7465 6420 6173 203c 636f detected as xsd__base64Bina │ │ │ │ +00104b70: 7279 3c2f 613e 3c2f 636f 6465 3e20 616e ry an │ │ │ │ +00104b80: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d _x │ │ │ │ +00104bf0: 6f70 5f5f 496e 636c 7564 653c 2f61 3e3c op__Include< │ │ │ │ +00104c00: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure │ │ │ │ +00104c10: 7320 696e 2074 6865 2064 6174 6120 746f s in the data to │ │ │ │ +00104c20: 2073 6572 6961 6c69 7a65 2061 7320 616e serialize as an │ │ │ │ +00104c30: 2058 4d4c 206d 6573 7361 6765 2077 6974 XML message wit │ │ │ │ +00104c40: 6820 7468 6520 6174 7461 6368 6d65 6e74 h the attachment │ │ │ │ +00104c50: 7320 6175 746f 6d61 7469 6361 6c6c 7920 s automatically │ │ │ │ +00104c60: 6164 6465 6420 6f72 204d 494d 4520 6174 added or MIME at │ │ │ │ +00104c70: 7461 6368 6d65 6e74 7320 6361 6e20 6265 tachments can be │ │ │ │ +00104c80: 2065 7870 6c69 6369 746c 7920 6164 6465 explicitly adde │ │ │ │ +00104c90: 6420 7769 7468 203c 636f 6465 3e3c 6120 d with soap_set_mim │ │ │ │ +00104d30: 655f 6174 7461 6368 6d65 6e74 3c2f 613e e_attachment │ │ │ │ +00104d40: 3c2f 636f 6465 3e2e 2050 6172 616d 6574 . Paramet │ │ │ │ +00104d50: 6572 203c 636f 6465 3e62 6f75 6e64 6172 er boundar │ │ │ │ +00104d60: 793c 2f63 6f64 653e 2073 7065 6369 6669 y specifi │ │ │ │ +00104d70: 6573 2061 204d 494d 4520 626f 756e 6461 es a MIME bounda │ │ │ │ +00104d80: 7279 2073 7472 696e 6720 6f72 204e 554c ry string or NUL │ │ │ │ +00104d90: 4c20 746f 2068 6176 6520 7468 6520 656e L to have the en │ │ │ │ +00104da0: 6769 6e65 2067 656e 6572 6174 6520 6120 gine generate a │ │ │ │ +00104db0: 4d49 4d45 2062 6f75 6e64 6172 7920 7374 MIME boundary st │ │ │ │ +00104dc0: 7269 6e67 2e20 5061 7261 6d65 7465 7220 ring. Parameter │ │ │ │ +00104dd0: 3c63 6f64 653e 7374 6172 743c 2f63 6f64 start specifies the │ │ │ │ +00104df0: 2073 7461 7274 2063 6f6e 7465 6e74 2049 start content I │ │ │ │ +00104e00: 4420 666f 7220 7468 6520 6669 7273 7420 D for the first │ │ │ │ +00104e10: 4d49 4d45 2062 6f64 7920 636f 6e74 6169 MIME body contai │ │ │ │ +00104e20: 6e69 6e67 2074 6865 2053 4f41 5020 6f72 ning the SOAP or │ │ │ │ +00104e30: 2058 4d4c 206d 6573 7361 6765 2e20 5768 XML message. Wh │ │ │ │ +00104e40: 656e 204e 554c 4c2c 2074 6865 2073 7461 en NULL, the sta │ │ │ │ +00104e50: 7274 2049 4420 6f66 2074 6865 2053 4f41 rt ID of the SOA │ │ │ │ +00104e60: 5020 6d65 7373 6167 6520 6973 203c 656d P message is <SOAP- │ │ │ │ +00104e80: 454e 563a 456e 7665 6c6f 7065 2667 743b ENV:Envelope> │ │ │ │ +00104e90: 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c 2f6c ..
    • int │ │ │ │ +00104eb0: 2073 6f61 705f 7365 745f 6d69 6d65 5f61 soap_set_mime_a │ │ │ │ +00104ec0: 7474 6163 686d 656e 7428 7374 7275 6374 ttachment(struct │ │ │ │ +00104ed0: 2073 6f61 7020 2a73 6f61 702c 2063 6861 soap *soap, cha │ │ │ │ +00104ee0: 7220 2a70 7472 2c20 7369 7a65 5f74 2073 r *ptr, size_t s │ │ │ │ +00104ef0: 697a 652c 2065 6e75 6d20 736f 6170 5f6d ize, enum soap_m │ │ │ │ +00104f00: 696d 655f 656e 636f 6469 6e67 2065 6e63 ime_encoding enc │ │ │ │ +00104f10: 6f64 696e 672c 2063 6f6e 7374 2063 6861 oding, const cha │ │ │ │ +00104f20: 7220 2a74 7970 652c 2063 6f6e 7374 2063 r *type, const c │ │ │ │ +00104f30: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c │ │ │ │ +00104f40: 6861 7220 2a6c 6f63 6174 696f 6e2c 2063 har *location, c │ │ │ │ +00104f50: 6f6e 7374 2063 6861 7220 2a64 6573 6372 onst char *descr │ │ │ │ +00104f60: 6970 7469 6f6e 293c 2f63 6f64 653e 2054 iption) T │ │ │ │ +00104f70: 6869 7320 6675 6e63 7469 6f6e 2061 6464 his function add │ │ │ │ +00104f80: 7320 6120 4d49 4d45 2061 7474 6163 686d s a MIME attachm │ │ │ │ +00104f90: 656e 7420 746f 2061 2053 4f41 502f 584d ent to a SOAP/XM │ │ │ │ +00104fa0: 4c20 6d65 7373 6167 6520 746f 2073 656e L message to sen │ │ │ │ +00104fb0: 642e 2054 6865 2073 7065 6369 6669 6564 d. The specified │ │ │ │ +00104fc0: 203c 636f 6465 3e70 7472 3c2f 636f 6465 ptr points to the │ │ │ │ +00104fe0: 6461 7461 2074 6f20 7365 6e64 206f 6620 data to send of │ │ │ │ +00104ff0: 6c65 6e67 7468 2073 7065 6369 6669 6564 length specified │ │ │ │ +00105000: 2062 7920 3c63 6f64 653e 7369 7a65 3c2f by size. The encoding │ │ │ │ +00105030: 2070 6172 616d 6574 6572 2069 7320 6120 parameter is a │ │ │ │ +00105040: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_mime │ │ │ │ +001050d0: 5f65 6e63 6f64 696e 673c 2f61 3e3c 2f63 _encoding value that │ │ │ │ +001050f0: 6973 2072 6563 6f6d 6d65 6e64 6564 2074 is recommended t │ │ │ │ +00105100: 6f20 6265 2073 7065 6369 6669 6564 2061 o be specified a │ │ │ │ +00105110: 7320 3c63 6f64 653e 2353 4f41 505f 4d49 s #SOAP_MI │ │ │ │ +00105120: 4d45 5f4e 4f4e 453c 2f63 6f64 653e 2074 ME_NONE t │ │ │ │ +00105130: 6f20 7370 6563 6966 7920 7468 6174 2074 o specify that t │ │ │ │ +00105140: 6865 204d 494d 4520 6461 7461 2063 6f6e he MIME data con │ │ │ │ +00105150: 7465 6e74 2069 7320 6e6f 7420 656e 636f tent is not enco │ │ │ │ +00105160: 6465 6420 696e 2061 6e79 2077 6179 2028 ded in any way ( │ │ │ │ +00105170: 7468 6520 4d49 4d45 2061 7474 6163 686d the MIME attachm │ │ │ │ +00105180: 656e 7420 6675 6e63 7469 6f6e 2073 696d ent function sim │ │ │ │ +00105190: 706c 7920 636f 7069 6573 2074 6865 2072 ply copies the r │ │ │ │ +001051a0: 6177 2064 6174 6120 746f 2074 6865 204d aw data to the M │ │ │ │ +001051b0: 494d 4520 626c 6f63 6b20 7769 7468 6f75 IME block withou │ │ │ │ +001051c0: 7420 656e 636f 6469 6e67 292e 2054 6865 t encoding). The │ │ │ │ +001051d0: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type parameter is │ │ │ │ +001051f0: 7265 7175 6972 6564 2061 6e64 2069 6e64 required and ind │ │ │ │ +00105200: 6963 6174 6573 2074 6865 204d 494d 4520 icates the MIME │ │ │ │ +00105210: 7479 7065 206f 6620 7468 6520 6461 7461 type of the data │ │ │ │ +00105220: 2c20 7375 6368 2061 7320 2269 6d61 6765 , such as "image │ │ │ │ +00105230: 2f6a 7067 222e 2054 6865 203c 636f 6465 /jpg". The id param │ │ │ │ +00105250: 6574 6572 2075 6e69 7175 656c 7920 6964 eter uniquely id │ │ │ │ +00105260: 656e 7469 6669 6573 2074 6865 2061 7474 entifies the att │ │ │ │ +00105270: 6163 686d 656e 7420 696e 2074 6865 206d achment in the m │ │ │ │ +00105280: 6573 7361 6765 2c20 7768 6963 6820 6361 essage, which ca │ │ │ │ +00105290: 6e20 6265 206f 6d69 7474 6564 2062 7920 n be omitted by │ │ │ │ +001052a0: 7370 6563 6966 7969 6e67 204e 554c 4c2e specifying NULL. │ │ │ │ +001052b0: 2054 6865 203c 636f 6465 3e6c 6f63 6174 The locat │ │ │ │ +001052c0: 696f 6e3c 2f63 6f64 653e 2070 6172 616d ion param │ │ │ │ +001052d0: 6574 6572 2073 7065 6369 6669 6573 2061 eter specifies a │ │ │ │ +001052e0: 206c 6f63 6174 696f 6e20 7374 7269 6e67 location string │ │ │ │ +001052f0: 206f 7220 4e55 4c4c 2e20 5468 6520 3c63 or NULL. The description< │ │ │ │ +00105310: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter │ │ │ │ +00105320: 2069 7320 6120 7374 7269 6e67 2074 6861 is a string tha │ │ │ │ +00105330: 7420 6465 7363 7269 6265 7320 7468 6520 t describes the │ │ │ │ +00105340: 6461 7461 206f 7220 4e55 4c4c 2e20 5265 data or NULL. Re │ │ │ │ +00105350: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA │ │ │ │ +00105360: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a │ │ │ │ +00105370: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta │ │ │ │ +00105430: 7475 733c 2f61 3e3c 2f63 6f64 653e 2065 tus e │ │ │ │ +00105440: 7272 6f72 2063 6f64 652e 3c2f 6c69 3e0a rror code.
    • . │ │ │ │ +00105450: 3c6c 693e 3c63 6f64 653e 766f 6964 203c
    • void < │ │ │ │ +00105460: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00105470: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +00105480: 5f6d 696d 652e 6874 6d6c 2367 6138 3163 _mime.html#ga81c │ │ │ │ +00105490: 6564 6232 3436 3730 6562 6461 3438 6137 edb24670ebda48a7 │ │ │ │ +001054a0: 3936 3739 6434 3638 3232 3131 6622 2074 9679d4682211f" t │ │ │ │ +001054b0: 6974 6c65 3d22 4469 7361 626c 6520 4d49 itle="Disable MI │ │ │ │ +001054c0: 4d45 2061 7474 6163 686d 656e 7473 2e22 ME attachments." │ │ │ │ +001054d0: 3e73 6f61 705f 636c 725f 6d69 6d65 2873 >soap_clr_mime(s │ │ │ │ +001054e0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +001054f0: 293c 2f61 3e3c 2f63 6f64 653e 2054 6869 ) Thi │ │ │ │ +00105500: 7320 6675 6e63 7469 6f6e 2064 6973 6162 s function disab │ │ │ │ +00105510: 6c65 7320 4d49 4d45 2061 7474 6163 686d les MIME attachm │ │ │ │ +00105520: 656e 7473 2073 7563 6820 6173 2061 6674 ents such as aft │ │ │ │ +00105530: 6572 2073 656e 6469 6e67 2061 206d 756c er sending a mul │ │ │ │ +00105540: 7469 7061 7274 2d72 656c 6174 6564 206d tipart-related m │ │ │ │ +00105550: 6573 7361 6765 2077 6974 6820 6174 7461 essage with atta │ │ │ │ +00105560: 6368 6d65 6e74 7320 746f 2073 7769 7463 chments to switc │ │ │ │ +00105570: 6820 6261 636b 2074 6f20 6e6f 6e2d 6d75 h back to non-mu │ │ │ │ +00105580: 6c74 6970 6172 742d 7265 6c61 7465 6420 ltipart-related │ │ │ │ +00105590: 6d65 7373 6167 696e 672c 2075 6e6c 6573 messaging, unles │ │ │ │ +001055a0: 7320 7468 6520 6461 7461 2074 6f20 7365 s the data to se │ │ │ │ +001055b0: 7269 616c 697a 6520 6173 2061 206d 6573 rialize as a mes │ │ │ │ +001055c0: 7361 6765 2063 6f6e 7461 696e 7320 6174 sage contains at │ │ │ │ +001055d0: 7461 6368 6d65 6e74 7320 7375 6368 2061 tachments such a │ │ │ │ +001055e0: 7320 3c63 6f64 653e 3c61 2063 6c61 7373 s xsd__base6 │ │ │ │ +00105660: 3442 696e 6172 793c 2f61 3e3c 2f63 6f64 4Binary for MIME atta │ │ │ │ +00105680: 6368 6d65 6e74 7320 616e 6420 3c63 6f64 chments and _xop__In │ │ │ │ +00105700: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude │ │ │ │ +00105710: 2066 6f72 204d 544f 4d20 6174 7461 6368 for MTOM attach │ │ │ │ +00105720: 6d65 6e74 732e 3c2f 6c69 3e0a 3c2f 756c ments.
    • .
    .

    When provid │ │ │ │ +00105740: 696e 6720 6120 4d49 4d45 2062 6f75 6e64 ing a MIME bound │ │ │ │ +00105750: 6172 7920 7769 7468 203c 636f 6465 3e3c ary with < │ │ │ │ +00105760: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00105770: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +00105780: 5f6d 696d 652e 6874 6d6c 2367 6139 3138 _mime.html#ga918 │ │ │ │ +00105790: 3065 3562 6136 3334 6232 3033 3035 6237 0e5ba634b20305b7 │ │ │ │ +001057a0: 3535 6234 3130 3034 3564 3965 6522 2074 55b410045d9ee" t │ │ │ │ +001057b0: 6974 6c65 3d22 456e 6162 6c65 204d 494d itle="Enable MIM │ │ │ │ +001057c0: 4520 6174 7461 6368 6d65 6e74 732e 223e E attachments."> │ │ │ │ +001057d0: 736f 6170 5f73 6574 5f6d 696d 653c 2f61 soap_set_mime, you ha │ │ │ │ +001057f0: 7665 2074 6f20 6d61 6b65 2073 7572 6520 ve to make sure │ │ │ │ +00105800: 7468 6520 626f 756e 6461 7279 2063 616e the boundary can │ │ │ │ +00105810: 6e6f 7420 6d61 7463 6820 616e 7920 7061 not match any pa │ │ │ │ +00105820: 7274 7320 6f66 2074 6865 206d 6573 7361 rts of the messa │ │ │ │ +00105830: 6765 2061 6e64 2061 7474 6163 686d 656e ge and attachmen │ │ │ │ +00105840: 7473 2074 6861 7420 796f 7520 6172 6520 ts that you are │ │ │ │ +00105850: 7365 6e64 696e 672c 2062 6563 6175 7365 sending, because │ │ │ │ +00105860: 2074 6865 2062 6f75 6e64 6172 7920 6465 the boundary de │ │ │ │ +00105870: 6c69 6e65 6174 6573 2074 6865 2061 7474 lineates the att │ │ │ │ +00105880: 6163 686d 656e 7473 2e3c 2f70 3e0a 3c70 achments.

    .

    The internal li │ │ │ │ +001058a0: 7374 206f 6620 6174 7461 6368 6d65 6e74 st of attachment │ │ │ │ +001058b0: 7320 7370 6563 6966 6965 6420 7769 7468 s specified with │ │ │ │ +001058c0: 203c 636f 6465 3e3c 6120 636c 6173 733d so │ │ │ │ +00105950: 6170 5f73 6574 5f6d 696d 655f 6174 7461 ap_set_mime_atta │ │ │ │ +00105960: 6368 6d65 6e74 3c2f 613e 3c2f 636f 6465 chment is destroyed w │ │ │ │ +00105980: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith so │ │ │ │ +00105a50: 6170 5f65 6e64 3c2f 613e 3c2f 636f 6465 ap_end or when a mess │ │ │ │ +00105a70: 6167 6520 6973 2072 6563 6569 7665 642e age is received. │ │ │ │ +00105a80: 2054 6865 7265 666f 7265 2c20 6361 6c6c Therefore, call │ │ │ │ +00105a90: 203c 636f 6465 3e3c 6120 636c 6173 733d so │ │ │ │ +00105b20: 6170 5f73 6574 5f6d 696d 655f 6174 7461 ap_set_mime_atta │ │ │ │ +00105b30: 6368 6d65 6e74 3c2f 613e 3c2f 636f 6465 chment to set attachm │ │ │ │ +00105b50: 656e 7473 2062 6566 6f72 6520 7365 6e64 ents before send │ │ │ │ +00105b60: 696e 6720 6120 6d65 7373 6167 652e 3c2f ing a message..

    The follow │ │ │ │ +00105b80: 696e 6720 6578 616d 706c 6520 7368 6f77 ing example show │ │ │ │ +00105b90: 7320 686f 7720 6120 6d75 6c74 6970 6172 s how a multipar │ │ │ │ +00105ba0: 742f 7265 6c61 7465 6420 4854 5450 206d t/related HTTP m │ │ │ │ +00105bb0: 6573 7361 6765 2077 6974 6820 7468 7265 essage with thre │ │ │ │ +00105bc0: 6520 4d49 4d45 2061 7474 6163 686d 656e e MIME attachmen │ │ │ │ +00105bd0: 7473 2069 7320 7365 7420 7570 2061 6e64 ts is set up and │ │ │ │ +00105be0: 2074 7261 6e73 6d69 7474 6564 2074 6f20 transmitted to │ │ │ │ +00105bf0: 6120 7365 7276 6572 2e20 496e 2074 6869 a server. In thi │ │ │ │ +00105c00: 7320 6578 616d 706c 6520 7765 206c 6574 s example we let │ │ │ │ +00105c10: 2074 6865 206d 6573 7361 6765 2062 6f64 the message bod │ │ │ │ +00105c20: 7920 7265 6665 7220 746f 2074 6865 2061 y refer to the a │ │ │ │ +00105c30: 7474 6163 686d 656e 7473 2075 7369 6e67 ttachments using │ │ │ │ +00105c40: 2058 4d4c 203c 656d 3e3c 636f 6465 3e68 XML h │ │ │ │ +00105c50: 7265 663c 2f63 6f64 653e 3c2f 656d 3e20 ref │ │ │ │ +00105c60: 6174 7472 6962 7574 6573 2e20 5468 6520 attributes. The │ │ │ │ +00105c70: 3c63 6f64 653e 7374 7275 6374 2063 6c61 struct cla │ │ │ │ +00105c80: 696d 5f5f 666f 726d 3c2f 636f 6465 3e20 im__form │ │ │ │ +00105c90: 6461 7461 2074 7970 6520 696e 636c 7564 data type includ │ │ │ │ +00105ca0: 6573 2061 2064 6566 696e 6974 696f 6e20 es a definition │ │ │ │ +00105cb0: 6f66 2061 203c 636f 6465 3e68 7265 663c of a href< │ │ │ │ +00105cc0: 2f63 6f64 653e 2061 7474 7269 6275 7465 /code> attribute │ │ │ │ +00105cd0: 2066 6f72 2074 6869 7320 7075 7270 6f73 for this purpos │ │ │ │ +00105ce0: 652e 3c2f 703e 0a3c 6469 7620 636c 6173 e.

    .
    < │ │ │ │ +00105d10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00105d20: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct claim__form f │ │ │ │ +00105d40: 6f72 6d31 2c20 666f 726d 323b 203c 2f64 orm1, form2; .
    form1.href │ │ │ │ +00105d70: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ +00105d90: 7175 6f74 3b63 6964 3a63 6c61 696d 3036 quot;cid:claim06 │ │ │ │ +00105da0: 3134 3030 612e 7469 6666 4063 6c61 696d 1400a.tiff@claim │ │ │ │ +00105db0: 696e 672d 6974 2e63 6f6d 2671 756f 743b ing-it.com" │ │ │ │ +00105dc0: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    . │ │ │ │ +00105dd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    form2.href = < │ │ │ │ +00105df0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +00105e00: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +00105e10: 3b63 6964 3a63 6c61 696d 3036 3134 3030 ;cid:claim061400 │ │ │ │ +00105e20: 612e 6a70 6567 4063 6c61 696d 696e 672d a.jpeg@claiming- │ │ │ │ +00105e30: 6974 2e63 6f6d 2671 756f 743b 3c2f 7370 it.com";
    .
    /* initializ │ │ │ │ +00105e80: 6520 616e 6420 656e 6162 6c65 204d 494d e and enable MIM │ │ │ │ +00105e90: 4520 2a2f 3c2f 7370 616e 3e20 3c2f 6469 E */ .
    soap_set_ │ │ │ │ +00105f10: 6d69 6d65 3c2f 613e 283c 6120 636c 6173 mime( │ │ │ │ +00105f40: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, │ │ │ │ +00105f50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +00105f70: 743b 266c 743b 636c 6169 6d30 3631 3430 t;<claim06140 │ │ │ │ +00105f80: 3061 2e78 6d6c 4063 6c61 696d 696e 672d 0a.xml@claiming- │ │ │ │ +00105f90: 6974 2e63 6f6d 2667 743b 2671 756f 743b it.com>" │ │ │ │ +00105fa0: 3c2f 7370 616e 3e29 3b20 3c2f 6469 763e );
    │ │ │ │ +00105fb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* add │ │ │ │ +00105fe0: 6120 6261 7365 3634 2065 6e63 6f64 6564 a base64 encoded │ │ │ │ +00105ff0: 2074 6966 6620 696d 6167 6520 2874 6966 tiff image (tif │ │ │ │ +00106000: 6649 6d61 6765 2070 6f69 6e74 7320 746f fImage points to │ │ │ │ +00106010: 2062 6173 6536 3420 6461 7461 2920 2a2f base64 data) */ │ │ │ │ +00106020: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00106030: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00106040: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_mime │ │ │ │ +001060a0: 5f61 7474 6163 686d 656e 743c 2f61 3e28 _attachment( │ │ │ │ +001060b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001060e0: 2074 6966 6649 6d61 6765 2c20 7469 6666 tiffImage, tiff │ │ │ │ +001060f0: 4c65 6e2c 203c 6120 636c 6173 733d 2263 Len, SOAP_MI │ │ │ │ +00106170: 4d45 5f42 4153 4536 343c 2f61 3e2c 203c ME_BASE64, < │ │ │ │ +00106180: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +00106190: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +001061a0: 3b69 6d61 6765 2f74 6966 6626 7175 6f74 ;image/tiff" │ │ │ │ +001061b0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "< │ │ │ │ +001061e0: 636c 6169 6d30 3631 3430 3061 2e74 6966 claim061400a.tif │ │ │ │ +001061f0: 6640 636c 6169 6d69 6e67 2d69 742e 636f f@claiming-it.co │ │ │ │ +00106200: 6d26 6774 3b26 7175 6f74 3b3c 2f73 7061 m>", NULL, NULL); │ │ │ │ +00106220: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +00106250: 2f2a 2061 6464 2061 2072 6177 2062 696e /* add a raw bin │ │ │ │ +00106260: 6172 7920 6a70 6567 2069 6d61 6765 2028 ary jpeg image ( │ │ │ │ +00106270: 6a70 6567 496d 6167 6520 706f 696e 7473 jpegImage points │ │ │ │ +00106280: 2074 6f20 7261 7720 6461 7461 2920 2a2f to raw data) */ │ │ │ │ +00106290: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001062a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001062b0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_mime │ │ │ │ +00106310: 5f61 7474 6163 686d 656e 743c 2f61 3e28 _attachment( │ │ │ │ +00106320: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00106350: 206a 7065 6749 6d61 6765 2c20 6a70 6567 jpegImage, jpeg │ │ │ │ +00106360: 4c65 6e2c 203c 6120 636c 6173 733d 2263 Len, SOAP_MI │ │ │ │ +001063e0: 4d45 5f42 494e 4152 593c 2f61 3e2c 203c ME_BINARY, < │ │ │ │ +001063f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +00106400: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +00106410: 3b69 6d61 6765 2f6a 7065 6726 7175 6f74 ;image/jpeg" │ │ │ │ +00106420: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "< │ │ │ │ +00106450: 636c 6169 6d30 3631 3430 3061 2e6a 7065 claim061400a.jpe │ │ │ │ +00106460: 6740 636c 6169 6d69 6e67 2d69 742e 636f g@claiming-it.co │ │ │ │ +00106470: 6d26 6774 3b26 7175 6f74 3b3c 2f73 7061 m>", NULL, NULL); │ │ │ │ +00106490: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +001064c0: 2f2a 2073 656e 6420 7468 6520 666f 726d /* send the form │ │ │ │ +001064d0: 7320 6173 204d 494d 4520 6174 7461 6368 s as MIME attach │ │ │ │ +001064e0: 6d65 6e74 7320 7769 7468 2074 6869 7320 ments with this │ │ │ │ +001064f0: 696e 766f 6361 7469 6f6e 202a 2f3c 2f73 invocation */
    .
    if (soap_call_cla │ │ │ │ +00106550: 696d 5f5f 696e 7375 7261 6e63 655f 636c im__insurance_cl │ │ │ │ +00106560: 6169 6d5f 6175 746f 283c 6120 636c 6173 aim_auto( │ │ │ │ +00106590: 736f 6170 3c2f 613e 2c20 666f 726d 312c soap, form1, │ │ │ │ +001065a0: 2066 6f72 6d32 2c20 2e2e 2e29 2920 3c2f form2, ...)) .
    ... // an error o │ │ │ │ +001065f0: 6363 7572 7265 6420 3c2f 7370 616e 3e3c ccurred < │ │ │ │ +00106600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else .
    ... // process th │ │ │ │ +00106680: 6520 7265 7370 6f6e 7365 3c2f 7370 616e e response
    .
    soap │ │ │ │ +00106700: 5f63 6c72 5f6d 696d 653c 2f61 3e28 3c61 _clr_mime(soap);< │ │ │ │ +00106740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_mime_a │ │ │ │ +00106800: 7474 6163 686d 656e 743c 2f61 3e3c 2f64 ttachment
    int soap_ │ │ │ │ +00106830: 7365 745f 6d69 6d65 5f61 7474 6163 686d set_mime_attachm │ │ │ │ +00106840: 656e 7428 7374 7275 6374 2073 6f61 7020 ent(struct soap │ │ │ │ +00106850: 2a73 6f61 702c 2063 6f6e 7374 2063 6861 *soap, const cha │ │ │ │ +00106860: 7220 2a70 7472 2c20 7369 7a65 5f74 2073 r *ptr, size_t s │ │ │ │ +00106870: 697a 652c 2065 6e75 6d20 736f 6170 5f6d ize, enum soap_m │ │ │ │ +00106880: 696d 655f 656e 636f 6469 6e67 2065 6e63 ime_encoding enc │ │ │ │ +00106890: 6f64 696e 672c 2063 6f6e 7374 2063 6861 oding, const cha │ │ │ │ +001068a0: 7220 2a74 7970 652c 2063 6f6e 7374 2063 r *type, const c │ │ │ │ +001068b0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c │ │ │ │ +001068c0: 6861 7220 2a6c 6f63 6174 696f 6e2c 2063 har *location, c │ │ │ │ +001068d0: 6f6e 7374 2063 6861 7220 2a64 6573 6372 onst char *descr │ │ │ │ +001068e0: 6970 7469 6f6e 293c 2f64 6976 3e3c 6469 iption)
    │ │ │ │ +00106900: 4164 6420 6120 4d49 4d45 2061 7474 6163 Add a MIME attac │ │ │ │ +00106910: 686d 656e 7420 746f 2074 6865 2053 4f41 hment to the SOA │ │ │ │ +00106920: 502f 584d 4c20 6d65 7373 6167 652e 3c2f P/XML message.
    .void soap_clr_m │ │ │ │ +00106a20: 696d 6528 7374 7275 6374 2073 6f61 7020 ime(struct soap │ │ │ │ +00106a30: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    D │ │ │ │ +00106a50: 6973 6162 6c65 204d 494d 4520 6174 7461 isable MIME atta │ │ │ │ +00106a60: 6368 6d65 6e74 732e 3c2f 6469 763e 3c2f chments.
    .
    int s │ │ │ │ +00106b50: 6f61 705f 7365 745f 6d69 6d65 2873 7472 oap_set_mime(str │ │ │ │ +00106b60: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +00106b70: 636f 6e73 7420 6368 6172 202a 626f 756e const char *boun │ │ │ │ +00106b80: 6461 7279 2c20 636f 6e73 7420 6368 6172 dary, const char │ │ │ │ +00106b90: 202a 7374 6172 7429 3c2f 6469 763e 3c64 *start)
    Enable MIME att │ │ │ │ +00106bc0: 6163 686d 656e 7473 2e3c 2f64 6976 3e3c achments.
    < │ │ │ │ +00106bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00106ce0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00106cf0: 6922 3e40 2053 4f41 505f 4d49 4d45 5f42 i">@ SOAP_MIME_B │ │ │ │ +00106d00: 4153 4536 343c 2f64 6976 3e3c 6469 7620 ASE64
    da │ │ │ │ +00106d20: 7461 2069 7320 666f 726d 6174 7465 6420 ta is formatted │ │ │ │ +00106d30: 696e 2062 6173 6536 343c 2f64 6976 3e3c in base64
    < │ │ │ │ +00106d40: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +00106d50: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +00106d60: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +00106d70: 3130 3232 393c 2f64 6976 3e3c 2f64 6976 10229
    .
    @ │ │ │ │ +00106ea0: 2053 4f41 505f 4d49 4d45 5f42 494e 4152 SOAP_MIME_BINAR │ │ │ │ +00106eb0: 593c 2f64 6976 3e3c 6469 7620 636c 6173 Y
    binary │ │ │ │ +00106ed0: 2072 6177 2064 6174 6120 636f 6e74 656e raw data conten │ │ │ │ +00106ee0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    Def │ │ │ │ +00106f00: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ +00106f10: 736f 6170 322e 683a 3130 3232 373c 2f64 soap2.h:10227
    .
    │ │ │ │ +00106f30: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The c │ │ │ │ -001070b0: 6c61 696d 2066 6f72 6d73 2069 6e20 7468 laim forms in th │ │ │ │ -001070c0: 6520 6d65 7373 6167 6520 636f 6e73 6973 e message consis │ │ │ │ -001070d0: 7420 6f66 203c 656d 3e3c 636f 6465 3e68 t of h │ │ │ │ -001070e0: 7265 663c 2f63 6f64 653e 3c2f 656d 3e73 refs │ │ │ │ -001070f0: 2074 6f20 7468 6520 636c 6169 6d20 666f to the claim fo │ │ │ │ -00107100: 726d 7320 6174 7461 6368 6564 2e20 5468 rms attached. Th │ │ │ │ -00107110: 6520 7573 6520 6f66 203c 656d 3e3c 636f e use of href or other att │ │ │ │ -00107140: 7269 6275 7465 7320 666f 7220 7265 6665 ributes for refe │ │ │ │ -00107150: 7272 696e 6720 746f 2074 6865 204d 494d rring to the MIM │ │ │ │ -00107160: 4520 6174 7461 6368 6d65 6e74 7320 6973 E attachments is │ │ │ │ -00107170: 206f 7074 696f 6e61 6c20 6163 636f 7264 optional accord │ │ │ │ -00107180: 696e 6720 746f 2074 6865 2053 7741 2073 ing to the SwA s │ │ │ │ -00107190: 7461 6e64 6172 642e 204d 544f 4d20 6f6e tandard. MTOM on │ │ │ │ -001071a0: 2074 6865 206f 7468 6572 2068 616e 6420 the other hand │ │ │ │ -001071b0: 6d61 6e64 6174 6573 2074 6865 2075 7365 mandates the use │ │ │ │ -001071c0: 206f 6620 3c65 6d3e 3c63 6f64 653e 6872 of hr │ │ │ │ -001071d0: 6566 3c2f 636f 6465 3e3c 2f65 6d3e 2077 ef w │ │ │ │ -001071e0: 6974 6820 584f 5020 656c 656d 656e 7473 ith XOP elements │ │ │ │ -001071f0: 2e3c 2f70 3e0a 3c70 3e54 6f20 6173 736f .

    .

    To asso │ │ │ │ -00107200: 6369 6174 6520 4d49 4d45 2061 7474 6163 ciate MIME attac │ │ │ │ -00107210: 686d 656e 7473 2077 6974 6820 7468 6520 hments with the │ │ │ │ -00107220: 7265 7175 6573 7420 616e 6420 7265 7370 request and resp │ │ │ │ -00107230: 6f6e 7365 206f 6620 6120 7365 7276 6963 onse of a servic │ │ │ │ -00107240: 6520 6f70 6572 6174 696f 6e20 696e 2074 e operation in t │ │ │ │ -00107250: 6865 2067 656e 6572 6174 6564 2057 5344 he generated WSD │ │ │ │ -00107260: 4c2c 2070 6c65 6173 6520 7365 6520 5365 L, please see Se │ │ │ │ -00107270: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction G │ │ │ │ -001072a0: 656e 6572 6174 696e 6720 4d75 6c74 6970 enerating Multip │ │ │ │ -001072b0: 6172 7452 656c 6174 6564 204d 494d 4520 artRelated MIME │ │ │ │ -001072c0: 6174 7461 6368 6d65 6e74 2062 696e 6469 attachment bindi │ │ │ │ -001072d0: 6e67 7320 696e 2057 5344 4c3c 2f61 3e20 ngs in WSDL │ │ │ │ -001072e0: 2e3c 2f70 3e0a 3c70 3e54 6865 2073 6572 .

    .

    The ser │ │ │ │ -001072f0: 7665 722d 7369 6465 2063 6f64 6520 746f ver-side code to │ │ │ │ -00107300: 2074 7261 6e73 6d69 7420 4d49 4d45 2061 transmit MIME a │ │ │ │ -00107310: 7474 6163 686d 656e 7473 2062 6163 6b20 ttachments back │ │ │ │ -00107320: 746f 2061 2063 6c69 656e 743a 3c2f 703e to a client:

    │ │ │ │ -00107330: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int cl │ │ │ │ -00107380: 6169 6d5f 5f69 6e73 7572 616e 6365 5f63 aim__insurance_c │ │ │ │ -00107390: 6c61 696d 5f61 7574 6f28 3c73 7061 6e20 laim_auto( │ │ │ │ -001073b0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ -001073f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00107400: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00107410: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -00107420: 2e2e 2e29 203c 2f64 6976 3e0a 3c64 6976 ...)
    .
    {< │ │ │ │ -00107440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -00107470: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *htmlDoc = .. │ │ │ │ -001074b0: 2e3b 203c 7370 616e 2063 6c61 7373 3d22 .; // an H │ │ │ │ -001074d0: 544d 4c20 6d65 7373 6167 6520 746f 2073 TML message to s │ │ │ │ -001074e0: 656e 6420 6173 2061 6e20 6174 7461 6368 end as an attach │ │ │ │ -001074f0: 6d65 6e74 3c2f 7370 616e 3e3c 2f64 6976 ment
    .
    soap_set │ │ │ │ -00107570: 5f6d 696d 653c 2f61 3e28 3c61 2063 6c61 _mime(soap, NULL, │ │ │ │ -001075b0: 204e 554c 4c29 3b20 3c73 7061 6e20 636c NULL); // │ │ │ │ -001075d0: 2065 6e61 626c 6520 4d49 4d45 3c2f 7370 enable MIME
    .
    // add a HTM │ │ │ │ -00107620: 4c20 646f 6375 6d65 6e74 2028 6874 6d6c L document (html │ │ │ │ -00107630: 446f 6320 706f 696e 7473 2074 6f20 6461 Doc points to da │ │ │ │ -00107640: 7461 2c20 7768 6572 6520 7468 6520 4854 ta, where the HT │ │ │ │ -00107650: 4d4c 2064 6f63 2069 7320 7374 6f72 6564 ML doc is stored │ │ │ │ -00107660: 2069 6e20 636f 6d70 6c69 616e 6365 2077 in compliance w │ │ │ │ -00107670: 6974 6820 3762 6974 2065 6e63 6f64 696e ith 7bit encodin │ │ │ │ -00107680: 6720 5246 4332 3034 3529 203c 2f73 7061 g RFC2045)
    .
    if │ │ │ │ -001076d0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_set_mim │ │ │ │ -00107730: 655f 6174 7461 6368 6d65 6e74 3c2f 613e e_attachment │ │ │ │ -00107740: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -00107770: 2c20 6874 6d6c 446f 632c 2073 7472 6c65 , htmlDoc, strle │ │ │ │ -00107780: 6e28 6874 6d6c 446f 6329 2c20 3c61 2063 n(htmlDoc), │ │ │ │ -00107800: 534f 4150 5f4d 494d 455f 3742 4954 3c2f SOAP_MIME_7BIT, │ │ │ │ -00107830: 2671 756f 743b 7465 7874 2f68 746d 6c26 "text/html& │ │ │ │ -00107840: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, " │ │ │ │ -00107870: 266c 743b 636c 6169 6d30 3631 3430 3061 <claim061400a │ │ │ │ -00107880: 2e68 746d 6c40 636c 6169 6d69 6e67 2d69 .html@claiming-i │ │ │ │ -00107890: 742e 636f 6d26 6774 3b26 7175 6f74 3b3c t.com>"< │ │ │ │ -001078a0: 2f73 7061 6e3e 2c20 4e55 4c4c 2c20 4e55 /span>, NULL, NU │ │ │ │ -001078b0: 4c4c 2929 203c 2f64 6976 3e0a 3c64 6976 LL))
    .
    │ │ │ │ -001078d0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ -00107940: 736f 6170 5f63 6c72 5f6d 696d 653c 2f61 soap_clr_mime(soap); // don │ │ │ │ -001079a0: 2623 3339 3b74 2077 616e 7420 6661 756c 't want faul │ │ │ │ -001079b0: 7420 7769 7468 2061 7474 6163 686d 656e t with attachmen │ │ │ │ -001079c0: 7473 203c 2f73 7061 6e3e 3c2f 6469 763e ts
    │ │ │ │ -001079d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return < │ │ │ │ -00107a10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00107a20: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00107a30: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -00107a40: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro │ │ │ │ -00107a90: 723c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 r;
    . │ │ │ │ -00107ab0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    < │ │ │ │ -00107ad0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00107ae0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ -00107af0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_ │ │ │ │ -00107b50: 4f4b 3c2f 613e 3b20 3c2f 6469 763e 0a3c OK;
    .< │ │ │ │ -00107b60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00107b70: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    . │ │ │ │ -00107c80: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    @ SOAP_MIME_ │ │ │ │ -00107ca0: 3742 4954 3c2f 6469 763e 3c64 6976 2063 7BIT
    7 b │ │ │ │ -00107cc0: 6974 2064 6174 6120 636f 6e74 656e 743c it data content< │ │ │ │ -00107cd0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -00107cf0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -00107d00: 6170 322e 683a 3130 3232 353c 2f64 6976 ap2.h:10225
    .
    < │ │ │ │ -00107d30: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -00107d50: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -00107d60: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Retrieving a c │ │ │ │ -00107da0: 6f6c 6c65 6374 696f 6e20 6f66 204d 494d ollection of MIM │ │ │ │ -00107db0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen │ │ │ │ -00107dc0: 7473 2028 5377 4129 3c2f 6832 3e0a 3c70 ts (SwA)

    .
    {.
    ++n;.
    printf(< │ │ │ │ -00108360: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -00108370: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -00108380: 3b50 6172 7420 2564 3a5c 6e26 7175 6f74 ;Part %d:\n" │ │ │ │ -00108390: 3b3c 2f73 7061 6e3e 2c20 6e29 3b3c 2f64 ;, n);.
    printf(< │ │ │ │ -001083c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -001083d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -001083e0: 3b70 7472 2020 2020 2020 2020 3d25 705c ;ptr =%p\ │ │ │ │ -001083f0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ -00108400: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment->< │ │ │ │ -00108410: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00108420: 7265 663d 2273 7472 7563 7473 6f61 705f ref="structsoap_ │ │ │ │ -00108430: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html# │ │ │ │ -00108440: 6136 3430 6634 3662 3630 3530 3432 6633 a640f46b605042f3 │ │ │ │ -00108450: 3761 6531 3539 3266 3737 6533 3163 3532 7ae1592f77e31c52 │ │ │ │ -00108460: 6422 3e70 7472 3c2f 613e 293b 3c2f 6469 d">ptr);.
    printf(" │ │ │ │ -001084b0: 7369 7a65 2020 2020 2020 203d 2575 6c5c size =%ul\ │ │ │ │ -001084c0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ -001084d0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment->< │ │ │ │ -001084e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001084f0: 7265 663d 2273 7472 7563 7473 6f61 705f ref="structsoap_ │ │ │ │ -00108500: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html# │ │ │ │ -00108510: 6166 6334 6236 3966 3565 3961 6465 3635 afc4b69f5e9ade65 │ │ │ │ -00108520: 3236 6232 3336 3831 6331 3035 6435 6361 26b23681c105d5ca │ │ │ │ -00108530: 3522 3e73 697a 653c 2f61 3e29 3b3c 2f64 5">size);.
    printf(< │ │ │ │ -00108560: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -00108570: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -00108580: 3b69 6420 2020 2020 2020 2020 3d25 735c ;id =%s\ │ │ │ │ -00108590: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ -001085a0: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment->< │ │ │ │ -001085b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001085c0: 7265 663d 2273 7472 7563 7473 6f61 705f ref="structsoap_ │ │ │ │ -001085d0: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html# │ │ │ │ -001085e0: 6164 3062 6364 3739 6234 3061 3162 6331 ad0bcd79b40a1bc1 │ │ │ │ -001085f0: 6463 3133 6663 3334 3334 3737 6635 3536 dc13fc343477f556 │ │ │ │ -00108600: 3422 3e69 643c 2f61 3e20 3f20 6174 7461 4">id ? atta │ │ │ │ -00108610: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->i │ │ │ │ -00108670: 643c 2f61 3e20 3a20 3c73 7061 6e20 636c d : "" │ │ │ │ -001086a0: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    . │ │ │ │ -001086b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("typ │ │ │ │ -001086f0: 6520 2020 2020 2020 3d25 735c 6e26 7175 e =%s\n&qu │ │ │ │ -00108700: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta │ │ │ │ -00108710: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->t │ │ │ │ -00108770: 7970 653c 2f61 3e20 3f20 6174 7461 6368 ype ? attach │ │ │ │ -00108780: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->typ │ │ │ │ -001087e0: 653c 2f61 3e20 3a20 3c73 7061 6e20 636c e : "" │ │ │ │ -00108810: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    . │ │ │ │ -00108820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("loc │ │ │ │ -00108860: 6174 696f 6e20 2020 3d25 735c 6e26 7175 ation =%s\n&qu │ │ │ │ -00108870: 6f74 3b3c 2f73 7061 6e3e 2c20 6174 7461 ot;, atta │ │ │ │ -00108880: 6368 6d65 6e74 2d26 6774 3b3c 6120 636c chment->l │ │ │ │ -001088e0: 6f63 6174 696f 6e3c 2f61 3e20 3f20 6174 ocation ? at │ │ │ │ -001088f0: 7461 6368 6d65 6e74 2d26 6774 3b3c 6120 tachment->location : │ │ │ │ -00108960: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -00108980: 743b 2671 756f 743b 3c2f 7370 616e 3e29 t;") │ │ │ │ -00108990: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    prin │ │ │ │ -001089b0: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(& │ │ │ │ -001089d0: 7175 6f74 3b64 6573 6372 6970 7469 6f6e quot;description │ │ │ │ -001089e0: 3d25 735c 6e26 7175 6f74 3b3c 2f73 7061 =%s\n", attachment-& │ │ │ │ -00108a00: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;descripti │ │ │ │ -00108a60: 6f6e 3c2f 613e 203f 2061 7474 6163 686d on ? attachm │ │ │ │ -00108a70: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->desc │ │ │ │ -00108ad0: 7269 7074 696f 6e3c 2f61 3e20 3a20 3c73 ription : " │ │ │ │ -00108b00: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");< │ │ │ │ +00107020: 6e65 223e 2020 4020 3c73 7061 6e20 636c ne"> @ char *h │ │ │ │ +00107050: 7265 663b 203c 2f64 6976 3e0a 3c64 6976 ref;
    .
    }; │ │ │ │ +00107070: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The claim forms │ │ │ │ +001070a0: 2069 6e20 7468 6520 6d65 7373 6167 6520 in the message │ │ │ │ +001070b0: 636f 6e73 6973 7420 6f66 203c 656d 3e3c consist of < │ │ │ │ +001070c0: 636f 6465 3e68 7265 663c 2f63 6f64 653e code>href │ │ │ │ +001070d0: 3c2f 656d 3e73 2074 6f20 7468 6520 636c s to the cl │ │ │ │ +001070e0: 6169 6d20 666f 726d 7320 6174 7461 6368 aim forms attach │ │ │ │ +001070f0: 6564 2e20 5468 6520 7573 6520 6f66 203c ed. The use of < │ │ │ │ +00107100: 656d 3e3c 636f 6465 3e68 7265 663c 2f63 em>href or oth │ │ │ │ +00107120: 6572 2061 7474 7269 6275 7465 7320 666f er attributes fo │ │ │ │ +00107130: 7220 7265 6665 7272 696e 6720 746f 2074 r referring to t │ │ │ │ +00107140: 6865 204d 494d 4520 6174 7461 6368 6d65 he MIME attachme │ │ │ │ +00107150: 6e74 7320 6973 206f 7074 696f 6e61 6c20 nts is optional │ │ │ │ +00107160: 6163 636f 7264 696e 6720 746f 2074 6865 according to the │ │ │ │ +00107170: 2053 7741 2073 7461 6e64 6172 642e 204d SwA standard. M │ │ │ │ +00107180: 544f 4d20 6f6e 2074 6865 206f 7468 6572 TOM on the other │ │ │ │ +00107190: 2068 616e 6420 6d61 6e64 6174 6573 2074 hand mandates t │ │ │ │ +001071a0: 6865 2075 7365 206f 6620 3c65 6d3e 3c63 he use of href< │ │ │ │ +001071c0: 2f65 6d3e 2077 6974 6820 584f 5020 656c /em> with XOP el │ │ │ │ +001071d0: 656d 656e 7473 2e3c 2f70 3e0a 3c70 3e54 ements.

    .

    T │ │ │ │ +001071e0: 6f20 6173 736f 6369 6174 6520 4d49 4d45 o associate MIME │ │ │ │ +001071f0: 2061 7474 6163 686d 656e 7473 2077 6974 attachments wit │ │ │ │ +00107200: 6820 7468 6520 7265 7175 6573 7420 616e h the request an │ │ │ │ +00107210: 6420 7265 7370 6f6e 7365 206f 6620 6120 d response of a │ │ │ │ +00107220: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio │ │ │ │ +00107230: 6e20 696e 2074 6865 2067 656e 6572 6174 n in the generat │ │ │ │ +00107240: 6564 2057 5344 4c2c 2070 6c65 6173 6520 ed WSDL, please │ │ │ │ +00107250: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Generating │ │ │ │ +00107290: 4d75 6c74 6970 6172 7452 656c 6174 6564 MultipartRelated │ │ │ │ +001072a0: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment │ │ │ │ +001072b0: 2062 696e 6469 6e67 7320 696e 2057 5344 bindings in WSD │ │ │ │ +001072c0: 4c3c 2f61 3e20 2e3c 2f70 3e0a 3c70 3e54 L .

    .

    T │ │ │ │ +001072d0: 6865 2073 6572 7665 722d 7369 6465 2063 he server-side c │ │ │ │ +001072e0: 6f64 6520 746f 2074 7261 6e73 6d69 7420 ode to transmit │ │ │ │ +001072f0: 4d49 4d45 2061 7474 6163 686d 656e 7473 MIME attachments │ │ │ │ +00107300: 2062 6163 6b20 746f 2061 2063 6c69 656e back to a clien │ │ │ │ +00107310: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

    .
    < │ │ │ │ +00107340: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00107350: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int claim__insur │ │ │ │ +00107370: 616e 6365 5f63 6c61 696d 5f61 7574 6f28 ance_claim_auto( │ │ │ │ +00107380: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ +001073d0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap │ │ │ │ +00107400: 3c2f 613e 2c20 2e2e 2e29 203c 2f64 6976 , ...)
    .
    {
    .
    │ │ │ │ +00107440: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ +00107480: 723c 2f73 7061 6e3e 202a 6874 6d6c 446f r *htmlDo │ │ │ │ +00107490: 6320 3d20 2e2e 2e3b 203c 7370 616e 2063 c = ...; / │ │ │ │ +001074b0: 2f20 616e 2048 544d 4c20 6d65 7373 6167 / an HTML messag │ │ │ │ +001074c0: 6520 746f 2073 656e 6420 6173 2061 6e20 e to send as an │ │ │ │ +001074d0: 6174 7461 6368 6d65 6e74 3c2f 7370 616e attachment
    .
    so │ │ │ │ +00107550: 6170 5f73 6574 5f6d 696d 653c 2f61 3e28 ap_set_mime( │ │ │ │ +00107560: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00107590: 204e 554c 4c2c 204e 554c 4c29 3b20 3c73 NULL, NULL); // enable MI │ │ │ │ +001075c0: 4d45 3c2f 7370 616e 3e3c 2f64 6976 3e0a ME
    . │ │ │ │ +001075d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // add │ │ │ │ +00107600: 2061 2048 544d 4c20 646f 6375 6d65 6e74 a HTML document │ │ │ │ +00107610: 2028 6874 6d6c 446f 6320 706f 696e 7473 (htmlDoc points │ │ │ │ +00107620: 2074 6f20 6461 7461 2c20 7768 6572 6520 to data, where │ │ │ │ +00107630: 7468 6520 4854 4d4c 2064 6f63 2069 7320 the HTML doc is │ │ │ │ +00107640: 7374 6f72 6564 2069 6e20 636f 6d70 6c69 stored in compli │ │ │ │ +00107650: 616e 6365 2077 6974 6820 3762 6974 2065 ance with 7bit e │ │ │ │ +00107660: 6e63 6f64 696e 6720 5246 4332 3034 3529 ncoding RFC2045) │ │ │ │ +00107670: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00107680: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00107690: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +001076b0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_s │ │ │ │ +00107710: 6574 5f6d 696d 655f 6174 7461 6368 6d65 et_mime_attachme │ │ │ │ +00107720: 6e74 3c2f 613e 283c 6120 636c 6173 733d nt(so │ │ │ │ +00107750: 6170 3c2f 613e 2c20 6874 6d6c 446f 632c ap, htmlDoc, │ │ │ │ +00107760: 2073 7472 6c65 6e28 6874 6d6c 446f 6329 strlen(htmlDoc) │ │ │ │ +00107770: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_MIME_ │ │ │ │ +001077f0: 3742 4954 3c2f 613e 2c20 3c73 7061 6e20 7BIT, "text │ │ │ │ +00107820: 2f68 746d 6c26 7175 6f74 3b3c 2f73 7061 /html", │ │ │ │ +00107850: 2671 756f 743b 266c 743b 636c 6169 6d30 "<claim0 │ │ │ │ +00107860: 3631 3430 3061 2e68 746d 6c40 636c 6169 61400a.html@clai │ │ │ │ +00107870: 6d69 6e67 2d69 742e 636f 6d26 6774 3b26 ming-it.com>& │ │ │ │ +00107880: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 4e55 quot;, NU │ │ │ │ +00107890: 4c4c 2c20 4e55 4c4c 2929 203c 2f64 6976 LL, NULL))
    .
    {
    . │ │ │ │ +001078d0: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_clr_m │ │ │ │ +00107930: 696d 653c 2f61 3e28 3c61 2063 6c61 7373 ime(s │ │ │ │ +00107960: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); │ │ │ │ +00107980: 2f2f 2064 6f6e 2623 3339 3b74 2077 616e // don't wan │ │ │ │ +00107990: 7420 6661 756c 7420 7769 7468 2061 7474 t fault with att │ │ │ │ +001079a0: 6163 686d 656e 7473 203c 2f73 7061 6e3e achments │ │ │ │ +001079b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return soap │ │ │ │ +00107a20: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error; .
    }
    │ │ │ │ +00107aa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r │ │ │ │ +00107ad0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
    }
    .< │ │ │ │ +00107b60: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00107b70: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +00107b80: 705f 5f6d 696d 655f 6874 6d6c 5f67 6761 p__mime_html_gga │ │ │ │ +00107b90: 3366 6563 3736 3333 6461 3037 6266 6632 3fec7633da07bff2 │ │ │ │ +00107ba0: 6266 3566 6436 3333 3062 6566 3138 3434 bf5fd6330bef1844 │ │ │ │ +00107bb0: 6166 3236 3130 3866 6630 6365 6537 3037 af26108ff0cee707 │ │ │ │ +00107bc0: 3939 3339 6137 3964 6632 3766 3039 6530 9939a79df27f09e0 │ │ │ │ +00107bd0: 3422 3e3c 6469 7620 636c 6173 733d 2274 4">
    SO │ │ │ │ +00107c50: 4150 5f4d 494d 455f 3742 4954 3c2f 613e AP_MIME_7BIT │ │ │ │ +00107c60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    @ SOAP │ │ │ │ +00107c80: 5f4d 494d 455f 3742 4954 3c2f 6469 763e _MIME_7BIT
    │ │ │ │ +00107c90: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    7 bit data co │ │ │ │ +00107cb0: 6e74 656e 743c 2f64 6976 3e3c 6469 7620 ntent
    Definition: │ │ │ │ +00107ce0: 2073 7464 736f 6170 322e 683a 3130 3232 stdsoap2.h:1022 │ │ │ │ +00107cf0: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 5
    .

    .... Back to │ │ │ │ +00107d30: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +00107d40: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    < │ │ │ │ +00107d50: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +00107d60: 2069 643d 2253 5741 7265 6365 6976 696e id="SWAreceivin │ │ │ │ +00107d70: 6722 3e3c 2f61 3e0a 5265 7472 6965 7669 g">.Retrievi │ │ │ │ +00107d80: 6e67 2061 2063 6f6c 6c65 6374 696f 6e20 ng a collection │ │ │ │ +00107d90: 6f66 204d 494d 452f 4d54 4f4d 2061 7474 of MIME/MTOM att │ │ │ │ +00107da0: 6163 686d 656e 7473 2028 5377 4129 3c2f achments (SwA).

    MIME atta │ │ │ │ +00107dc0: 6368 6d65 6e74 7320 6172 6520 6175 746f chments are auto │ │ │ │ +00107dd0: 6d61 7469 6361 6c6c 7920 7061 7273 6564 matically parsed │ │ │ │ +00107de0: 2061 6e64 2073 746f 7265 6420 696e 206d and stored in m │ │ │ │ +00107df0: 656d 6f72 7920 6d61 6e61 6765 6420 6279 emory managed by │ │ │ │ +00107e00: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap< │ │ │ │ +00107e60: 2f63 6f64 653e 2063 6f6e 7465 7874 2e20 /code> context. │ │ │ │ +00107e70: 4166 7465 7220 7265 6365 6976 696e 6720 After receiving │ │ │ │ +00107e80: 6120 7365 7420 6f66 204d 494d 452f 4d54 a set of MIME/MT │ │ │ │ +00107e90: 4f4d 2061 7474 6163 686d 656e 7473 2c20 OM attachments, │ │ │ │ +00107ea0: 6569 7468 6572 2061 7420 7468 6520 636c either at the cl │ │ │ │ +00107eb0: 6965 6e74 2d73 6964 6520 6f72 2074 6865 ient-side or the │ │ │ │ +00107ec0: 2073 6572 7665 722d 7369 6465 2c20 7468 server-side, th │ │ │ │ +00107ed0: 6520 6c69 7374 206f 6620 4d49 4d45 2f4d e list of MIME/M │ │ │ │ +00107ee0: 544f 4d20 6174 7461 6368 6d65 6e74 7320 TOM attachments │ │ │ │ +00107ef0: 6361 6e20 6265 2074 7261 7665 7273 6564 can be traversed │ │ │ │ +00107f00: 2074 6f20 6578 7472 6163 7420 6d65 7461 to extract meta │ │ │ │ +00107f10: 2064 6174 6120 616e 6420 7468 6520 6174 data and the at │ │ │ │ +00107f20: 7461 6368 6d65 6e74 2063 6f6e 7465 6e74 tachment content │ │ │ │ +00107f30: 2e20 5468 6520 6669 7273 7420 6174 7461 . The first atta │ │ │ │ +00107f40: 6368 6d65 6e74 2069 6e20 7468 6520 636f chment in the co │ │ │ │ +00107f50: 6c6c 6563 7469 6f6e 206f 6620 4d49 4d45 llection of MIME │ │ │ │ +00107f60: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment │ │ │ │ +00107f70: 7320 616c 7761 7973 2063 6f6e 7461 696e s always contain │ │ │ │ +00107f80: 7320 6d65 7461 2064 6174 6120 6162 6f75 s meta data abou │ │ │ │ +00107f90: 7420 7468 6520 534f 4150 206d 6573 7361 t the SOAP messa │ │ │ │ +00107fa0: 6765 2069 7473 656c 6620 2862 6563 6175 ge itself (becau │ │ │ │ +00107fb0: 7365 2074 6865 2053 4f41 5020 6d65 7373 se the SOAP mess │ │ │ │ +00107fc0: 6167 6520 7761 7320 7072 6f63 6573 7365 age was processe │ │ │ │ +00107fd0: 6420 7468 6520 6174 7461 6368 6d65 6e74 d the attachment │ │ │ │ +00107fe0: 2064 6f65 7320 6e6f 7420 636f 6e74 6169 does not contai │ │ │ │ +00107ff0: 6e20 616e 7920 7573 6566 756c 2064 6174 n any useful dat │ │ │ │ +00108000: 6129 2e3c 2f70 3e0a 3c70 3e54 6f20 7472 a).

    .

    To tr │ │ │ │ +00108010: 6176 6572 7365 2074 6865 206c 6973 7420 averse the list │ │ │ │ +00108020: 6f66 204d 494d 4520 6174 7461 6368 6d65 of MIME attachme │ │ │ │ +00108030: 6e74 7320 696e 2043 2c20 796f 7520 7573 nts in C, you us │ │ │ │ +00108040: 6520 6120 6c6f 6f70 2073 696d 696c 6172 e a loop similar │ │ │ │ +00108050: 2074 6f3a 3c2f 703e 0a3c 6469 7620 636c to:

    .
    < │ │ │ │ +00108070: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00108080: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int n = 0;.
    struc │ │ │ │ +001080e0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t soap_ │ │ │ │ +00108120: 6d75 6c74 6970 6172 743c 2f61 3e20 2a61 multipart *a │ │ │ │ +00108130: 7474 6163 686d 656e 743b 3c2f 6469 763e ttachment;
    │ │ │ │ +00108140: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ │ +001082f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    + │ │ │ │ +00108320: 2b6e 3b3c 2f64 6976 3e0a 3c64 6976 2063 +n;
    .
    pr │ │ │ │ +00108340: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("Part %d:\ │ │ │ │ +00108370: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ +00108380: 6e29 3b3c 2f64 6976 3e0a 3c64 6976 2063 n);
    .
    pr │ │ │ │ +001083a0: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("ptr │ │ │ │ +001083d0: 2020 3d25 705c 6e26 7175 6f74 3b3c 2f73 =%p\n", attachment │ │ │ │ +001083f0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ptr │ │ │ │ +00108450: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    pri │ │ │ │ +00108470: 6e74 6628 3c73 7061 6e20 636c 6173 733d ntf( │ │ │ │ +00108490: 2671 756f 743b 7369 7a65 2020 2020 2020 "size │ │ │ │ +001084a0: 203d 2575 6c5c 6e26 7175 6f74 3b3c 2f73 =%ul\n", attachment │ │ │ │ +001084c0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->size);
    .
    pr │ │ │ │ +00108540: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("id │ │ │ │ +00108570: 2020 3d25 735c 6e26 7175 6f74 3b3c 2f73 =%s\n", attachment │ │ │ │ +00108590: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->id │ │ │ │ +001085f0: 3f20 6174 7461 6368 6d65 6e74 2d26 6774 ? attachment-> │ │ │ │ +00108600: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;id : " │ │ │ │ +00108680: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");< │ │ │ │ +00108690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    printf │ │ │ │ +001086b0: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu │ │ │ │ +001086d0: 6f74 3b74 7970 6520 2020 2020 2020 3d25 ot;type =% │ │ │ │ +001086e0: 735c 6e26 7175 6f74 3b3c 2f73 7061 6e3e s\n" │ │ │ │ +001086f0: 2c20 6174 7461 6368 6d65 6e74 2d26 6774 , attachment-> │ │ │ │ +00108700: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;type ? │ │ │ │ +00108760: 6174 7461 6368 6d65 6e74 2d26 6774 3b3c attachment->< │ │ │ │ +00108770: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00108780: 7265 663d 2273 7472 7563 7473 6f61 705f ref="structsoap_ │ │ │ │ +00108790: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html# │ │ │ │ +001087a0: 6134 3935 6338 6432 3065 3033 3334 6265 a495c8d20e0334be │ │ │ │ +001087b0: 3162 3133 3435 3139 3363 6132 6662 3736 1b1345193ca2fb76 │ │ │ │ +001087c0: 3422 3e74 7970 653c 2f61 3e20 3a20 3c73 4">type : " │ │ │ │ +001087f0: 2671 756f 743b 3c2f 7370 616e 3e29 3b3c ");< │ │ │ │ +00108800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    printf │ │ │ │ +00108820: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu │ │ │ │ +00108840: 6f74 3b6c 6f63 6174 696f 6e20 2020 3d25 ot;location =% │ │ │ │ +00108850: 735c 6e26 7175 6f74 3b3c 2f73 7061 6e3e s\n" │ │ │ │ +00108860: 2c20 6174 7461 6368 6d65 6e74 2d26 6774 , attachment-> │ │ │ │ +00108870: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;location ? attachment-& │ │ │ │ +001088e0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;location< │ │ │ │ +00108940: 2f61 3e20 3a20 3c73 7061 6e20 636c 6173 /a> : "");
    . │ │ │ │ +00108990: 2020 7072 696e 7466 283c 7370 616e 2063 printf("descr │ │ │ │ +001089c0: 6970 7469 6f6e 3d25 735c 6e26 7175 6f74 iption=%s\n" │ │ │ │ +001089d0: 3b3c 2f73 7061 6e3e 2c20 6174 7461 6368 ;, attach │ │ │ │ +001089e0: 6d65 6e74 2d26 6774 3b3c 6120 636c 6173 ment->des │ │ │ │ +00108a40: 6372 6970 7469 6f6e 3c2f 613e 203f 2061 cription ? a │ │ │ │ +00108a50: 7474 6163 686d 656e 742d 2667 743b 3c61 ttachment->description : │ │ │ │ +00108ae0: 2671 756f 743b 2671 756f 743b 3c2f 7370 "");
    .
    }< │ │ │ │ 00108b10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ -00108b30: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    < │ │ │ │ -00108b80: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -00108b90: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">soap_mime:: │ │ │ │ -00108be0: 6c69 7374 3c2f 613e 3c2f 6469 763e 3c64 list
    struct soap_mu │ │ │ │ -00108c10: 6c74 6970 6172 7420 2a20 6c69 7374 3c2f ltipart * list
    list of M │ │ │ │ -00108c40: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments │ │ │ │ -00108c50: 7265 6365 6976 6564 3c2f 6469 763e 3c64 received
    Definition:< │ │ │ │ -00108c80: 2f62 3e20 7374 6473 6f61 7032 2e68 3a31 /b> stdsoap2.h:1 │ │ │ │ -00108c90: 3034 3230 3c2f 6469 763e 3c2f 6469 763e 0420
    │ │ │ │ -00108ca0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap │ │ │ │ -00108d10: 5f6d 756c 7469 7061 7274 3c2f 613e 3c2f _multipart
    DIME/MIME │ │ │ │ -00108d40: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment │ │ │ │ -00108d50: 2064 6174 6120 7265 6365 6976 6564 2062 data received b │ │ │ │ -00108d60: 7920 7468 6520 656e 6769 6e65 2e3c 2f64 y the engine.
    Definit │ │ │ │ -00108d90: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ -00108da0: 322e 683a 3130 3433 303c 2f64 6976 3e3c 2.h:10430
    < │ │ │ │ -00108db0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_multip │ │ │ │ -00108e70: 6172 743a 3a74 7970 653c 2f61 3e3c 2f64 art::type
    const cha │ │ │ │ -00108ea0: 7220 2a20 7479 7065 3c2f 6469 763e 3c64 r * type
    DIME/MIME/MTOM │ │ │ │ -00108ed0: 7479 7065 2028 4d49 4d45 2074 7970 6520 type (MIME type │ │ │ │ -00108ee0: 666f 726d 6174 293c 2f64 6976 3e3c 6469 format)
    │ │ │ │ -00108f00: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:10 │ │ │ │ -00108f20: 3433 353c 2f64 6976 3e3c 2f64 6976 3e0a 435
    . │ │ │ │ -00108f30: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    struct soap_mul │ │ │ │ -00109020: 7469 7061 7274 202a 206e 6578 743c 2f64 tipart * next
    next attac │ │ │ │ -00109050: 686d 656e 7420 696e 2074 6865 206c 696e hment in the lin │ │ │ │ -00109060: 6b65 6420 6c69 7374 3c2f 6469 763e 3c64 ked list
    Definition:< │ │ │ │ -00109090: 2f62 3e20 7374 6473 6f61 7032 2e68 3a31 /b> stdsoap2.h:1 │ │ │ │ -001090a0: 3034 3331 3c2f 6469 763e 3c2f 6469 763e 0431
    │ │ │ │ -001090b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    points │ │ │ │ -001091c0: 2074 6f20 7261 7720 6461 7461 2063 6f6e to raw data con │ │ │ │ -001091d0: 7465 6e74 3c2f 6469 763e 3c64 6976 2063 tent
    │ │ │ │ -001091f0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00109200: 7374 6473 6f61 7032 2e68 3a31 3034 3332 stdsoap2.h:10432 │ │ │ │ -00109210: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    const char │ │ │ │ -00109310: 2a20 6465 7363 7269 7074 696f 6e3c 2f64 * description
    MIME Conte │ │ │ │ -00109340: 6e74 2d44 6573 6372 6970 7469 6f6e 2028 nt-Description ( │ │ │ │ -00109350: 6f70 7469 6f6e 616c 293c 2f64 6976 3e3c optional)
    < │ │ │ │ -00109360: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ -00109370: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ -00109380: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ -00109390: 3130 3433 393c 2f64 6976 3e3c 2f64 6976 10439
    .
    const char * id │ │ │ │ -00109490: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    DIME/MI │ │ │ │ -001094b0: 4d45 2f4d 544f 4d20 636f 6e74 656e 7420 ME/MTOM content │ │ │ │ -001094c0: 4944 206f 7220 666f 726d 2064 6174 6120 ID or form data │ │ │ │ -001094d0: 6e61 6d65 2e3c 2f64 6976 3e3c 6469 7620 name.
    Definition: │ │ │ │ -00109500: 2073 7464 736f 6170 322e 683a 3130 3433 stdsoap2.h:1043 │ │ │ │ -00109510: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4

    .< │ │ │ │ -001095f0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00109600: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i">const char * │ │ │ │ -00109610: 6c6f 6361 7469 6f6e 3c2f 6469 763e 3c64 location
    MIME Content-Lo │ │ │ │ -00109640: 6361 7469 6f6e 2028 6f70 7469 6f6e 616c cation (optional │ │ │ │ -00109650: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Def │ │ │ │ -00109670: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ -00109680: 736f 6170 322e 683a 3130 3433 383c 2f64 soap2.h:10438
    .
    size_ │ │ │ │ -00109780: 7420 7369 7a65 3c2f 6469 763e 3c64 6976 t size
    s │ │ │ │ -001097a0: 697a 6520 6f66 2064 6174 6120 636f 6e74 ize of data cont │ │ │ │ -001097b0: 656e 743c 2f64 6976 3e3c 6469 7620 636c ent
    D │ │ │ │ -001097d0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ -001097e0: 7464 736f 6170 322e 683a 3130 3433 333c tdsoap2.h:10433< │ │ │ │ -001097f0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    ..

    C++ progr │ │ │ │ -00109970: 616d 6d65 7273 2063 616e 2075 7365 2061 ammers can use a │ │ │ │ -00109980: 6e20 6974 6572 6174 6f72 2069 6e73 7465 n iterator inste │ │ │ │ -00109990: 6164 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ad:

    .
    │ │ │ │ -001099c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int n = 0;
    .
    fo │ │ │ │ -00109a20: 723c 2f73 7061 6e3e 2028 3c61 2063 6c61 r (so │ │ │ │ -00109a80: 6170 5f6d 756c 7469 7061 7274 3a3a 6974 ap_multipart::it │ │ │ │ -00109a90: 6572 6174 6f72 3c2f 613e 2069 203d 203c erator i = < │ │ │ │ -00109aa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00109ab0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00109ac0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -00109ad0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;mime │ │ │ │ -00109b20: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .begin(); │ │ │ │ -00109b80: 2069 2021 3d20 3c61 2063 6c61 7373 3d22 i != soa │ │ │ │ -00109bb0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->mime.end(); ++i)
    │ │ │ │ +00108b20: 3d22 7474 6322 2069 643d 2261 7374 7275 ="ttc" id="astru │ │ │ │ +00108b30: 6374 736f 6170 5f5f 6d69 6d65 5f68 746d ctsoap__mime_htm │ │ │ │ +00108b40: 6c5f 6165 6566 3732 3530 3335 6464 6564 l_aeef725035dded │ │ │ │ +00108b50: 6632 3462 3239 6431 3037 3065 3066 3962 f24b29d1070e0f9b │ │ │ │ +00108b60: 6233 3322 3e3c 6469 7620 636c 6173 733d b33">

    MIME attachment │ │ │ │ -00107de0: 7320 6172 6520 6175 746f 6d61 7469 6361 s are automatica │ │ │ │ -00107df0: 6c6c 7920 7061 7273 6564 2061 6e64 2073 lly parsed and s │ │ │ │ -00107e00: 746f 7265 6420 696e 206d 656d 6f72 7920 tored in memory │ │ │ │ -00107e10: 6d61 6e61 6765 6420 6279 2074 6865 203c managed by the < │ │ │ │ -00107e20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap │ │ │ │ -00107e80: 2063 6f6e 7465 7874 2e20 4166 7465 7220 context. After │ │ │ │ -00107e90: 7265 6365 6976 696e 6720 6120 7365 7420 receiving a set │ │ │ │ -00107ea0: 6f66 204d 494d 452f 4d54 4f4d 2061 7474 of MIME/MTOM att │ │ │ │ -00107eb0: 6163 686d 656e 7473 2c20 6569 7468 6572 achments, either │ │ │ │ -00107ec0: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s │ │ │ │ -00107ed0: 6964 6520 6f72 2074 6865 2073 6572 7665 ide or the serve │ │ │ │ -00107ee0: 722d 7369 6465 2c20 7468 6520 6c69 7374 r-side, the list │ │ │ │ -00107ef0: 206f 6620 4d49 4d45 2f4d 544f 4d20 6174 of MIME/MTOM at │ │ │ │ -00107f00: 7461 6368 6d65 6e74 7320 6361 6e20 6265 tachments can be │ │ │ │ -00107f10: 2074 7261 7665 7273 6564 2074 6f20 6578 traversed to ex │ │ │ │ -00107f20: 7472 6163 7420 6d65 7461 2064 6174 6120 tract meta data │ │ │ │ -00107f30: 616e 6420 7468 6520 6174 7461 6368 6d65 and the attachme │ │ │ │ -00107f40: 6e74 2063 6f6e 7465 6e74 2e20 5468 6520 nt content. The │ │ │ │ -00107f50: 6669 7273 7420 6174 7461 6368 6d65 6e74 first attachment │ │ │ │ -00107f60: 2069 6e20 7468 6520 636f 6c6c 6563 7469 in the collecti │ │ │ │ -00107f70: 6f6e 206f 6620 4d49 4d45 2f4d 544f 4d20 on of MIME/MTOM │ │ │ │ -00107f80: 6174 7461 6368 6d65 6e74 7320 616c 7761 attachments alwa │ │ │ │ -00107f90: 7973 2063 6f6e 7461 696e 7320 6d65 7461 ys contains meta │ │ │ │ -00107fa0: 2064 6174 6120 6162 6f75 7420 7468 6520 data about the │ │ │ │ -00107fb0: 534f 4150 206d 6573 7361 6765 2069 7473 SOAP message its │ │ │ │ -00107fc0: 656c 6620 2862 6563 6175 7365 2074 6865 elf (because the │ │ │ │ -00107fd0: 2053 4f41 5020 6d65 7373 6167 6520 7761 SOAP message wa │ │ │ │ -00107fe0: 7320 7072 6f63 6573 7365 6420 7468 6520 s processed the │ │ │ │ -00107ff0: 6174 7461 6368 6d65 6e74 2064 6f65 7320 attachment does │ │ │ │ -00108000: 6e6f 7420 636f 6e74 6169 6e20 616e 7920 not contain any │ │ │ │ -00108010: 7573 6566 756c 2064 6174 6129 2e3c 2f70 useful data).

    .

    To traverse │ │ │ │ -00108030: 2074 6865 206c 6973 7420 6f66 204d 494d the list of MIM │ │ │ │ -00108040: 4520 6174 7461 6368 6d65 6e74 7320 696e E attachments in │ │ │ │ -00108050: 2043 2c20 796f 7520 7573 6520 6120 6c6f C, you use a lo │ │ │ │ -00108060: 6f70 2073 696d 696c 6172 2074 6f3a 3c2f op similar to:.

    int │ │ │ │ -001080c0: 6e20 3d20 303b 3c2f 6469 763e 0a3c 6469 n = 0;
    .< │ │ │ │ -001080e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001080f0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap_multip │ │ │ │ -00108140: 6172 743c 2f61 3e20 2a61 7474 6163 686d art *attachm │ │ │ │ -00108150: 656e 743b 3c2f 6469 763e 0a3c 6469 7620 ent;
    .
    for (attachment = │ │ │ │ -001081a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ -001081d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >mim │ │ │ │ -00108220: 653c 2f61 3e2e 3c61 2063 6c61 7373 3d22 e.list; a │ │ │ │ -00108280: 7474 6163 686d 656e 743b 2061 7474 6163 ttachment; attac │ │ │ │ -00108290: 686d 656e 7420 3d20 6174 7461 6368 6d65 hment = attachme │ │ │ │ -001082a0: 6e74 2d26 6774 3b3c 6120 636c 6173 733d nt->next< │ │ │ │ -00108300: 2f61 3e29 3c2f 6469 763e 0a3c 6469 7620 /a>)
    .
    soap_ │ │ │ │ +00108bc0: 6d69 6d65 3a3a 6c69 7374 3c2f 613e 3c2f mime::list
    struct s │ │ │ │ +00108bf0: 6f61 705f 6d75 6c74 6970 6172 7420 2a20 oap_multipart * │ │ │ │ +00108c00: 6c69 7374 3c2f 6469 763e 3c64 6976 2063 list
    lis │ │ │ │ +00108c20: 7420 6f66 204d 494d 4520 6174 7461 6368 t of MIME attach │ │ │ │ +00108c30: 6d65 6e74 7320 7265 6365 6976 6564 3c2f ments received
    Defini │ │ │ │ +00108c60: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ +00108c70: 7032 2e68 3a31 3034 3230 3c2f 6469 763e p2.h:10420
    │ │ │ │ +00108c80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    DIM │ │ │ │ +00108d20: 452f 4d49 4d45 2f4d 544f 4d20 6174 7461 E/MIME/MTOM atta │ │ │ │ +00108d30: 6368 6d65 6e74 2064 6174 6120 7265 6365 chment data rece │ │ │ │ +00108d40: 6976 6564 2062 7920 7468 6520 656e 6769 ived by the engi │ │ │ │ +00108d50: 6e65 2e3c 2f64 6976 3e3c 6469 7620 636c ne.
    D │ │ │ │ +00108d70: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +00108d80: 7464 736f 6170 322e 683a 3130 3433 303c tdsoap2.h:10430< │ │ │ │ +00108d90: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    │ │ │ │ +00108df0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    con │ │ │ │ +00108e80: 7374 2063 6861 7220 2a20 7479 7065 3c2f st char * type
    DIME/MIME │ │ │ │ +00108eb0: 2f4d 544f 4d20 7479 7065 2028 4d49 4d45 /MTOM type (MIME │ │ │ │ +00108ec0: 2074 7970 6520 666f 726d 6174 293c 2f64 type format)
    Definit │ │ │ │ +00108ef0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +00108f00: 322e 683a 3130 3433 353c 2f64 6976 3e3c 2.h:10435
    < │ │ │ │ +00108f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_multip │ │ │ │ +00108fd0: 6172 743a 3a6e 6578 743c 2f61 3e3c 2f64 art::next
    struct so │ │ │ │ +00109000: 6170 5f6d 756c 7469 7061 7274 202a 206e ap_multipart * n │ │ │ │ +00109010: 6578 743c 2f64 6976 3e3c 6469 7620 636c ext
    next │ │ │ │ +00109030: 2061 7474 6163 686d 656e 7420 696e 2074 attachment in t │ │ │ │ +00109040: 6865 206c 696e 6b65 6420 6c69 7374 3c2f he linked list
    Defini │ │ │ │ +00109070: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ +00109080: 7032 2e68 3a31 3034 3331 3c2f 6469 763e p2.h:10431
    │ │ │ │ +00109090: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +00109100: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ +00109110: 6170 5f5f 6d75 6c74 6970 6172 742e 6874 ap__multipart.ht │ │ │ │ +00109120: 6d6c 2361 3634 3066 3436 6236 3035 3034 ml#a640f46b60504 │ │ │ │ +00109130: 3266 3337 6165 3135 3932 6637 3765 3331 2f37ae1592f77e31 │ │ │ │ +00109140: 6335 3264 223e 736f 6170 5f6d 756c 7469 c52d">soap_multi │ │ │ │ +00109150: 7061 7274 3a3a 7074 723c 2f61 3e3c 2f64 part::ptr
    const cha │ │ │ │ +00109180: 7220 2a20 7074 723c 2f64 6976 3e3c 6469 r * ptr
    │ │ │ │ +001091a0: 706f 696e 7473 2074 6f20 7261 7720 6461 points to raw da │ │ │ │ +001091b0: 7461 2063 6f6e 7465 6e74 3c2f 6469 763e ta content
    │ │ │ │ +001091c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +001091e0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +001091f0: 3a31 3034 3332 3c2f 6469 763e 3c2f 6469 :10432
    .
    const │ │ │ │ +001092f0: 2063 6861 7220 2a20 6465 7363 7269 7074 char * descript │ │ │ │ +00109300: 696f 6e3c 2f64 6976 3e3c 6469 7620 636c ion
    MIME │ │ │ │ +00109320: 2043 6f6e 7465 6e74 2d44 6573 6372 6970 Content-Descrip │ │ │ │ +00109330: 7469 6f6e 2028 6f70 7469 6f6e 616c 293c tion (optional)< │ │ │ │ +00109340: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +00109360: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +00109370: 6170 322e 683a 3130 3433 393c 2f64 6976 ap2.h:10439
    .
    │ │ │ │ +001093f0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap_mult │ │ │ │ +00109440: 6970 6172 743a 3a69 643c 2f61 3e3c 2f64 ipart::id
    const cha │ │ │ │ +00109470: 7220 2a20 6964 3c2f 6469 763e 3c64 6976 r * id
    D │ │ │ │ +00109490: 494d 452f 4d49 4d45 2f4d 544f 4d20 636f IME/MIME/MTOM co │ │ │ │ +001094a0: 6e74 656e 7420 4944 206f 7220 666f 726d ntent ID or form │ │ │ │ +001094b0: 2064 6174 6120 6e61 6d65 2e3c 2f64 6976 data name.
    Definitio │ │ │ │ +001094e0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +001094f0: 683a 3130 3433 343c 2f64 6976 3e3c 2f64 h:10434
    .
    soap_multipar │ │ │ │ +001095c0: 743a 3a6c 6f63 6174 696f 6e3c 2f61 3e3c t::location< │ │ │ │ +001095d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c │ │ │ │ +001095f0: 6861 7220 2a20 6c6f 6361 7469 6f6e 3c2f har * location
    MIME Cont │ │ │ │ +00109620: 656e 742d 4c6f 6361 7469 6f6e 2028 6f70 ent-Location (op │ │ │ │ +00109630: 7469 6f6e 616c 293c 2f64 6976 3e3c 6469 tional)
    │ │ │ │ +00109650: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:10 │ │ │ │ +00109670: 3433 383c 2f64 6976 3e3c 2f64 6976 3e0a 438
    . │ │ │ │ +00109680: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    size_t size
    size of dat │ │ │ │ +00109790: 6120 636f 6e74 656e 743c 2f64 6976 3e3c a content
    < │ │ │ │ +001097a0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +001097b0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +001097c0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +001097d0: 3130 3433 333c 2f64 6976 3e3c 2f64 6976 10433
    .
    < │ │ │ │ +00109840: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ +00109850: 6170 2e68 746d 6c23 6166 3266 3464 6264 ap.html#af2f4dbd │ │ │ │ +00109860: 3666 3733 6631 3966 3162 6565 6161 3361 6f73f19f1beeaa3a │ │ │ │ +00109870: 3765 3964 3963 6332 6322 3e73 6f61 703a 7e9d9cc2c">soap: │ │ │ │ +00109880: 3a6d 696d 653c 2f61 3e3c 2f64 6976 3e3c :mime
    < │ │ │ │ +00109890: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +001098a0: 6922 3e73 7472 7563 7420 736f 6170 5f6d i">struct soap_m │ │ │ │ +001098b0: 696d 6520 6d69 6d65 3c2f 6469 763e 3c64 ime mime
    MIME attachment │ │ │ │ +001098e0: 7320 7265 6365 6976 6564 2e3c 2f64 6976 s received.
    Definitio │ │ │ │ +00109910: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +00109920: 683a 3431 3839 3c2f 6469 763e 3c2f 6469 h:4189
    .

    C++ │ │ │ │ +00109950: 2070 726f 6772 616d 6d65 7273 2063 616e programmers can │ │ │ │ +00109960: 2075 7365 2061 6e20 6974 6572 6174 6f72 use an iterator │ │ │ │ +00109970: 2069 6e73 7465 6164 3a3c 2f70 3e0a 3c64 instead:

    .
    │ │ │ │ +001099c0: 696e 743c 2f73 7061 6e3e 206e 203d 2030 int n = 0 │ │ │ │ +001099d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    for ( │ │ │ │ +00109a10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_multipa │ │ │ │ +00109a70: 7274 3a3a 6974 6572 6174 6f72 3c2f 613e rt::iterator │ │ │ │ +00109a80: 2069 203d 203c 6120 636c 6173 733d 2263 i = soap │ │ │ │ +00109ab0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->mime.begin< │ │ │ │ +00109b60: 2f61 3e28 293b 2069 2021 3d20 3c61 2063 /a>(); i != soap-> │ │ │ │ +00109ba0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 mime.end(); ++i) │ │ │ │ +00109c50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 00109c70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    + │ │ │ │ -00109ca0: 2b6e 3b3c 2f64 6976 3e0a 3c64 6976 2063 +n;
    .
    pr │ │ │ │ -00109cc0: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("Part %d:\ │ │ │ │ -00109cf0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ -00109d00: 6e29 3b3c 2f64 6976 3e0a 3c64 6976 2063 n);
    .
    pr │ │ │ │ -00109d20: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("ptr │ │ │ │ -00109d50: 2020 3d25 705c 6e26 7175 6f74 3b3c 2f73 =%p\n", i->ptr) │ │ │ │ -00109d70: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    ... │ │ │ │ -00109d90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // etc
    .
    }.
    soap_mi │ │ │ │ -00109e80: 6d65 3a3a 6265 6769 6e3c 2f61 3e3c 2f64 me::begin
    soap_mult │ │ │ │ -00109eb0: 6970 6172 743a 3a69 7465 7261 746f 7220 ipart::iterator │ │ │ │ -00109ec0: 6265 6769 6e28 293c 2f64 6976 3e3c 6469 begin()
    │ │ │ │ -00109ee0: 432b 2b20 6f6e 6c79 3a20 616e 2069 7465 C++ only: an ite │ │ │ │ -00109ef0: 7261 746f 7220 6f76 6572 2073 6f61 705f rator over soap_ │ │ │ │ -00109f00: 6d75 6c74 6970 6172 7420 6174 7461 6368 multipart attach │ │ │ │ -00109f10: 6d65 6e74 732e 3c2f 6469 763e 3c2f 6469 ments.
    .
    │ │ │ │ -00109fe0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    soap_multipa │ │ │ │ -0010a000: 7274 3a3a 6974 6572 6174 6f72 2065 6e64 rt::iterator end │ │ │ │ -0010a010: 2829 3c2f 6469 763e 3c64 6976 2063 6c61 ()
    C++ o │ │ │ │ -0010a030: 6e6c 793a 2061 6e20 6974 6572 6174 6f72 nly: an iterator │ │ │ │ -0010a040: 206f 7665 7220 736f 6170 5f6d 756c 7469 over soap_multi │ │ │ │ -0010a050: 7061 7274 2061 7474 6163 686d 656e 7473 part attachments │ │ │ │ -0010a060: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .< │ │ │ │ -0010a140: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0010a150: 6922 3e73 6f61 705f 6d75 6c74 6970 6172 i">soap_multipar │ │ │ │ -0010a160: 745f 6974 6572 6174 6f72 2069 7465 7261 t_iterator itera │ │ │ │ -0010a170: 746f 723c 2f64 6976 3e3c 6469 7620 636c tor
    C++ │ │ │ │ -0010a190: 6f6e 6c79 3a20 616e 2069 7465 7261 746f only: an iterato │ │ │ │ -0010a1a0: 7220 6f76 6572 2073 6f61 705f 6d75 6c74 r over soap_mult │ │ │ │ -0010a1b0: 6970 6172 7420 6174 7461 6368 6d65 6e74 ipart attachment │ │ │ │ -0010a1c0: 732e 3c2f 6469 763e 3c64 6976 2063 6c61 s.
    De │ │ │ │ -0010a1e0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ -0010a1f0: 6473 6f61 7032 2e68 3a31 3034 3431 3c2f dsoap2.h:10441
    .

    C++ progra │ │ │ │ -0010c610: 6d6d 6572 7320 6361 6e20 7573 6520 616e mmers can use an │ │ │ │ -0010c620: 2069 7465 7261 746f 7220 696e 7374 6561 iterator instea │ │ │ │ -0010c630: 643a 3c2f 703e 0a3c 6469 7620 636c 6173 d:

    .
    < │ │ │ │ -0010c660: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0010c670: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int n = 0;
    │ │ │ │ -0010c690: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    for │ │ │ │ -0010c6c0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soa │ │ │ │ -0010c720: 705f 6d75 6c74 6970 6172 743a 3a69 7465 p_multipart::ite │ │ │ │ -0010c730: 7261 746f 723c 2f61 3e20 6920 3d20 3c61 rator i = soap-&g │ │ │ │ -0010c770: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;dime< │ │ │ │ -0010c7c0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.begin(); │ │ │ │ -0010c820: 6920 213d 203c 6120 636c 6173 733d 2263 i != soap │ │ │ │ -0010c850: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->dime.end(); ++i)
    . │ │ │ │ +00109c80: 6522 3e20 202b 2b6e 3b3c 2f64 6976 3e0a e"> ++n;
    . │ │ │ │ +00109c90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("Par │ │ │ │ +00109cd0: 7420 2564 3a5c 6e26 7175 6f74 3b3c 2f73 t %d:\n", n);
    . │ │ │ │ +00109cf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("ptr │ │ │ │ +00109d30: 2020 2020 2020 2020 3d25 705c 6e26 7175 =%p\n&qu │ │ │ │ +00109d40: 6f74 3b3c 2f73 7061 6e3e 2c20 692d 2667 ot;, i-&g │ │ │ │ +00109d50: 743b 7074 7229 3b3c 2f64 6976 3e0a 3c64 t;ptr);
    . │ │ │ │ +00109d70: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e │ │ │ │ +00109d90: 7463 3c2f 7370 616e 3e3c 2f64 6976 3e0a tc
    . │ │ │ │ +00109da0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    soa │ │ │ │ +00109e90: 705f 6d75 6c74 6970 6172 743a 3a69 7465 p_multipart::ite │ │ │ │ +00109ea0: 7261 746f 7220 6265 6769 6e28 293c 2f64 rator begin()
    C++ only: │ │ │ │ +00109ed0: 616e 2069 7465 7261 746f 7220 6f76 6572 an iterator over │ │ │ │ +00109ee0: 2073 6f61 705f 6d75 6c74 6970 6172 7420 soap_multipart │ │ │ │ +00109ef0: 6174 7461 6368 6d65 6e74 732e 3c2f 6469 attachments.
    .
    so │ │ │ │ +00109fb0: 6170 5f6d 696d 653a 3a65 6e64 3c2f 613e ap_mime::end │ │ │ │ +00109fc0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    soap_m │ │ │ │ +00109fe0: 756c 7469 7061 7274 3a3a 6974 6572 6174 ultipart::iterat │ │ │ │ +00109ff0: 6f72 2065 6e64 2829 3c2f 6469 763e 3c64 or end()
    C++ only: an it │ │ │ │ +0010a020: 6572 6174 6f72 206f 7665 7220 736f 6170 erator over soap │ │ │ │ +0010a030: 5f6d 756c 7469 7061 7274 2061 7474 6163 _multipart attac │ │ │ │ +0010a040: 686d 656e 7473 2e3c 2f64 6976 3e3c 2f64 hments.
    .
    soap_multipar │ │ │ │ +0010a110: 743a 3a69 7465 7261 746f 723c 2f61 3e3c t::iterator< │ │ │ │ +0010a120: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_mu │ │ │ │ +0010a140: 6c74 6970 6172 745f 6974 6572 6174 6f72 ltipart_iterator │ │ │ │ +0010a150: 2069 7465 7261 746f 723c 2f64 6976 3e3c iterator
    < │ │ │ │ +0010a160: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +0010a170: 223e 432b 2b20 6f6e 6c79 3a20 616e 2069 ">C++ only: an i │ │ │ │ +0010a180: 7465 7261 746f 7220 6f76 6572 2073 6f61 terator over soa │ │ │ │ +0010a190: 705f 6d75 6c74 6970 6172 7420 6174 7461 p_multipart atta │ │ │ │ +0010a1a0: 6368 6d65 6e74 732e 3c2f 6469 763e 3c64 chments.
    Definition:< │ │ │ │ +0010a1d0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a31 /b> stdsoap2.h:1 │ │ │ │ +0010a1e0: 3034 3431 3c2f 6469 763e 3c2f 6469 763e 0441
    │ │ │ │ +0010a1f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Note: │ │ │ │ +0010a210: 206b 6565 7020 696e 206d 696e 6420 7468 keep in mind th │ │ │ │ +0010a220: 6174 2074 6865 2066 6972 7374 2061 7474 at the first att │ │ │ │ +0010a230: 6163 686d 656e 7420 6973 2061 7373 6f63 achment is assoc │ │ │ │ +0010a240: 6961 7465 6420 7769 7468 2074 6865 2053 iated with the S │ │ │ │ +0010a250: 4f41 5020 6d65 7373 6167 6520 616e 6420 OAP message and │ │ │ │ +0010a260: 796f 7520 6d61 7920 7761 6e74 2074 6f20 you may want to │ │ │ │ +0010a270: 6967 6e6f 7265 2069 742e 3c2f 703e 0a3c ignore it.

    .< │ │ │ │ +0010a280: 703e 4120 6361 6c6c 2074 6f20 3c63 6f64 p>A call to soap_end
    remove │ │ │ │ +0010a370: 7320 616c 6c20 6f66 2074 6865 2072 6563 s all of the rec │ │ │ │ +0010a380: 6569 7665 6420 4d49 4d45 2064 6174 612e eived MIME data. │ │ │ │ +0010a390: 2054 6f20 7072 6573 6572 7665 2061 6e20 To preserve an │ │ │ │ +0010a3a0: 6174 7461 6368 6d65 6e74 2069 6e20 6d65 attachment in me │ │ │ │ +0010a3b0: 6d6f 7279 2c20 7573 6520 3c63 6f64 653e mory, use │ │ │ │ +0010a3c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_unlink< │ │ │ │ +0010a490: 2f61 3e3c 2f63 6f64 653e 206f 6e20 7468 /a> on th │ │ │ │ +0010a4a0: 6520 3c63 6f64 653e 7074 723c 2f63 6f64 e ptr member of the │ │ │ │ +0010a4c0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_multi │ │ │ │ +0010a540: 7061 7274 3c2f 613e 3c2f 636f 6465 3e20 part │ │ │ │ +0010a550: 7374 7275 6374 2e20 5468 6520 3c63 6f64 struct. The soap_unlin │ │ │ │ +0010a630: 6b3c 2f61 3e3c 2f63 6f64 653e 2066 756e k fun │ │ │ │ +0010a640: 6374 696f 6e20 6361 6e20 6265 2075 7365 ction can be use │ │ │ │ +0010a650: 6420 746f 2070 7265 7665 6e74 2064 6561 d to prevent dea │ │ │ │ +0010a660: 6c6c 6f63 6174 696f 6e20 6f66 2064 6573 llocation of des │ │ │ │ +0010a670: 6572 6961 6c69 7a65 6420 6461 7461 2e3c erialized data.< │ │ │ │ +0010a680: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to │ │ │ │ +0010a6a0: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ +0010a6b0: 733c 2f61 3e3c 2f70 3e0a 3c68 313e 3c61 s

    .

    .D │ │ │ │ +0010a6e0: 494d 4520 6174 7461 6368 6d65 6e74 733c IME attachments< │ │ │ │ +0010a6f0: 2f68 313e 0a3c 703e 4170 706c 6963 6174 /h1>.

    Applicat │ │ │ │ +0010a700: 696f 6e73 2064 6576 656c 6f70 6564 2077 ions developed w │ │ │ │ +0010a710: 6974 6820 7468 6520 6753 4f41 5020 746f ith the gSOAP to │ │ │ │ +0010a720: 6f6c 7320 6361 6e20 7472 616e 736d 6974 ols can transmit │ │ │ │ +0010a730: 2062 696e 6172 7920 4449 4d45 2061 7474 binary DIME att │ │ │ │ +0010a740: 6163 686d 656e 7473 2073 746f 7265 6420 achments stored │ │ │ │ +0010a750: 696e 206d 656d 6f72 7920 6f72 2069 6e20 in memory or in │ │ │ │ +0010a760: 7374 7265 616d 696e 6720 6d6f 6465 2062 streaming mode b │ │ │ │ +0010a770: 7920 6665 7463 6869 6e67 2064 6174 6120 y fetching data │ │ │ │ +0010a780: 6672 6f6d 2061 2072 6573 6f75 7263 6520 from a resource │ │ │ │ +0010a790: 6f72 2073 656e 6469 6e67 2064 6174 6120 or sending data │ │ │ │ +0010a7a0: 746f 2061 2072 6573 6f75 7263 6520 7573 to a resource us │ │ │ │ +0010a7b0: 696e 6720 6361 6c6c 6261 636b 2066 756e ing callback fun │ │ │ │ +0010a7c0: 6374 696f 6e73 2e20 5468 6520 6d61 7869 ctions. The maxi │ │ │ │ +0010a7d0: 6d75 6d20 4449 4d45 2061 7474 6163 686d mum DIME attachm │ │ │ │ +0010a7e0: 656e 7420 7369 7a65 2069 7320 6c69 6d69 ent size is limi │ │ │ │ +0010a7f0: 7465 6420 746f 2038 204d 4220 6279 2064 ted to 8 MB by d │ │ │ │ +0010a800: 6566 6175 6c74 2061 7320 7365 7420 7769 efault as set wi │ │ │ │ +0010a810: 7468 203c 636f 6465 3e23 534f 4150 5f4d th #SOAP_M │ │ │ │ +0010a820: 4158 4449 4d45 5349 5a45 3c2f 636f 6465 AXDIMESIZE. This limit ca │ │ │ │ +0010a840: 6e20 6265 2063 6861 6e67 6564 2061 7320 n be changed as │ │ │ │ +0010a850: 6e65 6564 6564 2e20 5769 7468 2073 7472 needed. With str │ │ │ │ +0010a860: 6561 6d69 6e67 2044 494d 4520 7573 696e eaming DIME usin │ │ │ │ +0010a870: 6720 6361 6c6c 6261 636b 2066 756e 6374 g callback funct │ │ │ │ +0010a880: 696f 6e73 2c20 6461 7461 2068 616e 646c ions, data handl │ │ │ │ +0010a890: 6572 7320 6172 6520 7573 6564 2074 6f20 ers are used to │ │ │ │ +0010a8a0: 7061 7373 2074 6865 2064 6174 6120 746f pass the data to │ │ │ │ +0010a8b0: 2061 6e64 2066 726f 6d20 6120 7265 736f and from a reso │ │ │ │ +0010a8c0: 7572 6365 2066 726f 6d20 7768 6963 6820 urce from which │ │ │ │ +0010a8d0: 746f 2066 6574 6368 2074 6865 2064 6174 to fetch the dat │ │ │ │ +0010a8e0: 6120 746f 2073 656e 6420 6f72 2064 6174 a to send or dat │ │ │ │ +0010a8f0: 6120 746f 2073 746f 7265 2c20 7375 6368 a to store, such │ │ │ │ +0010a900: 2061 7320 6120 6669 6c65 206f 7220 6465 as a file or de │ │ │ │ +0010a910: 7669 6365 2e20 5365 6520 5365 6374 696f vice. See Sectio │ │ │ │ +0010a920: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n │ │ │ │ +0010a950: 5374 7265 616d 696e 6720 4449 4d45 3c2f Streaming DIME .

    .

    For │ │ │ │ +0010a970: 6465 7461 696c 7320 6f6e 2044 494d 4520 details on DIME │ │ │ │ +0010a980: 6174 7461 6368 6d65 6e74 732c 2073 6565 attachments, see │ │ │ │ +0010a990: 203c 6120 6872 6566 3d22 6874 7470 3a2f htt │ │ │ │ +0010a9f0: 703a 2f2f 6d73 646e 2e6d 6963 726f 736f p://msdn.microso │ │ │ │ +0010aa00: 6674 2e63 6f6d 2f6c 6962 7261 7279 2f65 ft.com/library/e │ │ │ │ +0010aa10: 6e2d 7573 2f64 6e67 6c6f 6273 7065 632f n-us/dnglobspec/ │ │ │ │ +0010aa20: 6874 6d6c 2f64 7261 6674 2d6e 6965 6c73 html/draft-niels │ │ │ │ +0010aa30: 656e 2d64 696d 652d 3032 2e74 7874 3c2f en-dime-02.txt

    .

    See al │ │ │ │ +0010aa50: 736f 2041 5049 2064 6f63 756d 656e 7461 so API documenta │ │ │ │ +0010aa60: 7469 6f6e 204d 6f64 756c 6520 3c61 2063 tion Module DIME at │ │ │ │ +0010aaa0: 7461 6368 6d65 6e74 2066 756e 6374 696f tachment functio │ │ │ │ +0010aab0: 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 ns.

    .

    . │ │ │ │ +0010aac0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ +0010aad0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ +0010aae0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .Se │ │ │ │ +0010ab20: 6e64 696e 6720 6120 636f 6c6c 6563 7469 nding a collecti │ │ │ │ +0010ab30: 6f6e 206f 6620 4449 4d45 2061 7474 6163 on of DIME attac │ │ │ │ +0010ab40: 686d 656e 7473 3c2f 6832 3e0a 3c70 3e54 hments

    .

    T │ │ │ │ +0010ab50: 6865 2066 6f6c 6c6f 7769 6e67 2066 756e he following fun │ │ │ │ +0010ab60: 6374 696f 6e73 2063 616e 2062 6520 7573 ctions can be us │ │ │ │ +0010ab70: 6564 2074 6f20 6578 706c 6963 6974 6c79 ed to explicitly │ │ │ │ +0010ab80: 2073 6574 2075 7020 6120 636f 6c6c 6563 set up a collec │ │ │ │ +0010ab90: 7469 6f6e 206f 6620 4449 4d45 2061 7474 tion of DIME att │ │ │ │ +0010aba0: 6163 686d 656e 7473 2066 6f72 2074 7261 achments for tra │ │ │ │ +0010abb0: 6e73 6d69 7373 696f 6e20 7769 7468 2061 nsmission with a │ │ │ │ +0010abc0: 206d 6573 7361 6765 2e20 5468 6573 6520 message. These │ │ │ │ +0010abd0: 6174 7461 6368 6d65 6e74 7320 6361 6e20 attachments can │ │ │ │ +0010abe0: 6265 2073 7472 6561 6d65 642c 2061 7320 be streamed, as │ │ │ │ +0010abf0: 6465 7363 7269 6265 6420 696e 2053 6563 described in Sec │ │ │ │ +0010ac00: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Streaming DIM │ │ │ │ +0010ac40: 453c 2f61 3e20 2e20 5769 7468 6f75 7420 E . Without │ │ │ │ +0010ac50: 7374 7265 616d 696e 672c 2065 6163 6820 streaming, each │ │ │ │ +0010ac60: 6174 7461 6368 6d65 6e74 206d 7573 7420 attachment must │ │ │ │ +0010ac70: 7265 6665 7220 746f 2061 2062 6c6f 636b refer to a block │ │ │ │ +0010ac80: 206f 6620 6461 7461 2069 6e20 6d65 6d6f of data in memo │ │ │ │ +0010ac90: 7279 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 ry.

    .
      .
    • void soa │ │ │ │ +0010ad20: 705f 7365 745f 6469 6d65 2873 7472 7563 p_set_dime(struc │ │ │ │ +0010ad30: 7420 736f 6170 202a 736f 6170 293c 2f61 t soap *soap) This fu │ │ │ │ +0010ad50: 6e63 7469 6f6e 2065 6e61 626c 6573 2073 nction enables s │ │ │ │ +0010ad60: 656e 6469 6e67 2044 494d 4520 6174 7461 ending DIME atta │ │ │ │ +0010ad70: 6368 6d65 6e74 732e 2054 6869 7320 6675 chments. This fu │ │ │ │ +0010ad80: 6e63 7469 6f6e 2069 7320 6765 6e65 7261 nction is genera │ │ │ │ +0010ad90: 6c6c 7920 6e6f 7420 7265 7175 6972 6564 lly not required │ │ │ │ +0010ada0: 2062 6563 6175 7365 2044 494d 4520 6174 because DIME at │ │ │ │ +0010adb0: 7461 6368 6d65 6e74 7320 6172 6520 6175 tachments are au │ │ │ │ +0010adc0: 746f 6d61 7469 6361 6c6c 7920 6465 7465 tomatically dete │ │ │ │ +0010add0: 6374 6564 2061 7320 3c63 6f64 653e 3c61 cted as xsd_ │ │ │ │ +0010ae50: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary and _xop__I │ │ │ │ +0010aee0: 6e63 6c75 6465 3c2f 613e 3c2f 636f 6465 nclude structures in │ │ │ │ +0010af00: 7468 6520 6461 7461 2074 6f20 7365 7269 the data to seri │ │ │ │ +0010af10: 616c 697a 6520 6173 2061 6e20 584d 4c20 alize as an XML │ │ │ │ +0010af20: 6d65 7373 6167 6520 7769 7468 2074 6865 message with the │ │ │ │ +0010af30: 2061 7474 6163 686d 656e 7473 2061 7574 attachments aut │ │ │ │ +0010af40: 6f6d 6174 6963 616c 6c79 2061 6464 6564 omatically added │ │ │ │ +0010af50: 206f 7220 4449 4d45 2061 7474 6163 686d or DIME attachm │ │ │ │ +0010af60: 656e 7473 2063 616e 2062 6520 6578 706c ents can be expl │ │ │ │ +0010af70: 6963 6974 6c79 2061 6464 6564 2077 6974 icitly added wit │ │ │ │ +0010af80: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h s │ │ │ │ +0010b010: 6f61 705f 7365 745f 6469 6d65 5f61 7474 oap_set_dime_att │ │ │ │ +0010b020: 6163 686d 656e 743c 2f61 3e3c 2f63 6f64 achment.
    • .
    • int soap_set_ │ │ │ │ +0010b050: 6469 6d65 5f61 7474 6163 686d 656e 7428 dime_attachment( │ │ │ │ +0010b060: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +0010b070: 702c 2063 6861 7220 2a70 7472 2c20 7369 p, char *ptr, si │ │ │ │ +0010b080: 7a65 5f74 2073 697a 652c 2063 6f6e 7374 ze_t size, const │ │ │ │ +0010b090: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con │ │ │ │ +0010b0a0: 7374 2063 6861 7220 2a69 642c 2075 6e73 st char *id, uns │ │ │ │ +0010b0b0: 6967 6e65 6420 7368 6f72 7420 6f70 7479 igned short opty │ │ │ │ +0010b0c0: 7065 2c20 636f 6e73 7420 6368 6172 202a pe, const char * │ │ │ │ +0010b0d0: 6f70 7469 6f6e 293c 2f63 6f64 653e 2054 option) T │ │ │ │ +0010b0e0: 6869 7320 6675 6e63 7469 6f6e 2061 6464 his function add │ │ │ │ +0010b0f0: 7320 6120 4449 4d45 2061 7474 6163 686d s a DIME attachm │ │ │ │ +0010b100: 656e 7420 746f 2074 6865 2058 4d4c 206d ent to the XML m │ │ │ │ +0010b110: 6573 7361 6765 2074 6f20 7365 6e64 2e20 essage to send. │ │ │ │ +0010b120: 5468 6520 7370 6563 6966 6965 6420 3c63 The specified ptr p │ │ │ │ +0010b140: 6f69 6e74 7320 746f 2074 6865 2064 6174 oints to the dat │ │ │ │ +0010b150: 6120 746f 2073 656e 6420 6f66 206c 656e a to send of len │ │ │ │ +0010b160: 6774 6820 7370 6563 6966 6965 6420 6279 gth specified by │ │ │ │ +0010b170: 203c 636f 6465 3e73 697a 653c 2f63 6f64 size. The ty │ │ │ │ +0010b190: 7065 3c2f 636f 6465 3e20 7061 7261 6d65 pe parame │ │ │ │ +0010b1a0: 7465 7220 696e 6469 6361 7465 7320 7468 ter indicates th │ │ │ │ +0010b1b0: 6520 4d49 4d45 2074 7970 6520 6f66 2074 e MIME type of t │ │ │ │ +0010b1c0: 6865 2064 6174 6120 6f72 2063 616e 2062 he data or can b │ │ │ │ +0010b1d0: 6520 4e55 4c4c 2e20 5468 6520 3c63 6f64 e NULL. The id para │ │ │ │ +0010b1f0: 6d65 7465 7220 756e 6971 7565 6c79 2069 meter uniquely i │ │ │ │ +0010b200: 6465 6e74 6966 6965 7320 7468 6520 6174 dentifies the at │ │ │ │ +0010b210: 7461 6368 6d65 6e74 2069 6e20 7468 6520 tachment in the │ │ │ │ +0010b220: 6d65 7373 6167 652c 2077 6869 6368 2063 message, which c │ │ │ │ +0010b230: 616e 2062 6520 6f6d 6974 7465 6420 6279 an be omitted by │ │ │ │ +0010b240: 2073 7065 6369 6679 696e 6720 4e55 4c4c specifying NULL │ │ │ │ +0010b250: 2e20 5468 6520 3c63 6f64 653e 6f70 7469 . The opti │ │ │ │ +0010b260: 6f6e 3c2f 636f 6465 3e20 7061 7261 6d65 on parame │ │ │ │ +0010b270: 7465 7220 6973 2061 6e20 6f70 7469 6f6e ter is an option │ │ │ │ +0010b280: 2073 7563 6820 6173 2061 2064 6573 6372 such as a descr │ │ │ │ +0010b290: 6970 7469 6f6e 206f 6620 7468 6520 6461 iption of the da │ │ │ │ +0010b2a0: 7461 2061 6e64 203c 636f 6465 3e6f 7074 ta and opt │ │ │ │ +0010b2b0: 7970 653c 2f63 6f64 653e 2069 7320 6120 ype is a │ │ │ │ +0010b2c0: 7573 6572 2d64 6566 696e 6564 206f 7074 user-defined opt │ │ │ │ +0010b2d0: 696f 6e20 7479 7065 2028 6173 2070 6572 ion type (as per │ │ │ │ +0010b2e0: 2044 494d 4520 6f70 7469 6f6e 2073 7065 DIME option spe │ │ │ │ +0010b2f0: 6369 6669 6361 7469 6f6e 2066 6f72 6d61 cification forma │ │ │ │ +0010b300: 7429 2e20 5468 6520 3c63 6f64 653e 7074 t). The pt │ │ │ │ +0010b310: 723c 2f63 6f64 653e 2070 6172 616d 6574 r paramet │ │ │ │ +0010b320: 6572 206d 7573 7420 6265 2070 6572 7369 er must be persi │ │ │ │ +0010b330: 7374 656e 742e 2054 6865 203c 636f 6465 stent. The ptr para │ │ │ │ +0010b350: 6d65 7465 7220 7061 7373 6564 2074 6f20 meter passed to │ │ │ │ +0010b360: 7468 6973 2066 756e 6374 696f 6e20 6d75 this function mu │ │ │ │ +0010b370: 7374 2062 6520 7065 7273 6973 7465 6e74 st be persistent │ │ │ │ +0010b380: 2069 6e20 6d65 6d6f 7279 2075 6e74 696c in memory until │ │ │ │ +0010b390: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment │ │ │ │ +0010b3a0: 7761 7320 7365 6e74 2e20 5265 7475 726e was sent. Return │ │ │ │ +0010b3b0: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK │ │ │ │ +0010b3c0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status< │ │ │ │ +0010b490: 2f61 3e3c 2f63 6f64 653e 2065 7272 6f72 /a> error │ │ │ │ +0010b4a0: 2063 6f64 652e 3c2f 6c69 3e0a 3c6c 693e code.
    • .
    • │ │ │ │ +0010b4b0: 3c63 6f64 653e 766f 6964 203c 6120 636c void soa │ │ │ │ +0010b530: 705f 636c 725f 6469 6d65 2873 7472 7563 p_clr_dime(struc │ │ │ │ +0010b540: 7420 736f 6170 202a 736f 6170 293c 2f61 t soap *soap) This fu │ │ │ │ +0010b560: 6e63 7469 6f6e 2064 6973 6162 6c65 7320 nction disables │ │ │ │ +0010b570: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments │ │ │ │ +0010b580: 2c20 756e 6c65 7373 2074 6865 2064 6174 , unless the dat │ │ │ │ +0010b590: 6120 746f 2073 6572 6961 6c69 7a65 2061 a to serialize a │ │ │ │ +0010b5a0: 7320 616e 2058 4d4c 206d 6573 7361 6765 s an XML message │ │ │ │ +0010b5b0: 2063 6f6e 7461 696e 7320 6174 7461 6368 contains attach │ │ │ │ +0010b5c0: 6d65 6e74 7320 6465 6669 6e65 6420 6279 ments defined by │ │ │ │ +0010b5d0: 203c 636f 6465 3e3c 6120 636c 6173 733d xsd__base64 │ │ │ │ +0010b650: 4269 6e61 7279 3c2f 613e 3c2f 636f 6465 Binary and _xop__Include< │ │ │ │ +0010b6e0: 2f61 3e3c 2f63 6f64 653e 2073 7472 7563 /a> struc │ │ │ │ +0010b6f0: 7475 7265 732e 3c2f 6c69 3e0a 3c2f 756c tures.
    • .
    .

    These funct │ │ │ │ +0010b710: 696f 6e73 2061 6c6c 6f77 2044 494d 4520 ions allow DIME │ │ │ │ +0010b720: 6174 7461 6368 6d65 6e74 7320 746f 2062 attachments to b │ │ │ │ +0010b730: 6520 6164 6465 6420 746f 2053 4f41 5020 e added to SOAP │ │ │ │ +0010b740: 6d65 7373 6167 6573 2077 6974 686f 7574 messages without │ │ │ │ +0010b750: 2072 6571 7569 7269 6e67 206d 6573 7361 requiring messa │ │ │ │ +0010b760: 6765 2062 6f64 7920 7265 6665 7265 6e63 ge body referenc │ │ │ │ +0010b770: 6573 2e20 5468 6973 2069 7320 616c 736f es. This is also │ │ │ │ +0010b780: 2072 6566 6572 7265 6420 746f 2061 7320 referred to as │ │ │ │ +0010b790: 7468 6520 6f70 656e 2044 494d 4520 6174 the open DIME at │ │ │ │ +0010b7a0: 7461 6368 6d65 6e74 2073 7479 6c65 2e20 tachment style. │ │ │ │ +0010b7b0: 5468 6520 636c 6f73 6564 2061 7474 6163 The closed attac │ │ │ │ +0010b7c0: 686d 656e 7420 7374 796c 6520 7265 7175 hment style requ │ │ │ │ +0010b7d0: 6972 6573 2061 6c6c 2044 494d 4520 6174 ires all DIME at │ │ │ │ +0010b7e0: 7461 6368 6d65 6e74 7320 746f 2062 6520 tachments to be │ │ │ │ +0010b7f0: 7265 6665 7265 6e63 6564 2066 726f 6d20 referenced from │ │ │ │ +0010b800: 7468 6520 534f 4150 206d 6573 7361 6765 the SOAP message │ │ │ │ +0010b810: 2062 6f64 7920 7769 7468 203c 656d 3e3c body with < │ │ │ │ +0010b820: 636f 6465 3e68 7265 663c 2f63 6f64 653e code>href │ │ │ │ +0010b830: 3c2f 656d 3e20 286f 7220 7369 6d69 6c61 (or simila │ │ │ │ +0010b840: 7229 2072 6566 6572 656e 6365 732e 2046 r) references. F │ │ │ │ +0010b850: 6f72 2074 6865 2063 6c6f 7365 6420 7374 or the closed st │ │ │ │ +0010b860: 796c 652c 2067 534f 4150 2073 7570 706f yle, gSOAP suppo │ │ │ │ +0010b870: 7274 7320 616e 2061 7574 6f6d 6174 6963 rts an automatic │ │ │ │ +0010b880: 2062 696e 6172 7920 6461 7461 2073 6572 binary data ser │ │ │ │ +0010b890: 6961 6c69 7a61 7469 6f6e 206d 6574 686f ialization metho │ │ │ │ +0010b8a0: 642c 2073 6565 2053 6563 7469 6f6e 203c d, see Section < │ │ │ │ +0010b8b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0010b8c0: 663d 2269 6e64 6578 2e68 746d 6c23 4449 f="index.html#DI │ │ │ │ +0010b8d0: 4d45 6269 6e61 7279 223e 5365 7269 616c MEbinary">Serial │ │ │ │ +0010b8e0: 697a 696e 6720 6269 6e61 7279 2064 6174 izing binary dat │ │ │ │ +0010b8f0: 6120 7769 7468 2044 494d 4520 6174 7461 a with DIME atta │ │ │ │ +0010b900: 6368 6d65 6e74 733c 2f61 3e20 2e3c 2f70 chments .

    .

    .... Back to ta │ │ │ │ +0010b930: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +0010b940: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    .Retrieving │ │ │ │ +0010b980: 2061 2063 6f6c 6c65 6374 696f 6e20 6f66 a collection of │ │ │ │ +0010b990: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ +0010b9a0: 733c 2f68 323e 0a3c 703e 4449 4d45 2061 s

    .

    DIME a │ │ │ │ +0010b9b0: 7474 6163 686d 656e 7473 2061 7265 2061 ttachments are a │ │ │ │ +0010b9c0: 7574 6f6d 6174 6963 616c 6c79 2070 6172 utomatically par │ │ │ │ +0010b9d0: 7365 6420 616e 6420 7374 6f72 6564 2069 sed and stored i │ │ │ │ +0010b9e0: 6e20 6d65 6d6f 7279 2028 6f72 2070 6173 n memory (or pas │ │ │ │ +0010b9f0: 7365 6420 746f 2074 6865 2073 7472 6561 sed to the strea │ │ │ │ +0010ba00: 6d69 6e67 2068 616e 646c 6572 7320 7669 ming handlers vi │ │ │ │ +0010ba10: 6120 7468 6520 4449 4d45 2063 616c 6c62 a the DIME callb │ │ │ │ +0010ba20: 6163 6b20 6675 6e63 7469 6f6e 7320 7768 ack functions wh │ │ │ │ +0010ba30: 656e 2064 6566 696e 6564 292e 2041 6674 en defined). Aft │ │ │ │ +0010ba40: 6572 2072 6563 6569 7669 6e67 2061 2073 er receiving a s │ │ │ │ +0010ba50: 6574 206f 6620 4449 4d45 2061 7474 6163 et of DIME attac │ │ │ │ +0010ba60: 686d 656e 7473 2c20 6569 7468 6572 2061 hments, either a │ │ │ │ +0010ba70: 7420 7468 6520 636c 6965 6e74 2d73 6964 t the client-sid │ │ │ │ +0010ba80: 6520 6f72 2074 6865 2073 6572 7665 722d e or the server- │ │ │ │ +0010ba90: 7369 6465 2c20 7468 6520 6c69 7374 206f side, the list o │ │ │ │ +0010baa0: 6620 4449 4d45 2061 7474 6163 686d 656e f DIME attachmen │ │ │ │ +0010bab0: 7473 2063 616e 2062 6520 7472 6176 6572 ts can be traver │ │ │ │ +0010bac0: 7365 6420 746f 2065 7874 7261 6374 206d sed to extract m │ │ │ │ +0010bad0: 6574 6120 6461 7461 2061 6e64 2074 6865 eta data and the │ │ │ │ +0010bae0: 2061 7474 6163 686d 656e 7420 636f 6e74 attachment cont │ │ │ │ +0010baf0: 656e 742e 3c2f 703e 0a3c 703e 546f 2074 ent.

    .

    To t │ │ │ │ +0010bb00: 7261 7665 7273 6520 7468 6520 6c69 7374 raverse the list │ │ │ │ +0010bb10: 206f 6620 4449 4d45 2061 7474 6163 686d of DIME attachm │ │ │ │ +0010bb20: 656e 7473 2069 6e20 432c 2079 6f75 2075 ents in C, you u │ │ │ │ +0010bb30: 7365 2061 206c 6f6f 7020 7369 6d69 6c61 se a loop simila │ │ │ │ +0010bb40: 7220 746f 3a3c 2f70 3e0a 3c64 6976 2063 r to:

    .
    │ │ │ │ +0010bb60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ +0010bb90: 2f73 7061 6e3e 206e 203d 2030 3b3c 2f64 /span> n = 0;.
    stru │ │ │ │ +0010bbd0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap │ │ │ │ +0010bc10: 5f6d 756c 7469 7061 7274 3c2f 613e 202a _multipart * │ │ │ │ +0010bc20: 6174 7461 6368 6d65 6e74 3b3c 2f64 6976 attachment;
    .
    fo │ │ │ │ +0010bc60: 723c 2f73 7061 6e3e 2028 6174 7461 6368 r (attach │ │ │ │ +0010bc70: 6d65 6e74 203d 203c 6120 636c 6173 733d ment = so │ │ │ │ +0010bca0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->dime.list │ │ │ │ +0010bd50: 3c2f 613e 3b20 6174 7461 6368 6d65 6e74 ; attachment │ │ │ │ +0010bd60: 3b20 6174 7461 6368 6d65 6e74 203d 2061 ; attachment = a │ │ │ │ +0010bd70: 7474 6163 686d 656e 742d 2667 743b 3c61 ttachment->next)
    .
    {
    .
    │ │ │ │ +0010be10: 2b2b 6e3b 3c2f 6469 763e 0a3c 6469 7620 ++n;
    .
    p │ │ │ │ +0010be30: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("Part %d: │ │ │ │ +0010be60: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \n", │ │ │ │ +0010be70: 206e 293b 3c2f 6469 763e 0a3c 6469 7620 n);
    .
    p │ │ │ │ +0010be90: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("ptr │ │ │ │ +0010bec0: 2020 203d 2570 5c6e 2671 756f 743b 3c2f =%p\n", attachmen │ │ │ │ +0010bee0: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->ptr);
    .
    pr │ │ │ │ +0010bf60: 696e 7466 283c 7370 616e 2063 6c61 7373 intf("size │ │ │ │ +0010bf90: 2020 3d25 756c 5c6e 2671 756f 743b 3c2f =%ul\n", attachmen │ │ │ │ +0010bfb0: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->size);
    .
    p │ │ │ │ +0010c030: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("id │ │ │ │ +0010c060: 2020 203d 2573 5c6e 2671 756f 743b 3c2f =%s\n", attachmen │ │ │ │ +0010c080: 742d 2667 743b 3c61 2063 6c61 7373 3d22 t->id │ │ │ │ +0010c0e0: 203f 2061 7474 6163 686d 656e 742d 2667 ? attachment-&g │ │ │ │ +0010c0f0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;id : < │ │ │ │ +0010c150: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +0010c160: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +0010c170: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 293b ;"); │ │ │ │ +0010c180: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    print │ │ │ │ +0010c1a0: 6628 3c73 7061 6e20 636c 6173 733d 2273 f(&q │ │ │ │ +0010c1c0: 756f 743b 7479 7065 2020 2020 2020 203d uot;type = │ │ │ │ +0010c1d0: 2573 5c6e 2671 756f 743b 3c2f 7370 616e %s\n", attachment-&g │ │ │ │ +0010c1f0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;type ? │ │ │ │ +0010c250: 2061 7474 6163 686d 656e 742d 2667 743b attachment-> │ │ │ │ +0010c260: 3c61 2063 6c61 7373 3d22 636f 6465 2220 type : < │ │ │ │ +0010c2c0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +0010c2d0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +0010c2e0: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 293b ;"); │ │ │ │ +0010c2f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ +0010c310: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ +0010c360: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 < │ │ │ │ +0010c3d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0010c3e0: 6922 3e73 7472 7563 7420 736f 6170 5f6d i">struct soap_m │ │ │ │ +0010c3f0: 756c 7469 7061 7274 202a 206c 6973 743c ultipart * list< │ │ │ │ +0010c400: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    list of │ │ │ │ +0010c420: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments │ │ │ │ +0010c430: 2072 6563 6569 7665 643c 2f64 6976 3e3c received
    < │ │ │ │ +0010c440: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +0010c450: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +0010c460: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +0010c470: 3939 3731 3c2f 6469 763e 3c2f 6469 763e 9971
    │ │ │ │ +0010c480: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    struct soap_di │ │ │ │ +0010c550: 6d65 2064 696d 653c 2f64 6976 3e3c 6469 me dime
    │ │ │ │ +0010c570: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments │ │ │ │ +0010c580: 2072 6563 6569 7665 642e 3c2f 6469 763e received.
    │ │ │ │ +0010c590: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +0010c5b0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +0010c5c0: 3a34 3138 343c 2f64 6976 3e3c 2f64 6976 :4184
    .

    C++ │ │ │ │ +0010c5f0: 7072 6f67 7261 6d6d 6572 7320 6361 6e20 programmers can │ │ │ │ +0010c600: 7573 6520 616e 2069 7465 7261 746f 7220 use an iterator │ │ │ │ +0010c610: 696e 7374 6561 643a 3c2f 703e 0a3c 6469 instead:

    .
    i │ │ │ │ +0010c660: 6e74 3c2f 7370 616e 3e20 6e20 3d20 303b nt n = 0; │ │ │ │ +0010c670: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    for (< │ │ │ │ +0010c6b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0010c6c0: 7265 663d 2273 7472 7563 7473 6f61 705f ref="structsoap_ │ │ │ │ +0010c6d0: 5f6d 756c 7469 7061 7274 2e68 746d 6c23 _multipart.html# │ │ │ │ +0010c6e0: 6164 3930 3030 6666 6538 6637 3266 6566 ad9000ffe8f72fef │ │ │ │ +0010c6f0: 3839 3033 3863 3437 3733 6566 6466 3537 89038c4773efdf57 │ │ │ │ +0010c700: 3522 3e73 6f61 705f 6d75 6c74 6970 6172 5">soap_multipar │ │ │ │ +0010c710: 743a 3a69 7465 7261 746f 723c 2f61 3e20 t::iterator │ │ │ │ +0010c720: 6920 3d20 3c61 2063 6c61 7373 3d22 636f i = soap< │ │ │ │ +0010c750: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->dime.begin(); i != soap->< │ │ │ │ +0010c840: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0010c850: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0010c860: 6874 6d6c 2361 3338 3834 3561 3465 3063 html#a38845a4e0c │ │ │ │ +0010c870: 6330 3639 3637 3832 3736 3961 6339 3937 c0696782769ac997 │ │ │ │ +0010c880: 3663 3464 6661 223e 6469 6d65 3c2f 613e 6c4dfa">dime │ │ │ │ +0010c890: 2e3c 6120 636c 6173 733d 2263 6f64 6522 . │ │ │ │ +0010c8e0: 656e 643c 2f61 3e28 293b 202b 2b69 293c end(); ++i)< │ │ │ │ +0010c8f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 0010c910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    ++ │ │ │ │ -0010c940: 6e3b 3c2f 6469 763e 0a3c 6469 7620 636c n;
    .
    pri │ │ │ │ -0010c960: 6e74 6628 3c73 7061 6e20 636c 6173 733d ntf( │ │ │ │ -0010c980: 2671 756f 743b 5061 7274 2025 643a 5c6e "Part %d:\n │ │ │ │ -0010c990: 2671 756f 743b 3c2f 7370 616e 3e2c 206e ", n │ │ │ │ -0010c9a0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    pri │ │ │ │ -0010c9c0: 6e74 6628 3c73 7061 6e20 636c 6173 733d ntf( │ │ │ │ -0010c9e0: 2671 756f 743b 7074 7220 2020 2020 2020 "ptr │ │ │ │ -0010c9f0: 203d 2570 5c6e 2671 756f 743b 3c2f 7370 =%p\n", i->ptr); │ │ │ │ -0010ca10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ -0010ca30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0010ca40: 656e 7422 3e2f 2f20 6574 633c 2f73 7061 ent">// etc
    .
    }.
    soap_dim │ │ │ │ -0010cb20: 653a 3a62 6567 696e 3c2f 613e 3c2f 6469 e::begin
    soap_multi │ │ │ │ -0010cb50: 7061 7274 3a3a 6974 6572 6174 6f72 2062 part::iterator b │ │ │ │ -0010cb60: 6567 696e 2829 3c2f 6469 763e 3c64 6976 egin()
    C │ │ │ │ -0010cb80: 2b2b 206f 6e6c 793a 2061 6e20 6974 6572 ++ only: an iter │ │ │ │ -0010cb90: 6174 6f72 206f 7665 7220 736f 6170 5f6d ator over soap_m │ │ │ │ -0010cba0: 756c 7469 7061 7274 2061 7474 6163 686d ultipart attachm │ │ │ │ -0010cbb0: 656e 7473 2e3c 2f64 6976 3e3c 2f64 6976 ents.
    .
    < │ │ │ │ -0010cc80: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0010cc90: 6922 3e73 6f61 705f 6d75 6c74 6970 6172 i">soap_multipar │ │ │ │ -0010cca0: 743a 3a69 7465 7261 746f 7220 656e 6428 t::iterator end( │ │ │ │ -0010ccb0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    C++ on │ │ │ │ -0010ccd0: 6c79 3a20 616e 2069 7465 7261 746f 7220 ly: an iterator │ │ │ │ -0010cce0: 6f76 6572 2073 6f61 705f 6d75 6c74 6970 over soap_multip │ │ │ │ -0010ccf0: 6172 7420 6174 7461 6368 6d65 6e74 732e art attachments. │ │ │ │ -0010cd00: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The options │ │ │ │ -0010cd40: 6d65 6d62 6572 2069 7320 6176 6169 6c61 member is availa │ │ │ │ -0010cd50: 626c 6520 6173 2077 656c 6c2c 2062 7574 ble as well, but │ │ │ │ -0010cd60: 206e 6f74 2073 686f 776e 2069 6e20 7468 not shown in th │ │ │ │ -0010cd70: 6520 636f 6465 2061 626f 7665 2e20 5468 e code above. Th │ │ │ │ -0010cd80: 6520 3c63 6f64 653e 6f70 7469 6f6e 733c e options< │ │ │ │ -0010cd90: 2f63 6f64 653e 2063 6f6e 7465 6e74 2069 /code> content i │ │ │ │ -0010cda0: 7320 666f 726d 6174 7465 6420 6163 636f s formatted acco │ │ │ │ -0010cdb0: 7264 696e 6720 746f 2074 6865 2044 494d rding to the DIM │ │ │ │ -0010cdc0: 4520 7370 6563 6966 6963 6174 696f 6e3a E specification: │ │ │ │ -0010cdd0: 2074 6865 2066 6972 7374 2074 776f 2062 the first two b │ │ │ │ -0010cde0: 7974 6573 2061 7265 2072 6573 6572 7665 ytes are reserve │ │ │ │ -0010cdf0: 6420 666f 7220 7468 6520 6f70 7469 6f6e d for the option │ │ │ │ -0010ce00: 2074 7970 652c 2074 6865 206e 6578 7420 type, the next │ │ │ │ -0010ce10: 7477 6f20 6279 7465 7320 7374 6f72 6520 two bytes store │ │ │ │ -0010ce20: 7468 6520 7369 7a65 206f 6620 7468 6520 the size of the │ │ │ │ -0010ce30: 6f70 7469 6f6e 2064 6174 612c 2066 6f6c option data, fol │ │ │ │ -0010ce40: 6c6f 7765 6420 6279 2074 6865 2028 6269 lowed by the (bi │ │ │ │ -0010ce50: 6e61 7279 2920 6f70 7469 6f6e 2064 6174 nary) option dat │ │ │ │ -0010ce60: 612e 3c2f 703e 0a3c 703e 4120 6361 6c6c a.

    .

    A call │ │ │ │ -0010ce70: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to so │ │ │ │ -0010cf40: 6170 5f65 6e64 3c2f 613e 3c2f 636f 6465 ap_end removes all of │ │ │ │ -0010cf60: 2074 6865 2072 6563 6569 7665 6420 4449 the received DI │ │ │ │ -0010cf70: 4d45 2064 6174 612e 2054 6f20 7072 6573 ME data. To pres │ │ │ │ -0010cf80: 6572 7665 2061 6e20 6174 7461 6368 6d65 erve an attachme │ │ │ │ -0010cf90: 6e74 2069 6e20 6d65 6d6f 7279 2c20 7573 nt in memory, us │ │ │ │ -0010cfa0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap │ │ │ │ -0010d070: 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 6f64 _unlink on the │ │ │ │ -0010d090: 7074 723c 2f63 6f64 653e 206d 656d 6265 ptr membe │ │ │ │ -0010d0a0: 7220 6f66 2074 6865 203c 636f 6465 3e3c r of the < │ │ │ │ -0010d0b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0010d0c0: 663d 2273 7472 7563 7473 6f61 705f 5f6d f="structsoap__m │ │ │ │ -0010d0d0: 756c 7469 7061 7274 2e68 746d 6c22 2074 ultipart.html" t │ │ │ │ -0010d0e0: 6974 6c65 3d22 4449 4d45 2f4d 494d 452f itle="DIME/MIME/ │ │ │ │ -0010d0f0: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment │ │ │ │ -0010d100: 6461 7461 2072 6563 6569 7665 6420 6279 data received by │ │ │ │ -0010d110: 2074 6865 2065 6e67 696e 652e 223e 736f the engine.">so │ │ │ │ -0010d120: 6170 5f6d 756c 7469 7061 7274 3c2f 613e ap_multipart │ │ │ │ -0010d130: 3c2f 636f 6465 3e20 7374 7275 6374 2e20 struct. │ │ │ │ -0010d140: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The so │ │ │ │ -0010d210: 6170 5f75 6e6c 696e 6b3c 2f61 3e3c 2f63 ap_unlink function ca │ │ │ │ -0010d230: 6e20 6265 2075 7365 6420 746f 2070 7265 n be used to pre │ │ │ │ -0010d240: 7665 6e74 2064 6561 6c6c 6f63 6174 696f vent deallocatio │ │ │ │ -0010d250: 6e20 6f66 2064 6573 6572 6961 6c69 7a65 n of deserialize │ │ │ │ -0010d260: 6420 6461 7461 2e3c 2f70 3e0a 3c70 3ef0 d data.

    .

    . │ │ │ │ -0010d270: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -0010d280: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -0010d290: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .Ser │ │ │ │ -0010d2d0: 6961 6c69 7a69 6e67 2062 696e 6172 7920 ializing binary │ │ │ │ -0010d2e0: 6461 7461 2077 6974 6820 4449 4d45 2061 data with DIME a │ │ │ │ -0010d2f0: 7474 6163 686d 656e 7473 3c2f 6832 3e0a ttachments

    . │ │ │ │ -0010d300: 3c70 3e42 696e 6172 7920 6461 7461 2073

    Binary data s │ │ │ │ -0010d310: 746f 7265 6420 696e 2065 7874 656e 6465 tored in extende │ │ │ │ -0010d320: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d xsd__base6 │ │ │ │ -0010d3a0: 3442 696e 6172 793c 2f61 3e3c 2f63 6f64 4Binary and xsd__hexBin │ │ │ │ -0010d430: 6172 793c 2f61 3e3c 2f63 6f64 653e 2074 ary t │ │ │ │ -0010d440: 7970 6573 2063 616e 2062 6520 7365 7269 ypes can be seri │ │ │ │ -0010d450: 616c 697a 6564 2061 6e64 2064 6573 6572 alized and deser │ │ │ │ -0010d460: 6961 6c69 7a65 6420 6173 2044 494d 4520 ialized as DIME │ │ │ │ -0010d470: 6174 7461 6368 6d65 6e74 7320 7768 656e attachments when │ │ │ │ -0010d480: 206f 6e65 206f 7220 6d6f 7265 206f 6620 one or more of │ │ │ │ -0010d490: 7468 6520 6578 7472 6120 6d65 6d62 6572 the extra member │ │ │ │ -0010d4a0: 7320 3c63 6f64 653e 6964 3c2f 636f 6465 s id, type, and │ │ │ │ -0010d4d0: 6f70 7469 6f6e 733c 2f63 6f64 653e 2061 options a │ │ │ │ -0010d4e0: 7265 206e 6f6e 2d4e 554c 4c2e 2054 6865 re non-NULL. The │ │ │ │ -0010d4f0: 7365 2061 7474 6163 686d 656e 7473 2077 se attachments w │ │ │ │ -0010d500: 696c 6c20 6265 2061 7574 6f6d 6174 6963 ill be automatic │ │ │ │ -0010d510: 616c 6c79 2074 7261 6e73 6d69 7474 6564 ally transmitted │ │ │ │ -0010d520: 2070 7269 6f72 2074 6f20 7468 6520 7365 prior to the se │ │ │ │ -0010d530: 7175 656e 6365 206f 6620 7365 636f 6e64 quence of second │ │ │ │ -0010d540: 6172 7920 4449 4d45 2061 7474 6163 686d ary DIME attachm │ │ │ │ -0010d550: 656e 7473 2064 6566 696e 6564 2062 7920 ents defined by │ │ │ │ -0010d560: 7468 6520 7573 6572 2077 6974 6820 3c63 the user with soap_ │ │ │ │ -0010d600: 7365 745f 6469 6d65 5f61 7474 6163 686d set_dime_attachm │ │ │ │ -0010d610: 656e 743c 2f61 3e3c 2f63 6f64 653e 2061 ent a │ │ │ │ -0010d620: 7320 6578 706c 6169 6e65 6420 696e 2074 s explained in t │ │ │ │ -0010d630: 6865 2070 7265 7669 6f75 7320 7365 6374 he previous sect │ │ │ │ -0010d640: 696f 6e2e 2054 6865 2073 6572 6961 6c69 ion. The seriali │ │ │ │ -0010d650: 7a61 7469 6f6e 2070 726f 6365 7373 2069 zation process i │ │ │ │ -0010d660: 7320 6175 746f 6d61 7465 6420 666f 7220 s automated for │ │ │ │ -0010d670: 534f 4150 2065 6e63 6f64 6564 206d 6573 SOAP encoded mes │ │ │ │ -0010d680: 7361 6765 7320 616e 6420 4449 4d45 2061 sages and DIME a │ │ │ │ -0010d690: 7474 6163 686d 656e 7473 2077 696c 6c20 ttachments will │ │ │ │ -0010d6a0: 6265 2073 656e 6420 6576 656e 2077 6865 be send even whe │ │ │ │ -0010d6b0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soap_se │ │ │ │ -0010d730: 745f 6469 6d65 3c2f 613e 3c2f 636f 6465 t_dime or soap_set_dime_ │ │ │ │ -0010d7e0: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment are not us │ │ │ │ -0010d800: 6564 2e20 466f 7220 6e6f 6e2d 534f 4150 ed. For non-SOAP │ │ │ │ -0010d810: 2d65 6e63 6f64 6564 206d 6573 7361 6765 -encoded message │ │ │ │ -0010d820: 7320 7375 6368 2061 7320 646f 6375 6d65 s such as docume │ │ │ │ -0010d830: 6e74 2f6c 6974 6572 616c 206d 6573 7361 nt/literal messa │ │ │ │ -0010d840: 6765 7320 796f 7520 6d75 7374 2073 7469 ges you must sti │ │ │ │ -0010d850: 6c6c 2063 616c 6c20 3c63 6f64 653e 3c61 ll call s │ │ │ │ -0010d8d0: 6f61 705f 7365 745f 6469 6d65 3c2f 613e oap_set_dime │ │ │ │ -0010d8e0: 3c2f 636f 6465 3e20 746f 2065 6e61 626c to enabl │ │ │ │ -0010d8f0: 6520 7365 6e64 696e 6720 6d65 7373 6167 e sending messag │ │ │ │ -0010d900: 6573 2077 6974 6820 6174 7461 6368 6d65 es with attachme │ │ │ │ -0010d910: 6e74 732e 3c2f 703e 0a3c 703e 546f 2065 nts.

    .

    To e │ │ │ │ -0010d920: 6e61 626c 6520 7365 7269 616c 697a 6174 nable serializat │ │ │ │ -0010d930: 696f 6e20 6f66 2074 6865 2064 6174 6120 ion of the data │ │ │ │ -0010d940: 6173 2044 494d 4520 6174 7461 6368 6d65 as DIME attachme │ │ │ │ -0010d950: 6e74 7320 696e 7374 6561 6420 6f66 2069 nts instead of i │ │ │ │ -0010d960: 6e6c 696e 6520 6261 7365 3634 2c20 7765 nline base64, we │ │ │ │ -0010d970: 2065 7874 656e 6420 7468 6520 3c63 6f64 extend the │ │ │ │ -0010d9f0: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar │ │ │ │ -0010da00: 793c 2f61 3e3c 2f63 6f64 653e 2074 7970 y typ │ │ │ │ -0010da10: 6520 7769 7468 2074 6872 6565 2061 6464 e with three add │ │ │ │ -0010da20: 6974 696f 6e61 6c20 6d65 6d62 6572 733a itional members: │ │ │ │ -0010da30: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    .< │ │ │ │ +0010c930: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0010c940: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("Part │ │ │ │ +0010c970: 2025 643a 5c6e 2671 756f 743b 3c2f 7370 %d:\n", n);
    .< │ │ │ │ +0010c990: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0010c9a0: 3e20 2070 7269 6e74 6628 3c73 7061 6e20 > printf("ptr │ │ │ │ +0010c9d0: 2020 2020 2020 203d 2570 5c6e 2671 756f =%p\n&quo │ │ │ │ +0010c9e0: 743b 3c2f 7370 616e 3e2c 2069 2d26 6774 t;, i-> │ │ │ │ +0010c9f0: 3b70 7472 293b 3c2f 6469 763e 0a3c 6469 ;ptr);
    . │ │ │ │ +0010ca10: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // et │ │ │ │ +0010ca30: 633c 2f73 7061 6e3e 3c2f 6469 763e 0a3c c
    .< │ │ │ │ +0010ca40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0010ca50: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    .
    soa │ │ │ │ +0010cc50: 705f 6469 6d65 3a3a 656e 643c 2f61 3e3c p_dime::end< │ │ │ │ +0010cc60: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_mu │ │ │ │ +0010cc80: 6c74 6970 6172 743a 3a69 7465 7261 746f ltipart::iterato │ │ │ │ +0010cc90: 7220 656e 6428 293c 2f64 6976 3e3c 6469 r end()
    │ │ │ │ +0010ccb0: 432b 2b20 6f6e 6c79 3a20 616e 2069 7465 C++ only: an ite │ │ │ │ +0010ccc0: 7261 746f 7220 6f76 6572 2073 6f61 705f rator over soap_ │ │ │ │ +0010ccd0: 6d75 6c74 6970 6172 7420 6174 7461 6368 multipart attach │ │ │ │ +0010cce0: 6d65 6e74 732e 3c2f 6469 763e 3c2f 6469 ments.
    .

    The │ │ │ │ +0010cd10: 203c 636f 6465 3e6f 7074 696f 6e73 3c2f options member is │ │ │ │ +0010cd30: 6176 6169 6c61 626c 6520 6173 2077 656c available as wel │ │ │ │ +0010cd40: 6c2c 2062 7574 206e 6f74 2073 686f 776e l, but not shown │ │ │ │ +0010cd50: 2069 6e20 7468 6520 636f 6465 2061 626f in the code abo │ │ │ │ +0010cd60: 7665 2e20 5468 6520 3c63 6f64 653e 6f70 ve. The op │ │ │ │ +0010cd70: 7469 6f6e 733c 2f63 6f64 653e 2063 6f6e tions con │ │ │ │ +0010cd80: 7465 6e74 2069 7320 666f 726d 6174 7465 tent is formatte │ │ │ │ +0010cd90: 6420 6163 636f 7264 696e 6720 746f 2074 d according to t │ │ │ │ +0010cda0: 6865 2044 494d 4520 7370 6563 6966 6963 he DIME specific │ │ │ │ +0010cdb0: 6174 696f 6e3a 2074 6865 2066 6972 7374 ation: the first │ │ │ │ +0010cdc0: 2074 776f 2062 7974 6573 2061 7265 2072 two bytes are r │ │ │ │ +0010cdd0: 6573 6572 7665 6420 666f 7220 7468 6520 eserved for the │ │ │ │ +0010cde0: 6f70 7469 6f6e 2074 7970 652c 2074 6865 option type, the │ │ │ │ +0010cdf0: 206e 6578 7420 7477 6f20 6279 7465 7320 next two bytes │ │ │ │ +0010ce00: 7374 6f72 6520 7468 6520 7369 7a65 206f store the size o │ │ │ │ +0010ce10: 6620 7468 6520 6f70 7469 6f6e 2064 6174 f the option dat │ │ │ │ +0010ce20: 612c 2066 6f6c 6c6f 7765 6420 6279 2074 a, followed by t │ │ │ │ +0010ce30: 6865 2028 6269 6e61 7279 2920 6f70 7469 he (binary) opti │ │ │ │ +0010ce40: 6f6e 2064 6174 612e 3c2f 703e 0a3c 703e on data.

    .

    │ │ │ │ +0010ce50: 4120 6361 6c6c 2074 6f20 3c63 6f64 653e A call to │ │ │ │ +0010ce60: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end │ │ │ │ +0010cf30: 3c2f 636f 6465 3e20 7265 6d6f 7665 7320 removes │ │ │ │ +0010cf40: 616c 6c20 6f66 2074 6865 2072 6563 6569 all of the recei │ │ │ │ +0010cf50: 7665 6420 4449 4d45 2064 6174 612e 2054 ved DIME data. T │ │ │ │ +0010cf60: 6f20 7072 6573 6572 7665 2061 6e20 6174 o preserve an at │ │ │ │ +0010cf70: 7461 6368 6d65 6e74 2069 6e20 6d65 6d6f tachment in memo │ │ │ │ +0010cf80: 7279 2c20 7573 6520 3c63 6f64 653e 3c61 ry, use soap_unlink on the │ │ │ │ +0010d070: 3c63 6f64 653e 7074 723c 2f63 6f64 653e ptr │ │ │ │ +0010d080: 206d 656d 6265 7220 6f66 2074 6865 203c member of the < │ │ │ │ +0010d090: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_multipa │ │ │ │ +0010d110: 7274 3c2f 613e 3c2f 636f 6465 3e20 7374 rt st │ │ │ │ +0010d120: 7275 6374 2e20 5468 6520 3c63 6f64 653e ruct. The │ │ │ │ +0010d130: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_unlink< │ │ │ │ +0010d200: 2f61 3e3c 2f63 6f64 653e 2066 756e 6374 /a> funct │ │ │ │ +0010d210: 696f 6e20 6361 6e20 6265 2075 7365 6420 ion can be used │ │ │ │ +0010d220: 746f 2070 7265 7665 6e74 2064 6561 6c6c to prevent deall │ │ │ │ +0010d230: 6f63 6174 696f 6e20 6f66 2064 6573 6572 ocation of deser │ │ │ │ +0010d240: 6961 6c69 7a65 6420 6461 7461 2e3c 2f70 ialized data.

    .

    .... Back to ta │ │ │ │ +0010d270: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +0010d280: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    .Serializing b │ │ │ │ +0010d2c0: 696e 6172 7920 6461 7461 2077 6974 6820 inary data with │ │ │ │ +0010d2d0: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments │ │ │ │ +0010d2e0: 3c2f 6832 3e0a 3c70 3e42 696e 6172 7920

    .

    Binary │ │ │ │ +0010d2f0: 6461 7461 2073 746f 7265 6420 696e 2065 data stored in e │ │ │ │ +0010d300: 7874 656e 6465 6420 3c63 6f64 653e 3c61 xtended xsd_ │ │ │ │ +0010d380: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary and xsd__ │ │ │ │ +0010d410: 6865 7842 696e 6172 793c 2f61 3e3c 2f63 hexBinary types can b │ │ │ │ +0010d430: 6520 7365 7269 616c 697a 6564 2061 6e64 e serialized and │ │ │ │ +0010d440: 2064 6573 6572 6961 6c69 7a65 6420 6173 deserialized as │ │ │ │ +0010d450: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ +0010d460: 7320 7768 656e 206f 6e65 206f 7220 6d6f s when one or mo │ │ │ │ +0010d470: 7265 206f 6620 7468 6520 6578 7472 6120 re of the extra │ │ │ │ +0010d480: 6d65 6d62 6572 7320 3c63 6f64 653e 6964 members id │ │ │ │ +0010d490: 3c2f 636f 6465 3e2c 203c 636f 6465 3e74 , t │ │ │ │ +0010d4a0: 7970 653c 2f63 6f64 653e 2c20 616e 6420 ype, and │ │ │ │ +0010d4b0: 3c63 6f64 653e 6f70 7469 6f6e 733c 2f63 options are non-NUL │ │ │ │ +0010d4d0: 4c2e 2054 6865 7365 2061 7474 6163 686d L. These attachm │ │ │ │ +0010d4e0: 656e 7473 2077 696c 6c20 6265 2061 7574 ents will be aut │ │ │ │ +0010d4f0: 6f6d 6174 6963 616c 6c79 2074 7261 6e73 omatically trans │ │ │ │ +0010d500: 6d69 7474 6564 2070 7269 6f72 2074 6f20 mitted prior to │ │ │ │ +0010d510: 7468 6520 7365 7175 656e 6365 206f 6620 the sequence of │ │ │ │ +0010d520: 7365 636f 6e64 6172 7920 4449 4d45 2061 secondary DIME a │ │ │ │ +0010d530: 7474 6163 686d 656e 7473 2064 6566 696e ttachments defin │ │ │ │ +0010d540: 6564 2062 7920 7468 6520 7573 6572 2077 ed by the user w │ │ │ │ +0010d550: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_set_dime_a │ │ │ │ +0010d5f0: 7474 6163 686d 656e 743c 2f61 3e3c 2f63 ttachment as explaine │ │ │ │ +0010d610: 6420 696e 2074 6865 2070 7265 7669 6f75 d in the previou │ │ │ │ +0010d620: 7320 7365 6374 696f 6e2e 2054 6865 2073 s section. The s │ │ │ │ +0010d630: 6572 6961 6c69 7a61 7469 6f6e 2070 726f erialization pro │ │ │ │ +0010d640: 6365 7373 2069 7320 6175 746f 6d61 7465 cess is automate │ │ │ │ +0010d650: 6420 666f 7220 534f 4150 2065 6e63 6f64 d for SOAP encod │ │ │ │ +0010d660: 6564 206d 6573 7361 6765 7320 616e 6420 ed messages and │ │ │ │ +0010d670: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments │ │ │ │ +0010d680: 2077 696c 6c20 6265 2073 656e 6420 6576 will be send ev │ │ │ │ +0010d690: 656e 2077 6865 6e20 3c63 6f64 653e 3c61 en when s │ │ │ │ +0010d710: 6f61 705f 7365 745f 6469 6d65 3c2f 613e oap_set_dime │ │ │ │ +0010d720: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or soap_set │ │ │ │ +0010d7c0: 5f64 696d 655f 6174 7461 6368 6d65 6e74 _dime_attachment │ │ │ │ +0010d7d0: 3c2f 613e 3c2f 636f 6465 3e20 6172 6520 are │ │ │ │ +0010d7e0: 6e6f 7420 7573 6564 2e20 466f 7220 6e6f not used. For no │ │ │ │ +0010d7f0: 6e2d 534f 4150 2d65 6e63 6f64 6564 206d n-SOAP-encoded m │ │ │ │ +0010d800: 6573 7361 6765 7320 7375 6368 2061 7320 essages such as │ │ │ │ +0010d810: 646f 6375 6d65 6e74 2f6c 6974 6572 616c document/literal │ │ │ │ +0010d820: 206d 6573 7361 6765 7320 796f 7520 6d75 messages you mu │ │ │ │ +0010d830: 7374 2073 7469 6c6c 2063 616c 6c20 3c63 st still call soap_set_di │ │ │ │ +0010d8c0: 6d65 3c2f 613e 3c2f 636f 6465 3e20 746f me to │ │ │ │ +0010d8d0: 2065 6e61 626c 6520 7365 6e64 696e 6720 enable sending │ │ │ │ +0010d8e0: 6d65 7373 6167 6573 2077 6974 6820 6174 messages with at │ │ │ │ +0010d8f0: 7461 6368 6d65 6e74 732e 3c2f 703e 0a3c tachments.

    .< │ │ │ │ +0010d900: 703e 546f 2065 6e61 626c 6520 7365 7269 p>To enable seri │ │ │ │ +0010d910: 616c 697a 6174 696f 6e20 6f66 2074 6865 alization of the │ │ │ │ +0010d920: 2064 6174 6120 6173 2044 494d 4520 6174 data as DIME at │ │ │ │ +0010d930: 7461 6368 6d65 6e74 7320 696e 7374 6561 tachments instea │ │ │ │ +0010d940: 6420 6f66 2069 6e6c 696e 6520 6261 7365 d of inline base │ │ │ │ +0010d950: 3634 2c20 7765 2065 7874 656e 6420 7468 64, we extend th │ │ │ │ +0010d960: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e xsd__base6 │ │ │ │ +0010d9e0: 3442 696e 6172 793c 2f61 3e3c 2f63 6f64 4Binary type with thr │ │ │ │ +0010da00: 6565 2061 6464 6974 696f 6e61 6c20 6d65 ee additional me │ │ │ │ +0010da10: 6d62 6572 733a 3c2f 703e 0a3c 6469 7620 mbers:

    .
    .
    xsd__base64Bin │ │ │ │ -0010df40: 6172 793a 3a6f 7074 696f 6e73 3c2f 613e ary::options │ │ │ │ -0010df50: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    char * │ │ │ │ -0010df70: 206f 7074 696f 6e73 3c2f 6469 763e 3c64 options
    extra member: D │ │ │ │ -0010dfa0: 494d 4520 6f70 7469 6f6e 7320 6f72 2061 IME options or a │ │ │ │ -0010dfb0: 2064 6573 6372 6970 7469 6f6e 206f 6620 description of │ │ │ │ -0010dfc0: 7468 6520 4d49 4d45 2061 7474 6163 686d the MIME attachm │ │ │ │ -0010dfd0: 656e 7420 6f72 204e 554c 4c3c 2f64 6976 ent or NULL
    Definitio │ │ │ │ -0010e000: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ -0010e010: 683a 3938 3432 3c2f 6469 763e 3c2f 6469 h:9842
    .
    c │ │ │ │ -0010e110: 6861 7220 2a20 6964 3c2f 6469 763e 3c64 har * id
    extra member: N │ │ │ │ -0010e140: 554c 4c20 746f 2067 656e 6572 6174 6520 ULL to generate │ │ │ │ -0010e150: 616e 2069 6420 6f72 2061 7373 6967 6e20 an id or assign │ │ │ │ -0010e160: 7468 6973 206d 656d 6265 7220 7661 7269 this member vari │ │ │ │ -0010e170: 6162 6c65 2061 2075 6e69 7175 6520 5555 able a unique UU │ │ │ │ -0010e180: 4944 3c2f 6469 763e 3c64 6976 2063 6c61 ID
    De │ │ │ │ -0010e1a0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ -0010e1b0: 6473 6f61 7032 2e68 3a39 3834 303c 2f64 dsoap2.h:9840
    .
    xsd__base64Bi │ │ │ │ -0010e290: 6e61 7279 3a3a 7479 7065 3c2f 613e 3c2f nary::type
    char * t │ │ │ │ -0010e2c0: 7970 653c 2f64 6976 3e3c 6469 7620 636c ype
    extr │ │ │ │ -0010e2e0: 6120 6d65 6d62 6572 3a20 4d49 4d45 2074 a member: MIME t │ │ │ │ -0010e2f0: 7970 6520 6f66 2074 6865 2064 6174 613c ype of the data< │ │ │ │ -0010e300: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -0010e320: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -0010e330: 6170 322e 683a 3938 3431 3c2f 6469 763e ap2.h:9841
    │ │ │ │ -0010e340: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The id member is f │ │ │ │ -0010e380: 6f72 2061 7474 6163 686d 656e 7420 7265 or attachment re │ │ │ │ -0010e390: 6665 7265 6e63 696e 672c 2074 7970 6963 ferencing, typic │ │ │ │ -0010e3a0: 616c 6c79 2061 2063 6f6e 7465 6e74 2069 ally a content i │ │ │ │ -0010e3b0: 6420 2843 4944 2920 6f72 2061 2055 5549 d (CID) or a UUI │ │ │ │ -0010e3c0: 4420 7768 6963 6820 6361 6e20 6265 206f D which can be o │ │ │ │ -0010e3d0: 6274 6169 6e65 6420 7769 7468 203c 636f btained with soap_rand_uu │ │ │ │ -0010e470: 6964 3c2f 613e 3c2f 636f 6465 3e2c 2061 id, a │ │ │ │ -0010e480: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type member is use │ │ │ │ -0010e4a0: 6420 746f 2073 7065 6369 6679 2074 6865 d to specify the │ │ │ │ -0010e4b0: 204d 494d 4520 7479 7065 206f 6620 7468 MIME type of th │ │ │ │ -0010e4c0: 6520 6461 7461 2c20 7468 6520 3c63 6f64 e data, the options │ │ │ │ -0010e4e0: 206d 656d 6265 7220 6973 2075 7365 6420 member is used │ │ │ │ -0010e4f0: 746f 2070 6967 6779 2d62 6163 6b20 6164 to piggy-back ad │ │ │ │ -0010e500: 6469 7469 6f6e 616c 2069 6e66 6f72 6d61 ditional informa │ │ │ │ -0010e510: 7469 6f6e 2077 6974 6820 6120 4449 4d45 tion with a DIME │ │ │ │ -0010e520: 2061 7474 6163 686d 656e 742e 2054 6865 attachment. The │ │ │ │ -0010e530: 206f 7264 6572 206f 6620 7468 6520 6465 order of the de │ │ │ │ -0010e540: 636c 6172 6174 696f 6e20 6f66 2074 6865 claration of the │ │ │ │ -0010e550: 206d 656d 6265 7273 2069 7320 7369 676e members is sign │ │ │ │ -0010e560: 6966 6963 616e 742e 2049 6e20 6164 6469 ificant. In addi │ │ │ │ -0010e570: 7469 6f6e 2c20 6e6f 206f 7468 6572 206d tion, no other m │ │ │ │ -0010e580: 656d 6265 7273 206f 7220 6d65 7468 6f64 embers or method │ │ │ │ -0010e590: 7320 6d61 7920 6265 2064 6563 6c61 7265 s may be declare │ │ │ │ -0010e5a0: 6420 6265 666f 7265 2061 6e79 206f 6620 d before any of │ │ │ │ -0010e5b0: 7468 6573 6520 6d65 6d62 6572 7320 696e these members in │ │ │ │ -0010e5c0: 2074 6865 2073 7472 7563 742f 636c 6173 the struct/clas │ │ │ │ -0010e5d0: 732c 2062 7574 2061 6464 6974 696f 6e61 s, but additiona │ │ │ │ -0010e5e0: 6c20 6d65 6d62 6572 7320 616e 6420 6d65 l members and me │ │ │ │ -0010e5f0: 7468 6f64 7320 6d61 7920 6170 7065 6172 thods may appear │ │ │ │ -0010e600: 2061 6674 6572 2074 6865 206d 656d 6265 after the membe │ │ │ │ -0010e610: 7220 6465 636c 6172 6174 696f 6e73 2e20 r declarations. │ │ │ │ -0010e620: 5468 6520 6578 7465 6e64 6564 203c 636f The extended xsd__ │ │ │ │ -0010e6a0: 6865 7842 696e 6172 793c 2f61 3e3c 2f63 hexBinary type is sim │ │ │ │ -0010e6c0: 696c 6172 2e3c 2f70 3e0a 3c70 3e54 6865 ilar.

    .

    The │ │ │ │ -0010e6d0: 203c 636f 6465 3e69 643c 2f63 6f64 653e id │ │ │ │ -0010e6e0: 2061 6e64 203c 636f 6465 3e74 7970 653c and type< │ │ │ │ -0010e6f0: 2f63 6f64 653e 206d 656d 6265 7273 2063 /code> members c │ │ │ │ -0010e700: 6f6e 7461 696e 2074 6578 742e 2054 6865 ontain text. The │ │ │ │ -0010e710: 2073 6574 2074 6865 2044 494d 452d 7370 set the DIME-sp │ │ │ │ -0010e720: 6563 6966 6963 206f 7074 696f 6e73 206d ecific options m │ │ │ │ -0010e730: 656d 6265 722c 2079 6f75 2063 616e 2075 ember, you can u │ │ │ │ -0010e740: 7365 2074 6865 203c 636f 6465 3e3c 6120 se the soap │ │ │ │ -0010e7c0: 5f64 696d 655f 6f70 7469 6f6e 3c2f 613e _dime_option │ │ │ │ -0010e7d0: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function │ │ │ │ -0010e7e0: 203c 636f 6465 3e63 6861 7220 2a73 6f61 char *soa │ │ │ │ -0010e7f0: 705f 6469 6d65 5f6f 7074 696f 6e28 7374 p_dime_option(st │ │ │ │ -0010e800: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ -0010e810: 2075 6e73 6967 6e65 6420 7368 6f72 7420 unsigned short │ │ │ │ -0010e820: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char │ │ │ │ -0010e830: 202a 6f70 7469 6f6e 293c 2f63 6f64 653e *option) │ │ │ │ -0010e840: 2e3c 2f70 3e0a 3c70 3e54 6869 7320 6675 .

    .

    This fu │ │ │ │ -0010e850: 6e63 7469 6f6e 2072 6574 7572 6e73 2061 nction returns a │ │ │ │ -0010e860: 2073 7472 696e 6720 7769 7468 2074 6869 string with thi │ │ │ │ -0010e870: 7320 656e 636f 6469 6e67 2e20 466f 7220 s encoding. For │ │ │ │ -0010e880: 6578 616d 706c 653c 2f70 3e0a 3c64 6976 example

    .
    struct │ │ │ │ -0010e8d0: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 x │ │ │ │ -0010e910: 7364 5f5f 6261 7365 3634 4269 6e61 7279 sd__base64Binary │ │ │ │ -0010e920: 3c2f 613e 2069 6d61 6765 3b20 3c2f 6469 image; .
    image.__ptr = │ │ │ │ -0010e9b0: 2e2e 2e3b 203c 2f64 6976 3e0a 3c64 6976 ...;
    .
    im │ │ │ │ -0010e9d0: 6167 652e 5f5f 7369 7a65 203d 202e 2e2e age.__size = ... │ │ │ │ -0010e9e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    image │ │ │ │ -0010ea00: 2e69 6420 3d20 3c73 7061 6e20 636c 6173 .id = "uuid:092 │ │ │ │ -0010ea30: 3333 3532 332d 3334 3562 2d34 3335 312d 33523-345b-4351- │ │ │ │ -0010ea40: 6236 3233 2d35 6473 6633 3573 6773 3564 b623-5dsf35sgs5d │ │ │ │ -0010ea50: 3626 7175 6f74 3b3c 2f73 7061 6e3e 3b20 6"; │ │ │ │ -0010ea60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    image.t │ │ │ │ -0010ea80: 7970 6520 3d20 3c73 7061 6e20 636c 6173 ype = "image/jp │ │ │ │ -0010eab0: 6567 2671 756f 743b 3c2f 7370 616e 3e3b eg"; │ │ │ │ -0010eac0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    image. │ │ │ │ -0010eae0: 6f70 7469 6f6e 7320 3d20 3c61 2063 6c61 options = soap │ │ │ │ -0010eb40: 5f64 696d 655f 6f70 7469 6f6e 3c2f 613e _dime_option │ │ │ │ -0010eb50: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -0010eb80: 2c20 302c 203c 7370 616e 2063 6c61 7373 , 0, "My weddin │ │ │ │ -0010ebb0: 6720 7069 6374 7572 6526 7175 6f74 3b3c g picture"< │ │ │ │ -0010ebc0: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .< │ │ │ │ -0010ebd0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -0010ebe0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ -0010ebf0: 705f 5f64 696d 655f 6874 6d6c 5f67 6134 p__dime_html_ga4 │ │ │ │ -0010ec00: 3832 3966 3833 3361 6265 3734 6665 6263 829f833abe74febc │ │ │ │ -0010ec10: 6238 6535 6665 3933 3630 6162 3539 3122 b8e5fe9360ab591" │ │ │ │ -0010ec20: 3e3c 6469 7620 636c 6173 733d 2274 746e >
    soap_d │ │ │ │ -0010ec80: 696d 655f 6f70 7469 6f6e 3c2f 613e 3c2f ime_option
    char * s │ │ │ │ -0010ecb0: 6f61 705f 6469 6d65 5f6f 7074 696f 6e28 oap_dime_option( │ │ │ │ -0010ecc0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ -0010ecd0: 702c 2075 6e73 6967 6e65 6420 7368 6f72 p, unsigned shor │ │ │ │ -0010ece0: 7420 6f70 7479 7065 2c20 636f 6e73 7420 t optype, const │ │ │ │ -0010ecf0: 6368 6172 202a 6f70 7469 6f6e 293c 2f64 char *option)
    Creates a │ │ │ │ -0010ed20: 4449 4d45 206f 7074 696f 6e2e 3c2f 6469 DIME option.
    .
    < │ │ │ │ -0010ed40: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -0010ed50: 3c70 3e57 6865 6e20 6569 7468 6572 2074

    When either t │ │ │ │ -0010ed60: 6865 203c 636f 6465 3e69 643c 2f63 6f64 he id or type │ │ │ │ -0010ed80: 3c2f 636f 6465 3e20 6d65 6d62 6572 2076 member v │ │ │ │ -0010ed90: 616c 7565 7320 6172 6520 6e6f 6e2d 4e55 alues are non-NU │ │ │ │ -0010eda0: 4c4c 2061 7420 7275 6e20 7469 6d65 2c20 LL at run time, │ │ │ │ -0010edb0: 7468 6520 6461 7461 2077 696c 6c20 6265 the data will be │ │ │ │ -0010edc0: 2073 6572 6961 6c69 7a65 6420 6173 2061 serialized as a │ │ │ │ -0010edd0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ -0010ede0: 2e3c 2f70 3e0a 3c70 3e54 6865 2053 4f41 .

    .

    The SOA │ │ │ │ -0010edf0: 502f 584d 4c20 6d65 7373 6167 6520 7265 P/XML message re │ │ │ │ -0010ee00: 6665 7273 2074 6f20 7468 6520 6174 7461 fers to the atta │ │ │ │ -0010ee10: 6368 6d65 6e74 7320 7573 696e 6720 3c65 chments using href attribu │ │ │ │ -0010ee40: 7465 732e 2054 6869 7320 6765 6e65 7261 tes. This genera │ │ │ │ -0010ee50: 6c6c 7920 776f 726b 7320 7769 6c6c 2077 lly works will w │ │ │ │ -0010ee60: 6974 6820 534f 4150 2052 5043 2065 6e63 ith SOAP RPC enc │ │ │ │ -0010ee70: 6f64 6564 206d 6573 7361 6769 6e67 2c20 oded messaging, │ │ │ │ -0010ee80: 6265 6361 7573 6520 3c65 6d3e 3c63 6f64 because href attributes ar │ │ │ │ -0010eeb0: 6520 7065 726d 6974 7465 642e 2048 6f77 e permitted. How │ │ │ │ -0010eec0: 6576 6572 2c20 7769 7468 2064 6f63 756d ever, with docum │ │ │ │ -0010eed0: 656e 742f 6c69 7465 7261 6c20 7374 796c ent/literal styl │ │ │ │ -0010eee0: 6520 7468 6520 7265 6665 7265 6e63 696e e the referencin │ │ │ │ -0010eef0: 6720 6d65 6368 616e 6973 6d20 6d75 7374 g mechanism must │ │ │ │ -0010ef00: 2062 6520 6578 706c 6963 6974 6c79 2064 be explicitly d │ │ │ │ -0010ef10: 6566 696e 6564 2069 6e20 7468 6520 7363 efined in the sc │ │ │ │ -0010ef20: 6865 6d61 206f 6620 7468 6520 6269 6e61 hema of the bina │ │ │ │ -0010ef30: 7279 2074 7970 652e 2054 6865 7265 666f ry type. Therefo │ │ │ │ -0010ef40: 7265 2c20 4d54 4f4d 2069 7320 7468 6520 re, MTOM is the │ │ │ │ -0010ef50: 7072 6566 6572 7265 6420 6174 7461 6368 preferred attach │ │ │ │ -0010ef60: 6d65 6e74 206d 6563 6861 6e69 736d 2066 ment mechanism f │ │ │ │ -0010ef70: 6f72 2064 6f63 756d 656e 742f 6c69 7465 or document/lite │ │ │ │ -0010ef80: 7261 6c20 7374 796c 6520 6d65 7373 6167 ral style messag │ │ │ │ -0010ef90: 696e 672e 3c2f 703e 0a3c 703e 5468 6520 ing.

    .

    The │ │ │ │ -0010efa0: 6465 636c 6172 6174 696f 6e20 6f66 2061 declaration of a │ │ │ │ -0010efb0: 6e20 6578 7465 6e64 6564 2062 696e 6172 n extended binar │ │ │ │ -0010efc0: 7920 7479 7065 2069 6e20 7468 6520 696e y type in the in │ │ │ │ -0010efd0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f │ │ │ │ -0010efe0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2 │ │ │ │ -0010eff0: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

    .
    < │ │ │ │ -0010f010: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0010f020: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct ns__myBinar │ │ │ │ -0010f050: 7944 6174 6154 7970 6520 3c2f 6469 763e yDataType
    │ │ │ │ +0010dae0: 226c 696e 6522 3e20 2020 203c 7370 616e "line"> unsigned
    c │ │ │ │ +0010db30: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *__ptr; │ │ │ │ +0010dba0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .. │ │ │ │ +0010dc60: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ +0010dc80: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *id; .
    char * │ │ │ │ +0010dd30: 3c61 2063 6c61 7373 3d22 636f 6465 2220 type;
    .
    │ │ │ │ +0010ddb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * │ │ │ │ +0010de30: 6f70 7469 6f6e 733c 2f61 3e3b 203c 2f64 options; .
    };
    .< │ │ │ │ +0010de60: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0010de70: 6964 3d22 6173 7472 7563 7478 7364 5f5f id="astructxsd__ │ │ │ │ +0010de80: 5f5f 6261 7365 3634 5f62 696e 6172 795f __base64_binary_ │ │ │ │ +0010de90: 6874 6d6c 5f61 3136 6432 6262 3033 6436 html_a16d2bb03d6 │ │ │ │ +0010dea0: 3862 6632 3736 6261 6435 6664 3763 6363 8bf276bad5fd7ccc │ │ │ │ +0010deb0: 6435 3562 6265 223e 3c64 6976 2063 6c61 d55bbe">
    │ │ │ │ +0010df50: 6368 6172 202a 206f 7074 696f 6e73 3c2f char * options
    extra mem │ │ │ │ +0010df80: 6265 723a 2044 494d 4520 6f70 7469 6f6e ber: DIME option │ │ │ │ +0010df90: 7320 6f72 2061 2064 6573 6372 6970 7469 s or a descripti │ │ │ │ +0010dfa0: 6f6e 206f 6620 7468 6520 4d49 4d45 2061 on of the MIME a │ │ │ │ +0010dfb0: 7474 6163 686d 656e 7420 6f72 204e 554c ttachment or NUL │ │ │ │ +0010dfc0: 4c3c 2f64 6976 3e3c 6469 7620 636c 6173 L
    Def │ │ │ │ +0010dfe0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ +0010dff0: 736f 6170 322e 683a 3938 3432 3c2f 6469 soap2.h:9842
    .
    char * id
    extra mem │ │ │ │ +0010e120: 6265 723a 204e 554c 4c20 746f 2067 656e ber: NULL to gen │ │ │ │ +0010e130: 6572 6174 6520 616e 2069 6420 6f72 2061 erate an id or a │ │ │ │ +0010e140: 7373 6967 6e20 7468 6973 206d 656d 6265 ssign this membe │ │ │ │ +0010e150: 7220 7661 7269 6162 6c65 2061 2075 6e69 r variable a uni │ │ │ │ +0010e160: 7175 6520 5555 4944 3c2f 6469 763e 3c64 que UUID
    Definition:< │ │ │ │ +0010e190: 2f62 3e20 7374 6473 6f61 7032 2e68 3a39 /b> stdsoap2.h:9 │ │ │ │ +0010e1a0: 3834 303c 2f64 6976 3e3c 2f64 6976 3e0a 840
    . │ │ │ │ +0010e1b0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    ch │ │ │ │ +0010e2a0: 6172 202a 2074 7970 653c 2f64 6976 3e3c ar * type
    < │ │ │ │ +0010e2b0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +0010e2c0: 223e 6578 7472 6120 6d65 6d62 6572 3a20 ">extra member: │ │ │ │ +0010e2d0: 4d49 4d45 2074 7970 6520 6f66 2074 6865 MIME type of the │ │ │ │ +0010e2e0: 2064 6174 613c 2f64 6976 3e3c 6469 7620 data
    Definition: │ │ │ │ +0010e310: 2073 7464 736f 6170 322e 683a 3938 3431 stdsoap2.h:9841 │ │ │ │ +0010e320: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The id membe │ │ │ │ +0010e360: 7220 6973 2066 6f72 2061 7474 6163 686d r is for attachm │ │ │ │ +0010e370: 656e 7420 7265 6665 7265 6e63 696e 672c ent referencing, │ │ │ │ +0010e380: 2074 7970 6963 616c 6c79 2061 2063 6f6e typically a con │ │ │ │ +0010e390: 7465 6e74 2069 6420 2843 4944 2920 6f72 tent id (CID) or │ │ │ │ +0010e3a0: 2061 2055 5549 4420 7768 6963 6820 6361 a UUID which ca │ │ │ │ +0010e3b0: 6e20 6265 206f 6274 6169 6e65 6420 7769 n be obtained wi │ │ │ │ +0010e3c0: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soap_r │ │ │ │ +0010e450: 616e 645f 7575 6964 3c2f 613e 3c2f 636f and_uuid, a typ │ │ │ │ +0010e470: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member │ │ │ │ +0010e480: 6973 2075 7365 6420 746f 2073 7065 6369 is used to speci │ │ │ │ +0010e490: 6679 2074 6865 204d 494d 4520 7479 7065 fy the MIME type │ │ │ │ +0010e4a0: 206f 6620 7468 6520 6461 7461 2c20 7468 of the data, th │ │ │ │ +0010e4b0: 6520 3c63 6f64 653e 6f70 7469 6f6e 733c e options< │ │ │ │ +0010e4c0: 2f63 6f64 653e 206d 656d 6265 7220 6973 /code> member is │ │ │ │ +0010e4d0: 2075 7365 6420 746f 2070 6967 6779 2d62 used to piggy-b │ │ │ │ +0010e4e0: 6163 6b20 6164 6469 7469 6f6e 616c 2069 ack additional i │ │ │ │ +0010e4f0: 6e66 6f72 6d61 7469 6f6e 2077 6974 6820 nformation with │ │ │ │ +0010e500: 6120 4449 4d45 2061 7474 6163 686d 656e a DIME attachmen │ │ │ │ +0010e510: 742e 2054 6865 206f 7264 6572 206f 6620 t. The order of │ │ │ │ +0010e520: 7468 6520 6465 636c 6172 6174 696f 6e20 the declaration │ │ │ │ +0010e530: 6f66 2074 6865 206d 656d 6265 7273 2069 of the members i │ │ │ │ +0010e540: 7320 7369 676e 6966 6963 616e 742e 2049 s significant. I │ │ │ │ +0010e550: 6e20 6164 6469 7469 6f6e 2c20 6e6f 206f n addition, no o │ │ │ │ +0010e560: 7468 6572 206d 656d 6265 7273 206f 7220 ther members or │ │ │ │ +0010e570: 6d65 7468 6f64 7320 6d61 7920 6265 2064 methods may be d │ │ │ │ +0010e580: 6563 6c61 7265 6420 6265 666f 7265 2061 eclared before a │ │ │ │ +0010e590: 6e79 206f 6620 7468 6573 6520 6d65 6d62 ny of these memb │ │ │ │ +0010e5a0: 6572 7320 696e 2074 6865 2073 7472 7563 ers in the struc │ │ │ │ +0010e5b0: 742f 636c 6173 732c 2062 7574 2061 6464 t/class, but add │ │ │ │ +0010e5c0: 6974 696f 6e61 6c20 6d65 6d62 6572 7320 itional members │ │ │ │ +0010e5d0: 616e 6420 6d65 7468 6f64 7320 6d61 7920 and methods may │ │ │ │ +0010e5e0: 6170 7065 6172 2061 6674 6572 2074 6865 appear after the │ │ │ │ +0010e5f0: 206d 656d 6265 7220 6465 636c 6172 6174 member declarat │ │ │ │ +0010e600: 696f 6e73 2e20 5468 6520 6578 7465 6e64 ions. The extend │ │ │ │ +0010e610: 6564 203c 636f 6465 3e3c 6120 636c 6173 ed xsd__hexBinary< │ │ │ │ +0010e690: 2f61 3e3c 2f63 6f64 653e 2074 7970 6520 /a> type │ │ │ │ +0010e6a0: 6973 2073 696d 696c 6172 2e3c 2f70 3e0a is similar.

    . │ │ │ │ +0010e6b0: 3c70 3e54 6865 203c 636f 6465 3e69 643c

    The id< │ │ │ │ +0010e6c0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and type mem │ │ │ │ +0010e6e0: 6265 7273 2063 6f6e 7461 696e 2074 6578 bers contain tex │ │ │ │ +0010e6f0: 742e 2054 6865 2073 6574 2074 6865 2044 t. The set the D │ │ │ │ +0010e700: 494d 452d 7370 6563 6966 6963 206f 7074 IME-specific opt │ │ │ │ +0010e710: 696f 6e73 206d 656d 6265 722c 2079 6f75 ions member, you │ │ │ │ +0010e720: 2063 616e 2075 7365 2074 6865 203c 636f can use the soap_dime_opti │ │ │ │ +0010e7b0: 6f6e 3c2f 613e 3c2f 636f 6465 3e20 6675 on fu │ │ │ │ +0010e7c0: 6e63 7469 6f6e 203c 636f 6465 3e63 6861 nction cha │ │ │ │ +0010e7d0: 7220 2a73 6f61 705f 6469 6d65 5f6f 7074 r *soap_dime_opt │ │ │ │ +0010e7e0: 696f 6e28 7374 7275 6374 2073 6f61 7020 ion(struct soap │ │ │ │ +0010e7f0: 2a73 6f61 702c 2075 6e73 6967 6e65 6420 *soap, unsigned │ │ │ │ +0010e800: 7368 6f72 7420 7479 7065 2c20 636f 6e73 short type, cons │ │ │ │ +0010e810: 7420 6368 6172 202a 6f70 7469 6f6e 293c t char *option)< │ │ │ │ +0010e820: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e54 /code>.

    .

    T │ │ │ │ +0010e830: 6869 7320 6675 6e63 7469 6f6e 2072 6574 his function ret │ │ │ │ +0010e840: 7572 6e73 2061 2073 7472 696e 6720 7769 urns a string wi │ │ │ │ +0010e850: 7468 2074 6869 7320 656e 636f 6469 6e67 th this encoding │ │ │ │ +0010e860: 2e20 466f 7220 6578 616d 706c 653c 2f70 . For example

    ..i │ │ │ │ +0010ea60: 6d61 6765 2e74 7970 6520 3d20 3c73 7061 mage.type = "im │ │ │ │ +0010ea90: 6167 652f 6a70 6567 2671 756f 743b 3c2f age/jpeg";
    . │ │ │ │ +0010eac0: 696d 6167 652e 6f70 7469 6f6e 7320 3d20 image.options = │ │ │ │ +0010ead0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_dime_opti │ │ │ │ +0010eb30: 6f6e 3c2f 613e 283c 6120 636c 6173 733d on(so │ │ │ │ +0010eb60: 6170 3c2f 613e 2c20 302c 203c 7370 616e ap, 0, "My │ │ │ │ +0010eb90: 7765 6464 696e 6720 7069 6374 7572 6526 wedding picture& │ │ │ │ +0010eba0: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    ch │ │ │ │ +0010ec90: 6172 202a 2073 6f61 705f 6469 6d65 5f6f ar * soap_dime_o │ │ │ │ +0010eca0: 7074 696f 6e28 7374 7275 6374 2073 6f61 ption(struct soa │ │ │ │ +0010ecb0: 7020 2a73 6f61 702c 2075 6e73 6967 6e65 p *soap, unsigne │ │ │ │ +0010ecc0: 6420 7368 6f72 7420 6f70 7479 7065 2c20 d short optype, │ │ │ │ +0010ecd0: 636f 6e73 7420 6368 6172 202a 6f70 7469 const char *opti │ │ │ │ +0010ece0: 6f6e 293c 2f64 6976 3e3c 6469 7620 636c on)
    Crea │ │ │ │ +0010ed00: 7465 7320 6120 4449 4d45 206f 7074 696f tes a DIME optio │ │ │ │ +0010ed10: 6e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c n.
    .< │ │ │ │ +0010ed20: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    When ei │ │ │ │ +0010ed40: 7468 6572 2074 6865 203c 636f 6465 3e69 ther the i │ │ │ │ +0010ed50: 643c 2f63 6f64 653e 206f 7220 3c63 6f64 d or type me │ │ │ │ +0010ed70: 6d62 6572 2076 616c 7565 7320 6172 6520 mber values are │ │ │ │ +0010ed80: 6e6f 6e2d 4e55 4c4c 2061 7420 7275 6e20 non-NULL at run │ │ │ │ +0010ed90: 7469 6d65 2c20 7468 6520 6461 7461 2077 time, the data w │ │ │ │ +0010eda0: 696c 6c20 6265 2073 6572 6961 6c69 7a65 ill be serialize │ │ │ │ +0010edb0: 6420 6173 2061 2044 494d 4520 6174 7461 d as a DIME atta │ │ │ │ +0010edc0: 6368 6d65 6e74 2e3c 2f70 3e0a 3c70 3e54 chment.

    .

    T │ │ │ │ +0010edd0: 6865 2053 4f41 502f 584d 4c20 6d65 7373 he SOAP/XML mess │ │ │ │ +0010ede0: 6167 6520 7265 6665 7273 2074 6f20 7468 age refers to th │ │ │ │ +0010edf0: 6520 6174 7461 6368 6d65 6e74 7320 7573 e attachments us │ │ │ │ +0010ee00: 696e 6720 3c65 6d3e 3c63 6f64 653e 6872 ing hr │ │ │ │ +0010ee10: 6566 3c2f 636f 6465 3e3c 2f65 6d3e 2061 ef a │ │ │ │ +0010ee20: 7474 7269 6275 7465 732e 2054 6869 7320 ttributes. This │ │ │ │ +0010ee30: 6765 6e65 7261 6c6c 7920 776f 726b 7320 generally works │ │ │ │ +0010ee40: 7769 6c6c 2077 6974 6820 534f 4150 2052 will with SOAP R │ │ │ │ +0010ee50: 5043 2065 6e63 6f64 6564 206d 6573 7361 PC encoded messa │ │ │ │ +0010ee60: 6769 6e67 2c20 6265 6361 7573 6520 3c65 ging, because href attribu │ │ │ │ +0010ee90: 7465 7320 6172 6520 7065 726d 6974 7465 tes are permitte │ │ │ │ +0010eea0: 642e 2048 6f77 6576 6572 2c20 7769 7468 d. However, with │ │ │ │ +0010eeb0: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera │ │ │ │ +0010eec0: 6c20 7374 796c 6520 7468 6520 7265 6665 l style the refe │ │ │ │ +0010eed0: 7265 6e63 696e 6720 6d65 6368 616e 6973 rencing mechanis │ │ │ │ +0010eee0: 6d20 6d75 7374 2062 6520 6578 706c 6963 m must be explic │ │ │ │ +0010eef0: 6974 6c79 2064 6566 696e 6564 2069 6e20 itly defined in │ │ │ │ +0010ef00: 7468 6520 7363 6865 6d61 206f 6620 7468 the schema of th │ │ │ │ +0010ef10: 6520 6269 6e61 7279 2074 7970 652e 2054 e binary type. T │ │ │ │ +0010ef20: 6865 7265 666f 7265 2c20 4d54 4f4d 2069 herefore, MTOM i │ │ │ │ +0010ef30: 7320 7468 6520 7072 6566 6572 7265 6420 s the preferred │ │ │ │ +0010ef40: 6174 7461 6368 6d65 6e74 206d 6563 6861 attachment mecha │ │ │ │ +0010ef50: 6e69 736d 2066 6f72 2064 6f63 756d 656e nism for documen │ │ │ │ +0010ef60: 742f 6c69 7465 7261 6c20 7374 796c 6520 t/literal style │ │ │ │ +0010ef70: 6d65 7373 6167 696e 672e 3c2f 703e 0a3c messaging.

    .< │ │ │ │ +0010ef80: 703e 5468 6520 6465 636c 6172 6174 696f p>The declaratio │ │ │ │ +0010ef90: 6e20 6f66 2061 6e20 6578 7465 6e64 6564 n of an extended │ │ │ │ +0010efa0: 2062 696e 6172 7920 7479 7065 2069 6e20 binary type in │ │ │ │ +0010efb0: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he │ │ │ │ +0010efc0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so │ │ │ │ +0010efd0: 6170 6370 7032 2069 733a 3c2f 703e 0a3c apcpp2 is:

    .< │ │ │ │ +0010efe0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +0010eff0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    str │ │ │ │ +0010f020: 7563 7420 3c2f 7370 616e 3e6e 735f 5f6d uct ns__m │ │ │ │ +0010f030: 7942 696e 6172 7944 6174 6154 7970 6520 yBinaryDataType │ │ │ │ +0010f040: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 0010f060: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    │ │ │ │ -0010f090: 203c 7370 616e 2063 6c61 7373 3d22 6b65 unsig │ │ │ │ -0010f0b0: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned char │ │ │ │ -0010f0e0: 202a 5f5f 7074 723b 203c 2f64 6976 3e0a *__ptr;
    . │ │ │ │ -0010f0f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -0010f120: 696e 743c 2f73 7061 6e3e 205f 5f73 697a int __siz │ │ │ │ -0010f130: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    │ │ │ │ -0010f150: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *id;
    .
    char *t │ │ │ │ -0010f1c0: 7970 653b 203c 2f64 6976 3e0a 3c64 6976 ype;
    .
    │ │ │ │ -0010f1e0: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ -0010f200: 3c2f 7370 616e 3e20 2a6f 7074 696f 6e73 *options │ │ │ │ -0010f210: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    };.

    C+ │ │ │ │ -0010f250: 2b20 7072 6f67 7261 6d6d 6572 7320 6361 + programmers ca │ │ │ │ -0010f260: 6e20 7573 6520 696e 6865 7269 7461 6e63 n use inheritanc │ │ │ │ -0010f270: 6520 696e 7374 6561 6420 6f66 2074 6578 e instead of tex │ │ │ │ -0010f280: 7475 616c 2065 7874 656e 7369 6f6e 2072 tual extension r │ │ │ │ -0010f290: 6571 7569 7265 6420 696e 2043 3a3c 2f70 equired in C:

    .
    │ │ │ │ -0010f2e0: 636c 6173 7320 3c2f 7370 616e 3e3c 6120 class xsd__base64B │ │ │ │ -0010f330: 696e 6172 793c 2f61 3e20 3c2f 6469 763e inary
    │ │ │ │ -0010f340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    { publi │ │ │ │ -0010f370: 633c 2f73 7061 6e3e 3a3c 2f64 6976 3e0a c:
    . │ │ │ │ -0010f380: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -0010f3b0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned │ │ │ │ -0010f3c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char * │ │ │ │ -0010f440: 5f5f 7074 723c 2f61 3e3b 203c 2f64 6976 __ptr;
    .
    int __size │ │ │ │ -0010f4f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }; .
    cla │ │ │ │ -0010f540: 7373 203c 2f73 7061 6e3e 6e73 5f5f 6d79 ss ns__my │ │ │ │ -0010f550: 4269 6e61 7279 4461 7461 5479 7065 203a BinaryDataType : │ │ │ │ -0010f560: 203c 7370 616e 2063 6c61 7373 3d22 6b65 public xsd_ │ │ │ │ -0010f5c0: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary
    .
    { public │ │ │ │ -0010f610: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    char *id;
    . │ │ │ │ -0010f660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -0010f690: 6368 6172 3c2f 7370 616e 3e20 2a74 7970 char *typ │ │ │ │ -0010f6a0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    │ │ │ │ -0010f6c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *options; │ │ │ │ -0010f6f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    This │ │ │ │ -0010f730: 2064 6566 696e 6573 2061 6e20 6578 7465 defines an exte │ │ │ │ -0010f740: 6e73 696f 6e20 6f66 203c 656d 3e3c 636f nsion of xsd:base64Bin │ │ │ │ -0010f760: 6172 793c 2f63 6f64 653e 3c2f 656d 3e2c ary, │ │ │ │ -0010f770: 2073 7563 6820 7468 6174 2074 6865 2064 such that the d │ │ │ │ -0010f780: 6174 6120 6361 6e20 6265 2073 6572 6961 ata can be seria │ │ │ │ -0010f790: 6c69 7a65 6420 6173 2044 494d 4520 6174 lized as DIME at │ │ │ │ -0010f7a0: 7461 6368 6d65 6e74 7320 7573 696e 6720 tachments using │ │ │ │ -0010f7b0: 3c65 6d3e 3c63 6f64 653e 6872 6566 3c2f href attri │ │ │ │ -0010f7d0: 6275 7465 7320 666f 7220 7265 6665 7265 butes for refere │ │ │ │ -0010f7e0: 6e63 696e 672e 2057 6865 6e20 6120 6469 ncing. When a di │ │ │ │ -0010f7f0: 6666 6572 656e 7420 6174 7472 6962 7574 fferent attribut │ │ │ │ -0010f800: 6520 6973 2074 6f20 6265 2075 7365 642c e is to be used, │ │ │ │ -0010f810: 2074 6869 7320 6d75 7374 2062 6520 6578 this must be ex │ │ │ │ -0010f820: 706c 6963 6974 6c79 2064 6566 696e 6564 plicitly defined │ │ │ │ -0010f830: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    //gsoap WSre │ │ │ │ -0010f880: 6620 7363 6865 6d61 2069 6d70 6f72 743a f schema import: │ │ │ │ -0010f890: 2068 7474 703a 2f2f 7363 6865 6d61 732e http://schemas. │ │ │ │ -0010f8a0: 786d 6c73 6f61 702e 6f72 672f 7773 2f32 xmlsoap.org/ws/2 │ │ │ │ -0010f8b0: 3030 322f 3034 2f72 6566 6572 656e 6365 002/04/reference │ │ │ │ -0010f8c0: 2f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a /
    . │ │ │ │ -0010f8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -0010f900: 2f73 7061 6e3e 6e73 5f5f 6d79 4269 6e61 /span>ns__myBina │ │ │ │ -0010f910: 7279 4461 7461 5479 7065 203c 2f64 6976 ryDataType
    unsigned │ │ │ │ +0010f0a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +0010f0c0: 2f73 7061 6e3e 202a 5f5f 7074 723b 203c /span> *__ptr; < │ │ │ │ +0010f0d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int │ │ │ │ +0010f110: 205f 5f73 697a 653b 203c 2f64 6976 3e0a __size;
    . │ │ │ │ +0010f120: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +0010f150: 6368 6172 3c2f 7370 616e 3e20 2a69 643b char *id; │ │ │ │ +0010f160: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    char *type;
    .
    char *o │ │ │ │ +0010f1f0: 7074 696f 6e73 3b20 3c2f 6469 763e 0a3c ptions;
    .< │ │ │ │ +0010f200: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0010f210: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    │ │ │ │ +0010f220: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d < │ │ │ │ +0010f710: 703e 5468 6973 2064 6566 696e 6573 2061 p>This defines a │ │ │ │ +0010f720: 6e20 6578 7465 6e73 696f 6e20 6f66 203c n extension of < │ │ │ │ +0010f730: 656d 3e3c 636f 6465 3e78 7364 3a62 6173 em>xsd:bas │ │ │ │ +0010f740: 6536 3442 696e 6172 793c 2f63 6f64 653e e64Binary │ │ │ │ +0010f750: 3c2f 656d 3e2c 2073 7563 6820 7468 6174 , such that │ │ │ │ +0010f760: 2074 6865 2064 6174 6120 6361 6e20 6265 the data can be │ │ │ │ +0010f770: 2073 6572 6961 6c69 7a65 6420 6173 2044 serialized as D │ │ │ │ +0010f780: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments │ │ │ │ +0010f790: 7573 696e 6720 3c65 6d3e 3c63 6f64 653e using │ │ │ │ +0010f7a0: 6872 6566 3c2f 636f 6465 3e3c 2f65 6d3e href │ │ │ │ +0010f7b0: 2061 7474 7269 6275 7465 7320 666f 7220 attributes for │ │ │ │ +0010f7c0: 7265 6665 7265 6e63 696e 672e 2057 6865 referencing. Whe │ │ │ │ +0010f7d0: 6e20 6120 6469 6666 6572 656e 7420 6174 n a different at │ │ │ │ +0010f7e0: 7472 6962 7574 6520 6973 2074 6f20 6265 tribute is to be │ │ │ │ +0010f7f0: 2075 7365 642c 2074 6869 7320 6d75 7374 used, this must │ │ │ │ +0010f800: 2062 6520 6578 706c 6963 6974 6c79 2064 be explicitly d │ │ │ │ +0010f810: 6566 696e 6564 3a3c 2f70 3e0a 3c64 6976 efined:

    .
    //gsoa │ │ │ │ +0010f860: 7020 5753 7265 6620 7363 6865 6d61 2069 p WSref schema i │ │ │ │ +0010f870: 6d70 6f72 743a 2068 7474 703a 2f2f 7363 mport: http://sc │ │ │ │ +0010f880: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or │ │ │ │ +0010f890: 672f 7773 2f32 3030 322f 3034 2f72 6566 g/ws/2002/04/ref │ │ │ │ +0010f8a0: 6572 656e 6365 2f20 3c2f 7370 616e 3e3c erence/ < │ │ │ │ +0010f8b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ +0010f8e0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__ │ │ │ │ +0010f8f0: 6d79 4269 6e61 7279 4461 7461 5479 7065 myBinaryDataType │ │ │ │ +0010f900: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    {
    .
    │ │ │ │ -0010f950: 2020 3c73 7061 6e20 636c 6173 733d 226b unsi │ │ │ │ -0010f970: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned char *__ptr;
    │ │ │ │ -0010f9b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int __si │ │ │ │ -0010f9f0: 7a65 3b20 3c2f 6469 763e 0a3c 6469 7620 ze;
    .
    │ │ │ │ -0010fa10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -0010fa30: 2f73 7061 6e3e 202a 6964 3b20 3c2f 6469 /span> *id; .
    char * │ │ │ │ -0010fa80: 7479 7065 3b20 3c2f 6469 763e 0a3c 6469 type;
    . │ │ │ │ -0010faa0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ -0010fac0: 723c 2f73 7061 6e3e 202a 6f70 7469 6f6e r *option │ │ │ │ -0010fad0: 733b 203c 2f64 6976 3e0a 3c64 6976 2063 s;
    .
    @ │ │ │ │ -0010faf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *WSref__lo │ │ │ │ -0010fb20: 6361 7469 6f6e 3b20 3c2f 6469 763e 0a3c cation;
    .< │ │ │ │ -0010fb30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0010fb40: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
    .
    │ │ │ │ -0010fb50: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d │ │ │ │ -00110560: 3c70 3e41 7320 6120 7265 7375 6c74 2c20

    As a result, │ │ │ │ -00110570: 616c 6c20 6174 7461 6368 6d65 6e74 7320 all attachments │ │ │ │ -00110580: 7769 7468 2061 204e 554c 4c20 3c63 6f64 with a NULL id memb │ │ │ │ -001105a0: 6572 2077 696c 6c20 7573 6520 6120 6175 er will use a au │ │ │ │ -001105b0: 746f 2d67 656e 6572 6174 6564 2069 6420 to-generated id │ │ │ │ -001105c0: 7661 6c75 6520 6261 7365 6420 6f6e 2074 value based on t │ │ │ │ -001105d0: 6865 2066 6f72 6d61 7420 7374 7269 6e67 he format string │ │ │ │ -001105e0: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    Warning
    Care must │ │ │ │ -00110620: 6265 2074 616b 656e 206e 6f74 2074 6f20 be taken not to │ │ │ │ -00110630: 696e 7472 6f64 7563 6520 6475 706c 6963 introduce duplic │ │ │ │ -00110640: 6174 6520 636f 6e74 656e 7420 6964 2076 ate content id v │ │ │ │ -00110650: 616c 7565 732c 2077 6865 6e20 6173 7369 alues, when assi │ │ │ │ -00110660: 676e 696e 6720 636f 6e74 656e 7420 6964 gning content id │ │ │ │ -00110670: 2076 616c 7565 7320 746f 2074 6865 2069 values to the i │ │ │ │ -00110680: 6420 6d65 6d62 6572 7320 6f66 2044 494d d members of DIM │ │ │ │ -00110690: 4520 6578 7465 6e64 6564 2062 696e 6172 E extended binar │ │ │ │ -001106a0: 7920 6461 7461 2074 7970 6573 2e20 436f y data types. Co │ │ │ │ -001106b0: 6e74 656e 7420 6964 7320 6d75 7374 2062 ntent ids must b │ │ │ │ -001106c0: 6520 756e 6971 7565 2e3c 2f64 643e 3c2f e unique.
    .

    .... Back to │ │ │ │ -001106f0: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ -00110700: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

    .

    .Streamin │ │ │ │ -00110740: 6720 4449 4d45 3c2f 6832 3e0a 3c70 3e53 g DIME

    .

    S │ │ │ │ -00110750: 7472 6561 6d69 6e67 2044 494d 4520 6973 treaming DIME is │ │ │ │ -00110760: 2061 6368 6965 7665 6420 7769 7468 2063 achieved with c │ │ │ │ -00110770: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function │ │ │ │ -00110780: 7320 746f 2066 6574 6368 2061 6e64 2073 s to fetch and s │ │ │ │ -00110790: 746f 7265 2064 6174 6120 6475 7269 6e67 tore data during │ │ │ │ -001107a0: 2074 7261 6e73 6d69 7373 696f 6e2e 2054 transmission. T │ │ │ │ -001107b0: 6872 6565 2066 756e 6374 696f 6e20 6361 hree function ca │ │ │ │ -001107c0: 6c6c 6261 636b 7320 666f 7220 7374 7265 llbacks for stre │ │ │ │ -001107d0: 616d 696e 6720 4449 4d45 206f 7574 7075 aming DIME outpu │ │ │ │ -001107e0: 7420 616e 6420 7468 7265 6520 6361 6c6c t and three call │ │ │ │ -001107f0: 6261 636b 7320 666f 7220 7374 7265 616d backs for stream │ │ │ │ -00110800: 696e 6720 4449 4d45 2069 6e70 7574 2061 ing DIME input a │ │ │ │ -00110810: 7265 2061 7661 696c 6162 6c65 2e3c 2f70 re available.

    .
      .
    • void *(*soap.fd │ │ │ │ -00110840: 696d 6572 6561 646f 7065 6e29 2873 7472 imereadopen)(str │ │ │ │ -00110850: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ -00110860: 766f 6964 202a 6861 6e64 6c65 2c20 636f void *handle, co │ │ │ │ -00110870: 6e73 7420 6368 6172 202a 6964 2c20 636f nst char *id, co │ │ │ │ -00110880: 6e73 7420 6368 6172 202a 7479 7065 2c20 nst char *type, │ │ │ │ -00110890: 636f 6e73 7420 6368 6172 202a 6f70 7469 const char *opti │ │ │ │ -001108a0: 6f6e 7329 3c2f 636f 6465 3e20 5468 6973 ons) This │ │ │ │ -001108b0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal │ │ │ │ -001108c0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin │ │ │ │ -001108d0: 6520 746f 2073 7461 7274 2073 656e 6469 e to start sendi │ │ │ │ -001108e0: 6e67 2061 2073 7472 6561 6d69 6e67 2044 ng a streaming D │ │ │ │ -001108f0: 494d 4520 6174 7461 6368 6d65 6e74 2e20 IME attachment. │ │ │ │ -00110900: 5468 6973 2063 616c 6c62 6163 6b20 6f70 This callback op │ │ │ │ -00110910: 656e 7320 6120 7374 7265 616d 2074 6f20 ens a stream to │ │ │ │ -00110920: 7374 6172 7420 7265 6164 696e 6720 7468 start reading th │ │ │ │ -00110930: 6520 6174 7461 6368 6d65 6e74 2064 6174 e attachment dat │ │ │ │ -00110940: 6120 746f 2073 656e 642e 2054 6865 2061 a to send. The a │ │ │ │ -00110950: 6374 7561 6c20 6461 7461 2073 7472 6561 ctual data strea │ │ │ │ -00110960: 6d20 7769 6c6c 2062 6520 7265 6164 2069 m will be read i │ │ │ │ -00110970: 6e20 6368 756e 6b73 2075 7369 6e67 2074 n chunks using t │ │ │ │ -00110980: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::f │ │ │ │ -00110a20: 6469 6d65 7265 6164 3c2f 613e 3c2f 636f dimeread callback unt │ │ │ │ -00110a40: 696c 206e 6f20 6d6f 7265 2064 6174 6120 il no more data │ │ │ │ -00110a50: 6973 2061 7661 696c 6162 6c65 2061 6e64 is available and │ │ │ │ -00110a60: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap::fdimerea │ │ │ │ -00110b10: 6463 6c6f 7365 3c2f 613e 3c2f 636f 6465 dclose callback is ca │ │ │ │ -00110b30: 6c6c 6564 2074 6f20 636c 6f73 6520 7468 lled to close th │ │ │ │ -00110b40: 6520 7374 7265 616d 2e20 5468 6520 3c63 e stream. The handle parameter cont │ │ │ │ -00110b70: 6169 6e73 2074 6865 2076 616c 7565 206f ains the value o │ │ │ │ -00110b80: 6620 7468 6520 3c63 6f64 653e 5f5f 7074 f the __pt │ │ │ │ -00110b90: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member │ │ │ │ -00110ba0: 7661 7269 6162 6c65 206f 6620 7468 6520 variable of the │ │ │ │ -00110bb0: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc │ │ │ │ -00110bc0: 742f 636c 6173 7320 7769 7468 2064 6174 t/class with dat │ │ │ │ -00110bd0: 6120 2865 2e67 2e20 3c63 6f64 653e 3c61 a (e.g. xsd_ │ │ │ │ -00110c50: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In │ │ │ │ -00110ce0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude │ │ │ │ -00110cf0: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt │ │ │ │ -00110d00: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, │ │ │ │ -00110d10: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, < │ │ │ │ -00110d20: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, │ │ │ │ -00110d30: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti │ │ │ │ -00110d50: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe │ │ │ │ -00110d60: 7273 292c 2077 6869 6368 2073 686f 756c rs), which shoul │ │ │ │ -00110d70: 6420 6265 2061 2070 6f69 6e74 6572 2074 d be a pointer t │ │ │ │ -00110d80: 6f20 7370 6563 6966 6963 2069 6e66 6f72 o specific infor │ │ │ │ -00110d90: 6d61 7469 6f6e 2073 7563 6820 6173 2061 mation such as a │ │ │ │ -00110da0: 2066 696c 6520 6465 7363 7269 7074 6f72 file descriptor │ │ │ │ -00110db0: 206f 7220 6120 706f 696e 7465 7220 746f or a pointer to │ │ │ │ -00110dc0: 2061 2073 6f6d 6520 6170 706c 6963 6174 a some applicat │ │ │ │ -00110dd0: 696f 6e2d 7370 6563 6966 6963 2064 6174 ion-specific dat │ │ │ │ -00110de0: 6120 746f 2062 6520 7061 7373 6564 2074 a to be passed t │ │ │ │ -00110df0: 6f20 7468 6973 2063 616c 6c62 6163 6b2e o this callback. │ │ │ │ -00110e00: 2042 6f74 6820 7468 6520 3c63 6f64 653e Both the │ │ │ │ -00110e10: 5f5f 7074 723c 2f63 6f64 653e 2061 6e64 __ptr and │ │ │ │ -00110e20: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size members of │ │ │ │ -00110e40: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s │ │ │ │ -00110e50: 7472 7563 742f 636c 6173 7320 7368 6f75 truct/class shou │ │ │ │ -00110e60: 6c64 2068 6176 6520 6265 656e 2073 6574 ld have been set │ │ │ │ -00110e70: 2062 7920 7468 6520 6170 706c 6963 6174 by the applicat │ │ │ │ -00110e80: 696f 6e20 7072 696f 7220 746f 2074 6865 ion prior to the │ │ │ │ -00110e90: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o │ │ │ │ -00110ea0: 6620 7468 6520 6d65 7373 6167 6520 7769 f the message wi │ │ │ │ -00110eb0: 7468 2061 7474 6163 686d 656e 7473 2e20 th attachments. │ │ │ │ -00110ec0: 4966 2074 6865 203c 636f 6465 3e5f 5f73 If the __s │ │ │ │ -00110ed0: 697a 653c 2f63 6f64 653e 2069 7320 7a65 ize is ze │ │ │ │ -00110ee0: 726f 2061 6e64 2048 5454 5020 6368 756e ro and HTTP chun │ │ │ │ -00110ef0: 6b69 6e67 2069 7320 656e 6162 6c65 6420 king is enabled │ │ │ │ -00110f00: 2877 6974 6820 3c63 6f64 653e 2353 4f41 (with #SOA │ │ │ │ -00110f10: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK), then chunked │ │ │ │ -00110f30: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ -00110f40: 7320 6172 6520 7365 6e74 2c20 7365 6520 s are sent, see │ │ │ │ -00110f50: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fdim │ │ │ │ -00110ff0: 6572 6561 643c 2f61 3e3c 2f63 6f64 653e eread │ │ │ │ -00111000: 2e20 5468 6520 3c63 6f64 653e 6964 3c2f . The id, typ │ │ │ │ -00111020: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and options parameters are │ │ │ │ -00111050: 2074 6865 203c 636f 6465 3e69 643c 2f63 the id (optional I │ │ │ │ -00111070: 4429 2c20 3c63 6f64 653e 7479 7065 3c2f D), type (a MIME ty │ │ │ │ -00111090: 7065 2920 616e 6420 3c63 6f64 653e 6f70 pe) and op │ │ │ │ -001110a0: 7469 6f6e 733c 2f63 6f64 653e 2028 4449 tions (DI │ │ │ │ -001110b0: 4d45 206f 7074 696f 6e73 2061 7265 2073 ME options are s │ │ │ │ -001110c0: 6574 2077 6974 6820 3c63 6f64 653e 3c61 et with soa │ │ │ │ -00111140: 705f 6469 6d65 5f6f 7074 696f 6e3c 2f61 p_dime_option) of the │ │ │ │ -00111160: 2061 7474 6163 686d 656e 7420 7374 7275 attachment stru │ │ │ │ -00111170: 6374 2f63 6c61 7373 2c20 7265 7370 6563 ct/class, respec │ │ │ │ -00111180: 7469 7665 6c79 2c20 6f66 2077 6869 6368 tively, of which │ │ │ │ -00111190: 2061 7420 6c65 6173 7420 6f6e 6520 6d65 at least one me │ │ │ │ -001111a0: 6d62 6572 2073 686f 756c 6420 6265 206e mber should be n │ │ │ │ -001111b0: 6f6e 2d4e 554c 4c2e 2054 6865 2063 616c on-NULL. The cal │ │ │ │ -001111c0: 6c62 6163 6b20 7368 6f75 6c64 2072 6574 lback should ret │ │ │ │ -001111d0: 7572 6e20 7468 6520 3c63 6f64 653e 6861 urn the ha │ │ │ │ -001111e0: 6e64 6c65 3c2f 636f 6465 3e20 7061 7261 ndle para │ │ │ │ -001111f0: 6d65 7465 7220 7661 6c75 6520 6f72 2061 meter value or a │ │ │ │ -00111200: 6e6f 7468 6572 2070 6f69 6e74 6572 2076 nother pointer v │ │ │ │ -00111210: 616c 7565 2c20 7768 6963 6820 6973 2070 alue, which is p │ │ │ │ -00111220: 6173 7365 6420 6173 2074 6865 206e 6577 assed as the new │ │ │ │ -00111230: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter t │ │ │ │ -00111250: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::fd │ │ │ │ -001112f0: 696d 6572 6561 643c 2f61 3e3c 2f63 6f64 imeread and soap::fdimer │ │ │ │ -001113b0: 6561 6463 6c6f 7365 3c2f 613e 3c2f 636f eadclose callbacks. W │ │ │ │ -001113d0: 6865 6e20 616e 2065 7272 6f72 206f 6363 hen an error occ │ │ │ │ -001113e0: 7572 7265 6420 696e 2074 6869 7320 6361 urred in this ca │ │ │ │ -001113f0: 6c6c 6261 636b 2c20 7468 6520 6361 6c6c llback, the call │ │ │ │ -00111400: 6261 636b 2073 686f 756c 6420 7265 7475 back should retu │ │ │ │ -00111410: 726e 204e 554c 4c20 616e 6420 7365 7420 rn NULL and set │ │ │ │ -00111420: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap │ │ │ │ -001114d0: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error to an error c │ │ │ │ -001114f0: 6f64 652c 2065 2e67 2e20 7573 696e 6720 ode, e.g. using │ │ │ │ -00111500: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_recei │ │ │ │ -001115b0: 7665 725f 6661 756c 743c 2f61 3e3c 2f63 ver_fault. The callba │ │ │ │ -001115d0: 636b 206d 6179 2072 6574 7572 6e20 4e55 ck may return NU │ │ │ │ -001115e0: 4c4c 2061 6e64 2073 6574 203c 636f 6465 LL and set soap::err │ │ │ │ -001116a0: 6f72 3c2f 613e 3c2f 636f 6465 3e20 746f or to │ │ │ │ -001116b0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK< │ │ │ │ -001116c0: 2f63 6f64 653e 2077 6865 6e20 7468 6973 /code> when this │ │ │ │ -001116d0: 2073 7065 6369 6669 6320 4449 4d45 2061 specific DIME a │ │ │ │ -001116e0: 7474 6163 686d 656e 7420 7368 6f75 6c64 ttachment should │ │ │ │ -001116f0: 206e 6f74 2074 6f20 6265 2073 7472 6561 not to be strea │ │ │ │ -00111700: 6d65 6420 616e 6420 7468 6520 656e 6769 med and the engi │ │ │ │ -00111710: 6e65 2077 696c 6c20 7369 6d70 6c79 2073 ne will simply s │ │ │ │ -00111720: 6b69 7020 6974 2e3c 2f6c 693e 0a3c 6c69 kip it.
    • .
    • size_t (* │ │ │ │ -00111740: 736f 6170 2e66 6469 6d65 7265 6164 2928 soap.fdimeread)( │ │ │ │ -00111750: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ -00111760: 702c 2076 6f69 6420 2a68 616e 646c 652c p, void *handle, │ │ │ │ -00111770: 2063 6861 7220 2a62 7566 2c20 7369 7a65 char *buf, size │ │ │ │ -00111780: 5f74 206c 656e 293c 2f63 6f64 653e 2054 _t len) T │ │ │ │ -00111790: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is │ │ │ │ -001117a0: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en │ │ │ │ -001117b0: 6769 6e65 2074 6f20 7265 6164 2061 2063 gine to read a c │ │ │ │ -001117c0: 6875 6e6b 206f 6620 6174 7461 6368 6d65 hunk of attachme │ │ │ │ -001117d0: 6e74 2064 6174 6120 746f 2074 7261 6e73 nt data to trans │ │ │ │ -001117e0: 6d69 742e 2054 6865 203c 636f 6465 3e68 mit. The h │ │ │ │ -001117f0: 616e 646c 653c 2f63 6f64 653e 2070 6172 andle par │ │ │ │ -00111800: 616d 6574 6572 2063 6f6e 7461 696e 7320 ameter contains │ │ │ │ -00111810: 7468 6520 6861 6e64 6c65 2072 6574 7572 the handle retur │ │ │ │ -00111820: 6e65 6420 6279 2074 6865 203c 636f 6465 ned by the soap::fd │ │ │ │ -001118d0: 696d 6572 6561 646f 7065 6e3c 2f61 3e3c imereadopen< │ │ │ │ -001118e0: 2f63 6f64 653e 2063 616c 6c62 6163 6b2e /code> callback. │ │ │ │ -001118f0: 2054 6865 203c 636f 6465 3e62 7566 3c2f The buf parameter │ │ │ │ -00111910: 6973 2074 6865 2062 7566 6665 7220 6f66 is the buffer of │ │ │ │ -00111920: 206c 656e 6774 6820 3c63 6f64 653e 6c65 length le │ │ │ │ -00111930: 6e3c 2f63 6f64 653e 2069 6e74 6f20 7768 n into wh │ │ │ │ -00111940: 6963 6820 6120 6368 756e 6b20 6f66 2064 ich a chunk of d │ │ │ │ -00111950: 6174 6120 7368 6f75 6c64 2062 6520 7772 ata should be wr │ │ │ │ -00111960: 6974 7465 6e20 6279 2074 6865 2063 616c itten by the cal │ │ │ │ -00111970: 6c62 6163 6b2e 2054 6865 2061 6374 7561 lback. The actua │ │ │ │ -00111980: 6c20 616d 6f75 6e74 206f 6620 6461 7461 l amount of data │ │ │ │ -00111990: 2077 7269 7474 656e 2069 6e74 6f20 7468 written into th │ │ │ │ -001119a0: 6520 6275 6666 6572 206d 6179 2062 6520 e buffer may be │ │ │ │ -001119b0: 6c65 7373 2074 6861 6e20 3c63 6f64 653e less than │ │ │ │ -001119c0: 6c65 6e3c 2f63 6f64 653e 2061 6e64 2074 len and t │ │ │ │ -001119d0: 6869 7320 6163 7475 616c 2061 6d6f 756e his actual amoun │ │ │ │ -001119e0: 7420 7368 6f75 6c64 2062 6520 7265 7475 t should be retu │ │ │ │ -001119f0: 726e 6564 2062 7920 7468 6520 6361 6c6c rned by the call │ │ │ │ -00111a00: 6261 636b 2e20 4120 7265 7475 726e 2076 back. A return v │ │ │ │ -00111a10: 616c 7565 206f 6620 7a65 726f 2069 6e64 alue of zero ind │ │ │ │ -00111a20: 6963 6174 6573 2061 6e20 6572 726f 7220 icates an error │ │ │ │ -00111a30: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and │ │ │ │ -00111ae0: 736f 6170 3a3a 6572 726f 723c 2f61 3e3c soap::error< │ │ │ │ -00111af0: 2f63 6f64 653e 2073 686f 756c 6420 6265 /code> should be │ │ │ │ -00111b00: 2073 6574 2e20 5468 6520 3c63 6f64 653e set. The │ │ │ │ -00111b10: 5f5f 7369 7a65 3c2f 636f 6465 3e20 6d65 __size me │ │ │ │ -00111b20: 6d62 6572 2076 6172 6961 626c 6520 6f66 mber variable of │ │ │ │ -00111b30: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment │ │ │ │ -00111b40: 7374 7275 6374 2f63 6c61 7373 2077 6974 struct/class wit │ │ │ │ -00111b50: 6820 6461 7461 2028 652e 672e 203c 636f h data (e.g. xsd__base64Bina │ │ │ │ -00111be0: 7279 3c2f 613e 3c2f 636f 6465 3e20 6f72 ry or │ │ │ │ -00111bf0: 203c 636f 6465 3e3c 6120 636c 6173 733d _xo │ │ │ │ -00111c60: 705f 5f49 6e63 6c75 6465 3c2f 613e 3c2f p__Include with __ptr, < │ │ │ │ -00111c90: 636f 6465 3e5f 5f73 697a 653c 2f63 6f64 code>__size, id, type< │ │ │ │ -00111cc0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and options │ │ │ │ -00111ce0: 6d65 6d62 6572 7329 2073 686f 756c 6420 members) should │ │ │ │ -00111cf0: 6265 2073 6574 2062 7920 7468 6520 6170 be set by the ap │ │ │ │ -00111d00: 706c 6963 6174 696f 6e20 7072 696f 7220 plication prior │ │ │ │ -00111d10: 746f 2074 6865 2073 6572 6961 6c69 7a61 to the serializa │ │ │ │ -00111d20: 7469 6f6e 206f 6620 7468 6520 6d65 7373 tion of the mess │ │ │ │ -00111d30: 6167 6520 7769 7468 2061 7474 6163 686d age with attachm │ │ │ │ -00111d40: 656e 7473 2e20 5468 6520 7661 6c75 6520 ents. The value │ │ │ │ -00111d50: 6f66 203c 636f 6465 3e5f 5f73 697a 653c of __size< │ │ │ │ -00111d60: 2f63 6f64 653e 2069 6e64 6963 6174 6573 /code> indicates │ │ │ │ -00111d70: 2074 6865 2074 6f74 616c 2073 697a 6520 the total size │ │ │ │ -00111d80: 6f66 2074 6865 2061 7474 6163 686d 656e of the attachmen │ │ │ │ -00111d90: 7420 6461 7461 2074 6f20 6265 2074 7261 t data to be tra │ │ │ │ -00111da0: 6e73 6d69 7474 6564 2e20 4966 2074 6865 nsmitted. If the │ │ │ │ -00111db0: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member vari │ │ │ │ -00111dd0: 6162 6c65 2069 7320 7a65 726f 2061 6e64 able is zero and │ │ │ │ -00111de0: 2048 5454 5020 6368 756e 6b69 6e67 2069 HTTP chunking i │ │ │ │ -00111df0: 7320 656e 6162 6c65 6420 2877 6974 6820 s enabled (with │ │ │ │ -00111e00: 3c63 6f64 653e 2353 4f41 505f 494f 5f43 #SOAP_IO_C │ │ │ │ -00111e10: 4855 4e4b 3c2f 636f 6465 3e29 2c20 7468 HUNK), th │ │ │ │ -00111e20: 656e 2044 494d 4520 6368 756e 6b65 6420 en DIME chunked │ │ │ │ -00111e30: 7472 616e 7366 6572 7320 6172 6520 6163 transfers are ac │ │ │ │ -00111e40: 7469 7661 7465 6420 6279 2074 6865 2065 tivated by the e │ │ │ │ -00111e50: 6e67 696e 652c 2077 6869 6368 2069 7320 ngine, which is │ │ │ │ -00111e60: 6d6f 7265 2066 6c65 7869 626c 6520 7369 more flexible si │ │ │ │ -00111e70: 6e63 6520 7468 6520 6174 7461 6368 6d65 nce the attachme │ │ │ │ -00111e80: 6e74 2064 6174 6120 7369 7a65 2064 6f65 nt data size doe │ │ │ │ -00111e90: 7320 6e6f 7420 6e65 6564 2074 6f20 6265 s not need to be │ │ │ │ -00111ea0: 2064 6574 6572 6d69 6e65 6420 696e 2061 determined in a │ │ │ │ -00111eb0: 6476 616e 6365 2e20 546f 2075 7365 2044 dvance. To use D │ │ │ │ -00111ec0: 494d 4520 6368 756e 6b65 6420 7472 616e IME chunked tran │ │ │ │ -00111ed0: 7366 6572 732c 2065 6e61 626c 6520 4854 sfers, enable HT │ │ │ │ -00111ee0: 5450 2063 6875 6e6b 696e 6720 7769 7468 TP chunking with │ │ │ │ -00111ef0: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_ │ │ │ │ -00111f00: 4348 554e 4b3c 2f63 6f64 653e 2028 616c CHUNK (al │ │ │ │ -00111f10: 736f 203c 636f 6465 3e23 534f 4150 5f49 so #SOAP_I │ │ │ │ -00111f20: 4f5f 5354 4f52 453c 2f63 6f64 653e 2063 O_STORE c │ │ │ │ -00111f30: 616e 2062 6520 7573 6564 2c20 6275 7420 an be used, but │ │ │ │ -00111f40: 7468 6973 2062 7566 6665 7273 2074 6865 this buffers the │ │ │ │ -00111f50: 2065 6e74 6972 6520 6d65 7373 6167 6520 entire message │ │ │ │ -00111f60: 696e 206d 656d 6f72 7920 6265 666f 7265 in memory before │ │ │ │ -00111f70: 2074 7261 6e73 6d69 7373 696f 6e29 2061 transmission) a │ │ │ │ -00111f80: 6e64 2073 6574 2074 6865 203c 636f 6465 nd set the __size m │ │ │ │ -00111fa0: 656d 6265 7220 7661 7269 6162 6c65 206f ember variable o │ │ │ │ -00111fb0: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment │ │ │ │ -00111fc0: 2073 7472 7563 742f 636c 6173 7320 746f struct/class to │ │ │ │ -00111fd0: 207a 6572 6f2e 2057 6865 6e20 4449 4d45 zero. When DIME │ │ │ │ -00111fe0: 2061 7474 6163 686d 656e 7420 6368 756e attachment chun │ │ │ │ -00111ff0: 6b69 6e67 2069 7320 656e 6162 6c65 642c king is enabled, │ │ │ │ -00112000: 2074 6869 7320 6361 6c6c 6261 636b 2073 this callback s │ │ │ │ -00112010: 686f 756c 6420 636f 6d70 6c65 7465 6c79 hould completely │ │ │ │ -00112020: 2066 696c 6c20 7468 6520 3c63 6f64 653e fill the │ │ │ │ -00112030: 6275 663c 2f63 6f64 653e 2062 7566 6665 buf buffe │ │ │ │ -00112040: 7220 7769 7468 203c 636f 6465 3e6c 656e r with len │ │ │ │ -00112050: 3c2f 636f 6465 3e20 6279 7465 7320 756e bytes un │ │ │ │ -00112060: 6c65 7373 2074 6865 206c 6173 7420 6461 less the last da │ │ │ │ -00112070: 7461 2063 6875 6e6b 2069 7320 7265 6163 ta chunk is reac │ │ │ │ -00112080: 6865 6420 616e 6420 6665 7765 7220 6279 hed and fewer by │ │ │ │ -00112090: 7465 7320 6172 6520 7265 7475 726e 6564 tes are returned │ │ │ │ -001120a0: 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f 6465 .
    • .
    • void (*soap.fdi │ │ │ │ -001120c0: 6d65 7265 6164 636c 6f73 6529 2873 7472 mereadclose)(str │ │ │ │ -001120d0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ -001120e0: 766f 6964 202a 6861 6e64 6c65 293c 2f63 void *handle) This callba │ │ │ │ -00112100: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ -00112110: 7468 6520 656e 6769 6e65 2074 6f20 636c the engine to cl │ │ │ │ -00112120: 6f73 6520 7468 6520 4449 4d45 2061 7474 ose the DIME att │ │ │ │ -00112130: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a │ │ │ │ -00112140: 6674 6572 2072 6561 6469 6e67 2e20 5468 fter reading. Th │ │ │ │ -00112150: 6520 3c63 6f64 653e 6861 6e64 6c65 3c2f e handle parameter │ │ │ │ -00112170: 636f 6e74 6169 6e73 2074 6865 2068 616e contains the han │ │ │ │ -00112180: 646c 6520 7265 7475 726e 6564 2062 7920 dle returned by │ │ │ │ -00112190: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::fdimeread │ │ │ │ -00112240: 6f70 656e 3c2f 613e 3c2f 636f 6465 3e20 open │ │ │ │ -00112250: 6361 6c6c 6261 636b 2e3c 2f6c 693e 0a3c callback.
    • .< │ │ │ │ -00112260: 6c69 3e3c 636f 6465 3e76 6f69 6420 2a28 li>void *( │ │ │ │ -00112270: 2a73 6f61 702e 6664 696d 6577 7269 7465 *soap.fdimewrite │ │ │ │ -00112280: 6f70 656e 2928 7374 7275 6374 2073 6f61 open)(struct soa │ │ │ │ -00112290: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c │ │ │ │ -001122a0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c │ │ │ │ -001122b0: 6861 7220 2a74 7970 652c 2063 6f6e 7374 har *type, const │ │ │ │ -001122c0: 2063 6861 7220 2a6f 7074 696f 6e73 293c char *options)< │ │ │ │ -001122d0: 2f63 6f64 653e 2043 616c 6c65 6420 6279 /code> Called by │ │ │ │ -001122e0: 2074 6865 2074 6f20 7374 6172 7420 7265 the to start re │ │ │ │ -001122f0: 6365 6976 696e 6720 6120 7374 7265 616d ceiving a stream │ │ │ │ -00112300: 696e 6720 4449 4d45 2061 7474 6163 686d ing DIME attachm │ │ │ │ -00112310: 656e 742e 2054 6869 7320 6361 6c6c 6261 ent. This callba │ │ │ │ -00112320: 636b 206f 7065 6e73 2061 2073 7472 6561 ck opens a strea │ │ │ │ -00112330: 6d20 746f 2073 7461 7274 2077 7269 7469 m to start writi │ │ │ │ -00112340: 6e67 2074 6865 2061 7474 6163 686d 656e ng the attachmen │ │ │ │ -00112350: 7420 6461 7461 2072 6563 6569 7665 642e t data received. │ │ │ │ -00112360: 2054 6865 2061 6374 7561 6c20 6461 7461 The actual data │ │ │ │ -00112370: 2073 7472 6561 6d20 7769 6c6c 2062 6520 stream will be │ │ │ │ -00112380: 7772 6974 7465 6e20 696e 2063 6875 6e6b written in chunk │ │ │ │ -00112390: 7320 7573 696e 6720 7468 6520 3c63 6f64 s using the soap::fdimewr │ │ │ │ -00112440: 6974 653c 2f61 3e3c 2f63 6f64 653e 2063 ite c │ │ │ │ -00112450: 616c 6c62 6163 6b20 756e 7469 6c20 6e6f allback until no │ │ │ │ -00112460: 206d 6f72 6520 6461 7461 2069 7320 6176 more data is av │ │ │ │ -00112470: 6169 6c61 626c 6520 616e 6420 7468 6520 ailable and the │ │ │ │ -00112480: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa │ │ │ │ -00112520: 703a 3a66 6469 6d65 7772 6974 6563 6c6f p::fdimewriteclo │ │ │ │ -00112530: 7365 3c2f 613e 3c2f 636f 6465 3e20 6361 se ca │ │ │ │ -00112540: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called │ │ │ │ -00112550: 2074 6f20 636c 6f73 6520 7468 6520 7374 to close the st │ │ │ │ -00112560: 7265 616d 2e20 5468 6520 3c63 6f64 653e ream. The │ │ │ │ -00112570: 6964 3c2f 636f 6465 3e2c 203c 636f 6465 id, type and │ │ │ │ -00112590: 203c 636f 6465 3e6f 7074 696f 6e73 3c2f options parameters │ │ │ │ -001125b0: 2061 7265 2074 6865 203c 636f 6465 3e69 are the i │ │ │ │ -001125c0: 643c 2f63 6f64 653e 2c20 3c63 6f64 653e d, │ │ │ │ -001125d0: 7479 7065 3c2f 636f 6465 3e20 616e 6420 type and │ │ │ │ -001125e0: 3c63 6f64 653e 6f70 7469 6f6e 733c 2f63 options of the atta │ │ │ │ -00112600: 6368 6d65 6e74 2073 7472 7563 742f 636c chment struct/cl │ │ │ │ -00112610: 6173 7320 2865 2e67 2e20 3c63 6f64 653e ass (e.g. │ │ │ │ -00112620: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs │ │ │ │ -00112690: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary< │ │ │ │ -001126a0: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or _xop__ │ │ │ │ -00112720: 496e 636c 7564 653c 2f61 3e3c 2f63 6f64 Include with __ │ │ │ │ -00112740: 7074 723c 2f63 6f64 653e 2c20 3c63 6f64 ptr, __size, │ │ │ │ -00112760: 203c 636f 6465 3e69 643c 2f63 6f64 653e id │ │ │ │ -00112770: 2c20 3c63 6f64 653e 7479 7065 3c2f 636f , type and op │ │ │ │ -00112790: 7469 6f6e 733c 2f63 6f64 653e 206d 656d tions mem │ │ │ │ -001127a0: 6265 7273 292c 2072 6573 7065 6374 6976 bers), respectiv │ │ │ │ -001127b0: 656c 792e 2054 6865 2063 616c 6c62 6163 ely. The callbac │ │ │ │ -001127c0: 6b20 7368 6f75 6c64 2072 6574 7572 6e20 k should return │ │ │ │ -001127d0: 6120 6861 6e64 6c65 2c20 7768 6963 6820 a handle, which │ │ │ │ -001127e0: 6973 2070 6173 7365 6420 746f 2074 6865 is passed to the │ │ │ │ -001127f0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fd │ │ │ │ -00112890: 696d 6577 7269 7465 3c2f 613e 3c2f 636f imewrite and soap::fdime │ │ │ │ -00112950: 7772 6974 6563 6c6f 7365 3c2f 613e 3c2f writeclose callbacks. │ │ │ │ -00112970: 2054 6865 203c 636f 6465 3e5f 5f70 7472 The __ptr │ │ │ │ -00112980: 3c2f 636f 6465 3e20 6d65 6d62 6572 2076 member v │ │ │ │ -00112990: 6172 6961 626c 6520 6f66 2074 6865 2061 ariable of the a │ │ │ │ -001129a0: 7474 6163 686d 656e 7420 7374 7275 6374 ttachment struct │ │ │ │ -001129b0: 2f63 6c61 7373 2069 7320 7365 7420 6279 /class is set by │ │ │ │ -001129c0: 2074 6865 2065 6e67 696e 6520 746f 2074 the engine to t │ │ │ │ -001129d0: 6865 2076 616c 7565 206f 6620 7468 6973 he value of this │ │ │ │ -001129e0: 2068 616e 646c 652e 2054 6865 203c 636f handle. The __size │ │ │ │ -00112a00: 206d 656d 6265 7220 7661 7269 6162 6c65 member variable │ │ │ │ -00112a10: 2069 7320 7365 7420 746f 2074 6865 2073 is set to the s │ │ │ │ -00112a20: 697a 6520 6f66 2074 6865 2061 7474 6163 ize of the attac │ │ │ │ -00112a30: 686d 656e 7420 7265 6365 6976 6564 2e20 hment received. │ │ │ │ -00112a40: 5468 6520 6d61 7869 6d75 6d20 4449 4d45 The maximum DIME │ │ │ │ -00112a50: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size │ │ │ │ -00112a60: 2072 6563 6569 7665 6420 6973 206c 696d received is lim │ │ │ │ -00112a70: 6974 6564 2062 7920 3c63 6f64 653e 2353 ited by #S │ │ │ │ -00112a80: 4f41 505f 4d41 5844 494d 4553 495a 453c OAP_MAXDIMESIZE< │ │ │ │ -00112a90: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>..
    • int (*soa │ │ │ │ -00112ab0: 702e 6664 696d 6577 7269 7465 2928 7374 p.fdimewrite)(st │ │ │ │ -00112ac0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ -00112ad0: 2076 6f69 6420 2a68 616e 646c 652c 2063 void *handle, c │ │ │ │ -00112ae0: 6f6e 7374 2063 6861 7220 2a62 7566 2c20 onst char *buf, │ │ │ │ -00112af0: 7369 7a65 5f74 206c 656e 293c 2f63 6f64 size_t len) This callback │ │ │ │ -00112b10: 2069 7320 6361 6c6c 6564 2062 7920 7468 is called by th │ │ │ │ -00112b20: 6520 656e 6769 6e65 2074 6f20 7772 6974 e engine to writ │ │ │ │ -00112b30: 6520 6120 6368 756e 6b20 6f66 2061 7474 e a chunk of att │ │ │ │ -00112b40: 6163 686d 656e 7420 6461 7461 2072 6563 achment data rec │ │ │ │ -00112b50: 6569 7665 642e 2054 6865 203c 636f 6465 eived. The handle p │ │ │ │ -00112b70: 6172 616d 6574 6572 2063 6f6e 7461 696e arameter contain │ │ │ │ -00112b80: 7320 7468 6520 6861 6e64 6c65 2072 6574 s the handle ret │ │ │ │ -00112b90: 7572 6e65 6420 6279 2074 6865 203c 636f urned by the soap:: │ │ │ │ -00112c40: 6664 696d 6577 7269 7465 6f70 656e 3c2f fdimewriteopen callba │ │ │ │ -00112c60: 636b 2e20 5468 6520 3c63 6f64 653e 6275 ck. The bu │ │ │ │ -00112c70: 663c 2f63 6f64 653e 2070 6172 616d 6574 f paramet │ │ │ │ -00112c80: 6572 2063 6f6e 7461 696e 7320 7468 6520 er contains the │ │ │ │ -00112c90: 6461 7461 206f 6620 6c65 6e67 7468 203c data of length < │ │ │ │ -00112ca0: 636f 6465 3e6c 656e 3c2f 636f 6465 3e2e code>len. │ │ │ │ -00112cb0: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns # │ │ │ │ -00112cc0: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o │ │ │ │ -00112cd0: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_ │ │ │ │ -00112d90: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co │ │ │ │ -00112db0: 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f de.
    • .
    • void (*soap.f │ │ │ │ -00112dd0: 6469 6d65 7772 6974 6563 6c6f 7365 2928 dimewriteclose)( │ │ │ │ -00112de0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ -00112df0: 702c 2076 6f69 6420 2a68 616e 646c 6529 p, void *handle) │ │ │ │ -00112e00: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal │ │ │ │ -00112e10: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ -00112e20: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to │ │ │ │ -00112e30: 2063 6c6f 7365 2074 6865 2044 494d 4520 close the DIME │ │ │ │ -00112e40: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea │ │ │ │ -00112e50: 6d20 6166 7465 7220 7772 6974 696e 672e m after writing. │ │ │ │ -00112e60: 2054 6865 203c 636f 6465 3e68 616e 646c The handl │ │ │ │ -00112e70: 653c 2f63 6f64 653e 2070 6172 616d 6574 e paramet │ │ │ │ -00112e80: 6572 2063 6f6e 7461 696e 7320 7468 6520 er contains the │ │ │ │ -00112e90: 6861 6e64 6c65 2072 6574 7572 6e65 6420 handle returned │ │ │ │ -00112ea0: 6279 2074 6865 203c 636f 6465 3e3c 6120 by the soap::fdimew │ │ │ │ -00112f50: 7269 7465 6f70 656e 3c2f 613e 3c2f 636f riteopen callback..
    .

    In a │ │ │ │ -00112f80: 6464 6974 696f 6e2c 2061 203c 636f 6465 ddition, a void* s │ │ │ │ -00113050: 6f61 703a 3a75 7365 723c 2f61 3e3c 2f63 oap::user member is a │ │ │ │ -00113070: 7661 696c 6162 6c65 2074 6f20 7061 7373 vailable to pass │ │ │ │ -00113080: 2075 7365 722d 6465 6669 6e65 6420 6461 user-defined da │ │ │ │ -00113090: 7461 2074 6f20 7468 6520 6361 6c6c 6261 ta to the callba │ │ │ │ -001130a0: 636b 732e 2054 6869 7320 7761 792c 2079 cks. This way, y │ │ │ │ -001130b0: 6f75 2063 616e 2073 6574 203c 636f 6465 ou can set void* s │ │ │ │ -00113180: 6f61 703a 3a75 7365 723c 2f61 3e3c 2f63 oap::user to point to │ │ │ │ -001131a0: 2061 7070 6c69 6361 7469 6f6e 2064 6174 application dat │ │ │ │ -001131b0: 6120 7468 6174 2074 6865 2063 616c 6c62 a that the callb │ │ │ │ -001131c0: 6163 6b73 206e 6565 6420 7375 6368 2061 acks need such a │ │ │ │ -001131d0: 7320 6120 6669 6c65 206e 616d 6520 666f s a file name fo │ │ │ │ -001131e0: 7220 6578 616d 706c 652e 3c2f 703e 0a3c r example.

    .< │ │ │ │ -001131f0: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following │ │ │ │ -00113200: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra │ │ │ │ -00113210: 7465 7320 7468 6520 636c 6965 6e74 2d73 tes the client-s │ │ │ │ -00113220: 6964 6520 696e 6974 6961 6c69 7a61 7469 ide initializati │ │ │ │ -00113230: 6f6e 206f 6620 616e 2069 6d61 6765 2061 on of an image a │ │ │ │ -00113240: 7474 6163 686d 656e 7420 7374 7275 6374 ttachment struct │ │ │ │ -00113250: 2074 6f20 7374 7265 616d 2061 2066 696c to stream a fil │ │ │ │ -00113260: 6520 696e 746f 2061 2044 494d 4520 6174 e into a DIME at │ │ │ │ -00113270: 7461 6368 6d65 6e74 3a3c 2f70 3e0a 3c64 tachment:

    .
    │ │ │ │ -001132c0: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main( │ │ │ │ -001132d0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str │ │ │ │ -00113320: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    str │ │ │ │ -001133c0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct xsd__base64Bin │ │ │ │ -00113410: 6172 793c 2f61 3e20 696d 6167 653b 203c ary image; < │ │ │ │ -00113420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    FILE * │ │ │ │ -00113440: 6664 3b20 3c2f 6469 763e 0a3c 6469 7620 fd;
    .
    < │ │ │ │ -00113460: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00113470: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct stat sb; .
    soap │ │ │ │ -00113500: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&< │ │ │ │ -00113510: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00113520: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00113530: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ -00113540: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if │ │ │ │ -00113580: 2821 6673 7461 7428 6669 6c65 6e6f 2866 (!fstat(fileno(f │ │ │ │ -00113590: 6429 2c20 2661 6d70 3b73 6229 2026 616d d), &sb) &am │ │ │ │ -001135a0: 703b 2661 6d70 3b20 7362 2e73 745f 7369 p;& sb.st_si │ │ │ │ -001135b0: 7a65 2026 6774 3b20 3029 203c 2f64 6976 ze > 0)
    .
    {
    . │ │ │ │ -001135f0: 2020 2020 3c73 7061 6e20 636c 6173 733d // bec │ │ │ │ -00113610: 6175 7365 2077 6520 6361 6e20 6765 7420 ause we can get │ │ │ │ -00113620: 7468 6520 6c65 6e67 7468 206f 6620 7468 the length of th │ │ │ │ -00113630: 6520 6669 6c65 2c20 7765 2063 616e 2073 e file, we can s │ │ │ │ -00113640: 7472 6561 6d20 6974 203c 2f73 7061 6e3e tream it │ │ │ │ -00113650: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.fdimereadope │ │ │ │ -00113700: 6e3c 2f61 3e20 3d20 6469 6d65 5f72 6561 n = dime_rea │ │ │ │ -00113710: 645f 6f70 656e 3b20 3c2f 6469 763e 0a3c d_open;
    .< │ │ │ │ -00113720: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00113730: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap │ │ │ │ -00113760: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fdim │ │ │ │ -001137c0: 6572 6561 6463 6c6f 7365 3c2f 613e 203d ereadclose = │ │ │ │ -001137d0: 2064 696d 655f 7265 6164 5f63 6c6f 7365 dime_read_close │ │ │ │ -001137e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ -00113800: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00113810: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00113820: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ -00113830: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00113840: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00113850: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm │ │ │ │ -00113860: 6c23 6761 3438 3237 3061 6439 3839 3631 l#ga48270ad98961 │ │ │ │ -00113870: 6333 6666 3438 6337 6235 3634 3834 6562 c3ff48c7b56484eb │ │ │ │ -00113880: 6233 6661 223e 6664 696d 6572 6561 643c b3fa">fdimeread< │ │ │ │ -00113890: 2f61 3e20 3d20 6469 6d65 5f72 6561 643b /a> = dime_read; │ │ │ │ -001138a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    im │ │ │ │ -001138c0: 6167 652e 5f5f 7074 7220 3d20 283c 7370 age.__ptr = (unsigned< │ │ │ │ -001138f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char*)fd │ │ │ │ -00113920: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // must │ │ │ │ -00113940: 7365 7420 746f 206e 6f6e 2d4e 554c 4c20 set to non-NULL │ │ │ │ -00113950: 2874 6869 7320 6973 206f 7572 2066 6420 (this is our fd │ │ │ │ -00113960: 6861 6e64 6c65 2077 6869 6368 2077 6520 handle which we │ │ │ │ -00113970: 6e65 6564 2069 6e20 7468 6520 6361 6c6c need in the call │ │ │ │ -00113980: 6261 636b 7329 203c 2f73 7061 6e3e 3c2f backs) .
    image │ │ │ │ -001139b0: 2e5f 5f73 697a 6520 3d20 7362 2e73 745f .__size = sb.st_ │ │ │ │ -001139c0: 7369 7a65 3b20 3c73 7061 6e20 636c 6173 size; // m │ │ │ │ -001139e0: 7573 7420 7365 7420 7369 7a65 203c 2f73 ust set size
    .
    } │ │ │ │ -00113a10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    else
    .
    {.
    // don't kn │ │ │ │ -00113ab0: 6f77 2074 6865 2073 697a 652c 2073 6f20 ow the size, so │ │ │ │ -00113ac0: 6275 6666 6572 2069 7420 3c2f 7370 616e buffer it
    .
    size_t i;
    . │ │ │ │ -00113b20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -00113b50: 696e 743c 2f73 7061 6e3e 2063 3b20 3c2f int c; .
    image │ │ │ │ -00113b80: 2e5f 5f70 7472 203d 2028 3c73 7061 6e20 .__ptr = (unsigned ch │ │ │ │ -00113bd0: 6172 3c2f 7370 616e 3e2a 293c 6120 636c ar*) │ │ │ │ -00113c30: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e28 soap_malloc( │ │ │ │ -00113c40: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ -00113c70: 3c2f 613e 2c20 4d41 585f 4649 4c45 5f53 , MAX_FILE_S │ │ │ │ -00113c80: 495a 4529 3b20 3c2f 6469 763e 0a3c 6469 IZE);
    . │ │ │ │ -00113ca0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for │ │ │ │ -00113cc0: 3c2f 7370 616e 3e20 2869 203d 2030 3b20 (i = 0; │ │ │ │ -00113cd0: 6920 266c 743b 204d 4158 5f46 494c 455f i < MAX_FILE_ │ │ │ │ -00113ce0: 5349 5a45 3b20 692b 2b29 203c 2f64 6976 SIZE; i++)
    .
    {
    . │ │ │ │ -00113d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if ((c │ │ │ │ -00113d50: 3d20 6667 6574 6328 6664 2929 203d 3d20 = fgetc(fd)) == │ │ │ │ -00113d60: 454f 4629 203c 2f64 6976 3e0a 3c64 6976 EOF)
    .
    │ │ │ │ -00113d80: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -00113da0: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c2f break; .
    ima │ │ │ │ -00113dd0: 6765 2e5f 5f70 7472 5b69 5d20 3d20 633b ge.__ptr[i] = c; │ │ │ │ -00113de0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } │ │ │ │ -00113e00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fcl │ │ │ │ -00113e20: 6f73 6528 6664 293b 203c 2f64 6976 3e0a ose(fd);
    . │ │ │ │ -00113e30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    image.__si │ │ │ │ -00113e50: 7a65 203d 2069 3b20 3c2f 6469 763e 0a3c ze = i;
    .< │ │ │ │ -00113e60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00113e70: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ -00113e90: 696d 6167 652e 7479 7065 203d 203c 7370 image.type = "i │ │ │ │ -00113ec0: 6d61 6765 2f6a 7065 6726 7175 6f74 3b3c mage/jpeg"< │ │ │ │ -00113ed0: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .< │ │ │ │ -00113ee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00113ef0: 3e20 2069 6d61 6765 2e6f 7074 696f 6e73 > image.options │ │ │ │ -00113f00: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_dime_o │ │ │ │ -00113f60: 7074 696f 6e3c 2f61 3e28 2661 6d70 3b3c ption(&< │ │ │ │ -00113f70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00113f80: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00113f90: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -00113fa0: 302c 203c 7370 616e 2063 6c61 7373 3d22 0, & │ │ │ │ -00113fc0: 7175 6f74 3b4d 7920 7069 6374 7572 6526 quot;My picture& │ │ │ │ -00113fd0: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); < │ │ │ │ -00113fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s │ │ │ │ -00114020: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web │ │ │ │ -00114030: 6d65 7468 6f64 2826 616d 703b 3c61 2063 method(&soap, ... │ │ │ │ -00114070: 2929 3c2f 6469 763e 0a3c 6469 7620 636c ))
    .
    . │ │ │ │ -00114090: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro │ │ │ │ -001140b0: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .< │ │ │ │ -001140c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001140d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els │ │ │ │ -001140f0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ -00114100: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00114110: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... / │ │ │ │ -00114130: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success │ │ │ │ -00114140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    unsigned char │ │ │ │ +0010f980: 3c2f 7370 616e 3e20 2a5f 5f70 7472 3b20 *__ptr; │ │ │ │ +0010f990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int __size;
    │ │ │ │ +0010f9e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    char *id │ │ │ │ +0010fa20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ +0010fa40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0010fa50: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *type; .
    char * │ │ │ │ +0010fab0: 6f70 7469 6f6e 733b 203c 2f64 6976 3e0a options;
    . │ │ │ │ +0010fac0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    @ │ │ │ │ +0010faf0: 6368 6172 3c2f 7370 616e 3e20 2a57 5372 char *WSr │ │ │ │ +0010fb00: 6566 5f5f 6c6f 6361 7469 6f6e 3b20 3c2f ef__location; .
    };
    . │ │ │ │ +0010fb30: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ex │ │ │ │ +0010fb50: 616d 706c 6520 6162 6f76 6520 7573 6573 ample above uses │ │ │ │ +0010fb60: 2074 6865 203c 656d 3e3c 636f 6465 3e6c the l │ │ │ │ +0010fb70: 6f63 6174 696f 6e3c 2f63 6f64 653e 3c2f ocation attribute de │ │ │ │ +0010fb90: 6669 6e65 6420 696e 2074 6865 2063 6f6e fined in the con │ │ │ │ +0010fba0: 7465 6e74 2072 6566 6572 656e 6365 2073 tent reference s │ │ │ │ +0010fbb0: 6368 656d 612c 2061 7320 6465 6669 6e65 chema, as define │ │ │ │ +0010fbc0: 6420 696e 206f 6e65 206f 6620 7468 6520 d in one of the │ │ │ │ +0010fbd0: 7665 6e64 6f72 2773 2073 7065 6369 6669 vendor's specifi │ │ │ │ +0010fbe0: 6320 5753 444c 2065 7874 656e 7369 6f6e c WSDL extension │ │ │ │ +0010fbf0: 7320 666f 7220 4449 4d45 203c 6120 6872 s for DIME │ │ │ │ +0010fc50: 6874 7470 3a2f 2f77 7777 2e67 6f74 646f http://www.gotdo │ │ │ │ +0010fc60: 746e 6574 2e63 6f6d 2f74 6561 6d2f 786d tnet.com/team/xm │ │ │ │ +0010fc70: 6c5f 7773 7370 6563 732f 6469 6d65 2f57 l_wsspecs/dime/W │ │ │ │ +0010fc80: 5344 4c2d 4578 7465 6e73 696f 6e2d 666f SDL-Extension-fo │ │ │ │ +0010fc90: 722d 4449 4d45 2e68 746d 3c2f 613e 2e3c r-DIME.htm.< │ │ │ │ +0010fca0: 2f70 3e0a 3c70 3e57 6865 6e20 7265 6365 /p>.

    When rece │ │ │ │ +0010fcb0: 6976 696e 6720 4449 4d45 2061 7474 6163 iving DIME attac │ │ │ │ +0010fcc0: 686d 656e 7473 2c20 7468 6520 4449 4d45 hments, the DIME │ │ │ │ +0010fcd0: 206d 6574 6120 6461 7461 2061 6e64 2062 meta data and b │ │ │ │ +0010fce0: 696e 6172 7920 636f 6e74 656e 7420 6172 inary content ar │ │ │ │ +0010fcf0: 6520 7374 6f72 6564 2069 6e20 7468 6520 e stored in the │ │ │ │ +0010fd00: 7370 6563 6966 6965 6420 3c63 6f64 653e specified │ │ │ │ +0010fd10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 xs │ │ │ │ +0010fd80: 645f 5f62 6173 6536 3442 696e 6172 793c d__base64Binary< │ │ │ │ +0010fd90: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and < │ │ │ │ +0010fda0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>xsd │ │ │ │ +0010fe10: 5f5f 6865 7842 696e 6172 793c 2f61 3e3c __hexBinary< │ │ │ │ +0010fe20: 2f63 6f64 653e 2062 696e 6172 7920 6461 /code> binary da │ │ │ │ +0010fe30: 7461 2074 7970 6573 206f 6e6c 7920 7768 ta types only wh │ │ │ │ +0010fe40: 656e 2074 6865 2058 4d4c 2070 6172 7473 en the XML parts │ │ │ │ +0010fe50: 206f 6620 7468 6520 6d65 7373 6167 6520 of the message │ │ │ │ +0010fe60: 7573 6573 203c 656d 3e3c 636f 6465 3e68 uses h │ │ │ │ +0010fe70: 7265 663c 2f63 6f64 653e 3c2f 656d 3e20 ref │ │ │ │ +0010fe80: 6174 7472 6962 7574 6573 2074 6f20 7265 attributes to re │ │ │ │ +0010fe90: 6665 7220 746f 2074 6865 7365 2061 7474 fer to these att │ │ │ │ +0010fea0: 6163 686d 656e 7473 2e20 4966 2073 6f2c achments. If so, │ │ │ │ +0010feb0: 2074 6865 2062 696e 6172 7920 6461 7461 the binary data │ │ │ │ +0010fec0: 2074 7970 6520 3c63 6f64 653e 5f5f 7074 type __pt │ │ │ │ +0010fed0: 723c 2f63 6f64 653e 2061 6e64 203c 636f r and __size │ │ │ │ +0010fef0: 206d 656d 6265 7273 2061 7265 2073 6574 members are set │ │ │ │ +0010ff00: 2074 6f20 7468 6520 6c6f 6361 7469 6f6e to the location │ │ │ │ +0010ff10: 2069 6e20 6d65 6d6f 7279 206f 6620 7468 in memory of th │ │ │ │ +0010ff20: 6520 6174 7461 6368 6d65 6e74 2064 6174 e attachment dat │ │ │ │ +0010ff30: 6120 616e 6420 6c65 6e67 7468 2c20 7265 a and length, re │ │ │ │ +0010ff40: 7370 6563 7469 7665 6c79 2e3c 2f70 3e0a spectively.

    . │ │ │ │ +0010ff50: 3c70 3e4d 6573 7361 6765 7320 6d61 7920

    Messages may │ │ │ │ +0010ff60: 636f 6e74 6169 6e20 6269 6e61 7279 2064 contain binary d │ │ │ │ +0010ff70: 6174 6120 7468 6174 2072 6566 6572 656e ata that referen │ │ │ │ +0010ff80: 6365 7320 6578 7465 726e 616c 2072 6573 ces external res │ │ │ │ +0010ff90: 6f75 7263 6573 206e 6f74 2070 726f 7669 ources not provi │ │ │ │ +0010ffa0: 6465 6420 6173 2061 7474 6163 686d 656e ded as attachmen │ │ │ │ +0010ffb0: 7473 2e20 496e 2074 6861 7420 6361 7365 ts. In that case │ │ │ │ +0010ffc0: 2c20 7468 6520 3c63 6f64 653e 5f5f 7074 , the __pt │ │ │ │ +0010ffd0: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member │ │ │ │ +0010ffe0: 6973 204e 554c 4c20 616e 6420 7468 6520 is NULL and the │ │ │ │ +0010fff0: 3c63 6f64 653e 6964 3c2f 636f 6465 3e20 id │ │ │ │ +00110000: 6d65 6d62 6572 2072 6566 6572 7320 746f member refers to │ │ │ │ +00110010: 2074 6865 2065 7874 6572 6e61 6c20 6461 the external da │ │ │ │ +00110020: 7461 2073 6f75 7263 652e 3c2f 703e 0a3c ta source.

    .< │ │ │ │ +00110030: 703e 5468 6520 3c63 6f64 653e 6469 6d65 p>The dime │ │ │ │ +00110040: 5f69 645f 666f 726d 6174 3c2f 636f 6465 _id_format attribute of t │ │ │ │ +00110060: 6865 2063 7572 7265 6e74 2063 6f6e 7465 he current conte │ │ │ │ +00110070: 7874 2063 616e 2062 6520 7365 7420 746f xt can be set to │ │ │ │ +00110080: 2074 6865 2064 6566 6175 6c74 2066 6f72 the default for │ │ │ │ +00110090: 6d61 7420 6f66 2044 494d 4520 6964 206d mat of DIME id m │ │ │ │ +001100a0: 656d 6265 7273 2e20 5468 6520 666f 726d embers. The form │ │ │ │ +001100b0: 6174 2073 7472 696e 6720 6d75 7374 2063 at string must c │ │ │ │ +001100c0: 6f6e 7461 696e 2061 203c 636f 6465 3e64 ontain a d │ │ │ │ +001100d0: 3c2f 636f 6465 3e20 666f 726d 6174 2073 format s │ │ │ │ +001100e0: 7065 6369 6669 6572 2028 6f72 2061 6e79 pecifier (or any │ │ │ │ +001100f0: 206f 7468 6572 203c 636f 6465 3e69 6e74 other int │ │ │ │ +00110100: 3c2f 636f 6465 3e2d 6261 7365 6420 666f -based fo │ │ │ │ +00110110: 726d 6174 2073 7065 6369 6669 6572 292e rmat specifier). │ │ │ │ +00110120: 2054 6865 2076 616c 7565 206f 6620 7468 The value of th │ │ │ │ +00110130: 6973 2073 7065 6369 6669 6572 2069 7320 is specifier is │ │ │ │ +00110140: 6120 6e6f 6e2d 6e65 6761 7469 7665 2069 a non-negative i │ │ │ │ +00110150: 6e74 6567 6572 2c20 7769 7468 207a 6572 nteger, with zer │ │ │ │ +00110160: 6f20 6265 696e 6720 7468 6520 7661 6c75 o being the valu │ │ │ │ +00110170: 6520 6f66 2074 6865 2044 494d 4520 6174 e of the DIME at │ │ │ │ +00110180: 7461 6368 6d65 6e74 2069 6420 666f 7220 tachment id for │ │ │ │ +00110190: 7468 6520 534f 4150 206d 6573 7361 6765 the SOAP message │ │ │ │ +001101a0: 2e20 466f 7220 6578 616d 706c 652c 3c2f . For example,.
    struct < │ │ │ │ +00110200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00110210: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00110220: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +00110230: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +00110260: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new< │ │ │ │ +001102c0: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    .< │ │ │ │ +001102e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001102f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00110300: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ +00110310: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;dime │ │ │ │ +00110360: 5f69 645f 666f 726d 6174 3c2f 613e 203d _id_format = │ │ │ │ +00110370: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +00110390: 6f74 3b69 642d 2578 2671 756f 743b 3c2f ot;id-%x";
    .
    soap::dim │ │ │ │ +00110450: 655f 6964 5f66 6f72 6d61 743c 2f61 3e3c e_id_format< │ │ │ │ +00110460: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c │ │ │ │ +00110480: 6861 7220 2a20 6469 6d65 5f69 645f 666f har * dime_id_fo │ │ │ │ +00110490: 726d 6174 3c2f 6469 763e 3c64 6976 2063 rmat
    Use │ │ │ │ +001104b0: 722d 6465 6669 6e61 626c 6520 666f 726d r-definable form │ │ │ │ +001104c0: 6174 2073 7472 696e 6720 746f 2067 656e at string to gen │ │ │ │ +001104d0: 6572 6174 6520 4449 4d45 2063 6f6e 7465 erate DIME conte │ │ │ │ +001104e0: 6e74 2049 4473 2e3c 2f64 6976 3e3c 6469 nt IDs.
    │ │ │ │ +00110500: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:41 │ │ │ │ +00110520: 3732 3c2f 6469 763e 3c2f 6469 763e 0a3c 72
    .< │ │ │ │ +00110530: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    As a re │ │ │ │ +00110550: 7375 6c74 2c20 616c 6c20 6174 7461 6368 sult, all attach │ │ │ │ +00110560: 6d65 6e74 7320 7769 7468 2061 204e 554c ments with a NUL │ │ │ │ +00110570: 4c20 3c63 6f64 653e 6964 3c2f 636f 6465 L id member will us │ │ │ │ +00110590: 6520 6120 6175 746f 2d67 656e 6572 6174 e a auto-generat │ │ │ │ +001105a0: 6564 2069 6420 7661 6c75 6520 6261 7365 ed id value base │ │ │ │ +001105b0: 6420 6f6e 2074 6865 2066 6f72 6d61 7420 d on the format │ │ │ │ +001105c0: 7374 7269 6e67 2e3c 2f70 3e0a 3c64 6c20 string.

    .
    Warn │ │ │ │ +001105f0: 696e 673c 2f64 743e 3c64 643e 4361 7265 ing
    Care │ │ │ │ +00110600: 206d 7573 7420 6265 2074 616b 656e 206e must be taken n │ │ │ │ +00110610: 6f74 2074 6f20 696e 7472 6f64 7563 6520 ot to introduce │ │ │ │ +00110620: 6475 706c 6963 6174 6520 636f 6e74 656e duplicate conten │ │ │ │ +00110630: 7420 6964 2076 616c 7565 732c 2077 6865 t id values, whe │ │ │ │ +00110640: 6e20 6173 7369 676e 696e 6720 636f 6e74 n assigning cont │ │ │ │ +00110650: 656e 7420 6964 2076 616c 7565 7320 746f ent id values to │ │ │ │ +00110660: 2074 6865 2069 6420 6d65 6d62 6572 7320 the id members │ │ │ │ +00110670: 6f66 2044 494d 4520 6578 7465 6e64 6564 of DIME extended │ │ │ │ +00110680: 2062 696e 6172 7920 6461 7461 2074 7970 binary data typ │ │ │ │ +00110690: 6573 2e20 436f 6e74 656e 7420 6964 7320 es. Content ids │ │ │ │ +001106a0: 6d75 7374 2062 6520 756e 6971 7565 2e3c must be unique.< │ │ │ │ +001106b0: 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 9f94 /dd>
    .

    ... │ │ │ │ +001106c0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ +001106d0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ +001106e0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ +001106f0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .St │ │ │ │ +00110720: 7265 616d 696e 6720 4449 4d45 3c2f 6832 reaming DIME

    .

    Streaming D │ │ │ │ +00110740: 494d 4520 6973 2061 6368 6965 7665 6420 IME is achieved │ │ │ │ +00110750: 7769 7468 2063 616c 6c62 6163 6b20 6675 with callback fu │ │ │ │ +00110760: 6e63 7469 6f6e 7320 746f 2066 6574 6368 nctions to fetch │ │ │ │ +00110770: 2061 6e64 2073 746f 7265 2064 6174 6120 and store data │ │ │ │ +00110780: 6475 7269 6e67 2074 7261 6e73 6d69 7373 during transmiss │ │ │ │ +00110790: 696f 6e2e 2054 6872 6565 2066 756e 6374 ion. Three funct │ │ │ │ +001107a0: 696f 6e20 6361 6c6c 6261 636b 7320 666f ion callbacks fo │ │ │ │ +001107b0: 7220 7374 7265 616d 696e 6720 4449 4d45 r streaming DIME │ │ │ │ +001107c0: 206f 7574 7075 7420 616e 6420 7468 7265 output and thre │ │ │ │ +001107d0: 6520 6361 6c6c 6261 636b 7320 666f 7220 e callbacks for │ │ │ │ +001107e0: 7374 7265 616d 696e 6720 4449 4d45 2069 streaming DIME i │ │ │ │ +001107f0: 6e70 7574 2061 7265 2061 7661 696c 6162 nput are availab │ │ │ │ +00110800: 6c65 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 le.

    .
      .
    • void *(*s │ │ │ │ +00110820: 6f61 702e 6664 696d 6572 6561 646f 7065 oap.fdimereadope │ │ │ │ +00110830: 6e29 2873 7472 7563 7420 736f 6170 202a n)(struct soap * │ │ │ │ +00110840: 736f 6170 2c20 766f 6964 202a 6861 6e64 soap, void *hand │ │ │ │ +00110850: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char * │ │ │ │ +00110860: 6964 2c20 636f 6e73 7420 6368 6172 202a id, const char * │ │ │ │ +00110870: 7479 7065 2c20 636f 6e73 7420 6368 6172 type, const char │ │ │ │ +00110880: 202a 6f70 7469 6f6e 7329 3c2f 636f 6465 *options) This callback │ │ │ │ +001108a0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ +001108b0: 2065 6e67 696e 6520 746f 2073 7461 7274 engine to start │ │ │ │ +001108c0: 2073 656e 6469 6e67 2061 2073 7472 6561 sending a strea │ │ │ │ +001108d0: 6d69 6e67 2044 494d 4520 6174 7461 6368 ming DIME attach │ │ │ │ +001108e0: 6d65 6e74 2e20 5468 6973 2063 616c 6c62 ment. This callb │ │ │ │ +001108f0: 6163 6b20 6f70 656e 7320 6120 7374 7265 ack opens a stre │ │ │ │ +00110900: 616d 2074 6f20 7374 6172 7420 7265 6164 am to start read │ │ │ │ +00110910: 696e 6720 7468 6520 6174 7461 6368 6d65 ing the attachme │ │ │ │ +00110920: 6e74 2064 6174 6120 746f 2073 656e 642e nt data to send. │ │ │ │ +00110930: 2054 6865 2061 6374 7561 6c20 6461 7461 The actual data │ │ │ │ +00110940: 2073 7472 6561 6d20 7769 6c6c 2062 6520 stream will be │ │ │ │ +00110950: 7265 6164 2069 6e20 6368 756e 6b73 2075 read in chunks u │ │ │ │ +00110960: 7369 6e67 2074 6865 203c 636f 6465 3e3c sing the < │ │ │ │ +00110970: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00110980: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +00110990: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +001109a0: 6761 3438 3237 3061 6439 3839 3631 6333 ga48270ad98961c3 │ │ │ │ +001109b0: 6666 3438 6337 6235 3634 3834 6562 6233 ff48c7b56484ebb3 │ │ │ │ +001109c0: 6661 2220 7469 746c 653d 2243 616c 6c62 fa" title="Callb │ │ │ │ +001109d0: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data │ │ │ │ +001109e0: 2069 6e20 6120 4449 4d45 2061 7474 6163 in a DIME attac │ │ │ │ +001109f0: 686d 656e 7420 7374 7265 616d 2e22 3e73 hment stream.">s │ │ │ │ +00110a00: 6f61 703a 3a66 6469 6d65 7265 6164 3c2f oap::fdimeread callba │ │ │ │ +00110a20: 636b 2075 6e74 696c 206e 6f20 6d6f 7265 ck until no more │ │ │ │ +00110a30: 2064 6174 6120 6973 2061 7661 696c 6162 data is availab │ │ │ │ +00110a40: 6c65 2061 6e64 2074 6865 203c 636f 6465 le and the soap::fd │ │ │ │ +00110af0: 696d 6572 6561 6463 6c6f 7365 3c2f 613e imereadclose │ │ │ │ +00110b00: 3c2f 636f 6465 3e20 6361 6c6c 6261 636b callback │ │ │ │ +00110b10: 2069 7320 6361 6c6c 6564 2074 6f20 636c is called to cl │ │ │ │ +00110b20: 6f73 6520 7468 6520 7374 7265 616d 2e20 ose the stream. │ │ │ │ +00110b30: 5468 6520 3c63 6f64 653e 6861 6e64 6c65 The handle │ │ │ │ +00110b40: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ +00110b50: 7220 636f 6e74 6169 6e73 2074 6865 2076 r contains the v │ │ │ │ +00110b60: 616c 7565 206f 6620 7468 6520 3c63 6f64 alue of the __ptr m │ │ │ │ +00110b80: 656d 6265 7220 7661 7269 6162 6c65 206f ember variable o │ │ │ │ +00110b90: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment │ │ │ │ +00110ba0: 2073 7472 7563 742f 636c 6173 7320 7769 struct/class wi │ │ │ │ +00110bb0: 7468 2064 6174 6120 2865 2e67 2e20 3c63 th data (e.g. xsd__base64Bin │ │ │ │ +00110c40: 6172 793c 2f61 3e3c 2f63 6f64 653e 206f ary o │ │ │ │ +00110c50: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r _x │ │ │ │ +00110cc0: 6f70 5f5f 496e 636c 7564 653c 2f61 3e3c op__Include< │ │ │ │ +00110cd0: 2f63 6f64 653e 2077 6974 6820 3c63 6f64 /code> with __ptr, │ │ │ │ +00110cf0: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size, id, type │ │ │ │ +00110d20: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and options │ │ │ │ +00110d40: 206d 656d 6265 7273 292c 2077 6869 6368 members), which │ │ │ │ +00110d50: 2073 686f 756c 6420 6265 2061 2070 6f69 should be a poi │ │ │ │ +00110d60: 6e74 6572 2074 6f20 7370 6563 6966 6963 nter to specific │ │ │ │ +00110d70: 2069 6e66 6f72 6d61 7469 6f6e 2073 7563 information suc │ │ │ │ +00110d80: 6820 6173 2061 2066 696c 6520 6465 7363 h as a file desc │ │ │ │ +00110d90: 7269 7074 6f72 206f 7220 6120 706f 696e riptor or a poin │ │ │ │ +00110da0: 7465 7220 746f 2061 2073 6f6d 6520 6170 ter to a some ap │ │ │ │ +00110db0: 706c 6963 6174 696f 6e2d 7370 6563 6966 plication-specif │ │ │ │ +00110dc0: 6963 2064 6174 6120 746f 2062 6520 7061 ic data to be pa │ │ │ │ +00110dd0: 7373 6564 2074 6f20 7468 6973 2063 616c ssed to this cal │ │ │ │ +00110de0: 6c62 6163 6b2e 2042 6f74 6820 7468 6520 lback. Both the │ │ │ │ +00110df0: 3c63 6f64 653e 5f5f 7074 723c 2f63 6f64 __ptr and __s │ │ │ │ +00110e10: 697a 653c 2f63 6f64 653e 206d 656d 6265 ize membe │ │ │ │ +00110e20: 7273 206f 6620 7468 6520 6174 7461 6368 rs of the attach │ │ │ │ +00110e30: 6d65 6e74 2073 7472 7563 742f 636c 6173 ment struct/clas │ │ │ │ +00110e40: 7320 7368 6f75 6c64 2068 6176 6520 6265 s should have be │ │ │ │ +00110e50: 656e 2073 6574 2062 7920 7468 6520 6170 en set by the ap │ │ │ │ +00110e60: 706c 6963 6174 696f 6e20 7072 696f 7220 plication prior │ │ │ │ +00110e70: 746f 2074 6865 2073 6572 6961 6c69 7a61 to the serializa │ │ │ │ +00110e80: 7469 6f6e 206f 6620 7468 6520 6d65 7373 tion of the mess │ │ │ │ +00110e90: 6167 6520 7769 7468 2061 7474 6163 686d age with attachm │ │ │ │ +00110ea0: 656e 7473 2e20 4966 2074 6865 203c 636f ents. If the __size │ │ │ │ +00110ec0: 2069 7320 7a65 726f 2061 6e64 2048 5454 is zero and HTT │ │ │ │ +00110ed0: 5020 6368 756e 6b69 6e67 2069 7320 656e P chunking is en │ │ │ │ +00110ee0: 6162 6c65 6420 2877 6974 6820 3c63 6f64 abled (with #SOAP_IO_CHUNK │ │ │ │ +00110f00: 3c2f 636f 6465 3e29 2c20 7468 656e 2063 ), then c │ │ │ │ +00110f10: 6875 6e6b 6564 2044 494d 4520 6174 7461 hunked DIME atta │ │ │ │ +00110f20: 6368 6d65 6e74 7320 6172 6520 7365 6e74 chments are sent │ │ │ │ +00110f30: 2c20 7365 6520 3c63 6f64 653e 3c61 2063 , see soap │ │ │ │ +00110fd0: 3a3a 6664 696d 6572 6561 643c 2f61 3e3c ::fdimeread< │ │ │ │ +00110fe0: 2f63 6f64 653e 2e20 5468 6520 3c63 6f64 /code>. The id, type a │ │ │ │ +00111010: 6e64 203c 636f 6465 3e6f 7074 696f 6e73 nd options │ │ │ │ +00111020: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ +00111030: 7273 2061 7265 2074 6865 203c 636f 6465 rs are the id (opti │ │ │ │ +00111050: 6f6e 616c 2049 4429 2c20 3c63 6f64 653e onal ID), │ │ │ │ +00111060: 7479 7065 3c2f 636f 6465 3e20 2861 204d type (a M │ │ │ │ +00111070: 494d 4520 7479 7065 2920 616e 6420 3c63 IME type) and options (DIME options │ │ │ │ +001110a0: 2061 7265 2073 6574 2077 6974 6820 3c63 are set with soap_dime_opt │ │ │ │ +00111130: 696f 6e3c 2f61 3e3c 2f63 6f64 653e 2920 ion) │ │ │ │ +00111140: 6f66 2074 6865 2061 7474 6163 686d 656e of the attachmen │ │ │ │ +00111150: 7420 7374 7275 6374 2f63 6c61 7373 2c20 t struct/class, │ │ │ │ +00111160: 7265 7370 6563 7469 7665 6c79 2c20 6f66 respectively, of │ │ │ │ +00111170: 2077 6869 6368 2061 7420 6c65 6173 7420 which at least │ │ │ │ +00111180: 6f6e 6520 6d65 6d62 6572 2073 686f 756c one member shoul │ │ │ │ +00111190: 6420 6265 206e 6f6e 2d4e 554c 4c2e 2054 d be non-NULL. T │ │ │ │ +001111a0: 6865 2063 616c 6c62 6163 6b20 7368 6f75 he callback shou │ │ │ │ +001111b0: 6c64 2072 6574 7572 6e20 7468 6520 3c63 ld return the handle parameter valu │ │ │ │ +001111e0: 6520 6f72 2061 6e6f 7468 6572 2070 6f69 e or another poi │ │ │ │ +001111f0: 6e74 6572 2076 616c 7565 2c20 7768 6963 nter value, whic │ │ │ │ +00111200: 6820 6973 2070 6173 7365 6420 6173 2074 h is passed as t │ │ │ │ +00111210: 6865 206e 6577 203c 636f 6465 3e68 616e he new han │ │ │ │ +00111220: 646c 653c 2f63 6f64 653e 2070 6172 616d dle param │ │ │ │ +00111230: 6574 6572 2074 6f20 3c63 6f64 653e 3c61 eter to so │ │ │ │ +001112d0: 6170 3a3a 6664 696d 6572 6561 643c 2f61 ap::fdimeread and soap:: │ │ │ │ +00111390: 6664 696d 6572 6561 6463 6c6f 7365 3c2f fdimereadclose callba │ │ │ │ +001113b0: 636b 732e 2057 6865 6e20 616e 2065 7272 cks. When an err │ │ │ │ +001113c0: 6f72 206f 6363 7572 7265 6420 696e 2074 or occurred in t │ │ │ │ +001113d0: 6869 7320 6361 6c6c 6261 636b 2c20 7468 his callback, th │ │ │ │ +001113e0: 6520 6361 6c6c 6261 636b 2073 686f 756c e callback shoul │ │ │ │ +001113f0: 6420 7265 7475 726e 204e 554c 4c20 616e d return NULL an │ │ │ │ +00111400: 6420 7365 7420 3c63 6f64 653e 3c61 2063 d set soap::error to an e │ │ │ │ +001114d0: 7272 6f72 2063 6f64 652c 2065 2e67 2e20 rror code, e.g. │ │ │ │ +001114e0: 7573 696e 6720 3c63 6f64 653e 3c61 2063 using soap │ │ │ │ +00111590: 5f72 6563 6569 7665 725f 6661 756c 743c _receiver_fault< │ │ │ │ +001115a0: 2f61 3e3c 2f63 6f64 653e 2e20 5468 6520 /a>. The │ │ │ │ +001115b0: 6361 6c6c 6261 636b 206d 6179 2072 6574 callback may ret │ │ │ │ +001115c0: 7572 6e20 4e55 4c4c 2061 6e64 2073 6574 urn NULL and set │ │ │ │ +001115d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa │ │ │ │ +00111680: 703a 3a65 7272 6f72 3c2f 613e 3c2f 636f p::error to #SO │ │ │ │ +001116a0: 4150 5f4f 4b3c 2f63 6f64 653e 2077 6865 AP_OK whe │ │ │ │ +001116b0: 6e20 7468 6973 2073 7065 6369 6669 6320 n this specific │ │ │ │ +001116c0: 4449 4d45 2061 7474 6163 686d 656e 7420 DIME attachment │ │ │ │ +001116d0: 7368 6f75 6c64 206e 6f74 2074 6f20 6265 should not to be │ │ │ │ +001116e0: 2073 7472 6561 6d65 6420 616e 6420 7468 streamed and th │ │ │ │ +001116f0: 6520 656e 6769 6e65 2077 696c 6c20 7369 e engine will si │ │ │ │ +00111700: 6d70 6c79 2073 6b69 7020 6974 2e3c 2f6c mply skip it..
    • siz │ │ │ │ +00111720: 655f 7420 282a 736f 6170 2e66 6469 6d65 e_t (*soap.fdime │ │ │ │ +00111730: 7265 6164 2928 7374 7275 6374 2073 6f61 read)(struct soa │ │ │ │ +00111740: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h │ │ │ │ +00111750: 616e 646c 652c 2063 6861 7220 2a62 7566 andle, char *buf │ │ │ │ +00111760: 2c20 7369 7a65 5f74 206c 656e 293c 2f63 , size_t len) This callba │ │ │ │ +00111780: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ +00111790: 7468 6520 656e 6769 6e65 2074 6f20 7265 the engine to re │ │ │ │ +001117a0: 6164 2061 2063 6875 6e6b 206f 6620 6174 ad a chunk of at │ │ │ │ +001117b0: 7461 6368 6d65 6e74 2064 6174 6120 746f tachment data to │ │ │ │ +001117c0: 2074 7261 6e73 6d69 742e 2054 6865 203c transmit. The < │ │ │ │ +001117d0: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter con │ │ │ │ +001117f0: 7461 696e 7320 7468 6520 6861 6e64 6c65 tains the handle │ │ │ │ +00111800: 2072 6574 7572 6e65 6420 6279 2074 6865 returned by the │ │ │ │ +00111810: 203c 636f 6465 3e3c 6120 636c 6173 733d so │ │ │ │ +001118b0: 6170 3a3a 6664 696d 6572 6561 646f 7065 ap::fdimereadope │ │ │ │ +001118c0: 6e3c 2f61 3e3c 2f63 6f64 653e 2063 616c n cal │ │ │ │ +001118d0: 6c62 6163 6b2e 2054 6865 203c 636f 6465 lback. The buf para │ │ │ │ +001118f0: 6d65 7465 7220 6973 2074 6865 2062 7566 meter is the buf │ │ │ │ +00111900: 6665 7220 6f66 206c 656e 6774 6820 3c63 fer of length len i │ │ │ │ +00111920: 6e74 6f20 7768 6963 6820 6120 6368 756e nto which a chun │ │ │ │ +00111930: 6b20 6f66 2064 6174 6120 7368 6f75 6c64 k of data should │ │ │ │ +00111940: 2062 6520 7772 6974 7465 6e20 6279 2074 be written by t │ │ │ │ +00111950: 6865 2063 616c 6c62 6163 6b2e 2054 6865 he callback. The │ │ │ │ +00111960: 2061 6374 7561 6c20 616d 6f75 6e74 206f actual amount o │ │ │ │ +00111970: 6620 6461 7461 2077 7269 7474 656e 2069 f data written i │ │ │ │ +00111980: 6e74 6f20 7468 6520 6275 6666 6572 206d nto the buffer m │ │ │ │ +00111990: 6179 2062 6520 6c65 7373 2074 6861 6e20 ay be less than │ │ │ │ +001119a0: 3c63 6f64 653e 6c65 6e3c 2f63 6f64 653e len │ │ │ │ +001119b0: 2061 6e64 2074 6869 7320 6163 7475 616c and this actual │ │ │ │ +001119c0: 2061 6d6f 756e 7420 7368 6f75 6c64 2062 amount should b │ │ │ │ +001119d0: 6520 7265 7475 726e 6564 2062 7920 7468 e returned by th │ │ │ │ +001119e0: 6520 6361 6c6c 6261 636b 2e20 4120 7265 e callback. A re │ │ │ │ +001119f0: 7475 726e 2076 616c 7565 206f 6620 7a65 turn value of ze │ │ │ │ +00111a00: 726f 2069 6e64 6963 6174 6573 2061 6e20 ro indicates an │ │ │ │ +00111a10: 6572 726f 7220 616e 6420 3c63 6f64 653e error and │ │ │ │ +00111a20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::erro │ │ │ │ +00111ad0: 723c 2f61 3e3c 2f63 6f64 653e 2073 686f r sho │ │ │ │ +00111ae0: 756c 6420 6265 2073 6574 2e20 5468 6520 uld be set. The │ │ │ │ +00111af0: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size member varia │ │ │ │ +00111b10: 626c 6520 6f66 2074 6865 2061 7474 6163 ble of the attac │ │ │ │ +00111b20: 686d 656e 7420 7374 7275 6374 2f63 6c61 hment struct/cla │ │ │ │ +00111b30: 7373 2077 6974 6820 6461 7461 2028 652e ss with data (e. │ │ │ │ +00111b40: 672e 203c 636f 6465 3e3c 6120 636c 6173 g. xsd__base │ │ │ │ +00111bc0: 3634 4269 6e61 7279 3c2f 613e 3c2f 636f 64Binary or _xop__Include │ │ │ │ +00111c50: 3c2f 613e 3c2f 636f 6465 3e20 7769 7468 with │ │ │ │ +00111c60: 203c 636f 6465 3e5f 5f70 7472 3c2f 636f __ptr, __siz │ │ │ │ +00111c80: 653c 2f63 6f64 653e 2c20 3c63 6f64 653e e, │ │ │ │ +00111c90: 6964 3c2f 636f 6465 3e2c 203c 636f 6465 id, type and │ │ │ │ +00111cb0: 203c 636f 6465 3e6f 7074 696f 6e73 3c2f options members) s │ │ │ │ +00111cd0: 686f 756c 6420 6265 2073 6574 2062 7920 hould be set by │ │ │ │ +00111ce0: 7468 6520 6170 706c 6963 6174 696f 6e20 the application │ │ │ │ +00111cf0: 7072 696f 7220 746f 2074 6865 2073 6572 prior to the ser │ │ │ │ +00111d00: 6961 6c69 7a61 7469 6f6e 206f 6620 7468 ialization of th │ │ │ │ +00111d10: 6520 6d65 7373 6167 6520 7769 7468 2061 e message with a │ │ │ │ +00111d20: 7474 6163 686d 656e 7473 2e20 5468 6520 ttachments. The │ │ │ │ +00111d30: 7661 6c75 6520 6f66 203c 636f 6465 3e5f value of _ │ │ │ │ +00111d40: 5f73 697a 653c 2f63 6f64 653e 2069 6e64 _size ind │ │ │ │ +00111d50: 6963 6174 6573 2074 6865 2074 6f74 616c icates the total │ │ │ │ +00111d60: 2073 697a 6520 6f66 2074 6865 2061 7474 size of the att │ │ │ │ +00111d70: 6163 686d 656e 7420 6461 7461 2074 6f20 achment data to │ │ │ │ +00111d80: 6265 2074 7261 6e73 6d69 7474 6564 2e20 be transmitted. │ │ │ │ +00111d90: 4966 2074 6865 203c 636f 6465 3e5f 5f73 If the __s │ │ │ │ +00111da0: 697a 653c 2f63 6f64 653e 206d 656d 6265 ize membe │ │ │ │ +00111db0: 7220 7661 7269 6162 6c65 2069 7320 7a65 r variable is ze │ │ │ │ +00111dc0: 726f 2061 6e64 2048 5454 5020 6368 756e ro and HTTP chun │ │ │ │ +00111dd0: 6b69 6e67 2069 7320 656e 6162 6c65 6420 king is enabled │ │ │ │ +00111de0: 2877 6974 6820 3c63 6f64 653e 2353 4f41 (with #SOA │ │ │ │ +00111df0: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK), then DIME ch │ │ │ │ +00111e10: 756e 6b65 6420 7472 616e 7366 6572 7320 unked transfers │ │ │ │ +00111e20: 6172 6520 6163 7469 7661 7465 6420 6279 are activated by │ │ │ │ +00111e30: 2074 6865 2065 6e67 696e 652c 2077 6869 the engine, whi │ │ │ │ +00111e40: 6368 2069 7320 6d6f 7265 2066 6c65 7869 ch is more flexi │ │ │ │ +00111e50: 626c 6520 7369 6e63 6520 7468 6520 6174 ble since the at │ │ │ │ +00111e60: 7461 6368 6d65 6e74 2064 6174 6120 7369 tachment data si │ │ │ │ +00111e70: 7a65 2064 6f65 7320 6e6f 7420 6e65 6564 ze does not need │ │ │ │ +00111e80: 2074 6f20 6265 2064 6574 6572 6d69 6e65 to be determine │ │ │ │ +00111e90: 6420 696e 2061 6476 616e 6365 2e20 546f d in advance. To │ │ │ │ +00111ea0: 2075 7365 2044 494d 4520 6368 756e 6b65 use DIME chunke │ │ │ │ +00111eb0: 6420 7472 616e 7366 6572 732c 2065 6e61 d transfers, ena │ │ │ │ +00111ec0: 626c 6520 4854 5450 2063 6875 6e6b 696e ble HTTP chunkin │ │ │ │ +00111ed0: 6720 7769 7468 203c 636f 6465 3e23 534f g with #SO │ │ │ │ +00111ee0: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK (also # │ │ │ │ +00111f00: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE can be used │ │ │ │ +00111f20: 2c20 6275 7420 7468 6973 2062 7566 6665 , but this buffe │ │ │ │ +00111f30: 7273 2074 6865 2065 6e74 6972 6520 6d65 rs the entire me │ │ │ │ +00111f40: 7373 6167 6520 696e 206d 656d 6f72 7920 ssage in memory │ │ │ │ +00111f50: 6265 666f 7265 2074 7261 6e73 6d69 7373 before transmiss │ │ │ │ +00111f60: 696f 6e29 2061 6e64 2073 6574 2074 6865 ion) and set the │ │ │ │ +00111f70: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size member vari │ │ │ │ +00111f90: 6162 6c65 206f 6620 7468 6520 6174 7461 able of the atta │ │ │ │ +00111fa0: 6368 6d65 6e74 2073 7472 7563 742f 636c chment struct/cl │ │ │ │ +00111fb0: 6173 7320 746f 207a 6572 6f2e 2057 6865 ass to zero. Whe │ │ │ │ +00111fc0: 6e20 4449 4d45 2061 7474 6163 686d 656e n DIME attachmen │ │ │ │ +00111fd0: 7420 6368 756e 6b69 6e67 2069 7320 656e t chunking is en │ │ │ │ +00111fe0: 6162 6c65 642c 2074 6869 7320 6361 6c6c abled, this call │ │ │ │ +00111ff0: 6261 636b 2073 686f 756c 6420 636f 6d70 back should comp │ │ │ │ +00112000: 6c65 7465 6c79 2066 696c 6c20 7468 6520 letely fill the │ │ │ │ +00112010: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf │ │ │ │ +00112020: 2062 7566 6665 7220 7769 7468 203c 636f buffer with len by │ │ │ │ +00112040: 7465 7320 756e 6c65 7373 2074 6865 206c tes unless the l │ │ │ │ +00112050: 6173 7420 6461 7461 2063 6875 6e6b 2069 ast data chunk i │ │ │ │ +00112060: 7320 7265 6163 6865 6420 616e 6420 6665 s reached and fe │ │ │ │ +00112070: 7765 7220 6279 7465 7320 6172 6520 7265 wer bytes are re │ │ │ │ +00112080: 7475 726e 6564 2e3c 2f6c 693e 0a3c 6c69 turned.
    • .
    • void (*so │ │ │ │ +001120a0: 6170 2e66 6469 6d65 7265 6164 636c 6f73 ap.fdimereadclos │ │ │ │ +001120b0: 6529 2873 7472 7563 7420 736f 6170 202a e)(struct soap * │ │ │ │ +001120c0: 736f 6170 2c20 766f 6964 202a 6861 6e64 soap, void *hand │ │ │ │ +001120d0: 6c65 293c 2f63 6f64 653e 2054 6869 7320 le) This │ │ │ │ +001120e0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ +001120f0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine │ │ │ │ +00112100: 2074 6f20 636c 6f73 6520 7468 6520 4449 to close the DI │ │ │ │ +00112110: 4d45 2061 7474 6163 686d 656e 7420 7374 ME attachment st │ │ │ │ +00112120: 7265 616d 2061 6674 6572 2072 6561 6469 ream after readi │ │ │ │ +00112130: 6e67 2e20 5468 6520 3c63 6f64 653e 6861 ng. The ha │ │ │ │ +00112140: 6e64 6c65 3c2f 636f 6465 3e20 7061 7261 ndle para │ │ │ │ +00112150: 6d65 7465 7220 636f 6e74 6169 6e73 2074 meter contains t │ │ │ │ +00112160: 6865 2068 616e 646c 6520 7265 7475 726e he handle return │ │ │ │ +00112170: 6564 2062 7920 7468 6520 3c63 6f64 653e ed by the │ │ │ │ +00112180: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fdi │ │ │ │ +00112220: 6d65 7265 6164 6f70 656e 3c2f 613e 3c2f mereadopen callback.< │ │ │ │ +00112240: 2f6c 693e 0a3c 6c69 3e3c 636f 6465 3e76 /li>.
    • v │ │ │ │ +00112250: 6f69 6420 2a28 2a73 6f61 702e 6664 696d oid *(*soap.fdim │ │ │ │ +00112260: 6577 7269 7465 6f70 656e 2928 7374 7275 ewriteopen)(stru │ │ │ │ +00112270: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c │ │ │ │ +00112280: 6f6e 7374 2063 6861 7220 2a69 642c 2063 onst char *id, c │ │ │ │ +00112290: 6f6e 7374 2063 6861 7220 2a74 7970 652c onst char *type, │ │ │ │ +001122a0: 2063 6f6e 7374 2063 6861 7220 2a6f 7074 const char *opt │ │ │ │ +001122b0: 696f 6e73 293c 2f63 6f64 653e 2043 616c ions) Cal │ │ │ │ +001122c0: 6c65 6420 6279 2074 6865 2074 6f20 7374 led by the to st │ │ │ │ +001122d0: 6172 7420 7265 6365 6976 696e 6720 6120 art receiving a │ │ │ │ +001122e0: 7374 7265 616d 696e 6720 4449 4d45 2061 streaming DIME a │ │ │ │ +001122f0: 7474 6163 686d 656e 742e 2054 6869 7320 ttachment. This │ │ │ │ +00112300: 6361 6c6c 6261 636b 206f 7065 6e73 2061 callback opens a │ │ │ │ +00112310: 2073 7472 6561 6d20 746f 2073 7461 7274 stream to start │ │ │ │ +00112320: 2077 7269 7469 6e67 2074 6865 2061 7474 writing the att │ │ │ │ +00112330: 6163 686d 656e 7420 6461 7461 2072 6563 achment data rec │ │ │ │ +00112340: 6569 7665 642e 2054 6865 2061 6374 7561 eived. The actua │ │ │ │ +00112350: 6c20 6461 7461 2073 7472 6561 6d20 7769 l data stream wi │ │ │ │ +00112360: 6c6c 2062 6520 7772 6974 7465 6e20 696e ll be written in │ │ │ │ +00112370: 2063 6875 6e6b 7320 7573 696e 6720 7468 chunks using th │ │ │ │ +00112380: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::f │ │ │ │ +00112420: 6469 6d65 7772 6974 653c 2f61 3e3c 2f63 dimewrite callback un │ │ │ │ +00112440: 7469 6c20 6e6f 206d 6f72 6520 6461 7461 til no more data │ │ │ │ +00112450: 2069 7320 6176 6169 6c61 626c 6520 616e is available an │ │ │ │ +00112460: 6420 7468 6520 3c63 6f64 653e 3c61 2063 d the soap::fdimewr │ │ │ │ +00112510: 6974 6563 6c6f 7365 3c2f 613e 3c2f 636f iteclose callback is │ │ │ │ +00112530: 6361 6c6c 6564 2074 6f20 636c 6f73 6520 called to close │ │ │ │ +00112540: 7468 6520 7374 7265 616d 2e20 5468 6520 the stream. The │ │ │ │ +00112550: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id, │ │ │ │ +00112560: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type and opt │ │ │ │ +00112580: 696f 6e73 3c2f 636f 6465 3e20 7061 7261 ions para │ │ │ │ +00112590: 6d65 7465 7273 2061 7265 2074 6865 203c meters are the < │ │ │ │ +001125a0: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, │ │ │ │ +001125b0: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti │ │ │ │ +001125d0: 6f6e 733c 2f63 6f64 653e 206f 6620 7468 ons of th │ │ │ │ +001125e0: 6520 6174 7461 6368 6d65 6e74 2073 7472 e attachment str │ │ │ │ +001125f0: 7563 742f 636c 6173 7320 2865 2e67 2e20 uct/class (e.g. │ │ │ │ +00112600: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 xsd__base64B │ │ │ │ +00112680: 696e 6172 793c 2f61 3e3c 2f63 6f64 653e inary │ │ │ │ +00112690: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or │ │ │ │ +00112700: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include with __ptr │ │ │ │ +00112730: 2c20 3c63 6f64 653e 5f5f 7369 7a65 3c2f , __size, id< │ │ │ │ +00112750: 2f63 6f64 653e 2c20 3c63 6f64 653e 7479 /code>, ty │ │ │ │ +00112760: 7065 3c2f 636f 6465 3e20 616e 6420 3c63 pe and options members), res │ │ │ │ +00112790: 7065 6374 6976 656c 792e 2054 6865 2063 pectively. The c │ │ │ │ +001127a0: 616c 6c62 6163 6b20 7368 6f75 6c64 2072 allback should r │ │ │ │ +001127b0: 6574 7572 6e20 6120 6861 6e64 6c65 2c20 eturn a handle, │ │ │ │ +001127c0: 7768 6963 6820 6973 2070 6173 7365 6420 which is passed │ │ │ │ +001127d0: 746f 2074 6865 203c 636f 6465 3e3c 6120 to the so │ │ │ │ +00112870: 6170 3a3a 6664 696d 6577 7269 7465 3c2f ap::fdimewrite and soap: │ │ │ │ +00112930: 3a66 6469 6d65 7772 6974 6563 6c6f 7365 :fdimewriteclose │ │ │ │ +00112940: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call │ │ │ │ +00112950: 6261 636b 732e 2054 6865 203c 636f 6465 backs. The __ptr me │ │ │ │ +00112970: 6d62 6572 2076 6172 6961 626c 6520 6f66 mber variable of │ │ │ │ +00112980: 2074 6865 2061 7474 6163 686d 656e 7420 the attachment │ │ │ │ +00112990: 7374 7275 6374 2f63 6c61 7373 2069 7320 struct/class is │ │ │ │ +001129a0: 7365 7420 6279 2074 6865 2065 6e67 696e set by the engin │ │ │ │ +001129b0: 6520 746f 2074 6865 2076 616c 7565 206f e to the value o │ │ │ │ +001129c0: 6620 7468 6973 2068 616e 646c 652e 2054 f this handle. T │ │ │ │ +001129d0: 6865 203c 636f 6465 3e5f 5f73 697a 653c he __size< │ │ │ │ +001129e0: 2f63 6f64 653e 206d 656d 6265 7220 7661 /code> member va │ │ │ │ +001129f0: 7269 6162 6c65 2069 7320 7365 7420 746f riable is set to │ │ │ │ +00112a00: 2074 6865 2073 697a 6520 6f66 2074 6865 the size of the │ │ │ │ +00112a10: 2061 7474 6163 686d 656e 7420 7265 6365 attachment rece │ │ │ │ +00112a20: 6976 6564 2e20 5468 6520 6d61 7869 6d75 ived. The maximu │ │ │ │ +00112a30: 6d20 4449 4d45 2061 7474 6163 686d 656e m DIME attachmen │ │ │ │ +00112a40: 7420 7369 7a65 2072 6563 6569 7665 6420 t size received │ │ │ │ +00112a50: 6973 206c 696d 6974 6564 2062 7920 3c63 is limited by #SOAP_MAXDIM │ │ │ │ +00112a70: 4553 495a 453c 2f63 6f64 653e 2e3c 2f6c ESIZE..
    • int │ │ │ │ +00112a90: 2028 2a73 6f61 702e 6664 696d 6577 7269 (*soap.fdimewri │ │ │ │ +00112aa0: 7465 2928 7374 7275 6374 2073 6f61 7020 te)(struct soap │ │ │ │ +00112ab0: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han │ │ │ │ +00112ac0: 646c 652c 2063 6f6e 7374 2063 6861 7220 dle, const char │ │ │ │ +00112ad0: 2a62 7566 2c20 7369 7a65 5f74 206c 656e *buf, size_t len │ │ │ │ +00112ae0: 293c 2f63 6f64 653e 2054 6869 7320 6361 ) This ca │ │ │ │ +00112af0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called │ │ │ │ +00112b00: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t │ │ │ │ +00112b10: 6f20 7772 6974 6520 6120 6368 756e 6b20 o write a chunk │ │ │ │ +00112b20: 6f66 2061 7474 6163 686d 656e 7420 6461 of attachment da │ │ │ │ +00112b30: 7461 2072 6563 6569 7665 642e 2054 6865 ta received. The │ │ │ │ +00112b40: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter c │ │ │ │ +00112b60: 6f6e 7461 696e 7320 7468 6520 6861 6e64 ontains the hand │ │ │ │ +00112b70: 6c65 2072 6574 7572 6e65 6420 6279 2074 le returned by t │ │ │ │ +00112b80: 6865 203c 636f 6465 3e3c 6120 636c 6173 he │ │ │ │ +00112c20: 736f 6170 3a3a 6664 696d 6577 7269 7465 soap::fdimewrite │ │ │ │ +00112c30: 6f70 656e 3c2f 613e 3c2f 636f 6465 3e20 open │ │ │ │ +00112c40: 6361 6c6c 6261 636b 2e20 5468 6520 3c63 callback. The buf p │ │ │ │ +00112c60: 6172 616d 6574 6572 2063 6f6e 7461 696e arameter contain │ │ │ │ +00112c70: 7320 7468 6520 6461 7461 206f 6620 6c65 s the data of le │ │ │ │ +00112c80: 6e67 7468 203c 636f 6465 3e6c 656e 3c2f ngth len. Returns < │ │ │ │ +00112ca0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a │ │ │ │ +00112cc0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status │ │ │ │ +00112d80: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er │ │ │ │ +00112d90: 726f 7220 636f 6465 2e3c 2f6c 693e 0a3c ror code.
    • .< │ │ │ │ +00112da0: 6c69 3e3c 636f 6465 3e76 6f69 6420 282a li>void (* │ │ │ │ +00112db0: 736f 6170 2e66 6469 6d65 7772 6974 6563 soap.fdimewritec │ │ │ │ +00112dc0: 6c6f 7365 2928 7374 7275 6374 2073 6f61 lose)(struct soa │ │ │ │ +00112dd0: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h │ │ │ │ +00112de0: 616e 646c 6529 3c2f 636f 6465 3e20 5468 andle) Th │ │ │ │ +00112df0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c │ │ │ │ +00112e00: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng │ │ │ │ +00112e10: 696e 6520 746f 2063 6c6f 7365 2074 6865 ine to close the │ │ │ │ +00112e20: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ +00112e30: 2073 7472 6561 6d20 6166 7465 7220 7772 stream after wr │ │ │ │ +00112e40: 6974 696e 672e 2054 6865 203c 636f 6465 iting. The handle p │ │ │ │ +00112e60: 6172 616d 6574 6572 2063 6f6e 7461 696e arameter contain │ │ │ │ +00112e70: 7320 7468 6520 6861 6e64 6c65 2072 6574 s the handle ret │ │ │ │ +00112e80: 7572 6e65 6420 6279 2074 6865 203c 636f urned by the soap:: │ │ │ │ +00112f30: 6664 696d 6577 7269 7465 6f70 656e 3c2f fdimewriteopen callba │ │ │ │ +00112f50: 636b 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ck..
    .< │ │ │ │ +00112f60: 703e 496e 2061 6464 6974 696f 6e2c 2061 p>In addition, a │ │ │ │ +00112f70: 203c 636f 6465 3e76 6f69 642a 203c 6120 void* soap::user< │ │ │ │ +00113040: 2f61 3e3c 2f63 6f64 653e 206d 656d 6265 /a> membe │ │ │ │ +00113050: 7220 6973 2061 7661 696c 6162 6c65 2074 r is available t │ │ │ │ +00113060: 6f20 7061 7373 2075 7365 722d 6465 6669 o pass user-defi │ │ │ │ +00113070: 6e65 6420 6461 7461 2074 6f20 7468 6520 ned data to the │ │ │ │ +00113080: 6361 6c6c 6261 636b 732e 2054 6869 7320 callbacks. This │ │ │ │ +00113090: 7761 792c 2079 6f75 2063 616e 2073 6574 way, you can set │ │ │ │ +001130a0: 203c 636f 6465 3e76 6f69 642a 203c 6120 void* soap::user< │ │ │ │ +00113170: 2f61 3e3c 2f63 6f64 653e 2074 6f20 706f /a> to po │ │ │ │ +00113180: 696e 7420 746f 2061 7070 6c69 6361 7469 int to applicati │ │ │ │ +00113190: 6f6e 2064 6174 6120 7468 6174 2074 6865 on data that the │ │ │ │ +001131a0: 2063 616c 6c62 6163 6b73 206e 6565 6420 callbacks need │ │ │ │ +001131b0: 7375 6368 2061 7320 6120 6669 6c65 206e such as a file n │ │ │ │ +001131c0: 616d 6520 666f 7220 6578 616d 706c 652e ame for example. │ │ │ │ +001131d0: 3c2f 703e 0a3c 703e 5468 6520 666f 6c6c

    .

    The foll │ │ │ │ +001131e0: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il │ │ │ │ +001131f0: 6c75 7374 7261 7465 7320 7468 6520 636c lustrates the cl │ │ │ │ +00113200: 6965 6e74 2d73 6964 6520 696e 6974 6961 ient-side initia │ │ │ │ +00113210: 6c69 7a61 7469 6f6e 206f 6620 616e 2069 lization of an i │ │ │ │ +00113220: 6d61 6765 2061 7474 6163 686d 656e 7420 mage attachment │ │ │ │ +00113230: 7374 7275 6374 2074 6f20 7374 7265 616d struct to stream │ │ │ │ +00113240: 2061 2066 696c 6520 696e 746f 2061 2044 a file into a D │ │ │ │ +00113250: 494d 4520 6174 7461 6368 6d65 6e74 3a3c IME attachment:< │ │ │ │ +00113260: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int │ │ │ │ +001132b0: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .< │ │ │ │ +001132c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001132d0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap │ │ │ │ +00113340: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +00113370: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    struct xsd__bas │ │ │ │ +001133f0: 6536 3442 696e 6172 793c 2f61 3e20 696d e64Binary im │ │ │ │ +00113400: 6167 653b 203c 2f64 6976 3e0a 3c64 6976 age;
    .
    │ │ │ │ +00113420: 4649 4c45 202a 6664 3b20 3c2f 6469 763e FILE *fd;
    │ │ │ │ +00113430: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc │ │ │ │ +00113460: 7420 3c2f 7370 616e 3e73 7461 7420 7362 t stat sb │ │ │ │ +00113470: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init( │ │ │ │ +001134f0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +00113520: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    . │ │ │ │ +00113540: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!fstat(fi │ │ │ │ +00113570: 6c65 6e6f 2866 6429 2c20 2661 6d70 3b73 leno(fd), &s │ │ │ │ +00113580: 6229 2026 616d 703b 2661 6d70 3b20 7362 b) && sb │ │ │ │ +00113590: 2e73 745f 7369 7a65 2026 6774 3b20 3029 .st_size > 0) │ │ │ │ +001135a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    │ │ │ │ +001135f0: 2f2f 2062 6563 6175 7365 2077 6520 6361 // because we ca │ │ │ │ +00113600: 6e20 6765 7420 7468 6520 6c65 6e67 7468 n get the length │ │ │ │ +00113610: 206f 6620 7468 6520 6669 6c65 2c20 7765 of the file, we │ │ │ │ +00113620: 2063 616e 2073 7472 6561 6d20 6974 203c can stream it < │ │ │ │ +00113630: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +00113650: 2020 203c 6120 636c 6173 733d 2263 6f64 soap.fdimer │ │ │ │ +001136e0: 6561 646f 7065 6e3c 2f61 3e20 3d20 6469 eadopen = di │ │ │ │ +001136f0: 6d65 5f72 6561 645f 6f70 656e 3b20 3c2f me_read_open; .
    soap.fdimereadclose │ │ │ │ +001137b0: 3c2f 613e 203d 2064 696d 655f 7265 6164 = dime_read │ │ │ │ +001137c0: 5f63 6c6f 7365 3b20 3c2f 6469 763e 0a3c _close;
    .< │ │ │ │ +001137d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001137e0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap │ │ │ │ +00113810: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fdim │ │ │ │ +00113870: 6572 6561 643c 2f61 3e20 3d20 6469 6d65 eread = dime │ │ │ │ +00113880: 5f72 6561 643b 203c 2f64 6976 3e0a 3c64 _read;
    . │ │ │ │ +001138a0: 2020 2020 696d 6167 652e 5f5f 7074 7220 image.__ptr │ │ │ │ +001138b0: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (uns │ │ │ │ +001138d0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned char*)fd; // │ │ │ │ +00113920: 206d 7573 7420 7365 7420 746f 206e 6f6e must set to non │ │ │ │ +00113930: 2d4e 554c 4c20 2874 6869 7320 6973 206f -NULL (this is o │ │ │ │ +00113940: 7572 2066 6420 6861 6e64 6c65 2077 6869 ur fd handle whi │ │ │ │ +00113950: 6368 2077 6520 6e65 6564 2069 6e20 7468 ch we need in th │ │ │ │ +00113960: 6520 6361 6c6c 6261 636b 7329 203c 2f73 e callbacks)
    .
    │ │ │ │ +00113990: 2069 6d61 6765 2e5f 5f73 697a 6520 3d20 image.__size = │ │ │ │ +001139a0: 7362 2e73 745f 7369 7a65 3b20 3c73 7061 sb.st_size; // must set si │ │ │ │ +001139d0: 7a65 203c 2f73 7061 6e3e 3c2f 6469 763e ze
    │ │ │ │ +001139e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ +00113a10: 2020 3c73 7061 6e20 636c 6173 733d 226b else │ │ │ │ +00113a30: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00113a40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00113a50: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    │ │ │ │ +00113a70: 203c 7370 616e 2063 6c61 7373 3d22 636f // don │ │ │ │ +00113a90: 393b 7420 6b6e 6f77 2074 6865 2073 697a 9;t know the siz │ │ │ │ +00113aa0: 652c 2073 6f20 6275 6666 6572 2069 7420 e, so buffer it │ │ │ │ +00113ab0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00113ad0: 2020 2020 3c73 7061 6e20 636c 6173 733d si │ │ │ │ +00113af0: 7a65 5f74 3c2f 7370 616e 3e20 693b 203c ze_t i; < │ │ │ │ +00113b00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int │ │ │ │ +00113b40: 2063 3b20 3c2f 6469 763e 0a3c 6469 7620 c;
    .
    │ │ │ │ +00113b60: 2069 6d61 6765 2e5f 5f70 7472 203d 2028 image.__ptr = ( │ │ │ │ +00113b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +00113b90: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char* │ │ │ │ +00113bc0: 293c 6120 636c 6173 733d 2263 6f64 6522 )soap_mallo │ │ │ │ +00113c20: 633c 2f61 3e28 2661 6d70 3b3c 6120 636c c(&soap, MAX_ │ │ │ │ +00113c60: 4649 4c45 5f53 495a 4529 3b20 3c2f 6469 FILE_SIZE); .
    for (i │ │ │ │ +00113cb0: 203d 2030 3b20 6920 266c 743b 204d 4158 = 0; i < MAX │ │ │ │ +00113cc0: 5f46 494c 455f 5349 5a45 3b20 692b 2b29 _FILE_SIZE; i++) │ │ │ │ +00113cd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {< │ │ │ │ +00113cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if ((c = fgetc(fd │ │ │ │ +00113d40: 2929 203d 3d20 454f 4629 203c 2f64 6976 )) == EOF)
    .
    break;
    .
    │ │ │ │ +00113db0: 2020 2069 6d61 6765 2e5f 5f70 7472 5b69 image.__ptr[i │ │ │ │ +00113dc0: 5d20 3d20 633b 203c 2f64 6976 3e0a 3c64 ] = c;
    . │ │ │ │ +00113de0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . │ │ │ │ +00113e00: 2020 2066 636c 6f73 6528 6664 293b 203c fclose(fd); < │ │ │ │ +00113e10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    imag │ │ │ │ +00113e30: 652e 5f5f 7369 7a65 203d 2069 3b20 3c2f e.__size = i; .
    }
    .
    image.type │ │ │ │ +00113e80: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ +00113ea0: 7175 6f74 3b69 6d61 6765 2f6a 7065 6726 quot;image/jpeg& │ │ │ │ +00113eb0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    image.o │ │ │ │ +00113ee0: 7074 696f 6e73 203d 203c 6120 636c 6173 ptions = soap_ │ │ │ │ +00113f40: 6469 6d65 5f6f 7074 696f 6e3c 2f61 3e28 dime_option( │ │ │ │ +00113f50: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +00113f80: 3c2f 613e 2c20 302c 203c 7370 616e 2063 , 0, "My pi │ │ │ │ +00113fb0: 6374 7572 6526 7175 6f74 3b3c 2f73 7061 cture");
    .
    │ │ │ │ +00113fe0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n │ │ │ │ +00114010: 735f 5f77 6562 6d65 7468 6f64 2826 616d s__webmethod(&am │ │ │ │ +00114020: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, ...))
    .< │ │ │ │ +00114060: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00114070: 3e20 2020 202e 2e2e 203c 7370 616e 2063 > ... / │ │ │ │ +00114090: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else.
    ... < │ │ │ │ +00114100: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00114110: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent">// success< │ │ │ │ +00114120: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .} │ │ │ │ +00114140: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .
    void *dime_read_o │ │ │ │ -001141c0: 7065 6e28 3c73 7061 6e20 636c 6173 733d pen(struct │ │ │ │ -001141e0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ -00114210: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ -00114240: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void │ │ │ │ -00114270: 2a68 616e 646c 652c 203c 7370 616e 2063 *handle, c │ │ │ │ -00114290: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *id< │ │ │ │ -001142e0: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, co │ │ │ │ -00114300: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -00114330: 202a 7479 7065 2c20 3c73 7061 6e20 636c *type, co │ │ │ │ -00114350: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -00114380: 202a 6f70 7469 6f6e 7329 203c 2f64 6976 *options)
    vo │ │ │ │ +00114190: 6964 3c2f 7370 616e 3e20 2a64 696d 655f id *dime_ │ │ │ │ +001141a0: 7265 6164 5f6f 7065 6e28 3c73 7061 6e20 read_open( │ │ │ │ +001141c0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +00114200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00114210: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00114220: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +00114230: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle, < │ │ │ │ +00114260: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00114270: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ +001142a0: 3c2f 7370 616e 3e20 2a3c 7370 616e 2063 *id, const │ │ │ │ +001142f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +00114310: 2f73 7061 6e3e 202a 7479 7065 2c20 3c73 /span> *type, const │ │ │ │ +00114340: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +00114360: 2f73 7061 6e3e 202a 6f70 7469 6f6e 7329 /span> *options) │ │ │ │ +00114370: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    {
    .
    │ │ │ │ -001143c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -001143e0: 3c2f 7370 616e 3e20 6861 6e64 6c65 3b20 handle; │ │ │ │ -001143f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ +001143c0: 7265 7475 726e 3c2f 7370 616e 3e20 6861 return ha │ │ │ │ +001143d0: 6e64 6c65 3b20 3c2f 6469 763e 0a3c 6469 ndle;
    .} │ │ │ │ +001143f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .
    void dime_read_cl │ │ │ │ -00114470: 6f73 6528 3c73 7061 6e20 636c 6173 733d ose(struct │ │ │ │ -00114490: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ -001144c0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ -001144f0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void │ │ │ │ -00114520: 2a68 616e 646c 6529 203c 2f64 6976 3e0a *handle)
    . │ │ │ │ +00114420: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne">vo │ │ │ │ +00114440: 6964 3c2f 7370 616e 3e20 6469 6d65 5f72 id dime_r │ │ │ │ +00114450: 6561 645f 636c 6f73 6528 3c73 7061 6e20 ead_close( │ │ │ │ +00114470: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +001144b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001144c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001144d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001144e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 void *handle) < │ │ │ │ +00114510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 00114530: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    fc │ │ │ │ -00114560: 6c6f 7365 2828 4649 4c45 2a29 6861 6e64 lose((FILE*)hand │ │ │ │ -00114570: 6c65 293b 203c 2f64 6976 3e0a 3c64 6976 le);
    .
    } │ │ │ │ +00114540: 223e 2020 6663 6c6f 7365 2828 4649 4c45 "> fclose((FILE │ │ │ │ +00114550: 2a29 6861 6e64 6c65 293b 203c 2f64 6976 *)handle);
    .
    }
    . │ │ │ │ 00114590: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -001145b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    siz │ │ │ │ -001145e0: 655f 743c 2f73 7061 6e3e 2064 696d 655f e_t dime_ │ │ │ │ -001145f0: 7265 6164 283c 7370 616e 2063 6c61 7373 read(struc │ │ │ │ -00114610: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -00114640: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, void │ │ │ │ -001146a0: 202a 6861 6e64 6c65 2c20 3c73 7061 6e20 *handle, char │ │ │ │ -001146d0: 2a62 7566 2c20 3c73 7061 6e20 636c 6173 *buf, │ │ │ │ -001146f0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le │ │ │ │ -00114700: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {.
    return │ │ │ │ -00114760: 6672 6561 6428 6275 662c 2031 2c20 6c65 fread(buf, 1, le │ │ │ │ -00114770: 6e2c 2028 4649 4c45 2a29 6861 6e64 6c65 n, (FILE*)handle │ │ │ │ -00114780: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    }.
    < │ │ │ │ -00114810: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ -00114820: 726f 7570 5f5f 6361 6c6c 6261 636b 732e roup__callbacks. │ │ │ │ -00114830: 6874 6d6c 2367 6130 3638 3435 3563 6534 html#ga068455ce4 │ │ │ │ -00114840: 3137 6264 6462 3136 3336 6434 6435 3635 17bddb1636d4d565 │ │ │ │ -00114850: 6530 6562 6635 3622 3e73 6f61 703a 3a66 e0ebf56">soap::f │ │ │ │ -00114860: 6469 6d65 7265 6164 6f70 656e 3c2f 613e dimereadopen │ │ │ │ -00114870: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void * │ │ │ │ -00114890: 282a 2066 6469 6d65 7265 6164 6f70 656e (* fdimereadopen │ │ │ │ -001148a0: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s │ │ │ │ -001148b0: 6f61 702c 2076 6f69 6420 2a68 616e 646c oap, void *handl │ │ │ │ -001148c0: 652c 2063 6f6e 7374 2063 6861 7220 2a69 e, const char *i │ │ │ │ -001148d0: 642c 2063 6f6e 7374 2063 6861 7220 2a74 d, const char *t │ │ │ │ -001148e0: 7970 652c 2063 6f6e 7374 2063 6861 7220 ype, const char │ │ │ │ -001148f0: 2a6f 7074 696f 6e73 293c 2f64 6976 3e3c *options)
    < │ │ │ │ -00114900: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -00114910: 223e 4361 6c6c 6261 636b 2074 6f20 6f70 ">Callback to op │ │ │ │ -00114920: 656e 2061 2073 7472 6561 6d69 6e67 2044 en a streaming D │ │ │ │ -00114930: 494d 4520 6174 7461 6368 6d65 6e74 2066 IME attachment f │ │ │ │ -00114940: 6f72 2072 6561 6469 6e67 2e3c 2f64 6976 or reading.
    Definitio │ │ │ │ -00114970: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ -00114980: 683a 3436 3934 3c2f 6469 763e 3c2f 6469 h:4694
    .
    soap::fd │ │ │ │ -00114a50: 696d 6572 6561 6463 6c6f 7365 3c2f 613e imereadclose │ │ │ │ -00114a60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void(* │ │ │ │ -00114a80: 2066 6469 6d65 7265 6164 636c 6f73 6529 fdimereadclose) │ │ │ │ -00114a90: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -00114aa0: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle │ │ │ │ -00114ab0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba │ │ │ │ -00114ad0: 636b 2074 6f20 636c 6f73 6520 6120 4449 ck to close a DI │ │ │ │ -00114ae0: 4d45 2061 7474 6163 686d 656e 7420 7374 ME attachment st │ │ │ │ -00114af0: 7265 616d 2061 6674 6572 2072 6561 6469 ream after readi │ │ │ │ -00114b00: 6e67 2e3c 2f64 6976 3e3c 6469 7620 636c ng.
    D │ │ │ │ -00114b20: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ -00114b30: 7464 736f 6170 322e 683a 3437 3339 3c2f tdsoap2.h:4739
    ..
    │ │ │ │ -00114d60: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    void * soap │ │ │ │ -00114df0: 5f6d 616c 6c6f 6328 7374 7275 6374 2073 _malloc(struct s │ │ │ │ -00114e00: 6f61 7020 2a73 6f61 702c 2073 697a 655f oap *soap, size_ │ │ │ │ -00114e10: 7420 6c65 6e29 3c2f 6469 763e 3c64 6976 t len)
    A │ │ │ │ -00114e30: 6c6c 6f63 6174 6520 6120 626c 6f63 6b20 llocate a block │ │ │ │ -00114e40: 6f66 2068 6561 7020 6d65 6d6f 7279 206d of heap memory m │ │ │ │ -00114e50: 616e 6167 6564 2062 7920 7468 6520 7370 anaged by the sp │ │ │ │ -00114e60: 6563 6966 6965 6420 736f 6170 2063 6f6e ecified soap con │ │ │ │ -00114e70: 7465 7874 2e3c 2f64 6976 3e3c 2f64 6976 text.
    .

    The │ │ │ │ -00114ea0: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl │ │ │ │ -00114eb0: 6520 696c 6c75 7374 7261 7465 7320 7468 e illustrates th │ │ │ │ -00114ec0: 6520 7374 7265 616d 696e 6720 6f66 2061 e streaming of a │ │ │ │ -00114ed0: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ -00114ee0: 2069 6e74 6f20 6120 6669 6c65 2062 7920 into a file by │ │ │ │ -00114ef0: 6120 636c 6965 6e74 3a3c 2f70 3e0a 3c64 a client:

    .
    │ │ │ │ -00114f40: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main( │ │ │ │ -00114f50: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str │ │ │ │ -00114fa0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    soap │ │ │ │ -00115080: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&< │ │ │ │ -00115090: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001150a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001150b0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ -001150c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap.fdimewriteope │ │ │ │ -00115170: 6e3c 2f61 3e20 3d20 6469 6d65 5f77 7269 n = dime_wri │ │ │ │ -00115180: 7465 5f6f 7065 6e3b 203c 2f64 6976 3e0a te_open;
    . │ │ │ │ -00115190: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap< │ │ │ │ -001151d0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fdime │ │ │ │ -00115230: 7772 6974 6563 6c6f 7365 3c2f 613e 203d writeclose = │ │ │ │ -00115240: 2064 696d 655f 7772 6974 655f 636c 6f73 dime_write_clos │ │ │ │ -00115250: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    ...
    │ │ │ │ -001153c0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e │ │ │ │ -001153e0: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror
    .
    │ │ │ │ -00115420: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else
    .
    ... // success
    .
    } size_t │ │ │ │ +001145d0: 2064 696d 655f 7265 6164 283c 7370 616e dime_read(struct < │ │ │ │ +00114600: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00114610: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00114620: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +00114630: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00114660: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ │ +00114680: 2f73 7061 6e3e 202a 6861 6e64 6c65 2c20 /span> *handle, │ │ │ │ +00114690: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf, size_t len)
    . │ │ │ │ +001146f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    return fread(buf, │ │ │ │ +00114750: 2031 2c20 6c65 6e2c 2028 4649 4c45 2a29 1, len, (FILE*) │ │ │ │ +00114760: 6861 6e64 6c65 293b 203c 2f64 6976 3e0a handle);
    . │ │ │ │ +00114770: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    │ │ │ │ +00114870: 766f 6964 202a 282a 2066 6469 6d65 7265 void *(* fdimere │ │ │ │ +00114880: 6164 6f70 656e 2928 7374 7275 6374 2073 adopen)(struct s │ │ │ │ +00114890: 6f61 7020 2a73 6f61 702c 2076 6f69 6420 oap *soap, void │ │ │ │ +001148a0: 2a68 616e 646c 652c 2063 6f6e 7374 2063 *handle, const c │ │ │ │ +001148b0: 6861 7220 2a69 642c 2063 6f6e 7374 2063 har *id, const c │ │ │ │ +001148c0: 6861 7220 2a74 7970 652c 2063 6f6e 7374 har *type, const │ │ │ │ +001148d0: 2063 6861 7220 2a6f 7074 696f 6e73 293c char *options)< │ │ │ │ +001148e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback │ │ │ │ +00114900: 2074 6f20 6f70 656e 2061 2073 7472 6561 to open a strea │ │ │ │ +00114910: 6d69 6e67 2044 494d 4520 6174 7461 6368 ming DIME attach │ │ │ │ +00114920: 6d65 6e74 2066 6f72 2072 6561 6469 6e67 ment for reading │ │ │ │ +00114930: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ │ +00114950: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ +00114960: 736f 6170 322e 683a 3436 3934 3c2f 6469 soap2.h:4694
    .
    │ │ │ │ +001149d0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    │ │ │ │ +00114a60: 766f 6964 282a 2066 6469 6d65 7265 6164 void(* fdimeread │ │ │ │ +00114a70: 636c 6f73 6529 2873 7472 7563 7420 736f close)(struct so │ │ │ │ +00114a80: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void * │ │ │ │ +00114a90: 6861 6e64 6c65 293c 2f64 6976 3e3c 6469 handle)
    │ │ │ │ +00114ab0: 4361 6c6c 6261 636b 2074 6f20 636c 6f73 Callback to clos │ │ │ │ +00114ac0: 6520 6120 4449 4d45 2061 7474 6163 686d e a DIME attachm │ │ │ │ +00114ad0: 656e 7420 7374 7265 616d 2061 6674 6572 ent stream after │ │ │ │ +00114ae0: 2072 6561 6469 6e67 2e3c 2f64 6976 3e3c reading.
    < │ │ │ │ +00114af0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +00114b00: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +00114b10: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +00114b20: 3437 3339 3c2f 6469 763e 3c2f 6469 763e 4739
    │ │ │ │ +00114b30: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    < │ │ │ │ +00114c00: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00114c10: 6922 3e73 697a 655f 7428 2a20 6664 696d i">size_t(* fdim │ │ │ │ +00114c20: 6572 6561 6429 2873 7472 7563 7420 736f eread)(struct so │ │ │ │ +00114c30: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void * │ │ │ │ +00114c40: 6861 6e64 6c65 2c20 6368 6172 202a 6275 handle, char *bu │ │ │ │ +00114c50: 662c 2073 697a 655f 7420 6c65 6e29 3c2f f, size_t len)
    Callback │ │ │ │ +00114c80: 746f 2072 6561 6420 6461 7461 2069 6e20 to read data in │ │ │ │ +00114c90: 6120 4449 4d45 2061 7474 6163 686d 656e a DIME attachmen │ │ │ │ +00114ca0: 7420 7374 7265 616d 2e3c 2f64 6976 3e3c t stream.
    < │ │ │ │ +00114cb0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +00114cc0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +00114cd0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +00114ce0: 3437 3234 3c2f 6469 763e 3c2f 6469 763e 4724
    │ │ │ │ +00114cf0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void │ │ │ │ +00114dd0: 2a20 736f 6170 5f6d 616c 6c6f 6328 7374 * soap_malloc(st │ │ │ │ +00114de0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ +00114df0: 2073 697a 655f 7420 6c65 6e29 3c2f 6469 size_t len)
    Allocate a │ │ │ │ +00114e20: 626c 6f63 6b20 6f66 2068 6561 7020 6d65 block of heap me │ │ │ │ +00114e30: 6d6f 7279 206d 616e 6167 6564 2062 7920 mory managed by │ │ │ │ +00114e40: 7468 6520 7370 6563 6966 6965 6420 736f the specified so │ │ │ │ +00114e50: 6170 2063 6f6e 7465 7874 2e3c 2f64 6976 ap context.
    .
    < │ │ │ │ +00114e80: 703e 5468 6520 666f 6c6c 6f77 696e 6720 p>The following │ │ │ │ +00114e90: 6578 616d 706c 6520 696c 6c75 7374 7261 example illustra │ │ │ │ +00114ea0: 7465 7320 7468 6520 7374 7265 616d 696e tes the streamin │ │ │ │ +00114eb0: 6720 6f66 2061 2044 494d 4520 6174 7461 g of a DIME atta │ │ │ │ +00114ec0: 6368 6d65 6e74 2069 6e74 6f20 6120 6669 chment into a fi │ │ │ │ +00114ed0: 6c65 2062 7920 6120 636c 6965 6e74 3a3c le by a client:< │ │ │ │ +00114ee0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    int │ │ │ │ +00114f30: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .< │ │ │ │ +00114f40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00114f50: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct soap │ │ │ │ +00114fc0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +00114ff0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init( │ │ │ │ +00115070: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +001150a0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    . │ │ │ │ +001150c0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.fdimewr │ │ │ │ +00115150: 6974 656f 7065 6e3c 2f61 3e20 3d20 6469 iteopen = di │ │ │ │ +00115160: 6d65 5f77 7269 7465 5f6f 7065 6e3b 203c me_write_open; < │ │ │ │ +00115170: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.fdimewriteclose │ │ │ │ +00115220: 3c2f 613e 203d 2064 696d 655f 7772 6974 = dime_writ │ │ │ │ +00115230: 655f 636c 6f73 653b 203c 2f64 6976 3e0a e_close;
    . │ │ │ │ +00115240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ +00115300: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00115310: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00115330: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal │ │ │ │ +00115340: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod( │ │ │ │ +00115350: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +00115380: 3c2f 613e 2c20 2e2e 2e29 293c 2f64 6976 , ...))
    .
    ... // error
    .
    else
    .
    .. │ │ │ │ +00115430: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe │ │ │ │ +00115450: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    . │ │ │ │ +00115460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .< │ │ │ │ -001154b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001154c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ -001154e0: 2f73 7061 6e3e 202a 6469 6d65 5f77 7269 /span> *dime_wri │ │ │ │ -001154f0: 7465 5f6f 7065 6e28 3c73 7061 6e20 636c te_open(st │ │ │ │ -00115510: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const │ │ │ │ -001155a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -001155c0: 2f73 7061 6e3e 202a 3c73 7061 6e20 636c /span> *id, const │ │ │ │ -00115610: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *type, const │ │ │ │ -00115660: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *options) │ │ │ │ +001154a0: 226c 696e 6522 3e3c 7370 616e 2063 6c61 "line">void *di │ │ │ │ +001154d0: 6d65 5f77 7269 7465 5f6f 7065 6e28 3c73 me_write_open(struct soap *soap, const< │ │ │ │ +00115580: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *id, const │ │ │ │ +00115610: 6368 6172 3c2f 7370 616e 3e20 2a74 7970 char *typ │ │ │ │ +00115620: 652c 203c 7370 616e 2063 6c61 7373 3d22 e, const │ │ │ │ +00115660: 6368 6172 3c2f 7370 616e 3e20 2a6f 7074 char *opt │ │ │ │ +00115670: 696f 6e73 2920 3c2f 6469 763e 0a3c 6469 ions)
    .{ │ │ │ │ 00115690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ -001156b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FILE *handl │ │ │ │ -001156d0: 6520 3d20 3c61 2063 6c61 7373 3d22 636f e = fopen │ │ │ │ -00115730: 3c2f 613e 283c 7370 616e 2063 6c61 7373 ("somefile& │ │ │ │ -00115760: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, " │ │ │ │ -00115790: 7762 2671 756f 743b 3c2f 7370 616e 3e29 wb") │ │ │ │ -001157a0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if │ │ │ │ -001157e0: 2028 2168 616e 646c 6529 203c 2f64 6976 (!handle)
    .
    {
    . │ │ │ │ -00115820: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap< │ │ │ │ -00115850: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error = SOAP_EOF; < │ │ │ │ -00115910: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..< │ │ │ │ -001159f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00115a00: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ -00115a20: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -00115a40: 3c2f 7370 616e 3e20 283c 7370 616e 2063 (void*) │ │ │ │ -00115a70: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .< │ │ │ │ -00115a80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00115a90: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    │ │ │ │ -00115ae0: 766f 6964 3c2f 7370 616e 3e20 6469 6d65 void dime │ │ │ │ -00115af0: 5f77 7269 7465 5f63 6c6f 7365 283c 7370 _write_close(struct │ │ │ │ -00115b20: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -00115b50: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, voi │ │ │ │ -00115ba0: 643c 2f73 7061 6e3e 202a 6861 6e64 6c65 d *handle │ │ │ │ -00115bb0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    fc │ │ │ │ -00115c40: 6c6f 7365 3c2f 613e 2828 4649 4c45 2a29 lose((FILE*) │ │ │ │ -00115c50: 6861 6e64 6c65 293b 203c 2f64 6976 3e0a handle);
    . │ │ │ │ -00115c60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int dime │ │ │ │ -00115cd0: 5f77 7269 7465 283c 7370 616e 2063 6c61 _write(str │ │ │ │ -00115cf0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const < │ │ │ │ -00115db0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00115dc0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *b │ │ │ │ -00115e20: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t │ │ │ │ -00115e50: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    .
    {< │ │ │ │ -00115e70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t nwritten; .
    while (l │ │ │ │ -00115f00: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    { │ │ │ │ -00115f20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    nwr │ │ │ │ -00115f40: 6974 7465 6e20 3d20 6677 7269 7465 283c itten = fwrite(< │ │ │ │ -00115f50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00115f60: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00115f70: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba │ │ │ │ -00115f80: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16 │ │ │ │ -00115f90: 3561 3536 3831 223e 6275 663c 2f61 3e2c 5a5681">buf, │ │ │ │ -00115fa0: 2031 2c20 6c65 6e2c 2028 4649 4c45 2a29 1, len, (FILE*) │ │ │ │ -00115fb0: 6861 6e64 6c65 293b 203c 2f64 6976 3e0a handle);
    . │ │ │ │ -00115fc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -00115ff0: 6966 3c2f 7370 616e 3e20 2821 6e77 7269 if (!nwri │ │ │ │ -00116000: 7474 656e 2920 3c2f 6469 763e 0a3c 6469 tten)
    . │ │ │ │ -00116020: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    │ │ │ │ -00116040: 2020 203c 6120 636c 6173 733d 2263 6f64 soap-> │ │ │ │ -001160c0: 6572 726e 756d 3c2f 613e 203d 2065 7272 errnum = err │ │ │ │ -001160d0: 6e6f 3b20 3c73 7061 6e20 636c 6173 733d no; // get │ │ │ │ -001160f0: 2072 6561 736f 6e20 3c2f 7370 616e 3e3c reason < │ │ │ │ -00116100: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..< │ │ │ │ -001161b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001161c0: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    . │ │ │ │ -001161e0: 2020 2020 6c65 6e20 2d3d 206e 7772 6974 len -= nwrit │ │ │ │ -001161f0: 7465 6e3b 203c 2f64 6976 3e0a 3c64 6976 ten;
    .
    │ │ │ │ -00116210: 2020 3c61 2063 6c61 7373 3d22 636f 6465 buf += nwritten; │ │ │ │ -00116270: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    return │ │ │ │ -001162d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK; │ │ │ │ -00116330: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }
    .
    int(* fdime │ │ │ │ -00116440: 7772 6974 6529 2873 7472 7563 7420 736f write)(struct so │ │ │ │ -00116450: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void * │ │ │ │ -00116460: 2c20 636f 6e73 7420 6368 6172 202a 2c20 , const char *, │ │ │ │ -00116470: 7369 7a65 5f74 293c 2f64 6976 3e3c 6469 size_t)
    │ │ │ │ -00116490: 4361 6c6c 6261 636b 2074 6f20 7772 6974 Callback to writ │ │ │ │ -001164a0: 6520 6461 7461 2069 6e20 6120 4449 4d45 e data in a DIME │ │ │ │ -001164b0: 2061 7474 6163 686d 656e 7420 7374 7265 attachment stre │ │ │ │ -001164c0: 616d 2e3c 2f64 6976 3e3c 6469 7620 636c am.
    D │ │ │ │ -001164e0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ -001164f0: 7464 736f 6170 322e 683a 3438 3232 3c2f tdsoap2.h:4822
    .
    < │ │ │ │ -001165e0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -001165f0: 6922 3e76 6f69 6428 2a20 6664 696d 6577 i">void(* fdimew │ │ │ │ -00116600: 7269 7465 636c 6f73 6529 2873 7472 7563 riteclose)(struc │ │ │ │ -00116610: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo │ │ │ │ -00116620: 6964 202a 6861 6e64 6c65 293c 2f64 6976 id *handle)
    Callback to │ │ │ │ -00116650: 636c 6f73 6520 6120 4449 4d45 2061 7474 close a DIME att │ │ │ │ -00116660: 6163 686d 656e 7420 7374 7265 616d 2061 achment stream a │ │ │ │ -00116670: 6674 6572 2077 7269 7469 6e67 2e3c 2f64 fter writing.
    Definit │ │ │ │ -001166a0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ -001166b0: 322e 683a 3438 3333 3c2f 6469 763e 3c2f 2.h:4833
    .
    │ │ │ │ -00116730: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap:: │ │ │ │ -00116780: 6664 696d 6577 7269 7465 6f70 656e 3c2f fdimewriteopen
    void │ │ │ │ -001167b0: 202a 282a 2066 6469 6d65 7772 6974 656f *(* fdimewriteo │ │ │ │ -001167c0: 7065 6e29 2873 7472 7563 7420 736f 6170 pen)(struct soap │ │ │ │ -001167d0: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch │ │ │ │ -001167e0: 6172 202a 6964 2c20 636f 6e73 7420 6368 ar *id, const ch │ │ │ │ -001167f0: 6172 202a 7479 7065 2c20 636f 6e73 7420 ar *type, const │ │ │ │ -00116800: 6368 6172 202a 6f70 7469 6f6e 7329 3c2f char *options)
    Callback │ │ │ │ -00116830: 746f 206f 7065 6e20 6120 7374 7265 616d to open a stream │ │ │ │ -00116840: 696e 6720 4449 4d45 2061 7474 6163 686d ing DIME attachm │ │ │ │ -00116850: 656e 7420 666f 7220 7772 6974 696e 672e ent for writing. │ │ │ │ -00116860: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -00116880: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -00116890: 6f61 7032 2e68 3a34 3831 303c 2f64 6976 oap2.h:4810
    .
    < │ │ │ │ -00116900: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -00116910: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">soa │ │ │ │ -00116960: 703a 3a66 6f70 656e 3c2f 613e 3c2f 6469 p::fopen
    SOAP_SOCKE │ │ │ │ -00116990: 5428 2a20 666f 7065 6e29 2873 7472 7563 T(* fopen)(struc │ │ │ │ -001169a0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co │ │ │ │ -001169b0: 6e73 7420 6368 6172 202a 656e 6470 6f69 nst char *endpoi │ │ │ │ -001169c0: 6e74 2c20 636f 6e73 7420 6368 6172 202a nt, const char * │ │ │ │ -001169d0: 686f 7374 2c20 696e 7420 706f 7274 293c host, int port)< │ │ │ │ -001169e0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback │ │ │ │ -00116a00: 2074 6861 7420 6f70 656e 7320 6120 736f that opens a so │ │ │ │ -00116a10: 636b 6574 2063 6f6e 6e65 6374 696f 6e20 cket connection │ │ │ │ -00116a20: 746f 2061 2073 6572 7665 7220 656e 6470 to a server endp │ │ │ │ -00116a30: 6f69 6e74 2e3c 2f64 6976 3e3c 6469 7620 oint.
    Definition: │ │ │ │ -00116a60: 2073 7464 736f 6170 322e 683a 3434 3935 stdsoap2.h:4495 │ │ │ │ -00116a70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    . │ │ │ │ -00116c10: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    #define SOA │ │ │ │ -00116cf0: 505f 454f 463c 2f64 6976 3e3c 6469 7620 P_EOF
    A │ │ │ │ -00116d10: 736f 6170 5f73 7461 7475 7320 6572 726f soap_status erro │ │ │ │ -00116d20: 7220 636f 6465 3a20 756e 6578 7065 6374 r code: unexpect │ │ │ │ -00116d30: 6564 2065 6e64 206f 6620 6669 6c65 2c20 ed end of file, │ │ │ │ -00116d40: 6e6f 2069 6e70 7574 2c20 7472 616e 736d no input, transm │ │ │ │ -00116d50: 6973 7369 6f6e 2069 6e74 6572 7275 7074 ission interrupt │ │ │ │ -00116d60: 6564 206f 7220 7469 6d65 6420 6f75 7420 ed or timed out │ │ │ │ -00116d70: 2873 612e 2e2e 3c2f 6469 763e 3c64 6976 (sa...
    < │ │ │ │ -00116d90: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:236 │ │ │ │ -00116db0: 353c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 5
    .

    Message │ │ │ │ -00116de0: 636f 6d70 7265 7373 696f 6e20 7769 7468 compression with │ │ │ │ -00116df0: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC │ │ │ │ -00116e00: 5f5a 4c49 423c 2f63 6f64 653e 2063 616e _ZLIB can │ │ │ │ -00116e10: 2062 6520 7573 6564 2077 6974 6820 4449 be used with DI │ │ │ │ -00116e20: 4d45 2074 6f20 636f 6d70 7265 7373 2074 ME to compress t │ │ │ │ -00116e30: 6865 2065 6e74 6972 6520 6d65 7373 6167 he entire messag │ │ │ │ -00116e40: 652e 2048 6f77 6576 6572 2c20 636f 6d70 e. However, comp │ │ │ │ -00116e50: 7265 7373 696f 6e20 7265 7175 6972 6573 ression requires │ │ │ │ -00116e60: 2062 7566 6665 7269 6e67 2074 6f20 6465 buffering to de │ │ │ │ -00116e70: 7465 726d 696e 6520 7468 6520 4854 5450 termine the HTTP │ │ │ │ -00116e80: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length │ │ │ │ -00116e90: 6865 6164 6572 2c20 7768 6963 6820 6361 header, which ca │ │ │ │ -00116ea0: 6e63 656c 7320 7468 6520 6265 6e65 6669 ncels the benefi │ │ │ │ -00116eb0: 7473 206f 6620 7374 7265 616d 696e 6720 ts of streaming │ │ │ │ -00116ec0: 4449 4d45 2e20 546f 2061 766f 6964 2074 DIME. To avoid t │ │ │ │ -00116ed0: 6869 732c 2079 6f75 2073 686f 756c 6420 his, you should │ │ │ │ -00116ee0: 7573 6520 6368 756e 6b65 6420 4854 5450 use chunked HTTP │ │ │ │ -00116ef0: 2028 7769 7468 2074 6865 206f 7574 7075 (with the outpu │ │ │ │ -00116f00: 742d 6d6f 6465 203c 636f 6465 3e23 534f t-mode #SO │ │ │ │ -00116f10: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK flag) with co │ │ │ │ -00116f30: 6d70 7265 7373 696f 6e20 616e 6420 7374 mpression and st │ │ │ │ -00116f40: 7265 616d 696e 6720 4449 4d45 2e20 4174 reaming DIME. At │ │ │ │ -00116f50: 2074 6865 2073 6572 7665 7220 7369 6465 the server side │ │ │ │ -00116f60: 2c20 7768 656e 2079 6f75 2073 6574 203c , when you set < │ │ │ │ -00116f70: 636f 6465 3e23 534f 4150 5f49 4f5f 4348 code>#SOAP_IO_CH │ │ │ │ -00116f80: 554e 4b3c 2f63 6f64 653e 2062 6566 6f72 UNK befor │ │ │ │ -00116f90: 6520 6361 6c6c 696e 6720 3c63 6f64 653e e calling │ │ │ │ -00116fa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s │ │ │ │ -00117010: 6f61 705f 7365 7276 653c 2f61 3e3c 2f63 oap_serve, the engine │ │ │ │ -00117030: 2077 696c 6c20 6175 746f 6d61 7469 6361 will automatica │ │ │ │ -00117040: 6c6c 7920 7265 7665 7274 2074 6f20 6275 lly revert to bu │ │ │ │ -00117050: 6666 6572 696e 6720 283c 636f 6465 3e23 ffering (# │ │ │ │ -00117060: 534f 4150 5f49 4f5f 5354 4f52 453c 2f63 SOAP_IO_STORE flag is set │ │ │ │ -00117080: 292e 2059 6f75 2063 616e 2063 6865 636b ). You can check │ │ │ │ -00117090: 2074 6869 7320 666c 6167 2077 6974 6820 this flag with │ │ │ │ -001170a0: 3c63 6f64 653e 2873 6f61 702d 2667 743b (soap-> │ │ │ │ -001170b0: 6f6d 6f64 6520 2661 6d70 3b20 534f 4150 omode & SOAP │ │ │ │ -001170c0: 5f49 4f29 203d 3d20 534f 4150 5f49 4f5f _IO) == SOAP_IO_ │ │ │ │ -001170d0: 4348 554e 4b3c 2f63 6f64 653e 2074 6f20 CHUNK to │ │ │ │ -001170e0: 7365 6520 6966 2074 6865 2063 6c69 656e see if the clien │ │ │ │ -001170f0: 7420 6163 6365 7074 7320 6368 756e 6b69 t accepts chunki │ │ │ │ -00117100: 6e67 2e20 4d6f 7265 2069 6e66 6f72 6d61 ng. More informa │ │ │ │ -00117110: 7469 6f6e 2061 626f 7574 2073 7472 6561 tion about strea │ │ │ │ -00117120: 6d69 6e67 2063 6875 6e6b 6564 2044 494d ming chunked DIM │ │ │ │ -00117130: 4520 6361 6e20 6265 2066 6f75 6e64 2069 E can be found i │ │ │ │ -00117140: 6e20 5365 6374 696f 6e20 3c61 2063 6c61 n Section Streaming │ │ │ │ -00117180: 2063 6875 6e6b 6564 2044 494d 453c 2f61 chunked DIME .

    .
    Warning< │ │ │ │ -001171c0: 2f64 743e 3c64 643e 5468 6520 3c63 6f64 /dt>
    The options │ │ │ │ -001171e0: 206d 656d 6265 7220 6973 2061 2044 494d member is a DIM │ │ │ │ -001171f0: 452d 7370 6563 6966 6963 2064 6174 6120 E-specific data │ │ │ │ -00117200: 7374 7275 6374 7572 652c 2063 6f6e 7369 structure, consi │ │ │ │ -00117210: 7374 696e 6720 6f66 2061 2034 2062 7974 sting of a 4 byt │ │ │ │ -00117220: 6520 6865 6164 6572 2063 6f6e 7461 696e e header contain │ │ │ │ -00117230: 696e 6720 7468 6520 6f70 7469 6f6e 2074 ing the option t │ │ │ │ -00117240: 7970 6520 696e 666f 2028 6869 2062 7974 ype info (hi byt │ │ │ │ -00117250: 652c 206c 6f20 6279 7465 292c 206f 7074 e, lo byte), opt │ │ │ │ -00117260: 696f 6e20 7374 7269 6e67 206c 656e 6774 ion string lengt │ │ │ │ -00117270: 6820 2868 6920 6279 7465 2c20 6c6f 2062 h (hi byte, lo b │ │ │ │ -00117280: 7974 6529 2c20 666f 6c6c 6f77 6564 2062 yte), followed b │ │ │ │ -00117290: 7920 6120 6e6f 6e2d 275c 3027 2074 6572 y a non-'\0' ter │ │ │ │ -001172a0: 6d69 6e61 7465 6420 7374 7269 6e67 2e20 minated string. │ │ │ │ -001172b0: 5468 6520 4449 4d45 2068 616e 646c 6572 The DIME handler │ │ │ │ -001172c0: 2072 6563 6f67 6e69 7a65 7320 6f6e 6520 recognizes one │ │ │ │ -001172d0: 6f70 7469 6f6e 2061 7420 6d6f 7374 2e3c option at most.< │ │ │ │ -001172e0: 2f64 643e 3c2f 646c 3e0a 3c70 3ef0 9f94 /dd>
    .

    ... │ │ │ │ -001172f0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -00117300: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -00117310: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -00117320: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Str │ │ │ │ -00117350: 6561 6d69 6e67 2063 6875 6e6b 6564 2044 eaming chunked D │ │ │ │ -00117360: 494d 453c 2f68 323e 0a3c 703e 546f 2073 IME

    .

    To s │ │ │ │ -00117370: 656e 6420 4449 4d45 2061 7474 6163 686d end DIME attachm │ │ │ │ -00117380: 656e 7473 2c20 7468 6520 6174 7461 6368 ents, the attach │ │ │ │ -00117390: 6d65 6e74 2073 697a 6573 206d 7573 7420 ment sizes must │ │ │ │ -001173a0: 6265 2064 6574 6572 6d69 6e65 6420 696e be determined in │ │ │ │ -001173b0: 2061 6476 616e 6365 2074 6f20 6361 6c63 advance to calc │ │ │ │ -001173c0: 756c 6174 6520 4854 5450 206d 6573 7361 ulate HTTP messa │ │ │ │ -001173d0: 6765 206c 656e 6774 6820 7265 7175 6972 ge length requir │ │ │ │ -001173e0: 6564 2074 6f20 7374 7265 616d 2044 494d ed to stream DIM │ │ │ │ -001173f0: 4520 6f76 6572 2048 5454 502e 2048 6f77 E over HTTP. How │ │ │ │ -00117400: 6576 6572 2c20 6368 756e 6b65 6420 4449 ever, chunked DI │ │ │ │ -00117410: 4d45 2074 6f67 6574 6865 7220 7769 7468 ME together with │ │ │ │ -00117420: 2063 6875 6e6b 6564 2048 5454 5020 6361 chunked HTTP ca │ │ │ │ -00117430: 6e20 6265 2075 7365 6420 746f 206f 6d69 n be used to omi │ │ │ │ -00117440: 7420 7468 6973 2073 7465 702e 2046 6972 t this step. Fir │ │ │ │ -00117450: 7374 2073 6574 2074 6865 203c 636f 6465 st set the #SOAP_IO_CHUNK< │ │ │ │ -00117470: 2f63 6f64 653e 2066 6c61 672e 2054 6865 /code> flag. The │ │ │ │ -00117480: 6e2c 2074 6f20 7374 7265 616d 2063 6875 n, to stream chu │ │ │ │ -00117490: 6e6b 6564 2044 494d 452c 2073 6574 2074 nked DIME, set t │ │ │ │ -001174a0: 6865 203c 636f 6465 3e5f 5f73 697a 653c he __size< │ │ │ │ -001174b0: 2f63 6f64 653e 206d 656d 6265 7220 6f66 /code> member of │ │ │ │ -001174c0: 2061 6e20 6174 7461 6368 6d65 6e74 2074 an attachment t │ │ │ │ -001174d0: 6f20 7a65 726f 2061 6e64 2065 6e61 626c o zero and enabl │ │ │ │ -001174e0: 6520 4449 4d45 2063 6875 6e6b 696e 672e e DIME chunking. │ │ │ │ -001174f0: 2054 6865 2044 494d 4520 3c63 6f64 653e The DIME │ │ │ │ -00117500: 3c61 2063 6c61 7373 3d22 656c 2220 6872 │ │ │ │ -00117590: 736f 6170 3a3a 6664 696d 6572 6561 643c soap::fdimeread< │ │ │ │ -001175a0: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb │ │ │ │ -001175b0: 6163 6b20 7468 656e 2066 6574 6368 6573 ack then fetches │ │ │ │ -001175c0: 2064 6174 6120 696e 2063 6875 6e6b 7320 data in chunks │ │ │ │ -001175d0: 616e 6420 6974 2069 7320 696d 706f 7274 and it is import │ │ │ │ -001175e0: 616e 7420 746f 2066 696c 6c20 7468 6520 ant to fill the │ │ │ │ -001175f0: 656e 7469 7265 2062 7566 6665 7220 756e entire buffer un │ │ │ │ -00117600: 6c65 7373 2074 6865 2065 6e64 206f 6620 less the end of │ │ │ │ -00117610: 7468 6520 6461 7461 2068 6173 2062 6565 the data has bee │ │ │ │ -00117620: 6e20 7265 6163 6865 6420 616e 6420 7468 n reached and th │ │ │ │ -00117630: 6520 6c61 7374 2063 6875 6e6b 2069 7320 e last chunk is │ │ │ │ -00117640: 746f 2062 6520 7365 6e64 2e20 5468 6174 to be send. That │ │ │ │ -00117650: 2069 732c 203c 636f 6465 3e3c 6120 636c is, soap: │ │ │ │ -001176f0: 3a66 6469 6d65 7265 6164 3c2f 613e 3c2f :fdimeread should ret │ │ │ │ -00117710: 7572 6e20 7468 6520 7661 6c75 6520 6f66 urn the value of │ │ │ │ -00117720: 2074 6865 206c 6173 7420 3c63 6f64 653e the last │ │ │ │ -00117730: 6c65 6e3c 2f63 6f64 653e 2070 6172 616d len param │ │ │ │ -00117740: 6574 6572 2061 6e64 2066 696c 6c20 7468 eter and fill th │ │ │ │ -00117750: 6520 656e 7469 7265 2062 7566 6665 7220 e entire buffer │ │ │ │ -00117760: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf │ │ │ │ -00117770: 2066 6f72 2061 6c6c 2063 6875 6e6b 7320 for all chunks │ │ │ │ -00117780: 6578 6365 7074 2074 6865 206c 6173 742e except the last. │ │ │ │ -00117790: 2046 6f72 2074 6865 206c 6173 7420 6974 For the last it │ │ │ │ -001177a0: 2072 6574 7572 6e73 2030 2e3c 2f70 3e0a returns 0.

    . │ │ │ │ -001177b0: 3c70 3e59 6f75 2063 616e 2061 6c73 6f20

    You can also │ │ │ │ -001177c0: 7573 6520 7468 6520 3c63 6f64 653e 2353 use the #S │ │ │ │ -001177d0: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE flag, but th │ │ │ │ -001177f0: 6174 2063 616e 6365 6c73 2074 6865 2062 at cancels the b │ │ │ │ -00117800: 656e 6566 6974 7320 6f66 2073 7472 6561 enefits of strea │ │ │ │ -00117810: 6d69 6e67 2044 494d 452e 3c2f 703e 0a3c ming DIME.

    .< │ │ │ │ -00117820: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -00117840: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -00117850: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .WS │ │ │ │ -00117880: 444c 2062 696e 6469 6e67 7320 666f 7220 DL bindings for │ │ │ │ -00117890: 4449 4d45 2061 7474 6163 686d 656e 7473 DIME attachments │ │ │ │ -001178a0: 3c2f 6832 3e0a 3c70 3e54 6865 2077 7364

    .

    The wsd │ │ │ │ -001178b0: 6c32 6820 746f 6f6c 2072 6563 6f67 6e69 l2h tool recogni │ │ │ │ -001178c0: 7a65 7320 4449 4d45 2061 7474 6163 686d zes DIME attachm │ │ │ │ -001178d0: 656e 7473 2061 6e64 2070 726f 6475 6365 ents and produce │ │ │ │ -001178e0: 7320 616e 2061 6e6e 6f74 6174 6564 2068 s an annotated h │ │ │ │ -001178f0: 6561 6465 7220 6669 6c65 2e20 426f 7468 eader file. Both │ │ │ │ -00117900: 206f 7065 6e20 616e 6420 636c 6f73 6564 open and closed │ │ │ │ -00117910: 206c 6179 6f75 7473 2061 7265 2073 7570 layouts are sup │ │ │ │ -00117920: 706f 7274 6564 2066 6f72 2074 7261 6e73 ported for trans │ │ │ │ -00117930: 6d69 7474 696e 6720 4449 4d45 2061 7474 mitting DIME att │ │ │ │ -00117940: 6163 686d 656e 7473 2e20 466f 7220 636c achments. For cl │ │ │ │ -00117950: 6f73 6564 2066 6f72 6d61 7473 2c20 616c osed formats, al │ │ │ │ -00117960: 6c20 4449 4d45 2061 7474 6163 686d 656e l DIME attachmen │ │ │ │ -00117970: 7473 206d 7573 7420 6265 2072 6566 6572 ts must be refer │ │ │ │ -00117980: 656e 6365 6420 6672 6f6d 2074 6865 2053 enced from the S │ │ │ │ -00117990: 4f41 5020 6d65 7373 6167 652c 2065 2e67 OAP message, e.g │ │ │ │ -001179a0: 2e20 7573 696e 6720 6872 6566 7320 7769 . using hrefs wi │ │ │ │ -001179b0: 7468 2053 4f41 5020 656e 636f 6469 6e67 th SOAP encoding │ │ │ │ -001179c0: 2061 6e64 2075 7369 6e67 2074 6865 2061 and using the a │ │ │ │ -001179d0: 7070 6c69 6361 7469 6f6e 2d73 7065 6369 pplication-speci │ │ │ │ -001179e0: 6669 6320 7265 6665 7265 6e63 6520 6174 fic reference at │ │ │ │ -001179f0: 7472 6962 7574 6520 696e 636c 7564 6564 tribute included │ │ │ │ -00117a00: 2069 6e20 7468 6520 3c63 6f64 653e 3c61 in the xsd_ │ │ │ │ -00117a80: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary struct │ │ │ │ -00117aa0: 6f72 2063 6c61 7373 2066 6f72 2064 6f63 or class for doc │ │ │ │ -00117ab0: 756d 656e 742f 6c69 7465 7261 6c20 6d65 ument/literal me │ │ │ │ -00117ac0: 7373 6167 696e 672e 3c2f 703e 0a3c 703e ssaging.

    .

    │ │ │ │ -00117ad0: 5468 6520 736f 6170 6370 7032 2074 6f6f The soapcpp2 too │ │ │ │ -00117ae0: 6c20 646f 6573 206e 6f74 2070 726f 6475 l does not produ │ │ │ │ -00117af0: 6365 2061 2057 5344 4c20 7769 7468 2044 ce a WSDL with D │ │ │ │ -00117b00: 494d 4520 6578 7465 6e73 696f 6e73 2e20 IME extensions. │ │ │ │ -00117b10: 4449 4d45 2069 7320 616e 206f 6c64 6572 DIME is an older │ │ │ │ -00117b20: 2062 696e 6172 7920 666f 726d 6174 2074 binary format t │ │ │ │ -00117b30: 6861 7420 6861 7320 6e6f 2057 5344 4c20 hat has no WSDL │ │ │ │ -00117b40: 7072 6f74 6f63 6f6c 2073 7570 706f 7274 protocol support │ │ │ │ -00117b50: 2c20 756e 6c69 6b65 204d 494d 4520 616e , unlike MIME an │ │ │ │ -00117b60: 6420 4d54 4f4d 2e3c 2f70 3e0a 3c70 3ef0 d MTOM.

    .

    . │ │ │ │ -00117b70: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -00117b80: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -00117b90: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .MTOM atta │ │ │ │ -00117bd0: 6368 6d65 6e74 733c 2f68 313e 0a3c 703e chments

    .

    │ │ │ │ -00117be0: 4d54 4f4d 2028 4d65 7373 6167 6520 5472 MTOM (Message Tr │ │ │ │ -00117bf0: 616e 736d 6973 7369 6f6e 204f 7074 696d ansmission Optim │ │ │ │ -00117c00: 697a 6174 696f 6e20 4d65 6368 616e 6973 ization Mechanis │ │ │ │ -00117c10: 6d29 2069 7320 6120 7265 6c61 7469 7665 m) is a relative │ │ │ │ -00117c20: 6c79 206e 6577 2066 6f72 6d61 7420 666f ly new format fo │ │ │ │ -00117c30: 7220 7472 616e 736d 6974 7469 6e67 2061 r transmitting a │ │ │ │ -00117c40: 7474 6163 686d 656e 7473 2077 6974 6820 ttachments with │ │ │ │ -00117c50: 534f 4150 206d 6573 7361 6765 7320 2873 SOAP messages (s │ │ │ │ -00117c60: 6565 203c 6120 6872 6566 3d22 6874 7470 ee ht │ │ │ │ -00117c90: 7470 3a2f 2f77 7777 2e77 332e 6f72 672f tp://www.w3.org/ │ │ │ │ -00117ca0: 5452 2f73 6f61 7031 322d 6d74 6f6d 3c2f TR/soap12-mtom). MTOM attach │ │ │ │ -00117cc0: 6d65 6e74 7320 6172 6520 6573 7365 6e74 ments are essent │ │ │ │ -00117cd0: 6961 6c6c 7920 4d49 4d45 2061 7474 6163 ially MIME attac │ │ │ │ -00117ce0: 686d 656e 7473 2077 6974 6820 7374 616e hments with stan │ │ │ │ -00117cf0: 6461 7264 697a 6564 206d 6563 6861 6e69 dardized mechani │ │ │ │ -00117d00: 736d 7320 666f 7220 6372 6f73 7320 7265 sms for cross re │ │ │ │ -00117d10: 6665 7265 6e63 696e 6720 6174 7461 6368 ferencing attach │ │ │ │ -00117d20: 6d65 6e74 7320 6672 6f6d 2074 6865 2053 ments from the S │ │ │ │ -00117d30: 4f41 5020 626f 6479 2c20 7768 6963 6820 OAP body, which │ │ │ │ -00117d40: 6973 2061 6273 656e 7420 696e 2028 706c is absent in (pl │ │ │ │ -00117d50: 6169 6e29 204d 494d 4520 6174 7461 6368 ain) MIME attach │ │ │ │ -00117d60: 6d65 6e74 7320 616e 6420 6f70 7469 6f6e ments and option │ │ │ │ -00117d70: 616c 2077 6974 6820 4449 4d45 2061 7474 al with DIME att │ │ │ │ -00117d80: 6163 686d 656e 7473 2e3c 2f70 3e0a 3c70 achments.

    .

    Unlike the name │ │ │ │ -00117da0: 2073 7567 6765 7374 732c 2074 6865 2073 suggests, the s │ │ │ │ -00117db0: 7065 6564 2062 7920 7768 6963 6820 6174 peed by which at │ │ │ │ -00117dc0: 7461 6368 6564 2064 6174 6120 6973 2074 tached data is t │ │ │ │ -00117dd0: 7261 6e73 6d69 7474 6564 2069 7320 6e6f ransmitted is no │ │ │ │ -00117de0: 7420 696e 6372 6561 7365 6420 636f 6d70 t increased comp │ │ │ │ -00117df0: 6172 6564 2074 6f20 4d49 4d45 2c20 4449 ared to MIME, DI │ │ │ │ -00117e00: 4d45 2c20 6f72 2065 7665 6e20 584d 4c20 ME, or even XML │ │ │ │ -00117e10: 656e 636f 6465 6420 6261 7365 3634 2064 encoded base64 d │ │ │ │ -00117e20: 6174 612c 2062 6563 6175 7365 2074 6865 ata, because the │ │ │ │ -00117e30: 2070 6572 666f 726d 616e 6365 2064 6966 performance dif │ │ │ │ -00117e40: 6665 7265 6e63 6573 2077 6865 6e20 7573 ferences when us │ │ │ │ -00117e50: 696e 6720 6753 4f41 5020 7769 6c6c 2062 ing gSOAP will b │ │ │ │ -00117e60: 6520 736d 616c 6c2e 2054 6865 2061 6476 e small. The adv │ │ │ │ -00117e70: 616e 7461 6765 206f 6620 7468 6520 666f antage of the fo │ │ │ │ -00117e80: 726d 6174 2069 7320 7468 6520 7374 616e rmat is the stan │ │ │ │ -00117e90: 6461 7264 697a 6564 2061 7474 6163 686d dardized attachm │ │ │ │ -00117ea0: 656e 7420 7265 6665 7265 6e63 6520 6d65 ent reference me │ │ │ │ -00117eb0: 6368 616e 6973 6d2c 2077 6869 6368 2073 chanism, which s │ │ │ │ -00117ec0: 686f 756c 6420 696d 7072 6f76 6520 696e hould improve in │ │ │ │ -00117ed0: 7465 726f 7065 7261 6269 6c69 7479 2e3c teroperability.< │ │ │ │ -00117ee0: 2f70 3e0a 3c70 3e54 6865 204d 544f 4d20 /p>.

    The MTOM │ │ │ │ -00117ef0: 7370 6563 6966 6963 6174 696f 6e20 6d61 specification ma │ │ │ │ -00117f00: 6e64 6174 6573 2053 4f41 5020 312e 3220 ndates SOAP 1.2 │ │ │ │ -00117f10: 616e 6420 7468 6520 7573 6520 6f66 2074 and the use of t │ │ │ │ -00117f20: 6865 2058 4f50 206e 616d 6573 7061 6365 he XOP namespace │ │ │ │ -00117f30: 2e20 5468 6520 584f 5020 496e 636c 7564 . The XOP Includ │ │ │ │ -00117f40: 6520 656c 656d 656e 7420 3c65 6d3e 3c63 e element xop:Include< │ │ │ │ -00117f60: 2f63 6f64 653e 3c2f 656d 3e20 6973 2064 /code> is d │ │ │ │ -00117f70: 6566 696e 6564 2069 6e20 7468 6520 696e efined in the in │ │ │ │ -00117f80: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f │ │ │ │ -00117f90: 696c 6520 6173 2061 203c 636f 6465 3e3c ile as a < │ │ │ │ -00117fa0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00117fb0: 663d 2273 7472 7563 745f 5f78 6f70 5f5f f="struct__xop__ │ │ │ │ -00117fc0: 5f5f 5f69 6e63 6c75 6465 2e68 746d 6c22 ___include.html" │ │ │ │ -00117fd0: 2074 6974 6c65 3d22 584f 5020 696e 636c title="XOP incl │ │ │ │ -00117fe0: 7564 6520 7374 7275 6374 7572 6520 7769 ude structure wi │ │ │ │ -00117ff0: 7468 2061 7474 6163 686d 656e 7420 6461 th attachment da │ │ │ │ -00118000: 7461 2e22 3e5f 786f 705f 5f49 6e63 6c75 ta.">_xop__Inclu │ │ │ │ -00118010: 6465 3c2f 613e 3c2f 636f 6465 3e20 7374 de st │ │ │ │ -00118020: 7275 6374 206f 7220 636c 6173 732c 2074 ruct or class, t │ │ │ │ -00118030: 6861 7420 6973 2075 7365 6420 746f 2072 hat is used to r │ │ │ │ -00118040: 6566 6572 656e 6365 2061 7474 6163 686d eference attachm │ │ │ │ -00118050: 656e 7428 7329 2066 726f 6d20 7468 6520 ent(s) from the │ │ │ │ -00118060: 534f 4150 206d 6573 7361 6765 2062 6f64 SOAP message bod │ │ │ │ -00118070: 792e 3c2f 703e 0a3c 703e 4265 6361 7573 y.

    .

    Becaus │ │ │ │ -00118080: 6520 7265 6665 7265 6e63 6573 2066 726f e references fro │ │ │ │ -00118090: 6d20 7769 7468 696e 2074 6865 2053 4f41 m within the SOA │ │ │ │ -001180a0: 5020 6d65 7373 6167 6520 626f 6479 2074 P message body t │ │ │ │ -001180b0: 6f20 6174 7461 6368 6d65 6e74 7320 6172 o attachments ar │ │ │ │ -001180c0: 6520 6d61 6e64 6174 6f72 7920 7769 7468 e mandatory with │ │ │ │ -001180d0: 204d 544f 4d2c 2074 6865 2069 6d70 6c65 MTOM, the imple │ │ │ │ -001180e0: 6d65 6e74 6174 696f 6e20 6f66 2074 6865 mentation of the │ │ │ │ -001180f0: 2073 6572 6961 6c69 7a61 7469 6f6e 2061 serialization a │ │ │ │ -00118100: 6e64 2064 6573 6572 6961 6c69 7a61 7469 nd deserializati │ │ │ │ -00118110: 6f6e 206f 6620 4d54 4f4d 204d 494d 4520 on of MTOM MIME │ │ │ │ -00118120: 6174 7461 6368 6d65 6e74 7320 7573 6573 attachments uses │ │ │ │ -00118130: 2074 6865 2065 7874 656e 6465 6420 6269 the extended bi │ │ │ │ -00118140: 6e61 7279 2074 7970 6520 636f 6d70 6172 nary type compar │ │ │ │ -00118150: 6162 6c65 2074 6f20 4449 4d45 2073 7570 able to DIME sup │ │ │ │ -00118160: 706f 7274 2e20 5468 6973 2062 696e 6172 port. This binar │ │ │ │ -00118170: 7920 7479 7065 2069 7320 7072 6564 6566 y type is predef │ │ │ │ -00118180: 696e 6564 2069 6e20 7468 6520 3c65 6d3e ined in the │ │ │ │ -00118190: 3c63 6f64 653e 696d 706f 7274 2f78 6f70 import/xop │ │ │ │ -001181a0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .h f │ │ │ │ -001181b0: 696c 653a 3c2f 703e 0a3c 6469 7620 636c ile:

    .
    < │ │ │ │ -001181d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001181e0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap x │ │ │ │ -00118200: 6f70 2073 6368 656d 6120 696d 706f 7274 op schema import │ │ │ │ -00118210: 3a20 6874 7470 3a2f 2f77 7777 2e77 332e : http://www.w3. │ │ │ │ -00118220: 6f72 672f 3230 3034 2f30 382f 786f 702f org/2004/08/xop/ │ │ │ │ -00118230: 696e 636c 7564 6520 3c2f 7370 616e 3e3c include < │ │ │ │ -00118240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ -00118270: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct │ │ │ │ -001182b0: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include
    .
    {.
    unsigned cha │ │ │ │ -00118340: 723c 2f73 7061 6e3e 202a 3c61 2063 6c61 r * │ │ │ │ -001183a0: 5f5f 7074 723c 2f61 3e3b 203c 2f64 6976 __ptr;
    .
    int __size; < │ │ │ │ -00118450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *id; │ │ │ │ -001184f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    │ │ │ │ -001185b0: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ -001185d0: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *o │ │ │ │ -00118630: 7074 696f 6e73 3c2f 613e 3b20 3c2f 6469 ptions; .
    };
    .< │ │ │ │ -00118660: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00118670: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >typedef stru │ │ │ │ -001186b0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct _x │ │ │ │ -001186f0: 6f70 5f5f 496e 636c 7564 653c 2f61 3e20 op__Include │ │ │ │ -00118700: 3c61 2063 6c61 7373 3d22 636f 6465 2220 _xop__Includ │ │ │ │ -00118740: 653c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 e;
    .
    _xop │ │ │ │ -001187c0: 5f5f 496e 636c 7564 653c 2f61 3e3c 2f64 __Include
    XOP includ │ │ │ │ -001187f0: 6520 7374 7275 6374 7572 6520 7769 7468 e structure with │ │ │ │ -00118800: 2061 7474 6163 686d 656e 7420 6461 7461 attachment data │ │ │ │ -00118810: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ │ -00118830: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ -00118840: 736f 6170 322e 683a 3938 3833 3c2f 6469 soap2.h:9883
    .
    < │ │ │ │ -001188b0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -001188c0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">_xop │ │ │ │ -00118910: 5f5f 496e 636c 7564 653a 3a74 7970 653c __Include::type< │ │ │ │ -00118920: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    MIME type of th │ │ │ │ -00118970: 6520 6461 7461 2e3c 2f64 6976 3e3c 6469 e data.
    │ │ │ │ -00118990: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:98 │ │ │ │ -001189b0: 3837 3c2f 6469 763e 3c2f 6469 763e 0a3c 87
    .< │ │ │ │ -001189c0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -001189d0: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id="astruct__xop │ │ │ │ -001189e0: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm │ │ │ │ -001189f0: 6c5f 6133 3738 6535 3535 6133 3564 6630 l_a378e555a35df0 │ │ │ │ -00118a00: 3431 6331 3464 3066 3736 3764 6431 3238 41c14d0f767dd128 │ │ │ │ -00118a10: 6332 3022 3e3c 6469 7620 636c 6173 733d c20">char * id
    │ │ │ │ -00118ab0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    NULL to gener │ │ │ │ -00118ad0: 6174 6520 616e 2069 6420 6f72 2061 7373 ate an id or ass │ │ │ │ -00118ae0: 6967 6e20 7468 6973 206d 656d 6265 7220 ign this member │ │ │ │ -00118af0: 7661 7269 6162 6c65 2061 2075 6e69 7175 variable a uniqu │ │ │ │ -00118b00: 6520 5555 4944 2e3c 2f64 6976 3e3c 6469 e UUID.
    │ │ │ │ -00118b20: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:98 │ │ │ │ -00118b40: 3836 3c2f 6469 763e 3c2f 6469 763e 0a3c 86
    .< │ │ │ │ -00118b50: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -00118b60: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id="astruct__xop │ │ │ │ -00118b70: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm │ │ │ │ -00118b80: 6c5f 6138 3934 6135 3464 6632 6430 3532 l_a894a54df2d052 │ │ │ │ -00118b90: 3938 3966 6632 6332 3064 3334 3466 3536 989ff2c20d344f56 │ │ │ │ -00118ba0: 6339 3122 3e3c 6469 7620 636c 6173 733d c91">
    _xop__Include: │ │ │ │ -00118c10: 3a6f 7074 696f 6e73 3c2f 613e 3c2f 6469 :options
    char * opt │ │ │ │ -00118c40: 696f 6e73 3c2f 6469 763e 3c64 6976 2063 ions
    des │ │ │ │ -00118c60: 6372 6970 7469 6f6e 206f 6620 7468 6520 cription of the │ │ │ │ -00118c70: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach │ │ │ │ -00118c80: 6d65 6e74 206f 7220 4e55 4c4c 3c2f 6469 ment or NULL
    Definiti │ │ │ │ -00118cb0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ -00118cc0: 2e68 3a39 3838 383c 2f64 6976 3e3c 2f64 .h:9888
    .
    _xop__Inc │ │ │ │ -00118d90: 6c75 6465 3a3a 5f5f 7369 7a65 3c2f 613e lude::__size │ │ │ │ -00118da0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int __ │ │ │ │ -00118dc0: 7369 7a65 3c2f 6469 763e 3c64 6976 2063 size
    siz │ │ │ │ -00118de0: 6520 6f66 2074 6865 2062 696e 6172 7920 e of the binary │ │ │ │ -00118df0: 6461 7461 3c2f 6469 763e 3c64 6976 2063 data
    │ │ │ │ -00118e10: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00118e20: 7374 6473 6f61 7032 2e68 3a39 3838 353c stdsoap2.h:9885< │ │ │ │ -00118e30: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    p │ │ │ │ -00118f50: 6f69 6e74 6572 2074 6f20 6269 6e61 7279 ointer to binary │ │ │ │ -00118f60: 2064 6174 613c 2f64 6976 3e3c 6469 7620 data
    Definition: │ │ │ │ -00118f90: 2073 7464 736f 6170 322e 683a 3938 3834 stdsoap2.h:9884 │ │ │ │ -00118fa0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The addit │ │ │ │ -00118fd0: 696f 6e61 6c20 3c63 6f64 653e 6964 3c2f ional id, typ │ │ │ │ -00118ff0: 653c 2f63 6f64 653e 2c20 616e 6420 3c63 e, and option members enable │ │ │ │ -00119020: 204d 544f 4d20 6174 7461 6368 6d65 6e74 MTOM attachment │ │ │ │ -00119030: 7320 666f 7220 7468 6520 6461 7461 2070 s for the data p │ │ │ │ -00119040: 6f69 6e74 6564 2074 6f20 6279 203c 636f ointed to by __ptr │ │ │ │ -00119060: 6f66 2073 697a 6520 3c63 6f64 653e 5f5f of size __ │ │ │ │ -00119070: 7369 7a65 3c2f 636f 6465 3e2e 2054 6865 size. The │ │ │ │ -00119080: 2070 726f 6365 7373 2066 6f72 2073 656e process for sen │ │ │ │ -00119090: 6469 6e67 2061 6e64 2072 6563 6569 7669 ding and receivi │ │ │ │ -001190a0: 6e67 204d 544f 4d20 584f 5020 6174 7461 ng MTOM XOP atta │ │ │ │ -001190b0: 6368 6d65 6e74 7320 6973 2066 756c 6c79 chments is fully │ │ │ │ -001190c0: 2061 7574 6f6d 6174 6564 2e20 5468 6520 automated. The │ │ │ │ -001190d0: 3c63 6f64 653e 6964 3c2f 636f 6465 3e20 id │ │ │ │ -001190e0: 6d65 6d62 6572 2072 6566 6572 656e 6365 member reference │ │ │ │ -001190f0: 7320 7468 6520 6174 7461 6368 6d65 6e74 s the attachment │ │ │ │ -00119100: 2c20 7479 7069 6361 6c6c 7920 6120 636f , typically a co │ │ │ │ -00119110: 6e74 656e 7420 6964 2043 4944 206f 7220 ntent id CID or │ │ │ │ -00119120: 5555 4944 2077 6869 6368 2063 616e 2062 UUID which can b │ │ │ │ -00119130: 6520 6f62 7461 696e 6564 2077 6974 6820 e obtained with │ │ │ │ -00119140: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_rand │ │ │ │ -001191d0: 5f75 7569 643c 2f61 3e3c 2f63 6f64 653e _uuid │ │ │ │ -001191e0: 2e20 5768 656e 2073 6574 2074 6f20 4e55 . When set to NU │ │ │ │ -001191f0: 4c4c 2c20 6120 756e 6971 7565 2043 4944 LL, a unique CID │ │ │ │ -00119200: 2069 7320 6175 746f 6d61 7469 6361 6c6c is automaticall │ │ │ │ -00119210: 7920 7573 6564 2e20 5468 6520 3c63 6f64 y used. The type fi │ │ │ │ -00119230: 656c 6420 7370 6563 6966 6965 7320 7468 eld specifies th │ │ │ │ -00119240: 6520 7265 7175 6972 6564 204d 494d 4520 e required MIME │ │ │ │ -00119250: 7479 7065 206f 6620 7468 6520 6269 6e61 type of the bina │ │ │ │ -00119260: 7279 2064 6174 612c 2061 6e64 2074 6865 ry data, and the │ │ │ │ -00119270: 206f 7074 696f 6e61 6c20 3c63 6f64 653e optional │ │ │ │ -00119280: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m │ │ │ │ -00119290: 656d 6265 7220 6361 6e20 6265 2075 7365 ember can be use │ │ │ │ -001192a0: 6420 746f 2070 6967 6779 2d62 6163 6b20 d to piggy-back │ │ │ │ -001192b0: 6465 7363 7269 7074 6976 6520 7465 7874 descriptive text │ │ │ │ -001192c0: 2077 6974 6820 616e 2061 7474 6163 686d with an attachm │ │ │ │ -001192d0: 656e 742e 2054 6865 206f 7264 6572 206f ent. The order o │ │ │ │ -001192e0: 6620 7468 6520 6465 636c 6172 6174 696f f the declaratio │ │ │ │ -001192f0: 6e20 6f66 2074 6865 206d 656d 6265 7273 n of the members │ │ │ │ -00119300: 2069 7320 7369 676e 6966 6963 616e 742e is significant. │ │ │ │ -00119310: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can │ │ │ │ -00119320: 696d 706f 7274 203c 656d 3e3c 636f 6465 import xop.h in your inter │ │ │ │ -00119350: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ -00119360: 2074 6f20 7573 6520 7468 6520 4d54 4f4d to use the MTOM │ │ │ │ -00119370: 2061 7474 6163 686d 656e 7473 2c20 666f attachments, fo │ │ │ │ -00119380: 7220 6578 616d 706c 653a 3c2f 703e 0a3c r example:

    .< │ │ │ │ -00119390: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -001193a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    #import " │ │ │ │ -001193e0: 696d 706f 7274 2f78 6f70 2e68 2671 756f import/xop.h&quo │ │ │ │ -001193f0: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    │ │ │ │ -00119400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i │ │ │ │ -00119430: 6d70 6f72 7420 2671 756f 743b 696d 706f mport "impo │ │ │ │ -00119440: 7274 2f78 6d69 6d65 352e 6826 7175 6f74 rt/xmime5.h" │ │ │ │ -00119450: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    . │ │ │ │ -00119460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #im │ │ │ │ -00119490: 706f 7274 2026 7175 6f74 3b69 6d70 6f72 port "impor │ │ │ │ -001194a0: 742f 736f 6170 3132 2e68 2671 756f 743b t/soap12.h" │ │ │ │ -001194b0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -001194c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001194d0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* altern │ │ │ │ -001194f0: 6174 6976 656c 792c 2077 6974 686f 7574 atively, without │ │ │ │ -00119500: 2074 6865 2069 6d70 6f72 7420 6162 6f76 the import abov │ │ │ │ -00119510: 652c 2075 7365 3a20 3c2f 7370 616e 3e3c e, use: < │ │ │ │ -00119520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ -00119550: 6773 6f61 7020 534f 4150 2d45 4e56 2073 gsoap SOAP-ENV s │ │ │ │ -00119560: 6368 656d 6120 6e61 6d65 7370 6163 653a chema namespace: │ │ │ │ -00119570: 2068 7474 703a 2f2f 7777 772e 7733 2e6f http://www.w3.o │ │ │ │ -00119580: 7267 2f32 3030 332f 3035 2f73 6f61 702d rg/2003/05/soap- │ │ │ │ -00119590: 656e 7665 6c6f 7065 203c 2f73 7061 6e3e envelope │ │ │ │ -001195a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -001195d0: 2f67 736f 6170 2053 4f41 502d 454e 4320 /gsoap SOAP-ENC │ │ │ │ -001195e0: 7363 6865 6d61 206e 616d 6573 7061 6365 schema namespace │ │ │ │ -001195f0: 3a20 6874 7470 3a2f 2f77 7777 2e77 332e : http://www.w3. │ │ │ │ -00119600: 6f72 672f 3230 3033 2f30 352f 736f 6170 org/2003/05/soap │ │ │ │ -00119610: 2d65 6e63 6f64 696e 6720 3c2f 7370 616e -encoding
    .
    │ │ │ │ -00119650: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    │ │ │ │ +001156a0: 733d 226c 696e 6522 3e20 2046 494c 4520 s="line"> FILE │ │ │ │ +001156b0: 2a68 616e 646c 6520 3d20 3c61 2063 6c61 *handle = fopen("som │ │ │ │ +00115740: 6566 696c 6526 7175 6f74 3b3c 2f73 7061 efile", │ │ │ │ +00115770: 2671 756f 743b 7762 2671 756f 743b 3c2f "wb");
    .< │ │ │ │ +00115790: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001157a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +001157c0: 2f73 7061 6e3e 2028 2168 616e 646c 6529 /span> (!handle) │ │ │ │ +001157d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap->error │ │ │ │ +00115890: 203d 203c 6120 636c 6173 733d 2263 6f64 = SOAP_EOF< │ │ │ │ +001158f0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    .
    │ │ │ │ +00115910: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e │ │ │ │ +00115990: 7272 6e75 6d3c 2f61 3e20 3d20 6572 726e rrnum = errn │ │ │ │ +001159a0: 6f3b 203c 7370 616e 2063 6c61 7373 3d22 o; // get │ │ │ │ +001159c0: 7265 6173 6f6e 203c 2f73 7061 6e3e 3c2f reason .
    }
    .
    │ │ │ │ +00115a20: 7265 7475 726e 3c2f 7370 616e 3e20 283c return (< │ │ │ │ +00115a30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00115a40: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void*)handle; .
    }
    . │ │ │ │ +00115a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    void dime_write_clo │ │ │ │ +00115ae0: 7365 283c 7370 616e 2063 6c61 7373 3d22 se(struct< │ │ │ │ +00115b00: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ +00115b30: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ +00115b60: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void * │ │ │ │ +00115b90: 6861 6e64 6c65 2920 3c2f 6469 763e 0a3c handle)
    .< │ │ │ │ +00115ba0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00115bb0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    fclose(( │ │ │ │ +00115c30: 4649 4c45 2a29 6861 6e64 6c65 293b 203c FILE*)handle); < │ │ │ │ +00115c40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    │ │ │ │ +00115c60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int dime_write(struct │ │ │ │ +00115ce0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +00115d10: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, voi │ │ │ │ +00115d60: 643c 2f73 7061 6e3e 202a 6861 6e64 6c65 d *handle │ │ │ │ +00115d70: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c │ │ │ │ +00115db0: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *buf, size_t len)
    .
    {
    .
    │ │ │ │ +00115e70: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +00115e90: 3c2f 7370 616e 3e20 6e77 7269 7474 656e nwritten │ │ │ │ +00115ea0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    while (len)
    │ │ │ │ +00115ef0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . │ │ │ │ +00115f20: 2020 206e 7772 6974 7465 6e20 3d20 6677 nwritten = fw │ │ │ │ +00115f30: 7269 7465 283c 6120 636c 6173 733d 2263 rite(bu │ │ │ │ +00115f80: 663c 2f61 3e2c 2031 2c20 6c65 6e2c 2028 f, 1, len, ( │ │ │ │ +00115f90: 4649 4c45 2a29 6861 6e64 6c65 293b 203c FILE*)handle); < │ │ │ │ +00115fa0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if │ │ │ │ +00115fe0: 2821 6e77 7269 7474 656e 2920 3c2f 6469 (!nwritten) .
    {
    │ │ │ │ +00116010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    │ │ │ │ +00116050: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->errnum │ │ │ │ +001160b0: 203d 2065 7272 6e6f 3b20 3c73 7061 6e20 = errno; │ │ │ │ +001160d0: 2f2f 2067 6574 2072 6561 736f 6e20 3c2f // get reason
    .
    │ │ │ │ +00116100: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +00116120: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn │ │ │ │ +00116180: 534f 4150 5f45 4f46 3c2f 613e 3b20 3c2f SOAP_EOF; .
    } .
    len -= │ │ │ │ +001161d0: 206e 7772 6974 7465 6e3b 203c 2f64 6976 nwritten;
    .
    buf += nwri │ │ │ │ +00116250: 7474 656e 3b20 3c2f 6469 763e 0a3c 6469 tten;
    . │ │ │ │ +00116270: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .. │ │ │ │ +00116330: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    < │ │ │ │ +00116390: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +001163a0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">soa │ │ │ │ +001163f0: 703a 3a66 6469 6d65 7772 6974 653c 2f61 p::fdimewrite
    int(* │ │ │ │ +00116420: 2066 6469 6d65 7772 6974 6529 2873 7472 fdimewrite)(str │ │ │ │ +00116430: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +00116440: 766f 6964 202a 2c20 636f 6e73 7420 6368 void *, const ch │ │ │ │ +00116450: 6172 202a 2c20 7369 7a65 5f74 293c 2f64 ar *, size_t)
    Callback t │ │ │ │ +00116480: 6f20 7772 6974 6520 6461 7461 2069 6e20 o write data in │ │ │ │ +00116490: 6120 4449 4d45 2061 7474 6163 686d 656e a DIME attachmen │ │ │ │ +001164a0: 7420 7374 7265 616d 2e3c 2f64 6976 3e3c t stream.
    < │ │ │ │ +001164b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +001164c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +001164d0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +001164e0: 3438 3232 3c2f 6469 763e 3c2f 6469 763e 4822
    │ │ │ │ +001164f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fdim │ │ │ │ +001165b0: 6577 7269 7465 636c 6f73 653c 2f61 3e3c ewriteclose< │ │ │ │ +001165c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void(* │ │ │ │ +001165e0: 6664 696d 6577 7269 7465 636c 6f73 6529 fdimewriteclose) │ │ │ │ +001165f0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ +00116600: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle │ │ │ │ +00116610: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba │ │ │ │ +00116630: 636b 2074 6f20 636c 6f73 6520 6120 4449 ck to close a DI │ │ │ │ +00116640: 4d45 2061 7474 6163 686d 656e 7420 7374 ME attachment st │ │ │ │ +00116650: 7265 616d 2061 6674 6572 2077 7269 7469 ream after writi │ │ │ │ +00116660: 6e67 2e3c 2f64 6976 3e3c 6469 7620 636c ng.
    D │ │ │ │ +00116680: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +00116690: 7464 736f 6170 322e 683a 3438 3333 3c2f tdsoap2.h:4833
    .
    void *(* fdime │ │ │ │ +001167a0: 7772 6974 656f 7065 6e29 2873 7472 7563 writeopen)(struc │ │ │ │ +001167b0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co │ │ │ │ +001167c0: 6e73 7420 6368 6172 202a 6964 2c20 636f nst char *id, co │ │ │ │ +001167d0: 6e73 7420 6368 6172 202a 7479 7065 2c20 nst char *type, │ │ │ │ +001167e0: 636f 6e73 7420 6368 6172 202a 6f70 7469 const char *opti │ │ │ │ +001167f0: 6f6e 7329 3c2f 6469 763e 3c64 6976 2063 ons)
    Cal │ │ │ │ +00116810: 6c62 6163 6b20 746f 206f 7065 6e20 6120 lback to open a │ │ │ │ +00116820: 7374 7265 616d 696e 6720 4449 4d45 2061 streaming DIME a │ │ │ │ +00116830: 7474 6163 686d 656e 7420 666f 7220 7772 ttachment for wr │ │ │ │ +00116840: 6974 696e 672e 3c2f 6469 763e 3c64 6976 iting.
    < │ │ │ │ +00116860: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:481 │ │ │ │ +00116880: 303c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 0
    ..
    int(* fclose)( │ │ │ │ +00116b50: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00116b60: 7029 3c2f 6469 763e 3c64 6976 2063 6c61 p)
    Callb │ │ │ │ +00116b80: 6163 6b20 7468 6174 2063 6c6f 7365 7320 ack that closes │ │ │ │ +00116b90: 7468 6520 6375 7272 656e 7420 736f 636b the current sock │ │ │ │ +00116ba0: 6574 2063 6f6e 6e65 6374 696f 6e2e 3c2f et connection.
    Defini │ │ │ │ +00116bd0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ +00116be0: 7032 2e68 3a34 3532 303c 2f64 6976 3e3c p2.h:4520
    < │ │ │ │ +00116bf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #defi │ │ │ │ +00116cd0: 6e65 2053 4f41 505f 454f 463c 2f64 6976 ne SOAP_EOF
    A soap_statu │ │ │ │ +00116d00: 7320 6572 726f 7220 636f 6465 3a20 756e s error code: un │ │ │ │ +00116d10: 6578 7065 6374 6564 2065 6e64 206f 6620 expected end of │ │ │ │ +00116d20: 6669 6c65 2c20 6e6f 2069 6e70 7574 2c20 file, no input, │ │ │ │ +00116d30: 7472 616e 736d 6973 7369 6f6e 2069 6e74 transmission int │ │ │ │ +00116d40: 6572 7275 7074 6564 206f 7220 7469 6d65 errupted or time │ │ │ │ +00116d50: 6420 6f75 7420 2873 612e 2e2e 3c2f 6469 d out (sa...
    Definiti │ │ │ │ +00116d80: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ +00116d90: 2e68 3a32 3336 353c 2f64 6976 3e3c 2f64 .h:2365
    .

    Me │ │ │ │ +00116dc0: 7373 6167 6520 636f 6d70 7265 7373 696f ssage compressio │ │ │ │ +00116dd0: 6e20 7769 7468 203c 636f 6465 3e23 534f n with #SO │ │ │ │ +00116de0: 4150 5f45 4e43 5f5a 4c49 423c 2f63 6f64 AP_ENC_ZLIB can be used w │ │ │ │ +00116e00: 6974 6820 4449 4d45 2074 6f20 636f 6d70 ith DIME to comp │ │ │ │ +00116e10: 7265 7373 2074 6865 2065 6e74 6972 6520 ress the entire │ │ │ │ +00116e20: 6d65 7373 6167 652e 2048 6f77 6576 6572 message. However │ │ │ │ +00116e30: 2c20 636f 6d70 7265 7373 696f 6e20 7265 , compression re │ │ │ │ +00116e40: 7175 6972 6573 2062 7566 6665 7269 6e67 quires buffering │ │ │ │ +00116e50: 2074 6f20 6465 7465 726d 696e 6520 7468 to determine th │ │ │ │ +00116e60: 6520 4854 5450 2063 6f6e 7465 6e74 206c e HTTP content l │ │ │ │ +00116e70: 656e 6774 6820 6865 6164 6572 2c20 7768 ength header, wh │ │ │ │ +00116e80: 6963 6820 6361 6e63 656c 7320 7468 6520 ich cancels the │ │ │ │ +00116e90: 6265 6e65 6669 7473 206f 6620 7374 7265 benefits of stre │ │ │ │ +00116ea0: 616d 696e 6720 4449 4d45 2e20 546f 2061 aming DIME. To a │ │ │ │ +00116eb0: 766f 6964 2074 6869 732c 2079 6f75 2073 void this, you s │ │ │ │ +00116ec0: 686f 756c 6420 7573 6520 6368 756e 6b65 hould use chunke │ │ │ │ +00116ed0: 6420 4854 5450 2028 7769 7468 2074 6865 d HTTP (with the │ │ │ │ +00116ee0: 206f 7574 7075 742d 6d6f 6465 203c 636f output-mode #SOAP_IO_CHUN │ │ │ │ +00116f00: 4b3c 2f63 6f64 653e 2066 6c61 6729 2077 K flag) w │ │ │ │ +00116f10: 6974 6820 636f 6d70 7265 7373 696f 6e20 ith compression │ │ │ │ +00116f20: 616e 6420 7374 7265 616d 696e 6720 4449 and streaming DI │ │ │ │ +00116f30: 4d45 2e20 4174 2074 6865 2073 6572 7665 ME. At the serve │ │ │ │ +00116f40: 7220 7369 6465 2c20 7768 656e 2079 6f75 r side, when you │ │ │ │ +00116f50: 2073 6574 203c 636f 6465 3e23 534f 4150 set #SOAP │ │ │ │ +00116f60: 5f49 4f5f 4348 554e 4b3c 2f63 6f64 653e _IO_CHUNK │ │ │ │ +00116f70: 2062 6566 6f72 6520 6361 6c6c 696e 6720 before calling │ │ │ │ +00116f80: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_serve< │ │ │ │ +00117000: 2f61 3e3c 2f63 6f64 653e 2c20 7468 6520 /a>, the │ │ │ │ +00117010: 656e 6769 6e65 2077 696c 6c20 6175 746f engine will auto │ │ │ │ +00117020: 6d61 7469 6361 6c6c 7920 7265 7665 7274 matically revert │ │ │ │ +00117030: 2074 6f20 6275 6666 6572 696e 6720 283c to buffering (< │ │ │ │ +00117040: 636f 6465 3e23 534f 4150 5f49 4f5f 5354 code>#SOAP_IO_ST │ │ │ │ +00117050: 4f52 453c 2f63 6f64 653e 2066 6c61 6720 ORE flag │ │ │ │ +00117060: 6973 2073 6574 292e 2059 6f75 2063 616e is set). You can │ │ │ │ +00117070: 2063 6865 636b 2074 6869 7320 666c 6167 check this flag │ │ │ │ +00117080: 2077 6974 6820 3c63 6f64 653e 2873 6f61 with (soa │ │ │ │ +00117090: 702d 2667 743b 6f6d 6f64 6520 2661 6d70 p->omode & │ │ │ │ +001170a0: 3b20 534f 4150 5f49 4f29 203d 3d20 534f ; SOAP_IO) == SO │ │ │ │ +001170b0: 4150 5f49 4f5f 4348 554e 4b3c 2f63 6f64 AP_IO_CHUNK to see if the │ │ │ │ +001170d0: 2063 6c69 656e 7420 6163 6365 7074 7320 client accepts │ │ │ │ +001170e0: 6368 756e 6b69 6e67 2e20 4d6f 7265 2069 chunking. More i │ │ │ │ +001170f0: 6e66 6f72 6d61 7469 6f6e 2061 626f 7574 nformation about │ │ │ │ +00117100: 2073 7472 6561 6d69 6e67 2063 6875 6e6b streaming chunk │ │ │ │ +00117110: 6564 2044 494d 4520 6361 6e20 6265 2066 ed DIME can be f │ │ │ │ +00117120: 6f75 6e64 2069 6e20 5365 6374 696f 6e20 ound in Section │ │ │ │ +00117130: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Str │ │ │ │ +00117160: 6561 6d69 6e67 2063 6875 6e6b 6564 2044 eaming chunked D │ │ │ │ +00117170: 494d 453c 2f61 3e20 2e3c 2f70 3e0a 3c64 IME .

    .
    Wa │ │ │ │ +001171a0: 726e 696e 673c 2f64 743e 3c64 643e 5468 rning
    Th │ │ │ │ +001171b0: 6520 3c63 6f64 653e 6f70 7469 6f6e 733c e options< │ │ │ │ +001171c0: 2f63 6f64 653e 206d 656d 6265 7220 6973 /code> member is │ │ │ │ +001171d0: 2061 2044 494d 452d 7370 6563 6966 6963 a DIME-specific │ │ │ │ +001171e0: 2064 6174 6120 7374 7275 6374 7572 652c data structure, │ │ │ │ +001171f0: 2063 6f6e 7369 7374 696e 6720 6f66 2061 consisting of a │ │ │ │ +00117200: 2034 2062 7974 6520 6865 6164 6572 2063 4 byte header c │ │ │ │ +00117210: 6f6e 7461 696e 696e 6720 7468 6520 6f70 ontaining the op │ │ │ │ +00117220: 7469 6f6e 2074 7970 6520 696e 666f 2028 tion type info ( │ │ │ │ +00117230: 6869 2062 7974 652c 206c 6f20 6279 7465 hi byte, lo byte │ │ │ │ +00117240: 292c 206f 7074 696f 6e20 7374 7269 6e67 ), option string │ │ │ │ +00117250: 206c 656e 6774 6820 2868 6920 6279 7465 length (hi byte │ │ │ │ +00117260: 2c20 6c6f 2062 7974 6529 2c20 666f 6c6c , lo byte), foll │ │ │ │ +00117270: 6f77 6564 2062 7920 6120 6e6f 6e2d 275c owed by a non-'\ │ │ │ │ +00117280: 3027 2074 6572 6d69 6e61 7465 6420 7374 0' terminated st │ │ │ │ +00117290: 7269 6e67 2e20 5468 6520 4449 4d45 2068 ring. The DIME h │ │ │ │ +001172a0: 616e 646c 6572 2072 6563 6f67 6e69 7a65 andler recognize │ │ │ │ +001172b0: 7320 6f6e 6520 6f70 7469 6f6e 2061 7420 s one option at │ │ │ │ +001172c0: 6d6f 7374 2e3c 2f64 643e 3c2f 646c 3e0a most.
    . │ │ │ │ +001172d0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +001172f0: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .Streaming chu │ │ │ │ +00117340: 6e6b 6564 2044 494d 453c 2f68 323e 0a3c nked DIME

    .< │ │ │ │ +00117350: 703e 546f 2073 656e 6420 4449 4d45 2061 p>To send DIME a │ │ │ │ +00117360: 7474 6163 686d 656e 7473 2c20 7468 6520 ttachments, the │ │ │ │ +00117370: 6174 7461 6368 6d65 6e74 2073 697a 6573 attachment sizes │ │ │ │ +00117380: 206d 7573 7420 6265 2064 6574 6572 6d69 must be determi │ │ │ │ +00117390: 6e65 6420 696e 2061 6476 616e 6365 2074 ned in advance t │ │ │ │ +001173a0: 6f20 6361 6c63 756c 6174 6520 4854 5450 o calculate HTTP │ │ │ │ +001173b0: 206d 6573 7361 6765 206c 656e 6774 6820 message length │ │ │ │ +001173c0: 7265 7175 6972 6564 2074 6f20 7374 7265 required to stre │ │ │ │ +001173d0: 616d 2044 494d 4520 6f76 6572 2048 5454 am DIME over HTT │ │ │ │ +001173e0: 502e 2048 6f77 6576 6572 2c20 6368 756e P. However, chun │ │ │ │ +001173f0: 6b65 6420 4449 4d45 2074 6f67 6574 6865 ked DIME togethe │ │ │ │ +00117400: 7220 7769 7468 2063 6875 6e6b 6564 2048 r with chunked H │ │ │ │ +00117410: 5454 5020 6361 6e20 6265 2075 7365 6420 TTP can be used │ │ │ │ +00117420: 746f 206f 6d69 7420 7468 6973 2073 7465 to omit this ste │ │ │ │ +00117430: 702e 2046 6972 7374 2073 6574 2074 6865 p. First set the │ │ │ │ +00117440: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_ │ │ │ │ +00117450: 4348 554e 4b3c 2f63 6f64 653e 2066 6c61 CHUNK fla │ │ │ │ +00117460: 672e 2054 6865 6e2c 2074 6f20 7374 7265 g. Then, to stre │ │ │ │ +00117470: 616d 2063 6875 6e6b 6564 2044 494d 452c am chunked DIME, │ │ │ │ +00117480: 2073 6574 2074 6865 203c 636f 6465 3e5f set the _ │ │ │ │ +00117490: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem │ │ │ │ +001174a0: 6265 7220 6f66 2061 6e20 6174 7461 6368 ber of an attach │ │ │ │ +001174b0: 6d65 6e74 2074 6f20 7a65 726f 2061 6e64 ment to zero and │ │ │ │ +001174c0: 2065 6e61 626c 6520 4449 4d45 2063 6875 enable DIME chu │ │ │ │ +001174d0: 6e6b 696e 672e 2054 6865 2044 494d 4520 nking. The DIME │ │ │ │ +001174e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fdim │ │ │ │ +00117580: 6572 6561 643c 2f61 3e3c 2f63 6f64 653e eread │ │ │ │ +00117590: 2063 616c 6c62 6163 6b20 7468 656e 2066 callback then f │ │ │ │ +001175a0: 6574 6368 6573 2064 6174 6120 696e 2063 etches data in c │ │ │ │ +001175b0: 6875 6e6b 7320 616e 6420 6974 2069 7320 hunks and it is │ │ │ │ +001175c0: 696d 706f 7274 616e 7420 746f 2066 696c important to fil │ │ │ │ +001175d0: 6c20 7468 6520 656e 7469 7265 2062 7566 l the entire buf │ │ │ │ +001175e0: 6665 7220 756e 6c65 7373 2074 6865 2065 fer unless the e │ │ │ │ +001175f0: 6e64 206f 6620 7468 6520 6461 7461 2068 nd of the data h │ │ │ │ +00117600: 6173 2062 6565 6e20 7265 6163 6865 6420 as been reached │ │ │ │ +00117610: 616e 6420 7468 6520 6c61 7374 2063 6875 and the last chu │ │ │ │ +00117620: 6e6b 2069 7320 746f 2062 6520 7365 6e64 nk is to be send │ │ │ │ +00117630: 2e20 5468 6174 2069 732c 203c 636f 6465 . That is, soap::fdimeread │ │ │ │ +001176e0: 3c2f 613e 3c2f 636f 6465 3e20 7368 6f75 shou │ │ │ │ +001176f0: 6c64 2072 6574 7572 6e20 7468 6520 7661 ld return the va │ │ │ │ +00117700: 6c75 6520 6f66 2074 6865 206c 6173 7420 lue of the last │ │ │ │ +00117710: 3c63 6f64 653e 6c65 6e3c 2f63 6f64 653e len │ │ │ │ +00117720: 2070 6172 616d 6574 6572 2061 6e64 2066 parameter and f │ │ │ │ +00117730: 696c 6c20 7468 6520 656e 7469 7265 2062 ill the entire b │ │ │ │ +00117740: 7566 6665 7220 3c63 6f64 653e 6275 663c uffer buf< │ │ │ │ +00117750: 2f63 6f64 653e 2066 6f72 2061 6c6c 2063 /code> for all c │ │ │ │ +00117760: 6875 6e6b 7320 6578 6365 7074 2074 6865 hunks except the │ │ │ │ +00117770: 206c 6173 742e 2046 6f72 2074 6865 206c last. For the l │ │ │ │ +00117780: 6173 7420 6974 2072 6574 7572 6e73 2030 ast it returns 0 │ │ │ │ +00117790: 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 616e .

    .

    You can │ │ │ │ +001177a0: 2061 6c73 6f20 7573 6520 7468 6520 3c63 also use the #SOAP_IO_STO │ │ │ │ +001177c0: 5245 3c2f 636f 6465 3e20 666c 6167 2c20 RE flag, │ │ │ │ +001177d0: 6275 7420 7468 6174 2063 616e 6365 6c73 but that cancels │ │ │ │ +001177e0: 2074 6865 2062 656e 6566 6974 7320 6f66 the benefits of │ │ │ │ +001177f0: 2073 7472 6561 6d69 6e67 2044 494d 452e streaming DIME. │ │ │ │ +00117800: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ +00117820: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +00117830: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    < │ │ │ │ +00117840: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +00117850: 2069 643d 2244 494d 4557 5344 4c22 3e3c id="DIMEWSDL">< │ │ │ │ +00117860: 2f61 3e0a 5753 444c 2062 696e 6469 6e67 /a>.WSDL binding │ │ │ │ +00117870: 7320 666f 7220 4449 4d45 2061 7474 6163 s for DIME attac │ │ │ │ +00117880: 686d 656e 7473 3c2f 6832 3e0a 3c70 3e54 hments

    .

    T │ │ │ │ +00117890: 6865 2077 7364 6c32 6820 746f 6f6c 2072 he wsdl2h tool r │ │ │ │ +001178a0: 6563 6f67 6e69 7a65 7320 4449 4d45 2061 ecognizes DIME a │ │ │ │ +001178b0: 7474 6163 686d 656e 7473 2061 6e64 2070 ttachments and p │ │ │ │ +001178c0: 726f 6475 6365 7320 616e 2061 6e6e 6f74 roduces an annot │ │ │ │ +001178d0: 6174 6564 2068 6561 6465 7220 6669 6c65 ated header file │ │ │ │ +001178e0: 2e20 426f 7468 206f 7065 6e20 616e 6420 . Both open and │ │ │ │ +001178f0: 636c 6f73 6564 206c 6179 6f75 7473 2061 closed layouts a │ │ │ │ +00117900: 7265 2073 7570 706f 7274 6564 2066 6f72 re supported for │ │ │ │ +00117910: 2074 7261 6e73 6d69 7474 696e 6720 4449 transmitting DI │ │ │ │ +00117920: 4d45 2061 7474 6163 686d 656e 7473 2e20 ME attachments. │ │ │ │ +00117930: 466f 7220 636c 6f73 6564 2066 6f72 6d61 For closed forma │ │ │ │ +00117940: 7473 2c20 616c 6c20 4449 4d45 2061 7474 ts, all DIME att │ │ │ │ +00117950: 6163 686d 656e 7473 206d 7573 7420 6265 achments must be │ │ │ │ +00117960: 2072 6566 6572 656e 6365 6420 6672 6f6d referenced from │ │ │ │ +00117970: 2074 6865 2053 4f41 5020 6d65 7373 6167 the SOAP messag │ │ │ │ +00117980: 652c 2065 2e67 2e20 7573 696e 6720 6872 e, e.g. using hr │ │ │ │ +00117990: 6566 7320 7769 7468 2053 4f41 5020 656e efs with SOAP en │ │ │ │ +001179a0: 636f 6469 6e67 2061 6e64 2075 7369 6e67 coding and using │ │ │ │ +001179b0: 2074 6865 2061 7070 6c69 6361 7469 6f6e the application │ │ │ │ +001179c0: 2d73 7065 6369 6669 6320 7265 6665 7265 -specific refere │ │ │ │ +001179d0: 6e63 6520 6174 7472 6962 7574 6520 696e nce attribute in │ │ │ │ +001179e0: 636c 7564 6564 2069 6e20 7468 6520 3c63 cluded in the xsd__base64Bin │ │ │ │ +00117a70: 6172 793c 2f61 3e3c 2f63 6f64 653e 2073 ary s │ │ │ │ +00117a80: 7472 7563 7420 6f72 2063 6c61 7373 2066 truct or class f │ │ │ │ +00117a90: 6f72 2064 6f63 756d 656e 742f 6c69 7465 or document/lite │ │ │ │ +00117aa0: 7261 6c20 6d65 7373 6167 696e 672e 3c2f ral messaging..

    The soapcp │ │ │ │ +00117ac0: 7032 2074 6f6f 6c20 646f 6573 206e 6f74 p2 tool does not │ │ │ │ +00117ad0: 2070 726f 6475 6365 2061 2057 5344 4c20 produce a WSDL │ │ │ │ +00117ae0: 7769 7468 2044 494d 4520 6578 7465 6e73 with DIME extens │ │ │ │ +00117af0: 696f 6e73 2e20 4449 4d45 2069 7320 616e ions. DIME is an │ │ │ │ +00117b00: 206f 6c64 6572 2062 696e 6172 7920 666f older binary fo │ │ │ │ +00117b10: 726d 6174 2074 6861 7420 6861 7320 6e6f rmat that has no │ │ │ │ +00117b20: 2057 5344 4c20 7072 6f74 6f63 6f6c 2073 WSDL protocol s │ │ │ │ +00117b30: 7570 706f 7274 2c20 756e 6c69 6b65 204d upport, unlike M │ │ │ │ +00117b40: 494d 4520 616e 6420 4d54 4f4d 2e3c 2f70 IME and MTOM.

    .

    .... Back to ta │ │ │ │ +00117b70: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +00117b80: 2f61 3e3c 2f70 3e0a 3c68 313e 3c61 2063 /a>

    .

    .MTO │ │ │ │ +00117bb0: 4d20 6174 7461 6368 6d65 6e74 733c 2f68 M attachments.

    MTOM (Mess │ │ │ │ +00117bd0: 6167 6520 5472 616e 736d 6973 7369 6f6e age Transmission │ │ │ │ +00117be0: 204f 7074 696d 697a 6174 696f 6e20 4d65 Optimization Me │ │ │ │ +00117bf0: 6368 616e 6973 6d29 2069 7320 6120 7265 chanism) is a re │ │ │ │ +00117c00: 6c61 7469 7665 6c79 206e 6577 2066 6f72 latively new for │ │ │ │ +00117c10: 6d61 7420 666f 7220 7472 616e 736d 6974 mat for transmit │ │ │ │ +00117c20: 7469 6e67 2061 7474 6163 686d 656e 7473 ting attachments │ │ │ │ +00117c30: 2077 6974 6820 534f 4150 206d 6573 7361 with SOAP messa │ │ │ │ +00117c40: 6765 7320 2873 6565 203c 6120 6872 6566 ges (see http://www.w │ │ │ │ +00117c80: 332e 6f72 672f 5452 2f73 6f61 7031 322d 3.org/TR/soap12- │ │ │ │ +00117c90: 6d74 6f6d 3c2f 613e 292e 204d 544f 4d20 mtom). MTOM │ │ │ │ +00117ca0: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are │ │ │ │ +00117cb0: 6573 7365 6e74 6961 6c6c 7920 4d49 4d45 essentially MIME │ │ │ │ +00117cc0: 2061 7474 6163 686d 656e 7473 2077 6974 attachments wit │ │ │ │ +00117cd0: 6820 7374 616e 6461 7264 697a 6564 206d h standardized m │ │ │ │ +00117ce0: 6563 6861 6e69 736d 7320 666f 7220 6372 echanisms for cr │ │ │ │ +00117cf0: 6f73 7320 7265 6665 7265 6e63 696e 6720 oss referencing │ │ │ │ +00117d00: 6174 7461 6368 6d65 6e74 7320 6672 6f6d attachments from │ │ │ │ +00117d10: 2074 6865 2053 4f41 5020 626f 6479 2c20 the SOAP body, │ │ │ │ +00117d20: 7768 6963 6820 6973 2061 6273 656e 7420 which is absent │ │ │ │ +00117d30: 696e 2028 706c 6169 6e29 204d 494d 4520 in (plain) MIME │ │ │ │ +00117d40: 6174 7461 6368 6d65 6e74 7320 616e 6420 attachments and │ │ │ │ +00117d50: 6f70 7469 6f6e 616c 2077 6974 6820 4449 optional with DI │ │ │ │ +00117d60: 4d45 2061 7474 6163 686d 656e 7473 2e3c ME attachments.< │ │ │ │ +00117d70: 2f70 3e0a 3c70 3e55 6e6c 696b 6520 7468 /p>.

    Unlike th │ │ │ │ +00117d80: 6520 6e61 6d65 2073 7567 6765 7374 732c e name suggests, │ │ │ │ +00117d90: 2074 6865 2073 7065 6564 2062 7920 7768 the speed by wh │ │ │ │ +00117da0: 6963 6820 6174 7461 6368 6564 2064 6174 ich attached dat │ │ │ │ +00117db0: 6120 6973 2074 7261 6e73 6d69 7474 6564 a is transmitted │ │ │ │ +00117dc0: 2069 7320 6e6f 7420 696e 6372 6561 7365 is not increase │ │ │ │ +00117dd0: 6420 636f 6d70 6172 6564 2074 6f20 4d49 d compared to MI │ │ │ │ +00117de0: 4d45 2c20 4449 4d45 2c20 6f72 2065 7665 ME, DIME, or eve │ │ │ │ +00117df0: 6e20 584d 4c20 656e 636f 6465 6420 6261 n XML encoded ba │ │ │ │ +00117e00: 7365 3634 2064 6174 612c 2062 6563 6175 se64 data, becau │ │ │ │ +00117e10: 7365 2074 6865 2070 6572 666f 726d 616e se the performan │ │ │ │ +00117e20: 6365 2064 6966 6665 7265 6e63 6573 2077 ce differences w │ │ │ │ +00117e30: 6865 6e20 7573 696e 6720 6753 4f41 5020 hen using gSOAP │ │ │ │ +00117e40: 7769 6c6c 2062 6520 736d 616c 6c2e 2054 will be small. T │ │ │ │ +00117e50: 6865 2061 6476 616e 7461 6765 206f 6620 he advantage of │ │ │ │ +00117e60: 7468 6520 666f 726d 6174 2069 7320 7468 the format is th │ │ │ │ +00117e70: 6520 7374 616e 6461 7264 697a 6564 2061 e standardized a │ │ │ │ +00117e80: 7474 6163 686d 656e 7420 7265 6665 7265 ttachment refere │ │ │ │ +00117e90: 6e63 6520 6d65 6368 616e 6973 6d2c 2077 nce mechanism, w │ │ │ │ +00117ea0: 6869 6368 2073 686f 756c 6420 696d 7072 hich should impr │ │ │ │ +00117eb0: 6f76 6520 696e 7465 726f 7065 7261 6269 ove interoperabi │ │ │ │ +00117ec0: 6c69 7479 2e3c 2f70 3e0a 3c70 3e54 6865 lity.

    .

    The │ │ │ │ +00117ed0: 204d 544f 4d20 7370 6563 6966 6963 6174 MTOM specificat │ │ │ │ +00117ee0: 696f 6e20 6d61 6e64 6174 6573 2053 4f41 ion mandates SOA │ │ │ │ +00117ef0: 5020 312e 3220 616e 6420 7468 6520 7573 P 1.2 and the us │ │ │ │ +00117f00: 6520 6f66 2074 6865 2058 4f50 206e 616d e of the XOP nam │ │ │ │ +00117f10: 6573 7061 6365 2e20 5468 6520 584f 5020 espace. The XOP │ │ │ │ +00117f20: 496e 636c 7564 6520 656c 656d 656e 7420 Include element │ │ │ │ +00117f30: 3c65 6d3e 3c63 6f64 653e 786f 703a 496e xop:In │ │ │ │ +00117f40: 636c 7564 653c 2f63 6f64 653e 3c2f 656d clude is defined in │ │ │ │ +00117f60: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he │ │ │ │ +00117f70: 6164 6572 2066 696c 6520 6173 2061 203c ader file as a < │ │ │ │ +00117f80: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>_xop_ │ │ │ │ +00117ff0: 5f49 6e63 6c75 6465 3c2f 613e 3c2f 636f _Include struct or cl │ │ │ │ +00118010: 6173 732c 2074 6861 7420 6973 2075 7365 ass, that is use │ │ │ │ +00118020: 6420 746f 2072 6566 6572 656e 6365 2061 d to reference a │ │ │ │ +00118030: 7474 6163 686d 656e 7428 7329 2066 726f ttachment(s) fro │ │ │ │ +00118040: 6d20 7468 6520 534f 4150 206d 6573 7361 m the SOAP messa │ │ │ │ +00118050: 6765 2062 6f64 792e 3c2f 703e 0a3c 703e ge body.

    .

    │ │ │ │ +00118060: 4265 6361 7573 6520 7265 6665 7265 6e63 Because referenc │ │ │ │ +00118070: 6573 2066 726f 6d20 7769 7468 696e 2074 es from within t │ │ │ │ +00118080: 6865 2053 4f41 5020 6d65 7373 6167 6520 he SOAP message │ │ │ │ +00118090: 626f 6479 2074 6f20 6174 7461 6368 6d65 body to attachme │ │ │ │ +001180a0: 6e74 7320 6172 6520 6d61 6e64 6174 6f72 nts are mandator │ │ │ │ +001180b0: 7920 7769 7468 204d 544f 4d2c 2074 6865 y with MTOM, the │ │ │ │ +001180c0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e20 implementation │ │ │ │ +001180d0: 6f66 2074 6865 2073 6572 6961 6c69 7a61 of the serializa │ │ │ │ +001180e0: 7469 6f6e 2061 6e64 2064 6573 6572 6961 tion and deseria │ │ │ │ +001180f0: 6c69 7a61 7469 6f6e 206f 6620 4d54 4f4d lization of MTOM │ │ │ │ +00118100: 204d 494d 4520 6174 7461 6368 6d65 6e74 MIME attachment │ │ │ │ +00118110: 7320 7573 6573 2074 6865 2065 7874 656e s uses the exten │ │ │ │ +00118120: 6465 6420 6269 6e61 7279 2074 7970 6520 ded binary type │ │ │ │ +00118130: 636f 6d70 6172 6162 6c65 2074 6f20 4449 comparable to DI │ │ │ │ +00118140: 4d45 2073 7570 706f 7274 2e20 5468 6973 ME support. This │ │ │ │ +00118150: 2062 696e 6172 7920 7479 7065 2069 7320 binary type is │ │ │ │ +00118160: 7072 6564 6566 696e 6564 2069 6e20 7468 predefined in th │ │ │ │ +00118170: 6520 3c65 6d3e 3c63 6f64 653e 696d 706f e impo │ │ │ │ +00118180: 7274 2f78 6f70 2e68 3c2f 636f 6465 3e3c rt/xop.h< │ │ │ │ +00118190: 2f65 6d3e 2066 696c 653a 3c2f 703e 0a3c /em> file:

    .< │ │ │ │ +001181a0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +001181b0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    //g │ │ │ │ +001181e0: 736f 6170 2078 6f70 2073 6368 656d 6120 soap xop schema │ │ │ │ +001181f0: 696d 706f 7274 3a20 6874 7470 3a2f 2f77 import: http://w │ │ │ │ +00118200: 7777 2e77 332e 6f72 672f 3230 3034 2f30 ww.w3.org/2004/0 │ │ │ │ +00118210: 382f 786f 702f 696e 636c 7564 6520 3c2f 8/xop/include
    ..< │ │ │ │ +001182b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001182c0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{

    .
    < │ │ │ │ +001182e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001182f0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype">unsigne │ │ │ │ +00118300: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d char * │ │ │ │ +00118330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 __ptr; │ │ │ │ +00118390: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ... │ │ │ │ +001184f0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ +00118510: 6172 3c2f 7370 616e 3e20 2a3c 6120 636c ar *type;
    .
    char *< │ │ │ │ +001185c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001185d0: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref="struct__xop │ │ │ │ +001185e0: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm │ │ │ │ +001185f0: 6c23 6138 3934 6135 3464 6632 6430 3532 l#a894a54df2d052 │ │ │ │ +00118600: 3938 3966 6632 6332 3064 3334 3466 3536 989ff2c20d344f56 │ │ │ │ +00118610: 6339 3122 3e6f 7074 696f 6e73 3c2f 613e c91">options │ │ │ │ +00118620: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }; ..< │ │ │ │ +00118840: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00118850: 6964 3d22 6173 7472 7563 745f 5f78 6f70 id="astruct__xop │ │ │ │ +00118860: 5f5f 5f5f 5f69 6e63 6c75 6465 5f68 746d _____include_htm │ │ │ │ +00118870: 6c5f 6130 6437 3061 6630 6432 6331 3233 l_a0d70af0d2c123 │ │ │ │ +00118880: 3736 3663 6531 3838 6366 3264 6431 3538 766ce188cf2dd158 │ │ │ │ +00118890: 3333 6122 3e3c 6469 7620 636c 6173 733d 33a">< │ │ │ │ +00118910: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00118920: 6922 3e63 6861 7220 2a20 7479 7065 3c2f i">char * type
    MIME type │ │ │ │ +00118950: 206f 6620 7468 6520 6461 7461 2e3c 2f64 of the data.
    Definit │ │ │ │ +00118980: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +00118990: 322e 683a 3938 3837 3c2f 6469 763e 3c2f 2.h:9887
    .
    < │ │ │ │ +00118a10: 6120 6872 6566 3d22 7374 7275 6374 5f5f a href="struct__ │ │ │ │ +00118a20: 786f 705f 5f5f 5f5f 696e 636c 7564 652e xop_____include. │ │ │ │ +00118a30: 6874 6d6c 2361 3337 3865 3535 3561 3335 html#a378e555a35 │ │ │ │ +00118a40: 6466 3034 3163 3134 6430 6637 3637 6464 df041c14d0f767dd │ │ │ │ +00118a50: 3132 3863 3230 223e 5f78 6f70 5f5f 496e 128c20">_xop__In │ │ │ │ +00118a60: 636c 7564 653a 3a69 643c 2f61 3e3c 2f64 clude::id
    char * id │ │ │ │ +00118a90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    NULL to │ │ │ │ +00118ab0: 2067 656e 6572 6174 6520 616e 2069 6420 generate an id │ │ │ │ +00118ac0: 6f72 2061 7373 6967 6e20 7468 6973 206d or assign this m │ │ │ │ +00118ad0: 656d 6265 7220 7661 7269 6162 6c65 2061 ember variable a │ │ │ │ +00118ae0: 2075 6e69 7175 6520 5555 4944 2e3c 2f64 unique UUID.
    Definit │ │ │ │ +00118b10: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +00118b20: 322e 683a 3938 3836 3c2f 6469 763e 3c2f 2.h:9886
    .
    < │ │ │ │ +00118ba0: 6120 6872 6566 3d22 7374 7275 6374 5f5f a href="struct__ │ │ │ │ +00118bb0: 786f 705f 5f5f 5f5f 696e 636c 7564 652e xop_____include. │ │ │ │ +00118bc0: 6874 6d6c 2361 3839 3461 3534 6466 3264 html#a894a54df2d │ │ │ │ +00118bd0: 3035 3239 3839 6666 3263 3230 6433 3434 052989ff2c20d344 │ │ │ │ +00118be0: 6635 3663 3931 223e 5f78 6f70 5f5f 496e f56c91">_xop__In │ │ │ │ +00118bf0: 636c 7564 653a 3a6f 7074 696f 6e73 3c2f clude::options
    char │ │ │ │ +00118c20: 202a 206f 7074 696f 6e73 3c2f 6469 763e * options
    │ │ │ │ +00118c30: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    description o │ │ │ │ +00118c50: 6620 7468 6520 4d49 4d45 2f4d 544f 4d20 f the MIME/MTOM │ │ │ │ +00118c60: 6174 7461 6368 6d65 6e74 206f 7220 4e55 attachment or NU │ │ │ │ +00118c70: 4c4c 3c2f 6469 763e 3c64 6976 2063 6c61 LL
    De │ │ │ │ +00118c90: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ +00118ca0: 6473 6f61 7032 2e68 3a39 3838 383c 2f64 dsoap2.h:9888
    .
    │ │ │ │ +00118d10: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    │ │ │ │ +00118da0: 696e 7420 5f5f 7369 7a65 3c2f 6469 763e int __size
    │ │ │ │ +00118db0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    size of the b │ │ │ │ +00118dd0: 696e 6172 7920 6461 7461 3c2f 6469 763e inary data
    │ │ │ │ +00118de0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00118e00: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +00118e10: 3a39 3838 353c 2f64 6976 3e3c 2f64 6976 :9885
    .
    _xop__Inclu │ │ │ │ +00118ee0: 6465 3a3a 5f5f 7074 723c 2f61 3e3c 2f64 de::__ptr
    unsigned │ │ │ │ +00118f10: 6368 6172 202a 205f 5f70 7472 3c2f 6469 char * __ptr
    pointer to │ │ │ │ +00118f40: 6269 6e61 7279 2064 6174 613c 2f64 6976 binary data
    Definitio │ │ │ │ +00118f70: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +00118f80: 683a 3938 3834 3c2f 6469 763e 3c2f 6469 h:9884
    .

    The │ │ │ │ +00118fb0: 2061 6464 6974 696f 6e61 6c20 3c63 6f64 additional id, type, │ │ │ │ +00118fe0: 616e 6420 3c63 6f64 653e 6f70 7469 6f6e and option │ │ │ │ +00118ff0: 3c2f 636f 6465 3e20 6d65 6d62 6572 7320 members │ │ │ │ +00119000: 656e 6162 6c65 204d 544f 4d20 6174 7461 enable MTOM atta │ │ │ │ +00119010: 6368 6d65 6e74 7320 666f 7220 7468 6520 chments for the │ │ │ │ +00119020: 6461 7461 2070 6f69 6e74 6564 2074 6f20 data pointed to │ │ │ │ +00119030: 6279 203c 636f 6465 3e5f 5f70 7472 3c2f by __ptr of size __size. The process f │ │ │ │ +00119070: 6f72 2073 656e 6469 6e67 2061 6e64 2072 or sending and r │ │ │ │ +00119080: 6563 6569 7669 6e67 204d 544f 4d20 584f eceiving MTOM XO │ │ │ │ +00119090: 5020 6174 7461 6368 6d65 6e74 7320 6973 P attachments is │ │ │ │ +001190a0: 2066 756c 6c79 2061 7574 6f6d 6174 6564 fully automated │ │ │ │ +001190b0: 2e20 5468 6520 3c63 6f64 653e 6964 3c2f . The id member ref │ │ │ │ +001190d0: 6572 656e 6365 7320 7468 6520 6174 7461 erences the atta │ │ │ │ +001190e0: 6368 6d65 6e74 2c20 7479 7069 6361 6c6c chment, typicall │ │ │ │ +001190f0: 7920 6120 636f 6e74 656e 7420 6964 2043 y a content id C │ │ │ │ +00119100: 4944 206f 7220 5555 4944 2077 6869 6368 ID or UUID which │ │ │ │ +00119110: 2063 616e 2062 6520 6f62 7461 696e 6564 can be obtained │ │ │ │ +00119120: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with soa │ │ │ │ +001191b0: 705f 7261 6e64 5f75 7569 643c 2f61 3e3c p_rand_uuid< │ │ │ │ +001191c0: 2f63 6f64 653e 2e20 5768 656e 2073 6574 /code>. When set │ │ │ │ +001191d0: 2074 6f20 4e55 4c4c 2c20 6120 756e 6971 to NULL, a uniq │ │ │ │ +001191e0: 7565 2043 4944 2069 7320 6175 746f 6d61 ue CID is automa │ │ │ │ +001191f0: 7469 6361 6c6c 7920 7573 6564 2e20 5468 tically used. Th │ │ │ │ +00119200: 6520 3c63 6f64 653e 7479 7065 3c2f 636f e type field specif │ │ │ │ +00119220: 6965 7320 7468 6520 7265 7175 6972 6564 ies the required │ │ │ │ +00119230: 204d 494d 4520 7479 7065 206f 6620 7468 MIME type of th │ │ │ │ +00119240: 6520 6269 6e61 7279 2064 6174 612c 2061 e binary data, a │ │ │ │ +00119250: 6e64 2074 6865 206f 7074 696f 6e61 6c20 nd the optional │ │ │ │ +00119260: 3c63 6f64 653e 6f70 7469 6f6e 733c 2f63 options member can │ │ │ │ +00119280: 6265 2075 7365 6420 746f 2070 6967 6779 be used to piggy │ │ │ │ +00119290: 2d62 6163 6b20 6465 7363 7269 7074 6976 -back descriptiv │ │ │ │ +001192a0: 6520 7465 7874 2077 6974 6820 616e 2061 e text with an a │ │ │ │ +001192b0: 7474 6163 686d 656e 742e 2054 6865 206f ttachment. The o │ │ │ │ +001192c0: 7264 6572 206f 6620 7468 6520 6465 636c rder of the decl │ │ │ │ +001192d0: 6172 6174 696f 6e20 6f66 2074 6865 206d aration of the m │ │ │ │ +001192e0: 656d 6265 7273 2069 7320 7369 676e 6966 embers is signif │ │ │ │ +001192f0: 6963 616e 742e 3c2f 703e 0a3c 703e 596f icant.

    .

    Yo │ │ │ │ +00119300: 7520 6361 6e20 696d 706f 7274 203c 656d u can import xop.h in your │ │ │ │ +00119330: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ +00119340: 7220 6669 6c65 2074 6f20 7573 6520 7468 r file to use th │ │ │ │ +00119350: 6520 4d54 4f4d 2061 7474 6163 686d 656e e MTOM attachmen │ │ │ │ +00119360: 7473 2c20 666f 7220 6578 616d 706c 653a ts, for example: │ │ │ │ +00119370: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #import │ │ │ │ +001193c0: 2671 756f 743b 696d 706f 7274 2f78 6f70 "import/xop │ │ │ │ +001193d0: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" │ │ │ │ +001193e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #import &quo │ │ │ │ +00119420: 743b 696d 706f 7274 2f78 6d69 6d65 352e t;import/xmime5. │ │ │ │ +00119430: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" < │ │ │ │ +00119440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #import " │ │ │ │ +00119480: 3b69 6d70 6f72 742f 736f 6170 3132 2e68 ;import/soap12.h │ │ │ │ +00119490: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    /* │ │ │ │ +001194d0: 616c 7465 726e 6174 6976 656c 792c 2077 alternatively, w │ │ │ │ +001194e0: 6974 686f 7574 2074 6865 2069 6d70 6f72 ithout the impor │ │ │ │ +001194f0: 7420 6162 6f76 652c 2075 7365 3a20 3c2f t above, use:
    .
    //gsoap SOAP │ │ │ │ +00119540: 2d45 4e56 2073 6368 656d 6120 6e61 6d65 -ENV schema name │ │ │ │ +00119550: 7370 6163 653a 2068 7474 703a 2f2f 7777 space: http://ww │ │ │ │ +00119560: 772e 7733 2e6f 7267 2f32 3030 332f 3035 w.w3.org/2003/05 │ │ │ │ +00119570: 2f73 6f61 702d 656e 7665 6c6f 7065 203c /soap-envelope < │ │ │ │ +00119580: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001195a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001195b0: 656e 7422 3e2f 2f67 736f 6170 2053 4f41 ent">//gsoap SOA │ │ │ │ +001195c0: 502d 454e 4320 7363 6865 6d61 206e 616d P-ENC schema nam │ │ │ │ +001195d0: 6573 7061 6365 3a20 6874 7470 3a2f 2f77 espace: http://w │ │ │ │ +001195e0: 7777 2e77 332e 6f72 672f 3230 3033 2f30 ww.w3.org/2003/0 │ │ │ │ +001195f0: 352f 736f 6170 2d65 6e63 6f64 696e 6720 5/soap-encoding │ │ │ │ +00119600: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00119620: 3c73 7061 6e20 636c 6173 733d 2263 6f6d */ │ │ │ │ +00119640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ 00119660: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    //gsoap x sch │ │ │ │ -001196b0: 656d 6120 6e61 6d65 7370 6163 653a 2068 ema namespace: h │ │ │ │ -001196c0: 7474 703a 2f2f 6d79 2e66 6972 7374 2e6d ttp://my.first.m │ │ │ │ -001196d0: 746f 6d2e 6e65 7420 3c2f 7370 616e 3e3c tom.net < │ │ │ │ -001196e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ -00119710: 7275 6374 203c 2f73 7061 6e3e 785f 5f6d ruct x__m │ │ │ │ -00119720: 7944 6174 6120 3c2f 6469 763e 0a3c 6469 yData
    .{ │ │ │ │ -00119740: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    _xop__Include xop__Include; │ │ │ │ -001197b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // attach │ │ │ │ -001197d0: 6d65 6e74 203c 2f73 7061 6e3e 3c2f 6469 ment .
    @ char * │ │ │ │ -00119820: 786d 696d 6535 5f5f 636f 6e74 656e 7454 xmime5__contentT │ │ │ │ -00119830: 7970 653b 2020 3c73 7061 6e20 636c 6173 ype; // a │ │ │ │ -00119850: 6e64 2069 7473 2063 6f6e 7465 6e74 5479 nd its contentTy │ │ │ │ -00119860: 7065 203c 2f73 7061 6e3e 3c2f 6469 763e pe
    │ │ │ │ -00119870: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .< │ │ │ │ -001198a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001198b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int x__myMTOMtes │ │ │ │ -001198d0: 7428 3c73 7061 6e20 636c 6173 733d 226b t(struct x__myData │ │ │ │ -00119900: 2a69 6e2c 203c 7370 616e 2063 6c61 7373 *in, struc │ │ │ │ -00119920: 743c 2f73 7061 6e3e 2078 5f5f 6d79 4461 t x__myDa │ │ │ │ -00119930: 7461 202a 6f75 7429 3b3c 2f64 6976 3e0a ta *out);
    . │ │ │ │ -00119940: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    When a │ │ │ │ -00119960: 6e20 696e 7374 616e 6365 206f 6620 3c63 n instance of x__myDataTyp │ │ │ │ -00119980: 653c 2f63 6f64 653e 2069 7320 7365 7269 e is seri │ │ │ │ -00119990: 616c 697a 6564 2061 6e64 2065 6974 6865 alized and eithe │ │ │ │ -001199a0: 7220 6f72 2062 6f74 6820 7468 6520 3c63 r or both the id an │ │ │ │ -001199c0: 6420 3c63 6f64 653e 7479 7065 3c2f 636f d type members are │ │ │ │ -001199e0: 6e6f 6e2d 4e55 4c4c 2c20 7468 6520 6461 non-NULL, the da │ │ │ │ -001199f0: 7461 2069 7320 7472 616e 736d 6974 7465 ta is transmitte │ │ │ │ -00119a00: 6420 6173 204d 544f 4d20 4d49 4d45 2061 d as MTOM MIME a │ │ │ │ -00119a10: 7474 6163 686d 656e 7420 6966 2074 6865 ttachment if the │ │ │ │ -00119a20: 203c 636f 6465 3e23 534f 4150 5f45 4e43 #SOAP_ENC │ │ │ │ -00119a30: 5f4d 544f 4d3c 2f63 6f64 653e 2066 6c61 _MTOM fla │ │ │ │ -00119a40: 6720 6973 2073 6574 2069 6e20 7468 6520 g is set in the │ │ │ │ -00119a50: 6753 4f41 5027 7320 736f 6170 2073 7472 gSOAP's soap str │ │ │ │ -00119a60: 7563 7420 636f 6e74 6578 743a 3c2f 703e uct context:

    │ │ │ │ -00119a70: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    . │ │ │ │ -00119bf0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    SOA │ │ │ │ -00119ca0: 505f 454e 435f 4d54 4f4d 3c2f 613e 3c2f P_ENC_MTOM
    #define │ │ │ │ -00119cd0: 534f 4150 5f45 4e43 5f4d 544f 4d3c 2f64 SOAP_ENC_MTOM
    soap_mode │ │ │ │ -00119d00: 454e 4320 6f75 7470 7574 2066 6c61 6720 ENC output flag │ │ │ │ -00119d10: 7661 6c75 6520 746f 2065 6e61 626c 6520 value to enable │ │ │ │ -00119d20: 4d54 4f4d 2058 4f50 2061 7474 6163 686d MTOM XOP attachm │ │ │ │ -00119d30: 656e 7473 2069 6e20 6d65 7373 6167 6573 ents in messages │ │ │ │ -00119d40: 2074 6f20 6265 2073 656e 742c 2e2e 2e3c to be sent,...< │ │ │ │ -00119d50: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -00119d70: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -00119d80: 6170 322e 683a 3137 3736 3c2f 6469 763e ap2.h:1776
    │ │ │ │ -00119d90: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    Without this fl │ │ │ │ -00119dc0: 6167 2c20 7468 6520 6174 7461 6368 6d65 ag, the attachme │ │ │ │ -00119dd0: 6e74 7320 7769 6c6c 2062 6520 7472 616e nts will be tran │ │ │ │ -00119de0: 736d 6974 7465 6420 696e 2044 494d 4520 smitted in DIME │ │ │ │ -00119df0: 666f 726d 6174 2c20 7768 6963 6820 6973 format, which is │ │ │ │ -00119e00: 206e 6f74 2077 6861 7420 7765 2077 616e not what we wan │ │ │ │ -00119e10: 742e 2049 6620 796f 7572 2063 7572 7265 t. If your curre │ │ │ │ -00119e20: 6e74 2063 6c69 656e 7473 2061 6e64 2073 nt clients and s │ │ │ │ -00119e30: 6572 7669 6365 7320 6172 6520 6261 7365 ervices are base │ │ │ │ -00119e40: 6420 6f6e 206e 6f6e 2d73 7472 6561 6d69 d on non-streami │ │ │ │ -00119e50: 6e67 2044 494d 4520 6174 7461 6368 6d65 ng DIME attachme │ │ │ │ -00119e60: 6e74 7320 7573 696e 6720 7468 6520 534f nts using the SO │ │ │ │ -00119e70: 4150 2062 6f64 7920 7265 6665 7265 6e63 AP body referenc │ │ │ │ -00119e80: 6520 6d65 6368 616e 6973 6d20 2874 6875 e mechanism (thu │ │ │ │ -00119e90: 732c 2077 6974 686f 7574 2075 7369 6e67 s, without using │ │ │ │ -00119ea0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap_set_dime_ │ │ │ │ -00119f40: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment function) │ │ │ │ -00119f60: 6f72 2070 6c61 696e 2062 6173 6536 3420 or plain base64 │ │ │ │ -00119f70: 6269 6e61 7279 2058 4d4c 2064 6174 6120 binary XML data │ │ │ │ -00119f80: 656c 656d 656e 7473 2c20 6974 2069 7320 elements, it is │ │ │ │ -00119f90: 7665 7279 2065 6173 7920 746f 2061 646f very easy to ado │ │ │ │ -00119fa0: 7074 204d 544f 4d20 6279 2072 656e 616d pt MTOM by renam │ │ │ │ -00119fb0: 696e 6720 7468 6520 6269 6e61 7279 2074 ing the binary t │ │ │ │ -00119fc0: 7970 6573 2074 6f20 3c63 6f64 653e 786f ypes to xo │ │ │ │ -00119fd0: 705f 5f49 6e63 6c75 6465 3c2f 636f 6465 p__Include and using the │ │ │ │ -00119ff0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_ │ │ │ │ -0011a000: 4d54 4f4d 3c2f 636f 6465 3e20 666c 6167 MTOM flag │ │ │ │ -0011a010: 2077 6974 6820 7468 6520 534f 4150 2031 with the SOAP 1 │ │ │ │ -0011a020: 2e32 206e 616d 6573 7061 6365 2e3c 2f70 .2 namespace.

    .

    See also AP │ │ │ │ -0011a040: 4920 646f 6375 6d65 6e74 6174 696f 6e20 I documentation │ │ │ │ -0011a050: 4d6f 6475 6c65 203c 6120 636c 6173 733d Module MIME attachm │ │ │ │ -0011a090: 656e 7420 6675 6e63 7469 6f6e 733c 2f61 ent functions.

    .

    .... < │ │ │ │ -0011a0b0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -0011a0c0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -0011a0d0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Generating │ │ │ │ -0011a110: 204d 756c 7469 7061 7274 5265 6c61 7465 MultipartRelate │ │ │ │ -0011a120: 6420 4d49 4d45 2061 7474 6163 686d 656e d MIME attachmen │ │ │ │ -0011a130: 7420 6269 6e64 696e 6773 2069 6e20 5753 t bindings in WS │ │ │ │ -0011a140: 444c 3c2f 6832 3e0a 3c70 3e54 6f20 6765 DL

    .

    To ge │ │ │ │ -0011a150: 6e65 7261 7465 206d 756c 7469 7061 7274 nerate multipart │ │ │ │ -0011a160: 5265 6c61 7465 6420 6269 6e64 696e 6773 Related bindings │ │ │ │ -0011a170: 2069 6e20 7468 6520 5753 444c 2066 696c in the WSDL fil │ │ │ │ -0011a180: 6520 696e 6469 6361 7469 6e67 2074 6865 e indicating the │ │ │ │ -0011a190: 2075 7365 206f 6620 4d49 4d45 2061 7474 use of MIME att │ │ │ │ -0011a1a0: 6163 686d 656e 7473 2c20 7573 653a 3c2f achments, use:.

    //gsoap <pre │ │ │ │ -0011a200: 6669 7826 6774 3b20 7365 7276 6963 6520 fix> service │ │ │ │ -0011a210: 6d65 7468 6f64 2d6d 696d 652d 7479 7065 method-mime-type │ │ │ │ -0011a220: 3a20 2e2e 2e3c 2f73 7061 6e3e 3c2f 6469 : ....

    Thi │ │ │ │ -0011a250: 7320 6469 7265 6374 6976 6520 6469 7265 s directive dire │ │ │ │ -0011a260: 6374 6976 6520 6361 6e20 6265 2072 6570 ctive can be rep │ │ │ │ -0011a270: 6561 7465 6420 666f 7220 6561 6368 2061 eated for each a │ │ │ │ -0011a280: 7474 6163 686d 656e 7420 796f 7520 7761 ttachment you wa │ │ │ │ -0011a290: 6e74 2074 6f20 6173 736f 6369 6174 6520 nt to associate │ │ │ │ -0011a2a0: 7769 7468 2061 206d 6574 686f 6427 7320 with a method's │ │ │ │ -0011a2b0: 7265 7175 6573 7420 616e 6420 7265 7370 request and resp │ │ │ │ -0011a2c0: 6f6e 7365 206d 6573 7361 6765 2e20 7365 onse message. se │ │ │ │ -0011a2d0: 6520 616c 736f 2053 6563 7469 6f6e 203c e also Section < │ │ │ │ -0011a2e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0011a2f0: 663d 2269 6e64 6578 2e68 746d 6c23 6469 f="index.html#di │ │ │ │ -0011a300: 7265 6374 6976 6573 223e 4469 7265 6374 rectives">Direct │ │ │ │ -0011a310: 6976 6573 3c2f 613e 202e 3c2f 703e 0a3c ives .

    .< │ │ │ │ -0011a320: 703e 466f 7220 6578 616d 706c 653a 3c2f p>For example:.
    #import &q │ │ │ │ -0011a380: 756f 743b 696d 706f 7274 2f78 6f70 2e68 uot;import/xop.h │ │ │ │ -0011a390: 2671 756f 743b 3c2f 7370 616e 3e20 3c2f " .
    #import " │ │ │ │ -0011a3e0: 696d 706f 7274 2f78 6d69 6d65 352e 6826 import/xmime5.h& │ │ │ │ -0011a3f0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "i │ │ │ │ -0011a440: 6d70 6f72 742f 736f 6170 3132 2e68 2671 mport/soap12.h&q │ │ │ │ -0011a450: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; //gsoap │ │ │ │ +00119690: 2078 2073 6368 656d 6120 6e61 6d65 7370 x schema namesp │ │ │ │ +001196a0: 6163 653a 2068 7474 703a 2f2f 6d79 2e66 ace: http://my.f │ │ │ │ +001196b0: 6972 7374 2e6d 746f 6d2e 6e65 7420 3c2f irst.mtom.net
    .
    struct x__myData .
    {
    . │ │ │ │ +00119740: 2020 203c 6120 636c 6173 733d 2263 6f64 _xop__Inc │ │ │ │ +00119780: 6c75 6465 3c2f 613e 2078 6f70 5f5f 496e lude xop__In │ │ │ │ +00119790: 636c 7564 653b 203c 7370 616e 2063 6c61 clude; // │ │ │ │ +001197b0: 6174 7461 6368 6d65 6e74 203c 2f73 7061 attachment
    .
    @ < │ │ │ │ +001197e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001197f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *xmime5__co │ │ │ │ +00119810: 6e74 656e 7454 7970 653b 2020 3c73 7061 ntentType; // and its con │ │ │ │ +00119840: 7465 6e74 5479 7065 203c 2f73 7061 6e3e tentType │ │ │ │ +00119850: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }; .
    i │ │ │ │ +001198a0: 6e74 3c2f 7370 616e 3e20 785f 5f6d 794d nt x__myM │ │ │ │ +001198b0: 544f 4d74 6573 7428 3c73 7061 6e20 636c TOMtest(st │ │ │ │ +001198d0: 7275 6374 3c2f 7370 616e 3e20 785f 5f6d ruct x__m │ │ │ │ +001198e0: 7944 6174 6120 2a69 6e2c 203c 7370 616e yData *in, struct x │ │ │ │ +00119910: 5f5f 6d79 4461 7461 202a 6f75 7429 3b3c __myData *out);< │ │ │ │ +00119920: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +00119940: 5768 656e 2061 6e20 696e 7374 616e 6365 When an instance │ │ │ │ +00119950: 206f 6620 3c63 6f64 653e 785f 5f6d 7944 of x__myD │ │ │ │ +00119960: 6174 6154 7970 653c 2f63 6f64 653e 2069 ataType i │ │ │ │ +00119970: 7320 7365 7269 616c 697a 6564 2061 6e64 s serialized and │ │ │ │ +00119980: 2065 6974 6865 7220 6f72 2062 6f74 6820 either or both │ │ │ │ +00119990: 7468 6520 3c63 6f64 653e 6964 3c2f 636f the id and ty │ │ │ │ +001199b0: 7065 3c2f 636f 6465 3e20 6d65 6d62 6572 pe member │ │ │ │ +001199c0: 7320 6172 6520 6e6f 6e2d 4e55 4c4c 2c20 s are non-NULL, │ │ │ │ +001199d0: 7468 6520 6461 7461 2069 7320 7472 616e the data is tran │ │ │ │ +001199e0: 736d 6974 7465 6420 6173 204d 544f 4d20 smitted as MTOM │ │ │ │ +001199f0: 4d49 4d45 2061 7474 6163 686d 656e 7420 MIME attachment │ │ │ │ +00119a00: 6966 2074 6865 203c 636f 6465 3e23 534f if the #SO │ │ │ │ +00119a10: 4150 5f45 4e43 5f4d 544f 4d3c 2f63 6f64 AP_ENC_MTOM flag is set i │ │ │ │ +00119a30: 6e20 7468 6520 6753 4f41 5027 7320 736f n the gSOAP's so │ │ │ │ +00119a40: 6170 2073 7472 7563 7420 636f 6e74 6578 ap struct contex │ │ │ │ +00119a50: 743a 3c2f 703e 0a3c 6469 7620 636c 6173 t:

    .
    < │ │ │ │ +00119a80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00119a90: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soap< │ │ │ │ +00119b00: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_ │ │ │ │ +00119b60: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP │ │ │ │ +00119bc0: 5f45 4e43 5f4d 544f 4d3c 2f61 3e29 3b3c _ENC_MTOM);< │ │ │ │ +00119bd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #d │ │ │ │ +00119cb0: 6566 696e 6520 534f 4150 5f45 4e43 5f4d efine SOAP_ENC_M │ │ │ │ +00119cc0: 544f 4d3c 2f64 6976 3e3c 6469 7620 636c TOM
    soap │ │ │ │ +00119ce0: 5f6d 6f64 6520 454e 4320 6f75 7470 7574 _mode ENC output │ │ │ │ +00119cf0: 2066 6c61 6720 7661 6c75 6520 746f 2065 flag value to e │ │ │ │ +00119d00: 6e61 626c 6520 4d54 4f4d 2058 4f50 2061 nable MTOM XOP a │ │ │ │ +00119d10: 7474 6163 686d 656e 7473 2069 6e20 6d65 ttachments in me │ │ │ │ +00119d20: 7373 6167 6573 2074 6f20 6265 2073 656e ssages to be sen │ │ │ │ +00119d30: 742c 2e2e 2e3c 2f64 6976 3e3c 6469 7620 t,...
    Definition: │ │ │ │ +00119d60: 2073 7464 736f 6170 322e 683a 3137 3736 stdsoap2.h:1776 │ │ │ │ +00119d70: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    Without t │ │ │ │ +00119da0: 6869 7320 666c 6167 2c20 7468 6520 6174 his flag, the at │ │ │ │ +00119db0: 7461 6368 6d65 6e74 7320 7769 6c6c 2062 tachments will b │ │ │ │ +00119dc0: 6520 7472 616e 736d 6974 7465 6420 696e e transmitted in │ │ │ │ +00119dd0: 2044 494d 4520 666f 726d 6174 2c20 7768 DIME format, wh │ │ │ │ +00119de0: 6963 6820 6973 206e 6f74 2077 6861 7420 ich is not what │ │ │ │ +00119df0: 7765 2077 616e 742e 2049 6620 796f 7572 we want. If your │ │ │ │ +00119e00: 2063 7572 7265 6e74 2063 6c69 656e 7473 current clients │ │ │ │ +00119e10: 2061 6e64 2073 6572 7669 6365 7320 6172 and services ar │ │ │ │ +00119e20: 6520 6261 7365 6420 6f6e 206e 6f6e 2d73 e based on non-s │ │ │ │ +00119e30: 7472 6561 6d69 6e67 2044 494d 4520 6174 treaming DIME at │ │ │ │ +00119e40: 7461 6368 6d65 6e74 7320 7573 696e 6720 tachments using │ │ │ │ +00119e50: 7468 6520 534f 4150 2062 6f64 7920 7265 the SOAP body re │ │ │ │ +00119e60: 6665 7265 6e63 6520 6d65 6368 616e 6973 ference mechanis │ │ │ │ +00119e70: 6d20 2874 6875 732c 2077 6974 686f 7574 m (thus, without │ │ │ │ +00119e80: 2075 7369 6e67 2074 6865 203c 636f 6465 using the soap_set │ │ │ │ +00119f20: 5f64 696d 655f 6174 7461 6368 6d65 6e74 _dime_attachment │ │ │ │ +00119f30: 3c2f 613e 3c2f 636f 6465 3e20 6675 6e63 func │ │ │ │ +00119f40: 7469 6f6e 2920 6f72 2070 6c61 696e 2062 tion) or plain b │ │ │ │ +00119f50: 6173 6536 3420 6269 6e61 7279 2058 4d4c ase64 binary XML │ │ │ │ +00119f60: 2064 6174 6120 656c 656d 656e 7473 2c20 data elements, │ │ │ │ +00119f70: 6974 2069 7320 7665 7279 2065 6173 7920 it is very easy │ │ │ │ +00119f80: 746f 2061 646f 7074 204d 544f 4d20 6279 to adopt MTOM by │ │ │ │ +00119f90: 2072 656e 616d 696e 6720 7468 6520 6269 renaming the bi │ │ │ │ +00119fa0: 6e61 7279 2074 7970 6573 2074 6f20 3c63 nary types to xop__Include │ │ │ │ +00119fc0: 3c2f 636f 6465 3e20 616e 6420 7573 696e and usin │ │ │ │ +00119fd0: 6720 7468 6520 3c63 6f64 653e 2353 4f41 g the #SOA │ │ │ │ +00119fe0: 505f 454e 435f 4d54 4f4d 3c2f 636f 6465 P_ENC_MTOM flag with the │ │ │ │ +0011a000: 534f 4150 2031 2e32 206e 616d 6573 7061 SOAP 1.2 namespa │ │ │ │ +0011a010: 6365 2e3c 2f70 3e0a 3c70 3e53 6565 2061 ce.

    .

    See a │ │ │ │ +0011a020: 6c73 6f20 4150 4920 646f 6375 6d65 6e74 lso API document │ │ │ │ +0011a030: 6174 696f 6e20 4d6f 6475 6c65 203c 6120 ation Module MIME a │ │ │ │ +0011a070: 7474 6163 686d 656e 7420 6675 6e63 7469 ttachment functi │ │ │ │ +0011a080: 6f6e 733c 2f61 3e2e 3c2f 703e 0a3c 703e ons.

    .

    │ │ │ │ +0011a090: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +0011a0b0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Gene │ │ │ │ +0011a0f0: 7261 7469 6e67 204d 756c 7469 7061 7274 rating Multipart │ │ │ │ +0011a100: 5265 6c61 7465 6420 4d49 4d45 2061 7474 Related MIME att │ │ │ │ +0011a110: 6163 686d 656e 7420 6269 6e64 696e 6773 achment bindings │ │ │ │ +0011a120: 2069 6e20 5753 444c 3c2f 6832 3e0a 3c70 in WSDL

    .

    To generate mul │ │ │ │ +0011a140: 7469 7061 7274 5265 6c61 7465 6420 6269 tipartRelated bi │ │ │ │ +0011a150: 6e64 696e 6773 2069 6e20 7468 6520 5753 ndings in the WS │ │ │ │ +0011a160: 444c 2066 696c 6520 696e 6469 6361 7469 DL file indicati │ │ │ │ +0011a170: 6e67 2074 6865 2075 7365 206f 6620 4d49 ng the use of MI │ │ │ │ +0011a180: 4d45 2061 7474 6163 686d 656e 7473 2c20 ME attachments, │ │ │ │ +0011a190: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    < │ │ │ │ +0011a1b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011a1c0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap & │ │ │ │ +0011a1e0: 6c74 3b70 7265 6669 7826 6774 3b20 7365 lt;prefix> se │ │ │ │ +0011a1f0: 7276 6963 6520 6d65 7468 6f64 2d6d 696d rvice method-mim │ │ │ │ +0011a200: 652d 7479 7065 3a20 2e2e 2e3c 2f73 7061 e-type: ...
    .
    < │ │ │ │ +0011a220: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +0011a230: 3c70 3e54 6869 7320 6469 7265 6374 6976

    This directiv │ │ │ │ +0011a240: 6520 6469 7265 6374 6976 6520 6361 6e20 e directive can │ │ │ │ +0011a250: 6265 2072 6570 6561 7465 6420 666f 7220 be repeated for │ │ │ │ +0011a260: 6561 6368 2061 7474 6163 686d 656e 7420 each attachment │ │ │ │ +0011a270: 796f 7520 7761 6e74 2074 6f20 6173 736f you want to asso │ │ │ │ +0011a280: 6369 6174 6520 7769 7468 2061 206d 6574 ciate with a met │ │ │ │ +0011a290: 686f 6427 7320 7265 7175 6573 7420 616e hod's request an │ │ │ │ +0011a2a0: 6420 7265 7370 6f6e 7365 206d 6573 7361 d response messa │ │ │ │ +0011a2b0: 6765 2e20 7365 6520 616c 736f 2053 6563 ge. see also Sec │ │ │ │ +0011a2c0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion │ │ │ │ +0011a2f0: 4469 7265 6374 6976 6573 3c2f 613e 202e Directives . │ │ │ │ +0011a300: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

    .

    For exam │ │ │ │ +0011a310: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    < │ │ │ │ +0011a330: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011a340: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp │ │ │ │ +0011a360: 6f72 7420 2671 756f 743b 696d 706f 7274 ort "import │ │ │ │ +0011a370: 2f78 6f70 2e68 2671 756f 743b 3c2f 7370 /xop.h"
    .
    #import │ │ │ │ +0011a3c0: 2671 756f 743b 696d 706f 7274 2f78 6d69 "import/xmi │ │ │ │ +0011a3d0: 6d65 352e 6826 7175 6f74 3b3c 2f73 7061 me5.h"
    .
    #import & │ │ │ │ +0011a420: 7175 6f74 3b69 6d70 6f72 742f 736f 6170 quot;import/soap │ │ │ │ +0011a430: 3132 2e68 2671 756f 743b 3c2f 7370 616e 12.h"
    .
    .
    .< │ │ │ │ -0011a490: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0011a4a0: 656e 7422 3e2f 2f67 736f 6170 2078 2073 ent">//gsoap x s │ │ │ │ -0011a4b0: 6368 656d 6120 6e61 6d65 7370 6163 653a chema namespace: │ │ │ │ -0011a4c0: 2068 7474 703a 2f2f 6d79 2e66 6972 7374 http://my.first │ │ │ │ -0011a4d0: 2e6d 746f 6d2e 6e65 7420 3c2f 7370 616e .mtom.net
    .
    │ │ │ │ -0011a510: 7374 7275 6374 203c 2f73 7061 6e3e 785f struct x_ │ │ │ │ -0011a520: 5f6d 7944 6174 6120 3c2f 6469 763e 0a3c _myData
    .< │ │ │ │ +0011a470: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine">//gso │ │ │ │ +0011a490: 6170 2078 2073 6368 656d 6120 6e61 6d65 ap x schema name │ │ │ │ +0011a4a0: 7370 6163 653a 2068 7474 703a 2f2f 6d79 space: http://my │ │ │ │ +0011a4b0: 2e66 6972 7374 2e6d 746f 6d2e 6e65 7420 .first.mtom.net │ │ │ │ +0011a4c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0011a4e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct
    x__myData .
    {
    .< │ │ │ │ 0011a530: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0011a540: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    < │ │ │ │ -0011a560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0011a570: 7265 663d 2273 7472 7563 745f 5f78 6f70 ref="struct__xop │ │ │ │ -0011a580: 5f5f 5f5f 5f69 6e63 6c75 6465 2e68 746d _____include.htm │ │ │ │ -0011a590: 6c22 3e5f 786f 705f 5f49 6e63 6c75 6465 l">_xop__Include │ │ │ │ -0011a5a0: 3c2f 613e 2078 6f70 5f5f 496e 636c 7564 xop__Includ │ │ │ │ -0011a5b0: 653b 203c 7370 616e 2063 6c61 7373 3d22 e; // atta │ │ │ │ -0011a5d0: 6368 6d65 6e74 203c 2f73 7061 6e3e 3c2f chment .
    @ char │ │ │ │ -0011a620: 202a 786d 696d 6535 5f5f 636f 6e74 656e *xmime5__conten │ │ │ │ -0011a630: 7454 7970 653b 2020 3c73 7061 6e20 636c tType; // │ │ │ │ -0011a650: 2061 6e64 2069 7473 2063 6f6e 7465 6e74 and its content │ │ │ │ -0011a660: 5479 7065 203c 2f73 7061 6e3e 3c2f 6469 Type .
    };
    .< │ │ │ │ -0011a690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0011a6a0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap x │ │ │ │ -0011a6c0: 2073 6572 7669 6365 206d 6574 686f 642d service method- │ │ │ │ -0011a6d0: 6d69 6d65 2d74 7970 653a 206d 794d 544f mime-type: myMTO │ │ │ │ -0011a6e0: 4d74 6573 7420 7465 7874 2f78 6d6c 203c Mtest text/xml < │ │ │ │ -0011a6f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0011a710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0011a720: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int x__myMTOMtes │ │ │ │ -0011a740: 7428 3c73 7061 6e20 636c 6173 733d 226b t(struct x__myData │ │ │ │ -0011a770: 2a69 6e2c 203c 7370 616e 2063 6c61 7373 *in, struc │ │ │ │ -0011a790: 743c 2f73 7061 6e3e 2078 5f5f 6d79 4461 t x__myDa │ │ │ │ -0011a7a0: 7461 202a 6f75 7429 3b3c 2f64 6976 3e0a ta *out);
    . │ │ │ │ -0011a7b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The //gsoap x se │ │ │ │ -0011a7e0: 7276 6963 6520 6d65 7468 6f64 2d6d 696d rvice method-mim │ │ │ │ -0011a7f0: 652d 7479 7065 3a3c 2f63 6f64 653e 2064 e-type: d │ │ │ │ -0011a800: 6972 6563 7469 7665 2069 6e64 6963 6174 irective indicat │ │ │ │ -0011a810: 6573 2074 6861 7420 7468 6973 206f 7065 es that this ope │ │ │ │ -0011a820: 7261 7469 6f6e 2061 6363 6570 7473 203c ration accepts < │ │ │ │ -0011a830: 656d 3e3c 636f 6465 3e74 6578 742f 786d em>text/xm │ │ │ │ -0011a840: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 4d49 l MI │ │ │ │ -0011a850: 4d45 2061 7474 6163 686d 656e 7473 2e20 ME attachments. │ │ │ │ -0011a860: 5365 6520 7468 6520 534f 4150 2d77 6974 See the SOAP-wit │ │ │ │ -0011a870: 682d 4174 7461 6368 6d65 6e74 2073 7065 h-Attachment spe │ │ │ │ -0011a880: 6369 6669 6361 7469 6f6e 2066 6f72 2074 cification for t │ │ │ │ -0011a890: 6865 204d 494d 4520 7479 7065 7320 746f he MIME types to │ │ │ │ -0011a8a0: 2075 7365 2028 666f 7220 6578 616d 706c use (for exampl │ │ │ │ -0011a8b0: 652c 203c 636f 6465 3e2a 2f2a 3c2f 636f e, */* is a wildcar │ │ │ │ -0011a8d0: 6429 2e20 4966 2074 6865 206f 7065 7261 d). If the opera │ │ │ │ -0011a8e0: 7469 6f6e 2068 6173 206d 6f72 6520 7468 tion has more th │ │ │ │ -0011a8f0: 616e 206f 6e65 2061 7474 6163 686d 656e an one attachmen │ │ │ │ -0011a900: 742c 206a 7573 7420 7265 7065 6174 2074 t, just repeat t │ │ │ │ -0011a910: 6869 7320 6469 7265 6374 6976 6520 666f his directive fo │ │ │ │ -0011a920: 7220 6561 6368 2061 7474 6163 686d 656e r each attachmen │ │ │ │ -0011a930: 7420 796f 7520 7761 6e74 2074 6f20 6269 t you want to bi │ │ │ │ -0011a940: 6e64 2074 6f20 7468 6520 6f70 6572 6174 nd to the operat │ │ │ │ -0011a950: 696f 6e2e 3c2f 703e 0a3c 703e 546f 2062 ion.

    .

    To b │ │ │ │ -0011a960: 696e 6420 6174 7461 6368 6d65 6e74 7320 ind attachments │ │ │ │ -0011a970: 6f6e 6c79 2074 6f20 7468 6520 7265 7175 only to the requ │ │ │ │ -0011a980: 6573 7420 6d65 7373 6167 6520 6f66 2061 est message of a │ │ │ │ -0011a990: 6e20 6f70 6572 6174 696f 6e2c 2075 7365 n operation, use │ │ │ │ -0011a9a0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap <p │ │ │ │ -0011a9f0: 7265 6669 7826 6774 3b20 7365 7276 6963 refix> servic │ │ │ │ -0011aa00: 6520 6d65 7468 6f64 2d69 6e70 7574 2d6d e method-input-m │ │ │ │ -0011aa10: 696d 652d 7479 7065 3a20 2e2e 2e3c 2f73 ime-type: ...
    .

    The │ │ │ │ -0011ab40: 7773 646c 3268 2074 6f6f 6c20 7265 636f wsdl2h tool reco │ │ │ │ -0011ab50: 676e 697a 6573 204d 494d 4520 6174 7461 gnizes MIME atta │ │ │ │ -0011ab60: 6368 6d65 6e74 7320 616e 6420 7072 6f64 chments and prod │ │ │ │ -0011ab70: 7563 6573 2061 6e20 616e 6e6f 7461 7465 uces an annotate │ │ │ │ -0011ab80: 6420 6865 6164 6572 2066 696c 652e 3c2f d header file..

    You can re │ │ │ │ -0011aba0: 7065 6174 2074 6865 7365 2064 6972 6563 peat these direc │ │ │ │ -0011abb0: 7469 7665 7320 666f 7220 616c 6c20 6d75 tives for all mu │ │ │ │ -0011abc0: 6c74 6970 6172 7452 656c 6174 6564 204d ltipartRelated M │ │ │ │ -0011abd0: 494d 4520 6174 7461 6368 6d65 6e74 7320 IME attachments │ │ │ │ -0011abe0: 796f 7520 7761 6e74 2074 6f20 6173 736f you want to asso │ │ │ │ -0011abf0: 6369 6174 6520 7769 7468 2074 6865 2073 ciate with the s │ │ │ │ -0011ac00: 6572 7669 6365 206f 7065 7261 7469 6f6e ervice operation │ │ │ │ -0011ac10: 2069 6e70 7574 2061 6e64 206f 7574 7075 input and outpu │ │ │ │ -0011ac20: 742e 3c2f 703e 0a3c 703e f09f 949d 203c t.

    .

    .... < │ │ │ │ -0011ac30: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -0011ac40: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -0011ac50: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Sending and re │ │ │ │ -0011aca0: 6365 6976 696e 6720 4d54 4f4d 2061 7474 ceiving MTOM att │ │ │ │ -0011acb0: 6163 686d 656e 7473 3c2f 6832 3e0a 3c70 achments

    .

    A receiver must │ │ │ │ -0011acd0: 2062 6520 696e 666f 726d 6564 2074 6f20 be informed to │ │ │ │ -0011ace0: 7265 636f 676e 697a 6520 4d54 4f4d 2061 recognize MTOM a │ │ │ │ -0011acf0: 7474 6163 686d 656e 7473 2062 7920 7365 ttachments by se │ │ │ │ -0011ad00: 7474 696e 6720 7468 6520 3c63 6f64 653e tting the │ │ │ │ -0011ad10: 2353 4f41 505f 454e 435f 4d54 4f4d 3c2f #SOAP_ENC_MTOM flag of th │ │ │ │ -0011ad30: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context. Oth │ │ │ │ -0011ada0: 6572 7769 7365 2c20 7468 6520 7265 6775 erwise, the regu │ │ │ │ -0011adb0: 6c61 7220 4d49 4d45 2061 7474 6163 686d lar MIME attachm │ │ │ │ -0011adc0: 656e 7420 6d65 6368 616e 6973 6d20 2853 ent mechanism (S │ │ │ │ -0011add0: 7741 2920 7769 6c6c 2062 6520 7573 6564 wA) will be used │ │ │ │ -0011ade0: 2074 6f20 7374 6f72 6520 6174 7461 6368 to store attach │ │ │ │ -0011adf0: 6d65 6e74 732e 3c2f 703e 0a3c 703e 5768 ments.

    .

    Wh │ │ │ │ -0011ae00: 656e 2075 7369 6e67 2077 7364 6c32 6820 en using wsdl2h │ │ │ │ -0011ae10: 746f 2062 7569 6c64 2063 6c69 656e 7473 to build clients │ │ │ │ -0011ae20: 2061 6e64 2f6f 7220 7365 7276 6963 6573 and/or services │ │ │ │ -0011ae30: 2c20 796f 7520 7368 6f75 6c64 2075 7365 , you should use │ │ │ │ -0011ae40: 2074 6865 203c 656d 3e3c 636f 6465 3e74 the t │ │ │ │ -0011ae50: 7970 656d 6170 2e64 6174 3c2f 636f 6465 ypemap.dat file incl │ │ │ │ -0011ae70: 7564 6564 2069 6e20 7468 6520 6753 4f41 uded in the gSOA │ │ │ │ -0011ae80: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa │ │ │ │ -0011ae90: 636b 6167 652e 2054 6865 203c 656d 3e3c ckage. The < │ │ │ │ -0011aea0: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat │ │ │ │ -0011aeb0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil │ │ │ │ -0011aec0: 6520 6465 6669 6e65 7320 7468 6520 584f e defines the XO │ │ │ │ -0011aed0: 5020 6e61 6d65 7370 6163 6520 616e 6420 P namespace and │ │ │ │ -0011aee0: 584d 4c20 4d49 4d45 206e 616d 6573 7061 XML MIME namespa │ │ │ │ -0011aef0: 6365 7320 6173 2069 6d70 6f72 7465 6420 ces as imported │ │ │ │ -0011af00: 6e61 6d65 7370 6163 6573 3a20 3c2f 703e namespaces:

    │ │ │ │ -0011af10: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    xop    = &
    │ │ │ │ -0011af30: 6c74 3b68 7474 703a 2f2f 7777 772e 7733  lt;http://www.w3
    │ │ │ │ -0011af40: 2e6f 7267 2f32 3030 342f 3038 2f78 6f70  .org/2004/08/xop
    │ │ │ │ -0011af50: 2f69 6e63 6c75 6465 2667 743b 200a 786d  /include> .xm
    │ │ │ │ -0011af60: 696d 6535 203d 2026 6c74 3b68 7474 703a  ime5 = <http:
    │ │ │ │ -0011af70: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030  //www.w3.org/200
    │ │ │ │ -0011af80: 352f 3035 2f78 6d6c 6d69 6d65 2667 743b  5/05/xmlmime>
    │ │ │ │ -0011af90: 200a 786d 696d 6534 203d 2026 6c74 3b68   .xmime4 = <h
    │ │ │ │ -0011afa0: 7474 703a 2f2f 7777 772e 7733 2e6f 7267  ttp://www.w3.org
    │ │ │ │ -0011afb0: 2f32 3030 342f 3131 2f78 6d6c 6d69 6d65  /2004/11/xmlmime
    │ │ │ │ -0011afc0: 2667 743b 0a3c 2f70 7265 3e3c 703e 2054  >.

    T │ │ │ │ -0011afd0: 6865 2077 7364 6c32 6820 746f 6f6c 2075 he wsdl2h tool u │ │ │ │ -0011afe0: 7365 7320 7468 6520 3c65 6d3e 3c63 6f64 ses the typemap.dat file t │ │ │ │ -0011b010: 6f20 636f 6e76 6572 7420 5753 444c 2069 o convert WSDL i │ │ │ │ -0011b020: 6e74 6f20 616e 2069 6e74 6572 6661 6365 nto an interface │ │ │ │ -0011b030: 2068 6561 6465 7220 6669 6c65 2e20 496e header file. In │ │ │ │ -0011b040: 2074 6869 7320 6361 7365 2077 6520 646f this case we do │ │ │ │ -0011b050: 6e27 7420 7761 6e74 2074 6865 2077 7364 n't want the wsd │ │ │ │ -0011b060: 6c32 6820 746f 6f6c 2074 6f20 7265 6164 l2h tool to read │ │ │ │ -0011b070: 2074 6865 2058 4f50 2073 6368 656d 6120 the XOP schema │ │ │ │ -0011b080: 616e 6420 7472 616e 736c 6174 6520 6974 and translate it │ │ │ │ -0011b090: 2c20 7369 6e63 6520 7765 2068 6176 6520 , since we have │ │ │ │ -0011b0a0: 6120 7072 652d 6465 6669 6e65 6420 3c63 a pre-defined _xop__ │ │ │ │ -0011b120: 496e 636c 7564 653c 2f61 3e3c 2f63 6f64 Include element to ha │ │ │ │ -0011b140: 6e64 6c65 2058 4f50 2066 6f72 204d 544f ndle XOP for MTO │ │ │ │ -0011b150: 4d2e 2054 6869 7320 3c63 6f64 653e 3c61 M. This _xop__Includ │ │ │ │ -0011b1d0: 653c 2f61 3e3c 2f63 6f64 653e 2065 6c65 e ele │ │ │ │ -0011b1e0: 6d65 6e74 2069 7320 6465 6669 6e65 6420 ment is defined │ │ │ │ -0011b1f0: 696e 203c 656d 3e3c 636f 6465 3e78 6f70 in xop │ │ │ │ -0011b200: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 .h. │ │ │ │ -0011b210: 5468 6572 6566 6f72 652c 2074 6865 2062 Therefore, the b │ │ │ │ -0011b220: 696e 6469 6e67 7320 7368 6f77 6e20 6162 indings shown ab │ │ │ │ -0011b230: 6f76 6520 7769 6c6c 206e 6f74 2074 7261 ove will not tra │ │ │ │ -0011b240: 6e73 6c61 7465 2074 6865 2058 4f50 2061 nslate the XOP a │ │ │ │ -0011b250: 6e64 2058 4d4c 204d 494d 4520 7363 6865 nd XML MIME sche │ │ │ │ -0011b260: 6d61 7320 746f 2063 6f64 652c 2062 7574 mas to code, but │ │ │ │ -0011b270: 2067 656e 6572 6174 6573 203c 636f 6465 generates #import │ │ │ │ -0011b290: 7374 6174 656d 656e 7473 2069 6e73 7465 statements inste │ │ │ │ -0011b2a0: 6164 2069 6e20 7468 6520 6765 6e65 7261 ad in the genera │ │ │ │ -0011b2b0: 7465 6420 696e 7465 7266 6163 6520 6865 ted interface he │ │ │ │ -0011b2c0: 6164 6572 2066 696c 653a 3c2f 703e 0a3c ader file:

    .< │ │ │ │ -0011b2d0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -0011b2e0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    #import " │ │ │ │ -0011b320: 786f 702e 6826 7175 6f74 3b3c 2f73 7061 xop.h"
    .
    #import & │ │ │ │ -0011b370: 7175 6f74 3b78 6d69 6d65 352e 6826 7175 quot;xmime5.h&qu │ │ │ │ -0011b380: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    │ │ │ │ -0011b390: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The < │ │ │ │ -0011b3b0: 636f 6465 3e23 696d 706f 7274 3c2f 636f code>#import statements a │ │ │ │ -0011b3d0: 7265 206f 6e6c 7920 6164 6465 6420 666f re only added fo │ │ │ │ -0011b3e0: 7220 7468 6f73 6520 6e61 6d65 7370 6163 r those namespac │ │ │ │ -0011b3f0: 6573 2074 6861 7420 6172 6520 6163 7475 es that are actu │ │ │ │ -0011b400: 616c 6c79 2075 7365 642e 3c2f 703e 0a3c ally used.

    .< │ │ │ │ -0011b410: 703e 4c65 7427 7320 7461 6b65 2061 206c p>Let's take a l │ │ │ │ -0011b420: 6f6f 6b20 6174 2061 6e20 6578 616d 706c ook at an exampl │ │ │ │ -0011b430: 652e 2054 6865 2077 7364 6c32 6820 696d e. The wsdl2h im │ │ │ │ -0011b440: 706f 7274 6572 2067 656e 6572 6174 6573 porter generates │ │ │ │ -0011b450: 2061 2068 6561 6465 7220 6669 6c65 2077 a header file w │ │ │ │ -0011b460: 6974 6820 3c63 6f64 653e 2369 6d70 6f72 ith #impor │ │ │ │ -0011b470: 7420 2278 6f70 2e68 223c 2f63 6f64 653e t "xop.h" │ │ │ │ -0011b480: 2066 726f 6d20 6120 5753 444c 2074 6861 from a WSDL tha │ │ │ │ -0011b490: 7420 7265 6665 7265 6e63 6573 2058 4f50 t references XOP │ │ │ │ -0011b4a0: 2c20 666f 7220 6578 616d 706c 653a 3c2f , for example:.
    #import &q │ │ │ │ -0011b500: 756f 743b 786f 702e 6826 7175 6f74 3b3c uot;xop.h"< │ │ │ │ -0011b510: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0011b530: 3c73 7061 6e20 636c 6173 733d 2270 7265 #impo │ │ │ │ -0011b550: 7274 2026 7175 6f74 3b78 6d69 6d65 352e rt "xmime5. │ │ │ │ -0011b560: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" < │ │ │ │ -0011b570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ -0011b5a0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__ │ │ │ │ -0011b5b0: 4461 7461 203c 2f64 6976 3e0a 3c64 6976 Data
    .
    {< │ │ │ │ -0011b5d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0011b620: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include xop__Include; │ │ │ │ -0011b640: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    @ char *xmime5__cont │ │ │ │ -0011b690: 656e 7454 7970 653b 2020 3c2f 6469 763e entType;
    │ │ │ │ -0011b6a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    Suppose th │ │ │ │ -0011b6e0: 6520 5753 444c 2064 6566 696e 6573 2061 e WSDL defines a │ │ │ │ -0011b6f0: 6e20 6f70 6572 6174 696f 6e3a 3c2f 703e n operation:

    │ │ │ │ -0011b700: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ns │ │ │ │ -0011b750: 5f5f 6563 686f 4461 7461 283c 7370 616e __echoData(struct n │ │ │ │ -0011b780: 735f 5f44 6174 6120 2a69 6e2c 203c 7370 s__Data *in, struct │ │ │ │ -0011b7b0: 206e 735f 5f44 6174 6120 2a6f 7574 293b ns__Data *out); │ │ │ │ -0011b7c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    After generatin │ │ │ │ -0011b7f0: 6720 7468 6520 7374 7562 2066 756e 6374 g the stub funct │ │ │ │ -0011b800: 696f 6e73 2077 6974 6820 7468 6520 736f ions with the so │ │ │ │ -0011b810: 6170 6370 7032 2074 6f6f 6c2c 2077 6520 apcpp2 tool, we │ │ │ │ -0011b820: 6361 6e20 696e 766f 6b65 2074 6865 2073 can invoke the s │ │ │ │ -0011b830: 7475 6220 6174 2074 6865 2063 6c69 656e tub at the clien │ │ │ │ -0011b840: 7420 7369 6465 2077 6974 683a 3c2f 703e t side with:

    │ │ │ │ -0011b850: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s │ │ │ │ -0011b890: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = │ │ │ │ -0011b900: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new1(SOAP_ENC_M │ │ │ │ -0011b9c0: 544f 4d3c 2f61 3e29 3b20 3c2f 6469 763e TOM);
    │ │ │ │ -0011b9d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struct │ │ │ │ -0011ba00: 3c2f 7370 616e 3e6e 735f 5f44 6174 6120 ns__Data │ │ │ │ -0011ba10: 6461 7461 3b20 3c2f 6469 763e 0a3c 6469 data;
    .d │ │ │ │ -0011ba30: 6174 612e 786f 705f 5f49 6e63 6c75 6465 ata.xop__Include │ │ │ │ -0011ba40: 2e5f 5f70 7472 203d 2028 3c73 7061 6e20 .__ptr = (unsigned ch │ │ │ │ -0011ba90: 6172 3c2f 7370 616e 3e2a 293c 7370 616e ar*)"< │ │ │ │ -0011bac0: 3b62 2667 743b 4865 6c6c 6f20 776f 726c ;b>Hello worl │ │ │ │ -0011bad0: 6421 266c 743b 2f62 2667 743b 2671 756f d!</b>&quo │ │ │ │ -0011bae0: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;;
    .
    data.xop__In │ │ │ │ -0011bb10: 636c 7564 652e 5f5f 7369 7a65 203d 2032 clude.__size = 2 │ │ │ │ -0011bb20: 303b 203c 2f64 6976 3e0a 3c64 6976 2063 0;
    .
    data │ │ │ │ -0011bb40: 2e78 6f70 5f5f 496e 636c 7564 652e 6964 .xop__Include.id │ │ │ │ -0011bb50: 203d 204e 554c 4c3b 2020 2020 2020 2020 = NULL; │ │ │ │ -0011bb60: 2020 2020 3c73 7061 6e20 636c 6173 733d // CID │ │ │ │ -0011bb80: 2061 7574 6f6d 6174 6963 616c 6c79 2067 automatically g │ │ │ │ -0011bb90: 656e 6572 6174 6564 2062 7920 656e 6769 enerated by engi │ │ │ │ -0011bba0: 6e65 203c 2f73 7061 6e3e 3c2f 6469 763e ne
    │ │ │ │ -0011bbb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    data.xop__Inc │ │ │ │ -0011bbd0: 6c75 6465 2e74 7970 6520 3d20 3c73 7061 lude.type = "te │ │ │ │ -0011bc00: 7874 2f68 746d 6c26 7175 6f74 3b3c 2f73 xt/html"; // │ │ │ │ -0011bc30: 204d 494d 4520 7479 7065 203c 2f73 7061 MIME type
    .
    data. │ │ │ │ -0011bc60: 786f 705f 5f49 6e63 6c75 6465 2e6f 7074 xop__Include.opt │ │ │ │ -0011bc70: 696f 6e73 203d 204e 554c 4c3b 2020 2020 ions = NULL; │ │ │ │ -0011bc80: 2020 203c 7370 616e 2063 6c61 7373 3d22 // no d │ │ │ │ -0011bca0: 6573 6372 6970 7469 7665 2069 6e66 6f20 escriptive info │ │ │ │ -0011bcb0: 6164 6465 6420 3c2f 7370 616e 3e3c 2f64 added .
    data.xmime │ │ │ │ -0011bce0: 355f 5f63 6f6e 7465 6e74 5479 7065 203d 5__contentType = │ │ │ │ -0011bcf0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -0011bd10: 6f74 3b74 6578 742f 6874 6d6c 2671 756f ot;text/html&quo │ │ │ │ -0011bd20: 743b 3c2f 7370 616e 3e3b 203c 7370 616e t;; // MIME type
    .
    if (soap_call_ns_ │ │ │ │ -0011bda0: 5f65 6368 6f44 6174 6128 3c61 2063 6c61 _echoData(soap, endpo │ │ │ │ -0011bde0: 696e 742c 2061 6374 696f 6e2c 2026 616d int, action, &am │ │ │ │ -0011bdf0: 703b 6461 7461 2c20 2661 6d70 3b64 6174 p;data, &dat │ │ │ │ -0011be00: 6129 293c 2f64 6976 3e0a 3c64 6976 2063 a))
    .
    soap_print_faul │ │ │ │ -0011be80: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa │ │ │ │ -0011beb0: 703c 2f61 3e2c 2073 7464 6572 7229 3b3c p, stderr);< │ │ │ │ -0011bec0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else .
    printf( │ │ │ │ -0011bf20: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -0011bf40: 743b 476f 7420 6461 7461 5c6e 2671 756f t;Got data\n&quo │ │ │ │ -0011bf50: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); ..

    Note that │ │ │ │ -0011c190: 7468 6520 3c63 6f64 653e 786f 705f 5f49 the xop__I │ │ │ │ -0011c1a0: 6e63 6c75 6465 2e74 7970 653c 2f63 6f64 nclude.type member must b │ │ │ │ -0011c1c0: 6520 7365 7420 746f 2074 7261 6e73 6d69 e set to transmi │ │ │ │ -0011c1d0: 7420 4d54 4f4d 2061 7474 6163 686d 656e t MTOM attachmen │ │ │ │ -0011c1e0: 7473 2c20 6f74 6865 7277 6973 6520 696e ts, otherwise in │ │ │ │ -0011c1f0: 6c69 6e65 2062 6173 6536 3420 584d 4c20 line base64 XML │ │ │ │ -0011c200: 7769 6c6c 2062 6520 7365 6e74 2e3c 2f70 will be sent.

    .

    At the serv │ │ │ │ -0011c220: 6572 2073 6964 652c 2077 6520 7368 6f77 er side, we show │ │ │ │ -0011c230: 2061 6e20 6578 616d 706c 6520 6f66 2061 an example of a │ │ │ │ -0011c240: 6e20 6f70 6572 6174 696f 6e20 6861 6e64 n operation hand │ │ │ │ -0011c250: 6c65 7220 7468 6174 206a 7573 7420 636f ler that just co │ │ │ │ -0011c260: 7069 6573 2074 6865 2069 6e70 7574 2064 pies the input d │ │ │ │ -0011c270: 6174 6120 746f 206f 7574 7075 743a 3c2f ata to output:.

    int │ │ │ │ -0011c2d0: 6e73 5f5f 6563 686f 4461 7461 283c 7370 ns__echoData(struct │ │ │ │ -0011c300: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -0011c330: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, struct< │ │ │ │ -0011c380: 2f73 7061 6e3e 206e 735f 5f44 6174 6120 /span> ns__Data │ │ │ │ -0011c390: 2a69 6e2c 203c 7370 616e 2063 6c61 7373 *in, struc │ │ │ │ -0011c3b0: 743c 2f73 7061 6e3e 206e 735f 5f64 6174 t ns__dat │ │ │ │ -0011c3c0: 6120 2a6f 7574 2920 3c2f 6469 763e 0a3c a *out)
    .< │ │ │ │ +0011a540: 3e20 2020 203c 6120 636c 6173 733d 2263 > _xop__I │ │ │ │ +0011a580: 6e63 6c75 6465 3c2f 613e 2078 6f70 5f5f nclude xop__ │ │ │ │ +0011a590: 496e 636c 7564 653b 203c 7370 616e 2063 Include; / │ │ │ │ +0011a5b0: 2f20 6174 7461 6368 6d65 6e74 203c 2f73 / attachment
    .
    @ │ │ │ │ +0011a5e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +0011a600: 2f73 7061 6e3e 202a 786d 696d 6535 5f5f /span> *xmime5__ │ │ │ │ +0011a610: 636f 6e74 656e 7454 7970 653b 2020 3c73 contentType; // and its c │ │ │ │ +0011a640: 6f6e 7465 6e74 5479 7065 203c 2f73 7061 ontentType
    .
    }; .
    //g │ │ │ │ +0011a6a0: 736f 6170 2078 2073 6572 7669 6365 206d soap x service m │ │ │ │ +0011a6b0: 6574 686f 642d 6d69 6d65 2d74 7970 653a ethod-mime-type: │ │ │ │ +0011a6c0: 206d 794d 544f 4d74 6573 7420 7465 7874 myMTOMtest text │ │ │ │ +0011a6d0: 2f78 6d6c 203c 2f73 7061 6e3e 3c2f 6469 /xml .
    i │ │ │ │ +0011a710: 6e74 3c2f 7370 616e 3e20 785f 5f6d 794d nt x__myM │ │ │ │ +0011a720: 544f 4d74 6573 7428 3c73 7061 6e20 636c TOMtest(st │ │ │ │ +0011a740: 7275 6374 3c2f 7370 616e 3e20 785f 5f6d ruct x__m │ │ │ │ +0011a750: 7944 6174 6120 2a69 6e2c 203c 7370 616e yData *in, struct x │ │ │ │ +0011a780: 5f5f 6d79 4461 7461 202a 6f75 7429 3b3c __myData *out);< │ │ │ │ +0011a790: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +0011a7b0: 5468 6520 3c63 6f64 653e 2f2f 6773 6f61 The //gsoa │ │ │ │ +0011a7c0: 7020 7820 7365 7276 6963 6520 6d65 7468 p x service meth │ │ │ │ +0011a7d0: 6f64 2d6d 696d 652d 7479 7065 3a3c 2f63 od-mime-type: directive i │ │ │ │ +0011a7f0: 6e64 6963 6174 6573 2074 6861 7420 7468 ndicates that th │ │ │ │ +0011a800: 6973 206f 7065 7261 7469 6f6e 2061 6363 is operation acc │ │ │ │ +0011a810: 6570 7473 203c 656d 3e3c 636f 6465 3e74 epts t │ │ │ │ +0011a820: 6578 742f 786d 6c3c 2f63 6f64 653e 3c2f ext/xml MIME attachm │ │ │ │ +0011a840: 656e 7473 2e20 5365 6520 7468 6520 534f ents. See the SO │ │ │ │ +0011a850: 4150 2d77 6974 682d 4174 7461 6368 6d65 AP-with-Attachme │ │ │ │ +0011a860: 6e74 2073 7065 6369 6669 6361 7469 6f6e nt specification │ │ │ │ +0011a870: 2066 6f72 2074 6865 204d 494d 4520 7479 for the MIME ty │ │ │ │ +0011a880: 7065 7320 746f 2075 7365 2028 666f 7220 pes to use (for │ │ │ │ +0011a890: 6578 616d 706c 652c 203c 636f 6465 3e2a example, * │ │ │ │ +0011a8a0: 2f2a 3c2f 636f 6465 3e20 6973 2061 2077 /* is a w │ │ │ │ +0011a8b0: 696c 6463 6172 6429 2e20 4966 2074 6865 ildcard). If the │ │ │ │ +0011a8c0: 206f 7065 7261 7469 6f6e 2068 6173 206d operation has m │ │ │ │ +0011a8d0: 6f72 6520 7468 616e 206f 6e65 2061 7474 ore than one att │ │ │ │ +0011a8e0: 6163 686d 656e 742c 206a 7573 7420 7265 achment, just re │ │ │ │ +0011a8f0: 7065 6174 2074 6869 7320 6469 7265 6374 peat this direct │ │ │ │ +0011a900: 6976 6520 666f 7220 6561 6368 2061 7474 ive for each att │ │ │ │ +0011a910: 6163 686d 656e 7420 796f 7520 7761 6e74 achment you want │ │ │ │ +0011a920: 2074 6f20 6269 6e64 2074 6f20 7468 6520 to bind to the │ │ │ │ +0011a930: 6f70 6572 6174 696f 6e2e 3c2f 703e 0a3c operation.

    .< │ │ │ │ +0011a940: 703e 546f 2062 696e 6420 6174 7461 6368 p>To bind attach │ │ │ │ +0011a950: 6d65 6e74 7320 6f6e 6c79 2074 6f20 7468 ments only to th │ │ │ │ +0011a960: 6520 7265 7175 6573 7420 6d65 7373 6167 e request messag │ │ │ │ +0011a970: 6520 6f66 2061 6e20 6f70 6572 6174 696f e of an operatio │ │ │ │ +0011a980: 6e2c 2075 7365 3c2f 703e 0a3c 6469 7620 n, use

    .
    //gsoap │ │ │ │ +0011a9d0: 2026 6c74 3b70 7265 6669 7826 6774 3b20 <prefix> │ │ │ │ +0011a9e0: 7365 7276 6963 6520 6d65 7468 6f64 2d69 service method-i │ │ │ │ +0011a9f0: 6e70 7574 2d6d 696d 652d 7479 7065 3a20 nput-mime-type: │ │ │ │ +0011aa00: 2e2e 2e3c 2f73 7061 6e3e 3c2f 6469 763e ...
    │ │ │ │ +0011aa10: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Simil │ │ │ │ +0011aa30: 6172 6c79 2c20 746f 2062 696e 6420 6174 arly, to bind at │ │ │ │ +0011aa40: 7461 6368 6d65 6e74 7320 6f6e 6c79 2074 tachments only t │ │ │ │ +0011aa50: 6f20 7468 6520 7265 7370 6f6e 7365 206d o the response m │ │ │ │ +0011aa60: 6573 7361 6765 206f 6620 616e 206f 7065 essage of an ope │ │ │ │ +0011aa70: 7261 7469 6f6e 2c20 7573 653a 3c2f 703e ration, use:

    │ │ │ │ +0011aa80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    / │ │ │ │ +0011aac0: 2f67 736f 6170 2026 6c74 3b70 7265 6669 /gsoap <prefi │ │ │ │ +0011aad0: 7826 6774 3b20 7365 7276 6963 6520 6d65 x> service me │ │ │ │ +0011aae0: 7468 6f64 2d6f 7574 7075 742d 6d69 6d65 thod-output-mime │ │ │ │ +0011aaf0: 2d74 7970 653a 202e 2e2e 3c2f 7370 616e -type: ...
    .
    < │ │ │ │ +0011ab20: 703e 5468 6520 7773 646c 3268 2074 6f6f p>The wsdl2h too │ │ │ │ +0011ab30: 6c20 7265 636f 676e 697a 6573 204d 494d l recognizes MIM │ │ │ │ +0011ab40: 4520 6174 7461 6368 6d65 6e74 7320 616e E attachments an │ │ │ │ +0011ab50: 6420 7072 6f64 7563 6573 2061 6e20 616e d produces an an │ │ │ │ +0011ab60: 6e6f 7461 7465 6420 6865 6164 6572 2066 notated header f │ │ │ │ +0011ab70: 696c 652e 3c2f 703e 0a3c 703e 596f 7520 ile.

    .

    You │ │ │ │ +0011ab80: 6361 6e20 7265 7065 6174 2074 6865 7365 can repeat these │ │ │ │ +0011ab90: 2064 6972 6563 7469 7665 7320 666f 7220 directives for │ │ │ │ +0011aba0: 616c 6c20 6d75 6c74 6970 6172 7452 656c all multipartRel │ │ │ │ +0011abb0: 6174 6564 204d 494d 4520 6174 7461 6368 ated MIME attach │ │ │ │ +0011abc0: 6d65 6e74 7320 796f 7520 7761 6e74 2074 ments you want t │ │ │ │ +0011abd0: 6f20 6173 736f 6369 6174 6520 7769 7468 o associate with │ │ │ │ +0011abe0: 2074 6865 2073 6572 7669 6365 206f 7065 the service ope │ │ │ │ +0011abf0: 7261 7469 6f6e 2069 6e70 7574 2061 6e64 ration input and │ │ │ │ +0011ac00: 206f 7574 7075 742e 3c2f 703e 0a3c 703e output.

    .

    │ │ │ │ +0011ac10: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +0011ac30: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Sending │ │ │ │ +0011ac80: 616e 6420 7265 6365 6976 696e 6720 4d54 and receiving MT │ │ │ │ +0011ac90: 4f4d 2061 7474 6163 686d 656e 7473 3c2f OM attachments.

    A receive │ │ │ │ +0011acb0: 7220 6d75 7374 2062 6520 696e 666f 726d r must be inform │ │ │ │ +0011acc0: 6564 2074 6f20 7265 636f 676e 697a 6520 ed to recognize │ │ │ │ +0011acd0: 4d54 4f4d 2061 7474 6163 686d 656e 7473 MTOM attachments │ │ │ │ +0011ace0: 2062 7920 7365 7474 696e 6720 7468 6520 by setting the │ │ │ │ +0011acf0: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_ │ │ │ │ +0011ad00: 4d54 4f4d 3c2f 636f 6465 3e20 666c 6167 MTOM flag │ │ │ │ +0011ad10: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex │ │ │ │ +0011ad80: 742e 204f 7468 6572 7769 7365 2c20 7468 t. Otherwise, th │ │ │ │ +0011ad90: 6520 7265 6775 6c61 7220 4d49 4d45 2061 e regular MIME a │ │ │ │ +0011ada0: 7474 6163 686d 656e 7420 6d65 6368 616e ttachment mechan │ │ │ │ +0011adb0: 6973 6d20 2853 7741 2920 7769 6c6c 2062 ism (SwA) will b │ │ │ │ +0011adc0: 6520 7573 6564 2074 6f20 7374 6f72 6520 e used to store │ │ │ │ +0011add0: 6174 7461 6368 6d65 6e74 732e 3c2f 703e attachments.

    │ │ │ │ +0011ade0: 0a3c 703e 5768 656e 2075 7369 6e67 2077 .

    When using w │ │ │ │ +0011adf0: 7364 6c32 6820 746f 2062 7569 6c64 2063 sdl2h to build c │ │ │ │ +0011ae00: 6c69 656e 7473 2061 6e64 2f6f 7220 7365 lients and/or se │ │ │ │ +0011ae10: 7276 6963 6573 2c20 796f 7520 7368 6f75 rvices, you shou │ │ │ │ +0011ae20: 6c64 2075 7365 2074 6865 203c 656d 3e3c ld use the < │ │ │ │ +0011ae30: 636f 6465 3e74 7970 656d 6170 2e64 6174 code>typemap.dat │ │ │ │ +0011ae40: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil │ │ │ │ +0011ae50: 6520 696e 636c 7564 6564 2069 6e20 7468 e included in th │ │ │ │ +0011ae60: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c │ │ │ │ +0011ae70: 6f64 6520 7061 636b 6167 652e 2054 6865 ode package. The │ │ │ │ +0011ae80: 203c 656d 3e3c 636f 6465 3e74 7970 656d typem │ │ │ │ +0011ae90: 6170 2e64 6174 3c2f 636f 6465 3e3c 2f65 ap.dat file defines │ │ │ │ +0011aeb0: 7468 6520 584f 5020 6e61 6d65 7370 6163 the XOP namespac │ │ │ │ +0011aec0: 6520 616e 6420 584d 4c20 4d49 4d45 206e e and XML MIME n │ │ │ │ +0011aed0: 616d 6573 7061 6365 7320 6173 2069 6d70 amespaces as imp │ │ │ │ +0011aee0: 6f72 7465 6420 6e61 6d65 7370 6163 6573 orted namespaces │ │ │ │ +0011aef0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    xop 
    │ │ │ │ +0011af10: 2020 203d 2026 6c74 3b68 7474 703a 2f2f     = <http://
    │ │ │ │ +0011af20: 7777 772e 7733 2e6f 7267 2f32 3030 342f  www.w3.org/2004/
    │ │ │ │ +0011af30: 3038 2f78 6f70 2f69 6e63 6c75 6465 2667  08/xop/include&g
    │ │ │ │ +0011af40: 743b 200a 786d 696d 6535 203d 2026 6c74  t; .xmime5 = <
    │ │ │ │ +0011af50: 3b68 7474 703a 2f2f 7777 772e 7733 2e6f  ;http://www.w3.o
    │ │ │ │ +0011af60: 7267 2f32 3030 352f 3035 2f78 6d6c 6d69  rg/2005/05/xmlmi
    │ │ │ │ +0011af70: 6d65 2667 743b 200a 786d 696d 6534 203d  me> .xmime4 =
    │ │ │ │ +0011af80: 2026 6c74 3b68 7474 703a 2f2f 7777 772e   <http://www.
    │ │ │ │ +0011af90: 7733 2e6f 7267 2f32 3030 342f 3131 2f78  w3.org/2004/11/x
    │ │ │ │ +0011afa0: 6d6c 6d69 6d65 2667 743b 0a3c 2f70 7265  mlmime>.

    The wsdl2h │ │ │ │ +0011afc0: 746f 6f6c 2075 7365 7320 7468 6520 3c65 tool uses the typemap. │ │ │ │ +0011afe0: 6461 743c 2f63 6f64 653e 3c2f 656d 3e20 dat │ │ │ │ +0011aff0: 6669 6c65 2074 6f20 636f 6e76 6572 7420 file to convert │ │ │ │ +0011b000: 5753 444c 2069 6e74 6f20 616e 2069 6e74 WSDL into an int │ │ │ │ +0011b010: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ +0011b020: 6c65 2e20 496e 2074 6869 7320 6361 7365 le. In this case │ │ │ │ +0011b030: 2077 6520 646f 6e27 7420 7761 6e74 2074 we don't want t │ │ │ │ +0011b040: 6865 2077 7364 6c32 6820 746f 6f6c 2074 he wsdl2h tool t │ │ │ │ +0011b050: 6f20 7265 6164 2074 6865 2058 4f50 2073 o read the XOP s │ │ │ │ +0011b060: 6368 656d 6120 616e 6420 7472 616e 736c chema and transl │ │ │ │ +0011b070: 6174 6520 6974 2c20 7369 6e63 6520 7765 ate it, since we │ │ │ │ +0011b080: 2068 6176 6520 6120 7072 652d 6465 6669 have a pre-defi │ │ │ │ +0011b090: 6e65 6420 3c63 6f64 653e 3c61 2063 6c61 ned │ │ │ │ +0011b100: 5f78 6f70 5f5f 496e 636c 7564 653c 2f61 _xop__Include element │ │ │ │ +0011b120: 2074 6f20 6861 6e64 6c65 2058 4f50 2066 to handle XOP f │ │ │ │ +0011b130: 6f72 204d 544f 4d2e 2054 6869 7320 3c63 or MTOM. This _xop__ │ │ │ │ +0011b1b0: 496e 636c 7564 653c 2f61 3e3c 2f63 6f64 Include element is de │ │ │ │ +0011b1d0: 6669 6e65 6420 696e 203c 656d 3e3c 636f fined in xop.h< │ │ │ │ +0011b1f0: 2f65 6d3e 2e20 5468 6572 6566 6f72 652c /em>. Therefore, │ │ │ │ +0011b200: 2074 6865 2062 696e 6469 6e67 7320 7368 the bindings sh │ │ │ │ +0011b210: 6f77 6e20 6162 6f76 6520 7769 6c6c 206e own above will n │ │ │ │ +0011b220: 6f74 2074 7261 6e73 6c61 7465 2074 6865 ot translate the │ │ │ │ +0011b230: 2058 4f50 2061 6e64 2058 4d4c 204d 494d XOP and XML MIM │ │ │ │ +0011b240: 4520 7363 6865 6d61 7320 746f 2063 6f64 E schemas to cod │ │ │ │ +0011b250: 652c 2062 7574 2067 656e 6572 6174 6573 e, but generates │ │ │ │ +0011b260: 203c 636f 6465 3e23 696d 706f 7274 3c2f #import statements │ │ │ │ +0011b280: 2069 6e73 7465 6164 2069 6e20 7468 6520 instead in the │ │ │ │ +0011b290: 6765 6e65 7261 7465 6420 696e 7465 7266 generated interf │ │ │ │ +0011b2a0: 6163 6520 6865 6164 6572 2066 696c 653a ace header file: │ │ │ │ +0011b2b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    #import │ │ │ │ +0011b300: 2671 756f 743b 786f 702e 6826 7175 6f74 "xop.h" │ │ │ │ +0011b310: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    . │ │ │ │ +0011b320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #im │ │ │ │ +0011b350: 706f 7274 2026 7175 6f74 3b78 6d69 6d65 port "xmime │ │ │ │ +0011b360: 352e 6826 7175 6f74 3b3c 2f73 7061 6e3e 5.h" │ │ │ │ +0011b370: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The #impo │ │ │ │ +0011b3a0: 7274 3c2f 636f 6465 3e20 7374 6174 656d rt statem │ │ │ │ +0011b3b0: 656e 7473 2061 7265 206f 6e6c 7920 6164 ents are only ad │ │ │ │ +0011b3c0: 6465 6420 666f 7220 7468 6f73 6520 6e61 ded for those na │ │ │ │ +0011b3d0: 6d65 7370 6163 6573 2074 6861 7420 6172 mespaces that ar │ │ │ │ +0011b3e0: 6520 6163 7475 616c 6c79 2075 7365 642e e actually used. │ │ │ │ +0011b3f0: 3c2f 703e 0a3c 703e 4c65 7427 7320 7461

    .

    Let's ta │ │ │ │ +0011b400: 6b65 2061 206c 6f6f 6b20 6174 2061 6e20 ke a look at an │ │ │ │ +0011b410: 6578 616d 706c 652e 2054 6865 2077 7364 example. The wsd │ │ │ │ +0011b420: 6c32 6820 696d 706f 7274 6572 2067 656e l2h importer gen │ │ │ │ +0011b430: 6572 6174 6573 2061 2068 6561 6465 7220 erates a header │ │ │ │ +0011b440: 6669 6c65 2077 6974 6820 3c63 6f64 653e file with │ │ │ │ +0011b450: 2369 6d70 6f72 7420 2278 6f70 2e68 223c #import "xop.h"< │ │ │ │ +0011b460: 2f63 6f64 653e 2066 726f 6d20 6120 5753 /code> from a WS │ │ │ │ +0011b470: 444c 2074 6861 7420 7265 6665 7265 6e63 DL that referenc │ │ │ │ +0011b480: 6573 2058 4f50 2c20 666f 7220 6578 616d es XOP, for exam │ │ │ │ +0011b490: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    < │ │ │ │ +0011b4b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011b4c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#imp │ │ │ │ +0011b4e0: 6f72 7420 2671 756f 743b 786f 702e 6826 ort "xop.h& │ │ │ │ +0011b4f0: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "x │ │ │ │ +0011b540: 6d69 6d65 352e 6826 7175 6f74 3b3c 2f73 mime5.h"
    .
    struct ns__Data
    .
    {
    .
    │ │ │ │ +0011b5d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 _xop__Incl │ │ │ │ +0011b610: 7564 653c 2f61 3e20 786f 705f 5f49 6e63 ude xop__Inc │ │ │ │ +0011b620: 6c75 6465 3b20 3c2f 6469 763e 0a3c 6469 lude;
    . │ │ │ │ +0011b640: 2040 203c 7370 616e 2063 6c61 7373 3d22 @ cha │ │ │ │ +0011b660: 723c 2f73 7061 6e3e 202a 786d 696d 6535 r *xmime5 │ │ │ │ +0011b670: 5f5f 636f 6e74 656e 7454 7970 653b 2020 __contentType; │ │ │ │ +0011b680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    Supp │ │ │ │ +0011b6c0: 6f73 6520 7468 6520 5753 444c 2064 6566 ose the WSDL def │ │ │ │ +0011b6d0: 696e 6573 2061 6e20 6f70 6572 6174 696f ines an operatio │ │ │ │ +0011b6e0: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    < │ │ │ │ +0011b710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0011b720: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int ns__echoData │ │ │ │ +0011b740: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct ns__Data *i │ │ │ │ +0011b770: 6e2c 203c 7370 616e 2063 6c61 7373 3d22 n, struct< │ │ │ │ +0011b790: 2f73 7061 6e3e 206e 735f 5f44 6174 6120 /span> ns__Data │ │ │ │ +0011b7a0: 2a6f 7574 293b 3c2f 6469 763e 0a3c 2f64 *out);
    .

    After gen │ │ │ │ +0011b7d0: 6572 6174 696e 6720 7468 6520 7374 7562 erating the stub │ │ │ │ +0011b7e0: 2066 756e 6374 696f 6e73 2077 6974 6820 functions with │ │ │ │ +0011b7f0: 7468 6520 736f 6170 6370 7032 2074 6f6f the soapcpp2 too │ │ │ │ +0011b800: 6c2c 2077 6520 6361 6e20 696e 766f 6b65 l, we can invoke │ │ │ │ +0011b810: 2074 6865 2073 7475 6220 6174 2074 6865 the stub at the │ │ │ │ +0011b820: 2063 6c69 656e 7420 7369 6465 2077 6974 client side wit │ │ │ │ +0011b830: 683a 3c2f 703e 0a3c 6469 7620 636c 6173 h:

    .
    < │ │ │ │ +0011b860: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0011b870: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soap< │ │ │ │ +0011b8e0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_ │ │ │ │ +0011b940: 6e65 7731 3c2f 613e 283c 6120 636c 6173 new1(SOAP │ │ │ │ +0011b9a0: 5f45 4e43 5f4d 544f 4d3c 2f61 3e29 3b20 _ENC_MTOM); │ │ │ │ +0011b9b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ +0011b9e0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ +0011b9f0: 5f44 6174 6120 6461 7461 3b20 3c2f 6469 _Data data; .
    data.xop__I │ │ │ │ +0011ba20: 6e63 6c75 6465 2e5f 5f70 7472 203d 2028 nclude.__ptr = ( │ │ │ │ +0011ba30: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ +0011ba50: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed char* │ │ │ │ +0011ba80: 293c 7370 616e 2063 6c61 7373 3d22 7374 )&qu │ │ │ │ +0011baa0: 6f74 3b26 6c74 3b62 2667 743b 4865 6c6c ot;<b>Hell │ │ │ │ +0011bab0: 6f20 776f 726c 6421 266c 743b 2f62 2667 o world!</b&g │ │ │ │ +0011bac0: 743b 2671 756f 743b 3c2f 7370 616e 3e3b t;"; │ │ │ │ +0011bad0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    data.x │ │ │ │ +0011baf0: 6f70 5f5f 496e 636c 7564 652e 5f5f 7369 op__Include.__si │ │ │ │ +0011bb00: 7a65 203d 2032 303b 203c 2f64 6976 3e0a ze = 20;
    . │ │ │ │ +0011bb10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    data.xop__Incl │ │ │ │ +0011bb30: 7564 652e 6964 203d 204e 554c 4c3b 2020 ude.id = NULL; │ │ │ │ +0011bb40: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +0011bb60: 2f2f 2043 4944 2061 7574 6f6d 6174 6963 // CID automatic │ │ │ │ +0011bb70: 616c 6c79 2067 656e 6572 6174 6564 2062 ally generated b │ │ │ │ +0011bb80: 7920 656e 6769 6e65 203c 2f73 7061 6e3e y engine │ │ │ │ +0011bb90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    data.xo │ │ │ │ +0011bbb0: 705f 5f49 6e63 6c75 6465 2e74 7970 6520 p__Include.type │ │ │ │ +0011bbc0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q │ │ │ │ +0011bbe0: 756f 743b 7465 7874 2f68 746d 6c26 7175 uot;text/html&qu │ │ │ │ +0011bbf0: 6f74 3b3c 2f73 7061 6e3e 3b20 2020 3c73 ot;; // MIME type │ │ │ │ +0011bc20: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0011bc30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011bc40: 3e64 6174 612e 786f 705f 5f49 6e63 6c75 >data.xop__Inclu │ │ │ │ +0011bc50: 6465 2e6f 7074 696f 6e73 203d 204e 554c de.options = NUL │ │ │ │ +0011bc60: 4c3b 2020 2020 2020 203c 7370 616e 2063 L; / │ │ │ │ +0011bc80: 2f20 6e6f 2064 6573 6372 6970 7469 7665 / no descriptive │ │ │ │ +0011bc90: 2069 6e66 6f20 6164 6465 6420 3c2f 7370 info added
    .
    data │ │ │ │ +0011bcc0: 2e78 6d69 6d65 355f 5f63 6f6e 7465 6e74 .xmime5__content │ │ │ │ +0011bcd0: 5479 7065 203d 203c 7370 616e 2063 6c61 Type = "text/ht │ │ │ │ +0011bd00: 6d6c 2671 756f 743b 3c2f 7370 616e 3e3b ml"; │ │ │ │ +0011bd10: 203c 7370 616e 2063 6c61 7373 3d22 636f // MIME t │ │ │ │ +0011bd30: 7970 6520 3c2f 7370 616e 3e3c 2f64 6976 ype
    .
    if │ │ │ │ +0011bd70: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca │ │ │ │ +0011bd80: 6c6c 5f6e 735f 5f65 6368 6f44 6174 6128 ll_ns__echoData( │ │ │ │ +0011bd90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +0011bdc0: 2065 6e64 706f 696e 742c 2061 6374 696f endpoint, actio │ │ │ │ +0011bdd0: 6e2c 2026 616d 703b 6461 7461 2c20 2661 n, &data, &a │ │ │ │ +0011bde0: 6d70 3b64 6174 6129 293c 2f64 6976 3e0a mp;data))
    . │ │ │ │ +0011bdf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_prin │ │ │ │ +0011be60: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std │ │ │ │ +0011bea0: 6572 7229 3b3c 2f64 6976 3e0a 3c64 6976 err);
    .
    else
    .
    p │ │ │ │ +0011bf00: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("Got data │ │ │ │ +0011bf30: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \n") │ │ │ │ +0011bf40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ +0011bfb0: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy │ │ │ │ +0011bfc0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +0011bff0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .

    Note │ │ │ │ +0011c170: 2074 6861 7420 7468 6520 3c63 6f64 653e that the │ │ │ │ +0011c180: 786f 705f 5f49 6e63 6c75 6465 2e74 7970 xop__Include.typ │ │ │ │ +0011c190: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member │ │ │ │ +0011c1a0: 6d75 7374 2062 6520 7365 7420 746f 2074 must be set to t │ │ │ │ +0011c1b0: 7261 6e73 6d69 7420 4d54 4f4d 2061 7474 ransmit MTOM att │ │ │ │ +0011c1c0: 6163 686d 656e 7473 2c20 6f74 6865 7277 achments, otherw │ │ │ │ +0011c1d0: 6973 6520 696e 6c69 6e65 2062 6173 6536 ise inline base6 │ │ │ │ +0011c1e0: 3420 584d 4c20 7769 6c6c 2062 6520 7365 4 XML will be se │ │ │ │ +0011c1f0: 6e74 2e3c 2f70 3e0a 3c70 3e41 7420 7468 nt.

    .

    At th │ │ │ │ +0011c200: 6520 7365 7276 6572 2073 6964 652c 2077 e server side, w │ │ │ │ +0011c210: 6520 7368 6f77 2061 6e20 6578 616d 706c e show an exampl │ │ │ │ +0011c220: 6520 6f66 2061 6e20 6f70 6572 6174 696f e of an operatio │ │ │ │ +0011c230: 6e20 6861 6e64 6c65 7220 7468 6174 206a n handler that j │ │ │ │ +0011c240: 7573 7420 636f 7069 6573 2074 6865 2069 ust copies the i │ │ │ │ +0011c250: 6e70 7574 2064 6174 6120 746f 206f 7574 nput data to out │ │ │ │ +0011c260: 7075 743a 3c2f 703e 0a3c 6469 7620 636c put:

    .
    < │ │ │ │ +0011c280: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011c290: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int ns__echoDa │ │ │ │ +0011c2c0: 7461 283c 7370 616e 2063 6c61 7373 3d22 ta(struct< │ │ │ │ +0011c2e0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ +0011c310: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ +0011c340: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, s │ │ │ │ +0011c360: 7472 7563 743c 2f73 7061 6e3e 206e 735f truct ns_ │ │ │ │ +0011c370: 5f44 6174 6120 2a69 6e2c 203c 7370 616e _Data *in, struct n │ │ │ │ +0011c3a0: 735f 5f64 6174 6120 2a6f 7574 2920 3c2f s__data *out) .
    {
    .< │ │ │ │ 0011c3d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0011c3e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    *ou │ │ │ │ -0011c400: 7420 3d20 2a69 6e3b 203c 2f64 6976 3e0a t = *in;
    . │ │ │ │ -0011c410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ -0011c440: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn │ │ │ │ -0011c4a0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .

    The serv │ │ │ │ -0011c4f0: 6572 206d 7573 7420 7573 6520 7468 6520 er must use the │ │ │ │ -0011c500: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_ │ │ │ │ -0011c510: 4d54 4f4d 3c2f 636f 6465 3e20 666c 6167 MTOM flag │ │ │ │ -0011c520: 2074 6f20 696e 6974 6961 6c69 7a65 2074 to initialize t │ │ │ │ -0011c530: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context to │ │ │ │ -0011c5a0: 7265 6365 6976 6520 616e 6420 7365 6e64 receive and send │ │ │ │ -0011c5b0: 204d 544f 4d20 6174 7461 6368 6d65 6e74 MTOM attachment │ │ │ │ -0011c5c0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ -0011c5d0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -0011c5e0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -0011c5f0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Strea │ │ │ │ -0011c630: 6d69 6e67 204d 494d 452f 4d54 4f4d 3c2f ming MIME/MTOM.

    Streaming │ │ │ │ -0011c650: 204d 494d 452f 4d54 4f4d 2069 7320 6163 MIME/MTOM is ac │ │ │ │ -0011c660: 6869 6576 6564 2077 6974 6820 6361 6c6c hieved with call │ │ │ │ -0011c670: 6261 636b 2066 756e 6374 696f 6e73 2074 back functions t │ │ │ │ -0011c680: 6f20 6665 7463 6820 616e 6420 7374 6f72 o fetch and stor │ │ │ │ -0011c690: 6520 6461 7461 2064 7572 696e 6720 7472 e data during tr │ │ │ │ -0011c6a0: 616e 736d 6973 7369 6f6e 2e20 5468 7265 ansmission. Thre │ │ │ │ -0011c6b0: 6520 6675 6e63 7469 6f6e 2063 616c 6c62 e function callb │ │ │ │ -0011c6c0: 6163 6b73 2066 6f72 2073 7472 6561 6d69 acks for streami │ │ │ │ -0011c6d0: 6e67 204d 494d 452f 4d54 4f4d 206f 7574 ng MIME/MTOM out │ │ │ │ -0011c6e0: 7075 7420 616e 6420 7468 7265 6520 6361 put and three ca │ │ │ │ -0011c6f0: 6c6c 6261 636b 7320 666f 7220 7374 7265 llbacks for stre │ │ │ │ -0011c700: 616d 696e 6720 4d49 4d45 2f4d 544f 4d20 aming MIME/MTOM │ │ │ │ -0011c710: 696e 7075 7420 6172 6520 6176 6169 6c61 input are availa │ │ │ │ -0011c720: 626c 652e 3c2f 703e 0a3c 756c 3e0a 3c6c ble.

    . │ │ │ │ -0011ee30: 0a3c 703e 496e 2061 6464 6974 696f 6e2c .

    In addition, │ │ │ │ -0011ee40: 2061 203c 636f 6465 3e76 6f69 642a 203c a void* < │ │ │ │ -0011ee50: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0011ee60: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -0011ee70: 6d6c 2361 3865 6233 3563 3034 3335 3961 ml#a8eb35c04359a │ │ │ │ -0011ee80: 3536 3763 3062 3565 3236 3634 6633 6639 567c0b5e2664f3f9 │ │ │ │ -0011ee90: 3464 3562 2220 7469 746c 653d 2255 7365 4d5b" title="Use │ │ │ │ -0011eea0: 722d 6465 6669 6e61 626c 6520 7661 7269 r-definable vari │ │ │ │ -0011eeb0: 6162 6c65 2074 6861 7420 6d61 7920 706f able that may po │ │ │ │ -0011eec0: 696e 7420 746f 2075 7365 722d 7370 6563 int to user-spec │ │ │ │ -0011eed0: 6966 6965 6420 6461 7461 206f 6620 616e ified data of an │ │ │ │ -0011eee0: 7920 7479 7065 2074 6f20 7061 7373 2074 y type to pass t │ │ │ │ -0011eef0: 6865 2064 6174 6120 7468 726f 7567 6820 he data through │ │ │ │ -0011ef00: 746f 2e2e 2e22 3e73 6f61 703a 3a75 7365 to...">soap::use │ │ │ │ -0011ef10: 723c 2f61 3e3c 2f63 6f64 653e 206d 656d r mem │ │ │ │ -0011ef20: 6265 7220 6973 2061 7661 696c 6162 6c65 ber is available │ │ │ │ -0011ef30: 2074 6f20 7061 7373 2075 7365 722d 6465 to pass user-de │ │ │ │ -0011ef40: 6669 6e65 6420 6461 7461 2074 6f20 7468 fined data to th │ │ │ │ -0011ef50: 6520 6361 6c6c 6261 636b 732e 2054 6869 e callbacks. Thi │ │ │ │ -0011ef60: 7320 7761 792c 2079 6f75 2063 616e 2073 s way, you can s │ │ │ │ -0011ef70: 6574 203c 636f 6465 3e76 6f69 642a 203c et void* < │ │ │ │ -0011ef80: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0011ef90: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -0011efa0: 6d6c 2361 3865 6233 3563 3034 3335 3961 ml#a8eb35c04359a │ │ │ │ -0011efb0: 3536 3763 3062 3565 3236 3634 6633 6639 567c0b5e2664f3f9 │ │ │ │ -0011efc0: 3464 3562 2220 7469 746c 653d 2255 7365 4d5b" title="Use │ │ │ │ -0011efd0: 722d 6465 6669 6e61 626c 6520 7661 7269 r-definable vari │ │ │ │ -0011efe0: 6162 6c65 2074 6861 7420 6d61 7920 706f able that may po │ │ │ │ -0011eff0: 696e 7420 746f 2075 7365 722d 7370 6563 int to user-spec │ │ │ │ -0011f000: 6966 6965 6420 6461 7461 206f 6620 616e ified data of an │ │ │ │ -0011f010: 7920 7479 7065 2074 6f20 7061 7373 2074 y type to pass t │ │ │ │ -0011f020: 6865 2064 6174 6120 7468 726f 7567 6820 he data through │ │ │ │ -0011f030: 746f 2e2e 2e22 3e73 6f61 703a 3a75 7365 to...">soap::use │ │ │ │ -0011f040: 723c 2f61 3e3c 2f63 6f64 653e 2074 6f20 r to │ │ │ │ -0011f050: 706f 696e 7420 746f 2061 7070 6c69 6361 point to applica │ │ │ │ -0011f060: 7469 6f6e 2064 6174 6120 7468 6174 2074 tion data that t │ │ │ │ -0011f070: 6865 2063 616c 6c62 6163 6b73 206e 6565 he callbacks nee │ │ │ │ -0011f080: 6420 7375 6368 2061 7320 6120 6669 6c65 d such as a file │ │ │ │ -0011f090: 206e 616d 6520 666f 7220 6578 616d 706c name for exampl │ │ │ │ -0011f0a0: 652e 3c2f 703e 0a3c 703e 5468 6520 666f e.

    .

    The fo │ │ │ │ -0011f0b0: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example │ │ │ │ -0011f0c0: 696c 6c75 7374 7261 7465 7320 7468 6520 illustrates the │ │ │ │ -0011f0d0: 636c 6965 6e74 2d73 6964 6520 696e 6974 client-side init │ │ │ │ -0011f0e0: 6961 6c69 7a61 7469 6f6e 206f 6620 616e ialization of an │ │ │ │ -0011f0f0: 2069 6d61 6765 2061 7474 6163 686d 656e image attachmen │ │ │ │ -0011f100: 7420 7374 7275 6374 2074 6f20 7374 7265 t struct to stre │ │ │ │ -0011f110: 616d 2061 2066 696c 6520 696e 746f 2061 am a file into a │ │ │ │ -0011f120: 204d 544f 4d20 6174 7461 6368 6d65 6e74 MTOM attachment │ │ │ │ -0011f130: 2077 6974 686f 7574 2048 5454 5020 6368 without HTTP ch │ │ │ │ -0011f140: 756e 6b69 6e67 2028 4854 5450 2073 7472 unking (HTTP str │ │ │ │ -0011f150: 6561 6d69 6e67 2063 6875 6e6b 6564 204d eaming chunked M │ │ │ │ -0011f160: 544f 4d20 7472 616e 7366 6572 2069 7320 TOM transfer is │ │ │ │ -0011f170: 7072 6573 656e 7465 6420 696e 2053 6563 presented in Sec │ │ │ │ -0011f180: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Streaming chun │ │ │ │ -0011f1c0: 6b65 6420 4d49 4d45 2f4d 544f 4d3c 2f61 ked MIME/MTOM ):

    .
    < │ │ │ │ -0011f1f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0011f200: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main() *out = *in; < │ │ │ │ +0011c3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    }.

    Th │ │ │ │ +0011c4d0: 6520 7365 7276 6572 206d 7573 7420 7573 e server must us │ │ │ │ +0011c4e0: 6520 7468 6520 3c63 6f64 653e 2353 4f41 e the #SOA │ │ │ │ +0011c4f0: 505f 454e 435f 4d54 4f4d 3c2f 636f 6465 P_ENC_MTOM flag to initia │ │ │ │ +0011c510: 6c69 7a65 2074 6865 203c 636f 6465 3e3c lize the < │ │ │ │ +0011c520: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0011c530: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +0011c540: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml" title="Conte │ │ │ │ +0011c550: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi │ │ │ │ +0011c560: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.">soap< │ │ │ │ +0011c570: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte │ │ │ │ +0011c580: 7874 2074 6f20 7265 6365 6976 6520 616e xt to receive an │ │ │ │ +0011c590: 6420 7365 6e64 204d 544f 4d20 6174 7461 d send MTOM atta │ │ │ │ +0011c5a0: 6368 6d65 6e74 732e 3c2f 703e 0a3c 703e chments.

    .

    │ │ │ │ +0011c5b0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +0011c5d0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    │ │ │ │ +0011c610: 0a53 7472 6561 6d69 6e67 204d 494d 452f .Streaming MIME/ │ │ │ │ +0011c620: 4d54 4f4d 3c2f 6832 3e0a 3c70 3e53 7472 MTOM

    .

    Str │ │ │ │ +0011c630: 6561 6d69 6e67 204d 494d 452f 4d54 4f4d eaming MIME/MTOM │ │ │ │ +0011c640: 2069 7320 6163 6869 6576 6564 2077 6974 is achieved wit │ │ │ │ +0011c650: 6820 6361 6c6c 6261 636b 2066 756e 6374 h callback funct │ │ │ │ +0011c660: 696f 6e73 2074 6f20 6665 7463 6820 616e ions to fetch an │ │ │ │ +0011c670: 6420 7374 6f72 6520 6461 7461 2064 7572 d store data dur │ │ │ │ +0011c680: 696e 6720 7472 616e 736d 6973 7369 6f6e ing transmission │ │ │ │ +0011c690: 2e20 5468 7265 6520 6675 6e63 7469 6f6e . Three function │ │ │ │ +0011c6a0: 2063 616c 6c62 6163 6b73 2066 6f72 2073 callbacks for s │ │ │ │ +0011c6b0: 7472 6561 6d69 6e67 204d 494d 452f 4d54 treaming MIME/MT │ │ │ │ +0011c6c0: 4f4d 206f 7574 7075 7420 616e 6420 7468 OM output and th │ │ │ │ +0011c6d0: 7265 6520 6361 6c6c 6261 636b 7320 666f ree callbacks fo │ │ │ │ +0011c6e0: 7220 7374 7265 616d 696e 6720 4d49 4d45 r streaming MIME │ │ │ │ +0011c6f0: 2f4d 544f 4d20 696e 7075 7420 6172 6520 /MTOM input are │ │ │ │ +0011c700: 6176 6169 6c61 626c 652e 3c2f 703e 0a3c available.

    .< │ │ │ │ +0011c710: 756c 3e0a 3c6c 693e 3c63 6f64 653e 766f ul>.
  • vo │ │ │ │ +0011c720: 6964 202a 282a 736f 6170 2e66 6d69 6d65 id *(*soap.fmime │ │ │ │ +0011c730: 7265 6164 6f70 656e 2928 7374 7275 6374 readopen)(struct │ │ │ │ +0011c740: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi │ │ │ │ +0011c750: 6420 2a68 616e 646c 652c 2063 6f6e 7374 d *handle, const │ │ │ │ +0011c760: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const │ │ │ │ +0011c770: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con │ │ │ │ +0011c780: 7374 2063 6861 7220 2a64 6573 6372 6970 st char *descrip │ │ │ │ +0011c790: 7469 6f6e 293c 2f63 6f64 653e 2054 6869 tion) Thi │ │ │ │ +0011c7a0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca │ │ │ │ +0011c7b0: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi │ │ │ │ +0011c7c0: 6e65 2074 6f20 7374 6172 7420 7365 6e64 ne to start send │ │ │ │ +0011c7d0: 696e 6720 6120 7374 7265 616d 696e 6720 ing a streaming │ │ │ │ +0011c7e0: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach │ │ │ │ +0011c7f0: 6d65 6e74 2e20 5468 6973 2063 616c 6c62 ment. This callb │ │ │ │ +0011c800: 6163 6b20 6f70 656e 7320 6120 7374 7265 ack opens a stre │ │ │ │ +0011c810: 616d 2074 6f20 7374 6172 7420 7265 6164 am to start read │ │ │ │ +0011c820: 696e 6720 7468 6520 6174 7461 6368 6d65 ing the attachme │ │ │ │ +0011c830: 6e74 2064 6174 6120 746f 2073 656e 642e nt data to send. │ │ │ │ +0011c840: 2054 6865 2061 6374 7561 6c20 6461 7461 The actual data │ │ │ │ +0011c850: 2073 7472 6561 6d20 7769 6c6c 2062 6520 stream will be │ │ │ │ +0011c860: 7265 6164 2069 6e20 6368 756e 6b73 2075 read in chunks u │ │ │ │ +0011c870: 7369 6e67 2074 6865 203c 636f 6465 3e3c sing the < │ │ │ │ +0011c880: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0011c890: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0011c8a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0011c8b0: 6761 6666 3430 6131 6361 3666 6266 3037 gaff40a1ca6fbf07 │ │ │ │ +0011c8c0: 3562 3534 6363 6266 3437 3930 3039 6365 5b54ccbf479009ce │ │ │ │ +0011c8d0: 3734 2220 7469 746c 653d 2243 616c 6c62 74" title="Callb │ │ │ │ +0011c8e0: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data │ │ │ │ +0011c8f0: 2069 6e20 6120 4d49 4d45 2f4d 544f 4d20 in a MIME/MTOM │ │ │ │ +0011c900: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea │ │ │ │ +0011c910: 6d2e 223e 736f 6170 3a3a 666d 696d 6572 m.">soap::fmimer │ │ │ │ +0011c920: 6561 643c 2f61 3e3c 2f63 6f64 653e 2063 ead c │ │ │ │ +0011c930: 616c 6c62 6163 6b20 756e 7469 6c20 6e6f allback until no │ │ │ │ +0011c940: 206d 6f72 6520 6461 7461 2069 7320 6176 more data is av │ │ │ │ +0011c950: 6169 6c61 626c 6520 616e 6420 7468 6520 ailable and the │ │ │ │ +0011c960: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmimerea │ │ │ │ +0011ca10: 6463 6c6f 7365 3c2f 613e 3c2f 636f 6465 dclose callback is ca │ │ │ │ +0011ca30: 6c6c 6564 2074 6f20 636c 6f73 6520 7468 lled to close th │ │ │ │ +0011ca40: 6520 7374 7265 616d 2e20 5468 6520 3c63 e stream. The handle parameter cont │ │ │ │ +0011ca70: 6169 6e73 2074 6865 2076 616c 7565 206f ains the value o │ │ │ │ +0011ca80: 6620 7468 6520 3c63 6f64 653e 5f5f 7074 f the __pt │ │ │ │ +0011ca90: 723c 2f63 6f64 653e 206d 656d 6265 7220 r member │ │ │ │ +0011caa0: 7661 7269 6162 6c65 206f 6620 7468 6520 variable of the │ │ │ │ +0011cab0: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc │ │ │ │ +0011cac0: 742f 636c 6173 7320 7769 7468 2064 6174 t/class with dat │ │ │ │ +0011cad0: 6120 2865 2e67 2e20 3c63 6f64 653e 3c61 a (e.g. xsd_ │ │ │ │ +0011cb50: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In │ │ │ │ +0011cbe0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude │ │ │ │ +0011cbf0: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt │ │ │ │ +0011cc00: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, │ │ │ │ +0011cc10: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, < │ │ │ │ +0011cc20: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, │ │ │ │ +0011cc30: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti │ │ │ │ +0011cc50: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe │ │ │ │ +0011cc60: 7273 292c 2077 6869 6368 2073 686f 756c rs), which shoul │ │ │ │ +0011cc70: 6420 6265 2061 2070 6f69 6e74 6572 2074 d be a pointer t │ │ │ │ +0011cc80: 6f20 7370 6563 6966 6963 2069 6e66 6f72 o specific infor │ │ │ │ +0011cc90: 6d61 7469 6f6e 2073 7563 6820 6173 2061 mation such as a │ │ │ │ +0011cca0: 2066 696c 6520 6465 7363 7269 7074 6f72 file descriptor │ │ │ │ +0011ccb0: 206f 7220 6120 706f 696e 7465 7220 746f or a pointer to │ │ │ │ +0011ccc0: 2061 2073 6f6d 6520 6170 706c 6963 6174 a some applicat │ │ │ │ +0011ccd0: 696f 6e2d 7370 6563 6966 6963 2064 6174 ion-specific dat │ │ │ │ +0011cce0: 6120 746f 2062 6520 7061 7373 6564 2074 a to be passed t │ │ │ │ +0011ccf0: 6f20 7468 6973 2063 616c 6c62 6163 6b2e o this callback. │ │ │ │ +0011cd00: 2042 6f74 6820 7468 6520 3c63 6f64 653e Both the │ │ │ │ +0011cd10: 5f5f 7074 723c 2f63 6f64 653e 2061 6e64 __ptr and │ │ │ │ +0011cd20: 203c 636f 6465 3e5f 5f73 697a 653c 2f63 __size members of │ │ │ │ +0011cd40: 7468 6520 6174 7461 6368 6d65 6e74 2073 the attachment s │ │ │ │ +0011cd50: 7472 7563 742f 636c 6173 7320 7368 6f75 truct/class shou │ │ │ │ +0011cd60: 6c64 2068 6176 6520 6265 656e 2073 6574 ld have been set │ │ │ │ +0011cd70: 2062 7920 7468 6520 6170 706c 6963 6174 by the applicat │ │ │ │ +0011cd80: 696f 6e20 7072 696f 7220 746f 2074 6865 ion prior to the │ │ │ │ +0011cd90: 2073 6572 6961 6c69 7a61 7469 6f6e 206f serialization o │ │ │ │ +0011cda0: 6620 7468 6520 6d65 7373 6167 6520 7769 f the message wi │ │ │ │ +0011cdb0: 7468 2061 7474 6163 686d 656e 7473 2e20 th attachments. │ │ │ │ +0011cdc0: 4966 2074 6865 203c 636f 6465 3e5f 5f73 If the __s │ │ │ │ +0011cdd0: 697a 653c 2f63 6f64 653e 2069 7320 7a65 ize is ze │ │ │ │ +0011cde0: 726f 2061 6e64 2048 5454 5020 6368 756e ro and HTTP chun │ │ │ │ +0011cdf0: 6b69 6e67 2069 7320 656e 6162 6c65 6420 king is enabled │ │ │ │ +0011ce00: 2877 6974 6820 3c63 6f64 653e 2353 4f41 (with #SOA │ │ │ │ +0011ce10: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK), then chunked │ │ │ │ +0011ce30: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac │ │ │ │ +0011ce40: 686d 656e 7473 2061 7265 2073 656e 742c hments are sent, │ │ │ │ +0011ce50: 2073 6565 203c 636f 6465 3e3c 6120 636c see │ │ │ │ +0011cef0: 736f 6170 3a3a 666d 696d 6572 6561 643c soap::fmimeread< │ │ │ │ +0011cf00: 2f61 3e3c 2f63 6f64 653e 2e20 5468 6520 /a>. The │ │ │ │ +0011cf10: 3c63 6f64 653e 6964 3c2f 636f 6465 3e2c id, │ │ │ │ +0011cf20: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type and opt │ │ │ │ +0011cf40: 696f 6e73 3c2f 636f 6465 3e20 7061 7261 ions para │ │ │ │ +0011cf50: 6d65 7465 7273 2061 7265 2074 6865 203c meters are the < │ │ │ │ +0011cf60: 636f 6465 3e69 643c 2f63 6f64 653e 2028 code>id ( │ │ │ │ +0011cf70: 616e 206f 7074 696f 6e61 6c20 4944 292c an optional ID), │ │ │ │ +0011cf80: 203c 636f 6465 3e74 7970 653c 2f63 6f64 type (a MIME type) │ │ │ │ +0011cfa0: 2061 6e64 203c 636f 6465 3e6f 7074 696f and optio │ │ │ │ +0011cfb0: 6e73 3c2f 636f 6465 3e20 2861 2064 6573 ns (a des │ │ │ │ +0011cfc0: 6372 6970 7469 7665 2073 7472 696e 6729 criptive string) │ │ │ │ +0011cfd0: 206f 6620 7468 6520 6174 7461 6368 6d65 of the attachme │ │ │ │ +0011cfe0: 6e74 2073 7472 7563 742f 636c 6173 732c nt struct/class, │ │ │ │ +0011cff0: 2072 6573 7065 6374 6976 656c 792c 206f respectively, o │ │ │ │ +0011d000: 6620 7768 6963 6820 6174 206c 6561 7374 f which at least │ │ │ │ +0011d010: 206f 6e65 206d 656d 6265 7220 7368 6f75 one member shou │ │ │ │ +0011d020: 6c64 2062 6520 6e6f 6e2d 4e55 4c4c 2e20 ld be non-NULL. │ │ │ │ +0011d030: 5468 6520 6361 6c6c 6261 636b 2073 686f The callback sho │ │ │ │ +0011d040: 756c 6420 7265 7475 726e 2074 6865 203c uld return the < │ │ │ │ +0011d050: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter val │ │ │ │ +0011d070: 7565 206f 7220 616e 6f74 6865 7220 706f ue or another po │ │ │ │ +0011d080: 696e 7465 7220 7661 6c75 652c 2077 6869 inter value, whi │ │ │ │ +0011d090: 6368 2069 7320 7061 7373 6564 2061 7320 ch is passed as │ │ │ │ +0011d0a0: 7468 6520 6e65 7720 3c63 6f64 653e 6861 the new ha │ │ │ │ +0011d0b0: 6e64 6c65 3c2f 636f 6465 3e20 7061 7261 ndle para │ │ │ │ +0011d0c0: 6d65 7465 7220 746f 203c 636f 6465 3e3c meter to < │ │ │ │ +0011d0d0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0011d0e0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0011d0f0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0011d100: 6761 6666 3430 6131 6361 3666 6266 3037 gaff40a1ca6fbf07 │ │ │ │ +0011d110: 3562 3534 6363 6266 3437 3930 3039 6365 5b54ccbf479009ce │ │ │ │ +0011d120: 3734 2220 7469 746c 653d 2243 616c 6c62 74" title="Callb │ │ │ │ +0011d130: 6163 6b20 746f 2072 6561 6420 6461 7461 ack to read data │ │ │ │ +0011d140: 2069 6e20 6120 4d49 4d45 2f4d 544f 4d20 in a MIME/MTOM │ │ │ │ +0011d150: 6174 7461 6368 6d65 6e74 2073 7472 6561 attachment strea │ │ │ │ +0011d160: 6d2e 223e 736f 6170 3a3a 666d 696d 6572 m.">soap::fmimer │ │ │ │ +0011d170: 6561 643c 2f61 3e3c 2f63 6f64 653e 2061 ead a │ │ │ │ +0011d180: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::fmime │ │ │ │ +0011d230: 7265 6164 636c 6f73 653c 2f61 3e3c 2f63 readclose callbacks. │ │ │ │ +0011d250: 5768 656e 2061 6e20 6572 726f 7220 6f63 When an error oc │ │ │ │ +0011d260: 6375 7272 6564 2069 6e20 7468 6973 2063 curred in this c │ │ │ │ +0011d270: 616c 6c62 6163 6b2c 2074 6865 2063 616c allback, the cal │ │ │ │ +0011d280: 6c62 6163 6b20 7368 6f75 6c64 2072 6574 lback should ret │ │ │ │ +0011d290: 7572 6e20 4e55 4c4c 2061 6e64 2073 6574 urn NULL and set │ │ │ │ +0011d2a0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa │ │ │ │ +0011d350: 703a 3a65 7272 6f72 3c2f 613e 3c2f 636f p::error to an error │ │ │ │ +0011d370: 636f 6465 2c20 652e 672e 2075 7369 6e67 code, e.g. using │ │ │ │ +0011d380: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_rece │ │ │ │ +0011d430: 6976 6572 5f66 6175 6c74 3c2f 613e 3c2f iver_fault. The callb │ │ │ │ +0011d450: 6163 6b20 6d61 7920 7265 7475 726e 204e ack may return N │ │ │ │ +0011d460: 554c 4c20 616e 6420 7365 7420 3c63 6f64 ULL and set soap::er │ │ │ │ +0011d520: 726f 723c 2f61 3e3c 2f63 6f64 653e 2074 ror t │ │ │ │ +0011d530: 6f20 3c63 6f64 653e 2353 4f41 505f 4f4b o #SOAP_OK │ │ │ │ +0011d540: 3c2f 636f 6465 3e20 7768 656e 2074 6869 when thi │ │ │ │ +0011d550: 7320 7370 6563 6966 6963 204d 494d 452f s specific MIME/ │ │ │ │ +0011d560: 4d54 4f4d 2061 7474 6163 686d 656e 7420 MTOM attachment │ │ │ │ +0011d570: 7368 6f75 6c64 206e 6f74 2074 6f20 6265 should not to be │ │ │ │ +0011d580: 2073 7472 6561 6d65 6420 616e 6420 7468 streamed and th │ │ │ │ +0011d590: 6520 656e 6769 6e65 2077 696c 6c20 7369 e engine will si │ │ │ │ +0011d5a0: 6d70 6c79 2073 6b69 7020 6974 2e3c 2f6c mply skip it..
  • siz │ │ │ │ +0011d5c0: 655f 7420 282a 736f 6170 2e66 6d69 6d65 e_t (*soap.fmime │ │ │ │ +0011d5d0: 7265 6164 2928 7374 7275 6374 2073 6f61 read)(struct soa │ │ │ │ +0011d5e0: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h │ │ │ │ +0011d5f0: 616e 646c 652c 2063 6861 7220 2a62 7566 andle, char *buf │ │ │ │ +0011d600: 2c20 7369 7a65 5f74 206c 656e 293c 2f63 , size_t len) This callba │ │ │ │ +0011d620: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ +0011d630: 7468 6520 656e 6769 6e65 2074 6f20 7265 the engine to re │ │ │ │ +0011d640: 6164 2061 2063 6875 6e6b 206f 6620 6174 ad a chunk of at │ │ │ │ +0011d650: 7461 6368 6d65 6e74 2064 6174 6120 746f tachment data to │ │ │ │ +0011d660: 2074 7261 6e73 6d69 742e 2054 6865 203c transmit. The < │ │ │ │ +0011d670: 636f 6465 3e68 616e 646c 653c 2f63 6f64 code>handle parameter con │ │ │ │ +0011d690: 7461 696e 7320 7468 6520 6861 6e64 6c65 tains the handle │ │ │ │ +0011d6a0: 2072 6574 7572 6e65 6420 6279 2074 6865 returned by the │ │ │ │ +0011d6b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fmimere │ │ │ │ +0011d760: 6164 6f70 656e 3c2f 613e 3c2f 636f 6465 adopen callback. The │ │ │ │ +0011d780: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf │ │ │ │ +0011d790: 2070 6172 616d 6574 6572 2069 7320 7468 parameter is th │ │ │ │ +0011d7a0: 6520 6275 6666 6572 206f 6620 6c65 6e67 e buffer of leng │ │ │ │ +0011d7b0: 7468 203c 636f 6465 3e6c 656e 3c2f 636f th len into which a │ │ │ │ +0011d7d0: 2063 6875 6e6b 206f 6620 6461 7461 2073 chunk of data s │ │ │ │ +0011d7e0: 686f 756c 6420 6265 2077 7269 7474 656e hould be written │ │ │ │ +0011d7f0: 2062 7920 7468 6520 6361 6c6c 6261 636b by the callback │ │ │ │ +0011d800: 2e20 5468 6520 6163 7475 616c 2061 6d6f . The actual amo │ │ │ │ +0011d810: 756e 7420 6f66 2064 6174 6120 7772 6974 unt of data writ │ │ │ │ +0011d820: 7465 6e20 696e 746f 2074 6865 2062 7566 ten into the buf │ │ │ │ +0011d830: 6665 7220 6d61 7920 6265 206c 6573 7320 fer may be less │ │ │ │ +0011d840: 7468 616e 203c 636f 6465 3e6c 656e 3c2f than len and this a │ │ │ │ +0011d860: 6374 7561 6c20 616d 6f75 6e74 2073 686f ctual amount sho │ │ │ │ +0011d870: 756c 6420 6265 2072 6574 7572 6e65 6420 uld be returned │ │ │ │ +0011d880: 6279 2074 6865 2063 616c 6c62 6163 6b2e by the callback. │ │ │ │ +0011d890: 2041 2072 6574 7572 6e20 7661 6c75 6520 A return value │ │ │ │ +0011d8a0: 6f66 207a 6572 6f20 696e 6469 6361 7465 of zero indicate │ │ │ │ +0011d8b0: 7320 616e 2065 7272 6f72 2061 6e64 203c s an error and < │ │ │ │ +0011d8c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap: │ │ │ │ +0011d970: 3a65 7272 6f72 3c2f 613e 3c2f 636f 6465 :error should be set. │ │ │ │ +0011d990: 2054 6865 203c 636f 6465 3e5f 5f73 697a The __siz │ │ │ │ +0011d9a0: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member │ │ │ │ +0011d9b0: 7661 7269 6162 6c65 206f 6620 7468 6520 variable of the │ │ │ │ +0011d9c0: 6174 7461 6368 6d65 6e74 2073 7472 7563 attachment struc │ │ │ │ +0011d9d0: 742f 636c 6173 7320 7769 7468 2064 6174 t/class with dat │ │ │ │ +0011d9e0: 6120 2865 2e67 2e20 3c63 6f64 653e 3c61 a (e.g. xsd_ │ │ │ │ +0011da60: 5f62 6173 6536 3442 696e 6172 793c 2f61 _base64Binary or _xop__In │ │ │ │ +0011daf0: 636c 7564 653c 2f61 3e3c 2f63 6f64 653e clude │ │ │ │ +0011db00: 2077 6974 6820 3c63 6f64 653e 5f5f 7074 with __pt │ │ │ │ +0011db10: 723c 2f63 6f64 653e 2c20 3c63 6f64 653e r, │ │ │ │ +0011db20: 5f5f 7369 7a65 3c2f 636f 6465 3e2c 203c __size, < │ │ │ │ +0011db30: 636f 6465 3e69 643c 2f63 6f64 653e 2c20 code>id, │ │ │ │ +0011db40: 3c63 6f64 653e 7479 7065 3c2f 636f 6465 type and opti │ │ │ │ +0011db60: 6f6e 733c 2f63 6f64 653e 206d 656d 6265 ons membe │ │ │ │ +0011db70: 7273 2920 7368 6f75 6c64 2062 6520 7365 rs) should be se │ │ │ │ +0011db80: 7420 6279 2074 6865 2061 7070 6c69 6361 t by the applica │ │ │ │ +0011db90: 7469 6f6e 2070 7269 6f72 2074 6f20 7468 tion prior to th │ │ │ │ +0011dba0: 6520 7365 7269 616c 697a 6174 696f 6e20 e serialization │ │ │ │ +0011dbb0: 6f66 2074 6865 206d 6573 7361 6765 2077 of the message w │ │ │ │ +0011dbc0: 6974 6820 6174 7461 6368 6d65 6e74 732e ith attachments. │ │ │ │ +0011dbd0: 2054 6865 2076 616c 7565 206f 6620 3c63 The value of __size indicates the │ │ │ │ +0011dc00: 746f 7461 6c20 7369 7a65 206f 6620 7468 total size of th │ │ │ │ +0011dc10: 6520 6174 7461 6368 6d65 6e74 2064 6174 e attachment dat │ │ │ │ +0011dc20: 6120 746f 2062 6520 7472 616e 736d 6974 a to be transmit │ │ │ │ +0011dc30: 7465 642e 2049 6620 7468 6520 3c63 6f64 ted. If the __size │ │ │ │ +0011dc50: 6d65 6d62 6572 2076 6172 6961 626c 6520 member variable │ │ │ │ +0011dc60: 6973 207a 6572 6f20 616e 6420 4854 5450 is zero and HTTP │ │ │ │ +0011dc70: 2063 6875 6e6b 696e 6720 6973 2065 6e61 chunking is ena │ │ │ │ +0011dc80: 626c 6564 2028 7769 7468 203c 636f 6465 bled (with #SOAP_IO_CHUNK< │ │ │ │ +0011dca0: 2f63 6f64 653e 292c 2074 6865 6e20 4d49 /code>), then MI │ │ │ │ +0011dcb0: 4d45 2f4d 544f 4d20 6368 756e 6b65 6420 ME/MTOM chunked │ │ │ │ +0011dcc0: 7472 616e 7366 6572 7320 6172 6520 6163 transfers are ac │ │ │ │ +0011dcd0: 7469 7661 7465 6420 6279 2074 6865 2065 tivated by the e │ │ │ │ +0011dce0: 6e67 696e 652c 2077 6869 6368 2069 7320 ngine, which is │ │ │ │ +0011dcf0: 6d6f 7265 2066 6c65 7869 626c 6520 7369 more flexible si │ │ │ │ +0011dd00: 6e63 6520 7468 6520 6174 7461 6368 6d65 nce the attachme │ │ │ │ +0011dd10: 6e74 2064 6174 6120 7369 7a65 2064 6f65 nt data size doe │ │ │ │ +0011dd20: 7320 6e6f 7420 6e65 6564 2074 6f20 6265 s not need to be │ │ │ │ +0011dd30: 2064 6574 6572 6d69 6e65 6420 696e 2061 determined in a │ │ │ │ +0011dd40: 6476 616e 6365 2e20 546f 2075 7365 204d dvance. To use M │ │ │ │ +0011dd50: 494d 452f 4d54 4f4d 2063 6875 6e6b 6564 IME/MTOM chunked │ │ │ │ +0011dd60: 2074 7261 6e73 6665 7273 2c20 656e 6162 transfers, enab │ │ │ │ +0011dd70: 6c65 2048 5454 5020 6368 756e 6b69 6e67 le HTTP chunking │ │ │ │ +0011dd80: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA │ │ │ │ +0011dd90: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK (also #S │ │ │ │ +0011ddb0: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE can be used, │ │ │ │ +0011ddd0: 2062 7574 2074 6869 7320 6275 6666 6572 but this buffer │ │ │ │ +0011dde0: 7320 7468 6520 656e 7469 7265 206d 6573 s the entire mes │ │ │ │ +0011ddf0: 7361 6765 2069 6e20 6d65 6d6f 7279 2062 sage in memory b │ │ │ │ +0011de00: 6566 6f72 6520 7472 616e 736d 6973 7369 efore transmissi │ │ │ │ +0011de10: 6f6e 2920 616e 6420 7365 7420 7468 6520 on) and set the │ │ │ │ +0011de20: 3c63 6f64 653e 5f5f 7369 7a65 3c2f 636f __size member varia │ │ │ │ +0011de40: 626c 6520 6f66 2074 6865 2061 7474 6163 ble of the attac │ │ │ │ +0011de50: 686d 656e 7420 7374 7275 6374 2f63 6c61 hment struct/cla │ │ │ │ +0011de60: 7373 2074 6f20 7a65 726f 2e20 5768 656e ss to zero. When │ │ │ │ +0011de70: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac │ │ │ │ +0011de80: 686d 656e 7420 6368 756e 6b69 6e67 2069 hment chunking i │ │ │ │ +0011de90: 7320 656e 6162 6c65 642c 2074 6869 7320 s enabled, this │ │ │ │ +0011dea0: 6361 6c6c 6261 636b 2073 686f 756c 6420 callback should │ │ │ │ +0011deb0: 636f 6d70 6c65 7465 6c79 2066 696c 6c20 completely fill │ │ │ │ +0011dec0: 7468 6520 3c63 6f64 653e 6275 663c 2f63 the buf buffer with │ │ │ │ +0011dee0: 203c 636f 6465 3e6c 656e 3c2f 636f 6465 len bytes unless t │ │ │ │ +0011df00: 6865 206c 6173 7420 6461 7461 2063 6875 he last data chu │ │ │ │ +0011df10: 6e6b 2069 7320 7265 6163 6865 6420 616e nk is reached an │ │ │ │ +0011df20: 6420 6665 7765 7220 6279 7465 7320 6172 d fewer bytes ar │ │ │ │ +0011df30: 6520 7265 7475 726e 6564 2e3c 2f6c 693e e returned.
  • │ │ │ │ +0011df40: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
  • void │ │ │ │ +0011df50: 282a 736f 6170 2e66 6d69 6d65 7265 6164 (*soap.fmimeread │ │ │ │ +0011df60: 636c 6f73 6529 2873 7472 7563 7420 736f close)(struct so │ │ │ │ +0011df70: 6170 202a 736f 6170 2c20 766f 6964 202a ap *soap, void * │ │ │ │ +0011df80: 6861 6e64 6c65 293c 2f63 6f64 653e 2054 handle) T │ │ │ │ +0011df90: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is │ │ │ │ +0011dfa0: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en │ │ │ │ +0011dfb0: 6769 6e65 2074 6f20 636c 6f73 6520 7468 gine to close th │ │ │ │ +0011dfc0: 6520 4d49 4d45 2f4d 544f 4d20 6174 7461 e MIME/MTOM atta │ │ │ │ +0011dfd0: 6368 6d65 6e74 2073 7472 6561 6d20 6166 chment stream af │ │ │ │ +0011dfe0: 7465 7220 7265 6164 696e 672e 2054 6865 ter reading. The │ │ │ │ +0011dff0: 203c 636f 6465 3e68 616e 646c 653c 2f63 handle parameter c │ │ │ │ +0011e010: 6f6e 7461 696e 7320 7468 6520 6861 6e64 ontains the hand │ │ │ │ +0011e020: 6c65 2072 6574 7572 6e65 6420 6279 2074 le returned by t │ │ │ │ +0011e030: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::fmime │ │ │ │ +0011e0e0: 7265 6164 6f70 656e 3c2f 613e 3c2f 636f readopen callback..
  • voi │ │ │ │ +0011e110: 6420 2a28 2a73 6f61 702e 666d 696d 6577 d *(*soap.fmimew │ │ │ │ +0011e120: 7269 7465 6f70 656e 2928 7374 7275 6374 riteopen)(struct │ │ │ │ +0011e130: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi │ │ │ │ +0011e140: 6420 2a68 616e 646c 652c 2063 6f6e 7374 d *handle, const │ │ │ │ +0011e150: 2063 6861 7220 2a69 642c 2063 6f6e 7374 char *id, const │ │ │ │ +0011e160: 2063 6861 7220 2a74 7970 652c 2063 6f6e char *type, con │ │ │ │ +0011e170: 7374 2063 6861 7220 2a64 6573 6372 6970 st char *descrip │ │ │ │ +0011e180: 7469 6f6e 2c20 656e 756d 2073 6f61 705f tion, enum soap_ │ │ │ │ +0011e190: 6d69 6d65 5f65 6e63 6f64 696e 6720 656e mime_encoding en │ │ │ │ +0011e1a0: 636f 6469 6e67 293c 2f63 6f64 653e 2043 coding) C │ │ │ │ +0011e1b0: 616c 6c65 6420 6279 2074 6865 2074 6f20 alled by the to │ │ │ │ +0011e1c0: 7374 6172 7420 7265 6365 6976 696e 6720 start receiving │ │ │ │ +0011e1d0: 6120 7374 7265 616d 696e 6720 4d49 4d45 a streaming MIME │ │ │ │ +0011e1e0: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment │ │ │ │ +0011e1f0: 2e20 5468 6973 2063 616c 6c62 6163 6b20 . This callback │ │ │ │ +0011e200: 6f70 656e 7320 6120 7374 7265 616d 2074 opens a stream t │ │ │ │ +0011e210: 6f20 7374 6172 7420 7772 6974 696e 6720 o start writing │ │ │ │ +0011e220: 7468 6520 6174 7461 6368 6d65 6e74 2064 the attachment d │ │ │ │ +0011e230: 6174 6120 7265 6365 6976 6564 2e20 5468 ata received. Th │ │ │ │ +0011e240: 6520 6163 7475 616c 2064 6174 6120 7374 e actual data st │ │ │ │ +0011e250: 7265 616d 2077 696c 6c20 6265 2077 7269 ream will be wri │ │ │ │ +0011e260: 7474 656e 2069 6e20 6368 756e 6b73 2075 tten in chunks u │ │ │ │ +0011e270: 7369 6e67 2074 6865 203c 636f 6465 3e3c sing the < │ │ │ │ +0011e280: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0011e290: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0011e2a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0011e2b0: 6761 3930 3834 6630 3339 3265 3461 3534 ga9084f0392e4a54 │ │ │ │ +0011e2c0: 3238 3733 3636 3132 3164 3330 6263 3438 287366121d30bc48 │ │ │ │ +0011e2d0: 3330 2220 7469 746c 653d 2243 616c 6c62 30" title="Callb │ │ │ │ +0011e2e0: 6163 6b20 746f 2077 7269 7465 2064 6174 ack to write dat │ │ │ │ +0011e2f0: 6120 696e 2061 204d 494d 4520 6174 7461 a in a MIME atta │ │ │ │ +0011e300: 6368 6d65 6e74 2073 7472 6561 6d2e 223e chment stream."> │ │ │ │ +0011e310: 736f 6170 3a3a 666d 696d 6577 7269 7465 soap::fmimewrite │ │ │ │ +0011e320: 3c2f 613e 3c2f 636f 6465 3e20 6361 6c6c call │ │ │ │ +0011e330: 6261 636b 2075 6e74 696c 206e 6f20 6d6f back until no mo │ │ │ │ +0011e340: 7265 2064 6174 6120 6973 2061 7661 696c re data is avail │ │ │ │ +0011e350: 6162 6c65 2061 6e64 2074 6865 203c 636f able and the s │ │ │ │ +0011e400: 6f61 703a 3a66 6d69 6d65 7772 6974 6563 oap::fmimewritec │ │ │ │ +0011e410: 6c6f 7365 3c2f 613e 3c2f 636f 6465 3e20 lose │ │ │ │ +0011e420: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ +0011e430: 6564 2074 6f20 636c 6f73 6520 7468 6520 ed to close the │ │ │ │ +0011e440: 7374 7265 616d 2e20 5468 6520 3c63 6f64 stream. The id, type a │ │ │ │ +0011e470: 6e64 203c 636f 6465 3e6f 7074 696f 6e73 nd options │ │ │ │ +0011e480: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ +0011e490: 7273 2061 7265 2074 6865 203c 636f 6465 rs are the id, type an │ │ │ │ +0011e4c0: 6420 3c63 6f64 653e 6f70 7469 6f6e 733c d options< │ │ │ │ +0011e4d0: 2f63 6f64 653e 206f 6620 7468 6520 6174 /code> of the at │ │ │ │ +0011e4e0: 7461 6368 6d65 6e74 2073 7472 7563 742f tachment struct/ │ │ │ │ +0011e4f0: 636c 6173 7320 2865 2e67 2e20 3c63 6f64 class (e.g. │ │ │ │ +0011e570: 7873 645f 5f62 6173 6536 3442 696e 6172 xsd__base64Binar │ │ │ │ +0011e580: 793c 2f61 3e3c 2f63 6f64 653e 206f 7220 y or │ │ │ │ +0011e590: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 _xop │ │ │ │ +0011e600: 5f5f 496e 636c 7564 653c 2f61 3e3c 2f63 __Include with │ │ │ │ +0011e620: 5f5f 7074 723c 2f63 6f64 653e 2c20 3c63 __ptr, __size, id, type and │ │ │ │ +0011e670: 6f70 7469 6f6e 733c 2f63 6f64 653e 206d options m │ │ │ │ +0011e680: 656d 6265 7273 292c 2072 6573 7065 6374 embers), respect │ │ │ │ +0011e690: 6976 656c 792e 2054 6865 2063 616c 6c62 ively. The callb │ │ │ │ +0011e6a0: 6163 6b20 7368 6f75 6c64 2072 6574 7572 ack should retur │ │ │ │ +0011e6b0: 6e20 6120 6861 6e64 6c65 2c20 7768 6963 n a handle, whic │ │ │ │ +0011e6c0: 6820 6973 2070 6173 7365 6420 746f 2074 h is passed to t │ │ │ │ +0011e6d0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap:: │ │ │ │ +0011e770: 666d 696d 6577 7269 7465 3c2f 613e 3c2f fmimewrite and │ │ │ │ +0011e790: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ +0011e830: 3a3a 666d 696d 6577 7269 7465 636c 6f73 ::fmimewriteclos │ │ │ │ +0011e840: 653c 2f61 3e3c 2f63 6f64 653e 2063 616c e cal │ │ │ │ +0011e850: 6c62 6163 6b73 2e20 5468 6520 3c63 6f64 lbacks. The __ptr m │ │ │ │ +0011e870: 656d 6265 7220 7661 7269 6162 6c65 206f ember variable o │ │ │ │ +0011e880: 6620 7468 6520 6174 7461 6368 6d65 6e74 f the attachment │ │ │ │ +0011e890: 2073 7472 7563 742f 636c 6173 7320 6973 struct/class is │ │ │ │ +0011e8a0: 2073 6574 2062 7920 7468 6520 656e 6769 set by the engi │ │ │ │ +0011e8b0: 6e65 2074 6f20 7468 6520 7661 6c75 6520 ne to the value │ │ │ │ +0011e8c0: 6f66 2074 6869 7320 6861 6e64 6c65 2e20 of this handle. │ │ │ │ +0011e8d0: 5468 6520 3c63 6f64 653e 5f5f 7369 7a65 The __size │ │ │ │ +0011e8e0: 3c2f 636f 6465 3e20 6d65 6d62 6572 2076 member v │ │ │ │ +0011e8f0: 6172 6961 626c 6520 6973 2073 6574 2074 ariable is set t │ │ │ │ +0011e900: 6f20 7468 6520 7369 7a65 206f 6620 7468 o the size of th │ │ │ │ +0011e910: 6520 6174 7461 6368 6d65 6e74 2072 6563 e attachment rec │ │ │ │ +0011e920: 6569 7665 642e 3c2f 6c69 3e0a 3c6c 693e eived.
  • .
  • │ │ │ │ +0011e930: 3c63 6f64 653e 696e 7420 282a 736f 6170 int (*soap │ │ │ │ +0011e940: 2e66 6d69 6d65 7772 6974 6529 2873 7472 .fmimewrite)(str │ │ │ │ +0011e950: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +0011e960: 766f 6964 202a 6861 6e64 6c65 2c20 636f void *handle, co │ │ │ │ +0011e970: 6e73 7420 6368 6172 202a 6275 662c 2073 nst char *buf, s │ │ │ │ +0011e980: 697a 655f 7420 6c65 6e29 3c2f 636f 6465 ize_t len) This callback │ │ │ │ +0011e9a0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ +0011e9b0: 2065 6e67 696e 6520 746f 2077 7269 7465 engine to write │ │ │ │ +0011e9c0: 2061 2063 6875 6e6b 206f 6620 6174 7461 a chunk of atta │ │ │ │ +0011e9d0: 6368 6d65 6e74 2064 6174 6120 7265 6365 chment data rece │ │ │ │ +0011e9e0: 6976 6564 2e20 5468 6520 3c63 6f64 653e ived. The │ │ │ │ +0011e9f0: 6861 6e64 6c65 3c2f 636f 6465 3e20 7061 handle pa │ │ │ │ +0011ea00: 7261 6d65 7465 7220 636f 6e74 6169 6e73 rameter contains │ │ │ │ +0011ea10: 2074 6865 2068 616e 646c 6520 7265 7475 the handle retu │ │ │ │ +0011ea20: 726e 6564 2062 7920 7468 6520 3c63 6f64 rned by the so │ │ │ │ +0011ead0: 6170 3a3a 666d 696d 6577 7269 7465 6f70 ap::fmimewriteop │ │ │ │ +0011eae0: 656e 3c2f 613e 3c2f 636f 6465 3e20 6361 en ca │ │ │ │ +0011eaf0: 6c6c 6261 636b 2e20 5468 6520 3c63 6f64 llback. The buf par │ │ │ │ +0011eb10: 616d 6574 6572 2063 6f6e 7461 696e 7320 ameter contains │ │ │ │ +0011eb20: 7468 6520 6461 7461 206f 6620 6c65 6e67 the data of leng │ │ │ │ +0011eb30: 7468 203c 636f 6465 3e6c 656e 3c2f 636f th len. Returns #SOAP_OK or a s │ │ │ │ +0011ec20: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro │ │ │ │ +0011ec40: 7220 636f 6465 2e3c 2f6c 693e 0a3c 6c69 r code.
  • .
  • void (*so │ │ │ │ +0011ec60: 6170 2e66 6d69 6d65 7772 6974 6563 6c6f ap.fmimewriteclo │ │ │ │ +0011ec70: 7365 2928 7374 7275 6374 2073 6f61 7020 se)(struct soap │ │ │ │ +0011ec80: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han │ │ │ │ +0011ec90: 646c 6529 3c2f 636f 6465 3e20 5468 6973 dle) This │ │ │ │ +0011eca0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal │ │ │ │ +0011ecb0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin │ │ │ │ +0011ecc0: 6520 746f 2063 6c6f 7365 2074 6865 204d e to close the M │ │ │ │ +0011ecd0: 494d 452f 4d54 4f4d 2061 7474 6163 686d IME/MTOM attachm │ │ │ │ +0011ece0: 656e 7420 7374 7265 616d 2061 6674 6572 ent stream after │ │ │ │ +0011ecf0: 2077 7269 7469 6e67 2e20 5468 6520 3c63 writing. The handle parameter cont │ │ │ │ +0011ed20: 6169 6e73 2074 6865 2068 616e 646c 6520 ains the handle │ │ │ │ +0011ed30: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the │ │ │ │ +0011ed40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmimewri │ │ │ │ +0011edf0: 7465 6f70 656e 3c2f 613e 3c2f 636f 6465 teopen callback.
  • │ │ │ │ +0011ee10: 0a3c 2f75 6c3e 0a3c 703e 496e 2061 6464 ..

    In add │ │ │ │ +0011ee20: 6974 696f 6e2c 2061 203c 636f 6465 3e76 ition, a v │ │ │ │ +0011ee30: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa │ │ │ │ +0011eef0: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user member is ava │ │ │ │ +0011ef10: 696c 6162 6c65 2074 6f20 7061 7373 2075 ilable to pass u │ │ │ │ +0011ef20: 7365 722d 6465 6669 6e65 6420 6461 7461 ser-defined data │ │ │ │ +0011ef30: 2074 6f20 7468 6520 6361 6c6c 6261 636b to the callback │ │ │ │ +0011ef40: 732e 2054 6869 7320 7761 792c 2079 6f75 s. This way, you │ │ │ │ +0011ef50: 2063 616e 2073 6574 203c 636f 6465 3e76 can set v │ │ │ │ +0011ef60: 6f69 642a 203c 6120 636c 6173 733d 2265 oid* soa │ │ │ │ +0011f020: 703a 3a75 7365 723c 2f61 3e3c 2f63 6f64 p::user to point to a │ │ │ │ +0011f040: 7070 6c69 6361 7469 6f6e 2064 6174 6120 pplication data │ │ │ │ +0011f050: 7468 6174 2074 6865 2063 616c 6c62 6163 that the callbac │ │ │ │ +0011f060: 6b73 206e 6565 6420 7375 6368 2061 7320 ks need such as │ │ │ │ +0011f070: 6120 6669 6c65 206e 616d 6520 666f 7220 a file name for │ │ │ │ +0011f080: 6578 616d 706c 652e 3c2f 703e 0a3c 703e example.

    .

    │ │ │ │ +0011f090: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex │ │ │ │ +0011f0a0: 616d 706c 6520 696c 6c75 7374 7261 7465 ample illustrate │ │ │ │ +0011f0b0: 7320 7468 6520 636c 6965 6e74 2d73 6964 s the client-sid │ │ │ │ +0011f0c0: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization │ │ │ │ +0011f0d0: 206f 6620 616e 2069 6d61 6765 2061 7474 of an image att │ │ │ │ +0011f0e0: 6163 686d 656e 7420 7374 7275 6374 2074 achment struct t │ │ │ │ +0011f0f0: 6f20 7374 7265 616d 2061 2066 696c 6520 o stream a file │ │ │ │ +0011f100: 696e 746f 2061 204d 544f 4d20 6174 7461 into a MTOM atta │ │ │ │ +0011f110: 6368 6d65 6e74 2077 6974 686f 7574 2048 chment without H │ │ │ │ +0011f120: 5454 5020 6368 756e 6b69 6e67 2028 4854 TTP chunking (HT │ │ │ │ +0011f130: 5450 2073 7472 6561 6d69 6e67 2063 6875 TP streaming chu │ │ │ │ +0011f140: 6e6b 6564 204d 544f 4d20 7472 616e 7366 nked MTOM transf │ │ │ │ +0011f150: 6572 2069 7320 7072 6573 656e 7465 6420 er is presented │ │ │ │ +0011f160: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Streamin │ │ │ │ +0011f1a0: 6720 6368 756e 6b65 6420 4d49 4d45 2f4d g chunked MIME/M │ │ │ │ +0011f1b0: 544f 4d3c 2f61 3e20 293a 3c2f 703e 0a3c TOM ):

    .< │ │ │ │ +0011f1c0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +0011f1d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    int main │ │ │ │ +0011f210: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    {
    . │ │ │ │ -0011f260: 2020 3c73 7061 6e20 636c 6173 733d 226b struct < │ │ │ │ -0011f280: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -0011f2b0: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa │ │ │ │ -0011f2e0: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    . │ │ │ │ -0011f300: 2020 3c73 7061 6e20 636c 6173 733d 226b struct < │ │ │ │ -0011f320: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>xsd │ │ │ │ -0011f360: 5f5f 6261 7365 3634 4269 6e61 7279 3c2f __base64Binary image;
    │ │ │ │ -0011f380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FILE *fd; < │ │ │ │ -0011f3a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0011f3d0: 7374 7275 6374 203c 2f73 7061 6e3e 7374 struct st │ │ │ │ -0011f3e0: 6174 2073 623b 203c 2f64 6976 3e0a 3c64 at sb;
    . │ │ │ │ -0011f400: 2020 3c61 2063 6c61 7373 3d22 636f 6465
    soap_init │ │ │ │ -0011f460: 313c 2f61 3e28 2661 6d70 3b3c 6120 636c 1(&soap, S │ │ │ │ -0011f4f0: 4f41 505f 454e 435f 4d54 4f4d 3c2f 613e OAP_ENC_MTOM │ │ │ │ -0011f500: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // mand │ │ │ │ -0011f520: 6174 6f72 7920 746f 2065 6e61 626c 6520 atory to enable │ │ │ │ -0011f530: 4d54 4f4d 203c 2f73 7061 6e3e 3c2f 6469 MTOM .
    if (!fst │ │ │ │ -0011f580: 6174 2866 696c 656e 6f28 6664 292c 2026 at(fileno(fd), & │ │ │ │ -0011f590: 616d 703b 7362 2920 2661 6d70 3b26 616d amp;sb) &&am │ │ │ │ -0011f5a0: 703b 2073 622e 7374 5f73 697a 6520 2667 p; sb.st_size &g │ │ │ │ -0011f5b0: 743b 2030 2920 3c2f 6469 763e 0a3c 6469 t; 0)
    . │ │ │ │ -0011f5d0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    < │ │ │ │ -0011f5f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0011f600: 656e 7422 3e2f 2f20 6265 6361 7573 6520 ent">// because │ │ │ │ -0011f610: 7765 2063 616e 2067 6574 2074 6865 206c we can get the l │ │ │ │ -0011f620: 656e 6774 6820 6f66 2074 6865 2066 696c ength of the fil │ │ │ │ -0011f630: 652c 2077 6520 6361 6e20 7374 7265 616d e, we can stream │ │ │ │ -0011f640: 2069 7420 7769 7468 6f75 7420 6368 756e it without chun │ │ │ │ -0011f650: 6b69 6e67 203c 2f73 7061 6e3e 3c2f 6469 king ..
    │ │ │ │ -0011f740: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -0011f770: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fmimerea │ │ │ │ -0011f7d0: 6463 6c6f 7365 3c2f 613e 203d 206d 696d dclose = mim │ │ │ │ -0011f7e0: 655f 7265 6164 5f63 6c6f 7365 3b20 3c2f e_read_close; .
    soap.fmimeread │ │ │ │ -0011f8a0: 3d20 6d69 6d65 5f72 6561 643b 203c 2f64 = mime_read; .
    image. │ │ │ │ -0011f8d0: 5f5f 7074 7220 3d20 283c 7370 616e 2063 __ptr = (unsigned cha │ │ │ │ -0011f920: 723c 2f73 7061 6e3e 2a29 6664 3b20 3c73 r*)fd; // must set │ │ │ │ -0011f950: 746f 206e 6f6e 2d4e 554c 4c20 2874 6869 to non-NULL (thi │ │ │ │ -0011f960: 7320 6973 206f 7572 2066 6420 6861 6e64 s is our fd hand │ │ │ │ -0011f970: 6c65 2077 6869 6368 2077 6520 6e65 6564 le which we need │ │ │ │ -0011f980: 2069 6e20 7468 6520 6361 6c6c 6261 636b in the callback │ │ │ │ -0011f990: 7329 203c 2f73 7061 6e3e 3c2f 6469 763e s)
    │ │ │ │ -0011f9a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__s │ │ │ │ -0011f9c0: 697a 6520 3d20 7362 2e73 745f 7369 7a65 ize = sb.st_size │ │ │ │ -0011f9d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // must │ │ │ │ -0011f9f0: 7365 7420 7369 7a65 203c 2f73 7061 6e3e set size │ │ │ │ -0011fa00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    else .
    {
    │ │ │ │ -0011fa80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // │ │ │ │ -0011fab0: 646f 6e26 2333 393b 7420 6b6e 6f77 2074 don't know t │ │ │ │ -0011fac0: 6865 2073 697a 652c 2073 6f20 6275 6666 he size, so buff │ │ │ │ -0011fad0: 6572 2069 7420 3c2f 7370 616e 3e3c 2f64 er it .
    size_t i;
    .
    │ │ │ │ -0011fb40: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ -0011fb60: 2f73 7061 6e3e 2063 3b20 3c2f 6469 763e /span> c;
    │ │ │ │ -0011fb70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image.__p │ │ │ │ -0011fb90: 7472 203d 2028 3c73 7061 6e20 636c 6173 tr = ( │ │ │ │ -0011fbb0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned │ │ │ │ -0011fbc0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*)soap │ │ │ │ -0011fc40: 5f6d 616c 6c6f 633c 2f61 3e28 2661 6d70 _malloc(& │ │ │ │ -0011fc50: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -0011fc80: 2c20 4d41 585f 4649 4c45 5f53 495a 4529 , MAX_FILE_SIZE) │ │ │ │ -0011fc90: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ -0011fcb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0011fcc0: 6f72 6466 6c6f 7722 3e66 6f72 3c2f 7370 ordflow">for (i = 0; i &l │ │ │ │ -0011fce0: 743b 204d 4158 5f46 494c 455f 5349 5a45 t; MAX_FILE_SIZE │ │ │ │ -0011fcf0: 3b20 692b 2b29 203c 2f64 6976 3e0a 3c64 ; i++)
    . │ │ │ │ -0011fd10: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    .
    │ │ │ │ -0011fd30: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ -0011fd50: 3c2f 7370 616e 3e20 2828 6320 3d20 6667 ((c = fg │ │ │ │ -0011fd60: 6574 6328 6664 2929 203d 3d20 454f 4629 etc(fd)) == EOF) │ │ │ │ -0011fd70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -0011fd90: 2020 3c73 7061 6e20 636c 6173 733d 226b brea │ │ │ │ -0011fdb0: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    │ │ │ │ -0011fdc0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    image._ │ │ │ │ -0011fde0: 5f70 7472 5b69 5d20 3d20 633b 203c 2f64 _ptr[i] = c; .
    } .
    fclose( │ │ │ │ -0011fe30: 6664 293b 203c 2f64 6976 3e0a 3c64 6976 fd);
    .
    │ │ │ │ -0011fe50: 2020 696d 6167 652e 5f5f 7369 7a65 203d image.__size = │ │ │ │ -0011fe60: 2069 3b20 3c2f 6469 763e 0a3c 6469 7620 i;
    .
    } │ │ │ │ -0011fe80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    imag │ │ │ │ -0011fea0: 652e 7479 7065 203d 203c 7370 616e 2063 e.type = "image │ │ │ │ -0011fed0: 2f6a 7065 6726 7175 6f74 3b3c 2f73 7061 /jpeg"; // MIM │ │ │ │ -0011ff00: 4520 7479 7065 203c 2f73 7061 6e3e 3c2f E type .
    image.o │ │ │ │ -0011ff30: 7074 696f 6e73 203d 203c 7370 616e 2063 ptions = "This │ │ │ │ -0011ff60: 6973 206d 7920 7069 6374 7572 6526 7175 is my picture&qu │ │ │ │ -0011ff70: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // description │ │ │ │ -0011ffa0: 206f 6620 6f62 6a65 6374 203c 2f73 7061 of object
    .
    if │ │ │ │ -0011fff0: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__ │ │ │ │ -00120000: 7765 626d 6574 686f 6428 2661 6d70 3b3c webmethod(&< │ │ │ │ -00120010: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00120020: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00120030: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -00120040: 2e2e 2e29 293c 2f64 6976 3e0a 3c64 6976 ...))
    .
    │ │ │ │ -00120060: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // e │ │ │ │ -00120080: 7272 6f72 3c2f 7370 616e 3e3c 2f64 6976 rror
    .
    │ │ │ │ -001200c0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else
    .
    ... // success
    .
    } st │ │ │ │ +0011f260: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    st │ │ │ │ +0011f300: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct xsd__base64Bi │ │ │ │ +0011f350: 6e61 7279 3c2f 613e 2069 6d61 6765 3b20 nary image; │ │ │ │ +0011f360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    FILE │ │ │ │ +0011f380: 2a66 643b 203c 2f64 6976 3e0a 3c64 6976 *fd;
    .
    │ │ │ │ +0011f3a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct stat sb; .
    soa │ │ │ │ +0011f440: 705f 696e 6974 313c 2f61 3e28 2661 6d70 p_init1(& │ │ │ │ +0011f450: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ +0011f480: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_ENC_MT │ │ │ │ +0011f4e0: 4f4d 3c2f 613e 293b 203c 7370 616e 2063 OM); / │ │ │ │ +0011f500: 2f20 6d61 6e64 6174 6f72 7920 746f 2065 / mandatory to e │ │ │ │ +0011f510: 6e61 626c 6520 4d54 4f4d 203c 2f73 7061 nable MTOM
    .
    if │ │ │ │ +0011f560: 2028 2166 7374 6174 2866 696c 656e 6f28 (!fstat(fileno( │ │ │ │ +0011f570: 6664 292c 2026 616d 703b 7362 2920 2661 fd), &sb) &a │ │ │ │ +0011f580: 6d70 3b26 616d 703b 2073 622e 7374 5f73 mp;& sb.st_s │ │ │ │ +0011f590: 697a 6520 2667 743b 2030 2920 3c2f 6469 ize > 0) .
    {
    .< │ │ │ │ +0011f5c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011f5d0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // be │ │ │ │ +0011f5f0: 6361 7573 6520 7765 2063 616e 2067 6574 cause we can get │ │ │ │ +0011f600: 2074 6865 206c 656e 6774 6820 6f66 2074 the length of t │ │ │ │ +0011f610: 6865 2066 696c 652c 2077 6520 6361 6e20 he file, we can │ │ │ │ +0011f620: 7374 7265 616d 2069 7420 7769 7468 6f75 stream it withou │ │ │ │ +0011f630: 7420 6368 756e 6b69 6e67 203c 2f73 7061 t chunking
    .
    < │ │ │ │ +0011f660: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0011f670: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0011f680: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ +0011f690: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0011f6a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +0011f6b0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm │ │ │ │ +0011f6c0: 6c23 6761 3631 3066 3261 3661 3536 6435 l#ga610f2a6a56d5 │ │ │ │ +0011f6d0: 6164 3034 6362 3531 3234 3434 3061 3564 ad04cb5124440a5d │ │ │ │ +0011f6e0: 6531 6463 223e 666d 696d 6572 6561 646f e1dc">fmimereado │ │ │ │ +0011f6f0: 7065 6e3c 2f61 3e20 3d20 6d69 6d65 5f72 pen = mime_r │ │ │ │ +0011f700: 6561 645f 6f70 656e 3b20 3c2f 6469 763e ead_open;
    │ │ │ │ +0011f710: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so │ │ │ │ +0011f750: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fm │ │ │ │ +0011f7b0: 696d 6572 6561 6463 6c6f 7365 3c2f 613e imereadclose │ │ │ │ +0011f7c0: 203d 206d 696d 655f 7265 6164 5f63 6c6f = mime_read_clo │ │ │ │ +0011f7d0: 7365 3b20 3c2f 6469 763e 0a3c 6469 7620 se;
    .
    │ │ │ │ +0011f7f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +0011f820: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fmimerea │ │ │ │ +0011f880: 643c 2f61 3e20 3d20 6d69 6d65 5f72 6561 d = mime_rea │ │ │ │ +0011f890: 643b 203c 2f64 6976 3e0a 3c64 6976 2063 d;
    .
    │ │ │ │ +0011f8b0: 696d 6167 652e 5f5f 7074 7220 3d20 283c image.__ptr = (< │ │ │ │ +0011f8c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0011f8d0: 6f72 6474 7970 6522 3e75 6e73 6967 6e65 ordtype">unsigne │ │ │ │ +0011f8e0: 643c 2f73 7061 6e3e 203c 7370 616e 2063 d char*) │ │ │ │ +0011f910: 6664 3b20 3c73 7061 6e20 636c 6173 733d fd; // mus │ │ │ │ +0011f930: 7420 7365 7420 746f 206e 6f6e 2d4e 554c t set to non-NUL │ │ │ │ +0011f940: 4c20 2874 6869 7320 6973 206f 7572 2066 L (this is our f │ │ │ │ +0011f950: 6420 6861 6e64 6c65 2077 6869 6368 2077 d handle which w │ │ │ │ +0011f960: 6520 6e65 6564 2069 6e20 7468 6520 6361 e need in the ca │ │ │ │ +0011f970: 6c6c 6261 636b 7329 203c 2f73 7061 6e3e llbacks) │ │ │ │ +0011f980: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ima │ │ │ │ +0011f9a0: 6765 2e5f 5f73 697a 6520 3d20 7362 2e73 ge.__size = sb.s │ │ │ │ +0011f9b0: 745f 7369 7a65 3b20 3c73 7061 6e20 636c t_size; // │ │ │ │ +0011f9d0: 206d 7573 7420 7365 7420 7369 7a65 203c must set size < │ │ │ │ +0011f9e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +0011fa00: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    else
    .
    { │ │ │ │ +0011fa60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // don't │ │ │ │ +0011faa0: 6b6e 6f77 2074 6865 2073 697a 652c 2073 know the size, s │ │ │ │ +0011fab0: 6f20 6275 6666 6572 2069 7420 3c2f 7370 o buffer it
    .
    │ │ │ │ +0011fae0: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +0011fb00: 3c2f 7370 616e 3e20 693b 203c 2f64 6976 i;
    .
    int c; │ │ │ │ +0011fb50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ima │ │ │ │ +0011fb70: 6765 2e5f 5f70 7472 203d 2028 3c73 7061 ge.__ptr = (unsigned │ │ │ │ +0011fbc0: 6368 6172 3c2f 7370 616e 3e2a 293c 6120 char*)soap_malloc(&so │ │ │ │ +0011fc60: 6170 3c2f 613e 2c20 4d41 585f 4649 4c45 ap, MAX_FILE │ │ │ │ +0011fc70: 5f53 495a 4529 3b20 3c2f 6469 763e 0a3c _SIZE);
    .< │ │ │ │ +0011fc80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011fc90: 3e20 2020 203c 7370 616e 2063 6c61 7373 > f │ │ │ │ +0011fcb0: 6f72 3c2f 7370 616e 3e20 2869 203d 2030 or (i = 0 │ │ │ │ +0011fcc0: 3b20 6920 266c 743b 204d 4158 5f46 494c ; i < MAX_FIL │ │ │ │ +0011fcd0: 455f 5349 5a45 3b20 692b 2b29 203c 2f64 E_SIZE; i++) .
    {
    .
    if (( │ │ │ │ +0011fd40: 6320 3d20 6667 6574 6328 6664 2929 203d c = fgetc(fd)) = │ │ │ │ +0011fd50: 3d20 454f 4629 203c 2f64 6976 3e0a 3c64 = EOF)
    . │ │ │ │ +0011fd70: 2020 2020 2020 2020 3c73 7061 6e20 636c break; │ │ │ │ +0011fda0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    i │ │ │ │ +0011fdc0: 6d61 6765 2e5f 5f70 7472 5b69 5d20 3d20 mage.__ptr[i] = │ │ │ │ +0011fdd0: 633b 203c 2f64 6976 3e0a 3c64 6976 2063 c;
    .
    │ │ │ │ +0011fdf0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    f │ │ │ │ +0011fe10: 636c 6f73 6528 6664 293b 203c 2f64 6976 close(fd);
    .
    image.__ │ │ │ │ +0011fe40: 7369 7a65 203d 2069 3b20 3c2f 6469 763e size = i;
    │ │ │ │ +0011fe50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ +0011fe80: 2020 696d 6167 652e 7479 7065 203d 203c image.type = < │ │ │ │ +0011fe90: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +0011fea0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +0011feb0: 3b69 6d61 6765 2f6a 7065 6726 7175 6f74 ;image/jpeg" │ │ │ │ +0011fec0: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; │ │ │ │ +0011fee0: 2f2f 204d 494d 4520 7479 7065 203c 2f73 // MIME type
    .
    i │ │ │ │ +0011ff10: 6d61 6765 2e6f 7074 696f 6e73 203d 203c mage.options = < │ │ │ │ +0011ff20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +0011ff30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +0011ff40: 3b54 6869 7320 6973 206d 7920 7069 6374 ;This is my pict │ │ │ │ +0011ff50: 7572 6526 7175 6f74 3b3c 2f73 7061 6e3e ure" │ │ │ │ +0011ff60: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // descr │ │ │ │ +0011ff80: 6970 7469 6f6e 206f 6620 6f62 6a65 6374 iption of object │ │ │ │ +0011ff90: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0011ffa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0011ffb0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +0011ffd0: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal │ │ │ │ +0011ffe0: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod( │ │ │ │ +0011fff0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +00120020: 3c2f 613e 2c20 2e2e 2e29 293c 2f64 6976 , ...))
    .
    ... // error
    .
    else
    .
    .. │ │ │ │ +001200d0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe │ │ │ │ +001200f0: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    . │ │ │ │ +00120100: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .< │ │ │ │ -00120150: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00120160: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ -00120180: 2f73 7061 6e3e 202a 6d69 6d65 5f72 6561 /span> *mime_rea │ │ │ │ -00120190: 645f 6f70 656e 283c 7370 616e 2063 6c61 d_open(str │ │ │ │ -001201b0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, void *handle, const < │ │ │ │ -00120270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00120280: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char * │ │ │ │ -001202b0: 6964 3c2f 7370 616e 3e2c 203c 7370 616e id, const char *type, const char *description │ │ │ │ -00120360: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    return h │ │ │ │ -001203c0: 616e 646c 653b 203c 2f64 6976 3e0a 3c64 andle;
    . │ │ │ │ -001203e0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    v │ │ │ │ -00120430: 6f69 643c 2f73 7061 6e3e 206d 696d 655f oid mime_ │ │ │ │ -00120440: 7265 6164 5f63 6c6f 7365 283c 7370 616e read_close(struct < │ │ │ │ -00120470: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00120480: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00120490: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -001204a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -001204d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ │ -001204f0: 2f73 7061 6e3e 202a 6861 6e64 6c65 2920 /span> *handle) │ │ │ │ +00120140: 226c 696e 6522 3e3c 7370 616e 2063 6c61 "line">void *mi │ │ │ │ +00120170: 6d65 5f72 6561 645f 6f70 656e 283c 7370 me_read_open(struct │ │ │ │ +001201a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +001201d0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, voi │ │ │ │ +00120220: 643c 2f73 7061 6e3e 202a 6861 6e64 6c65 d *handle │ │ │ │ +00120230: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c │ │ │ │ +00120270: 6861 723c 2f73 7061 6e3e 202a 3c73 7061 har *id, │ │ │ │ +001202a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ +001202e0: 6172 3c2f 7370 616e 3e20 2a74 7970 652c ar *type, │ │ │ │ +001202f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ +00120330: 6172 3c2f 7370 616e 3e20 2a64 6573 6372 ar *descr │ │ │ │ +00120340: 6970 7469 6f6e 2920 3c2f 6469 763e 0a3c iption)
    .< │ │ │ │ +00120350: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00120360: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return handle; .
    }
    .< │ │ │ │ +001203d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001203e0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    void │ │ │ │ +00120420: 206d 696d 655f 7265 6164 5f63 6c6f 7365 mime_read_close │ │ │ │ +00120430: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ +00120480: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +001204b0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, void *ha │ │ │ │ +001204e0: 6e64 6c65 2920 3c2f 6469 763e 0a3c 6469 ndle)
    .{ │ │ │ │ 00120500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ -00120520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    fclose((FIL │ │ │ │ -00120540: 452a 2968 616e 646c 6529 3b20 3c2f 6469 E*)handle); .
    }
    . fclos │ │ │ │ +00120520: 6528 2846 494c 452a 2968 616e 646c 6529 e((FILE*)handle) │ │ │ │ +00120530: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    . │ │ │ │ -00120580: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t mime_read(struct │ │ │ │ -001205f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -00120620: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -00120650: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void │ │ │ │ -00120670: 3c2f 7370 616e 3e20 2a68 616e 646c 652c *handle, │ │ │ │ -00120680: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -001206a0: 2f73 7061 6e3e 202a 6275 662c 203c 7370 /span> *buf, size_t len)
    │ │ │ │ +00120580: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +001205a0: 3c2f 7370 616e 3e20 6d69 6d65 5f72 6561 mime_rea │ │ │ │ +001205b0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa │ │ │ │ +00120600: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +00120630: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, void *h │ │ │ │ +00120660: 616e 646c 652c 203c 7370 616e 2063 6c61 andle, char *bu │ │ │ │ +00120690: 662c 203c 7370 616e 2063 6c61 7373 3d22 f, siz │ │ │ │ +001206b0: 655f 743c 2f73 7061 6e3e 206c 656e 2920 e_t len) │ │ │ │ +001206c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 001206e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ -00120710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00120720: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ -00120730: 2f73 7061 6e3e 2066 7265 6164 2862 7566 /span> fread(buf │ │ │ │ -00120740: 2c20 312c 206c 656e 2c20 2846 494c 452a , 1, len, (FILE* │ │ │ │ -00120750: 2968 616e 646c 6529 3b20 3c2f 6469 763e )handle);
    │ │ │ │ -00120760: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    void *(* fmimer │ │ │ │ -00120870: 6561 646f 7065 6e29 2873 7472 7563 7420 eadopen)(struct │ │ │ │ -00120880: 736f 6170 202a 736f 6170 2c20 766f 6964 soap *soap, void │ │ │ │ -00120890: 202a 2c20 636f 6e73 7420 6368 6172 202a *, const char * │ │ │ │ -001208a0: 2c20 636f 6e73 7420 6368 6172 202a 2c20 , const char *, │ │ │ │ -001208b0: 636f 6e73 7420 6368 6172 202a 293c 2f64 const char *)
    Callback t │ │ │ │ -001208e0: 6f20 6f70 656e 2061 2073 7472 6561 6d69 o open a streami │ │ │ │ -001208f0: 6e67 204d 494d 452f 4d54 4f4d 2061 7474 ng MIME/MTOM att │ │ │ │ -00120900: 6163 686d 656e 7420 666f 7220 7265 6164 achment for read │ │ │ │ -00120910: 696e 672e 3c2f 6469 763e 3c64 6976 2063 ing.
    │ │ │ │ -00120930: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00120940: 7374 6473 6f61 7032 2e68 3a34 3839 363c stdsoap2.h:4896< │ │ │ │ -00120950: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    < │ │ │ │ -00120a30: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00120a40: 6922 3e76 6f69 6428 2a20 666d 696d 6572 i">void(* fmimer │ │ │ │ -00120a50: 6561 6463 6c6f 7365 2928 7374 7275 6374 eadclose)(struct │ │ │ │ -00120a60: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi │ │ │ │ -00120a70: 6420 2a68 616e 646c 6529 3c2f 6469 763e d *handle)
    │ │ │ │ -00120a80: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to c │ │ │ │ -00120aa0: 6c6f 7365 2061 204d 494d 452f 4d54 4f4d lose a MIME/MTOM │ │ │ │ -00120ab0: 2061 7474 6163 686d 656e 7420 7374 7265 attachment stre │ │ │ │ -00120ac0: 616d 2061 6674 6572 2072 6561 6469 6e67 am after reading │ │ │ │ -00120ad0: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ │ -00120af0: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ -00120b00: 736f 6170 322e 683a 3439 3239 3c2f 6469 soap2.h:4929
    .
    │ │ │ │ -00120b70: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    size_ │ │ │ │ -00120c00: 7428 2a20 666d 696d 6572 6561 6429 2873 t(* fmimeread)(s │ │ │ │ -00120c10: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -00120c20: 2c20 766f 6964 202a 6861 6e64 6c65 2c20 , void *handle, │ │ │ │ -00120c30: 6368 6172 202a 6275 662c 2073 697a 655f char *buf, size_ │ │ │ │ -00120c40: 7420 6c65 6e29 3c2f 6469 763e 3c64 6976 t len)
    C │ │ │ │ -00120c60: 616c 6c62 6163 6b20 746f 2072 6561 6420 allback to read │ │ │ │ -00120c70: 6461 7461 2069 6e20 6120 4d49 4d45 2f4d data in a MIME/M │ │ │ │ -00120c80: 544f 4d20 6174 7461 6368 6d65 6e74 2073 TOM attachment s │ │ │ │ -00120c90: 7472 6561 6d2e 3c2f 6469 763e 3c64 6976 tream.
    < │ │ │ │ -00120cb0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:491 │ │ │ │ -00120cd0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 4
    .

    The foll │ │ │ │ -00120d00: 6f77 696e 6720 6578 616d 706c 6520 696c owing example il │ │ │ │ -00120d10: 6c75 7374 7261 7465 7320 7468 6520 7374 lustrates the st │ │ │ │ -00120d20: 7265 616d 696e 6720 6f66 2061 204d 494d reaming of a MIM │ │ │ │ -00120d30: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen │ │ │ │ -00120d40: 7420 696e 746f 2061 2066 696c 6520 6279 t into a file by │ │ │ │ -00120d50: 2061 2063 6c69 656e 743a 3c2f 703e 0a3c a client:

    .< │ │ │ │ -00120d60: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -00120d70: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    int main │ │ │ │ -00120db0: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    st │ │ │ │ -00120e00: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    soa │ │ │ │ -00120ee0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(& │ │ │ │ -00120ef0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -00120f20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap.fmimewriteop │ │ │ │ -00120fd0: 656e 3c2f 613e 203d 206d 696d 655f 7772 en = mime_wr │ │ │ │ -00120fe0: 6974 655f 6f70 656e 3b20 3c2f 6469 763e ite_open;
    │ │ │ │ -00120ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap │ │ │ │ -00121030: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .fmim │ │ │ │ -00121090: 6577 7269 7465 636c 6f73 653c 2f61 3e20 ewriteclose │ │ │ │ -001210a0: 3d20 6d69 6d65 5f77 7269 7465 5f63 6c6f = mime_write_clo │ │ │ │ -001210b0: 7365 3b20 3c2f 6469 763e 0a3c 6469 7620 se;
    .
    < │ │ │ │ -001210d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001210e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001210f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ -00121100: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00121110: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00121120: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm │ │ │ │ -00121130: 6c23 6761 3930 3834 6630 3339 3265 3461 l#ga9084f0392e4a │ │ │ │ -00121140: 3534 3238 3733 3636 3132 3164 3330 6263 54287366121d30bc │ │ │ │ -00121150: 3438 3330 223e 666d 696d 6577 7269 7465 4830">fmimewrite │ │ │ │ -00121160: 3c2f 613e 203d 206d 696d 655f 7772 6974 = mime_writ │ │ │ │ -00121170: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    if (soap_call_ns_ │ │ │ │ -001211c0: 5f77 6562 6d65 7468 6f64 2826 616d 703b _webmethod(& │ │ │ │ -001211d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -00121200: 202e 2e2e 2929 3c2f 6469 763e 0a3c 6469 ...))
    . │ │ │ │ -00121220: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // │ │ │ │ -00121240: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    else.
    ... // success
    .
    } < │ │ │ │ +001206f0: 6522 3e20 203c 7370 616e 2063 6c61 7373 e"> r │ │ │ │ +00120710: 6574 7572 6e3c 2f73 7061 6e3e 2066 7265 eturn fre │ │ │ │ +00120720: 6164 2862 7566 2c20 312c 206c 656e 2c20 ad(buf, 1, len, │ │ │ │ +00120730: 2846 494c 452a 2968 616e 646c 6529 3b20 (FILE*)handle); │ │ │ │ +00120740: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ +00120760: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fmim │ │ │ │ +00120820: 6572 6561 646f 7065 6e3c 2f61 3e3c 2f64 ereadopen
    void *(* │ │ │ │ +00120850: 666d 696d 6572 6561 646f 7065 6e29 2873 fmimereadopen)(s │ │ │ │ +00120860: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +00120870: 2c20 766f 6964 202a 2c20 636f 6e73 7420 , void *, const │ │ │ │ +00120880: 6368 6172 202a 2c20 636f 6e73 7420 6368 char *, const ch │ │ │ │ +00120890: 6172 202a 2c20 636f 6e73 7420 6368 6172 ar *, const char │ │ │ │ +001208a0: 202a 293c 2f64 6976 3e3c 6469 7620 636c *)
    Call │ │ │ │ +001208c0: 6261 636b 2074 6f20 6f70 656e 2061 2073 back to open a s │ │ │ │ +001208d0: 7472 6561 6d69 6e67 204d 494d 452f 4d54 treaming MIME/MT │ │ │ │ +001208e0: 4f4d 2061 7474 6163 686d 656e 7420 666f OM attachment fo │ │ │ │ +001208f0: 7220 7265 6164 696e 672e 3c2f 6469 763e r reading.
    │ │ │ │ +00120900: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00120920: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +00120930: 3a34 3839 363c 2f64 6976 3e3c 2f64 6976 :4896
    .
    soap::fmi │ │ │ │ +00120a00: 6d65 7265 6164 636c 6f73 653c 2f61 3e3c mereadclose< │ │ │ │ +00120a10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void(* │ │ │ │ +00120a30: 666d 696d 6572 6561 6463 6c6f 7365 2928 fmimereadclose)( │ │ │ │ +00120a40: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00120a50: 702c 2076 6f69 6420 2a68 616e 646c 6529 p, void *handle) │ │ │ │ +00120a60: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac │ │ │ │ +00120a80: 6b20 746f 2063 6c6f 7365 2061 204d 494d k to close a MIM │ │ │ │ +00120a90: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen │ │ │ │ +00120aa0: 7420 7374 7265 616d 2061 6674 6572 2072 t stream after r │ │ │ │ +00120ab0: 6561 6469 6e67 2e3c 2f64 6976 3e3c 6469 eading.
    │ │ │ │ +00120ad0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:49 │ │ │ │ +00120af0: 3239 3c2f 6469 763e 3c2f 6469 763e 0a3c 29
    .< │ │ │ │ +00120b00: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00120b10: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +00120b20: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm │ │ │ │ +00120b30: 6c5f 6761 6666 3430 6131 6361 3666 6266 l_gaff40a1ca6fbf │ │ │ │ +00120b40: 3037 3562 3534 6363 6266 3437 3930 3039 075b54ccbf479009 │ │ │ │ +00120b50: 6365 3734 223e 3c64 6976 2063 6c61 7373 ce74">size_t(* fmimer │ │ │ │ +00120bf0: 6561 6429 2873 7472 7563 7420 736f 6170 ead)(struct soap │ │ │ │ +00120c00: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha │ │ │ │ +00120c10: 6e64 6c65 2c20 6368 6172 202a 6275 662c ndle, char *buf, │ │ │ │ +00120c20: 2073 697a 655f 7420 6c65 6e29 3c2f 6469 size_t len)
    Callback to │ │ │ │ +00120c50: 2072 6561 6420 6461 7461 2069 6e20 6120 read data in a │ │ │ │ +00120c60: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach │ │ │ │ +00120c70: 6d65 6e74 2073 7472 6561 6d2e 3c2f 6469 ment stream.
    Definiti │ │ │ │ +00120ca0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ +00120cb0: 2e68 3a34 3931 343c 2f64 6976 3e3c 2f64 .h:4914
    .

    Th │ │ │ │ +00120ce0: 6520 666f 6c6c 6f77 696e 6720 6578 616d e following exam │ │ │ │ +00120cf0: 706c 6520 696c 6c75 7374 7261 7465 7320 ple illustrates │ │ │ │ +00120d00: 7468 6520 7374 7265 616d 696e 6720 6f66 the streaming of │ │ │ │ +00120d10: 2061 204d 494d 452f 4d54 4f4d 2061 7474 a MIME/MTOM att │ │ │ │ +00120d20: 6163 686d 656e 7420 696e 746f 2061 2066 achment into a f │ │ │ │ +00120d30: 696c 6520 6279 2061 2063 6c69 656e 743a ile by a client: │ │ │ │ +00120d40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int main()
    . │ │ │ │ +00120da0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct soap soap;
    .
    soap_init │ │ │ │ +00120ed0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +00120f00: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .< │ │ │ │ +00120f10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00120f20: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.fmimew │ │ │ │ +00120fb0: 7269 7465 6f70 656e 3c2f 613e 203d 206d riteopen = m │ │ │ │ +00120fc0: 696d 655f 7772 6974 655f 6f70 656e 3b20 ime_write_open; │ │ │ │ +00120fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.fmimewriteclos │ │ │ │ +00121080: 653c 2f61 3e20 3d20 6d69 6d65 5f77 7269 e = mime_wri │ │ │ │ +00121090: 7465 5f63 6c6f 7365 3b20 3c2f 6469 763e te_close;
    │ │ │ │ +001210a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ +00121160: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if │ │ │ │ +00121190: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca │ │ │ │ +001211a0: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod │ │ │ │ +001211b0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +001211e0: 703c 2f61 3e2c 202e 2e2e 2929 3c2f 6469 p, ...)).
    ... // error
    .
    else
    .
    . │ │ │ │ +00121290: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // succ │ │ │ │ +001212b0: 6573 733c 2f73 7061 6e3e 3c2f 6469 763e ess
    │ │ │ │ +001212c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    < │ │ │ │ 001212f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    . │ │ │ │ -00121310: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void │ │ │ │ -00121340: 3c2f 7370 616e 3e20 2a6d 696d 655f 7772 *mime_wr │ │ │ │ -00121350: 6974 655f 6f70 656e 283c 7370 616e 2063 ite_open(s │ │ │ │ -00121370: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ -001213e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001213f0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ -00121420: 3c2f 7370 616e 3e20 2a3c 7370 616e 2063 *id, const │ │ │ │ -00121470: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -00121490: 2f73 7061 6e3e 202a 7479 7065 2c20 3c73 /span> *type, const │ │ │ │ -001214c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -001214e0: 2f73 7061 6e3e 202a 6465 7363 7269 7074 /span> *descript │ │ │ │ -001214f0: 696f 6e2c 203c 7370 616e 2063 6c61 7373 ion, enum< │ │ │ │ -00121510: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_mi │ │ │ │ -00121570: 6d65 5f65 6e63 6f64 696e 673c 2f61 3e20 me_encoding │ │ │ │ -00121580: 656e 636f 6469 6e67 2920 3c2f 6469 763e encoding)
    │ │ │ │ +00121300: 3d22 6c69 6e65 223e 3c73 7061 6e20 636c ="line">void *m │ │ │ │ +00121330: 696d 655f 7772 6974 655f 6f70 656e 283c ime_write_open(< │ │ │ │ +00121340: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00121350: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ +001213c0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, const │ │ │ │ +001213e0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *< │ │ │ │ +00121410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00121420: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype">id, const< │ │ │ │ +00121450: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty │ │ │ │ +00121480: 7065 2c20 3c73 7061 6e20 636c 6173 733d pe, const< │ │ │ │ +001214a0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *de │ │ │ │ +001214d0: 7363 7269 7074 696f 6e2c 203c 7370 616e scription, enum s │ │ │ │ +00121550: 6f61 705f 6d69 6d65 5f65 6e63 6f64 696e oap_mime_encodin │ │ │ │ +00121560: 673c 2f61 3e20 656e 636f 6469 6e67 2920 g encoding) │ │ │ │ +00121570: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 00121590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    F │ │ │ │ -001215c0: 494c 4520 2a68 616e 646c 6520 3d20 3c61 ILE *handle = fopen(< │ │ │ │ -00121630: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -00121640: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -00121650: 3b73 6f6d 6566 696c 6526 7175 6f74 3b3c ;somefile"< │ │ │ │ -00121660: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "wb&quo │ │ │ │ -00121690: 743b 3c2f 7370 616e 3e29 3b20 3c2f 6469 t;); .
    // │ │ │ │ -001216d0: 5765 2069 676e 6f72 6520 7468 6520 4d49 We ignore the MI │ │ │ │ -001216e0: 4d45 2063 6f6e 7465 6e74 2074 7261 6e73 ME content trans │ │ │ │ -001216f0: 6665 7220 656e 636f 6469 6e67 2068 6572 fer encoding her │ │ │ │ -00121700: 652c 2062 7574 2073 686f 756c 6420 6368 e, but should ch │ │ │ │ -00121710: 6563 6b20 3c2f 7370 616e 3e3c 2f64 6976 eck
    .
    │ │ │ │ -00121750: 6966 3c2f 7370 616e 3e20 2821 6861 6e64 if (!hand │ │ │ │ -00121760: 6c65 2920 3c2f 6469 763e 0a3c 6469 7620 le)
    .
    { │ │ │ │ -00121780: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..< │ │ │ │ -00121890: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001218a0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap │ │ │ │ -001218d0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->errnum = e │ │ │ │ -00121930: 7272 6e6f 3b20 3c73 7061 6e20 636c 6173 rrno; // g │ │ │ │ -00121950: 6574 2072 6561 736f 6e20 3c2f 7370 616e et reason
    .
    } .
    return │ │ │ │ -001219c0: 2028 3c73 7061 6e20 636c 6173 733d 226b (void │ │ │ │ -001219e0: 3c2f 7370 616e 3e2a 2968 616e 646c 653b *)handle; │ │ │ │ -001219f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } FILE *handl │ │ │ │ +001215b0: 6520 3d20 3c61 2063 6c61 7373 3d22 636f e = fopen │ │ │ │ +00121610: 3c2f 613e 283c 7370 616e 2063 6c61 7373 ("somefile& │ │ │ │ +00121640: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, " │ │ │ │ +00121670: 7762 2671 756f 743b 3c2f 7370 616e 3e29 wb") │ │ │ │ +00121680: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    // We ignore │ │ │ │ +001216c0: 7468 6520 4d49 4d45 2063 6f6e 7465 6e74 the MIME content │ │ │ │ +001216d0: 2074 7261 6e73 6665 7220 656e 636f 6469 transfer encodi │ │ │ │ +001216e0: 6e67 2068 6572 652c 2062 7574 2073 686f ng here, but sho │ │ │ │ +001216f0: 756c 6420 6368 6563 6b20 3c2f 7370 616e uld check
    .
    if │ │ │ │ +00121740: 2821 6861 6e64 6c65 2920 3c2f 6469 763e (!handle)
    │ │ │ │ +00121750: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . │ │ │ │ +00121780: 2020 203c 6120 636c 6173 733d 2263 6f64 soap-> │ │ │ │ +00121800: 6572 726f 723c 2f61 3e20 3d20 3c61 2063 error = │ │ │ │ +00121860: 534f 4150 5f45 4f46 3c2f 613e 3b20 3c2f SOAP_EOF; .
    soap->< │ │ │ │ +001218c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001218d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001218e0: 6874 6d6c 2361 3130 6236 3664 3664 3438 html#a10b66d6d48 │ │ │ │ +001218f0: 3936 3930 6237 6430 6635 3931 6165 3236 9690b7d0f591ae26 │ │ │ │ +00121900: 3333 6464 3133 223e 6572 726e 756d 3c2f 33dd13">errnum = errno; // get reason │ │ │ │ +00121940: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00121960: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    < │ │ │ │ +00121980: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00121990: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +001219a0: 2f73 7061 6e3e 2028 3c73 7061 6e20 636c /span> (void*)h │ │ │ │ +001219d0: 616e 646c 653b 203c 2f64 6976 3e0a 3c64 andle;
    . │ │ │ │ +001219f0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    .< │ │ │ │ -00121a40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00121a50: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    mime_write_ │ │ │ │ -00121a70: 636c 6f73 6528 3c73 7061 6e20 636c 6173 close(stru │ │ │ │ -00121a90: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, void *handle)
    v │ │ │ │ +00121a40: 6f69 643c 2f73 7061 6e3e 206d 696d 655f oid mime_ │ │ │ │ +00121a50: 7772 6974 655f 636c 6f73 6528 3c73 7061 write_close(struct │ │ │ │ +00121a80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +00121ab0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +00121ae0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void │ │ │ │ +00121b00: 3c2f 7370 616e 3e20 2a68 616e 646c 6529 *handle) │ │ │ │ +00121b10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    {
    .
    │ │ │ │ -00121b60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fclose((FILE*)handle) │ │ │ │ -00121bd0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } fcl │ │ │ │ +00121ba0: 6f73 653c 2f61 3e28 2846 494c 452a 2968 ose((FILE*)h │ │ │ │ +00121bb0: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .< │ │ │ │ +00121bc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00121bd0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    . │ │ │ │ -00121c20: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    mime_write( │ │ │ │ -00121c50: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ -00121ca0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap │ │ │ │ -00121cd0: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , │ │ │ │ -00121cf0: 766f 6964 3c2f 7370 616e 3e20 2a68 616e void *han │ │ │ │ -00121d00: 646c 652c 203c 7370 616e 2063 6c61 7373 dle, const │ │ │ │ -00121d20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *< │ │ │ │ -00121d50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00121d60: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00121d70: 6874 6d6c 2361 6364 6131 3733 3666 6261 html#acda1736fba │ │ │ │ -00121d80: 6163 3037 3236 3132 3236 6265 6665 3136 ac07261226befe16 │ │ │ │ -00121d90: 3561 3536 3831 223e 6275 663c 2f61 3e2c 5a5681">buf, │ │ │ │ -00121da0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ │ -00121dc0: 743c 2f73 7061 6e3e 206c 656e 2920 3c2f t len) │ │ │ │ +00121c20: 696e 743c 2f73 7061 6e3e 206d 696d 655f int mime_ │ │ │ │ +00121c30: 7772 6974 6528 3c73 7061 6e20 636c 6173 write(stru │ │ │ │ +00121c50: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, void *handle, const char *bu │ │ │ │ +00121d80: 663c 2f61 3e2c 203c 7370 616e 2063 6c61 f, size_t l │ │ │ │ +00121db0: 656e 2920 3c2f 6469 763e 0a3c 6469 7620 en)
    .
    {.
    {
    .< │ │ │ │ -00121df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00121e00: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz │ │ │ │ -00121e20: 655f 743c 2f73 7061 6e3e 206e 7772 6974 e_t nwrit │ │ │ │ -00121e30: 7465 6e3b 203c 2f64 6976 3e0a 3c64 6976 ten;
    .
    │ │ │ │ -00121e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 while< │ │ │ │ -00121e70: 2f73 7061 6e3e 2028 6c65 6e29 203c 2f64 /span> (len) .
    {
    . │ │ │ │ -00121ea0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    nwritten = │ │ │ │ -00121ec0: 2066 7772 6974 6528 3c61 2063 6c61 7373 fwrite(buf, 1, len │ │ │ │ -00121f20: 2c20 2846 494c 452a 2968 616e 646c 6529 , (FILE*)handle) │ │ │ │ -00121f30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ -00121f50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00121f60: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (!nwritten) < │ │ │ │ -00121f80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {..< │ │ │ │ -00122080: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00122090: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return < │ │ │ │ -001220c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001220d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001220e0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ -001220f0: 6132 3234 6232 6332 6238 3330 3133 3566 a224b2c2b830135f │ │ │ │ -00122100: 3132 6235 3335 3336 6631 3839 6234 6562 12b53536f189b4eb │ │ │ │ -00122110: 6422 3e53 4f41 505f 454f 463c 2f61 3e3b d">SOAP_EOF; │ │ │ │ -00122120: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } │ │ │ │ -00122140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    len │ │ │ │ -00122160: 202d 3d20 6e77 7269 7474 656e 3b20 3c2f -= nwritten; .
    buf += n │ │ │ │ -001221e0: 7772 6974 7465 6e3b 203c 2f64 6976 3e0a written;
    . │ │ │ │ -001221f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . │ │ │ │ -00122220: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ -00122240: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA │ │ │ │ -001222a0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    │ │ │ │ -001222b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    < │ │ │ │ -001223a0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -001223b0: 6922 3e76 6f69 6428 2a20 666d 696d 6577 i">void(* fmimew │ │ │ │ -001223c0: 7269 7465 636c 6f73 6529 2873 7472 7563 riteclose)(struc │ │ │ │ -001223d0: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo │ │ │ │ -001223e0: 6964 202a 6861 6e64 6c65 293c 2f64 6976 id *handle)
    Callback to │ │ │ │ -00122410: 636c 6f73 6520 6120 4d49 4d45 2f4d 544f close a MIME/MTO │ │ │ │ -00122420: 4d20 6174 7461 6368 6d65 6e74 2073 7472 M attachment str │ │ │ │ -00122430: 6561 6d20 6166 7465 7220 7772 6974 696e eam after writin │ │ │ │ -00122440: 672e 3c2f 6469 763e 3c64 6976 2063 6c61 g.
    De │ │ │ │ -00122460: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ -00122470: 6473 6f61 7032 2e68 3a35 3032 303c 2f64 dsoap2.h:5020
    .. │ │ │ │ -00122650: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::fmime │ │ │ │ -00122710: 7772 6974 656f 7065 6e3c 2f61 3e3c 2f64 writeopen
    void *(* │ │ │ │ -00122740: 666d 696d 6577 7269 7465 6f70 656e 2928 fmimewriteopen)( │ │ │ │ -00122750: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ -00122760: 702c 2076 6f69 6420 2a68 616e 646c 652c p, void *handle, │ │ │ │ -00122770: 2063 6f6e 7374 2063 6861 7220 2a69 642c const char *id, │ │ │ │ -00122780: 2063 6f6e 7374 2063 6861 7220 2a74 7970 const char *typ │ │ │ │ -00122790: 652c 2063 6f6e 7374 2063 6861 7220 2a64 e, const char *d │ │ │ │ -001227a0: 6573 6372 6970 7469 6f6e 2c20 656e 756d escription, enum │ │ │ │ -001227b0: 2073 6f61 705f 6d69 6d65 5f65 6e63 6f64 soap_mime_encod │ │ │ │ -001227c0: 696e 6720 656e 636f 6469 6e67 293c 2f64 ing encoding)
    Callback t │ │ │ │ -001227f0: 6f20 6f70 656e 2061 2073 7472 6561 6d69 o open a streami │ │ │ │ -00122800: 6e67 204d 494d 452f 4d54 4f4d 2061 7474 ng MIME/MTOM att │ │ │ │ -00122810: 6163 686d 656e 7420 666f 7220 7772 6974 achment for writ │ │ │ │ -00122820: 696e 672e 3c2f 6469 763e 3c64 6976 2063 ing.
    │ │ │ │ -00122840: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00122850: 7374 6473 6f61 7032 2e68 3a34 3939 383c stdsoap2.h:4998< │ │ │ │ -00122860: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap_mime │ │ │ │ -00122920: 5f65 6e63 6f64 696e 673c 2f61 3e3c 2f64 _encoding
    soap_mime │ │ │ │ -00122950: 5f65 6e63 6f64 696e 673c 2f64 6976 3e3c _encoding
    < │ │ │ │ -00122960: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -00122970: 223e 5246 4332 3034 3520 4d49 4d45 2063 ">RFC2045 MIME c │ │ │ │ -00122980: 6f6e 7465 6e74 2074 7261 6e73 6665 7220 ontent transfer │ │ │ │ -00122990: 656e 636f 6469 6e67 732e 3c2f 6469 763e encodings.
    │ │ │ │ -001229a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -001229c0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -001229d0: 3a31 3032 3233 3c2f 6469 763e 3c2f 6469 :10223
    .

    Mes │ │ │ │ -00122a00: 7361 6765 2063 6f6d 7072 6573 7369 6f6e sage compression │ │ │ │ -00122a10: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA │ │ │ │ -00122a20: 505f 454e 435f 5a4c 4942 3c2f 636f 6465 P_ENC_ZLIB can be used wi │ │ │ │ -00122a40: 7468 204d 494d 4520 746f 2063 6f6d 7072 th MIME to compr │ │ │ │ -00122a50: 6573 7320 7468 6520 656e 7469 7265 206d ess the entire m │ │ │ │ -00122a60: 6573 7361 6765 2e20 486f 7765 7665 722c essage. However, │ │ │ │ -00122a70: 2063 6f6d 7072 6573 7369 6f6e 2072 6571 compression req │ │ │ │ -00122a80: 7569 7265 7320 6275 6666 6572 696e 6720 uires buffering │ │ │ │ -00122a90: 746f 2064 6574 6572 6d69 6e65 2074 6865 to determine the │ │ │ │ -00122aa0: 2048 5454 5020 636f 6e74 656e 7420 6c65 HTTP content le │ │ │ │ -00122ab0: 6e67 7468 2068 6561 6465 722c 2077 6869 ngth header, whi │ │ │ │ -00122ac0: 6368 2063 616e 6365 6c73 2074 6865 2062 ch cancels the b │ │ │ │ -00122ad0: 656e 6566 6974 7320 6f66 2073 7472 6561 enefits of strea │ │ │ │ -00122ae0: 6d69 6e67 204d 494d 452e 2054 6f20 6176 ming MIME. To av │ │ │ │ -00122af0: 6f69 6420 7468 6973 2c20 796f 7520 7368 oid this, you sh │ │ │ │ -00122b00: 6f75 6c64 2075 7365 2063 6875 6e6b 6564 ould use chunked │ │ │ │ -00122b10: 2048 5454 5020 2877 6974 6820 7468 6520 HTTP (with the │ │ │ │ -00122b20: 6f75 7470 7574 2d6d 6f64 6520 3c63 6f64 output-mode #SOAP_IO_CHUNK │ │ │ │ -00122b40: 3c2f 636f 6465 3e20 666c 6167 2920 7769 flag) wi │ │ │ │ -00122b50: 7468 2063 6f6d 7072 6573 7369 6f6e 2061 th compression a │ │ │ │ -00122b60: 6e64 2073 7472 6561 6d69 6e67 204d 494d nd streaming MIM │ │ │ │ -00122b70: 452e 2041 7420 7468 6520 7365 7276 6572 E. At the server │ │ │ │ -00122b80: 2073 6964 652c 2077 6865 6e20 796f 7520 side, when you │ │ │ │ -00122b90: 7365 7420 3c63 6f64 653e 2353 4f41 505f set #SOAP_ │ │ │ │ -00122ba0: 494f 5f43 4855 4e4b 3c2f 636f 6465 3e20 IO_CHUNK │ │ │ │ -00122bb0: 6265 666f 7265 2063 616c 6c69 6e67 203c before calling < │ │ │ │ -00122bc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_serve, the e │ │ │ │ -00122c50: 6e67 696e 6520 7769 6c6c 2061 7574 6f6d ngine will autom │ │ │ │ -00122c60: 6174 6963 616c 6c79 2072 6576 6572 7420 atically revert │ │ │ │ -00122c70: 746f 2062 7566 6665 7269 6e67 2028 3c63 to buffering (#SOAP_IO_STO │ │ │ │ -00122c90: 5245 3c2f 636f 6465 3e20 666c 6167 2069 RE flag i │ │ │ │ -00122ca0: 7320 7365 7429 2e20 596f 7520 6361 6e20 s set). You can │ │ │ │ -00122cb0: 6368 6563 6b20 7468 6973 2066 6c61 6720 check this flag │ │ │ │ -00122cc0: 7769 7468 203c 636f 6465 3e28 736f 6170 with (soap │ │ │ │ -00122cd0: 2d26 6774 3b6f 6d6f 6465 2026 616d 703b ->omode & │ │ │ │ -00122ce0: 2053 4f41 505f 494f 2920 3d3d 2053 4f41 SOAP_IO) == SOA │ │ │ │ -00122cf0: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK to see if the │ │ │ │ -00122d10: 636c 6965 6e74 2061 6363 6570 7473 2063 client accepts c │ │ │ │ -00122d20: 6875 6e6b 696e 672e 204d 6f72 6520 696e hunking. More in │ │ │ │ -00122d30: 666f 726d 6174 696f 6e20 6162 6f75 7420 formation about │ │ │ │ -00122d40: 7374 7265 616d 696e 6720 6368 756e 6b65 streaming chunke │ │ │ │ -00122d50: 6420 4d49 4d45 2063 616e 2062 6520 666f d MIME can be fo │ │ │ │ -00122d60: 756e 6420 696e 2053 6563 7469 6f6e 203c und in Section < │ │ │ │ -00122d70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00122d80: 663d 2269 6e64 6578 2e68 746d 6c23 6d69 f="index.html#mi │ │ │ │ -00122d90: 6d65 6368 756e 6b69 6e67 223e 5374 7265 mechunking">Stre │ │ │ │ -00122da0: 616d 696e 6720 6368 756e 6b65 6420 4d49 aming chunked MI │ │ │ │ -00122db0: 4d45 2f4d 544f 4d3c 2f61 3e20 2e2e 3c2f ME/MTOM ...

    Note that │ │ │ │ -00122dd0: 7468 6520 6578 616d 706c 6520 6162 6f76 the example abov │ │ │ │ -00122de0: 6520 666f 7220 3c63 6f64 653e 6d69 6d65 e for mime │ │ │ │ -00122df0: 5f72 6561 643c 2f63 6f64 653e 2075 7365 _read use │ │ │ │ -00122e00: 7320 6120 6861 6e64 6c65 2074 6861 7420 s a handle that │ │ │ │ -00122e10: 706f 696e 7473 2074 6f20 7468 6520 6f70 points to the op │ │ │ │ -00122e20: 656e 2066 696c 6520 3c63 6f64 653e 4649 en file FI │ │ │ │ -00122e30: 4c45 2a3c 2f63 6f64 653e 2e20 5468 6520 LE*. The │ │ │ │ -00122e40: 7369 6d70 6c65 2065 7861 6d70 6c65 2061 simple example a │ │ │ │ -00122e50: 626f 7665 2069 7320 6e6f 7420 7265 636f bove is not reco │ │ │ │ -00122e60: 6d6d 656e 6465 6420 7768 656e 2074 6865 mmended when the │ │ │ │ -00122e70: 2070 6c61 7466 6f72 6d20 696d 706f 7365 platform impose │ │ │ │ -00122e80: 7320 6120 6c69 6d69 7420 6f6e 2074 6865 s a limit on the │ │ │ │ -00122e90: 206e 756d 6265 7220 6f66 206f 7065 6e20 number of open │ │ │ │ -00122ea0: 6669 6c65 2064 6573 6372 6970 746f 7273 file descriptors │ │ │ │ -00122eb0: 2e20 596f 7520 6361 6e20 7573 6520 7468 . You can use th │ │ │ │ -00122ec0: 6520 6861 6e64 6c65 2074 6f20 7061 7373 e handle to pass │ │ │ │ -00122ed0: 2061 6c6f 6e67 206d 6f72 6520 696e 666f along more info │ │ │ │ -00122ee0: 726d 6174 696f 6e20 7468 616e 206a 7573 rmation than jus │ │ │ │ -00122ef0: 7420 7468 6520 6669 6c65 2064 6573 6372 t the file descr │ │ │ │ -00122f00: 6970 746f 722e 2053 6f20 666f 7220 6578 iptor. So for ex │ │ │ │ -00122f10: 616d 706c 652c 2077 6865 6e20 7468 6520 ample, when the │ │ │ │ -00122f20: 6e75 6d62 6572 206f 6620 6f70 656e 2066 number of open f │ │ │ │ -00122f30: 696c 6520 6465 7363 7269 7074 6f72 7320 ile descriptors │ │ │ │ -00122f40: 6973 206c 696d 6974 6564 206f 6e20 796f is limited on yo │ │ │ │ -00122f50: 7572 2070 6c61 7466 6f72 6d2c 2079 6f75 ur platform, you │ │ │ │ -00122f60: 2073 686f 756c 6420 6c65 7420 7468 6520 should let the │ │ │ │ -00122f70: 6861 6e64 6c65 2070 6f69 6e74 2074 6f20 handle point to │ │ │ │ -00122f80: 6120 7374 7275 6374 7572 6520 7769 7468 a structure with │ │ │ │ -00122f90: 2066 696c 652d 7265 6c61 7465 6420 696e file-related in │ │ │ │ -00122fa0: 666f 726d 6174 696f 6e2e 2054 6865 2043 formation. The C │ │ │ │ -00122fb0: 2b2b 2065 7861 6d70 6c65 2062 656c 6f77 ++ example below │ │ │ │ -00122fc0: 2069 6c6c 7573 7472 6174 6573 2074 6869 illustrates thi │ │ │ │ -00122fd0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    f │ │ │ │ -00123000: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include │ │ │ │ -00123010: 203d 2073 6f61 705f 6e65 775f 5f78 6f70 = soap_new__xop │ │ │ │ -00123020: 5f5f 496e 636c 7564 6528 3c61 2063 6c61 __Include(soap); .
    file.xop__I │ │ │ │ -00123080: 6e63 6c75 6465 2d26 6774 3b69 6420 3d20 nclude->id = │ │ │ │ -00123090: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    .f │ │ │ │ -001230b0: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include │ │ │ │ -001230c0: 2d26 6774 3b74 7970 6520 3d20 7479 7065 ->type = type │ │ │ │ -001230d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    file. │ │ │ │ -001230f0: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include-> │ │ │ │ -00123100: 3b6f 7074 696f 6e73 203d 204e 554c 4c3b ;options = NULL; │ │ │ │ +00121de0: 226c 696e 6522 3e20 203c 7370 616e 2063 "line"> size_t │ │ │ │ +00121e10: 206e 7772 6974 7465 6e3b 203c 2f64 6976 nwritten;
    .
    │ │ │ │ +00121e50: 7768 696c 653c 2f73 7061 6e3e 2028 6c65 while (le │ │ │ │ +00121e60: 6e29 203c 2f64 6976 3e0a 3c64 6976 2063 n)
    .
    {< │ │ │ │ +00121e80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    nwri │ │ │ │ +00121ea0: 7474 656e 203d 2066 7772 6974 6528 3c61 tten = fwrite(buf, │ │ │ │ +00121f00: 312c 206c 656e 2c20 2846 494c 452a 2968 1, len, (FILE*)h │ │ │ │ +00121f10: 616e 646c 6529 3b20 3c2f 6469 763e 0a3c andle);
    .< │ │ │ │ +00121f20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00121f30: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i │ │ │ │ +00121f50: 663c 2f73 7061 6e3e 2028 216e 7772 6974 f (!nwrit │ │ │ │ +00121f60: 7465 6e29 203c 2f64 6976 3e0a 3c64 6976 ten)
    .
    │ │ │ │ +00121f80: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ +00121fa0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e │ │ │ │ +00122020: 7272 6e75 6d3c 2f61 3e20 3d20 6572 726e rrnum = errn │ │ │ │ +00122030: 6f3b 203c 7370 616e 2063 6c61 7373 3d22 o; // get │ │ │ │ +00122050: 7265 6173 6f6e 203c 2f73 7061 6e3e 3c2f reason .. │ │ │ │ +00122120: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . │ │ │ │ +00122140: 2020 206c 656e 202d 3d20 6e77 7269 7474 len -= nwritt │ │ │ │ +00122150: 656e 3b20 3c2f 6469 763e 0a3c 6469 7620 en;
    .
    │ │ │ │ +00122170: 203c 6120 636c 6173 733d 2263 6f64 6522 buf += nwritten; < │ │ │ │ +001221d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    return < │ │ │ │ +00122230: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00122240: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00122250: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ +00122260: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c │ │ │ │ +00122270: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c │ │ │ │ +00122280: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0">SOAP_OK; │ │ │ │ +00122290: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ +001222b0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap::fmim │ │ │ │ +00122370: 6577 7269 7465 636c 6f73 653c 2f61 3e3c ewriteclose< │ │ │ │ +00122380: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    void(* │ │ │ │ +001223a0: 666d 696d 6577 7269 7465 636c 6f73 6529 fmimewriteclose) │ │ │ │ +001223b0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ +001223c0: 6170 2c20 766f 6964 202a 6861 6e64 6c65 ap, void *handle │ │ │ │ +001223d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba │ │ │ │ +001223f0: 636b 2074 6f20 636c 6f73 6520 6120 4d49 ck to close a MI │ │ │ │ +00122400: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme │ │ │ │ +00122410: 6e74 2073 7472 6561 6d20 6166 7465 7220 nt stream after │ │ │ │ +00122420: 7772 6974 696e 672e 3c2f 6469 763e 3c64 writing.
    Definition:< │ │ │ │ +00122450: 2f62 3e20 7374 6473 6f61 7032 2e68 3a35 /b> stdsoap2.h:5 │ │ │ │ +00122460: 3032 303c 2f64 6976 3e3c 2f64 6976 3e0a 020
    . │ │ │ │ +00122470: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    < │ │ │ │ +00122540: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00122550: 6922 3e69 6e74 282a 2066 6d69 6d65 7772 i">int(* fmimewr │ │ │ │ +00122560: 6974 6529 2873 7472 7563 7420 736f 6170 ite)(struct soap │ │ │ │ +00122570: 202a 736f 6170 2c20 766f 6964 202a 6861 *soap, void *ha │ │ │ │ +00122580: 6e64 6c65 2c20 636f 6e73 7420 6368 6172 ndle, const char │ │ │ │ +00122590: 202a 6275 662c 2073 697a 655f 7420 6c65 *buf, size_t le │ │ │ │ +001225a0: 6e29 3c2f 6469 763e 3c64 6976 2063 6c61 n)
    Callb │ │ │ │ +001225c0: 6163 6b20 746f 2077 7269 7465 2064 6174 ack to write dat │ │ │ │ +001225d0: 6120 696e 2061 204d 494d 4520 6174 7461 a in a MIME atta │ │ │ │ +001225e0: 6368 6d65 6e74 2073 7472 6561 6d2e 3c2f chment stream.
    Defini │ │ │ │ +00122610: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ +00122620: 7032 2e68 3a35 3030 393c 2f64 6976 3e3c p2.h:5009
    < │ │ │ │ +00122630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    voi │ │ │ │ +00122720: 6420 2a28 2a20 666d 696d 6577 7269 7465 d *(* fmimewrite │ │ │ │ +00122730: 6f70 656e 2928 7374 7275 6374 2073 6f61 open)(struct soa │ │ │ │ +00122740: 7020 2a73 6f61 702c 2076 6f69 6420 2a68 p *soap, void *h │ │ │ │ +00122750: 616e 646c 652c 2063 6f6e 7374 2063 6861 andle, const cha │ │ │ │ +00122760: 7220 2a69 642c 2063 6f6e 7374 2063 6861 r *id, const cha │ │ │ │ +00122770: 7220 2a74 7970 652c 2063 6f6e 7374 2063 r *type, const c │ │ │ │ +00122780: 6861 7220 2a64 6573 6372 6970 7469 6f6e har *description │ │ │ │ +00122790: 2c20 656e 756d 2073 6f61 705f 6d69 6d65 , enum soap_mime │ │ │ │ +001227a0: 5f65 6e63 6f64 696e 6720 656e 636f 6469 _encoding encodi │ │ │ │ +001227b0: 6e67 293c 2f64 6976 3e3c 6469 7620 636c ng)
    │ │ │ │ +00122810: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00122830: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +00122840: 3a34 3939 383c 2f64 6976 3e3c 2f64 6976 :4998
    .
    < │ │ │ │ +001229d0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +001229e0: 3c70 3e4d 6573 7361 6765 2063 6f6d 7072

    Message compr │ │ │ │ +001229f0: 6573 7369 6f6e 2077 6974 6820 3c63 6f64 ession with #SOAP_ENC_ZLIB │ │ │ │ +00122a10: 3c2f 636f 6465 3e20 6361 6e20 6265 2075 can be u │ │ │ │ +00122a20: 7365 6420 7769 7468 204d 494d 4520 746f sed with MIME to │ │ │ │ +00122a30: 2063 6f6d 7072 6573 7320 7468 6520 656e compress the en │ │ │ │ +00122a40: 7469 7265 206d 6573 7361 6765 2e20 486f tire message. Ho │ │ │ │ +00122a50: 7765 7665 722c 2063 6f6d 7072 6573 7369 wever, compressi │ │ │ │ +00122a60: 6f6e 2072 6571 7569 7265 7320 6275 6666 on requires buff │ │ │ │ +00122a70: 6572 696e 6720 746f 2064 6574 6572 6d69 ering to determi │ │ │ │ +00122a80: 6e65 2074 6865 2048 5454 5020 636f 6e74 ne the HTTP cont │ │ │ │ +00122a90: 656e 7420 6c65 6e67 7468 2068 6561 6465 ent length heade │ │ │ │ +00122aa0: 722c 2077 6869 6368 2063 616e 6365 6c73 r, which cancels │ │ │ │ +00122ab0: 2074 6865 2062 656e 6566 6974 7320 6f66 the benefits of │ │ │ │ +00122ac0: 2073 7472 6561 6d69 6e67 204d 494d 452e streaming MIME. │ │ │ │ +00122ad0: 2054 6f20 6176 6f69 6420 7468 6973 2c20 To avoid this, │ │ │ │ +00122ae0: 796f 7520 7368 6f75 6c64 2075 7365 2063 you should use c │ │ │ │ +00122af0: 6875 6e6b 6564 2048 5454 5020 2877 6974 hunked HTTP (wit │ │ │ │ +00122b00: 6820 7468 6520 6f75 7470 7574 2d6d 6f64 h the output-mod │ │ │ │ +00122b10: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO │ │ │ │ +00122b20: 5f43 4855 4e4b 3c2f 636f 6465 3e20 666c _CHUNK fl │ │ │ │ +00122b30: 6167 2920 7769 7468 2063 6f6d 7072 6573 ag) with compres │ │ │ │ +00122b40: 7369 6f6e 2061 6e64 2073 7472 6561 6d69 sion and streami │ │ │ │ +00122b50: 6e67 204d 494d 452e 2041 7420 7468 6520 ng MIME. At the │ │ │ │ +00122b60: 7365 7276 6572 2073 6964 652c 2077 6865 server side, whe │ │ │ │ +00122b70: 6e20 796f 7520 7365 7420 3c63 6f64 653e n you set │ │ │ │ +00122b80: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK before cal │ │ │ │ +00122ba0: 6c69 6e67 203c 636f 6465 3e3c 6120 636c ling soap_s │ │ │ │ +00122c20: 6572 7665 3c2f 613e 3c2f 636f 6465 3e2c erve, │ │ │ │ +00122c30: 2074 6865 2065 6e67 696e 6520 7769 6c6c the engine will │ │ │ │ +00122c40: 2061 7574 6f6d 6174 6963 616c 6c79 2072 automatically r │ │ │ │ +00122c50: 6576 6572 7420 746f 2062 7566 6665 7269 evert to bufferi │ │ │ │ +00122c60: 6e67 2028 3c63 6f64 653e 2353 4f41 505f ng (#SOAP_ │ │ │ │ +00122c70: 494f 5f53 544f 5245 3c2f 636f 6465 3e20 IO_STORE │ │ │ │ +00122c80: 666c 6167 2069 7320 7365 7429 2e20 596f flag is set). Yo │ │ │ │ +00122c90: 7520 6361 6e20 6368 6563 6b20 7468 6973 u can check this │ │ │ │ +00122ca0: 2066 6c61 6720 7769 7468 203c 636f 6465 flag with (soap->omode │ │ │ │ +00122cc0: 2026 616d 703b 2053 4f41 505f 494f 2920 & SOAP_IO) │ │ │ │ +00122cd0: 3d3d 2053 4f41 505f 494f 5f43 4855 4e4b == SOAP_IO_CHUNK │ │ │ │ +00122ce0: 3c2f 636f 6465 3e20 746f 2073 6565 2069 to see i │ │ │ │ +00122cf0: 6620 7468 6520 636c 6965 6e74 2061 6363 f the client acc │ │ │ │ +00122d00: 6570 7473 2063 6875 6e6b 696e 672e 204d epts chunking. M │ │ │ │ +00122d10: 6f72 6520 696e 666f 726d 6174 696f 6e20 ore information │ │ │ │ +00122d20: 6162 6f75 7420 7374 7265 616d 696e 6720 about streaming │ │ │ │ +00122d30: 6368 756e 6b65 6420 4d49 4d45 2063 616e chunked MIME can │ │ │ │ +00122d40: 2062 6520 666f 756e 6420 696e 2053 6563 be found in Sec │ │ │ │ +00122d50: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Streaming chun │ │ │ │ +00122d90: 6b65 6420 4d49 4d45 2f4d 544f 4d3c 2f61 ked MIME/MTOM ..

    .

    Note │ │ │ │ +00122db0: 2074 6861 7420 7468 6520 6578 616d 706c that the exampl │ │ │ │ +00122dc0: 6520 6162 6f76 6520 666f 7220 3c63 6f64 e above for mime_read uses a handle │ │ │ │ +00122df0: 2074 6861 7420 706f 696e 7473 2074 6f20 that points to │ │ │ │ +00122e00: 7468 6520 6f70 656e 2066 696c 6520 3c63 the open file FILE* │ │ │ │ +00122e20: 2e20 5468 6520 7369 6d70 6c65 2065 7861 . The simple exa │ │ │ │ +00122e30: 6d70 6c65 2061 626f 7665 2069 7320 6e6f mple above is no │ │ │ │ +00122e40: 7420 7265 636f 6d6d 656e 6465 6420 7768 t recommended wh │ │ │ │ +00122e50: 656e 2074 6865 2070 6c61 7466 6f72 6d20 en the platform │ │ │ │ +00122e60: 696d 706f 7365 7320 6120 6c69 6d69 7420 imposes a limit │ │ │ │ +00122e70: 6f6e 2074 6865 206e 756d 6265 7220 6f66 on the number of │ │ │ │ +00122e80: 206f 7065 6e20 6669 6c65 2064 6573 6372 open file descr │ │ │ │ +00122e90: 6970 746f 7273 2e20 596f 7520 6361 6e20 iptors. You can │ │ │ │ +00122ea0: 7573 6520 7468 6520 6861 6e64 6c65 2074 use the handle t │ │ │ │ +00122eb0: 6f20 7061 7373 2061 6c6f 6e67 206d 6f72 o pass along mor │ │ │ │ +00122ec0: 6520 696e 666f 726d 6174 696f 6e20 7468 e information th │ │ │ │ +00122ed0: 616e 206a 7573 7420 7468 6520 6669 6c65 an just the file │ │ │ │ +00122ee0: 2064 6573 6372 6970 746f 722e 2053 6f20 descriptor. So │ │ │ │ +00122ef0: 666f 7220 6578 616d 706c 652c 2077 6865 for example, whe │ │ │ │ +00122f00: 6e20 7468 6520 6e75 6d62 6572 206f 6620 n the number of │ │ │ │ +00122f10: 6f70 656e 2066 696c 6520 6465 7363 7269 open file descri │ │ │ │ +00122f20: 7074 6f72 7320 6973 206c 696d 6974 6564 ptors is limited │ │ │ │ +00122f30: 206f 6e20 796f 7572 2070 6c61 7466 6f72 on your platfor │ │ │ │ +00122f40: 6d2c 2079 6f75 2073 686f 756c 6420 6c65 m, you should le │ │ │ │ +00122f50: 7420 7468 6520 6861 6e64 6c65 2070 6f69 t the handle poi │ │ │ │ +00122f60: 6e74 2074 6f20 6120 7374 7275 6374 7572 nt to a structur │ │ │ │ +00122f70: 6520 7769 7468 2066 696c 652d 7265 6c61 e with file-rela │ │ │ │ +00122f80: 7465 6420 696e 666f 726d 6174 696f 6e2e ted information. │ │ │ │ +00122f90: 2054 6865 2043 2b2b 2065 7861 6d70 6c65 The C++ example │ │ │ │ +00122fa0: 2062 656c 6f77 2069 6c6c 7573 7472 6174 below illustrat │ │ │ │ +00122fb0: 6573 2074 6869 733a 3c2f 703e 0a3c 6469 es this:

    .
    file.xop__I │ │ │ │ +00122ff0: 6e63 6c75 6465 203d 2073 6f61 705f 6e65 nclude = soap_ne │ │ │ │ +00123000: 775f 5f78 6f70 5f5f 496e 636c 7564 6528 w__xop__Include( │ │ │ │ +00123010: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +00123040: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    file. │ │ │ │ +00123060: 786f 705f 5f49 6e63 6c75 6465 2d26 6774 xop__Include-> │ │ │ │ +00123070: 3b69 6420 3d20 4e55 4c4c 3b20 3c2f 6469 ;id = NULL; .
    file.xop__I │ │ │ │ +001230a0: 6e63 6c75 6465 2d26 6774 3b74 7970 6520 nclude->type │ │ │ │ +001230b0: 3d20 7479 7065 3b20 3c2f 6469 763e 0a3c = type;
    .< │ │ │ │ +001230c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001230d0: 3e66 696c 652e 786f 705f 5f49 6e63 6c75 >file.xop__Inclu │ │ │ │ +001230e0: 6465 2d26 6774 3b6f 7074 696f 6e73 203d de->options = │ │ │ │ +001230f0: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    . │ │ │ │ 00123110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    file.xmime5_ │ │ │ │ -00123150: 5f63 6f6e 7465 6e74 5479 7065 203d 2074 _contentType = t │ │ │ │ -00123160: 7970 653b 203c 2f64 6976 3e0a 3c64 6976 ype;
    .
    fi │ │ │ │ -00123180: 6c65 2e66 696c 656e 616d 6520 3d20 6669 le.filename = fi │ │ │ │ -00123190: 6c65 6e61 6d65 3b20 3c2f 6469 763e 0a3c lename;
    .< │ │ │ │ +00123120: 7373 3d22 6c69 6e65 223e 6669 6c65 2e78 ss="line">file.x │ │ │ │ +00123130: 6d69 6d65 355f 5f63 6f6e 7465 6e74 5479 mime5__contentTy │ │ │ │ +00123140: 7065 203d 2074 7970 653b 203c 2f64 6976 pe = type;
    .
    file.filenam │ │ │ │ +00123170: 6520 3d20 6669 6c65 6e61 6d65 3b20 3c2f e = filename; .
    .< │ │ │ │ 001231a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001231b0: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    // The object h │ │ │ │ -001231f0: 6f6c 6469 6e67 2061 6c6c 2069 6e66 6f72 olding all infor │ │ │ │ -00123200: 6d61 7469 6f6e 2074 6f20 7265 6164 2064 mation to read d │ │ │ │ -00123210: 6174 6120 3c2f 7370 616e 3e3c 2f64 6976 ata
    .
    FileStreamIn │ │ │ │ -00123240: 202a 696e 7320 3d20 3c73 7061 6e20 636c *ins = ne │ │ │ │ -00123260: 773c 2f73 7061 6e3e 2046 696c 6553 7472 w FileStr │ │ │ │ -00123270: 6561 6d49 6e28 6572 726f 7268 616e 646c eamIn(errorhandl │ │ │ │ -00123280: 6572 293b 203c 2f64 6976 3e0a 3c64 6976 er);
    .
    in │ │ │ │ -001232a0: 732d 2667 743b 7365 7446 696c 6550 6174 s->setFilePat │ │ │ │ -001232b0: 6828 3c61 2063 6c61 7373 3d22 636f 6465 h(path< │ │ │ │ -00123300: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    .i │ │ │ │ -00123320: 6e73 2d26 6774 3b73 6574 4669 6c65 4e61 ns->setFileNa │ │ │ │ -00123330: 6d65 2866 696c 656e 616d 6529 3b20 3c2f me(filename); // The ob │ │ │ │ +001231d0: 6a65 6374 2068 6f6c 6469 6e67 2061 6c6c ject holding all │ │ │ │ +001231e0: 2069 6e66 6f72 6d61 7469 6f6e 2074 6f20 information to │ │ │ │ +001231f0: 7265 6164 2064 6174 6120 3c2f 7370 616e read data
    .
    FileSt │ │ │ │ +00123220: 7265 616d 496e 202a 696e 7320 3d20 3c73 reamIn *ins = new F │ │ │ │ +00123250: 696c 6553 7472 6561 6d49 6e28 6572 726f ileStreamIn(erro │ │ │ │ +00123260: 7268 616e 646c 6572 293b 203c 2f64 6976 rhandler);
    .
    ins->setF │ │ │ │ +00123290: 696c 6550 6174 6828 3c61 2063 6c61 7373 ilePath(path); .
    ins->set │ │ │ │ +00123310: 4669 6c65 4e61 6d65 2866 696c 656e 616d FileName(filenam │ │ │ │ +00123320: 6529 3b20 3c2f 6469 763e 0a3c 6469 7620 e);
    .
    .
    .< │ │ │ │ -00123360: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00123370: 3e66 696c 652e 786f 705f 5f49 6e63 6c75 >file.xop__Inclu │ │ │ │ -00123380: 6465 2d26 6774 3b5f 5f73 697a 6520 3d20 de->__size = │ │ │ │ -00123390: 7369 7a65 3b20 3c2f 6469 763e 0a3c 6469 size;
    .f │ │ │ │ -001233b0: 696c 652e 786f 705f 5f49 6e63 6c75 6465 ile.xop__Include │ │ │ │ -001233c0: 2d26 6774 3b5f 5f70 7472 203d 2028 3c73 ->__ptr = (unsigned │ │ │ │ -001233f0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char*)i │ │ │ │ -00123420: 6e73 3b3c 2f64 6976 3e0a 3c64 6976 2063 ns;
    .
    char │ │ │ │ -001234f0: 7061 7468 5b53 4f41 505f 5441 474c 454e path[SOAP_TAGLEN │ │ │ │ -00123500: 5d3c 2f64 6976 3e3c 6469 7620 636c 6173 ]
    The cl │ │ │ │ -00123520: 6965 6e74 2072 6571 7565 7374 2070 6174 ient request pat │ │ │ │ -00123530: 6820 6173 2072 6563 6569 7665 6420 6f6e h as received on │ │ │ │ -00123540: 2074 6865 2073 6572 7665 7220 7369 6465 the server side │ │ │ │ -00123550: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ │ -00123570: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ -00123580: 736f 6170 322e 683a 3430 3332 3c2f 6469 soap2.h:4032
    .
    < │ │ │ │ -001235a0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -001235b0: 3c70 3e54 6f20 7265 6164 2074 6865 204d

    To read the M │ │ │ │ -001235c0: 544f 4d20 6461 7461 2066 6f72 2074 7261 TOM data for tra │ │ │ │ -001235d0: 6e73 6d69 7373 696f 6e3a 3c2f 703e 0a3c nsmission:

    .< │ │ │ │ -001235e0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -001235f0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    void *mi │ │ │ │ -00123630: 6d65 5f72 6561 645f 6f70 656e 283c 7370 me_read_open(struct │ │ │ │ -00123660: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -00123690: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, voi │ │ │ │ -001236e0: 643c 2f73 7061 6e3e 202a 6861 6e64 6c65 d *handle │ │ │ │ -001236f0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c │ │ │ │ -00123730: 6861 723c 2f73 7061 6e3e 202a 3c73 7061 har *id, │ │ │ │ -00123760: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ -001237a0: 6172 3c2f 7370 616e 3e20 2a74 7970 652c ar *type, │ │ │ │ -001237b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ -001237f0: 6172 3c2f 7370 616e 3e20 2a64 6573 6372 ar *descr │ │ │ │ -00123800: 6970 7469 6f6e 2920 3c2f 6469 763e 0a3c iption)
    .< │ │ │ │ +00123350: 226c 696e 6522 3e66 696c 652e 786f 705f "line">file.xop_ │ │ │ │ +00123360: 5f49 6e63 6c75 6465 2d26 6774 3b5f 5f73 _Include->__s │ │ │ │ +00123370: 697a 6520 3d20 7369 7a65 3b20 3c2f 6469 ize = size; .
    file.xop__I │ │ │ │ +001233a0: 6e63 6c75 6465 2d26 6774 3b5f 5f70 7472 nclude->__ptr │ │ │ │ +001233b0: 203d 2028 3c73 7061 6e20 636c 6173 733d = (un │ │ │ │ +001233d0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed char*)ins;
    . │ │ │ │ +00123410: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    char path[SOAP_ │ │ │ │ +001234e0: 5441 474c 454e 5d3c 2f64 6976 3e3c 6469 TAGLEN]
    │ │ │ │ +00123500: 5468 6520 636c 6965 6e74 2072 6571 7565 The client reque │ │ │ │ +00123510: 7374 2070 6174 6820 6173 2072 6563 6569 st path as recei │ │ │ │ +00123520: 7665 6420 6f6e 2074 6865 2073 6572 7665 ved on the serve │ │ │ │ +00123530: 7220 7369 6465 2e3c 2f64 6976 3e3c 6469 r side.
    │ │ │ │ +00123550: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:40 │ │ │ │ +00123570: 3332 3c2f 6469 763e 3c2f 6469 763e 0a3c 32
    .< │ │ │ │ +00123580: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To read │ │ │ │ +001235a0: 2074 6865 204d 544f 4d20 6461 7461 2066 the MTOM data f │ │ │ │ +001235b0: 6f72 2074 7261 6e73 6d69 7373 696f 6e3a or transmission: │ │ │ │ +001235c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    void *mime_read_op │ │ │ │ +00123620: 656e 283c 7370 616e 2063 6c61 7373 3d22 en(struct< │ │ │ │ +00123640: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ +00123670: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ +001236a0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, void * │ │ │ │ +001236d0: 6861 6e64 6c65 2c20 3c73 7061 6e20 636c handle, co │ │ │ │ +001236f0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ +00123720: 202a 3c73 7061 6e20 636c 6173 733d 226b *id, con │ │ │ │ +00123760: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +00123790: 2a74 7970 652c 203c 7370 616e 2063 6c61 *type, con │ │ │ │ +001237b0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +001237e0: 2a64 6573 6372 6970 7469 6f6e 2920 3c2f *description) .
    {
    .< │ │ │ │ 00123810: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00123820: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if │ │ │ │ -00123860: 2028 2168 616e 646c 6529 203c 2f64 6976 (!handle)
    .
    return │ │ │ │ -001238b0: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    . │ │ │ │ -001238d0: 2046 696c 6553 7472 6561 6d49 6e20 2a69 FileStreamIn *i │ │ │ │ -001238e0: 6e73 203d 2028 4669 6c65 5374 7265 616d ns = (FileStream │ │ │ │ -001238f0: 496e 2a29 6861 6e64 6c65 3b20 3c2f 6469 In*)handle; .
    if (!ins │ │ │ │ -00123940: 2d26 6774 3b6f 7065 6e28 2929 203c 2f64 ->open()) .
    {
    . │ │ │ │ -00123970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soa │ │ │ │ -001239b0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error = < │ │ │ │ -00123a10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00123a20: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00123a30: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ -00123a40: 6131 3237 3337 3536 3834 3161 3732 3866 a1273756841a728f │ │ │ │ -00123a50: 3033 3765 6535 3332 3865 3231 3765 6236 037ee5328e217eb6 │ │ │ │ -00123a60: 6522 3e53 4f41 505f 4552 523c 2f61 3e3b e">SOAP_ERR; │ │ │ │ -00123a70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return NULL; .
    }
    . │ │ │ │ -00123ae0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ -00123b10: 7475 726e 3c2f 7370 616e 3e20 6861 6e64 turn hand │ │ │ │ -00123b20: 6c65 3b20 3c2f 6469 763e 0a3c 6469 7620 le;
    .
    } < │ │ │ │ -00123b40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    {.
    if (!ha │ │ │ │ -00123ca0: 6e64 6c65 2920 3c2f 6469 763e 0a3c 6469 ndle)
    . │ │ │ │ -00123cc0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -00123ce0: 7572 6e3c 2f73 7061 6e3e 3b20 3c2f 6469 urn; .
    FileStrea │ │ │ │ -00123d10: 6d49 6e20 2a69 6e73 203d 2028 4669 6c65 mIn *ins = (File │ │ │ │ -00123d20: 5374 7265 616d 496e 2a29 6861 6e64 6c65 StreamIn*)handle │ │ │ │ -00123d30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    delete │ │ │ │ -00123d70: 2069 6e73 3b20 3c2f 6469 763e 0a3c 6469 ins;
    .} │ │ │ │ -00123d90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t mime_read(struct │ │ │ │ -00123e00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -00123e30: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -00123e60: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void │ │ │ │ -00123e80: 3c2f 7370 616e 3e20 2a68 616e 646c 652c *handle, │ │ │ │ -00123e90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -00123eb0: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *buf, size_t len)
    . if< │ │ │ │ +00123840: 2f73 7061 6e3e 2028 2168 616e 646c 6529 /span> (!handle) │ │ │ │ +00123850: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return NULL; .
    FileStrea │ │ │ │ +001238c0: 6d49 6e20 2a69 6e73 203d 2028 4669 6c65 mIn *ins = (File │ │ │ │ +001238d0: 5374 7265 616d 496e 2a29 6861 6e64 6c65 StreamIn*)handle │ │ │ │ +001238e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if │ │ │ │ +00123920: 2028 2169 6e73 2d26 6774 3b6f 7065 6e28 (!ins->open( │ │ │ │ +00123930: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {< │ │ │ │ +00123950: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap-> │ │ │ │ +001239a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error = SOAP_ER │ │ │ │ +00123a50: 523c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 R;
    . │ │ │ │ +00123a70: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ +00123a90: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL │ │ │ │ +00123aa0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } < │ │ │ │ +00123ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return handle;
    │ │ │ │ +00123b10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    void mime_read_cl │ │ │ │ +00123b70: 6f73 6528 3c73 7061 6e20 636c 6173 733d ose(struct │ │ │ │ +00123b90: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ +00123bc0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ +00123bf0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, void │ │ │ │ +00123c20: 2a68 616e 646c 6529 203c 2f64 6976 3e0a *handle)
    . │ │ │ │ +00123c30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    if (!handle) .
    return │ │ │ │ +00123cd0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    Fil │ │ │ │ +00123cf0: 6553 7472 6561 6d49 6e20 2a69 6e73 203d eStreamIn *ins = │ │ │ │ +00123d00: 2028 4669 6c65 5374 7265 616d 496e 2a29 (FileStreamIn*) │ │ │ │ +00123d10: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .< │ │ │ │ +00123d20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00123d30: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > delete< │ │ │ │ +00123d50: 2f73 7061 6e3e 2069 6e73 3b20 3c2f 6469 /span> ins; .
    }
    . │ │ │ │ +00123d90: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +00123db0: 3c2f 7370 616e 3e20 6d69 6d65 5f72 6561 mime_rea │ │ │ │ +00123dc0: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa │ │ │ │ +00123e10: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +00123e40: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, void *h │ │ │ │ +00123e70: 616e 646c 652c 203c 7370 616e 2063 6c61 andle, char *buf, │ │ │ │ +00123ef0: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +00123f10: 3c2f 7370 616e 3e20 6c65 6e29 203c 2f64 len) .
    {
    . │ │ │ │ -00123f50: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if │ │ │ │ -00123f90: 2821 6861 6e64 6c65 2920 3c2f 6469 763e (!handle)
    │ │ │ │ -00123fa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return 0 │ │ │ │ -00123fe0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    Fil │ │ │ │ -00124000: 6553 7472 6561 6d49 6e20 2a69 6e73 203d eStreamIn *ins = │ │ │ │ -00124010: 2028 4669 6c65 5374 7265 616d 496e 2a29 (FileStreamIn*) │ │ │ │ -00124020: 6861 6e64 6c65 3b20 3c2f 6469 763e 0a3c handle;
    .< │ │ │ │ -00124030: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00124040: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > siz │ │ │ │ -00124060: 655f 743c 2f73 7061 6e3e 206e 7265 6164 e_t nread │ │ │ │ -00124070: 203d 2069 6e73 2d26 6774 3b72 6561 6428 = ins->read( │ │ │ │ -00124080: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf │ │ │ │ -001240d0: 2c20 6c65 6e29 3b20 3c2f 6469 763e 0a3c , len);
    .< │ │ │ │ -001240e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001240f0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ -00124110: 2f73 7061 6e3e 2028 696e 732d 2667 743b /span> (ins-> │ │ │ │ -00124120: 7374 7265 616d 4572 726f 7228 2929 203c streamError()) < │ │ │ │ -00124130: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .
    s │ │ │ │ -00124190: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error = │ │ │ │ -001241f0: 2069 6e73 2d26 6774 3b73 7472 6561 6d45 ins->streamE │ │ │ │ -00124200: 7272 6f72 2829 3b20 3c2f 6469 763e 0a3c rror();
    .< │ │ │ │ -00124210: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00124220: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r │ │ │ │ -00124240: 6574 7572 6e3c 2f73 7061 6e3e 2030 3b20 eturn 0; │ │ │ │ -00124250: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    return │ │ │ │ -001242b0: 6e72 6561 643b 203c 2f64 6976 3e0a 3c64 nread;
    . │ │ │ │ -001242d0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ -00124340: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_ERR< │ │ │ │ -00124390: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    #de │ │ │ │ -001243b0: 6669 6e65 2053 4f41 505f 4552 523c 2f64 fine SOAP_ERR
    A soap_sta │ │ │ │ -001243e0: 7475 7320 6572 726f 7220 636f 6465 3a20 tus error code: │ │ │ │ -001243f0: 616e 2075 6e73 7065 6369 6669 6564 2065 an unspecified e │ │ │ │ -00124400: 7272 6f72 206f 6363 7572 7265 642e 3c2f rror occurred.
    Defini │ │ │ │ -00124430: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ -00124440: 7032 2e68 3a32 3337 343c 2f64 6976 3e3c p2.h:2374
    < │ │ │ │ -00124450: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -00124470: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -00124490: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    │ │ │ │ -001244d0: 3c2f 613e 0a52 6564 6972 6563 7469 6e67 .Redirecting │ │ │ │ -001244e0: 2069 6e62 6f75 6e64 204d 494d 452f 4d54 inbound MIME/MT │ │ │ │ -001244f0: 4f4d 2073 7472 6561 6d73 2062 6173 6564 OM streams based │ │ │ │ -00124500: 206f 6e20 534f 4150 2062 6f64 7920 636f on SOAP body co │ │ │ │ -00124510: 6e74 656e 743c 2f68 323e 0a3c 703e 5768 ntent

    .

    Wh │ │ │ │ -00124520: 656e 2069 7420 6973 2070 7265 6665 7261 en it is prefera │ │ │ │ -00124530: 626c 6520 6f72 2072 6571 7569 7265 6420 ble or required │ │ │ │ -00124540: 746f 2072 6564 6972 6563 7420 696e 626f to redirect inbo │ │ │ │ -00124550: 756e 6420 4d49 4d45 2f4d 544f 4d20 6174 und MIME/MTOM at │ │ │ │ -00124560: 7461 6368 6d65 6e74 2073 7472 6561 6d73 tachment streams │ │ │ │ -00124570: 2062 6173 6564 206f 6e20 534f 4150 206d based on SOAP m │ │ │ │ -00124580: 6573 7361 6765 2062 6f64 7920 636f 6e74 essage body cont │ │ │ │ -00124590: 656e 742c 2077 6865 7265 2066 6f72 2065 ent, where for e │ │ │ │ -001245a0: 7861 6d70 6c65 2074 6865 206e 616d 6573 xample the names │ │ │ │ -001245b0: 206f 6620 7468 6520 7265 736f 7572 6365 of the resource │ │ │ │ -001245c0: 7320 6172 6520 6c69 7374 6564 2069 6e20 s are listed in │ │ │ │ -001245d0: 7468 6520 534f 4150 206d 6573 7361 6765 the SOAP message │ │ │ │ -001245e0: 2062 6f64 792c 2061 6e20 616c 7465 726e body, an altern │ │ │ │ -001245f0: 6174 6976 6520 6d65 6368 616e 6973 6d20 ative mechanism │ │ │ │ -00124600: 6d75 7374 2062 6520 7573 6564 2074 6f20 must be used to │ │ │ │ -00124610: 6861 6e64 6c65 2074 6865 2061 7474 6163 handle the attac │ │ │ │ -00124620: 686d 656e 7473 2e20 5468 6973 206d 6563 hments. This mec │ │ │ │ -00124630: 6861 6e69 736d 2063 616e 2062 6520 7573 hanism can be us │ │ │ │ -00124640: 6564 2061 7420 7468 6520 636c 6965 6e74 ed at the client │ │ │ │ -00124650: 2061 6e64 2073 6572 7665 7220 7369 6465 and server side │ │ │ │ -00124660: 2e3c 2f70 3e0a 3c70 3e42 6563 6175 7365 .

    .

    Because │ │ │ │ -00124670: 2074 6865 2072 6f75 7469 6e67 206f 6620 the routing of │ │ │ │ -00124680: 7468 6520 7374 7265 616d 7320 6973 2061 the streams is a │ │ │ │ -00124690: 6363 6f6d 706c 6973 6865 6420 7769 7468 ccomplished with │ │ │ │ -001246a0: 2065 7870 6c69 6369 7420 6675 6e63 7469 explicit functi │ │ │ │ -001246b0: 6f6e 2063 616c 6c73 2c20 7468 6973 206d on calls, this m │ │ │ │ -001246c0: 6574 686f 6420 7368 6f75 6c64 206f 6e6c ethod should onl │ │ │ │ -001246d0: 7920 6265 2075 7365 6420 7768 656e 2072 y be used when r │ │ │ │ -001246e0: 6571 7569 7265 6420 616e 6420 7368 6f75 equired and shou │ │ │ │ -001246f0: 6c64 206e 6f74 2062 6520 636f 6e73 6964 ld not be consid │ │ │ │ -00124700: 6572 6564 206f 7074 696f 6e61 6c2e 2054 ered optional. T │ │ │ │ -00124710: 6861 7420 6973 2c20 7768 656e 2079 6f75 hat is, when you │ │ │ │ -00124720: 2065 6e61 626c 6520 7468 6973 206d 6574 enable this met │ │ │ │ -00124730: 686f 642c 2079 6f75 206d 7573 7420 6368 hod, you must ch │ │ │ │ -00124740: 6563 6b20 666f 7220 7065 6e64 696e 6720 eck for pending │ │ │ │ -00124750: 4d49 4d45 2f4d 544f 4d20 6174 7461 6368 MIME/MTOM attach │ │ │ │ -00124760: 6d65 6e74 7320 616e 6420 6861 6e64 6c65 ments and handle │ │ │ │ -00124770: 2074 6865 6d20 6170 7072 6f70 7269 6174 them appropriat │ │ │ │ -00124780: 656c 792e 2054 6869 7320 6973 2074 7275 ely. This is tru │ │ │ │ -00124790: 6520 6576 656e 2077 6865 6e20 796f 7520 e even when you │ │ │ │ -001247a0: 646f 6e27 7420 6578 7065 6374 204d 494d don't expect MIM │ │ │ │ -001247b0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen │ │ │ │ -001247c0: 7473 2069 6e20 7468 6520 7061 796c 6f61 ts in the payloa │ │ │ │ -001247d0: 642c 2062 6563 6175 7365 2074 6865 2070 d, because the p │ │ │ │ -001247e0: 6565 7220 6d61 7920 7472 6963 6b20 796f eer may trick yo │ │ │ │ -001247f0: 7520 6279 2073 656e 6469 6e67 2061 7474 u by sending att │ │ │ │ -00124800: 6163 686d 656e 7473 2061 6e79 7761 7920 achments anyway │ │ │ │ -00124810: 616e 6420 796f 7520 7368 6f75 6c64 2062 and you should b │ │ │ │ -00124820: 6520 7072 6570 6172 6564 2074 6f20 6163 e prepared to ac │ │ │ │ -00124830: 6365 7074 206f 7220 7265 6a65 6374 2074 cept or reject t │ │ │ │ -00124840: 6865 6d2e 3c2f 703e 0a3c 703e 5468 6520 hem.

    .

    The │ │ │ │ -00124850: 6578 706c 6963 6974 204d 494d 452f 4d54 explicit MIME/MT │ │ │ │ -00124860: 4f4d 2073 7472 6561 6d69 6e67 206d 6563 OM streaming mec │ │ │ │ -00124870: 6861 6e69 736d 2063 6f6e 7369 7374 7320 hanism consists │ │ │ │ -00124880: 6f66 2074 6872 6565 2041 5049 2066 756e of three API fun │ │ │ │ -00124890: 6374 696f 6e73 3a3c 2f70 3e0a 3c75 6c3e ctions:

    .
      │ │ │ │ -001248a0: 0a3c 6c69 3e3c 636f 6465 3e76 6f69 6420 .
    • void │ │ │ │ -001248b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_po │ │ │ │ -00124940: 7374 5f63 6865 636b 5f6d 696d 655f 6174 st_check_mime_at │ │ │ │ -00124950: 7461 6368 6d65 6e74 7328 7374 7275 6374 tachments(struct │ │ │ │ -00124960: 2073 6f61 7020 2a73 6f61 7029 3c2f 613e soap *soap) │ │ │ │ -00124970: 3c2f 636f 6465 3e20 5468 6973 2066 756e This fun │ │ │ │ -00124980: 6374 696f 6e20 656e 6162 6c65 7320 706f ction enables po │ │ │ │ -00124990: 7374 2d70 726f 6365 7373 696e 6720 6f66 st-processing of │ │ │ │ -001249a0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac │ │ │ │ -001249b0: 686d 656e 7473 2072 6563 6569 7665 642e hments received. │ │ │ │ -001249c0: 2054 6869 7320 6d65 616e 7320 7468 6174 This means that │ │ │ │ -001249d0: 2074 6865 2070 7265 7365 6e63 6520 6f66 the presence of │ │ │ │ -001249e0: 204d 494d 452f 4d54 4f4d 2061 7474 6163 MIME/MTOM attac │ │ │ │ -001249f0: 686d 656e 7473 206d 7573 7420 6265 2065 hments must be e │ │ │ │ -00124a00: 7870 6c69 6369 746c 7920 6368 6563 6b65 xplicitly checke │ │ │ │ -00124a10: 6420 6279 2063 616c 6c69 6e67 203c 636f d by calling soa │ │ │ │ -00124aa0: 705f 6368 6563 6b5f 6d69 6d65 5f61 7474 p_check_mime_att │ │ │ │ -00124ab0: 6163 686d 656e 7473 3c2f 613e 3c2f 636f achments after the me │ │ │ │ -00124ad0: 7373 6167 6520 7761 7320 7265 6365 6976 ssage was receiv │ │ │ │ -00124ae0: 6564 2e20 5768 656e 2074 6869 7320 6675 ed. When this fu │ │ │ │ -00124af0: 6e63 7469 6f6e 2072 6574 7572 6e73 206e nction returns n │ │ │ │ -00124b00: 6f6e 7a65 726f 2028 7472 7565 292c 2074 onzero (true), t │ │ │ │ -00124b10: 6865 6e20 7468 6520 6174 7461 6368 6d65 hen the attachme │ │ │ │ -00124b20: 6e74 7320 6361 6e20 6265 2072 6574 7269 nts can be retri │ │ │ │ -00124b30: 6576 6564 2062 7920 6361 6c6c 696e 6720 eved by calling │ │ │ │ -00124b40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_r │ │ │ │ -00124bc0: 6563 765f 6d69 6d65 5f61 7474 6163 686d ecv_mime_attachm │ │ │ │ -00124bd0: 656e 743c 2f61 3e3c 2f63 6f64 653e 2072 ent r │ │ │ │ -00124be0: 6570 6561 7465 646c 7920 746f 2072 6574 epeatedly to ret │ │ │ │ -00124bf0: 7269 6576 6520 6561 6368 2061 7474 6163 rieve each attac │ │ │ │ -00124c00: 686d 656e 7420 756e 7469 6c20 7468 6973 hment until this │ │ │ │ -00124c10: 2066 756e 6374 696f 6e20 7265 7475 726e function return │ │ │ │ -00124c20: 7320 4e55 4c4c 2e20 5468 6973 2066 756e s NULL. This fun │ │ │ │ -00124c30: 6374 696f 6e20 7265 7475 726e 7320 6120 ction returns a │ │ │ │ -00124c40: 706f 696e 7465 7220 746f 2061 203c 636f pointer to a struct soap_mu │ │ │ │ -00124cd0: 6c74 6970 6172 743c 2f61 3e3c 2f63 6f64 ltipart attachment..
    • in │ │ │ │ -00124d00: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t soap │ │ │ │ -00124d80: 5f63 6865 636b 5f6d 696d 655f 6174 7461 _check_mime_atta │ │ │ │ -00124d90: 6368 6d65 6e74 7328 7374 7275 6374 2073 chments(struct s │ │ │ │ -00124da0: 6f61 7020 2a73 6f61 7029 3c2f 613e 3c2f oap *soap) This funct │ │ │ │ -00124dc0: 696f 6e20 6368 6563 6b73 2074 6865 2070 ion checks the p │ │ │ │ -00124dd0: 7265 7365 6e63 6520 6f66 2061 204d 494d resence of a MIM │ │ │ │ -00124de0: 452f 4d54 4f4d 2061 7474 6163 686d 656e E/MTOM attachmen │ │ │ │ -00124df0: 7420 6166 7465 7220 6361 6c6c 696e 6720 t after calling │ │ │ │ -00124e00: 6120 7365 7276 6963 6520 6f70 6572 6174 a service operat │ │ │ │ -00124e10: 696f 6e20 6279 2072 6574 7572 6e69 6e67 ion by returning │ │ │ │ -00124e20: 206e 6f6e 7a65 726f 2077 6865 6e20 6174 nonzero when at │ │ │ │ -00124e30: 7461 6368 6d65 6e74 7320 6172 6520 7072 tachments are pr │ │ │ │ -00124e40: 6573 656e 742e 2052 6574 7572 6e73 206e esent. Returns n │ │ │ │ -00124e50: 6f6e 7a65 726f 2069 6620 6174 7461 6368 onzero if attach │ │ │ │ -00124e60: 6d65 6e74 7320 6172 6520 7072 6573 656e ments are presen │ │ │ │ -00124e70: 742e 2052 6571 7569 7265 7320 3c63 6f64 t. Requires soap_ │ │ │ │ -00124f10: 706f 7374 5f63 6865 636b 5f6d 696d 655f post_check_mime_ │ │ │ │ -00124f20: 6174 7461 6368 6d65 6e74 733c 2f61 3e3c attachments< │ │ │ │ -00124f30: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 6c69 /code>.
    • .
    • struct soa │ │ │ │ -00124fc0: 705f 6d75 6c74 6970 6172 743c 2f61 3e20 p_multipart │ │ │ │ -00124fd0: 2a73 6f61 705f 7265 6376 5f6d 696d 655f *soap_recv_mime_ │ │ │ │ -00124fe0: 6174 7461 6368 6d65 6e74 2873 7472 7563 attachment(struc │ │ │ │ -00124ff0: 7420 736f 6170 202a 736f 6170 2c20 766f t soap *soap, vo │ │ │ │ -00125000: 6964 202a 6861 6e64 6c65 293c 2f63 6f64 id *handle) This function │ │ │ │ -00125020: 2070 6172 7365 7320 616e 2061 7474 6163 parses an attac │ │ │ │ -00125030: 686d 656e 7420 616e 6420 696e 766f 6b65 hment and invoke │ │ │ │ -00125040: 7320 7468 6520 4d49 4d45 2063 616c 6c62 s the MIME callb │ │ │ │ -00125050: 6163 6b73 2077 6865 6e20 7365 742e 2054 acks when set. T │ │ │ │ -00125060: 6865 203c 636f 6465 3e68 616e 646c 653c he handle< │ │ │ │ -00125070: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter │ │ │ │ -00125080: 2069 7320 7061 7373 6564 2074 6f20 3c63 is passed to fmimewriteop │ │ │ │ -001250a0: 656e 3c2f 636f 6465 3e2e 2054 6865 2068 en. The h │ │ │ │ -001250b0: 616e 646c 6520 6d61 7920 636f 6e74 6169 andle may contai │ │ │ │ -001250c0: 6e20 616e 7920 6461 7461 2074 6861 7420 n any data that │ │ │ │ -001250d0: 6973 2065 7874 7261 6374 6564 2066 726f is extracted fro │ │ │ │ -001250e0: 6d20 7468 6520 534f 4150 206d 6573 7361 m the SOAP messa │ │ │ │ -001250f0: 6765 2062 6f64 7920 746f 2067 7569 6465 ge body to guide │ │ │ │ -00125100: 2074 6865 2072 6564 6972 6563 7469 6f6e the redirection │ │ │ │ -00125110: 206f 6620 7468 6520 7374 7265 616d 2069 of the stream i │ │ │ │ -00125120: 6e20 7468 6520 6361 6c6c 6261 636b 732e n the callbacks. │ │ │ │ -00125130: 2052 6574 7572 6e73 2061 2073 7472 7563 Returns a struc │ │ │ │ -00125140: 7420 7769 7468 2061 203c 636f 6465 3e63 t with a c │ │ │ │ -00125150: 6861 7220 2a70 7472 3c2f 636f 6465 3e20 har *ptr │ │ │ │ -00125160: 6d65 6d62 6572 2074 6861 7420 636f 6e74 member that cont │ │ │ │ -00125170: 6169 6e73 2074 6865 2068 616e 646c 6520 ains the handle │ │ │ │ -00125180: 7661 6c75 6520 7265 7475 726e 6564 2062 value returned b │ │ │ │ -00125190: 7920 7468 6520 3c63 6f64 653e 666d 696d y the fmim │ │ │ │ -001251a0: 6577 7269 7465 6f70 656e 3c2f 636f 6465 ewriteopen callback, and │ │ │ │ -001251c0: 3c63 6f64 653e 6368 6172 202a 6964 3c2f char *id, cha │ │ │ │ -001251e0: 7220 2a74 7970 653c 2f63 6f64 653e 2c20 r *type, │ │ │ │ -001251f0: 616e 6420 3c63 6f64 653e 6368 6172 202a and char * │ │ │ │ -00125200: 6465 7363 7269 7074 696f 6e3c 2f63 6f64 description member variab │ │ │ │ -00125220: 6c65 7320 7769 7468 2074 6865 204d 494d les with the MIM │ │ │ │ -00125230: 4520 6964 2c20 7479 7065 2c20 616e 6420 E id, type, and │ │ │ │ -00125240: 6465 7363 7269 7074 696f 6e20 696e 666f description info │ │ │ │ -00125250: 2077 6865 6e20 7072 6573 656e 7420 696e when present in │ │ │ │ -00125260: 2074 6865 2061 7474 6163 686d 656e 742e the attachment. │ │ │ │ -00125270: 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 3e45
    • .
    .

    E │ │ │ │ -00125280: 7861 6d70 6c65 2063 6c69 656e 7420 696e xample client in │ │ │ │ -00125290: 2043 3a3c 2f70 3e0a 3c64 6976 2063 6c61 C:

    .
    .
    soap │ │ │ │ -00125480: 5f70 6f73 745f 6368 6563 6b5f 6d69 6d65 _post_check_mime │ │ │ │ -00125490: 5f61 7474 6163 686d 656e 7473 3c2f 613e _attachments │ │ │ │ -001254a0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001254d0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    if │ │ │ │ -00125510: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f6d (soap_call_ns__m │ │ │ │ -00125520: 794d 6574 686f 6428 3c61 2063 6c61 7373 yMethod(s │ │ │ │ -00125550: 6f61 703c 2f61 3e2c 202e 2e2e 2929 203c oap, ...)) < │ │ │ │ +00123f50: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!handle) │ │ │ │ +00123f80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 0;
    .< │ │ │ │ +00123fd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00123fe0: 3e20 2046 696c 6553 7472 6561 6d49 6e20 > FileStreamIn │ │ │ │ +00123ff0: 2a69 6e73 203d 2028 4669 6c65 5374 7265 *ins = (FileStre │ │ │ │ +00124000: 616d 496e 2a29 6861 6e64 6c65 3b20 3c2f amIn*)handle; .
    size_t │ │ │ │ +00124050: 206e 7265 6164 203d 2069 6e73 2d26 6774 nread = ins-> │ │ │ │ +00124060: 3b72 6561 6428 3c61 2063 6c61 7373 3d22 ;read(b │ │ │ │ +001240b0: 7566 3c2f 613e 2c20 6c65 6e29 3b20 3c2f uf, len); .
    if (in │ │ │ │ +00124100: 732d 2667 743b 7374 7265 616d 4572 726f s->streamErro │ │ │ │ +00124110: 7228 2929 203c 2f64 6976 3e0a 3c64 6976 r())
    .
    │ │ │ │ +00124130: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap-&g │ │ │ │ +00124180: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error │ │ │ │ +001241d0: 3c2f 613e 203d 2069 6e73 2d26 6774 3b73 = ins->s │ │ │ │ +001241e0: 7472 6561 6d45 7272 6f72 2829 3b20 3c2f treamError(); .
    return 0;
    . │ │ │ │ +00124250: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    return nread; .
    }
    .< │ │ │ │ +00124380: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00124390: 6922 3e23 6465 6669 6e65 2053 4f41 505f i">#define SOAP_ │ │ │ │ +001243a0: 4552 523c 2f64 6976 3e3c 6469 7620 636c ERR
    A so │ │ │ │ +001243c0: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error │ │ │ │ +001243d0: 636f 6465 3a20 616e 2075 6e73 7065 6369 code: an unspeci │ │ │ │ +001243e0: 6669 6564 2065 7272 6f72 206f 6363 7572 fied error occur │ │ │ │ +001243f0: 7265 642e 3c2f 6469 763e 3c64 6976 2063 red.
    │ │ │ │ +00124410: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ +00124420: 7374 6473 6f61 7032 2e68 3a32 3337 343c stdsoap2.h:2374< │ │ │ │ +00124430: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    .... Back to t │ │ │ │ +00124470: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +00124480: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Redir │ │ │ │ +001244c0: 6563 7469 6e67 2069 6e62 6f75 6e64 204d ecting inbound M │ │ │ │ +001244d0: 494d 452f 4d54 4f4d 2073 7472 6561 6d73 IME/MTOM streams │ │ │ │ +001244e0: 2062 6173 6564 206f 6e20 534f 4150 2062 based on SOAP b │ │ │ │ +001244f0: 6f64 7920 636f 6e74 656e 743c 2f68 323e ody content

    │ │ │ │ +00124500: 0a3c 703e 5768 656e 2069 7420 6973 2070 .

    When it is p │ │ │ │ +00124510: 7265 6665 7261 626c 6520 6f72 2072 6571 referable or req │ │ │ │ +00124520: 7569 7265 6420 746f 2072 6564 6972 6563 uired to redirec │ │ │ │ +00124530: 7420 696e 626f 756e 6420 4d49 4d45 2f4d t inbound MIME/M │ │ │ │ +00124540: 544f 4d20 6174 7461 6368 6d65 6e74 2073 TOM attachment s │ │ │ │ +00124550: 7472 6561 6d73 2062 6173 6564 206f 6e20 treams based on │ │ │ │ +00124560: 534f 4150 206d 6573 7361 6765 2062 6f64 SOAP message bod │ │ │ │ +00124570: 7920 636f 6e74 656e 742c 2077 6865 7265 y content, where │ │ │ │ +00124580: 2066 6f72 2065 7861 6d70 6c65 2074 6865 for example the │ │ │ │ +00124590: 206e 616d 6573 206f 6620 7468 6520 7265 names of the re │ │ │ │ +001245a0: 736f 7572 6365 7320 6172 6520 6c69 7374 sources are list │ │ │ │ +001245b0: 6564 2069 6e20 7468 6520 534f 4150 206d ed in the SOAP m │ │ │ │ +001245c0: 6573 7361 6765 2062 6f64 792c 2061 6e20 essage body, an │ │ │ │ +001245d0: 616c 7465 726e 6174 6976 6520 6d65 6368 alternative mech │ │ │ │ +001245e0: 616e 6973 6d20 6d75 7374 2062 6520 7573 anism must be us │ │ │ │ +001245f0: 6564 2074 6f20 6861 6e64 6c65 2074 6865 ed to handle the │ │ │ │ +00124600: 2061 7474 6163 686d 656e 7473 2e20 5468 attachments. Th │ │ │ │ +00124610: 6973 206d 6563 6861 6e69 736d 2063 616e is mechanism can │ │ │ │ +00124620: 2062 6520 7573 6564 2061 7420 7468 6520 be used at the │ │ │ │ +00124630: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve │ │ │ │ +00124640: 7220 7369 6465 2e3c 2f70 3e0a 3c70 3e42 r side.

    .

    B │ │ │ │ +00124650: 6563 6175 7365 2074 6865 2072 6f75 7469 ecause the routi │ │ │ │ +00124660: 6e67 206f 6620 7468 6520 7374 7265 616d ng of the stream │ │ │ │ +00124670: 7320 6973 2061 6363 6f6d 706c 6973 6865 s is accomplishe │ │ │ │ +00124680: 6420 7769 7468 2065 7870 6c69 6369 7420 d with explicit │ │ │ │ +00124690: 6675 6e63 7469 6f6e 2063 616c 6c73 2c20 function calls, │ │ │ │ +001246a0: 7468 6973 206d 6574 686f 6420 7368 6f75 this method shou │ │ │ │ +001246b0: 6c64 206f 6e6c 7920 6265 2075 7365 6420 ld only be used │ │ │ │ +001246c0: 7768 656e 2072 6571 7569 7265 6420 616e when required an │ │ │ │ +001246d0: 6420 7368 6f75 6c64 206e 6f74 2062 6520 d should not be │ │ │ │ +001246e0: 636f 6e73 6964 6572 6564 206f 7074 696f considered optio │ │ │ │ +001246f0: 6e61 6c2e 2054 6861 7420 6973 2c20 7768 nal. That is, wh │ │ │ │ +00124700: 656e 2079 6f75 2065 6e61 626c 6520 7468 en you enable th │ │ │ │ +00124710: 6973 206d 6574 686f 642c 2079 6f75 206d is method, you m │ │ │ │ +00124720: 7573 7420 6368 6563 6b20 666f 7220 7065 ust check for pe │ │ │ │ +00124730: 6e64 696e 6720 4d49 4d45 2f4d 544f 4d20 nding MIME/MTOM │ │ │ │ +00124740: 6174 7461 6368 6d65 6e74 7320 616e 6420 attachments and │ │ │ │ +00124750: 6861 6e64 6c65 2074 6865 6d20 6170 7072 handle them appr │ │ │ │ +00124760: 6f70 7269 6174 656c 792e 2054 6869 7320 opriately. This │ │ │ │ +00124770: 6973 2074 7275 6520 6576 656e 2077 6865 is true even whe │ │ │ │ +00124780: 6e20 796f 7520 646f 6e27 7420 6578 7065 n you don't expe │ │ │ │ +00124790: 6374 204d 494d 452f 4d54 4f4d 2061 7474 ct MIME/MTOM att │ │ │ │ +001247a0: 6163 686d 656e 7473 2069 6e20 7468 6520 achments in the │ │ │ │ +001247b0: 7061 796c 6f61 642c 2062 6563 6175 7365 payload, because │ │ │ │ +001247c0: 2074 6865 2070 6565 7220 6d61 7920 7472 the peer may tr │ │ │ │ +001247d0: 6963 6b20 796f 7520 6279 2073 656e 6469 ick you by sendi │ │ │ │ +001247e0: 6e67 2061 7474 6163 686d 656e 7473 2061 ng attachments a │ │ │ │ +001247f0: 6e79 7761 7920 616e 6420 796f 7520 7368 nyway and you sh │ │ │ │ +00124800: 6f75 6c64 2062 6520 7072 6570 6172 6564 ould be prepared │ │ │ │ +00124810: 2074 6f20 6163 6365 7074 206f 7220 7265 to accept or re │ │ │ │ +00124820: 6a65 6374 2074 6865 6d2e 3c2f 703e 0a3c ject them.

    .< │ │ │ │ +00124830: 703e 5468 6520 6578 706c 6963 6974 204d p>The explicit M │ │ │ │ +00124840: 494d 452f 4d54 4f4d 2073 7472 6561 6d69 IME/MTOM streami │ │ │ │ +00124850: 6e67 206d 6563 6861 6e69 736d 2063 6f6e ng mechanism con │ │ │ │ +00124860: 7369 7374 7320 6f66 2074 6872 6565 2041 sists of three A │ │ │ │ +00124870: 5049 2066 756e 6374 696f 6e73 3a3c 2f70 PI functions:

    .
    .

    Example cli │ │ │ │ +00125270: 656e 7420 696e 2043 3a3c 2f70 3e0a 3c64 ent in C:

    .
    stru │ │ │ │ +001252c0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new1( │ │ │ │ +00125390: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_ENC_MTOM │ │ │ │ +001253f0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    . │ │ │ │ +00125410: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_post_chec │ │ │ │ +00125470: 6b5f 6d69 6d65 5f61 7474 6163 686d 656e k_mime_attachmen │ │ │ │ +00125480: 7473 3c2f 613e 283c 6120 636c 6173 733d ts(so │ │ │ │ +001254b0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    . │ │ │ │ +001254c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (soap_call │ │ │ │ +00125500: 5f6e 735f 5f6d 794d 6574 686f 6428 3c61 _ns__myMethod(soap, . │ │ │ │ +00125540: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    .
    {< │ │ │ │ 00125560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -00125580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_prin │ │ │ │ -001255f0: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std │ │ │ │ -00125630: 6572 7229 3b20 3c73 7061 6e20 636c 6173 err); // a │ │ │ │ -00125650: 6e20 6572 726f 7220 6f63 6375 7272 6564 n error occurred │ │ │ │ -00125660: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00125570: 3d22 6c69 6e65 223e 2020 3c61 2063 6c61 ="line"> soa │ │ │ │ +001255d0: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(soap, stderr); // an error oc │ │ │ │ +00125640: 6375 7272 6564 203c 2f73 7061 6e3e 3c2f curred .
    }
    .< │ │ │ │ 00125670: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00125680: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    else │ │ │ │ -001256c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    │ │ │ │ -00125710: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soa │ │ │ │ -00125770: 705f 6368 6563 6b5f 6d69 6d65 5f61 7474 p_check_mime_att │ │ │ │ -00125780: 6163 686d 656e 7473 3c2f 613e 283c 6120 achments(soap)).
    {
    │ │ │ │ -001257e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // │ │ │ │ -00125810: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are │ │ │ │ -00125820: 7072 6573 656e 742c 2063 6861 6e6e 656c present, channel │ │ │ │ -00125830: 2069 7320 7374 696c 6c20 6f70 656e 203c is still open < │ │ │ │ -00125840: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -00125860: 2020 203c 7370 616e 2063 6c61 7373 3d22 do< │ │ │ │ -00125880: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -001258a0: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    │ │ │ │ -001258c0: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // │ │ │ │ -001258e0: 6765 7420 6461 7461 2026 2333 393b 6861 get data 'ha │ │ │ │ -001258f0: 6e64 6c65 2623 3339 3b20 6672 6f6d 2053 ndle' from S │ │ │ │ -00125900: 4f41 5020 7265 7370 6f6e 7365 2061 6e64 OAP response and │ │ │ │ -00125910: 2070 6173 7320 746f 2063 616c 6c62 6163 pass to callbac │ │ │ │ -00125920: 6b73 203c 2f73 7061 6e3e 3c2f 6469 763e ks
    │ │ │ │ -00125930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // set the fm │ │ │ │ -00125970: 696d 6520 6361 6c6c 6261 636b 732c 2069 ime callbacks, i │ │ │ │ -00125980: 6620 6e65 6564 6564 203c 2f73 7061 6e3e f needed │ │ │ │ -00125990: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -001259b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001259c0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap_multip │ │ │ │ -00125a10: 6172 743c 2f61 3e20 2a63 6f6e 7465 6e74 art *content │ │ │ │ -00125a20: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_recv_m │ │ │ │ -00125a80: 696d 655f 6174 7461 6368 6d65 6e74 3c2f ime_attachment(soap, (v │ │ │ │ -00125ae0: 6f69 643c 2f73 7061 6e3e 2a29 6861 6e64 oid*)hand │ │ │ │ -00125af0: 6c65 293b 203c 2f64 6976 3e0a 3c64 6976 le);
    ..
    } while │ │ │ │ -00125dc0: 2028 636f 6e74 656e 7429 3b20 3c2f 6469 (content); .
    if (soap-&g │ │ │ │ -00125e40: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;error │ │ │ │ -00125e90: 3c2f 613e 2920 3c2f 6469 763e 0a3c 6469 )
    . │ │ │ │ -00125eb0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri │ │ │ │ -00125f10: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st │ │ │ │ -00125f50: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
    . │ │ │ │ -00125f70: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    } .
    soap │ │ │ │ -00126000: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); < │ │ │ │ -00126040: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ -001260b0: 705f 656e 643c 2f61 3e28 3c61 2063 6c61 p_end(soap); .. │ │ │ │ -001261a0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    struct soap_mu │ │ │ │ -00126290: 6c74 6970 6172 7420 2a20 736f 6170 5f72 ltipart * soap_r │ │ │ │ -001262a0: 6563 765f 6d69 6d65 5f61 7474 6163 686d ecv_mime_attachm │ │ │ │ -001262b0: 656e 7428 7374 7275 6374 2073 6f61 7020 ent(struct soap │ │ │ │ -001262c0: 2a73 6f61 702c 2076 6f69 6420 2a68 616e *soap, void *han │ │ │ │ -001262d0: 646c 6529 3c2f 6469 763e 3c64 6976 2063 dle)
    Get │ │ │ │ -001262f0: 2061 204d 494d 452f 4d54 4f4d 2061 7474 a MIME/MTOM att │ │ │ │ -00126300: 6163 686d 656e 742e 3c2f 6469 763e 3c2f achment.
    .
    in │ │ │ │ -00126400: 7420 736f 6170 5f70 6f73 745f 6368 6563 t soap_post_chec │ │ │ │ -00126410: 6b5f 6d69 6d65 5f61 7474 6163 686d 656e k_mime_attachmen │ │ │ │ -00126420: 7473 2873 7472 7563 7420 736f 6170 202a ts(struct soap * │ │ │ │ -00126430: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    En │ │ │ │ -00126450: 6162 6c65 2070 6f73 742d 7072 6f63 6573 able post-proces │ │ │ │ -00126460: 7369 6e67 206f 6620 4d49 4d45 2f4d 544f sing of MIME/MTO │ │ │ │ -00126470: 4d20 6174 7461 6368 6d65 6e74 732e 3c2f M attachments.
    .
    i │ │ │ │ -00126570: 6e74 2073 6f61 705f 6368 6563 6b5f 6d69 nt soap_check_mi │ │ │ │ -00126580: 6d65 5f61 7474 6163 686d 656e 7473 2873 me_attachments(s │ │ │ │ -00126590: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -001265a0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Check │ │ │ │ -001265c0: 666f 7220 6120 4d49 4d45 2f4d 544f 4d20 for a MIME/MTOM │ │ │ │ -001265d0: 6174 7461 6368 6d65 6e74 2e3c 2f64 6976 attachment.
    .
    < │ │ │ │ -00126600: 703e 5468 6520 7365 7276 6572 2d73 6964 p>The server-sid │ │ │ │ -00126610: 6520 7365 7276 6963 6520 6f70 6572 6174 e service operat │ │ │ │ -00126620: 696f 6e73 2061 7265 2069 6d70 6c65 6d65 ions are impleme │ │ │ │ -00126630: 6e74 6564 2061 7320 7573 7561 6c2c 2062 nted as usual, b │ │ │ │ -00126640: 7574 2077 6974 6820 6164 6469 7469 6f6e ut with addition │ │ │ │ -00126650: 616c 2063 6865 636b 7320 666f 7220 4d49 al checks for MI │ │ │ │ -00126660: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme │ │ │ │ -00126670: 6e74 733a 3c2f 703e 0a3c 6469 7620 636c nts:

    .
    < │ │ │ │ -00126690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001266a0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main()else< │ │ │ │ +001256a0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +001256c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if │ │ │ │ +00125700: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_check_mi │ │ │ │ +00125760: 6d65 5f61 7474 6163 686d 656e 7473 3c2f me_attachments(soap))
    .
    { │ │ │ │ +001257c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    // attachment │ │ │ │ +00125800: 7320 6172 6520 7072 6573 656e 742c 2063 s are present, c │ │ │ │ +00125810: 6861 6e6e 656c 2069 7320 7374 696c 6c20 hannel is still │ │ │ │ +00125820: 6f70 656e 203c 2f73 7061 6e3e 3c2f 6469 open ..
    printf │ │ │ │ +00125b00: 283c 7370 616e 2063 6c61 7373 3d22 7374 (&qu │ │ │ │ +00125b20: 6f74 3b52 6563 6569 7665 6420 6174 7461 ot;Received atta │ │ │ │ +00125b30: 6368 6d65 6e74 2077 6974 6820 6964 3d25 chment with id=% │ │ │ │ +00125b40: 7320 616e 6420 7479 7065 3d25 735c 6e26 s and type=%s\n& │ │ │ │ +00125b50: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 636f quot;, co │ │ │ │ +00125b60: 6e74 656e 742d 2667 743b 3c61 2063 6c61 ntent->id │ │ │ │ +00125bc0: 3c2f 613e 3f63 6f6e 7465 6e74 2d26 6774 ?content-> │ │ │ │ +00125bd0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;id:"&q │ │ │ │ +00125c50: 756f 743b 3c2f 7370 616e 3e2c 2063 6f6e uot;, con │ │ │ │ +00125c60: 7465 6e74 2d26 6774 3b3c 6120 636c 6173 tent->typ │ │ │ │ +00125cc0: 653c 2f61 3e3f 636f 6e74 656e 742d 2667 e?content-&g │ │ │ │ +00125cd0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;type:< │ │ │ │ +00125d30: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +00125d40: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +00125d50: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 293b ;"); │ │ │ │ +00125d60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } │ │ │ │ +00125d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 while< │ │ │ │ +00125da0: 2f73 7061 6e3e 2028 636f 6e74 656e 7429 /span> (content) │ │ │ │ +00125db0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ +00125dd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00125de0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (soap< │ │ │ │ +00125e20: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error) .
    so │ │ │ │ +00125ef0: 6170 5f70 7269 6e74 5f66 6175 6c74 3c2f ap_print_fault(soap, stderr); .
    }
    . │ │ │ │ +00125f60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    soap_end( │ │ │ │ +001260a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +001260d0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ +00126140: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);< │ │ │ │ +00126180: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_recv_mime_ │ │ │ │ +00126240: 6174 7461 6368 6d65 6e74 3c2f 613e 3c2f attachment
    struct s │ │ │ │ +00126270: 6f61 705f 6d75 6c74 6970 6172 7420 2a20 oap_multipart * │ │ │ │ +00126280: 736f 6170 5f72 6563 765f 6d69 6d65 5f61 soap_recv_mime_a │ │ │ │ +00126290: 7474 6163 686d 656e 7428 7374 7275 6374 ttachment(struct │ │ │ │ +001262a0: 2073 6f61 7020 2a73 6f61 702c 2076 6f69 soap *soap, voi │ │ │ │ +001262b0: 6420 2a68 616e 646c 6529 3c2f 6469 763e d *handle)
    │ │ │ │ +001262c0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Get a MIME/MT │ │ │ │ +001262e0: 4f4d 2061 7474 6163 686d 656e 742e 3c2f OM attachment.
    . │ │ │ │ +001263d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_pos │ │ │ │ +001263f0: 745f 6368 6563 6b5f 6d69 6d65 5f61 7474 t_check_mime_att │ │ │ │ +00126400: 6163 686d 656e 7473 2873 7472 7563 7420 achments(struct │ │ │ │ +00126410: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Enable post- │ │ │ │ +00126440: 7072 6f63 6573 7369 6e67 206f 6620 4d49 processing of MI │ │ │ │ +00126450: 4d45 2f4d 544f 4d20 6174 7461 6368 6d65 ME/MTOM attachme │ │ │ │ +00126460: 6e74 732e 3c2f 6469 763e 3c2f 6469 763e nts.
    │ │ │ │ +00126470: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    int soap_ch │ │ │ │ +00126560: 6563 6b5f 6d69 6d65 5f61 7474 6163 686d eck_mime_attachm │ │ │ │ +00126570: 656e 7473 2873 7472 7563 7420 736f 6170 ents(struct soap │ │ │ │ +00126580: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    │ │ │ │ +001265a0: 4368 6563 6b20 666f 7220 6120 4d49 4d45 Check for a MIME │ │ │ │ +001265b0: 2f4d 544f 4d20 6174 7461 6368 6d65 6e74 /MTOM attachment │ │ │ │ +001265c0: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    The serv │ │ │ │ +001265f0: 6572 2d73 6964 6520 7365 7276 6963 6520 er-side service │ │ │ │ +00126600: 6f70 6572 6174 696f 6e73 2061 7265 2069 operations are i │ │ │ │ +00126610: 6d70 6c65 6d65 6e74 6564 2061 7320 7573 mplemented as us │ │ │ │ +00126620: 7561 6c2c 2062 7574 2077 6974 6820 6164 ual, but with ad │ │ │ │ +00126630: 6469 7469 6f6e 616c 2063 6865 636b 7320 ditional checks │ │ │ │ +00126640: 666f 7220 4d49 4d45 2f4d 544f 4d20 6174 for MIME/MTOM at │ │ │ │ +00126650: 7461 6368 6d65 6e74 733a 3c2f 703e 0a3c tachments:

    .< │ │ │ │ +00126660: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +00126670: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    int main │ │ │ │ +001266b0: 2829 3c2f 6469 763e 0a3c 6469 7620 636c ()
    ... │ │ │ │ -00126930: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_serve( │ │ │ │ -00126990: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -001269c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } str │ │ │ │ +00126700: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new1 │ │ │ │ +001267d0: 283c 6120 636c 6173 733d 2263 6f64 6522 (SOAP_ENC_MTO │ │ │ │ +00126830: 4d3c 2f61 3e29 3b20 3c2f 6469 763e 0a3c M);
    .< │ │ │ │ +00126840: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00126850: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_post_c │ │ │ │ +001268b0: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach │ │ │ │ +001268c0: 6d65 6e74 733c 2f61 3e28 3c61 2063 6c61 ments(soap); ..< │ │ │ │ +001269b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001269c0: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    .
    .< │ │ │ │ -00126a10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00126a20: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int ns__myMethod │ │ │ │ -00126a40: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct
    soap │ │ │ │ -00126a90: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ -00126ac0: 703c 2f61 3e2c 202e 2e2e 2920 3c2f 6469 p, ...) i │ │ │ │ +00126a10: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6d79 nt ns__my │ │ │ │ +00126a20: 4d65 7468 6f64 283c 7370 616e 2063 6c61 Method(str │ │ │ │ +00126a40: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, ... │ │ │ │ +00126ab0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    {
    . │ │ │ │ -00126b00: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // se │ │ │ │ -00126b20: 7276 6572 2d73 6964 6520 7072 6f63 6573 rver-side proces │ │ │ │ -00126b30: 7369 6e67 206c 6f67 6963 203c 2f73 7061 sing logic
    ..
    │ │ │ │ -00126c40: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    // attachmen │ │ │ │ -00126c80: 7473 2061 7265 2070 7265 7365 6e74 2c20 ts are present, │ │ │ │ -00126c90: 6368 616e 6e65 6c20 6973 2073 7469 6c6c channel is still │ │ │ │ -00126ca0: 206f 7065 6e20 3c2f 7370 616e 3e3c 2f64 open .
    do .
    {.
    ... < │ │ │ │ -00126d30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00126d40: 656e 7422 3e2f 2f20 6765 7420 6461 7461 ent">// get data │ │ │ │ -00126d50: 2026 2333 393b 6861 6e64 6c65 2623 3339 'handle' │ │ │ │ -00126d60: 3b20 6672 6f6d 2053 4f41 5020 7265 7175 ; from SOAP requ │ │ │ │ -00126d70: 6573 7420 616e 6420 7061 7373 2074 6f20 est and pass to │ │ │ │ -00126d80: 6361 6c6c 6261 636b 7320 3c2f 7370 616e callbacks
    .
    │ │ │ │ -00126db0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // set │ │ │ │ -00126dd0: 2074 6865 2066 6d69 6d65 2063 616c 6c62 the fmime callb │ │ │ │ -00126de0: 6163 6b73 2c20 6966 206e 6565 6465 6420 acks, if needed │ │ │ │ -00126df0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00126e10: 2020 2020 2020 3c73 7061 6e20 636c 6173 stru │ │ │ │ -00126e30: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct
    soap │ │ │ │ -00126e70: 5f6d 756c 7469 7061 7274 3c2f 613e 202a _multipart * │ │ │ │ -00126e80: 636f 6e74 656e 7420 3d20 3c61 2063 6c61 content = soap │ │ │ │ -00126ee0: 5f72 6563 765f 6d69 6d65 5f61 7474 6163 _recv_mime_attac │ │ │ │ -00126ef0: 686d 656e 743c 2f61 3e28 3c61 2063 6c61 hment(soap, (void*)handle); .
    print │ │ │ │ -00126f80: 6628 3c73 7061 6e20 636c 6173 733d 2273 f(&q │ │ │ │ -00126fa0: 756f 743b 5265 6365 6976 6564 2061 7474 uot;Received att │ │ │ │ -00126fb0: 6163 686d 656e 7420 7769 7468 2069 643d achment with id= │ │ │ │ -00126fc0: 2573 2061 6e64 2074 7970 653d 2573 5c6e %s and type=%s\n │ │ │ │ -00126fd0: 2671 756f 743b 3c2f 7370 616e 3e2c 2063 ", c │ │ │ │ -00126fe0: 6f6e 7465 6e74 2d26 6774 3b3c 6120 636c ontent->i │ │ │ │ -00127040: 643c 2f61 3e3f 636f 6e74 656e 742d 2667 d?content-&g │ │ │ │ -00127050: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;id:"& │ │ │ │ -001270d0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 636f quot;, co │ │ │ │ -001270e0: 6e74 656e 742d 2667 743b 3c61 2063 6c61 ntent->ty │ │ │ │ -00127140: 7065 3c2f 613e 3f63 6f6e 7465 6e74 2d26 pe?content-& │ │ │ │ -00127150: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;type: │ │ │ │ -001271b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -001271d0: 743b 2671 756f 743b 3c2f 7370 616e 3e29 t;") │ │ │ │ -001271e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } │ │ │ │ -00127200: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while │ │ │ │ -00127220: 3c2f 7370 616e 3e20 2863 6f6e 7465 6e74 (content │ │ │ │ -00127230: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ -00127250: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap │ │ │ │ -001272a0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error) .
    return soap< │ │ │ │ -00127370: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->error; .
    }
    . │ │ │ │ -001273f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // │ │ │ │ -00127420: 2073 6572 7665 722d 7369 6465 2070 726f server-side pro │ │ │ │ -00127430: 6365 7373 696e 6720 6c6f 6769 6320 3c2f cessing logic
    .
    │ │ │ │ -00127460: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -00127480: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP │ │ │ │ -001274e0: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    . │ │ │ │ -001274f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    │ │ │ │ -00127510: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    We al │ │ │ │ -00128a40: 736f 2069 6e63 6c75 6465 6420 6120 3c63 so included a //gsoap wsa │ │ │ │ -00128a60: 7363 6865 6d61 2069 6d70 6f72 743a 3c2f schema import: directive │ │ │ │ -00128a80: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the wsa.h file to enabl │ │ │ │ -00128ab0: 6520 7468 6520 6765 6e65 7261 7469 6f6e e the generation │ │ │ │ -00128ac0: 206f 6620 5753 444c 2073 7065 6369 6669 of WSDL specifi │ │ │ │ -00128ad0: 6361 7469 6f6e 7320 7468 6174 2069 6d70 cations that imp │ │ │ │ -00128ae0: 6f72 7420 2869 6e73 7465 6164 206f 6620 ort (instead of │ │ │ │ -00128af0: 696e 636c 7564 6573 2920 7468 6520 5753 includes) the WS │ │ │ │ -00128b00: 2d41 6464 7265 7373 696e 6720 656c 656d -Addressing elem │ │ │ │ -00128b10: 656e 7473 2e20 4e6f 7465 2074 6861 7420 ents. Note that │ │ │ │ -00128b20: 7468 6520 3c63 6f64 653e 2f2f 6773 6f61 the //gsoa │ │ │ │ -00128b30: 706f 7074 2077 3c2f 636f 6465 3e20 6469 popt w di │ │ │ │ -00128b40: 7265 6374 6976 6520 2877 6869 6368 2061 rective (which a │ │ │ │ -00128b50: 6464 7320 6f70 7469 6f6e 203c 623e 3c63 dds option -w to run soapcpp2 -w) must n │ │ │ │ -00128ba0: 6f74 2062 6520 7072 6573 656e 7420 696e ot be present in │ │ │ │ -00128bb0: 2079 6f75 7220 6865 6164 6572 2066 696c your header fil │ │ │ │ -00128bc0: 6520 746f 2065 6e61 626c 6520 5753 444c e to enable WSDL │ │ │ │ -00128bd0: 2067 656e 6572 6174 696f 6e2e 3c2f 703e generation.

    │ │ │ │ -00128be0: 0a3c 703e 4f6e 652d 7761 7920 534f 4150 .

    One-way SOAP │ │ │ │ -00128bf0: 2d6f 7665 722d 5544 5020 6d65 7373 6167 -over-UDP messag │ │ │ │ -00128c00: 6573 2028 7365 6520 5365 6374 696f 6e20 es (see Section │ │ │ │ -00128c10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Asynchro │ │ │ │ -00128c40: 6e6f 7573 206f 6e65 2d77 6179 206d 6573 nous one-way mes │ │ │ │ -00128c50: 7361 6765 2070 6173 7369 6e67 3c2f 613e sage passing │ │ │ │ -00128c60: 2029 2073 686f 756c 6420 6265 2064 6563 ) should be dec │ │ │ │ -00128c70: 6c61 7265 6420 746f 2069 6e63 6c75 6465 lared to include │ │ │ │ -00128c80: 2074 6865 203c 656d 3e3c 636f 6465 3e77 the w │ │ │ │ -00128c90: 7361 3a4d 6573 7361 6765 4944 3c2f 636f sa:MessageID, wsa:To, and │ │ │ │ -00128cd0: 3c63 6f64 653e 7773 613a 4163 7469 6f6e wsa:Action │ │ │ │ -00128ce0: 3c2f 636f 6465 3e3c 2f65 6d3e 2065 6c65 ele │ │ │ │ -00128cf0: 6d65 6e74 7320 696e 2074 6865 2053 4f41 ments in the SOA │ │ │ │ -00128d00: 5020 4865 6164 6572 206f 6620 7468 6520 P Header of the │ │ │ │ -00128d10: 7265 7175 6573 7420 6d65 7373 6167 6520 request message │ │ │ │ -00128d20: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

    . │ │ │ │ -00128d30: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    // │ │ │ │ -00128d70: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ -00128d80: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p │ │ │ │ -00128d90: 6172 743a 2020 2020 2020 2020 2020 7365 art: se │ │ │ │ -00128da0: 6e64 5374 7269 6e67 2077 7361 5f5f 4d65 ndString wsa__Me │ │ │ │ -00128db0: 7373 6167 6549 4420 3c2f 7370 616e 3e3c ssageID < │ │ │ │ -00128dc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ -00128df0: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ -00128e00: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p │ │ │ │ -00128e10: 6172 743a 2020 2020 2020 2020 2020 7365 art: se │ │ │ │ -00128e20: 6e64 5374 7269 6e67 2077 7361 5f5f 546f ndString wsa__To │ │ │ │ -00128e30: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00128e40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00128e50: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ -00128e70: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ -00128e80: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: │ │ │ │ -00128e90: 2020 2020 2020 2073 656e 6453 7472 696e sendStrin │ │ │ │ -00128ea0: 6720 7773 615f 5f41 6374 696f 6e20 3c2f g wsa__Action
    .
    int ns__sendStrin │ │ │ │ -00128f00: 6728 3c73 7061 6e20 636c 6173 733d 226b g(char │ │ │ │ -00128f20: 3c2f 7370 616e 3e20 2a73 7472 2c20 3c73 *str, void);
    .

    Request-re │ │ │ │ -00128f80: 7370 6f6e 7365 2053 4f41 502d 6f76 6572 sponse SOAP-over │ │ │ │ -00128f90: 2d55 4450 206d 6573 7361 6765 7320 7368 -UDP messages sh │ │ │ │ -00128fa0: 6f75 6c64 2062 6520 6465 636c 6172 6564 ould be declared │ │ │ │ -00128fb0: 2074 6f20 696e 636c 7564 6520 7468 6520 to include the │ │ │ │ -00128fc0: 3c65 6d3e 3c63 6f64 653e 7773 613a 4d65 wsa:Me │ │ │ │ -00128fd0: 7373 6167 6549 443c 2f63 6f64 653e 3c2f ssageID, w │ │ │ │ -00128ff0: 7361 3a54 6f3c 2f63 6f64 653e 3c2f 656d sa:To, wsa │ │ │ │ -00129010: 3a41 6374 696f 6e3c 2f63 6f64 653e 3c2f :Action, and wsa:ReplyTo eleme │ │ │ │ -00129050: 6e74 7320 696e 2074 6865 2053 4f41 5020 nts in the SOAP │ │ │ │ -00129060: 4865 6164 6572 206f 6620 7468 6520 7265 Header of the re │ │ │ │ -00129070: 7175 6573 7420 6d65 7373 6167 652c 2061 quest message, a │ │ │ │ -00129080: 6e64 2074 6865 2074 6865 203c 656d 3e3c nd the the < │ │ │ │ -00129090: 636f 6465 3e77 7361 3a4d 6573 7361 6765 code>wsa:Message │ │ │ │ -001290a0: 4944 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 ID, │ │ │ │ -001290b0: 3c65 6d3e 3c63 6f64 653e 7773 613a 546f wsa:To │ │ │ │ -001290c0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , wsa:Acti │ │ │ │ -001290e0: 6f6e 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 on, │ │ │ │ -001290f0: 616e 6420 3c65 6d3e 3c63 6f64 653e 7773 and ws │ │ │ │ -00129100: 613a 5265 6c61 7465 7354 6f3c 2f63 6f64 a:RelatesTo elements │ │ │ │ -00129120: 2069 6e20 7468 6520 534f 4150 2048 6561 in the SOAP Hea │ │ │ │ -00129130: 6465 7220 6f66 2074 6865 2072 6573 706f der of the respo │ │ │ │ -00129140: 6e73 6520 6d65 7373 6167 653a 3c2f 703e nse message:

    │ │ │ │ -00129150: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    / │ │ │ │ -00129190: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -001291a0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header- │ │ │ │ -001291b0: 7061 7274 3a20 2020 2020 2020 2020 2065 part: e │ │ │ │ -001291c0: 6368 6f53 7472 696e 6720 7773 615f 5f4d choString wsa__M │ │ │ │ -001291d0: 6573 7361 6765 4944 203c 2f73 7061 6e3e essageID │ │ │ │ -001291e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -00129210: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -00129220: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header- │ │ │ │ -00129230: 7061 7274 3a20 2020 2020 2020 2020 2065 part: e │ │ │ │ -00129240: 6368 6f53 7472 696e 6720 7773 615f 5f54 choString wsa__T │ │ │ │ -00129250: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
    . │ │ │ │ -00129260: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ -00129290: 6e73 2073 6572 7669 6365 206d 6574 686f ns service metho │ │ │ │ -001292a0: 642d 6865 6164 6572 2d70 6172 743a 2020 d-header-part: │ │ │ │ -001292b0: 2020 2020 2020 2020 6563 686f 5374 7269 echoStri │ │ │ │ -001292c0: 6e67 2077 7361 5f5f 4163 7469 6f6e 203c ng wsa__Action < │ │ │ │ -001292d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -001292f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00129300: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ -00129310: 7365 7276 6963 6520 6d65 7468 6f64 2d69 service method-i │ │ │ │ -00129320: 6e70 7574 2d68 6561 6465 722d 7061 7274 nput-header-part │ │ │ │ -00129330: 3a20 2020 2065 6368 6f53 7472 696e 6720 : echoString │ │ │ │ -00129340: 7773 615f 5f52 6570 6c79 546f 203c 2f73 wsa__ReplyTo
    .
    //gsoap ns se │ │ │ │ -00129390: 7276 6963 6520 6d65 7468 6f64 2d6f 7574 rvice method-out │ │ │ │ -001293a0: 7075 742d 6865 6164 6572 2d70 6172 743a put-header-part: │ │ │ │ -001293b0: 2020 2065 6368 6f53 7472 696e 6720 7773 echoString ws │ │ │ │ -001293c0: 615f 5f52 656c 6174 6573 546f 203c 2f73 a__RelatesTo
    .
    int ns__echoString │ │ │ │ -00129420: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char< │ │ │ │ -00129440: 2f73 7061 6e3e 202a 7374 722c 203c 7370 /span> *str, char **res);
    │ │ │ │ -00129480: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    For t │ │ │ │ -001294a0: 6865 2063 6f6e 7465 6e74 2072 6571 7569 he content requi │ │ │ │ -001294b0: 7265 6d65 6e74 7320 6f66 2074 6865 7365 rements of these │ │ │ │ -001294c0: 2065 6c65 6d65 6e74 732c 2070 6c65 6173 elements, pleas │ │ │ │ -001294d0: 6520 636f 6e73 756c 7420 7468 6520 534f e consult the SO │ │ │ │ -001294e0: 4150 2d6f 7665 722d 5544 5020 7370 6563 AP-over-UDP spec │ │ │ │ -001294f0: 6966 6963 6174 696f 6e20 616e 642f 6f72 ification and/or │ │ │ │ -00129500: 2072 6561 6420 7468 6520 6e65 7874 2073 read the next s │ │ │ │ -00129510: 6563 7469 6f6e 7320 6578 706c 6169 6e69 ections explaini │ │ │ │ -00129520: 6e67 2053 4f41 502d 6f76 6572 2d55 4450 ng SOAP-over-UDP │ │ │ │ -00129530: 2075 6e69 6361 7374 2c20 6d75 6c74 6963 unicast, multic │ │ │ │ -00129540: 6173 742c 206f 6e65 2d77 6179 2c20 616e ast, one-way, an │ │ │ │ -00129550: 6420 7265 7175 6573 742d 7265 7370 6f6e d request-respon │ │ │ │ -00129560: 7365 2063 6c69 656e 7420 616e 6420 7365 se client and se │ │ │ │ -00129570: 7276 6572 2061 7070 6c69 6361 7469 6f6e rver application │ │ │ │ -00129580: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ -00129590: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -001295a0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -001295b0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    │ │ │ │ -001295e0: 3c2f 613e 0a43 6c69 656e 742d 7369 6465 .Client-side │ │ │ │ -001295f0: 206f 6e65 2d77 6179 2055 4450 2075 6e69 one-way UDP uni │ │ │ │ -00129600: 6361 7374 3c2f 6833 3e0a 3c70 3e54 6869 cast

    .

    Thi │ │ │ │ -00129610: 7320 6578 616d 706c 6520 6173 7375 6d65 s example assume │ │ │ │ -00129620: 7320 7468 6174 2074 6865 2069 6e74 6572 s that the inter │ │ │ │ -00129630: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ -00129640: 2069 6e63 6c75 6465 7320 7468 6520 534f includes the SO │ │ │ │ -00129650: 4150 2048 6561 6465 7220 7769 7468 2057 AP Header with W │ │ │ │ -00129660: 532d 4164 6472 6573 7369 6e67 2065 6c65 S-Addressing ele │ │ │ │ -00129670: 6d65 6e74 732c 2073 6565 203c 6120 636c ments, see The WS-Addr │ │ │ │ -001296b0: 6573 7369 6e67 2070 6c75 6769 6e3c 2f61 essing plugin, and the ns__sendString< │ │ │ │ -001296e0: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function │ │ │ │ -001296f0: 6469 7363 7573 7365 6420 696e 2053 6563 discussed in Sec │ │ │ │ -00129700: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Usin │ │ │ │ -00129730: 6720 5753 2d41 6464 7265 7373 696e 6720 g WS-Addressing │ │ │ │ -00129740: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U │ │ │ │ -00129750: 4450 3c2f 613e 2e3c 2f70 3e0a 3c64 6976 DP.

    .
    # │ │ │ │ -001297a0: 696e 636c 7564 6520 2671 756f 743b 706c include "pl │ │ │ │ -001297b0: 7567 696e 2f77 7361 6170 692e 6826 7175 ugin/wsaapi.h&qu │ │ │ │ -001297c0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    │ │ │ │ +00126ae0: 696e 6522 3e20 202e 2e2e 203c 7370 616e ine"> ... // server-side │ │ │ │ +00126b10: 7072 6f63 6573 7369 6e67 206c 6f67 6963 processing logic │ │ │ │ +00126b20: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00126b30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00126b40: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00126b60: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_c │ │ │ │ +00126bc0: 6865 636b 5f6d 696d 655f 6174 7461 6368 heck_mime_attach │ │ │ │ +00126bd0: 6d65 6e74 733c 2f61 3e28 3c61 2063 6c61 ments(soap))
    .
    {
    . │ │ │ │ +00126c40: 2020 2020 3c73 7061 6e20 636c 6173 733d // att │ │ │ │ +00126c60: 6163 686d 656e 7473 2061 7265 2070 7265 achments are pre │ │ │ │ +00126c70: 7365 6e74 2c20 6368 616e 6e65 6c20 6973 sent, channel is │ │ │ │ +00126c80: 2073 7469 6c6c 206f 7065 6e20 3c2f 7370 still open
    .
    │ │ │ │ +00126cb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 do
    .
    │ │ │ │ +00126cf0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    │ │ │ │ +00126d10: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // ge │ │ │ │ +00126d30: 7420 6461 7461 2026 2333 393b 6861 6e64 t data 'hand │ │ │ │ +00126d40: 6c65 2623 3339 3b20 6672 6f6d 2053 4f41 le' from SOA │ │ │ │ +00126d50: 5020 7265 7175 6573 7420 616e 6420 7061 P request and pa │ │ │ │ +00126d60: 7373 2074 6f20 6361 6c6c 6261 636b 7320 ss to callbacks │ │ │ │ +00126d70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00126d90: 2020 2020 2020 2e2e 2e20 3c73 7061 6e20 ... │ │ │ │ +00126db0: 2f2f 2073 6574 2074 6865 2066 6d69 6d65 // set the fmime │ │ │ │ +00126dc0: 2063 616c 6c62 6163 6b73 2c20 6966 206e callbacks, if n │ │ │ │ +00126dd0: 6565 6465 6420 3c2f 7370 616e 3e3c 2f64 eeded .
    struct │ │ │ │ +00126e20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_multipart │ │ │ │ +00126e60: 3c2f 613e 202a 636f 6e74 656e 7420 3d20 *content = │ │ │ │ +00126e70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_recv_mime │ │ │ │ +00126ed0: 5f61 7474 6163 686d 656e 743c 2f61 3e28 _attachment( │ │ │ │ +00126ee0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00126f10: 2028 3c73 7061 6e20 636c 6173 733d 226b (void │ │ │ │ +00126f30: 3c2f 7370 616e 3e2a 2968 616e 646c 6529 *)handle) │ │ │ │ +00126f40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ +00126f60: 2070 7269 6e74 6628 3c73 7061 6e20 636c printf("Receiv │ │ │ │ +00126f90: 6564 2061 7474 6163 686d 656e 7420 7769 ed attachment wi │ │ │ │ +00126fa0: 7468 2069 643d 2573 2061 6e64 2074 7970 th id=%s and typ │ │ │ │ +00126fb0: 653d 2573 5c6e 2671 756f 743b 3c2f 7370 e=%s\n", content-> │ │ │ │ +00126fd0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;id?cont │ │ │ │ +00127030: 656e 742d 2667 743b 3c61 2063 6c61 7373 ent->id:& │ │ │ │ +001270b0: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;", content-> │ │ │ │ +001270d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 type?con │ │ │ │ +00127130: 7465 6e74 2d26 6774 3b3c 6120 636c 6173 tent->typ │ │ │ │ +00127190: 653c 2f61 3e3a 3c73 7061 6e20 636c 6173 e:"");
    .< │ │ │ │ +001271d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001271e0: 3e20 2020 207d 203c 7370 616e 2063 6c61 > } while (c │ │ │ │ +00127210: 6f6e 7465 6e74 293b 203c 2f64 6976 3e0a ontent);
    . │ │ │ │ +00127220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +00127250: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap->< │ │ │ │ +00127290: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001272a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001272b0: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270 │ │ │ │ +001272c0: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98 │ │ │ │ +001272d0: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2">error)
    .
    │ │ │ │ +00127300: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ +00127320: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap->error │ │ │ │ +001273b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } < │ │ │ │ +001273d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // server-si │ │ │ │ +00127410: 6465 2070 726f 6365 7373 696e 6720 6c6f de processing lo │ │ │ │ +00127420: 6769 6320 3c2f 7370 616e 3e3c 2f64 6976 gic
    .
    │ │ │ │ +00127460: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; < │ │ │ │ +001274d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ +001274f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    .... < │ │ │ │ +00127510: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +00127520: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +00127530: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Stream │ │ │ │ +00127570: 696e 6720 6368 756e 6b65 6420 4d49 4d45 ing chunked MIME │ │ │ │ +00127580: 2f4d 544f 4d3c 2f68 323e 0a3c 703e 546f /MTOM

    .

    To │ │ │ │ +00127590: 2073 656e 6420 4d49 4d45 2f4d 544f 4d20 send MIME/MTOM │ │ │ │ +001275a0: 6174 7461 6368 6d65 6e74 732c 2074 6865 attachments, the │ │ │ │ +001275b0: 2061 7474 6163 686d 656e 7420 7369 7a65 attachment size │ │ │ │ +001275c0: 7320 6d75 7374 2062 6520 6465 7465 726d s must be determ │ │ │ │ +001275d0: 696e 6564 2069 6e20 6164 7661 6e63 6520 ined in advance │ │ │ │ +001275e0: 746f 2063 616c 6375 6c61 7465 2048 5454 to calculate HTT │ │ │ │ +001275f0: 5020 6d65 7373 6167 6520 6c65 6e67 7468 P message length │ │ │ │ +00127600: 2072 6571 7569 7265 6420 746f 2073 7472 required to str │ │ │ │ +00127610: 6561 6d20 4d49 4d45 2f4d 544f 4d20 6f76 eam MIME/MTOM ov │ │ │ │ +00127620: 6572 2048 5454 502e 2048 6f77 6576 6572 er HTTP. However │ │ │ │ +00127630: 2c20 6368 756e 6b65 6420 4d49 4d45 2f4d , chunked MIME/M │ │ │ │ +00127640: 544f 4d20 746f 6765 7468 6572 2077 6974 TOM together wit │ │ │ │ +00127650: 6820 6368 756e 6b65 6420 4854 5450 2063 h chunked HTTP c │ │ │ │ +00127660: 616e 2062 6520 7573 6564 2074 6f20 6f6d an be used to om │ │ │ │ +00127670: 6974 2074 6869 7320 7374 6570 2e20 4669 it this step. Fi │ │ │ │ +00127680: 7273 7420 7365 7420 7468 6520 3c63 6f64 rst set the #SOAP_IO_CHUNK │ │ │ │ +001276a0: 3c2f 636f 6465 3e20 666c 6167 2e20 5468 flag. Th │ │ │ │ +001276b0: 656e 2c20 746f 2073 7472 6561 6d20 6368 en, to stream ch │ │ │ │ +001276c0: 756e 6b65 6420 4d49 4d45 2f4d 544f 4d2c unked MIME/MTOM, │ │ │ │ +001276d0: 2073 6574 2074 6865 203c 636f 6465 3e5f set the _ │ │ │ │ +001276e0: 5f73 697a 653c 2f63 6f64 653e 206d 656d _size mem │ │ │ │ +001276f0: 6265 7220 6f66 2061 6e20 6174 7461 6368 ber of an attach │ │ │ │ +00127700: 6d65 6e74 2074 6f20 7a65 726f 2061 6e64 ment to zero and │ │ │ │ +00127710: 2065 6e61 626c 6520 4d49 4d45 2f4d 544f enable MIME/MTO │ │ │ │ +00127720: 4d20 6368 756e 6b69 6e67 2e20 5468 6520 M chunking. The │ │ │ │ +00127730: 4d49 4d45 2f4d 544f 4d20 3c63 6f64 653e MIME/MTOM │ │ │ │ +00127740: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fmime │ │ │ │ +001277e0: 7265 6164 3c2f 613e 3c2f 636f 6465 3e20 read │ │ │ │ +001277f0: 6361 6c6c 6261 636b 2074 6865 6e20 6665 callback then fe │ │ │ │ +00127800: 7463 6865 7320 6461 7461 2069 6e20 6368 tches data in ch │ │ │ │ +00127810: 756e 6b73 2061 6e64 2069 7420 6973 2069 unks and it is i │ │ │ │ +00127820: 6d70 6f72 7461 6e74 2074 6f20 6669 6c6c mportant to fill │ │ │ │ +00127830: 2074 6865 2065 6e74 6972 6520 6275 6666 the entire buff │ │ │ │ +00127840: 6572 2075 6e6c 6573 7320 7468 6520 656e er unless the en │ │ │ │ +00127850: 6420 6f66 2074 6865 2064 6174 6120 6861 d of the data ha │ │ │ │ +00127860: 7320 6265 656e 2072 6561 6368 6564 2061 s been reached a │ │ │ │ +00127870: 6e64 2074 6865 206c 6173 7420 6368 756e nd the last chun │ │ │ │ +00127880: 6b20 6973 2074 6f20 6265 2073 656e 642e k is to be send. │ │ │ │ +00127890: 2054 6861 7420 6973 2c20 3c63 6f64 653e That is, │ │ │ │ +001278a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fmime │ │ │ │ +00127940: 7265 6164 3c2f 613e 3c2f 636f 6465 3e20 read │ │ │ │ +00127950: 7368 6f75 6c64 2072 6574 7572 6e20 7468 should return th │ │ │ │ +00127960: 6520 7661 6c75 6520 6f66 2074 6865 206c e value of the l │ │ │ │ +00127970: 6173 7420 3c63 6f64 653e 6c65 6e3c 2f63 ast len parameter a │ │ │ │ +00127990: 6e64 2066 696c 6c20 7468 6520 656e 7469 nd fill the enti │ │ │ │ +001279a0: 7265 2062 7566 6665 7220 3c63 6f64 653e re buffer │ │ │ │ +001279b0: 6275 663c 2f63 6f64 653e 2066 6f72 2061 buf for a │ │ │ │ +001279c0: 6c6c 2063 6875 6e6b 7320 6578 6365 7074 ll chunks except │ │ │ │ +001279d0: 2074 6865 206c 6173 742e 2046 6f72 2074 the last. For t │ │ │ │ +001279e0: 6865 206c 6173 7420 6974 2072 6574 7572 he last it retur │ │ │ │ +001279f0: 6e73 2030 2e3c 2f70 3e0a 3c70 3ef0 9f94 ns 0.

    .

    ... │ │ │ │ +00127a00: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ +00127a10: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ +00127a20: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ +00127a30: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

    < │ │ │ │ +00127a50: 2f61 3e0a 534f 4150 2f58 4d4c 206f 7665 /a>.SOAP/XML ove │ │ │ │ +00127a60: 7220 5544 503c 2f68 313e 0a3c 703e 5544 r UDP

    .

    UD │ │ │ │ +00127a70: 5020 6973 2061 2073 696d 706c 652c 2075 P is a simple, u │ │ │ │ +00127a80: 6e72 656c 6961 626c 6520 6461 7461 6772 nreliable datagr │ │ │ │ +00127a90: 616d 2070 726f 746f 636f 6c3a 2055 4450 am protocol: UDP │ │ │ │ +00127aa0: 2073 6f63 6b65 7473 2061 7265 2063 6f6e sockets are con │ │ │ │ +00127ab0: 6e65 6374 696f 6e6c 6573 732e 2055 4450 nectionless. UDP │ │ │ │ +00127ac0: 2061 6464 7265 7373 2066 6f72 6d61 7473 address formats │ │ │ │ +00127ad0: 2061 7265 2069 6465 6e74 6963 616c 2074 are identical t │ │ │ │ +00127ae0: 6f20 7468 6f73 6520 7573 6564 2062 7920 o those used by │ │ │ │ +00127af0: 5443 502e 2049 6e20 7061 7274 6963 756c TCP. In particul │ │ │ │ +00127b00: 6172 2055 4450 2070 726f 7669 6465 7320 ar UDP provides │ │ │ │ +00127b10: 6120 706f 7274 2069 6465 6e74 6966 6965 a port identifie │ │ │ │ +00127b20: 7220 696e 2061 6464 6974 696f 6e20 746f r in addition to │ │ │ │ +00127b30: 2074 6865 206e 6f72 6d61 6c20 496e 7465 the normal Inte │ │ │ │ +00127b40: 726e 6574 2061 6464 7265 7373 2066 6f72 rnet address for │ │ │ │ +00127b50: 6d61 742e 2054 6865 2055 4450 2070 6f72 mat. The UDP por │ │ │ │ +00127b60: 7420 7370 6163 6520 6973 2073 6570 6172 t space is separ │ │ │ │ +00127b70: 6174 6520 6672 6f6d 2074 6865 2054 4350 ate from the TCP │ │ │ │ +00127b80: 2070 6f72 7420 7370 6163 6520 2869 2e65 port space (i.e │ │ │ │ +00127b90: 2e20 6120 5544 5020 706f 7274 206d 6179 . a UDP port may │ │ │ │ +00127ba0: 206e 6f74 2062 6520 2263 6f6e 6e65 6374 not be "connect │ │ │ │ +00127bb0: 6564 2220 746f 2061 2054 4350 2070 6f72 ed" to a TCP por │ │ │ │ +00127bc0: 7429 2e20 496e 2061 6464 6974 696f 6e20 t). In addition │ │ │ │ +00127bd0: 6272 6f61 6463 6173 7420 7061 636b 6574 broadcast packet │ │ │ │ +00127be0: 7320 6d61 7920 6265 2073 656e 7420 2861 s may be sent (a │ │ │ │ +00127bf0: 7373 756d 696e 6720 7468 6520 756e 6465 ssuming the unde │ │ │ │ +00127c00: 726c 7969 6e67 206e 6574 776f 726b 2073 rlying network s │ │ │ │ +00127c10: 7570 706f 7274 7320 7468 6973 2920 6279 upports this) by │ │ │ │ +00127c20: 2075 7369 6e67 2061 2072 6573 6572 7665 using a reserve │ │ │ │ +00127c30: 6420 2262 726f 6164 6361 7374 0a61 6464 d "broadcast.add │ │ │ │ +00127c40: 7265 7373 223b 2074 6869 7320 6164 6472 ress"; this addr │ │ │ │ +00127c50: 6573 7320 6973 206e 6574 776f 726b 2069 ess is network i │ │ │ │ +00127c60: 6e74 6572 6661 6365 2064 6570 656e 6465 nterface depende │ │ │ │ +00127c70: 6e74 2e3c 2f70 3e0a 3c70 3e43 6c69 656e nt.

    .

    Clien │ │ │ │ +00127c80: 742d 7369 6465 206d 6573 7361 6765 7320 t-side messages │ │ │ │ +00127c90: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U │ │ │ │ +00127ca0: 4450 2065 6e64 706f 696e 7420 5552 4c73 DP endpoint URLs │ │ │ │ +00127cb0: 2028 3c63 6f64 653e 736f 6170 2e75 6470 (soap.udp │ │ │ │ +00127cc0: 3a2f 2f2e 2e2e 3c2f 636f 6465 3e29 2061 ://...) a │ │ │ │ +00127cd0: 7265 2061 7574 6f6d 6174 6963 616c 6c79 re automatically │ │ │ │ +00127ce0: 2074 7261 6e73 6d69 7474 6564 2061 7320 transmitted as │ │ │ │ +00127cf0: 6461 7461 6772 616d 732e 2053 6572 7665 datagrams. Serve │ │ │ │ +00127d00: 722d 7369 6465 2061 7070 6c69 6361 7469 r-side applicati │ │ │ │ +00127d10: 6f6e 7320 7368 6f75 6c64 2073 6574 2074 ons should set t │ │ │ │ +00127d20: 6865 203c 636f 6465 3e23 534f 4150 5f49 he #SOAP_I │ │ │ │ +00127d30: 4f5f 5544 503c 2f63 6f64 653e 206d 6f64 O_UDP mod │ │ │ │ +00127d40: 6520 666c 6167 2074 6f20 6163 6365 7074 e flag to accept │ │ │ │ +00127d50: 2055 4450 2072 6571 7565 7374 732c 2065 UDP requests, e │ │ │ │ +00127d60: 2e67 2e20 7573 696e 6720 3c63 6f64 653e .g. using │ │ │ │ +00127d70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa │ │ │ │ +00127e20: 705f 6e65 7731 3c2f 613e 3c2f 636f 6465 p_new1, soap_init1< │ │ │ │ +00127ef0: 2f61 3e3c 2f63 6f64 653e 2c20 6f72 203c /a>, or < │ │ │ │ +00127f00: 636f 6465 3e3c 6120 636c 6173 733d 2265 code> │ │ │ │ +00127fa0: 736f 6170 5f73 6574 5f6d 6f64 653c 2f61 soap_set_mode.

    .

    The maximum mes │ │ │ │ +00127fd0: 7361 6765 206c 656e 6774 6820 666f 7220 sage length for │ │ │ │ +00127fe0: 6461 7461 6772 616d 2070 6163 6b65 7473 datagram packets │ │ │ │ +00127ff0: 2069 7320 7265 7374 7269 6374 6564 2062 is restricted b │ │ │ │ +00128000: 7920 7468 6520 6275 6666 6572 2073 697a y the buffer siz │ │ │ │ +00128010: 6520 3c63 6f64 653e 2353 4f41 505f 4255 e #SOAP_BU │ │ │ │ +00128020: 464c 454e 3c2f 636f 6465 3e2c 2077 6869 FLEN, whi │ │ │ │ +00128030: 6368 2069 7320 3635 3533 3620 6279 2064 ch is 65536 by d │ │ │ │ +00128040: 6566 6175 6c74 2c20 756e 6c65 7373 2063 efault, unless c │ │ │ │ +00128050: 6f6d 7069 6c65 6420 7769 7468 203c 636f ompiled with #WITH_LEAN to support │ │ │ │ +00128080: 736d 616c 6c2d 7363 616c 6520 656d 6265 small-scale embe │ │ │ │ +00128090: 6464 6564 2073 7973 7465 6d73 2e20 466f dded systems. Fo │ │ │ │ +001280a0: 7220 5544 5020 7472 616e 7370 6f72 7420 r UDP transport │ │ │ │ +001280b0: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL │ │ │ │ +001280c0: 454e 3c2f 636f 6465 3e20 6d75 7374 206e EN must n │ │ │ │ +001280d0: 6f74 2065 7863 6565 6420 7468 6520 6d61 ot exceed the ma │ │ │ │ +001280e0: 7869 6d75 6d20 5544 5020 7061 636b 6574 ximum UDP packet │ │ │ │ +001280f0: 2073 697a 6520 3635 3533 3620 2874 6865 size 65536 (the │ │ │ │ +00128100: 2073 697a 6520 6f66 2064 6174 6167 7261 size of datagra │ │ │ │ +00128110: 6d20 6d65 7373 6167 6573 2069 7320 636f m messages is co │ │ │ │ +00128120: 6e73 7472 6169 6e65 6420 6279 2074 6865 nstrained by the │ │ │ │ +00128130: 2055 4450 2070 6163 6b65 7420 7369 7a65 UDP packet size │ │ │ │ +00128140: 2032 5e31 363d 3635 3533 3620 6173 2070 2^16=65536 as p │ │ │ │ +00128150: 6572 2055 4450 2073 7461 6e64 6172 6429 er UDP standard) │ │ │ │ +00128160: 2e20 596f 7520 6361 6e20 7573 6520 636f . You can use co │ │ │ │ +00128170: 6d70 7265 7373 696f 6e20 7769 7468 203c mpression with < │ │ │ │ +00128180: 636f 6465 3e23 534f 4150 5f45 4e43 5f5a code>#SOAP_ENC_Z │ │ │ │ +00128190: 4c49 423c 2f63 6f64 653e 2074 6f20 7265 LIB to re │ │ │ │ +001281a0: 6475 6365 2074 6865 206d 6573 7361 6765 duce the message │ │ │ │ +001281b0: 2073 697a 652c 2062 7574 206e 6f74 6520 size, but note │ │ │ │ +001281c0: 7468 6174 2063 6f6d 7072 6573 7365 6420 that compressed │ │ │ │ +001281d0: 534f 4150 2d6f 7665 722d 5544 5020 6973 SOAP-over-UDP is │ │ │ │ +001281e0: 2061 2067 534f 4150 2d73 7065 6369 6669 a gSOAP-specifi │ │ │ │ +001281f0: 6320 6665 6174 7572 6520 6265 6361 7573 c feature becaus │ │ │ │ +00128200: 6520 6974 2069 7320 6e6f 7420 7061 7274 e it is not part │ │ │ │ +00128210: 206f 6620 7468 6520 534f 4150 2d6f 7665 of the SOAP-ove │ │ │ │ +00128220: 722d 5544 5020 7370 6563 6966 6963 6174 r-UDP specificat │ │ │ │ +00128230: 696f 6e2e 3c2f 703e 0a3c 703e 5468 6520 ion.

    .

    The │ │ │ │ +00128240: 534f 4150 2d6f 7665 722d 5544 5020 7370 SOAP-over-UDP sp │ │ │ │ +00128250: 6563 6966 6963 6174 696f 6e20 7265 6c69 ecification reli │ │ │ │ +00128260: 6573 206f 6e20 5753 2d41 6464 7265 7373 es on WS-Address │ │ │ │ +00128270: 696e 672e 2054 6865 203c 656d 3e3c 636f ing. The wsa.h< │ │ │ │ +00128290: 2f65 6d3e 2066 696c 6520 696e 2074 6865 /em> file in the │ │ │ │ +001282a0: 203c 636f 6465 3e69 6d70 6f72 743c 2f63 import directory d │ │ │ │ +001282c0: 6566 696e 6573 2074 6865 2057 532d 4164 efines the WS-Ad │ │ │ │ +001282d0: 6472 6573 7369 6e67 2065 6c65 6d65 6e74 dressing element │ │ │ │ +001282e0: 7320 666f 7220 636c 6965 6e74 2061 6e64 s for client and │ │ │ │ +001282f0: 2073 6572 7665 7220 6170 706c 6963 6174 server applicat │ │ │ │ +00128300: 696f 6e73 2e3c 2f70 3e0a 3c70 3e54 6865 ions.

    .

    The │ │ │ │ +00128310: 2067 534f 4150 2069 6d70 6c65 6d65 6e74 gSOAP implement │ │ │ │ +00128320: 6174 696f 6e20 636f 6e66 6f72 6d73 2074 ation conforms t │ │ │ │ +00128330: 6f20 7468 6520 534f 4150 2d6f 7665 722d o the SOAP-over- │ │ │ │ +00128340: 5544 5020 7265 7175 6972 656d 656e 7473 UDP requirements │ │ │ │ +00128350: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e53 :

    .
      .
    • S │ │ │ │ +00128360: 4f41 502d 6f76 6572 2d55 4450 2073 6572 OAP-over-UDP ser │ │ │ │ +00128370: 7665 7220 656e 6470 6f69 6e74 2055 524c ver endpoint URL │ │ │ │ +00128380: 2066 6f72 6d61 743a 203c 656d 3e3c 636f format: soap.udp://ho │ │ │ │ +001283a0: 7374 3a70 6f72 742f 7061 7468 3c2f 636f st:port/path
    • .Support one-wa │ │ │ │ +001283d0: 7920 6d65 7373 6167 652d 6578 6368 616e y message-exchan │ │ │ │ +001283e0: 6765 2070 6174 7465 726e 2028 4d45 5029 ge pattern (MEP) │ │ │ │ +001283f0: 2077 6865 7265 2061 2053 4f41 5020 656e where a SOAP en │ │ │ │ +00128400: 7665 6c6f 7065 2069 7320 6361 7272 6965 velope is carrie │ │ │ │ +00128410: 6420 696e 2061 2075 7365 7220 6461 7461 d in a user data │ │ │ │ +00128420: 6772 616d 2e3c 2f6c 693e 0a3c 6c69 3e53 gram..
    • S │ │ │ │ +00128430: 7570 706f 7274 2072 6571 7565 7374 2d72 upport request-r │ │ │ │ +00128440: 6573 706f 6e73 6520 6d65 7373 6167 652d esponse message- │ │ │ │ +00128450: 6578 6368 616e 6765 2070 6174 7465 726e exchange pattern │ │ │ │ +00128460: 2028 4d45 5029 2077 6865 7265 2053 4f41 (MEP) where SOA │ │ │ │ +00128470: 5020 656e 7665 6c6f 7065 7320 6172 6520 P envelopes are │ │ │ │ +00128480: 6361 7272 6965 6420 696e 2075 7365 7220 carried in user │ │ │ │ +00128490: 6461 7461 6772 616d 732e 3c2f 6c69 3e0a datagrams.
    • . │ │ │ │ +001284a0: 3c6c 693e 5375 7070 6f72 7420 6d75 6c74
    • Support mult │ │ │ │ +001284b0: 6963 6173 7420 7472 616e 736d 6973 7369 icast transmissi │ │ │ │ +001284c0: 6f6e 206f 6620 534f 4150 2065 6e76 656c on of SOAP envel │ │ │ │ +001284d0: 6f70 6573 2063 6172 7269 6564 2069 6e20 opes carried in │ │ │ │ +001284e0: 7573 6572 2064 6174 6167 7261 6d73 2e3c user datagrams.< │ │ │ │ +001284f0: 2f6c 693e 0a3c 6c69 3e53 7570 706f 7274 /li>.
    • Support │ │ │ │ +00128500: 2062 6f74 6820 534f 4150 2031 2e31 2061 both SOAP 1.1 a │ │ │ │ +00128510: 6e64 2053 4f41 5020 312e 3220 656e 7665 nd SOAP 1.2 enve │ │ │ │ +00128520: 6c6f 7065 732e 3c2f 6c69 3e0a 3c2f 756c lopes.
    • .
    .

    The followi │ │ │ │ +00128540: 6e67 2061 6464 6974 696f 6e61 6c20 6665 ng additional fe │ │ │ │ +00128550: 6174 7572 6573 2061 7265 2061 6c73 6f20 atures are also │ │ │ │ +00128560: 6176 6169 6c61 626c 652c 2062 7574 2061 available, but a │ │ │ │ +00128570: 7265 206e 6f74 2073 7570 706f 7274 6564 re not supported │ │ │ │ +00128580: 2062 7920 7468 6520 534f 4150 2d6f 7665 by the SOAP-ove │ │ │ │ +00128590: 722d 5544 5020 7370 6563 6966 6963 6174 r-UDP specificat │ │ │ │ +001285a0: 696f 6e3a 3c2f 703e 0a3c 756c 3e0a 3c6c ion:

    .
      .Zlib/gzip mess │ │ │ │ +001285c0: 6167 6520 636f 6d70 7265 7373 696f 6e20 age compression │ │ │ │ +001285d0: 2875 7365 2063 6f6d 7069 6c65 2d74 696d (use compile-tim │ │ │ │ +001285e0: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI │ │ │ │ +001285f0: 5448 5f47 5a49 503c 2f63 6f64 653e 292e TH_GZIP). │ │ │ │ +00128600: 3c2f 6c69 3e0a 3c6c 693e 534f 4150 2077 .
    • SOAP w │ │ │ │ +00128610: 6974 6820 4449 4d45 2061 7474 6163 686d ith DIME attachm │ │ │ │ +00128620: 656e 7473 206f 7665 7220 5544 502e 3c2f ents over UDP..
    • SOAP wit │ │ │ │ +00128640: 6820 4d49 4d45 2f4d 544f 4d20 6174 7461 h MIME/MTOM atta │ │ │ │ +00128650: 6368 6d65 6e74 7320 6f76 6572 2055 4450 chments over UDP │ │ │ │ +00128660: 2e3c 2f6c 693e 0a3c 6c69 3e53 7570 706f .
    • .
    • Suppo │ │ │ │ +00128670: 7274 2066 6f72 2049 5076 3620 2875 7365 rt for IPv6 (use │ │ │ │ +00128680: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl │ │ │ │ +00128690: 6167 203c 636f 6465 3e23 5749 5448 5f49 ag #WITH_I │ │ │ │ +001286a0: 5056 363c 2f63 6f64 653e 293c 2f6c 693e PV6)
    • │ │ │ │ +001286b0: 0a3c 2f75 6c3e 0a3c 703e f09f 949d 203c .
    .

    .... < │ │ │ │ +001286c0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +001286d0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +001286e0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    < │ │ │ │ +00128710: 2f61 3e0a 5573 696e 6720 5753 2d41 6464 /a>.Using WS-Add │ │ │ │ +00128720: 7265 7373 696e 6720 7769 7468 2053 4f41 ressing with SOA │ │ │ │ +00128730: 502d 6f76 6572 2d55 4450 3c2f 6832 3e0a P-over-UDP

    . │ │ │ │ +00128740: 3c70 3e41 2053 4f41 502d 6f76 6572 2d55

    A SOAP-over-U │ │ │ │ +00128750: 4450 2061 7070 6c69 6361 7469 6f6e 206d DP application m │ │ │ │ +00128760: 6179 2075 7365 2057 532d 4164 6472 6573 ay use WS-Addres │ │ │ │ +00128770: 7369 6e67 2074 6f20 636f 6e74 726f 6c20 sing to control │ │ │ │ +00128780: 6d65 7373 6167 6520 6465 6c69 7665 7279 message delivery │ │ │ │ +00128790: 2061 7320 7065 7220 534f 4150 2d6f 7665 as per SOAP-ove │ │ │ │ +001287a0: 722d 5544 5020 7370 6563 6966 6963 6174 r-UDP specificat │ │ │ │ +001287b0: 696f 6e2e 3c2f 703e 0a3c 703e 5468 6520 ion.

    .

    The │ │ │ │ +001287c0: 3c65 6d3e 3c63 6f64 653e 7773 612e 683c wsa.h< │ │ │ │ +001287d0: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file │ │ │ │ +001287e0: 2069 6e20 7468 6520 3c63 6f64 653e 696d in the im │ │ │ │ +001287f0: 706f 7274 3c2f 636f 6465 3e20 6469 7265 port dire │ │ │ │ +00128800: 6374 6f72 7920 6465 6669 6e65 7320 7468 ctory defines th │ │ │ │ +00128810: 6520 5753 2d41 6464 7265 7373 696e 6720 e WS-Addressing │ │ │ │ +00128820: 656c 656d 656e 7473 2e20 546f 2069 6e63 elements. To inc │ │ │ │ +00128830: 6c75 6465 2074 6865 2057 532d 4164 6472 lude the WS-Addr │ │ │ │ +00128840: 6573 7369 6e67 2065 6c65 6d65 6e74 7320 essing elements │ │ │ │ +00128850: 696e 2074 6865 2053 4f41 5020 4865 6164 in the SOAP Head │ │ │ │ +00128860: 6572 2066 6f72 206d 6573 7361 6769 6e67 er for messaging │ │ │ │ +00128870: 2c20 6120 5753 2d41 6464 7265 7373 696e , a WS-Addressin │ │ │ │ +00128880: 6720 6361 7061 626c 6520 3c63 6f64 653e g capable │ │ │ │ +00128890: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_ │ │ │ │ +001288f0: 454e 565f 5f48 6561 6465 723c 2f61 3e3c ENV__Header< │ │ │ │ +00128900: 2f63 6f64 653e 2073 7472 7563 7420 7368 /code> struct sh │ │ │ │ +00128910: 6f75 6c64 2062 6520 6465 6669 6e65 6420 ould be defined │ │ │ │ +00128920: 696e 2079 6f75 7220 6865 6164 6572 2066 in your header f │ │ │ │ +00128930: 696c 6520 6279 2069 6d70 6f72 7469 6e67 ile by importing │ │ │ │ +00128940: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ +00128950: 2f69 6d70 6f72 742f 7773 612e 683c 2f63 /import/wsa.h or gsoap/imp │ │ │ │ +00128980: 6f72 742f 7773 6135 2e68 3c2f 636f 6465 ort/wsa5.h:

    .
    # │ │ │ │ +001289e0: 696d 706f 7274 2026 7175 6f74 3b77 7361 import "wsa │ │ │ │ +001289f0: 2e68 2671 756f 743b 3c2f 7370 616e 3e20 .h" │ │ │ │ +00128a00: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    We also include │ │ │ │ +00128a30: 6420 6120 3c63 6f64 653e 2f2f 6773 6f61 d a //gsoa │ │ │ │ +00128a40: 7020 7773 6120 7363 6865 6d61 2069 6d70 p wsa schema imp │ │ │ │ +00128a50: 6f72 743a 3c2f 636f 6465 3e20 6469 7265 ort: dire │ │ │ │ +00128a60: 6374 6976 6520 696e 2074 6865 203c 656d ctive in the wsa.h file to │ │ │ │ +00128a90: 2065 6e61 626c 6520 7468 6520 6765 6e65 enable the gene │ │ │ │ +00128aa0: 7261 7469 6f6e 206f 6620 5753 444c 2073 ration of WSDL s │ │ │ │ +00128ab0: 7065 6369 6669 6361 7469 6f6e 7320 7468 pecifications th │ │ │ │ +00128ac0: 6174 2069 6d70 6f72 7420 2869 6e73 7465 at import (inste │ │ │ │ +00128ad0: 6164 206f 6620 696e 636c 7564 6573 2920 ad of includes) │ │ │ │ +00128ae0: 7468 6520 5753 2d41 6464 7265 7373 696e the WS-Addressin │ │ │ │ +00128af0: 6720 656c 656d 656e 7473 2e20 4e6f 7465 g elements. Note │ │ │ │ +00128b00: 2074 6861 7420 7468 6520 3c63 6f64 653e that the │ │ │ │ +00128b10: 2f2f 6773 6f61 706f 7074 2077 3c2f 636f //gsoapopt w directive (w │ │ │ │ +00128b30: 6869 6368 2061 6464 7320 6f70 7469 6f6e hich adds option │ │ │ │ +00128b40: 203c 623e 3c63 6f64 653e 2d77 3c2f 636f -w to run < │ │ │ │ +00128b60: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2 │ │ │ │ +00128b70: 202d 773c 2f63 6f64 653e 3c2f 623e 2920 -w) │ │ │ │ +00128b80: 6d75 7374 206e 6f74 2062 6520 7072 6573 must not be pres │ │ │ │ +00128b90: 656e 7420 696e 2079 6f75 7220 6865 6164 ent in your head │ │ │ │ +00128ba0: 6572 2066 696c 6520 746f 2065 6e61 626c er file to enabl │ │ │ │ +00128bb0: 6520 5753 444c 2067 656e 6572 6174 696f e WSDL generatio │ │ │ │ +00128bc0: 6e2e 3c2f 703e 0a3c 703e 4f6e 652d 7761 n.

    .

    One-wa │ │ │ │ +00128bd0: 7920 534f 4150 2d6f 7665 722d 5544 5020 y SOAP-over-UDP │ │ │ │ +00128be0: 6d65 7373 6167 6573 2028 7365 6520 5365 messages (see Se │ │ │ │ +00128bf0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction As │ │ │ │ +00128c20: 796e 6368 726f 6e6f 7573 206f 6e65 2d77 ynchronous one-w │ │ │ │ +00128c30: 6179 206d 6573 7361 6765 2070 6173 7369 ay message passi │ │ │ │ +00128c40: 6e67 3c2f 613e 2029 2073 686f 756c 6420 ng ) should │ │ │ │ +00128c50: 6265 2064 6563 6c61 7265 6420 746f 2069 be declared to i │ │ │ │ +00128c60: 6e63 6c75 6465 2074 6865 203c 656d 3e3c nclude the < │ │ │ │ +00128c70: 636f 6465 3e77 7361 3a4d 6573 7361 6765 code>wsa:Message │ │ │ │ +00128c80: 4944 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 ID, │ │ │ │ +00128c90: 3c65 6d3e 3c63 6f64 653e 7773 613a 546f wsa:To │ │ │ │ +00128ca0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 616e , an │ │ │ │ +00128cb0: 6420 3c65 6d3e 3c63 6f64 653e 7773 613a d wsa: │ │ │ │ +00128cc0: 4163 7469 6f6e 3c2f 636f 6465 3e3c 2f65 Action elements in t │ │ │ │ +00128ce0: 6865 2053 4f41 5020 4865 6164 6572 206f he SOAP Header o │ │ │ │ +00128cf0: 6620 7468 6520 7265 7175 6573 7420 6d65 f the request me │ │ │ │ +00128d00: 7373 6167 6520 6173 2066 6f6c 6c6f 7773 ssage as follows │ │ │ │ +00128d10: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    //gsoap ns s │ │ │ │ +00128d60: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he │ │ │ │ +00128d70: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: │ │ │ │ +00128d80: 2020 2020 7365 6e64 5374 7269 6e67 2077 sendString w │ │ │ │ +00128d90: 7361 5f5f 4d65 7373 6167 6549 4420 3c2f sa__MessageID
    .
    //gsoap ns s │ │ │ │ +00128de0: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he │ │ │ │ +00128df0: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: │ │ │ │ +00128e00: 2020 2020 7365 6e64 5374 7269 6e67 2077 sendString w │ │ │ │ +00128e10: 7361 5f5f 546f 203c 2f73 7061 6e3e 3c2f sa__To .
    //g │ │ │ │ +00128e50: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ +00128e60: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa │ │ │ │ +00128e70: 7274 3a20 2020 2020 2020 2020 2073 656e rt: sen │ │ │ │ +00128e80: 6453 7472 696e 6720 7773 615f 5f41 6374 dString wsa__Act │ │ │ │ +00128e90: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion
    .
    in │ │ │ │ +00128ed0: 743c 2f73 7061 6e3e 206e 735f 5f73 656e t ns__sen │ │ │ │ +00128ee0: 6453 7472 696e 6728 3c73 7061 6e20 636c dString(char *s │ │ │ │ +00128f10: 7472 2c20 3c73 7061 6e20 636c 6173 733d tr, vo │ │ │ │ +00128f30: 6964 3c2f 7370 616e 3e29 3b3c 2f64 6976 id);
    .

    Requ │ │ │ │ +00128f60: 6573 742d 7265 7370 6f6e 7365 2053 4f41 est-response SOA │ │ │ │ +00128f70: 502d 6f76 6572 2d55 4450 206d 6573 7361 P-over-UDP messa │ │ │ │ +00128f80: 6765 7320 7368 6f75 6c64 2062 6520 6465 ges should be de │ │ │ │ +00128f90: 636c 6172 6564 2074 6f20 696e 636c 7564 clared to includ │ │ │ │ +00128fa0: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the │ │ │ │ +00128fb0: 7773 613a 4d65 7373 6167 6549 443c 2f63 wsa:MessageID, < │ │ │ │ +00128fd0: 636f 6465 3e77 7361 3a54 6f3c 2f63 6f64 code>wsa:To, wsa:Action, and < │ │ │ │ +00129010: 656d 3e3c 636f 6465 3e77 7361 3a52 6570 em>wsa:Rep │ │ │ │ +00129020: 6c79 546f 3c2f 636f 6465 3e3c 2f65 6d3e lyTo │ │ │ │ +00129030: 2065 6c65 6d65 6e74 7320 696e 2074 6865 elements in the │ │ │ │ +00129040: 2053 4f41 5020 4865 6164 6572 206f 6620 SOAP Header of │ │ │ │ +00129050: 7468 6520 7265 7175 6573 7420 6d65 7373 the request mess │ │ │ │ +00129060: 6167 652c 2061 6e64 2074 6865 2074 6865 age, and the the │ │ │ │ +00129070: 203c 656d 3e3c 636f 6465 3e77 7361 3a4d wsa:M │ │ │ │ +00129080: 6573 7361 6765 4944 3c2f 636f 6465 3e3c essageID< │ │ │ │ +00129090: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, │ │ │ │ +001290a0: 7773 613a 546f 3c2f 636f 6465 3e3c 2f65 wsa:To, ws │ │ │ │ +001290c0: 613a 4163 7469 6f6e 3c2f 636f 6465 3e3c a:Action< │ │ │ │ +001290d0: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and wsa:RelatesT │ │ │ │ +001290f0: 6f3c 2f63 6f64 653e 3c2f 656d 3e20 656c o el │ │ │ │ +00129100: 656d 656e 7473 2069 6e20 7468 6520 534f ements in the SO │ │ │ │ +00129110: 4150 2048 6561 6465 7220 6f66 2074 6865 AP Header of the │ │ │ │ +00129120: 2072 6573 706f 6e73 6520 6d65 7373 6167 response messag │ │ │ │ +00129130: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +00129160: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00129170: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +00129180: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h │ │ │ │ +00129190: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: │ │ │ │ +001291a0: 2020 2020 2065 6368 6f53 7472 696e 6720 echoString │ │ │ │ +001291b0: 7773 615f 5f4d 6573 7361 6765 4944 203c wsa__MessageID < │ │ │ │ +001291c0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001291e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001291f0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +00129200: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h │ │ │ │ +00129210: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: │ │ │ │ +00129220: 2020 2020 2065 6368 6f53 7472 696e 6720 echoString │ │ │ │ +00129230: 7773 615f 5f54 6f20 3c2f 7370 616e 3e3c wsa__To < │ │ │ │ +00129240: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ +00129270: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ +00129280: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p │ │ │ │ +00129290: 6172 743a 2020 2020 2020 2020 2020 6563 art: ec │ │ │ │ +001292a0: 686f 5374 7269 6e67 2077 7361 5f5f 4163 hoString wsa__Ac │ │ │ │ +001292b0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    //gso │ │ │ │ +001292f0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me │ │ │ │ +00129300: 7468 6f64 2d69 6e70 7574 2d68 6561 6465 thod-input-heade │ │ │ │ +00129310: 722d 7061 7274 3a20 2020 2065 6368 6f53 r-part: echoS │ │ │ │ +00129320: 7472 696e 6720 7773 615f 5f52 6570 6c79 tring wsa__Reply │ │ │ │ +00129330: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    │ │ │ │ +00129340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ +00129370: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth │ │ │ │ +00129380: 6f64 2d6f 7574 7075 742d 6865 6164 6572 od-output-header │ │ │ │ +00129390: 2d70 6172 743a 2020 2065 6368 6f53 7472 -part: echoStr │ │ │ │ +001293a0: 696e 6720 7773 615f 5f52 656c 6174 6573 ing wsa__Relates │ │ │ │ +001293b0: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    │ │ │ │ +001293c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int │ │ │ │ +001293f0: 3c2f 7370 616e 3e20 6e73 5f5f 6563 686f ns__echo │ │ │ │ +00129400: 5374 7269 6e67 283c 7370 616e 2063 6c61 String(char *st │ │ │ │ +00129430: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, cha │ │ │ │ +00129450: 723c 2f73 7061 6e3e 202a 2a72 6573 293b r **res); │ │ │ │ +00129460: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    For the content │ │ │ │ +00129490: 2072 6571 7569 7265 6d65 6e74 7320 6f66 requirements of │ │ │ │ +001294a0: 2074 6865 7365 2065 6c65 6d65 6e74 732c these elements, │ │ │ │ +001294b0: 2070 6c65 6173 6520 636f 6e73 756c 7420 please consult │ │ │ │ +001294c0: 7468 6520 534f 4150 2d6f 7665 722d 5544 the SOAP-over-UD │ │ │ │ +001294d0: 5020 7370 6563 6966 6963 6174 696f 6e20 P specification │ │ │ │ +001294e0: 616e 642f 6f72 2072 6561 6420 7468 6520 and/or read the │ │ │ │ +001294f0: 6e65 7874 2073 6563 7469 6f6e 7320 6578 next sections ex │ │ │ │ +00129500: 706c 6169 6e69 6e67 2053 4f41 502d 6f76 plaining SOAP-ov │ │ │ │ +00129510: 6572 2d55 4450 2075 6e69 6361 7374 2c20 er-UDP unicast, │ │ │ │ +00129520: 6d75 6c74 6963 6173 742c 206f 6e65 2d77 multicast, one-w │ │ │ │ +00129530: 6179 2c20 616e 6420 7265 7175 6573 742d ay, and request- │ │ │ │ +00129540: 7265 7370 6f6e 7365 2063 6c69 656e 7420 response client │ │ │ │ +00129550: 616e 6420 7365 7276 6572 2061 7070 6c69 and server appli │ │ │ │ +00129560: 6361 7469 6f6e 732e 3c2f 703e 0a3c 703e cations.

    .

    │ │ │ │ +00129570: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +00129590: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Clien │ │ │ │ +001295d0: 742d 7369 6465 206f 6e65 2d77 6179 2055 t-side one-way U │ │ │ │ +001295e0: 4450 2075 6e69 6361 7374 3c2f 6833 3e0a DP unicast

    . │ │ │ │ +001295f0: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example │ │ │ │ +00129600: 6173 7375 6d65 7320 7468 6174 2074 6865 assumes that the │ │ │ │ +00129610: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ +00129620: 7220 6669 6c65 2069 6e63 6c75 6465 7320 r file includes │ │ │ │ +00129630: 7468 6520 534f 4150 2048 6561 6465 7220 the SOAP Header │ │ │ │ +00129640: 7769 7468 2057 532d 4164 6472 6573 7369 with WS-Addressi │ │ │ │ +00129650: 6e67 2065 6c65 6d65 6e74 732c 2073 6565 ng elements, see │ │ │ │ +00129660: 203c 6120 636c 6173 733d 2265 6c22 2068 The W │ │ │ │ +00129690: 532d 4164 6472 6573 7369 6e67 2070 6c75 S-Addressing plu │ │ │ │ +001296a0: 6769 6e3c 2f61 3e2c 2061 6e64 2074 6865 gin, and the │ │ │ │ +001296b0: 203c 636f 6465 3e6e 735f 5f73 656e 6453 ns__sendS │ │ │ │ +001296c0: 7472 696e 673c 2f63 6f64 653e 2066 756e tring fun │ │ │ │ +001296d0: 6374 696f 6e20 6469 7363 7573 7365 6420 ction discussed │ │ │ │ +001296e0: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Using WS-Addre │ │ │ │ +00129720: 7373 696e 6720 7769 7468 2053 4f41 502d ssing with SOAP- │ │ │ │ +00129730: 6f76 6572 2d55 4450 3c2f 613e 2e3c 2f70 over-UDP.

    .
    #include &q │ │ │ │ +00129790: 756f 743b 706c 7567 696e 2f77 7361 6170 uot;plugin/wsaap │ │ │ │ +001297a0: 692e 6826 7175 6f74 3b3c 2f73 7061 6e3e i.h" │ │ │ │ +001297b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ 001297d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    struct soap │ │ │ │ -00129850: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -00129880: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ -001298f0: 736f 6170 5f69 6e69 743c 2f61 3e28 2661 soap_init(&a │ │ │ │ -00129900: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    soap_register_ │ │ │ │ -001299b0: 706c 7567 696e 3c2f 613e 2826 616d 703b plugin(& │ │ │ │ -001299c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -001299f0: 2073 6f61 705f 7773 6129 3b3c 2f64 6976 soap_wsa);
    .
    soap< │ │ │ │ -00129a40: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.sen │ │ │ │ -00129a90: 645f 7469 6d65 6f75 743c 2f61 3e20 3d20 d_timeout = │ │ │ │ -00129aa0: 353b 203c 7370 616e 2063 6c61 7373 3d22 5; // 5 se │ │ │ │ -00129ac0: 636f 6e64 7320 6d61 7820 736f 636b 6574 conds max socket │ │ │ │ -00129ad0: 2064 656c 6179 203c 2f73 7061 6e3e 3c2f delay .
    // │ │ │ │ -00129b10: 7365 7420 7570 2057 532d 4164 6472 6573 set up WS-Addres │ │ │ │ -00129b20: 7369 6e67 2068 6561 6465 723c 2f73 7061 sing header
    .
    soap_ │ │ │ │ -00129b50: 7773 615f 7265 7175 6573 7428 2661 6d70 wsa_request(& │ │ │ │ -00129b60: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -00129b90: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -00129bb0: 756f 743b 6d65 7373 6167 6520 4944 2671 uot;message ID&q │ │ │ │ -00129bc0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "e │ │ │ │ -00129bf0: 6e64 706f 696e 7426 7175 6f74 3b3c 2f73 ndpoint", "SOAP act │ │ │ │ -00129c30: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion" │ │ │ │ -00129c40: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    // Send the mes │ │ │ │ -00129c80: 7361 6765 206f 7665 7220 5544 503a 203c sage over UDP: < │ │ │ │ -00129c90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -00129cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00129cc0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (soap_send_ns │ │ │ │ -00129ce0: 5f5f 6563 686f 5374 7269 6e67 2826 616d __echoString(&am │ │ │ │ -00129cf0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, & │ │ │ │ -00129d40: 7175 6f74 3b73 6f61 702e 7564 703a 2f2f quot;soap.udp:// │ │ │ │ -00129d50: 656e 6470 6f69 6e74 2671 756f 743b 3c2f endpoint", "SOAP ac │ │ │ │ -00129d90: 7469 6f6e 2671 756f 743b 3c2f 7370 616e tion", & │ │ │ │ -00129dc0: 7175 6f74 3b68 656c 6c6f 2077 6f72 6c64 quot;hello world │ │ │ │ -00129dd0: 2126 7175 6f74 3b3c 2f73 7061 6e3e 2929 !")) │ │ │ │ -00129de0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s │ │ │ │ -00129e50: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault< │ │ │ │ -00129e60: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ -00129e90: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr │ │ │ │ -00129ea0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // erro │ │ │ │ -00129ec0: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    . │ │ │ │ -00129ed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_dest │ │ │ │ -00129f40: 726f 793c 2f61 3e28 2661 6d70 3b3c 6120 roy(&soap);.
    soap │ │ │ │ -00129ff0: 5f65 6e64 3c2f 613e 2826 616d 703b 3c61 _end(&soap);< │ │ │ │ -0012a030: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ -0012a0a0: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(& │ │ │ │ -0012a0b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -0012a0e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -0012a150: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_regi │ │ │ │ -0012a1a0: 7374 6572 5f70 6c75 6769 6e3c 2f61 3e3c ster_plugin< │ │ │ │ -0012a1b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa │ │ │ │ -0012a1d0: 705f 7265 6769 7374 6572 5f70 6c75 6769 p_register_plugi │ │ │ │ -0012a1e0: 6e28 7374 7275 6374 2073 6f61 7020 2a73 n(struct soap *s │ │ │ │ -0012a1f0: 6f61 702c 2069 6e74 282a 6663 7265 6174 oap, int(*fcreat │ │ │ │ -0012a200: 6529 2873 7472 7563 7420 736f 6170 202a e)(struct soap * │ │ │ │ -0012a210: 2c20 7374 7275 6374 2073 6f61 705f 706c , struct soap_pl │ │ │ │ -0012a220: 7567 696e 202a 2c20 766f 6964 202a 2929 ugin *, void *)) │ │ │ │ -0012a230: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Registe │ │ │ │ -0012a250: 7220 6120 706c 7567 696e 2e3c 2f64 6976 r a plugin.
    .
    < │ │ │ │ -0012a280: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -0012a2a0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -0012a2b0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .C │ │ │ │ -0012a2e0: 6c69 656e 742d 7369 6465 206f 6e65 2d77 lient-side one-w │ │ │ │ -0012a2f0: 6179 2055 4450 206d 756c 7469 6361 7374 ay UDP multicast │ │ │ │ -0012a300: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6578

    .

    This ex │ │ │ │ -0012a310: 616d 706c 6520 6973 2073 696d 696c 6172 ample is similar │ │ │ │ -0012a320: 2074 6f20 7468 6520 6f6e 652d 7761 7920 to the one-way │ │ │ │ -0012a330: 756e 6963 6173 7420 6578 616d 706c 6520 unicast example │ │ │ │ -0012a340: 6469 7363 7573 7365 6420 6162 6f76 652c discussed above, │ │ │ │ -0012a350: 2062 7574 2075 7365 7320 6120 6272 6f61 but uses a broa │ │ │ │ -0012a360: 6463 6173 7420 6164 6472 6573 7320 616e dcast address an │ │ │ │ -0012a370: 6420 7468 6520 3c63 6f64 653e 534f 5f42 d the SO_B │ │ │ │ -0012a380: 524f 4144 4341 5354 3c2f 636f 6465 3e20 ROADCAST │ │ │ │ -0012a390: 736f 636b 6574 206f 7074 696f 6e3a 3c2f socket option:.

    #include & │ │ │ │ -0012a3f0: 7175 6f74 3b70 6c75 6769 6e2f 7773 6161 quot;plugin/wsaa │ │ │ │ -0012a400: 7069 2e68 2671 756f 743b 3c2f 7370 616e pi.h"
    .
    .. │ │ │ │ -0012a4d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    in_addr_t addr │ │ │ │ -0012a4f0: 203d 2069 6e65 745f 6164 6472 283c 7370 = inet_addr("1 │ │ │ │ -0012a520: 2e32 2e33 2e34 2671 756f 743b 3c2f 7370 .2.3.4"); // o │ │ │ │ -0012a550: 7074 696f 6e61 6c20 3c2f 7370 616e 3e3c ptional < │ │ │ │ -0012a560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ -0012a5d0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(& │ │ │ │ -0012a5e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -0012a610: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..< │ │ │ │ -0012a6e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012a6f0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ -0012a720: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .send_t │ │ │ │ -0012a770: 696d 656f 7574 3c2f 613e 203d 2035 3b20 imeout = 5; │ │ │ │ -0012a780: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // 5 secon │ │ │ │ -0012a7a0: 6473 206d 6178 2073 6f63 6b65 7420 6465 ds max socket de │ │ │ │ -0012a7b0: 6c61 793c 2f73 7061 6e3e 3c2f 6469 763e lay
    │ │ │ │ -0012a7c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.conn │ │ │ │ -0012a850: 6563 745f 666c 6167 733c 2f61 3e20 3d20 ect_flags = │ │ │ │ -0012a860: 534f 5f42 524f 4144 4341 5354 3b20 3c73 SO_BROADCAST; // required │ │ │ │ -0012a890: 666f 7220 6272 6f61 6463 6173 7420 3c2f for broadcast
    .
    soap.ipv4_mult │ │ │ │ -0012a940: 6963 6173 745f 6966 3c2f 613e 203d 2026 icast_if = & │ │ │ │ -0012a950: 616d 703b 6164 6472 3b20 3c73 7061 6e20 amp;addr; │ │ │ │ -0012a970: 2f2f 206f 7074 696f 6e61 6c20 666f 7220 // optional for │ │ │ │ -0012a980: 4950 7634 3a20 7365 6520 7365 7473 6f63 IPv4: see setsoc │ │ │ │ -0012a990: 6b6f 7074 2049 5050 524f 544f 5f49 5020 kopt IPPROTO_IP │ │ │ │ -0012a9a0: 4950 5f4d 554c 5449 4341 5354 5f49 4620 IP_MULTICAST_IF │ │ │ │ -0012a9b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0012a9d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap. │ │ │ │ -0012aa00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 ipv6_mu │ │ │ │ -0012aa50: 6c74 6963 6173 745f 6966 3c2f 613e 203d lticast_if = │ │ │ │ -0012aa60: 2061 6464 723b 203c 7370 616e 2063 6c61 addr; // │ │ │ │ -0012aa80: 6f70 7469 6f6e 616c 2066 6f72 2049 5076 optional for IPv │ │ │ │ -0012aa90: 363a 206d 756c 7469 6361 7374 2073 696e 6: multicast sin │ │ │ │ -0012aaa0: 365f 7363 6f70 655f 6964 203c 2f73 7061 6_scope_id
    .
    soap.ipv4_multica │ │ │ │ -0012ab50: 7374 5f74 746c 3c2f 613e 203d 2031 3b20 st_ttl = 1; │ │ │ │ -0012ab60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona │ │ │ │ -0012ab80: 6c2c 2073 6565 2073 6574 736f 636b 6f70 l, see setsockop │ │ │ │ -0012ab90: 7420 4950 5052 4f54 4f5f 4950 2c20 4950 t IPPROTO_IP, IP │ │ │ │ -0012aba0: 5f4d 554c 5449 4341 5354 5f54 544c 203c _MULTICAST_TTL < │ │ │ │ -0012abb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0012abd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0012abe0: 656e 7422 3e2f 2f20 7365 7420 7570 2057 ent">// set up W │ │ │ │ -0012abf0: 532d 4164 6472 6573 7369 6e67 2068 6561 S-Addressing hea │ │ │ │ -0012ac00: 6465 723c 2f73 7061 6e3e 3c2f 6469 763e der
    │ │ │ │ -0012ac10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_wsa_requ │ │ │ │ -0012ac30: 6573 7428 2661 6d70 3b3c 6120 636c 6173 est(& │ │ │ │ -0012ac60: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "mess │ │ │ │ -0012ac90: 6167 6520 4944 2671 756f 743b 3c2f 7370 age ID", "endpoint& │ │ │ │ -0012acd0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, " │ │ │ │ -0012ad00: 534f 4150 2061 6374 696f 6e26 7175 6f74 SOAP action" │ │ │ │ -0012ad10: 3b3c 2f73 7061 6e3e 293b 3c2f 6469 763e ;);
    │ │ │ │ -0012ad20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // Send │ │ │ │ -0012ad50: 2074 6865 206d 6573 7361 6765 206f 7665 the message ove │ │ │ │ -0012ad60: 7220 5544 5020 746f 2061 2062 726f 6164 r UDP to a broad │ │ │ │ -0012ad70: 6361 7374 2061 6464 7265 7373 3a20 3c2f cast address:
    .
    if (soap_send_ns_ │ │ │ │ -0012add0: 5f65 6368 6f53 7472 696e 6728 2661 6d70 _echoString(& │ │ │ │ -0012ade0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -0012ae10: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -0012ae30: 756f 743b 736f 6170 2e75 6470 3a2f 2f65 uot;soap.udp://e │ │ │ │ -0012ae40: 6e64 706f 696e 7426 7175 6f74 3b3c 2f73 ndpoint", "SOAP act │ │ │ │ -0012ae80: 696f 6e26 7175 6f74 3b3c 2f73 7061 6e3e ion" │ │ │ │ -0012ae90: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -0012aeb0: 756f 743b 6865 6c6c 6f20 776f 726c 6421 uot;hello world! │ │ │ │ -0012aec0: 2671 756f 743b 3c2f 7370 616e 3e29 2920 ")) │ │ │ │ -0012aed0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so │ │ │ │ -0012af40: 6170 5f70 7269 6e74 5f66 6175 6c74 3c2f ap_print_fault(&s │ │ │ │ -0012af80: 6f61 703c 2f61 3e2c 2073 7464 6572 7229 oap, stderr) │ │ │ │ -0012af90: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // repor │ │ │ │ -0012afb0: 7420 6572 726f 7220 3c2f 7370 616e 3e3c t error < │ │ │ │ -0012afc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ -0012b030: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a │ │ │ │ -0012b040: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    soap_end(& │ │ │ │ -0012b0f0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ -0012b120: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .
    soap_done │ │ │ │ -0012b1a0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -0012b1d0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    . │ │ │ │ -0012b2d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl │ │ │ │ -0012b2f0: 6520 7661 6c75 6520 746f 2073 6574 2073 e value to set s │ │ │ │ -0012b300: 6f63 6b61 6464 725f 696e 363a 3a73 696e ockaddr_in6::sin │ │ │ │ -0012b310: 365f 7363 6f70 655f 6964 2077 6865 6e20 6_scope_id when │ │ │ │ -0012b320: 6e6f 6e7a 6572 6f2e 3c2f 6469 763e 3c64 nonzero.
    Definition:< │ │ │ │ -0012b350: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3 │ │ │ │ -0012b360: 3539 323c 2f64 6976 3e3c 2f64 6976 3e0a 592
    . │ │ │ │ -0012b370: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::c │ │ │ │ -0012b410: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags │ │ │ │ -0012b420: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int co │ │ │ │ -0012b440: 6e6e 6563 745f 666c 6167 733c 2f64 6976 nnect_flags
    User-definab │ │ │ │ -0012b470: 6c65 2073 6574 736f 636b 6f70 7420 6c65 le setsockopt le │ │ │ │ -0012b480: 7665 6c20 534f 4c5f 534f 434b 4554 2066 vel SOL_SOCKET f │ │ │ │ -0012b490: 6c61 6773 2077 6865 6e20 636f 6e6e 6563 lags when connec │ │ │ │ -0012b4a0: 7469 6e67 2073 6f61 703a 3a73 6f63 6b65 ting soap::socke │ │ │ │ -0012b4b0: 7420 746f 2061 2073 6572 7665 7220 2874 t to a server (t │ │ │ │ -0012b4c0: 6865 2076 616c 7565 202e 2e2e 3c2f 6469 he value ...
    Definiti │ │ │ │ -0012b4f0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ -0012b500: 2e68 3a33 3337 373c 2f64 6976 3e3c 2f64 .h:3377
    .< │ │ │ │ -0012b5d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0012b5e0: 6922 3e75 6e73 6967 6e65 6420 6368 6172 i">unsigned char │ │ │ │ -0012b5f0: 2069 7076 345f 6d75 6c74 6963 6173 745f ipv4_multicast_ │ │ │ │ -0012b600: 7474 6c3c 2f64 6976 3e3c 6469 7620 636c ttl
    User │ │ │ │ -0012b620: 2d64 6566 696e 6162 6c65 2076 616c 7565 -definable value │ │ │ │ -0012b630: 2074 6f20 7365 7420 7365 7473 6f63 6b6f to set setsocko │ │ │ │ -0012b640: 7074 206c 6576 656c 2049 5050 524f 544f pt level IPPROTO │ │ │ │ -0012b650: 5f49 5020 746f 2049 505f 4d55 4c54 4943 _IP to IP_MULTIC │ │ │ │ -0012b660: 4153 545f 5454 4c20 7768 656e 206e 6f6e AST_TTL when non │ │ │ │ -0012b670: 7a65 726f 2e3c 2f64 6976 3e3c 6469 7620 zero.
    Definition: │ │ │ │ -0012b6a0: 2073 7464 736f 6170 322e 683a 3336 3230 stdsoap2.h:3620 │ │ │ │ -0012b6b0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    char │ │ │ │ -0012b790: 2a20 6970 7634 5f6d 756c 7469 6361 7374 * ipv4_multicast │ │ │ │ -0012b7a0: 5f69 663c 2f64 6976 3e3c 6469 7620 636c _if
    User │ │ │ │ -0012b7c0: 2d64 6566 696e 6162 6c65 2076 616c 7565 -definable value │ │ │ │ -0012b7d0: 2074 6f20 7365 7420 7365 7473 6f63 6b6f to set setsocko │ │ │ │ -0012b7e0: 7074 206c 6576 656c 2049 5050 524f 544f pt level IPPROTO │ │ │ │ -0012b7f0: 5f49 5020 746f 2049 505f 4d55 4c54 4943 _IP to IP_MULTIC │ │ │ │ -0012b800: 4153 545f 4946 2077 6865 6e20 6e6f 6e2d AST_IF when non- │ │ │ │ -0012b810: 4e55 4c4c 2e3c 2f64 6976 3e3c 6469 7620 NULL.
    Definition: │ │ │ │ -0012b840: 2073 7464 736f 6170 322e 683a 3335 3939 stdsoap2.h:3599 │ │ │ │ -0012b850: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    Please re │ │ │ │ -0012b880: 6665 7220 746f 2074 6865 2073 6f63 6b65 fer to the socke │ │ │ │ -0012b890: 7420 6f70 7469 6f6e 7320 666f 7220 3c63 t options for IPPROTO_IP IP_M │ │ │ │ -0012b8c0: 554c 5449 4341 5354 5f49 463c 2f63 6f64 ULTICAST_IF to specify th │ │ │ │ -0012b8e0: 6520 6465 6661 756c 7420 696e 7465 7266 e default interf │ │ │ │ -0012b8f0: 6163 6520 666f 7220 6d75 6c74 6963 6173 ace for multicas │ │ │ │ -0012b900: 7420 6461 7461 6772 616d 7320 746f 2062 t datagrams to b │ │ │ │ -0012b910: 6520 7365 6e74 2066 726f 6d2e 2054 6869 e sent from. Thi │ │ │ │ -0012b920: 7320 6973 2061 203c 636f 6465 3e73 7472 s is a str │ │ │ │ -0012b930: 7563 7420 696e 5f61 6464 723c 2f63 6f64 uct in_addr (in_add │ │ │ │ -0012b950: 725f 743c 2f63 6f64 653e 2066 6f72 203c r_t for < │ │ │ │ -0012b960: 636f 6465 3e73 696e 365f 7363 6f70 655f code>sin6_scope_ │ │ │ │ -0012b970: 6964 3c2f 636f 6465 3e29 2069 6e74 6572 id) inter │ │ │ │ -0012b980: 6661 6365 2076 616c 7565 2e20 4f74 6865 face value. Othe │ │ │ │ -0012b990: 7277 6973 652c 2074 6865 2064 6566 6175 rwise, the defau │ │ │ │ -0012b9a0: 6c74 2069 6e74 6572 6661 6365 2073 6574 lt interface set │ │ │ │ -0012b9b0: 2062 7920 7468 6520 7379 7374 656d 2061 by the system a │ │ │ │ -0012b9c0: 646d 696e 6973 7472 6174 6f72 2077 696c dministrator wil │ │ │ │ -0012b9d0: 6c20 6265 2075 7365 6420 2869 6620 616e l be used (if an │ │ │ │ -0012b9e0: 7929 2e3c 2f70 3e0a 3c70 3e50 6c65 6173 y).

    .

    Pleas │ │ │ │ -0012b9f0: 6520 7265 6665 7220 746f 2074 6865 2073 e refer to the s │ │ │ │ -0012ba00: 6f63 6b65 7420 6f70 7469 6f6e 7320 666f ocket options fo │ │ │ │ -0012ba10: 7220 3c63 6f64 653e 4950 5052 4f54 4f5f r IPPROTO_ │ │ │ │ -0012ba20: 4950 3c2f 636f 6465 3e20 3c63 6f64 653e IP │ │ │ │ -0012ba30: 4950 5f4d 554c 5449 4341 5354 5f54 544c IP_MULTICAST_TTL │ │ │ │ -0012ba40: 3c2f 636f 6465 3e20 746f 206c 696d 6974 to limit │ │ │ │ -0012ba50: 2074 6865 206c 6966 6574 696d 6520 6f66 the lifetime of │ │ │ │ -0012ba60: 2074 6865 2070 6163 6b65 742e 204d 756c the packet. Mul │ │ │ │ -0012ba70: 7469 6361 7374 2064 6174 6167 7261 6d73 ticast datagrams │ │ │ │ -0012ba80: 2061 7265 2073 656e 7420 7769 7468 2061 are sent with a │ │ │ │ -0012ba90: 2064 6566 6175 6c74 2076 616c 7565 206f default value o │ │ │ │ -0012baa0: 6620 312c 2074 6f20 7072 6576 656e 7420 f 1, to prevent │ │ │ │ -0012bab0: 7468 656d 2074 6f20 6265 2066 6f72 7761 them to be forwa │ │ │ │ -0012bac0: 7264 6564 2062 6579 6f6e 6420 7468 6520 rded beyond the │ │ │ │ -0012bad0: 6c6f 6361 6c20 6e65 7477 6f72 6b2e 2054 local network. T │ │ │ │ -0012bae0: 6869 7320 7061 7261 6d65 7465 7220 6361 his parameter ca │ │ │ │ -0012baf0: 6e20 6265 2073 6574 2062 6574 7765 656e n be set between │ │ │ │ -0012bb00: 2031 2074 6f20 3235 352e 3c2f 703e 0a3c 1 to 255.

    .< │ │ │ │ -0012bb10: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -0012bb30: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -0012bb40: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .Clie │ │ │ │ -0012bb80: 6e74 2d73 6964 6520 7265 7175 6573 742d nt-side request- │ │ │ │ -0012bb90: 7265 7370 6f6e 7365 2055 4450 2075 6e69 response UDP uni │ │ │ │ -0012bba0: 6361 7374 3c2f 6833 3e0a 3c70 3e54 6869 cast

    .

    Thi │ │ │ │ -0012bbb0: 7320 6578 616d 706c 6520 6173 7375 6d65 s example assume │ │ │ │ -0012bbc0: 7320 7468 6174 2074 6865 2069 6e74 6572 s that the inter │ │ │ │ -0012bbd0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ -0012bbe0: 2066 6f72 2073 6f61 7063 7070 3220 696e for soapcpp2 in │ │ │ │ -0012bbf0: 636c 7564 6573 2074 6865 2053 4f41 5020 cludes the SOAP │ │ │ │ -0012bc00: 4865 6164 6572 2077 6974 6820 5753 2d41 Header with WS-A │ │ │ │ -0012bc10: 6464 7265 7373 696e 6720 656c 656d 656e ddressing elemen │ │ │ │ -0012bc20: 7473 2069 6d70 6f72 7465 6420 7769 7468 ts imported with │ │ │ │ -0012bc30: 203c 636f 6465 3e23 696d 706f 7274 2022 #import " │ │ │ │ -0012bc40: 7773 612e 6822 3c2f 636f 6465 3e20 616e wsa.h" an │ │ │ │ -0012bc50: 6420 7468 6520 3c63 6f64 653e 6e73 5f5f d the ns__ │ │ │ │ -0012bc60: 6563 686f 5374 7269 6e67 3c2f 636f 6465 echoString function discu │ │ │ │ -0012bc80: 7373 6564 2069 6e20 5365 6374 696f 6e20 ssed in Section │ │ │ │ -0012bc90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Using WS- │ │ │ │ -0012bcc0: 4164 6472 6573 7369 6e67 2077 6974 6820 Addressing with │ │ │ │ -0012bcd0: 534f 4150 2d6f 7665 722d 5544 503c 2f61 SOAP-over-UDP .

    .
    │ │ │ │ -0012bd10: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ -0012bd30: 7564 6520 2671 756f 743b 706c 7567 696e ude "plugin │ │ │ │ -0012bd40: 2f77 7361 6170 692e 6826 7175 6f74 3b3c /wsaapi.h"< │ │ │ │ -0012bd50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -0012bd70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ -0012bda0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    str │ │ │ │ -0012be40: 7563 7420 3c2f 7370 616e 3e77 7361 5f5f uct wsa__ │ │ │ │ -0012be50: 456e 6470 6f69 6e74 5265 6665 7265 6e63 EndpointReferenc │ │ │ │ -0012be60: 6554 7970 6520 7265 706c 7954 6f3b 203c eType replyTo; < │ │ │ │ -0012be70: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0012be80: 656e 7422 3e2f 2f20 2861 6e6f 6e79 6d6f ent">// (anonymo │ │ │ │ -0012be90: 7573 2920 7265 706c 7920 6164 6472 6573 us) reply addres │ │ │ │ -0012bea0: 7320 3c2f 7370 616e 3e3c 2f64 6976 3e0a s
    . │ │ │ │ -0012beb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    char │ │ │ │ -0012bee0: 3c2f 7370 616e 3e20 2a72 6573 3b20 3c73 *res; // server re │ │ │ │ -0012bf10: 7370 6f6e 7365 203c 2f73 7061 6e3e 3c2f sponse .
    soap │ │ │ │ -0012bf90: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&< │ │ │ │ -0012bfa0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0012bfb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0012bfc0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ -0012bfd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .. │ │ │ │ -0012c0b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap. │ │ │ │ -0012c0e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 send_ti │ │ │ │ -0012c130: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; < │ │ │ │ -0012c140: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0012c150: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent">// 5 second │ │ │ │ -0012c160: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del │ │ │ │ -0012c170: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    │ │ │ │ -0012c180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.recv │ │ │ │ -0012c210: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5 │ │ │ │ -0012c220: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec │ │ │ │ -0012c240: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket │ │ │ │ -0012c250: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    // s │ │ │ │ -0012c290: 6574 2075 7020 5753 2d41 6464 7265 7373 et up WS-Address │ │ │ │ -0012c2a0: 696e 6720 6865 6164 6572 3c2f 7370 616e ing header
    .
    soap_w │ │ │ │ -0012c2d0: 7361 5f72 6571 7565 7374 2826 616d 703b sa_request(& │ │ │ │ -0012c2e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -0012c310: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -0012c330: 6f74 3b6d 6573 7361 6765 2049 4426 7175 ot;message ID&qu │ │ │ │ -0012c340: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "en │ │ │ │ -0012c370: 6470 6f69 6e74 2671 756f 743b 3c2f 7370 dpoint", "SOAP acti │ │ │ │ -0012c3b0: 6f6e 2671 756f 743b 3c2f 7370 616e 3e29 on") │ │ │ │ -0012c3c0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_w │ │ │ │ -0012c3e0: 7361 5f61 6464 5f52 6570 6c79 546f 2826 sa_add_ReplyTo(& │ │ │ │ -0012c3f0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ -0012c420: 2f61 3e2c 204e 554c 4c29 3b20 3c73 7061 /a>, NULL); // anonymous R │ │ │ │ -0012c450: 6570 6c79 546f 2061 6464 7265 7373 3c2f eplyTo address
    .
    // Send and │ │ │ │ -0012c4a0: 7265 6365 6976 6520 6d65 7373 6167 6573 receive messages │ │ │ │ -0012c4b0: 206f 7665 7220 5544 503a 203c 2f73 7061 over UDP:
    .
    if ( │ │ │ │ -0012c500: 736f 6170 5f63 616c 6c5f 6e73 5f5f 6563 soap_call_ns__ec │ │ │ │ -0012c510: 686f 5374 7269 6e67 2826 616d 703b 3c61 hoString(&soap, < │ │ │ │ -0012c550: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -0012c560: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -0012c570: 3b73 6f61 702e 7564 703a 2f2f 656e 6470 ;soap.udp://endp │ │ │ │ -0012c580: 6f69 6e74 2026 7175 6f74 3b3c 2f73 7061 oint "SOAP action", │ │ │ │ -0012c5c0: 2026 7175 6f74 3b3c 2f73 7061 6e3e 6865 "he │ │ │ │ -0012c5d0: 6c6c 6f20 776f 726c 6421 3c73 7061 6e20 llo world!", &a │ │ │ │ -0012c600: 6d70 3b72 6573 2929 203c 2f73 7061 6e3e mp;res)) │ │ │ │ -0012c610: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    if (soap.err │ │ │ │ -0012c690: 6f72 203d 3d20 534f 4150 5f45 4f46 2026 or == SOAP_EOF & │ │ │ │ -0012c6a0: 616d 703b 2661 6d70 3b20 736f 6170 2e65 amp;& soap.e │ │ │ │ -0012c6b0: 7272 6e75 6d20 3d3d 2030 2920 3c2f 7370 rrnum == 0)
    .
    ... │ │ │ │ -0012c700: 2f2f 2054 696d 656f 7574 3a20 6e6f 2072 // Timeout: no r │ │ │ │ -0012c710: 6573 706f 6e73 6520 6672 6f6d 2073 6572 esponse from ser │ │ │ │ -0012c720: 7665 7220 286d 6573 7361 6765 2061 6c72 ver (message alr │ │ │ │ -0012c730: 6561 6479 2064 656c 6976 6572 6564 3f29 eady delivered?) │ │ │ │ -0012c740: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0012c750: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012c760: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 > e │ │ │ │ -0012c780: 6c73 6520 3c2f 7370 616e 3e3c 2f64 6976 lse
    .
    │ │ │ │ -0012c7c0: 2020 2020 736f 6170 5f70 7269 6e74 5f66 soap_print_f │ │ │ │ -0012c7d0: 6175 6c74 2826 616d 703b 736f 6170 2c20 ault(&soap, │ │ │ │ -0012c7e0: 7374 6465 7272 293b 203c 2f73 7061 6e3e stderr); │ │ │ │ -0012c7f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    else < │ │ │ │ -0012c870: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // UDP │ │ │ │ -0012c8b0: 2073 6572 7665 7220 7265 7370 6f6e 7365 server response │ │ │ │ -0012c8c0: 2069 7320 7374 6f72 6564 2069 6e20 2623 is stored in &# │ │ │ │ -0012c8d0: 3339 3b72 6573 2623 3339 3b20 3c2f 7370 39;res'
    .
    // check │ │ │ │ -0012c920: 2053 4f41 5020 6865 6164 6572 2072 6563 SOAP header rec │ │ │ │ -0012c930: 6569 7665 642c 2069 6620 6170 706c 6963 eived, if applic │ │ │ │ -0012c940: 6162 6c65 203c 2f73 7061 6e3e 3c2f 6469 able .
    check_header(&a │ │ │ │ -0012c990: 6d70 3b73 6f61 702e 6865 6164 6572 293b mp;soap.header); │ │ │ │ -0012c9a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0012c9b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012c9c0: 3e3c 7370 616e 2063 6c61 7373 3d22 7374 >soa │ │ │ │ -0012c9e0: 705f 6465 7374 726f 7928 2661 6d70 3b73 p_destroy(&s │ │ │ │ -0012c9f0: 6f61 7029 3b3c 2f73 7061 6e3e 3c2f 6469 oap);.
    soap_end(&s │ │ │ │ -0012ca40: 6f61 7029 3b3c 2f73 7061 6e3e 3c2f 6469 oap);.
    soap_done(& │ │ │ │ -0012ca90: 736f 6170 293b 3c2f 7370 616e 3e3c 2f64 soap);.

    .. │ │ │ │ -0012cac0: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ -0012cad0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ -0012cae0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ -0012caf0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .Client │ │ │ │ -0012cb30: 2d73 6964 6520 7265 7175 6573 742d 7265 -side request-re │ │ │ │ -0012cb40: 7370 6f6e 7365 206d 756c 7469 6361 7374 sponse multicast │ │ │ │ -0012cb50: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6578

    .

    This ex │ │ │ │ -0012cb60: 616d 706c 6520 6973 2073 696d 696c 6172 ample is similar │ │ │ │ -0012cb70: 2074 6f20 7468 6520 7265 7175 6573 742d to the request- │ │ │ │ -0012cb80: 7265 7370 6f6e 7365 2075 6e69 6361 7374 response unicast │ │ │ │ -0012cb90: 2065 7861 6d70 6c65 2064 6973 6375 7373 example discuss │ │ │ │ -0012cba0: 6564 2061 626f 7665 2c20 6275 7420 7573 ed above, but us │ │ │ │ -0012cbb0: 6573 2061 2062 726f 6164 6361 7374 2061 es a broadcast a │ │ │ │ -0012cbc0: 6464 7265 7373 2061 6e64 2074 6865 203c ddress and the < │ │ │ │ -0012cbd0: 636f 6465 3e53 4f5f 4252 4f41 4443 4153 code>SO_BROADCAS │ │ │ │ -0012cbe0: 543c 2f63 6f64 653e 2073 6f63 6b65 7420 T socket │ │ │ │ -0012cbf0: 6f70 7469 6f6e 2e20 4265 6361 7573 6520 option. Because │ │ │ │ -0012cc00: 7765 2065 7870 6563 7420 746f 2072 6563 we expect to rec │ │ │ │ -0012cc10: 6569 7665 206d 756c 7469 706c 6520 7265 eive multiple re │ │ │ │ -0012cc20: 7370 6f6e 7365 732c 2077 6520 616c 736f sponses, we also │ │ │ │ -0012cc30: 206e 6565 6420 746f 2075 7365 2073 6570 need to use sep │ │ │ │ -0012cc40: 6172 6174 6520 7265 7175 6573 742d 7265 arate request-re │ │ │ │ -0012cc50: 7370 6f6e 7365 206d 6573 7361 6765 7320 sponse messages │ │ │ │ -0012cc60: 746f 2073 656e 6420 6f6e 6520 7265 7175 to send one requ │ │ │ │ -0012cc70: 6573 7420 616e 6420 636f 6e73 756d 6520 est and consume │ │ │ │ -0012cc80: 6d75 6c74 6970 6c65 2072 6573 706f 6e73 multiple respons │ │ │ │ -0012cc90: 6573 2e20 496e 2074 6869 7320 6578 616d es. In this exam │ │ │ │ -0012cca0: 706c 6520 7765 2064 6566 696e 6564 2061 ple we defined a │ │ │ │ -0012ccb0: 203c 636f 6465 3e62 6361 7374 5374 7269 bcastStri │ │ │ │ -0012ccc0: 6e67 3c2f 636f 6465 3e20 7265 7175 6573 ng reques │ │ │ │ -0012ccd0: 7420 616e 6420 6120 3c63 6f64 653e 6263 t and a bc │ │ │ │ -0012cce0: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons │ │ │ │ -0012ccf0: 653c 2f63 6f64 653e 2072 6573 706f 6e73 e respons │ │ │ │ -0012cd00: 6520 6d65 7373 6167 652c 2077 6869 6368 e message, which │ │ │ │ -0012cd10: 2061 7265 2065 7373 656e 7469 616c 6c79 are essentially │ │ │ │ -0012cd20: 2064 6563 6c61 7265 6420 6173 206f 6e65 declared as one │ │ │ │ -0012cd30: 2d77 6179 206d 6573 7361 6765 7320 696e -way messages in │ │ │ │ -0012cd40: 2074 6865 2068 6561 6465 7220 6669 6c65 the header file │ │ │ │ -0012cd50: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    //gsoap ns s │ │ │ │ -0012cda0: 6572 7669 6365 206d 6574 686f 642d 6865 ervice method-he │ │ │ │ -0012cdb0: 6164 6572 2d70 6172 743a 2020 2020 2020 ader-part: │ │ │ │ -0012cdc0: 2020 2020 6263 6173 7453 7472 696e 6720 bcastString │ │ │ │ -0012cdd0: 7773 615f 5f4d 6573 7361 6765 4944 203c wsa__MessageID < │ │ │ │ -0012cde0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0012ce00: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0012ce10: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ -0012ce20: 7365 7276 6963 6520 6d65 7468 6f64 2d68 service method-h │ │ │ │ -0012ce30: 6561 6465 722d 7061 7274 3a20 2020 2020 eader-part: │ │ │ │ -0012ce40: 2020 2020 2062 6361 7374 5374 7269 6e67 bcastString │ │ │ │ -0012ce50: 2077 7361 5f5f 546f 203c 2f73 7061 6e3e wsa__To │ │ │ │ -0012ce60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -0012ce90: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -0012cea0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header- │ │ │ │ -0012ceb0: 7061 7274 3a20 2020 2020 2020 2020 2062 part: b │ │ │ │ -0012cec0: 6361 7374 5374 7269 6e67 2077 7361 5f5f castString wsa__ │ │ │ │ -0012ced0: 4163 7469 6f6e 203c 2f73 7061 6e3e 3c2f Action .
    //g │ │ │ │ -0012cf10: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ -0012cf20: 6d65 7468 6f64 2d68 6561 6465 722d 7061 method-header-pa │ │ │ │ -0012cf30: 7274 3a20 2020 2020 2020 2020 2062 6361 rt: bca │ │ │ │ -0012cf40: 7374 5374 7269 6e67 2077 7361 5f5f 5265 stString wsa__Re │ │ │ │ -0012cf50: 706c 7954 6f20 3c2f 7370 616e 3e3c 2f64 plyTo .
    │ │ │ │ -0012cf90: 696e 743c 2f73 7061 6e3e 206e 735f 5f62 int ns__b │ │ │ │ -0012cfa0: 6361 7374 5374 7269 6e67 283c 7370 616e castString(char │ │ │ │ -0012cfd0: 202a 7374 722c 203c 7370 616e 2063 6c61 *str, void); < │ │ │ │ -0012d000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ -0012d030: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ -0012d040: 206d 6574 686f 642d 6865 6164 6572 2d70 method-header-p │ │ │ │ -0012d050: 6172 743a 2020 2020 2020 2020 2020 6263 art: bc │ │ │ │ -0012d060: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons │ │ │ │ -0012d070: 6520 7773 615f 5f4d 6573 7361 6765 4944 e wsa__MessageID │ │ │ │ -0012d080: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0012d090: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012d0a0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ -0012d0c0: 7320 7365 7276 6963 6520 6d65 7468 6f64 s service method │ │ │ │ -0012d0d0: 2d68 6561 6465 722d 7061 7274 3a20 2020 -header-part: │ │ │ │ -0012d0e0: 2020 2020 2020 2062 6361 7374 5374 7269 bcastStri │ │ │ │ -0012d0f0: 6e67 5265 7370 6f6e 7365 2077 7361 5f5f ngResponse wsa__ │ │ │ │ -0012d100: 546f 203c 2f73 7061 6e3e 3c2f 6469 763e To
    │ │ │ │ -0012d110: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ -0012d140: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth │ │ │ │ -0012d150: 6f64 2d68 6561 6465 722d 7061 7274 3a20 od-header-part: │ │ │ │ -0012d160: 2020 2020 2020 2020 2062 6361 7374 5374 bcastSt │ │ │ │ -0012d170: 7269 6e67 5265 7370 6f6e 7365 2077 7361 ringResponse wsa │ │ │ │ -0012d180: 5f5f 4163 7469 6f6e 203c 2f73 7061 6e3e __Action │ │ │ │ -0012d190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -0012d1c0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -0012d1d0: 6520 6d65 7468 6f64 2d68 6561 6465 722d e method-header- │ │ │ │ -0012d1e0: 7061 7274 3a20 2020 2020 2020 2020 2062 part: b │ │ │ │ -0012d1f0: 6361 7374 5374 7269 6e67 5265 7370 6f6e castStringRespon │ │ │ │ -0012d200: 7365 2077 7361 5f5f 5265 6c61 7465 7354 se wsa__RelatesT │ │ │ │ -0012d210: 6f20 3c2f 7370 616e 3e3c 2f64 6976 3e0a o
    . │ │ │ │ -0012d220: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ -0012d250: 2f73 7061 6e3e 206e 735f 5f62 6361 7374 /span> ns__bcast │ │ │ │ -0012d260: 5374 7269 6e67 5265 7370 6f6e 7365 283c StringResponse(< │ │ │ │ -0012d270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0012d280: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *res, void │ │ │ │ -0012d2c0: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    < │ │ │ │ -0012d2d0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -0012d2e0: 3c70 3e54 6f20 6f62 7461 696e 2072 6573

    To obtain res │ │ │ │ -0012d2f0: 706f 6e73 6520 6f6e 652d 7761 7920 6f70 ponse one-way op │ │ │ │ -0012d300: 6572 6174 696f 6e73 2c20 7573 6520 3c61 erations, use wsdl2 │ │ │ │ -0012d330: 6820 2d62 3c2f 636f 6465 3e3c 2f62 3e20 h -b │ │ │ │ -0012d340: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ -0012d350: 2d62 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 -b.

    .

    The cl │ │ │ │ -0012d370: 6965 6e74 2063 6f64 6520 696e 636c 7564 ient code includ │ │ │ │ -0012d380: 6573 2061 206c 6f6f 7020 746f 2072 6563 es a loop to rec │ │ │ │ -0012d390: 6569 7665 2072 6573 706f 6e73 6520 6d65 eive response me │ │ │ │ -0012d3a0: 7373 6167 6573 2075 6e74 696c 2061 2074 ssages until a t │ │ │ │ -0012d3b0: 696d 656f 7574 206f 6363 7572 733a 3c2f imeout occurs:.

    #include & │ │ │ │ -0012d410: 7175 6f74 3b70 6c75 6769 6e2f 7773 6161 quot;plugin/wsaa │ │ │ │ -0012d420: 7069 2e68 2671 756f 743b 3c2f 7370 616e pi.h"
    .
    .. │ │ │ │ -0012d4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -0012d520: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>SOAP_ENV__He │ │ │ │ -0012d570: 6164 6572 3c2f 613e 2068 6561 6465 723b ader header; │ │ │ │ -0012d580: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -0012d5b0: 7374 7275 6374 203c 2f73 7061 6e3e 7773 struct ws │ │ │ │ -0012d5c0: 615f 5f45 6e64 706f 696e 7452 6566 6572 a__EndpointRefer │ │ │ │ -0012d5d0: 656e 6365 5479 7065 2072 6570 6c79 546f enceType replyTo │ │ │ │ -0012d5e0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    char │ │ │ │ -0012d620: 202a 7265 733b 203c 2f64 6976 3e0a 3c64 *res;
    . │ │ │ │ -0012d640: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init(&s │ │ │ │ -0012d6d0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    │ │ │ │ -0012d6e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_regi │ │ │ │ -0012d750: 7374 6572 5f70 6c75 6769 6e3c 2f61 3e28 ster_plugin( │ │ │ │ -0012d760: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ -0012d790: 3c2f 613e 2c20 736f 6170 5f77 7361 293b , soap_wsa); │ │ │ │ -0012d7a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    soap.send_timeo │ │ │ │ -0012d8f0: 7574 3c2f 613e 203d 2035 3b20 3c73 7061 ut = 5; // 5 seconds m │ │ │ │ -0012d920: 6178 2073 6f63 6b65 7420 6465 6c61 7920 ax socket delay │ │ │ │ -0012d930: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0012d950: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap. │ │ │ │ -0012d980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 recv_ti │ │ │ │ -0012d9d0: 6d65 6f75 743c 2f61 3e20 3d20 353b 203c meout = 5; < │ │ │ │ -0012d9e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0012d9f0: 656e 7422 3e2f 2f20 3520 7365 636f 6e64 ent">// 5 second │ │ │ │ -0012da00: 7320 6d61 7820 736f 636b 6574 2064 656c s max socket del │ │ │ │ -0012da10: 6179 203c 2f73 7061 6e3e 3c2f 6469 763e ay
    │ │ │ │ -0012da20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // set │ │ │ │ -0012da50: 7570 2057 532d 4164 6472 6573 7369 6e67 up WS-Addressing │ │ │ │ -0012da60: 2068 6561 6465 723c 2f73 7061 6e3e 3c2f header.
    soap_wsa_ │ │ │ │ -0012da90: 7265 7175 6573 7428 2661 6d70 3b3c 6120 request(&soap, " │ │ │ │ -0012daf0: 6d65 7373 6167 6520 4944 2671 756f 743b message ID" │ │ │ │ -0012db00: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "endpo │ │ │ │ -0012db30: 696e 7426 7175 6f74 3b3c 2f73 7061 6e3e int" │ │ │ │ -0012db40: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -0012db60: 756f 743b 534f 4150 2061 6374 696f 6e26 uot;SOAP action& │ │ │ │ -0012db70: 7175 6f74 3b3c 2f73 7061 6e3e 293b 3c2f quot;);.
    soap_wsa_ │ │ │ │ -0012dba0: 6164 645f 5265 706c 7954 6f28 2661 6d70 add_ReplyTo(& │ │ │ │ -0012dbb0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -0012dbe0: 2c20 4e55 4c4c 293b 203c 7370 616e 2063 , NULL); / │ │ │ │ -0012dc00: 2f20 616e 6f6e 796d 6f75 7320 5265 706c / anonymous Repl │ │ │ │ -0012dc10: 7954 6f20 6164 6472 6573 733c 2f73 7061 yTo address
    .
    if ( │ │ │ │ -0012dc60: 736f 6170 5f73 656e 645f 6e73 5f5f 6263 soap_send_ns__bc │ │ │ │ -0012dc70: 6173 7453 7472 696e 6728 2661 6d70 3b3c astString(&< │ │ │ │ -0012dc80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0012dc90: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0012dca0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -0012dcb0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -0012dcd0: 743b 736f 6170 2e75 6470 3a2f 2f65 6e64 t;soap.udp://end │ │ │ │ -0012dce0: 706f 696e 7426 7175 6f74 3b3c 2f73 7061 point", │ │ │ │ -0012dd10: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio │ │ │ │ -0012dd20: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ -0012dd30: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -0012dd50: 743b 6865 6c6c 6f20 776f 726c 6421 2671 t;hello world!&q │ │ │ │ -0012dd60: 756f 743b 3c2f 7370 616e 3e29 2920 3c2f uot;)) struct │ │ │ │ +00129800: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so │ │ │ │ +00129830: 6170 3c2f 613e 203c 6120 636c 6173 733d ap so │ │ │ │ +00129860: 6170 3c2f 613e 3b20 3c2f 6469 763e 0a3c ap;
    .< │ │ │ │ +00129870: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00129880: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_init< │ │ │ │ +001298e0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ +00129910: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap);
    .
    soap_reg │ │ │ │ +00129990: 6973 7465 725f 706c 7567 696e 3c2f 613e ister_plugin │ │ │ │ +001299a0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +001299d0: 703c 2f61 3e2c 2073 6f61 705f 7773 6129 p, soap_wsa) │ │ │ │ +001299e0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    .
    // set up WS- │ │ │ │ +00129b00: 4164 6472 6573 7369 6e67 2068 6561 6465 Addressing heade │ │ │ │ +00129b10: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .< │ │ │ │ +00129b20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00129b30: 3e73 6f61 705f 7773 615f 7265 7175 6573 >soap_wsa_reques │ │ │ │ +00129b40: 7428 2661 6d70 3b3c 6120 636c 6173 733d t(&
    so │ │ │ │ +00129b70: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "messag │ │ │ │ +00129ba0: 6520 4944 2671 756f 743b 3c2f 7370 616e e ID", & │ │ │ │ +00129bd0: 7175 6f74 3b65 6e64 706f 696e 7426 7175 quot;endpoint&qu │ │ │ │ +00129be0: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "SO │ │ │ │ +00129c10: 4150 2061 6374 696f 6e26 7175 6f74 3b3c AP action"< │ │ │ │ +00129c20: 2f73 7061 6e3e 293b 3c2f 6469 763e 0a3c /span>);
    .< │ │ │ │ +00129c30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00129c40: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// Send t │ │ │ │ +00129c60: 6865 206d 6573 7361 6765 206f 7665 7220 he message over │ │ │ │ +00129c70: 5544 503a 203c 2f73 7061 6e3e 3c2f 6469 UDP: .
    i │ │ │ │ +00129cb0: 663c 2f73 7061 6e3e 2028 736f 6170 5f73 f (soap_s │ │ │ │ +00129cc0: 656e 645f 6e73 5f5f 6563 686f 5374 7269 end_ns__echoStri │ │ │ │ +00129cd0: 6e67 2826 616d 703b 3c61 2063 6c61 7373 ng(&s │ │ │ │ +00129d00: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "soap. │ │ │ │ +00129d30: 7564 703a 2f2f 656e 6470 6f69 6e74 2671 udp://endpoint&q │ │ │ │ +00129d40: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "S │ │ │ │ +00129d70: 4f41 5020 6163 7469 6f6e 2671 756f 743b OAP action" │ │ │ │ +00129d80: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "hello │ │ │ │ +00129db0: 2077 6f72 6c64 2126 7175 6f74 3b3c 2f73 world!"))
    . │ │ │ │ +00129de0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_ │ │ │ │ +00129e40: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&< │ │ │ │ +00129e50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00129e60: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00129e70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +00129e80: 7374 6465 7272 293b 203c 7370 616e 2063 stderr); / │ │ │ │ +00129ea0: 2f20 6572 726f 7220 3c2f 7370 616e 3e3c / error < │ │ │ │ +00129eb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ +00129f20: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a │ │ │ │ +00129f30: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    soap_end(& │ │ │ │ +00129fe0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +0012a010: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .
    soap_done │ │ │ │ +0012a090: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +0012a0c0: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    .
    i │ │ │ │ +0012a1b0: 6e74 2073 6f61 705f 7265 6769 7374 6572 nt soap_register │ │ │ │ +0012a1c0: 5f70 6c75 6769 6e28 7374 7275 6374 2073 _plugin(struct s │ │ │ │ +0012a1d0: 6f61 7020 2a73 6f61 702c 2069 6e74 282a oap *soap, int(* │ │ │ │ +0012a1e0: 6663 7265 6174 6529 2873 7472 7563 7420 fcreate)(struct │ │ │ │ +0012a1f0: 736f 6170 202a 2c20 7374 7275 6374 2073 soap *, struct s │ │ │ │ +0012a200: 6f61 705f 706c 7567 696e 202a 2c20 766f oap_plugin *, vo │ │ │ │ +0012a210: 6964 202a 2929 3c2f 6469 763e 3c64 6976 id *))
    R │ │ │ │ +0012a230: 6567 6973 7465 7220 6120 706c 7567 696e egister a plugin │ │ │ │ +0012a240: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    .... Back to │ │ │ │ +0012a280: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +0012a290: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ +0012a2a0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +0012a2b0: 2069 643d 226d 756c 7469 6361 7374 223e id="multicast"> │ │ │ │ +0012a2c0: 3c2f 613e 0a43 6c69 656e 742d 7369 6465 .Client-side │ │ │ │ +0012a2d0: 206f 6e65 2d77 6179 2055 4450 206d 756c one-way UDP mul │ │ │ │ +0012a2e0: 7469 6361 7374 3c2f 6833 3e0a 3c70 3e54 ticast

    .

    T │ │ │ │ +0012a2f0: 6869 7320 6578 616d 706c 6520 6973 2073 his example is s │ │ │ │ +0012a300: 696d 696c 6172 2074 6f20 7468 6520 6f6e imilar to the on │ │ │ │ +0012a310: 652d 7761 7920 756e 6963 6173 7420 6578 e-way unicast ex │ │ │ │ +0012a320: 616d 706c 6520 6469 7363 7573 7365 6420 ample discussed │ │ │ │ +0012a330: 6162 6f76 652c 2062 7574 2075 7365 7320 above, but uses │ │ │ │ +0012a340: 6120 6272 6f61 6463 6173 7420 6164 6472 a broadcast addr │ │ │ │ +0012a350: 6573 7320 616e 6420 7468 6520 3c63 6f64 ess and the SO_BROADCAST socket opt │ │ │ │ +0012a380: 696f 6e3a 3c2f 703e 0a3c 6469 7620 636c ion:

    .
    < │ │ │ │ +0012a3a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012a3b0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc │ │ │ │ +0012a3d0: 6c75 6465 2026 7175 6f74 3b70 6c75 6769 lude "plugi │ │ │ │ +0012a3e0: 6e2f 7773 6161 7069 2e68 2671 756f 743b n/wsaapi.h" │ │ │ │ +0012a3f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0012a410: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +0012a440: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; < │ │ │ │ +0012a4b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    in_addr_ │ │ │ │ +0012a4d0: 7420 6164 6472 203d 2069 6e65 745f 6164 t addr = inet_ad │ │ │ │ +0012a4e0: 6472 283c 7370 616e 2063 6c61 7373 3d22 dr(& │ │ │ │ +0012a500: 7175 6f74 3b31 2e32 2e33 2e34 2671 756f quot;1.2.3.4&quo │ │ │ │ +0012a510: 743b 3c2f 7370 616e 3e29 3b20 3c73 7061 t;); // optional
    .
    soap_init │ │ │ │ +0012a5c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +0012a5f0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .< │ │ │ │ +0012a600: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012a610: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_regist │ │ │ │ +0012a670: 6572 5f70 6c75 6769 6e3c 2f61 3e28 2661 er_plugin(&a │ │ │ │ +0012a680: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, soap_wsa);.
    so │ │ │ │ +0012a700: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap. │ │ │ │ +0012a750: 7365 6e64 5f74 696d 656f 7574 3c2f 613e send_timeout │ │ │ │ +0012a760: 203d 2035 3b20 3c73 7061 6e20 636c 6173 = 5; // 5 │ │ │ │ +0012a780: 2073 6563 6f6e 6473 206d 6178 2073 6f63 seconds max soc │ │ │ │ +0012a790: 6b65 7420 6465 6c61 793c 2f73 7061 6e3e ket delay │ │ │ │ +0012a7a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    soap< │ │ │ │ +0012a8d0: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.ipv │ │ │ │ +0012a920: 345f 6d75 6c74 6963 6173 745f 6966 3c2f 4_multicast_if = &addr; │ │ │ │ +0012a940: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // optiona │ │ │ │ +0012a960: 6c20 666f 7220 4950 7634 3a20 7365 6520 l for IPv4: see │ │ │ │ +0012a970: 7365 7473 6f63 6b6f 7074 2049 5050 524f setsockopt IPPRO │ │ │ │ +0012a980: 544f 5f49 5020 4950 5f4d 554c 5449 4341 TO_IP IP_MULTICA │ │ │ │ +0012a990: 5354 5f49 4620 3c2f 7370 616e 3e3c 2f64 ST_IF .
    soa │ │ │ │ +0012a9e0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.i │ │ │ │ +0012aa30: 7076 365f 6d75 6c74 6963 6173 745f 6966 pv6_multicast_if │ │ │ │ +0012aa40: 3c2f 613e 203d 2061 6464 723b 203c 7370 = addr; // optional f │ │ │ │ +0012aa70: 6f72 2049 5076 363a 206d 756c 7469 6361 or IPv6: multica │ │ │ │ +0012aa80: 7374 2073 696e 365f 7363 6f70 655f 6964 st sin6_scope_id │ │ │ │ +0012aa90: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0012aaa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012aab0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ +0012aae0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .ipv4_m │ │ │ │ +0012ab30: 756c 7469 6361 7374 5f74 746c 3c2f 613e ulticast_ttl │ │ │ │ +0012ab40: 203d 2031 3b20 3c73 7061 6e20 636c 6173 = 1; // o │ │ │ │ +0012ab60: 7074 696f 6e61 6c2c 2073 6565 2073 6574 ptional, see set │ │ │ │ +0012ab70: 736f 636b 6f70 7420 4950 5052 4f54 4f5f sockopt IPPROTO_ │ │ │ │ +0012ab80: 4950 2c20 4950 5f4d 554c 5449 4341 5354 IP, IP_MULTICAST │ │ │ │ +0012ab90: 5f54 544c 203c 2f73 7061 6e3e 3c2f 6469 _TTL .
    // se │ │ │ │ +0012abd0: 7420 7570 2057 532d 4164 6472 6573 7369 t up WS-Addressi │ │ │ │ +0012abe0: 6e67 2068 6561 6465 723c 2f73 7061 6e3e ng header │ │ │ │ +0012abf0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_ws │ │ │ │ +0012ac10: 615f 7265 7175 6573 7428 2661 6d70 3b3c a_request(&< │ │ │ │ +0012ac20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0012ac30: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0012ac40: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +0012ac50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +0012ac70: 743b 6d65 7373 6167 6520 4944 2671 756f t;message ID&quo │ │ │ │ +0012ac80: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "end │ │ │ │ +0012acb0: 706f 696e 7426 7175 6f74 3b3c 2f73 7061 point", │ │ │ │ +0012ace0: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio │ │ │ │ +0012acf0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n"); │ │ │ │ +0012ad00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +0012ad30: 2f20 5365 6e64 2074 6865 206d 6573 7361 / Send the messa │ │ │ │ +0012ad40: 6765 206f 7665 7220 5544 5020 746f 2061 ge over UDP to a │ │ │ │ +0012ad50: 2062 726f 6164 6361 7374 2061 6464 7265 broadcast addre │ │ │ │ +0012ad60: 7373 3a20 3c2f 7370 616e 3e3c 2f64 6976 ss:
    .
    if │ │ │ │ +0012ada0: 3c2f 7370 616e 3e20 2873 6f61 705f 7365 (soap_se │ │ │ │ +0012adb0: 6e64 5f6e 735f 5f65 6368 6f53 7472 696e nd_ns__echoStrin │ │ │ │ +0012adc0: 6728 2661 6d70 3b3c 6120 636c 6173 733d g(&so │ │ │ │ +0012adf0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "soap.u │ │ │ │ +0012ae20: 6470 3a2f 2f65 6e64 706f 696e 7426 7175 dp://endpoint&qu │ │ │ │ +0012ae30: 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 7061 ot;, "SO │ │ │ │ +0012ae60: 4150 2061 6374 696f 6e26 7175 6f74 3b3c AP action"< │ │ │ │ +0012ae70: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "hello │ │ │ │ +0012aea0: 776f 726c 6421 2671 756f 743b 3c2f 7370 world!"))
    . │ │ │ │ +0012aed0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f │ │ │ │ +0012af30: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s │ │ │ │ +0012af70: 7464 6572 7229 3b20 3c73 7061 6e20 636c tderr); // │ │ │ │ +0012af90: 2072 6570 6f72 7420 6572 726f 7220 3c2f report error
    . │ │ │ │ +0012b060: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    soap_do │ │ │ │ +0012b180: 6e65 3c2f 613e 2826 616d 703b 3c61 2063 ne(&soap);.unsigned int i │ │ │ │ +0012b2a0: 7076 365f 6d75 6c74 6963 6173 745f 6966 pv6_multicast_if │ │ │ │ +0012b2b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    User-de │ │ │ │ +0012b2d0: 6669 6e61 626c 6520 7661 6c75 6520 746f finable value to │ │ │ │ +0012b2e0: 2073 6574 2073 6f63 6b61 6464 725f 696e set sockaddr_in │ │ │ │ +0012b2f0: 363a 3a73 696e 365f 7363 6f70 655f 6964 6::sin6_scope_id │ │ │ │ +0012b300: 2077 6865 6e20 6e6f 6e7a 6572 6f2e 3c2f when nonzero.
    Defini │ │ │ │ +0012b330: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ +0012b340: 7032 2e68 3a33 3539 323c 2f64 6976 3e3c p2.h:3592
    < │ │ │ │ +0012b350: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +0012b3a0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +0012b3b0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ +0012b3f0: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla │ │ │ │ +0012b400: 6773 3c2f 613e 3c2f 6469 763e 3c64 6976 gs
    │ │ │ │ +0012b420: 696e 7420 636f 6e6e 6563 745f 666c 6167 int connect_flag │ │ │ │ +0012b430: 733c 2f64 6976 3e3c 6469 7620 636c 6173 s
    User-d │ │ │ │ +0012b450: 6566 696e 6162 6c65 2073 6574 736f 636b efinable setsock │ │ │ │ +0012b460: 6f70 7420 6c65 7665 6c20 534f 4c5f 534f opt level SOL_SO │ │ │ │ +0012b470: 434b 4554 2066 6c61 6773 2077 6865 6e20 CKET flags when │ │ │ │ +0012b480: 636f 6e6e 6563 7469 6e67 2073 6f61 703a connecting soap: │ │ │ │ +0012b490: 3a73 6f63 6b65 7420 746f 2061 2073 6572 :socket to a ser │ │ │ │ +0012b4a0: 7665 7220 2874 6865 2076 616c 7565 202e ver (the value . │ │ │ │ +0012b4b0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ │ +0012b4d0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ +0012b4e0: 6473 6f61 7032 2e68 3a33 3337 373c 2f64 dsoap2.h:3377
    .
    soap::ipv4_mu │ │ │ │ +0012b5a0: 6c74 6963 6173 745f 7474 6c3c 2f61 3e3c lticast_ttl< │ │ │ │ +0012b5b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    unsigne │ │ │ │ +0012b5d0: 6420 6368 6172 2069 7076 345f 6d75 6c74 d char ipv4_mult │ │ │ │ +0012b5e0: 6963 6173 745f 7474 6c3c 2f64 6976 3e3c icast_ttl
    < │ │ │ │ +0012b5f0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +0012b600: 223e 5573 6572 2d64 6566 696e 6162 6c65 ">User-definable │ │ │ │ +0012b610: 2076 616c 7565 2074 6f20 7365 7420 7365 value to set se │ │ │ │ +0012b620: 7473 6f63 6b6f 7074 206c 6576 656c 2049 tsockopt level I │ │ │ │ +0012b630: 5050 524f 544f 5f49 5020 746f 2049 505f PPROTO_IP to IP_ │ │ │ │ +0012b640: 4d55 4c54 4943 4153 545f 5454 4c20 7768 MULTICAST_TTL wh │ │ │ │ +0012b650: 656e 206e 6f6e 7a65 726f 2e3c 2f64 6976 en nonzero.
    Definitio │ │ │ │ +0012b680: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +0012b690: 683a 3336 3230 3c2f 6469 763e 3c2f 6469 h:3620
    .
    char * ipv4_mul │ │ │ │ +0012b780: 7469 6361 7374 5f69 663c 2f64 6976 3e3c ticast_if
    < │ │ │ │ +0012b790: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +0012b7a0: 223e 5573 6572 2d64 6566 696e 6162 6c65 ">User-definable │ │ │ │ +0012b7b0: 2076 616c 7565 2074 6f20 7365 7420 7365 value to set se │ │ │ │ +0012b7c0: 7473 6f63 6b6f 7074 206c 6576 656c 2049 tsockopt level I │ │ │ │ +0012b7d0: 5050 524f 544f 5f49 5020 746f 2049 505f PPROTO_IP to IP_ │ │ │ │ +0012b7e0: 4d55 4c54 4943 4153 545f 4946 2077 6865 MULTICAST_IF whe │ │ │ │ +0012b7f0: 6e20 6e6f 6e2d 4e55 4c4c 2e3c 2f64 6976 n non-NULL.
    Definitio │ │ │ │ +0012b820: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +0012b830: 683a 3335 3939 3c2f 6469 763e 3c2f 6469 h:3599
    .

    Ple │ │ │ │ +0012b860: 6173 6520 7265 6665 7220 746f 2074 6865 ase refer to the │ │ │ │ +0012b870: 2073 6f63 6b65 7420 6f70 7469 6f6e 7320 socket options │ │ │ │ +0012b880: 666f 7220 3c63 6f64 653e 4950 5052 4f54 for IPPROT │ │ │ │ +0012b890: 4f5f 4950 3c2f 636f 6465 3e20 3c63 6f64 O_IP IP_MULTICAST_I │ │ │ │ +0012b8b0: 463c 2f63 6f64 653e 2074 6f20 7370 6563 F to spec │ │ │ │ +0012b8c0: 6966 7920 7468 6520 6465 6661 756c 7420 ify the default │ │ │ │ +0012b8d0: 696e 7465 7266 6163 6520 666f 7220 6d75 interface for mu │ │ │ │ +0012b8e0: 6c74 6963 6173 7420 6461 7461 6772 616d lticast datagram │ │ │ │ +0012b8f0: 7320 746f 2062 6520 7365 6e74 2066 726f s to be sent fro │ │ │ │ +0012b900: 6d2e 2054 6869 7320 6973 2061 203c 636f m. This is a struct in_add │ │ │ │ +0012b920: 723c 2f63 6f64 653e 2028 3c63 6f64 653e r ( │ │ │ │ +0012b930: 696e 5f61 6464 725f 743c 2f63 6f64 653e in_addr_t │ │ │ │ +0012b940: 2066 6f72 203c 636f 6465 3e73 696e 365f for sin6_ │ │ │ │ +0012b950: 7363 6f70 655f 6964 3c2f 636f 6465 3e29 scope_id) │ │ │ │ +0012b960: 2069 6e74 6572 6661 6365 2076 616c 7565 interface value │ │ │ │ +0012b970: 2e20 4f74 6865 7277 6973 652c 2074 6865 . Otherwise, the │ │ │ │ +0012b980: 2064 6566 6175 6c74 2069 6e74 6572 6661 default interfa │ │ │ │ +0012b990: 6365 2073 6574 2062 7920 7468 6520 7379 ce set by the sy │ │ │ │ +0012b9a0: 7374 656d 2061 646d 696e 6973 7472 6174 stem administrat │ │ │ │ +0012b9b0: 6f72 2077 696c 6c20 6265 2075 7365 6420 or will be used │ │ │ │ +0012b9c0: 2869 6620 616e 7929 2e3c 2f70 3e0a 3c70 (if any).

    .

    Please refer to │ │ │ │ +0012b9e0: 2074 6865 2073 6f63 6b65 7420 6f70 7469 the socket opti │ │ │ │ +0012b9f0: 6f6e 7320 666f 7220 3c63 6f64 653e 4950 ons for IP │ │ │ │ +0012ba00: 5052 4f54 4f5f 4950 3c2f 636f 6465 3e20 PROTO_IP │ │ │ │ +0012ba10: 3c63 6f64 653e 4950 5f4d 554c 5449 4341 IP_MULTICA │ │ │ │ +0012ba20: 5354 5f54 544c 3c2f 636f 6465 3e20 746f ST_TTL to │ │ │ │ +0012ba30: 206c 696d 6974 2074 6865 206c 6966 6574 limit the lifet │ │ │ │ +0012ba40: 696d 6520 6f66 2074 6865 2070 6163 6b65 ime of the packe │ │ │ │ +0012ba50: 742e 204d 756c 7469 6361 7374 2064 6174 t. Multicast dat │ │ │ │ +0012ba60: 6167 7261 6d73 2061 7265 2073 656e 7420 agrams are sent │ │ │ │ +0012ba70: 7769 7468 2061 2064 6566 6175 6c74 2076 with a default v │ │ │ │ +0012ba80: 616c 7565 206f 6620 312c 2074 6f20 7072 alue of 1, to pr │ │ │ │ +0012ba90: 6576 656e 7420 7468 656d 2074 6f20 6265 event them to be │ │ │ │ +0012baa0: 2066 6f72 7761 7264 6564 2062 6579 6f6e forwarded beyon │ │ │ │ +0012bab0: 6420 7468 6520 6c6f 6361 6c20 6e65 7477 d the local netw │ │ │ │ +0012bac0: 6f72 6b2e 2054 6869 7320 7061 7261 6d65 ork. This parame │ │ │ │ +0012bad0: 7465 7220 6361 6e20 6265 2073 6574 2062 ter can be set b │ │ │ │ +0012bae0: 6574 7765 656e 2031 2074 6f20 3235 352e etween 1 to 255. │ │ │ │ +0012baf0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ +0012bb10: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +0012bb20: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ +0012bb30: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +0012bb40: 2069 643d 2272 6571 7565 7374 7265 7370 id="requestresp │ │ │ │ +0012bb50: 6f6e 7365 756e 6963 6173 7422 3e3c 2f61 onseunicast">.Client-side re │ │ │ │ +0012bb70: 7175 6573 742d 7265 7370 6f6e 7365 2055 quest-response U │ │ │ │ +0012bb80: 4450 2075 6e69 6361 7374 3c2f 6833 3e0a DP unicast

    . │ │ │ │ +0012bb90: 3c70 3e54 6869 7320 6578 616d 706c 6520

    This example │ │ │ │ +0012bba0: 6173 7375 6d65 7320 7468 6174 2074 6865 assumes that the │ │ │ │ +0012bbb0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ +0012bbc0: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc │ │ │ │ +0012bbd0: 7070 3220 696e 636c 7564 6573 2074 6865 pp2 includes the │ │ │ │ +0012bbe0: 2053 4f41 5020 4865 6164 6572 2077 6974 SOAP Header wit │ │ │ │ +0012bbf0: 6820 5753 2d41 6464 7265 7373 696e 6720 h WS-Addressing │ │ │ │ +0012bc00: 656c 656d 656e 7473 2069 6d70 6f72 7465 elements importe │ │ │ │ +0012bc10: 6420 7769 7468 203c 636f 6465 3e23 696d d with #im │ │ │ │ +0012bc20: 706f 7274 2022 7773 612e 6822 3c2f 636f port "wsa.h" and the ns__echoString │ │ │ │ +0012bc50: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function │ │ │ │ +0012bc60: 2064 6973 6375 7373 6564 2069 6e20 5365 discussed in Se │ │ │ │ +0012bc70: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction Usi │ │ │ │ +0012bca0: 6e67 2057 532d 4164 6472 6573 7369 6e67 ng WS-Addressing │ │ │ │ +0012bcb0: 2077 6974 6820 534f 4150 2d6f 7665 722d with SOAP-over- │ │ │ │ +0012bcc0: 5544 503c 2f61 3e20 2e3c 2f70 3e0a 3c64 UDP .

    .
    #include " │ │ │ │ +0012bd20: 706c 7567 696e 2f77 7361 6170 692e 6826 plugin/wsaapi.h& │ │ │ │ +0012bd30: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    .< │ │ │ │ +0012bd70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0012bd80: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap soap;
    .
    struct wsa__EndpointRe │ │ │ │ +0012be40: 6665 7265 6e63 6554 7970 6520 7265 706c ferenceType repl │ │ │ │ +0012be50: 7954 6f3b 203c 7370 616e 2063 6c61 7373 yTo; // (a │ │ │ │ +0012be70: 6e6f 6e79 6d6f 7573 2920 7265 706c 7920 nonymous) reply │ │ │ │ +0012be80: 6164 6472 6573 7320 3c2f 7370 616e 3e3c address < │ │ │ │ +0012be90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *r │ │ │ │ +0012bed0: 6573 3b20 3c73 7061 6e20 636c 6173 733d es; // ser │ │ │ │ +0012bef0: 7665 7220 7265 7370 6f6e 7365 203c 2f73 ver response
    .
    soap_init( │ │ │ │ +0012bf80: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +0012bfb0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    . │ │ │ │ +0012bfd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe │ │ │ │ +0012c030: 725f 706c 7567 696e 3c2f 613e 2826 616d r_plugin(&am │ │ │ │ +0012c040: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, soap_wsa);.
    soa │ │ │ │ +0012c0c0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.s │ │ │ │ +0012c110: 656e 645f 7469 6d65 6f75 743c 2f61 3e20 end_timeout │ │ │ │ +0012c120: 3d20 353b 203c 7370 616e 2063 6c61 7373 = 5; // 5 │ │ │ │ +0012c140: 7365 636f 6e64 7320 6d61 7820 736f 636b seconds max sock │ │ │ │ +0012c150: 6574 2064 656c 6179 203c 2f73 7061 6e3e et delay │ │ │ │ +0012c160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    // set up WS-A │ │ │ │ +0012c280: 6464 7265 7373 696e 6720 6865 6164 6572 ddressing header │ │ │ │ +0012c290: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0012c2b0: 736f 6170 5f77 7361 5f72 6571 7565 7374 soap_wsa_request │ │ │ │ +0012c2c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&
    soa │ │ │ │ +0012c2f0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "message │ │ │ │ +0012c320: 2049 4426 7175 6f74 3b3c 2f73 7061 6e3e ID" │ │ │ │ +0012c330: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ +0012c350: 756f 743b 656e 6470 6f69 6e74 2671 756f uot;endpoint&quo │ │ │ │ +0012c360: 743b 3c2f 7370 616e 3e2c 203c 7370 616e t;, "SOA │ │ │ │ +0012c390: 5020 6163 7469 6f6e 2671 756f 743b 3c2f P action");
    . │ │ │ │ +0012c3c0: 736f 6170 5f77 7361 5f61 6464 5f52 6570 soap_wsa_add_Rep │ │ │ │ +0012c3d0: 6c79 546f 2826 616d 703b 3c61 2063 6c61 lyTo(&soap, NULL) │ │ │ │ +0012c410: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // anony │ │ │ │ +0012c430: 6d6f 7573 2052 6570 6c79 546f 2061 6464 mous ReplyTo add │ │ │ │ +0012c440: 7265 7373 3c2f 7370 616e 3e3c 2f64 6976 ress
    .
    // Sen │ │ │ │ +0012c480: 6420 616e 6420 7265 6365 6976 6520 6d65 d and receive me │ │ │ │ +0012c490: 7373 6167 6573 206f 7665 7220 5544 503a ssages over UDP: │ │ │ │ +0012c4a0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0012c4b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012c4c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if
    (soap_call_ │ │ │ │ +0012c4f0: 6e73 5f5f 6563 686f 5374 7269 6e67 2826 ns__echoString(& │ │ │ │ +0012c500: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +0012c530: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, "soap.udp: │ │ │ │ +0012c560: 2f2f 656e 6470 6f69 6e74 2026 7175 6f74 //endpoint " │ │ │ │ +0012c570: 3b3c 2f73 7061 6e3e 534f 4150 2061 6374 ;SOAP act │ │ │ │ +0012c580: 696f 6e3c 7370 616e 2063 6c61 7373 3d22 ion& │ │ │ │ +0012c5a0: 7175 6f74 3b2c 2026 7175 6f74 3b3c 2f73 quot;, "
    hello world! │ │ │ │ +0012c5c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +0012c5e0: 743b 2c20 2661 6d70 3b72 6573 2929 203c t;, &res)) < │ │ │ │ +0012c5f0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +0012c610: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +0012c620: 6e67 6c69 7465 7261 6c22 3e7b 3c2f 7370 ngliteral">{
    .
    if (so │ │ │ │ +0012c670: 6170 2e65 7272 6f72 203d 3d20 534f 4150 ap.error == SOAP │ │ │ │ +0012c680: 5f45 4f46 2026 616d 703b 2661 6d70 3b20 _EOF && │ │ │ │ +0012c690: 736f 6170 2e65 7272 6e75 6d20 3d3d 2030 soap.errnum == 0 │ │ │ │ +0012c6a0: 2920 3c2f 7370 616e 3e3c 2f64 6976 3e0a )
    . │ │ │ │ +0012c6b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +0012c6e0: 2020 2e2e 2e20 2f2f 2054 696d 656f 7574 ... // Timeout │ │ │ │ +0012c6f0: 3a20 6e6f 2072 6573 706f 6e73 6520 6672 : no response fr │ │ │ │ +0012c700: 6f6d 2073 6572 7665 7220 286d 6573 7361 om server (messa │ │ │ │ +0012c710: 6765 2061 6c72 6561 6479 2064 656c 6976 ge already deliv │ │ │ │ +0012c720: 6572 6564 3f29 203c 2f73 7061 6e3e 3c2f ered?) .
    else
    .
    soap_p │ │ │ │ +0012c7b0: 7269 6e74 5f66 6175 6c74 2826 616d 703b rint_fault(& │ │ │ │ +0012c7c0: 736f 6170 2c20 7374 6465 7272 293b 203c soap, stderr); < │ │ │ │ +0012c7d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +0012c7f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +0012c800: 6e67 6c69 7465 7261 6c22 3e7d 203c 2f73 ngliteral">}
    .
    else
    .
    ... │ │ │ │ +0012c890: 2f2f 2055 4450 2073 6572 7665 7220 7265 // UDP server re │ │ │ │ +0012c8a0: 7370 6f6e 7365 2069 7320 7374 6f72 6564 sponse is stored │ │ │ │ +0012c8b0: 2069 6e20 2623 3339 3b72 6573 2623 3339 in 'res' │ │ │ │ +0012c8c0: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
    . │ │ │ │ +0012c8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // │ │ │ │ +0012c900: 2063 6865 636b 2053 4f41 5020 6865 6164 check SOAP head │ │ │ │ +0012c910: 6572 2072 6563 6569 7665 642c 2069 6620 er received, if │ │ │ │ +0012c920: 6170 706c 6963 6162 6c65 203c 2f73 7061 applicable
    .
    check_hea │ │ │ │ +0012c970: 6465 7228 2661 6d70 3b73 6f61 702e 6865 der(&soap.he │ │ │ │ +0012c980: 6164 6572 293b 203c 2f73 7061 6e3e 3c2f ader); .
    soap_destroy( │ │ │ │ +0012c9d0: 2661 6d70 3b73 6f61 7029 3b3c 2f73 7061 &soap);
    .
    soap_end( │ │ │ │ +0012ca20: 2661 6d70 3b73 6f61 7029 3b3c 2f73 7061 &soap);
    .
    soap_done │ │ │ │ +0012ca70: 2826 616d 703b 736f 6170 293b 3c2f 7370 (&soap);
    .
    │ │ │ │ +0012ca90: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    To obta │ │ │ │ +0012d2d0: 696e 2072 6573 706f 6e73 6520 6f6e 652d in response one- │ │ │ │ +0012d2e0: 7761 7920 6f70 6572 6174 696f 6e73 2c20 way operations, │ │ │ │ +0012d2f0: 7573 6520 3c61 2068 7265 663d 2223 7773 use wsdl2h -b option │ │ │ │ +0012d330: 3c63 6f64 653e 2d62 3c2f 636f 6465 3e3c -b< │ │ │ │ +0012d340: 2f62 3e3c 2f61 3e2e 3c2f 703e 0a3c 703e /b>.

    .

    │ │ │ │ +0012d350: 5468 6520 636c 6965 6e74 2063 6f64 6520 The client code │ │ │ │ +0012d360: 696e 636c 7564 6573 2061 206c 6f6f 7020 includes a loop │ │ │ │ +0012d370: 746f 2072 6563 6569 7665 2072 6573 706f to receive respo │ │ │ │ +0012d380: 6e73 6520 6d65 7373 6167 6573 2075 6e74 nse messages unt │ │ │ │ +0012d390: 696c 2061 2074 696d 656f 7574 206f 6363 il a timeout occ │ │ │ │ +0012d3a0: 7572 733a 3c2f 703e 0a3c 6469 7620 636c urs:

    .
    < │ │ │ │ +0012d3c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012d3d0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc │ │ │ │ +0012d3f0: 6c75 6465 2026 7175 6f74 3b70 6c75 6769 lude "plugi │ │ │ │ +0012d400: 6e2f 7773 6161 7069 2e68 2671 756f 743b n/wsaapi.h" │ │ │ │ +0012d410: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0012d430: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +0012d460: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; < │ │ │ │ +0012d4d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ +0012d500: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct SOAP_E │ │ │ │ +0012d550: 4e56 5f5f 4865 6164 6572 3c2f 613e 2068 NV__Header h │ │ │ │ +0012d560: 6561 6465 723b 203c 2f64 6976 3e0a 3c64 eader;
    . │ │ │ │ +0012d580: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct
    wsa__Endpoin │ │ │ │ +0012d5b0: 7452 6566 6572 656e 6365 5479 7065 2072 tReferenceType r │ │ │ │ +0012d5c0: 6570 6c79 546f 3b20 3c2f 6469 763e 0a3c eplyTo;
    .< │ │ │ │ +0012d5d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012d5e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >char< │ │ │ │ +0012d600: 2f73 7061 6e3e 202a 7265 733b 203c 2f64 /span> *res; .
    soap_ │ │ │ │ +0012d680: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); │ │ │ │ +0012d6c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..< │ │ │ │ +0012d7a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0012d7b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0012d7c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ +0012d7d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0012d7e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0012d7f0: 6874 6d6c 2361 3532 6132 3266 6166 6333 html#a52a22fafc3 │ │ │ │ +0012d800: 3639 6233 6135 3466 6230 6431 3666 3533 69b3a54fb0d16f53 │ │ │ │ +0012d810: 3135 3837 3934 223e 636f 6e6e 6563 745f 158794">connect_ │ │ │ │ +0012d820: 666c 6167 733c 2f61 3e20 3d20 534f 5f42 flags = SO_B │ │ │ │ +0012d830: 524f 4144 4341 5354 3b20 3c2f 6469 763e ROADCAST;
    │ │ │ │ +0012d840: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap.send │ │ │ │ +0012d8d0: 5f74 696d 656f 7574 3c2f 613e 203d 2035 _timeout = 5 │ │ │ │ +0012d8e0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // 5 sec │ │ │ │ +0012d900: 6f6e 6473 206d 6178 2073 6f63 6b65 7420 onds max socket │ │ │ │ +0012d910: 6465 6c61 7920 3c2f 7370 616e 3e3c 2f64 delay .
    soa │ │ │ │ +0012d960: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.r │ │ │ │ +0012d9b0: 6563 765f 7469 6d65 6f75 743c 2f61 3e20 ecv_timeout │ │ │ │ +0012d9c0: 3d20 353b 203c 7370 616e 2063 6c61 7373 = 5; // 5 │ │ │ │ +0012d9e0: 7365 636f 6e64 7320 6d61 7820 736f 636b seconds max sock │ │ │ │ +0012d9f0: 6574 2064 656c 6179 203c 2f73 7061 6e3e et delay │ │ │ │ +0012da00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +0012da30: 2f20 7365 7420 7570 2057 532d 4164 6472 / set up WS-Addr │ │ │ │ +0012da40: 6573 7369 6e67 2068 6561 6465 723c 2f73 essing header
    ..
    soa │ │ │ │ +0012db80: 705f 7773 615f 6164 645f 5265 706c 7954 p_wsa_add_ReplyT │ │ │ │ +0012db90: 6f28 2661 6d70 3b3c 6120 636c 6173 733d o(&so │ │ │ │ +0012dbc0: 6170 3c2f 613e 2c20 4e55 4c4c 293b 203c ap, NULL); < │ │ │ │ +0012dbd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0012dbe0: 656e 7422 3e2f 2f20 616e 6f6e 796d 6f75 ent">// anonymou │ │ │ │ +0012dbf0: 7320 5265 706c 7954 6f20 6164 6472 6573 s ReplyTo addres │ │ │ │ +0012dc00: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ +0012dc10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012dc20: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if
    (soap_send_ │ │ │ │ +0012dc50: 6e73 5f5f 6263 6173 7453 7472 696e 6728 ns__bcastString( │ │ │ │ +0012dc60: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +0012dc90: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "soap.udp │ │ │ │ +0012dcc0: 3a2f 2f65 6e64 706f 696e 7426 7175 6f74 ://endpoint" │ │ │ │ +0012dcd0: 3b3c 2f73 7061 6e3e 2c20 3c73 7061 6e20 ;, "SOAP │ │ │ │ +0012dd00: 2061 6374 696f 6e26 7175 6f74 3b3c 2f73 action"
    , "hello wo │ │ │ │ +0012dd40: 726c 6421 2671 756f 743b 3c2f 7370 616e rld!"))
    .
    {.
    {
    .< │ │ │ │ -0012dd90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012dda0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_print │ │ │ │ -0012de00: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(& │ │ │ │ -0012de10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -0012de40: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    │ │ │ │ +0012dd80: 226c 696e 6522 3e20 203c 6120 636c 6173 "line"> soap │ │ │ │ +0012dde0: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault │ │ │ │ +0012ddf0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +0012de20: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); │ │ │ │ +0012de30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ 0012de50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    else
    .
    {.
    while ( │ │ │ │ -0012df00: 3129 3c2f 6469 763e 0a3c 6469 7620 636c 1)
    .
    {.
    if ( │ │ │ │ -0012df60: 736f 6170 5f72 6563 765f 6e73 5f5f 6263 soap_recv_ns__bc │ │ │ │ -0012df70: 6173 7453 7472 696e 6752 6573 706f 6e73 astStringRespons │ │ │ │ -0012df80: 6528 2661 6d70 3b3c 6120 636c 6173 733d e(&so │ │ │ │ -0012dfb0: 6170 3c2f 613e 2c20 2661 6d70 3b72 6573 ap, &res │ │ │ │ -0012dfc0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    │ │ │ │ -0012dfe0: 2020 3c73 7061 6e20 636c 6173 733d 226b brea │ │ │ │ -0012e000: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    │ │ │ │ -0012e010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // Got response │ │ │ │ -0012e050: 2026 2333 393b 7265 7326 2333 393b 2066 'res' f │ │ │ │ -0012e060: 726f 6d20 6120 7365 7276 6572 203c 2f73 rom a server
    .
    } │ │ │ │ -0012e090: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if │ │ │ │ -0012e0d0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -0012e100: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .error< │ │ │ │ -0012e150: 2f61 3e20 3d3d 203c 6120 636c 6173 733d /a> == SOAP_ │ │ │ │ -0012e1b0: 454f 463c 2f61 3e20 2661 6d70 3b26 616d EOF &&am │ │ │ │ -0012e1c0: 703b 203c 6120 636c 6173 733d 2263 6f64 p; soap.errn │ │ │ │ -0012e240: 756d 3c2f 613e 203d 3d20 3029 203c 2f64 um == 0) .
    ... // Timeout: │ │ │ │ -0012e290: 6e6f 206d 6f72 6520 6d65 7373 6167 6573 no more messages │ │ │ │ -0012e2a0: 2072 6563 6569 7665 6420 3c2f 7370 616e received
    .
    else
    .
    < │ │ │ │ -0012e310: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0012e320: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -0012e330: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga │ │ │ │ -0012e340: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4 │ │ │ │ -0012e350: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af │ │ │ │ -0012e360: 223e 736f 6170 5f70 7269 6e74 5f66 6175 ">soap_print_fau │ │ │ │ -0012e370: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std │ │ │ │ -0012e3b0: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    .} │ │ │ │ -0012e3d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..< │ │ │ │ -0012e4a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0012e4b0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -0012e4c0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ -0012e4d0: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825 │ │ │ │ -0012e4e0: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec │ │ │ │ -0012e4f0: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9">soap_end │ │ │ │ -0012e500: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -0012e530: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    . │ │ │ │ -0012e550: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s │ │ │ │ -0012e5e0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    . │ │ │ │ -0012e5f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Note t │ │ │ │ -0012e610: 6861 7420 6120 7365 7276 6572 2066 6f72 hat a server for │ │ │ │ -0012e620: 2074 6865 203c 636f 6465 3e62 6361 7374 the bcast │ │ │ │ -0012e630: 5374 7269 6e67 3c2f 636f 6465 3e20 646f String do │ │ │ │ -0012e640: 6573 206e 6f74 206e 6565 6420 746f 2075 es not need to u │ │ │ │ -0012e650: 7365 2074 776f 2d6f 6e65 2077 6179 206d se two-one way m │ │ │ │ -0012e660: 6573 7361 6765 732e 2054 6875 732c 206d essages. Thus, m │ │ │ │ -0012e670: 756c 7469 6361 7374 2072 6571 7565 7374 ulticast request │ │ │ │ -0012e680: 2d72 6573 706f 6e73 6520 6d65 7373 6167 -response messag │ │ │ │ -0012e690: 6520 7061 7474 6572 6e20 6361 6e20 6265 e pattern can be │ │ │ │ -0012e6a0: 2064 6563 6c61 7265 6420 616e 6420 696d declared and im │ │ │ │ -0012e6b0: 706c 656d 656e 7465 6420 6173 2072 6571 plemented as req │ │ │ │ -0012e6c0: 7565 7374 2d72 6573 706f 6e73 6520 6f70 uest-response op │ │ │ │ -0012e6d0: 6572 6174 696f 6e73 2061 7420 7468 6520 erations at the │ │ │ │ -0012e6e0: 7365 7276 6572 2073 6964 652e 3c2f 703e server side.

    │ │ │ │ -0012e6f0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -0012e710: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .SOAP-over-UDP │ │ │ │ -0012e760: 2073 6572 7665 723c 2f68 323e 0a3c 703e server

    .

    │ │ │ │ -0012e770: 5468 6520 666f 6c6c 6f77 696e 6720 6578 The following ex │ │ │ │ -0012e780: 616d 706c 6520 636f 6465 2069 6c6c 7573 ample code illus │ │ │ │ -0012e790: 7472 6174 6573 2061 2053 4f41 502d 6f76 trates a SOAP-ov │ │ │ │ -0012e7a0: 6572 2d55 4450 2073 6572 7665 7220 666f er-UDP server fo │ │ │ │ -0012e7b0: 7220 6f6e 652d 7761 7920 3c63 6f64 653e r one-way │ │ │ │ -0012e7c0: 7365 6e64 5374 7269 6e67 3c2f 636f 6465 sendString and request-re │ │ │ │ -0012e7e0: 7370 6f6e 7365 203c 636f 6465 3e65 6368 sponse ech │ │ │ │ -0012e7f0: 6f53 7472 696e 673c 2f63 6f64 653e 206d oString m │ │ │ │ -0012e800: 6573 7361 6765 732e 2054 6869 7320 6578 essages. This ex │ │ │ │ -0012e810: 616d 706c 6520 6173 7375 6d65 7320 7468 ample assumes th │ │ │ │ -0012e820: 6174 2074 6865 2069 6e74 6572 6661 6365 at the interface │ │ │ │ -0012e830: 2068 6561 6465 7220 6669 6c65 2069 6e63 header file inc │ │ │ │ -0012e840: 6c75 6465 7320 7468 6520 534f 4150 2048 ludes the SOAP H │ │ │ │ -0012e850: 6561 6465 7220 7769 7468 2057 532d 4164 eader with WS-Ad │ │ │ │ -0012e860: 6472 6573 7369 6e67 2065 6c65 6d65 6e74 dressing element │ │ │ │ -0012e870: 7320 696d 706f 7274 6564 2077 6974 6820 s imported with │ │ │ │ -0012e880: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import "w │ │ │ │ -0012e890: 7361 2e68 223c 2f63 6f64 653e 2061 6e64 sa.h" and │ │ │ │ -0012e8a0: 2074 6865 203c 636f 6465 3e6e 735f 5f65 the ns__e │ │ │ │ -0012e8b0: 6368 6f53 7472 696e 673c 2f63 6f64 653e choString │ │ │ │ -0012e8c0: 2066 756e 6374 696f 6e20 6469 7363 7573 function discus │ │ │ │ -0012e8d0: 7365 6420 696e 2053 6563 7469 6f6e 203c sed in Section < │ │ │ │ -0012e8e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0012e8f0: 663d 2269 6e64 6578 2e68 746d 6c23 7773 f="index.html#ws │ │ │ │ -0012e900: 6175 6470 223e 5573 696e 6720 5753 2d41 audp">Using WS-A │ │ │ │ -0012e910: 6464 7265 7373 696e 6720 7769 7468 2053 ddressing with S │ │ │ │ -0012e920: 4f41 502d 6f76 6572 2d55 4450 3c2f 613e OAP-over-UDP │ │ │ │ -0012e930: 202e 3c2f 703e 0a3c 6469 7620 636c 6173 .

    .
    < │ │ │ │ -0012e960: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ -0012e970: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ │ -0012e980: 6465 2026 7175 6f74 3b70 6c75 6769 6e2f de "plugin/ │ │ │ │ -0012e990: 7773 6161 7069 2e68 2671 756f 743b 3c2f wsaapi.h"
    .
    < │ │ │ │ -0012e9c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai │ │ │ │ -0012ea00: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    s │ │ │ │ -0012ea50: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    so │ │ │ │ -0012eb30: 6170 5f69 6e69 7431 3c2f 613e 2826 616d ap_init1(&am │ │ │ │ -0012eb40: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, SOAP_IO_UD │ │ │ │ -0012ebd0: 503c 2f61 3e29 3b20 3c73 7061 6e20 636c P); // │ │ │ │ -0012ebf0: 206d 7573 7420 7365 7420 5544 5020 666c must set UDP fl │ │ │ │ -0012ec00: 6167 203c 2f73 7061 6e3e 3c2f 6469 763e ag
    │ │ │ │ -0012ec10: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    // bind to ho │ │ │ │ -0012ed10: 7374 2028 4e55 4c4c 203d 2063 7572 7265 st (NULL = curre │ │ │ │ -0012ed20: 6e74 2068 6f73 7429 2061 6e64 2070 6f72 nt host) and por │ │ │ │ -0012ed30: 743a 203c 2f73 7061 6e3e 3c2f 6469 763e t:
    │ │ │ │ -0012ed40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ -0012ed70: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soa │ │ │ │ -0012edd0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(soap_bind │ │ │ │ -0012ee40: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -0012ee70: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, │ │ │ │ -0012eec0: 686f 7374 3c2f 613e 2c20 3c61 2063 6c61 host, port, BAC │ │ │ │ -0012ef20: 4b4c 4f47 2929 2920 3c2f 6469 763e 0a3c KLOG)))
    .< │ │ │ │ -0012ef30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012ef40: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    │ │ │ │ -0012ef60: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f │ │ │ │ -0012efc0: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s │ │ │ │ -0012f000: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .< │ │ │ │ -0012f010: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012f020: 3e20 2020 2065 7869 7428 4558 4954 5f46 > exit(EXIT_F │ │ │ │ -0012f030: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    . │ │ │ │ -0012f040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . │ │ │ │ -0012f070: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while │ │ │ │ -0012f090: 3c2f 7370 616e 3e20 2831 293c 2f64 6976 (1)
    .
    {
    . │ │ │ │ -0012f0d0: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ -0012f0f0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_se │ │ │ │ -0012f150: 7276 653c 2f61 3e28 2661 6d70 3b3c 6120 rve(&soap)) < │ │ │ │ -0012f190: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_print_faul │ │ │ │ -0012f210: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap, stde │ │ │ │ -0012f250: 7272 293b 203c 7370 616e 2063 6c61 7373 rr); // re │ │ │ │ -0012f270: 706f 7274 2074 6865 2070 726f 626c 656d port the problem │ │ │ │ -0012f280: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0012f290: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012f2a0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_d │ │ │ │ -0012f300: 6573 7472 6f79 3c2f 613e 2826 616d 703b estroy(& │ │ │ │ -0012f310: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -0012f340: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ -0012f360: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0012f370: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -0012f380: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ -0012f390: 6761 3831 6130 3039 6165 3165 6138 3235 ga81a009ae1ea825 │ │ │ │ -0012f3a0: 6130 3565 3532 3431 6532 6237 6138 6563 a05e5241e2b7a8ec │ │ │ │ -0012f3b0: 6539 223e 736f 6170 5f65 6e64 3c2f 613e e9">soap_end │ │ │ │ -0012f3c0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -0012f3f0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .< │ │ │ │ -0012f400: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012f410: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ -0012f430: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(&s │ │ │ │ -0012f4c0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); │ │ │ │ -0012f4e0: 2f2f 2063 6c6f 7365 2063 6f6e 6e65 6374 // close connect │ │ │ │ -0012f4f0: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion
    .
    }
    . │ │ │ │ -0012f530: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns │ │ │ │ -0012f570: 5f5f 6563 686f 5374 7269 6e67 283c 7370 __echoString(struct │ │ │ │ -0012f5a0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -0012f5d0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha │ │ │ │ -0012f620: 723c 2f73 7061 6e3e 202a 7374 722c 203c r *str, < │ │ │ │ -0012f630: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0012f640: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char **res) els │ │ │ │ +0012de80: 653c 2f73 7061 6e3e 203c 2f64 6976 3e0a e
    . │ │ │ │ +0012de90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    while (1)
    .< │ │ │ │ +0012def0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012df00: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    │ │ │ │ +0012df20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_recv_ │ │ │ │ +0012df50: 6e73 5f5f 6263 6173 7453 7472 696e 6752 ns__bcastStringR │ │ │ │ +0012df60: 6573 706f 6e73 6528 2661 6d70 3b3c 6120 esponse(&soap, &a │ │ │ │ +0012dfa0: 6d70 3b72 6573 2929 203c 2f64 6976 3e0a mp;res))
    . │ │ │ │ +0012dfb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; │ │ │ │ +0012dff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... │ │ │ │ +0012e010: 203c 7370 616e 2063 6c61 7373 3d22 636f // Got re │ │ │ │ +0012e030: 7370 6f6e 7365 2026 2333 393b 7265 7326 sponse 'res& │ │ │ │ +0012e040: 2333 393b 2066 726f 6d20 6120 7365 7276 #39; from a serv │ │ │ │ +0012e050: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
    │ │ │ │ +0012e060: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ +0012e090: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so │ │ │ │ +0012e0e0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap. │ │ │ │ +0012e130: 6572 726f 723c 2f61 3e20 3d3d 203c 6120 error == SOAP_EOF &a │ │ │ │ +0012e1a0: 6d70 3b26 616d 703b 203c 6120 636c 6173 mp;& │ │ │ │ +0012e1d0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.errnum == │ │ │ │ +0012e230: 3029 203c 2f64 6976 3e0a 3c64 6976 2063 0)
    .
    │ │ │ │ +0012e250: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // Tim │ │ │ │ +0012e270: 656f 7574 3a20 6e6f 206d 6f72 6520 6d65 eout: no more me │ │ │ │ +0012e280: 7373 6167 6573 2072 6563 6569 7665 6420 ssages received │ │ │ │ +0012e290: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0012e2b0: 2020 3c73 7061 6e20 636c 6173 733d 226b else │ │ │ │ +0012e2d0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0012e2e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012e2f0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_pri │ │ │ │ +0012e350: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am │ │ │ │ +0012e360: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stderr); .
    }
    . │ │ │ │ +0012e3d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro │ │ │ │ +0012e430: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap);.
    soap_e │ │ │ │ +0012e4e0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soap_ │ │ │ │ +0012e590: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);< │ │ │ │ +0012e5d0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +0012e5f0: 4e6f 7465 2074 6861 7420 6120 7365 7276 Note that a serv │ │ │ │ +0012e600: 6572 2066 6f72 2074 6865 203c 636f 6465 er for the bcastString does not nee │ │ │ │ +0012e630: 6420 746f 2075 7365 2074 776f 2d6f 6e65 d to use two-one │ │ │ │ +0012e640: 2077 6179 206d 6573 7361 6765 732e 2054 way messages. T │ │ │ │ +0012e650: 6875 732c 206d 756c 7469 6361 7374 2072 hus, multicast r │ │ │ │ +0012e660: 6571 7565 7374 2d72 6573 706f 6e73 6520 equest-response │ │ │ │ +0012e670: 6d65 7373 6167 6520 7061 7474 6572 6e20 message pattern │ │ │ │ +0012e680: 6361 6e20 6265 2064 6563 6c61 7265 6420 can be declared │ │ │ │ +0012e690: 616e 6420 696d 706c 656d 656e 7465 6420 and implemented │ │ │ │ +0012e6a0: 6173 2072 6571 7565 7374 2d72 6573 706f as request-respo │ │ │ │ +0012e6b0: 6e73 6520 6f70 6572 6174 696f 6e73 2061 nse operations a │ │ │ │ +0012e6c0: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid │ │ │ │ +0012e6d0: 652e 3c2f 703e 0a3c 703e f09f 949d 203c e.

    .

    .... < │ │ │ │ +0012e6e0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +0012e6f0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +0012e700: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .SOAP-ov │ │ │ │ +0012e740: 6572 2d55 4450 2073 6572 7665 723c 2f68 er-UDP server.

    The follow │ │ │ │ +0012e760: 696e 6720 6578 616d 706c 6520 636f 6465 ing example code │ │ │ │ +0012e770: 2069 6c6c 7573 7472 6174 6573 2061 2053 illustrates a S │ │ │ │ +0012e780: 4f41 502d 6f76 6572 2d55 4450 2073 6572 OAP-over-UDP ser │ │ │ │ +0012e790: 7665 7220 666f 7220 6f6e 652d 7761 7920 ver for one-way │ │ │ │ +0012e7a0: 3c63 6f64 653e 7365 6e64 5374 7269 6e67 sendString │ │ │ │ +0012e7b0: 3c2f 636f 6465 3e20 616e 6420 7265 7175 and requ │ │ │ │ +0012e7c0: 6573 742d 7265 7370 6f6e 7365 203c 636f est-response echoString messages. T │ │ │ │ +0012e7f0: 6869 7320 6578 616d 706c 6520 6173 7375 his example assu │ │ │ │ +0012e800: 6d65 7320 7468 6174 2074 6865 2069 6e74 mes that the int │ │ │ │ +0012e810: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ +0012e820: 6c65 2069 6e63 6c75 6465 7320 7468 6520 le includes the │ │ │ │ +0012e830: 534f 4150 2048 6561 6465 7220 7769 7468 SOAP Header with │ │ │ │ +0012e840: 2057 532d 4164 6472 6573 7369 6e67 2065 WS-Addressing e │ │ │ │ +0012e850: 6c65 6d65 6e74 7320 696d 706f 7274 6564 lements imported │ │ │ │ +0012e860: 2077 6974 6820 3c63 6f64 653e 2369 6d70 with #imp │ │ │ │ +0012e870: 6f72 7420 2277 7361 2e68 223c 2f63 6f64 ort "wsa.h" and the ns__echoString< │ │ │ │ +0012e8a0: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function │ │ │ │ +0012e8b0: 6469 7363 7573 7365 6420 696e 2053 6563 discussed in Sec │ │ │ │ +0012e8c0: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion Usin │ │ │ │ +0012e8f0: 6720 5753 2d41 6464 7265 7373 696e 6720 g WS-Addressing │ │ │ │ +0012e900: 7769 7468 2053 4f41 502d 6f76 6572 2d55 with SOAP-over-U │ │ │ │ +0012e910: 4450 3c2f 613e 202e 3c2f 703e 0a3c 6469 DP .

    .
    │ │ │ │ +0012e960: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p │ │ │ │ +0012e970: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q │ │ │ │ +0012e980: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    .
    .
    int main()
    │ │ │ │ +0012e9f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +0012ea20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0012ea30: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap soap;
    ...< │ │ │ │ +0012ecc0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012ecd0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > // bind │ │ │ │ +0012ecf0: 2074 6f20 686f 7374 2028 4e55 4c4c 203d to host (NULL = │ │ │ │ +0012ed00: 2063 7572 7265 6e74 2068 6f73 7429 2061 current host) a │ │ │ │ +0012ed10: 6e64 2070 6f72 743a 203c 2f73 7061 6e3e nd port: │ │ │ │ +0012ed20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173

    .
    if ( │ │ │ │ +0012ed60: 213c 6120 636c 6173 733d 2263 6f64 6522 !soap_valid_so │ │ │ │ +0012edc0: 636b 6574 3c2f 613e 283c 6120 636c 6173 cket(soap_bi │ │ │ │ +0012ee20: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap, host, │ │ │ │ +0012eeb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 port, BACKLOG))) .
    {
    │ │ │ │ +0012ef30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p │ │ │ │ +0012efa0: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(& │ │ │ │ +0012efb0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +0012efe0: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    exit( │ │ │ │ +0012f010: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); < │ │ │ │ +0012f020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    while (1 │ │ │ │ +0012f080: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {..
    │ │ │ │ +0012f190: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin │ │ │ │ +0012f1f0: 745f 6661 756c 743c 2f61 3e28 2661 6d70 t_fault(& │ │ │ │ +0012f200: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ +0012f230: 2c20 7374 6465 7272 293b 203c 7370 616e , stderr); // report the p │ │ │ │ +0012f260: 726f 626c 656d 203c 2f73 7061 6e3e 3c2f roblem ..< │ │ │ │ +0012f330: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0012f340: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_e │ │ │ │ +0012f3a0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap); .
    }
    .
    soap_ │ │ │ │ +0012f470: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap); │ │ │ │ +0012f4b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // close c │ │ │ │ +0012f4d0: 6f6e 6e65 6374 696f 6e20 3c2f 7370 616e onnection
    .
    } .
    .< │ │ │ │ +0012f530: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0012f540: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int ns__echoStri │ │ │ │ +0012f560: 6e67 283c 7370 616e 2063 6c61 7373 3d22 ng(struct< │ │ │ │ +0012f580: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ +0012f5b0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ +0012f5e0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, char * │ │ │ │ +0012f610: 7374 722c 203c 7370 616e 2063 6c61 7373 str, c │ │ │ │ +0012f630: 6861 723c 2f73 7061 6e3e 202a 2a72 6573 har **res │ │ │ │ +0012f640: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    {
    . │ │ │ │ -0012f690: 203c 7370 616e 2063 6c61 7373 3d22 636f // check │ │ │ │ -0012f6b0: 6966 2057 532d 4164 6472 6573 7369 6e67 if WS-Addressing │ │ │ │ -0012f6c0: 2068 6561 6465 7273 2061 7265 2070 7265 headers are pre │ │ │ │ -0012f6d0: 7365 6e74 2061 6e64 2063 6f72 7265 6374 sent and correct │ │ │ │ -0012f6e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0012f700: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_wsa_ │ │ │ │ -0012f730: 6368 6563 6b28 3c61 2063 6c61 7373 3d22 check(soa │ │ │ │ -0012f760: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    . │ │ │ │ -0012f780: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ -0012f7a0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap-> │ │ │ │ -0012f7e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error;
    .
    // should ch │ │ │ │ -0012f870: 6563 6b20 666f 7220 6475 706c 6963 6174 eck for duplicat │ │ │ │ -0012f880: 6520 6d65 7373 6167 6573 2028 736f 6d65 e messages (some │ │ │ │ -0012f890: 7468 696e 6720 7468 6174 2057 532d 5265 thing that WS-Re │ │ │ │ -0012f8a0: 6c69 6162 6c65 4d65 7373 6167 696e 6720 liableMessaging │ │ │ │ -0012f8b0: 646f 6573 2074 6f6f 293c 2f73 7061 6e3e does too) │ │ │ │ -0012f8c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ -0012f900: 6368 6563 6b5f 7265 6365 6976 6564 283c check_received(< │ │ │ │ -0012f910: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0012f920: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0012f930: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -0012f940: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;head │ │ │ │ -0012f990: 6572 3c2f 613e 2d26 6774 3b77 7361 5f5f er->wsa__ │ │ │ │ -0012f9a0: 4d65 7373 6167 6549 4429 2920 3c2f 6469 MessageID)) .
    {
    .< │ │ │ │ -0012f9d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012f9e0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // Re │ │ │ │ -0012fa00: 7175 6573 7420 6d65 7373 6167 6520 616c quest message al │ │ │ │ -0012fa10: 7265 6164 7920 7265 6365 6976 6564 203c ready received < │ │ │ │ -0012fa20: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -0012fa40: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -0012fa60: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S │ │ │ │ -0012fac0: 4f41 505f 5354 4f50 3c2f 613e 3b20 3c73 OAP_STOP; // don't │ │ │ │ -0012faf0: 2072 6574 7572 6e20 7265 7370 6f6e 7365 return response │ │ │ │ -0012fb00: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0012fb10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0012fb20: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ -0012fb40: 2a72 6573 203d 2073 7472 3b20 3c2f 6469 *res = str; .
    // │ │ │ │ -0012fb80: 7265 7475 726e 204f 4b20 7769 7468 2057 return OK with W │ │ │ │ -0012fb90: 532d 4164 6472 6573 7369 6e67 2072 6570 S-Addressing rep │ │ │ │ -0012fba0: 6c79 2068 6561 6465 7273 2c20 6d65 7373 ly headers, mess │ │ │ │ -0012fbb0: 6167 6520 4944 2069 7320 6964 5f63 6f75 age ID is id_cou │ │ │ │ -0012fbc0: 6e74 2b31 3c2f 7370 616e 3e3c 2f64 6976 nt+1
    .
    │ │ │ │ -0012fc00: 7265 7475 726e 3c2f 7370 616e 3e20 736f return so │ │ │ │ -0012fc10: 6170 5f77 7361 5f72 6570 6c79 283c 6120 ap_wsa_reply(soap, s │ │ │ │ -0012fca0: 6f61 705f 696e 7432 733c 2f61 3e28 3c61 oap_int2s(soap, i │ │ │ │ -0012fce0: 645f 636f 756e 742b 2b29 2c20 3c73 7061 d_count++), "ht │ │ │ │ -0012fd10: 7470 3a2f 2f67 656e 6976 6961 2e63 6f6d tp://genivia.com │ │ │ │ -0012fd20: 2f75 6470 2f65 6368 6f53 7472 696e 6752 /udp/echoStringR │ │ │ │ -0012fd30: 6573 706f 6e73 6526 7175 6f74 3b3c 2f73 esponse");
    .} │ │ │ │ +0012f670: 696e 6522 3e20 203c 7370 616e 2063 6c61 ine"> // │ │ │ │ +0012f690: 6368 6563 6b20 6966 2057 532d 4164 6472 check if WS-Addr │ │ │ │ +0012f6a0: 6573 7369 6e67 2068 6561 6465 7273 2061 essing headers a │ │ │ │ +0012f6b0: 7265 2070 7265 7365 6e74 2061 6e64 2063 re present and c │ │ │ │ +0012f6c0: 6f72 7265 6374 3c2f 7370 616e 3e3c 2f64 orrect.
    if (soa │ │ │ │ +0012f710: 705f 7773 615f 6368 6563 6b28 3c61 2063 p_wsa_check(soap)).. │ │ │ │ +0012f820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // sho │ │ │ │ +0012f850: 756c 6420 6368 6563 6b20 666f 7220 6475 uld check for du │ │ │ │ +0012f860: 706c 6963 6174 6520 6d65 7373 6167 6573 plicate messages │ │ │ │ +0012f870: 2028 736f 6d65 7468 696e 6720 7468 6174 (something that │ │ │ │ +0012f880: 2057 532d 5265 6c69 6162 6c65 4d65 7373 WS-ReliableMess │ │ │ │ +0012f890: 6167 696e 6720 646f 6573 2074 6f6f 293c aging does too)< │ │ │ │ +0012f8a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +0012f8c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if
    (check_rece │ │ │ │ +0012f8f0: 6976 6564 283c 6120 636c 6173 733d 2263 ived(soap │ │ │ │ +0012f920: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->header-> │ │ │ │ +0012f980: 3b77 7361 5f5f 4d65 7373 6167 6549 4429 ;wsa__MessageID) │ │ │ │ +0012f990: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    // Request mess │ │ │ │ +0012f9f0: 6167 6520 616c 7265 6164 7920 7265 6365 age already rece │ │ │ │ +0012fa00: 6976 6564 203c 2f73 7061 6e3e 3c2f 6469 ived .
    return │ │ │ │ +0012fa50: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_STOP; // don │ │ │ │ +0012fad0: 2623 3339 3b74 2072 6574 7572 6e20 7265 't return re │ │ │ │ +0012fae0: 7370 6f6e 7365 203c 2f73 7061 6e3e 3c2f sponse .
    }
    .
    *res = str │ │ │ │ +0012fb30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    // return OK │ │ │ │ +0012fb70: 7769 7468 2057 532d 4164 6472 6573 7369 with WS-Addressi │ │ │ │ +0012fb80: 6e67 2072 6570 6c79 2068 6561 6465 7273 ng reply headers │ │ │ │ +0012fb90: 2c20 6d65 7373 6167 6520 4944 2069 7320 , message ID is │ │ │ │ +0012fba0: 6964 5f63 6f75 6e74 2b31 3c2f 7370 616e id_count+1
    .
    .
    .
    │ │ │ │ +0012fd70: 7373 3d22 6c69 6e65 223e 3c73 7061 6e20 ss="line">int n │ │ │ │ +0012fda0: 735f 5f73 656e 6453 7472 696e 6728 3c73 s__sendString(struct soap *soap, ch │ │ │ │ +0012fe50: 6172 3c2f 7370 616e 3e20 2a73 7472 2920 ar *str) │ │ │ │ +0012fe60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 0012fe80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    ..
    // should check │ │ │ │ -00130020: 2066 6f72 2064 7570 6c69 6361 7465 206d for duplicate m │ │ │ │ -00130030: 6573 7361 6765 7320 3c2f 7370 616e 3e3c essages < │ │ │ │ -00130040: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (c │ │ │ │ -00130080: 6865 636b 5f72 6563 6569 7665 6428 3c61 heck_received(soap-&g │ │ │ │ -001300c0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;heade │ │ │ │ -00130110: 723c 2f61 3e2d 2667 743b 7773 615f 5f4d r->wsa__M │ │ │ │ -00130120: 6573 7361 6765 4944 2929 203c 2f64 6976 essageID))
    .
    {
    . │ │ │ │ -00130160: 2020 2020 3c73 7061 6e20 636c 6173 733d // Req │ │ │ │ -00130180: 7565 7374 206d 6573 7361 6765 2061 6c72 uest message alr │ │ │ │ -00130190: 6561 6479 2072 6563 6569 7665 6420 3c2f eady received
    .
    │ │ │ │ -001301c0: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ -001301e0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO │ │ │ │ -00130240: 4150 5f53 544f 503c 2f61 3e3b 3c2f 6469 AP_STOP;.
    }
    . │ │ │ │ -00130270: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ -001302a0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn │ │ │ │ -00130300: 534f 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 SOAP_OK;.
    }
    . i │ │ │ │ +0012feb0: 663c 2f73 7061 6e3e 2028 736f 6170 5f77 f (soap_w │ │ │ │ +0012fec0: 7361 5f63 6865 636b 283c 6120 636c 6173 sa_check( │ │ │ │ +0012fef0: 736f 6170 3c2f 613e 2929 3c2f 6469 763e soap))
    │ │ │ │ +0012ff00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return < │ │ │ │ +0012ff40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0012ff50: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0012ff60: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ +0012ff70: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro │ │ │ │ +0012ffc0: 723c 2f61 3e3b 3c2f 6469 763e 0a3c 6469 r;
    . │ │ │ │ +0012ffe0: 203c 7370 616e 2063 6c61 7373 3d22 636f // should │ │ │ │ +00130000: 2063 6865 636b 2066 6f72 2064 7570 6c69 check for dupli │ │ │ │ +00130010: 6361 7465 206d 6573 7361 6765 7320 3c2f cate messages
    .
    │ │ │ │ +00130040: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (check_recei │ │ │ │ +00130070: 7665 6428 3c61 2063 6c61 7373 3d22 636f ved(soap< │ │ │ │ +001300a0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->header-> │ │ │ │ +00130100: 7773 615f 5f4d 6573 7361 6765 4944 2929 wsa__MessageID)) │ │ │ │ +00130110: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    │ │ │ │ +00130160: 2f2f 2052 6571 7565 7374 206d 6573 7361 // Request messa │ │ │ │ +00130170: 6765 2061 6c72 6561 6479 2072 6563 6569 ge already recei │ │ │ │ +00130180: 7665 6420 3c2f 7370 616e 3e3c 2f64 6976 ved
    .
    return │ │ │ │ +001301d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_STOP;
    .
    } < │ │ │ │ +00130250: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    } .
    . │ │ │ │ -00130340: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int n │ │ │ │ -00130380: 735f 5f73 656e 6453 7472 696e 6752 6573 s__sendStringRes │ │ │ │ -00130390: 706f 6e73 6528 3c73 7061 6e20 636c 6173 ponse(stru │ │ │ │ -001303b0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, char *res)
    .< │ │ │ │ +00130340: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    ns__sendStr │ │ │ │ +00130370: 696e 6752 6573 706f 6e73 6528 3c73 7061 ingResponse(struct │ │ │ │ +001303a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +001303d0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +00130400: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char │ │ │ │ +00130420: 3c2f 7370 616e 3e20 2a72 6573 2920 3c2f *res) .
    {
    .< │ │ │ │ 00130450: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00130460: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    return SOAP_NO │ │ │ │ -00130500: 5f4d 4554 484f 443c 2f61 3e3b 203c 7370 _METHOD; // we don' │ │ │ │ -00130530: 3b74 2073 6572 7665 2074 6869 7320 6f70 ;t serve this op │ │ │ │ -00130540: 6572 6174 696f 6e3c 2f73 7061 6e3e 3c2f eration ret │ │ │ │ +00130480: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S │ │ │ │ +001304e0: 4f41 505f 4e4f 5f4d 4554 484f 443c 2f61 OAP_NO_METHOD; // we d │ │ │ │ +00130510: 6f6e 2623 3339 3b74 2073 6572 7665 2074 on't serve t │ │ │ │ +00130520: 6869 7320 6f70 6572 6174 696f 6e3c 2f73 his operation
    .
    }.
    }
    .< │ │ │ │ -00130570: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -00130580: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ -00130590: 705f 5f66 6c61 6773 5f68 746d 6c5f 6761 p__flags_html_ga │ │ │ │ -001305a0: 3338 3864 6165 3961 6263 3830 6364 3666 388dae9abc80cd6f │ │ │ │ -001305b0: 3664 3065 6366 6261 3338 3364 6130 3362 6d0ecfba383da03b │ │ │ │ -001305c0: 223e 3c64 6976 2063 6c61 7373 3d22 7474 ">
    #define SOA │ │ │ │ -00130650: 505f 494f 5f55 4450 3c2f 6469 763e 3c64 P_IO_UDP
    soap_mode IO in │ │ │ │ -00130680: 7075 742f 6f75 7470 7574 2066 6c61 6720 put/output flag │ │ │ │ -00130690: 7661 6c75 6520 746f 2075 7365 2055 4450 value to use UDP │ │ │ │ -001306a0: 2064 6174 6167 7261 6d73 2c20 6d65 7373 datagrams, mess │ │ │ │ -001306b0: 6167 6520 7369 7a65 2069 7320 6c69 6d69 age size is limi │ │ │ │ -001306c0: 7465 6420 746f 2055 4450 2070 6163 6b65 ted to UDP packe │ │ │ │ -001306d0: 7420 7369 7a65 3c2f 6469 763e 3c64 6976 t size
    < │ │ │ │ -001306f0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:159 │ │ │ │ -00130710: 363c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6
    .< │ │ │ │ -00130770: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -00130780: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">soap_int2 │ │ │ │ -001307d0: 733c 2f61 3e3c 2f64 6976 3e3c 6469 7620 s
    c │ │ │ │ -001307f0: 6f6e 7374 2063 6861 7220 2a20 736f 6170 onst char * soap │ │ │ │ -00130800: 5f69 6e74 3273 2873 7472 7563 7420 736f _int2s(struct so │ │ │ │ -00130810: 6170 202a 736f 6170 2c20 696e 7420 7661 ap *soap, int va │ │ │ │ -00130820: 6c75 6529 3c2f 6469 763e 3c64 6976 2063 lue)
    Con │ │ │ │ -00130840: 7665 7274 2061 2073 6967 6e65 6420 3332 vert a signed 32 │ │ │ │ -00130850: 2062 6974 2069 6e74 6567 6572 2074 6f20 bit integer to │ │ │ │ -00130860: 6120 6465 6369 6d61 6c20 7374 7269 6e67 a decimal string │ │ │ │ -00130870: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f .
    .

    The serv │ │ │ │ -001308a0: 6572 2062 696e 6473 2074 6f20 6120 686f er binds to a ho │ │ │ │ -001308b0: 7374 2061 6e64 2070 6f72 7420 616e 6420 st and port and │ │ │ │ -001308c0: 6163 6365 7074 7320 6d65 7373 6167 6573 accepts messages │ │ │ │ -001308d0: 2069 6e20 6120 6c6f 6f70 2e20 4265 6361 in a loop. Beca │ │ │ │ -001308e0: 7573 6520 5544 5020 646f 6573 206e 6f74 use UDP does not │ │ │ │ -001308f0: 2068 6176 6520 7468 6520 6571 7569 7661 have the equiva │ │ │ │ -00130900: 6c65 6e74 206f 6620 616e 2061 6363 6570 lent of an accep │ │ │ │ -00130910: 742c 2074 6865 206d 6573 7361 6765 7320 t, the messages │ │ │ │ -00130920: 6361 6e6e 6f74 2062 6520 6469 7370 6174 cannot be dispat │ │ │ │ -00130930: 6368 6564 2074 6f20 7468 7265 6164 732e ched to threads. │ │ │ │ -00130940: 2049 6e73 7465 6164 2074 6865 203c 636f Instead the soap_serve │ │ │ │ -001309d0: 3c2f 636f 6465 3e20 7761 6974 7320 666f waits fo │ │ │ │ -001309e0: 7220 6120 6d65 7373 6167 6520 616e 6420 r a message and │ │ │ │ -001309f0: 696d 6d65 6469 6174 656c 7920 6163 6365 immediately acce │ │ │ │ -00130a00: 7074 7320 6974 2e20 596f 7520 6361 6e20 pts it. You can │ │ │ │ -00130a10: 7573 6520 6120 7265 6365 6976 6520 7469 use a receive ti │ │ │ │ -00130a20: 6d65 6f75 7420 7661 6c75 6520 666f 7220 meout value for │ │ │ │ -00130a30: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::recv_time │ │ │ │ -00130af0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2074 out t │ │ │ │ -00130b00: 6f20 6d61 6b65 203c 636f 6465 3e3c 6120 o make soap │ │ │ │ -00130b80: 5f73 6572 7665 3c2f 613e 3c2f 636f 6465 _serve non-blocking.< │ │ │ │ -00130ba0: 2f70 3e0a 3c70 3e54 6f20 6f62 7461 696e /p>.

    To obtain │ │ │ │ -00130bb0: 2072 6573 706f 6e73 6520 6f6e 652d 7761 response one-wa │ │ │ │ -00130bc0: 7920 6f70 6572 6174 696f 6e73 2066 726f y operations fro │ │ │ │ -00130bd0: 6d20 6120 5753 444c 2c20 7573 6520 3c61 m a WSDL, use wsdl2 │ │ │ │ -00130c00: 6820 2d62 3c2f 636f 6465 3e3c 2f62 3e20 h -b │ │ │ │ -00130c10: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ -00130c20: 2d62 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 -b. This produces │ │ │ │ -00130c40: 2061 6464 6974 696f 6e61 6c20 6f6e 652d additional one- │ │ │ │ -00130c50: 7761 7920 6f70 6572 6174 696f 6e73 2074 way operations t │ │ │ │ -00130c60: 6f20 7375 7070 6f72 7420 6173 796e 6368 o support asynch │ │ │ │ -00130c70: 726f 6e6f 7573 2068 616e 646c 696e 6720 ronous handling │ │ │ │ -00130c80: 6f66 2072 6573 706f 6e73 6520 6d65 7373 of response mess │ │ │ │ -00130c90: 6167 6573 2069 6e20 7468 6520 7361 6d65 ages in the same │ │ │ │ -00130ca0: 2077 6179 2072 6571 7565 7374 7320 6172 way requests ar │ │ │ │ -00130cb0: 6520 6861 6e64 6c65 642e 3c2f 703e 0a3c e handled.

    .< │ │ │ │ -00130cc0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -00130ce0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -00130cf0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .SOAP-o │ │ │ │ -00130d30: 7665 722d 5544 5020 6d75 6c74 6963 6173 ver-UDP multicas │ │ │ │ -00130d40: 7420 7265 6365 6976 696e 6720 7365 7276 t receiving serv │ │ │ │ -00130d50: 6572 3c2f 6833 3e0a 3c70 3e46 6f72 2055 er

    .

    For U │ │ │ │ -00130d60: 4450 206d 756c 7469 6361 7374 2073 7570 DP multicast sup │ │ │ │ -00130d70: 706f 7274 2c20 666f 6c6c 6f77 2074 6865 port, follow the │ │ │ │ -00130d80: 2073 7567 6765 7374 696f 6e73 2069 6e20 suggestions in │ │ │ │ -00130d90: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section SOAP-over-UD │ │ │ │ -00130dd0: 5020 7365 7276 6572 3c2f 613e 2061 6e64 P server and │ │ │ │ -00130de0: 2063 6861 6e67 6520 7468 6520 696e 6974 change the init │ │ │ │ -00130df0: 6961 6c69 7a61 7469 6f6e 2070 6172 7473 ialization parts │ │ │ │ -00130e00: 206f 6620 7468 6520 636f 6465 2074 6f20 of the code to │ │ │ │ -00130e10: 656e 6162 6c65 2055 4450 206d 756c 7469 enable UDP multi │ │ │ │ -00130e20: 6361 7374 2070 6f72 7420 6269 6e64 696e cast port bindin │ │ │ │ -00130e30: 6720 6279 2074 6f20 7465 6c6c 696e 6720 g by to telling │ │ │ │ -00130e40: 7468 6520 6b65 726e 656c 2077 6869 6368 the kernel which │ │ │ │ -00130e50: 206d 756c 7469 6361 7374 2067 726f 7570 multicast group │ │ │ │ -00130e60: 7320 796f 7520 6172 6520 696e 7465 7265 s you are intere │ │ │ │ -00130e70: 7374 6564 2069 6e3a 3c2f 703e 0a3c 6469 sted in:

    .
    │ │ │ │ -00130ec0: 2369 6e63 6c75 6465 2026 7175 6f74 3b70 #include "p │ │ │ │ -00130ed0: 6c75 6769 6e2f 7773 6161 7069 2e68 2671 lugin/wsaapi.h&q │ │ │ │ -00130ee0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    #defi │ │ │ │ +00130630: 6e65 2053 4f41 505f 494f 5f55 4450 3c2f ne SOAP_IO_UDP
    soap_mode │ │ │ │ +00130660: 2049 4f20 696e 7075 742f 6f75 7470 7574 IO input/output │ │ │ │ +00130670: 2066 6c61 6720 7661 6c75 6520 746f 2075 flag value to u │ │ │ │ +00130680: 7365 2055 4450 2064 6174 6167 7261 6d73 se UDP datagrams │ │ │ │ +00130690: 2c20 6d65 7373 6167 6520 7369 7a65 2069 , message size i │ │ │ │ +001306a0: 7320 6c69 6d69 7465 6420 746f 2055 4450 s limited to UDP │ │ │ │ +001306b0: 2070 6163 6b65 7420 7369 7a65 3c2f 6469 packet size
    Definiti │ │ │ │ +001306e0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ +001306f0: 2e68 3a31 3539 363c 2f64 6976 3e3c 2f64 .h:1596
    .
    const char │ │ │ │ +001307e0: 2a20 736f 6170 5f69 6e74 3273 2873 7472 * soap_int2s(str │ │ │ │ +001307f0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +00130800: 696e 7420 7661 6c75 6529 3c2f 6469 763e int value)
    │ │ │ │ +00130810: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Convert a sig │ │ │ │ +00130830: 6e65 6420 3332 2062 6974 2069 6e74 6567 ned 32 bit integ │ │ │ │ +00130840: 6572 2074 6f20 6120 6465 6369 6d61 6c20 er to a decimal │ │ │ │ +00130850: 7374 7269 6e67 2e3c 2f64 6976 3e3c 2f64 string.
    .

    Th │ │ │ │ +00130880: 6520 7365 7276 6572 2062 696e 6473 2074 e server binds t │ │ │ │ +00130890: 6f20 6120 686f 7374 2061 6e64 2070 6f72 o a host and por │ │ │ │ +001308a0: 7420 616e 6420 6163 6365 7074 7320 6d65 t and accepts me │ │ │ │ +001308b0: 7373 6167 6573 2069 6e20 6120 6c6f 6f70 ssages in a loop │ │ │ │ +001308c0: 2e20 4265 6361 7573 6520 5544 5020 646f . Because UDP do │ │ │ │ +001308d0: 6573 206e 6f74 2068 6176 6520 7468 6520 es not have the │ │ │ │ +001308e0: 6571 7569 7661 6c65 6e74 206f 6620 616e equivalent of an │ │ │ │ +001308f0: 2061 6363 6570 742c 2074 6865 206d 6573 accept, the mes │ │ │ │ +00130900: 7361 6765 7320 6361 6e6e 6f74 2062 6520 sages cannot be │ │ │ │ +00130910: 6469 7370 6174 6368 6564 2074 6f20 7468 dispatched to th │ │ │ │ +00130920: 7265 6164 732e 2049 6e73 7465 6164 2074 reads. Instead t │ │ │ │ +00130930: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap_ser │ │ │ │ +001309b0: 7665 3c2f 613e 3c2f 636f 6465 3e20 7761 ve wa │ │ │ │ +001309c0: 6974 7320 666f 7220 6120 6d65 7373 6167 its for a messag │ │ │ │ +001309d0: 6520 616e 6420 696d 6d65 6469 6174 656c e and immediatel │ │ │ │ +001309e0: 7920 6163 6365 7074 7320 6974 2e20 596f y accepts it. Yo │ │ │ │ +001309f0: 7520 6361 6e20 7573 6520 6120 7265 6365 u can use a rece │ │ │ │ +00130a00: 6976 6520 7469 6d65 6f75 7420 7661 6c75 ive timeout valu │ │ │ │ +00130a10: 6520 666f 7220 3c63 6f64 653e 3c61 2063 e for soap::rec │ │ │ │ +00130ad0: 765f 7469 6d65 6f75 743c 2f61 3e3c 2f63 v_timeout to make soap_serve │ │ │ │ +00130b70: 3c2f 636f 6465 3e20 6e6f 6e2d 626c 6f63 non-bloc │ │ │ │ +00130b80: 6b69 6e67 2e3c 2f70 3e0a 3c70 3e54 6f20 king.

    .

    To │ │ │ │ +00130b90: 6f62 7461 696e 2072 6573 706f 6e73 6520 obtain response │ │ │ │ +00130ba0: 6f6e 652d 7761 7920 6f70 6572 6174 696f one-way operatio │ │ │ │ +00130bb0: 6e73 2066 726f 6d20 6120 5753 444c 2c20 ns from a WSDL, │ │ │ │ +00130bc0: 7573 6520 3c61 2068 7265 663d 2223 7773 use wsdl2h -b option │ │ │ │ +00130c00: 3c63 6f64 653e 2d62 3c2f 636f 6465 3e3c -b< │ │ │ │ +00130c10: 2f62 3e3c 2f61 3e2e 2054 6869 7320 7072 /b>. This pr │ │ │ │ +00130c20: 6f64 7563 6573 2061 6464 6974 696f 6e61 oduces additiona │ │ │ │ +00130c30: 6c20 6f6e 652d 7761 7920 6f70 6572 6174 l one-way operat │ │ │ │ +00130c40: 696f 6e73 2074 6f20 7375 7070 6f72 7420 ions to support │ │ │ │ +00130c50: 6173 796e 6368 726f 6e6f 7573 2068 616e asynchronous han │ │ │ │ +00130c60: 646c 696e 6720 6f66 2072 6573 706f 6e73 dling of respons │ │ │ │ +00130c70: 6520 6d65 7373 6167 6573 2069 6e20 7468 e messages in th │ │ │ │ +00130c80: 6520 7361 6d65 2077 6179 2072 6571 7565 e same way reque │ │ │ │ +00130c90: 7374 7320 6172 6520 6861 6e64 6c65 642e sts are handled. │ │ │ │ +00130ca0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ +00130cc0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +00130cd0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ +00130ce0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +00130cf0: 2069 643d 2273 6f61 706f 7665 7275 6470 id="soapoverudp │ │ │ │ +00130d00: 6d75 6c74 6963 6173 7422 3e3c 2f61 3e0a multicast">. │ │ │ │ +00130d10: 534f 4150 2d6f 7665 722d 5544 5020 6d75 SOAP-over-UDP mu │ │ │ │ +00130d20: 6c74 6963 6173 7420 7265 6365 6976 696e lticast receivin │ │ │ │ +00130d30: 6720 7365 7276 6572 3c2f 6833 3e0a 3c70 g server

    .

    For UDP multica │ │ │ │ +00130d50: 7374 2073 7570 706f 7274 2c20 666f 6c6c st support, foll │ │ │ │ +00130d60: 6f77 2074 6865 2073 7567 6765 7374 696f ow the suggestio │ │ │ │ +00130d70: 6e73 2069 6e20 5365 6374 696f 6e20 3c61 ns in Section SOAP-o │ │ │ │ +00130db0: 7665 722d 5544 5020 7365 7276 6572 3c2f ver-UDP server and change th │ │ │ │ +00130dd0: 6520 696e 6974 6961 6c69 7a61 7469 6f6e e initialization │ │ │ │ +00130de0: 2070 6172 7473 206f 6620 7468 6520 636f parts of the co │ │ │ │ +00130df0: 6465 2074 6f20 656e 6162 6c65 2055 4450 de to enable UDP │ │ │ │ +00130e00: 206d 756c 7469 6361 7374 2070 6f72 7420 multicast port │ │ │ │ +00130e10: 6269 6e64 696e 6720 6279 2074 6f20 7465 binding by to te │ │ │ │ +00130e20: 6c6c 696e 6720 7468 6520 6b65 726e 656c lling the kernel │ │ │ │ +00130e30: 2077 6869 6368 206d 756c 7469 6361 7374 which multicast │ │ │ │ +00130e40: 2067 726f 7570 7320 796f 7520 6172 6520 groups you are │ │ │ │ +00130e50: 696e 7465 7265 7374 6564 2069 6e3a 3c2f interested in:.

    .
    {
    │ │ │ │ 00130f50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    .
    < │ │ │ │ -00131020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00131030: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct ip_mreq mcast │ │ │ │ -00131050: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_init1 │ │ │ │ -001310d0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -00131100: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_I │ │ │ │ -00131160: 4f5f 5544 503c 2f61 3e29 3b20 3c2f 6469 O_UDP); ..
    < │ │ │ │ -00131250: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00131260: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (!soap_vali │ │ │ │ -001312d0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa │ │ │ │ -00131330: 705f 6269 6e64 3c2f 613e 2826 616d 703b p_bind(& │ │ │ │ -00131340: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -00131370: 2068 6f73 742c 2070 6f72 742c 2042 4143 host, port, BAC │ │ │ │ -00131380: 4b4c 4f47 2929 2920 3c2f 6469 763e 0a3c KLOG)))
    .< │ │ │ │ -00131390: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001313a0: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    │ │ │ │ -001313c0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f │ │ │ │ -00131420: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s │ │ │ │ -00131460: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .< │ │ │ │ -00131470: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00131480: 3e20 2020 2065 7869 7428 4558 4954 5f46 > exit(EXIT_F │ │ │ │ -00131490: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    . │ │ │ │ -001314a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . │ │ │ │ -001314d0: 206d 6361 7374 2e69 6d72 5f6d 756c 7469 mcast.imr_multi │ │ │ │ -001314e0: 6164 6472 2e73 5f61 6464 7220 3d20 696e addr.s_addr = in │ │ │ │ -001314f0: 6574 5f61 6464 7228 7075 7420 4950 206d et_addr(put IP m │ │ │ │ -00131500: 756c 7469 6361 7374 2061 6464 7265 7373 ulticast address │ │ │ │ -00131510: 206f 6620 6772 6f75 7020 6865 7265 293b of group here); │ │ │ │ -00131520: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    mcas │ │ │ │ -00131540: 742e 696d 725f 696e 7465 7266 6163 652e t.imr_interface. │ │ │ │ -00131550: 735f 6164 6472 203d 2068 746f 6e6c 2849 s_addr = htonl(I │ │ │ │ -00131560: 4e41 4444 525f 414e 5929 3b20 3c2f 6469 NADDR_ANY); .
    if (sets │ │ │ │ -001315b0: 6f63 6b6f 7074 283c 6120 636c 6173 733d ockopt(so │ │ │ │ -001315e0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap. │ │ │ │ -00131630: 6d61 7374 6572 3c2f 613e 2c20 4950 5052 master, IPPR │ │ │ │ -00131640: 4f54 4f5f 4950 2c20 4950 5f41 4444 5f4d OTO_IP, IP_ADD_M │ │ │ │ -00131650: 454d 4245 5253 4849 502c 2026 616d 703b EMBERSHIP, & │ │ │ │ -00131660: 6d63 6173 742c 203c 7370 616e 2063 6c61 mcast, siz │ │ │ │ -00131680: 656f 663c 2f73 7061 6e3e 286d 6361 7374 eof(mcast │ │ │ │ -00131690: 2929 266c 743b 3029 203c 2f64 6976 3e0a ))<0)
    . │ │ │ │ -001316a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... │ │ │ │ -001316d0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error< │ │ │ │ -001316e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    soa │ │ │ │ -00131790: 705f 6465 7374 726f 793c 2f61 3e28 2661 p_destroy(&a │ │ │ │ -001317a0: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .. │ │ │ │ -001318a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_done │ │ │ │ -00131900: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);
    .
    }
    .
    S │ │ │ │ -00131a20: 4f41 505f 534f 434b 4554 206d 6173 7465 OAP_SOCKET maste │ │ │ │ -00131a30: 723c 2f64 6976 3e3c 6469 7620 636c 6173 r
    The so │ │ │ │ -00131a50: 636b 6574 2073 6574 2062 7920 736f 6170 cket set by soap │ │ │ │ -00131a60: 5f62 696e 6420 286f 7220 7468 6520 432b _bind (or the C+ │ │ │ │ -00131a70: 2b20 7365 7276 6963 6520 636c 6173 7320 + service class │ │ │ │ -00131a80: 6269 6e64 206d 6574 686f 6429 2074 6f20 bind method) to │ │ │ │ -00131a90: 7365 7276 6520 6173 2074 6865 206d 6173 serve as the mas │ │ │ │ -00131aa0: 7465 7220 736f 636b 6574 2062 6f75 6e2e ter socket boun. │ │ │ │ -00131ab0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ │ -00131ad0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ -00131ae0: 6473 6f61 7032 2e68 3a33 3032 333c 2f64 dsoap2.h:3023
    .
    │ │ │ │ -00131b00: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d │ │ │ │ -001360c0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following │ │ │ │ -001360d0: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for │ │ │ │ -001360e0: 2073 6f61 7063 7070 3220 7265 6665 7273 soapcpp2 refers │ │ │ │ -001360f0: 2074 6f20 3c63 6f64 653e 7374 643a 3a6f to std::o │ │ │ │ -00136100: 7374 7265 616d 3c2f 636f 6465 3e20 7769 stream wi │ │ │ │ -00136110: 7468 6f75 7420 736f 6170 6370 7032 2074 thout soapcpp2 t │ │ │ │ -00136120: 6872 6f77 696e 6720 6572 726f 7273 2c20 hrowing errors, │ │ │ │ -00136130: 6279 2075 7369 6e67 203c 636f 6465 3e65 by using e │ │ │ │ -00136140: 7874 6572 6e3c 2f63 6f64 653e 2074 6f20 xtern to │ │ │ │ -00136150: 6465 636c 6172 6520 3c63 6f64 653e 636c declare cl │ │ │ │ -00136160: 6173 7320 7374 643a 3a6f 7374 7265 616d ass std::ostream │ │ │ │ -00136170: 3c2f 636f 6465 3e3a 3c2f 703e 0a3c 6469 :

    .
    // st │ │ │ │ -001361c0: 643a 3a6f 7374 7265 616d 2063 616e 2623 d::ostream can&# │ │ │ │ -001361d0: 3339 3b74 2062 6520 7365 7269 616c 697a 39;t be serializ │ │ │ │ -001361e0: 6564 2c20 6275 7420 6e65 6564 2074 6f20 ed, but need to │ │ │ │ -001361f0: 6265 2064 6563 6c61 7265 6420 746f 206d be declared to m │ │ │ │ -00136200: 616b 6520 6974 2076 6973 6962 6c65 2074 ake it visible t │ │ │ │ -00136210: 6f20 6753 4f41 5020 3c2f 7370 616e 3e3c o gSOAP < │ │ │ │ -00136220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ex │ │ │ │ -00136250: 7465 726e 3c2f 7370 616e 3e20 3c73 7061 tern class s │ │ │ │ -00136280: 7464 3a3a 6f73 7472 6561 6d3b 3c2f 6469 td::ostream; struc │ │ │ │ +00130f80: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ +00130fb0: 736f 6170 3c2f 613e 203c 6120 636c 6173 soap │ │ │ │ +00130fe0: 736f 6170 3c2f 613e 3b20 3c2f 6469 763e soap;
    │ │ │ │ +00130ff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc │ │ │ │ +00131020: 7420 3c2f 7370 616e 3e69 705f 6d72 6571 t ip_mreq │ │ │ │ +00131030: 206d 6361 7374 3b20 3c2f 6469 763e 0a3c mcast;
    .< │ │ │ │ +00131040: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00131050: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_ini │ │ │ │ +001310b0: 7431 3c2f 613e 2826 616d 703b 3c61 2063 t1(&soap, │ │ │ │ +00131140: 534f 4150 5f49 4f5f 5544 503c 2f61 3e29 SOAP_IO_UDP) │ │ │ │ +00131150: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap_register_p │ │ │ │ +001311d0: 6c75 6769 6e3c 2f61 3e28 2661 6d70 3b3c lugin(&< │ │ │ │ +001311e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001311f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00131200: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +00131210: 736f 6170 5f77 7361 293b 3c2f 6469 763e soap_wsa);
    │ │ │ │ +00131220: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ +00131250: 663c 2f73 7061 6e3e 2028 213c 6120 636c f (!soa │ │ │ │ +001312b0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(soap_bind │ │ │ │ +00131320: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +00131350: 703c 2f61 3e2c 2068 6f73 742c 2070 6f72 p, host, por │ │ │ │ +00131360: 742c 2042 4143 4b4c 4f47 2929 2920 3c2f t, BACKLOG))) .
    {
    │ │ │ │ +00131390: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p │ │ │ │ +00131400: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(& │ │ │ │ +00131410: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +00131440: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    exit( │ │ │ │ +00131470: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); < │ │ │ │ +00131480: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    mcast.imr │ │ │ │ +001314c0: 5f6d 756c 7469 6164 6472 2e73 5f61 6464 _multiaddr.s_add │ │ │ │ +001314d0: 7220 3d20 696e 6574 5f61 6464 7228 7075 r = inet_addr(pu │ │ │ │ +001314e0: 7420 4950 206d 756c 7469 6361 7374 2061 t IP multicast a │ │ │ │ +001314f0: 6464 7265 7373 206f 6620 6772 6f75 7020 ddress of group │ │ │ │ +00131500: 6865 7265 293b 203c 2f64 6976 3e0a 3c64 here);
    . │ │ │ │ +00131520: 2020 6d63 6173 742e 696d 725f 696e 7465 mcast.imr_inte │ │ │ │ +00131530: 7266 6163 652e 735f 6164 6472 203d 2068 rface.s_addr = h │ │ │ │ +00131540: 746f 6e6c 2849 4e41 4444 525f 414e 5929 tonl(INADDR_ANY) │ │ │ │ +00131550: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if │ │ │ │ +00131590: 2028 7365 7473 6f63 6b6f 7074 283c 6120 (setsockopt(soap.master │ │ │ │ +00131620: 2c20 4950 5052 4f54 4f5f 4950 2c20 4950 , IPPROTO_IP, IP │ │ │ │ +00131630: 5f41 4444 5f4d 454d 4245 5253 4849 502c _ADD_MEMBERSHIP, │ │ │ │ +00131640: 2026 616d 703b 6d63 6173 742c 203c 7370 &mcast, sizeof │ │ │ │ +00131670: 286d 6361 7374 2929 266c 743b 3029 203c (mcast))<0) < │ │ │ │ +00131680: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... │ │ │ │ +001316a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    .
    │ │ │ │ +001316e0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    . │ │ │ │ +001317c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_e │ │ │ │ +00131830: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soa │ │ │ │ +001318e0: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(& │ │ │ │ +001318f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +00131920: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }
    .
    < │ │ │ │ +001319a0: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ +001319b0: 6170 2e68 746d 6c23 6162 3634 3962 3866 ap.html#ab649b8f │ │ │ │ +001319c0: 3362 3731 3038 3164 3134 6563 3633 3530 3b71081d14ec6350 │ │ │ │ +001319d0: 6162 3462 3036 3739 3422 3e73 6f61 703a ab4b06794">soap: │ │ │ │ +001319e0: 3a6d 6173 7465 723c 2f61 3e3c 2f64 6976 :master
    SOAP_SOCKET │ │ │ │ +00131a10: 206d 6173 7465 723c 2f64 6976 3e3c 6469 master
    │ │ │ │ +00131a30: 5468 6520 736f 636b 6574 2073 6574 2062 The socket set b │ │ │ │ +00131a40: 7920 736f 6170 5f62 696e 6420 286f 7220 y soap_bind (or │ │ │ │ +00131a50: 7468 6520 432b 2b20 7365 7276 6963 6520 the C++ service │ │ │ │ +00131a60: 636c 6173 7320 6269 6e64 206d 6574 686f class bind metho │ │ │ │ +00131a70: 6429 2074 6f20 7365 7276 6520 6173 2074 d) to serve as t │ │ │ │ +00131a80: 6865 206d 6173 7465 7220 736f 636b 6574 he master socket │ │ │ │ +00131a90: 2062 6f75 6e2e 2e2e 3c2f 6469 763e 3c64 boun...
    Definition:< │ │ │ │ +00131ac0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a33 /b> stdsoap2.h:3 │ │ │ │ +00131ad0: 3032 333c 2f64 6976 3e3c 2f64 6976 3e0a 023
    . │ │ │ │ +00131ae0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    .... < │ │ │ │ +00131b00: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +00131b10: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +00131b20: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6831 ents

    .

    .Compi │ │ │ │ +00131b60: 6c65 2d74 696d 6520 666c 6167 733c 2f68 le-time flags.

    The follow │ │ │ │ +00131b80: 696e 6720 6d61 6372 6f73 2061 7265 2064 ing macros are d │ │ │ │ +00131b90: 6566 696e 6564 2069 6e20 7468 6520 4150 efined in the AP │ │ │ │ +00131ba0: 4920 646f 6375 6d65 6e74 6174 696f 6e20 I documentation │ │ │ │ +00131bb0: 4d6f 6475 6c65 203c 6120 636c 6173 733d Module WITH_MACRO c │ │ │ │ +00131bf0: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag │ │ │ │ +00131c00: 733c 2f61 3e2e 2054 6865 7365 206d 6163 s. These mac │ │ │ │ +00131c10: 726f 7320 6172 6520 7573 6564 2074 6f20 ros are used to │ │ │ │ +00131c20: 656e 6162 6c65 206f 7220 6469 7361 626c enable or disabl │ │ │ │ +00131c30: 6520 6665 6174 7572 6573 2061 7320 7370 e features as sp │ │ │ │ +00131c40: 6563 6966 6965 6420 6265 6c6f 772c 2062 ecified below, b │ │ │ │ +00131c50: 7920 636f 6d70 696c 696e 6720 736f 7572 y compiling sour │ │ │ │ +00131c60: 6365 2063 6f64 6520 6669 6c65 7320 7769 ce code files wi │ │ │ │ +00131c70: 7468 2063 6f6d 7069 6c65 7220 6f70 7469 th compiler opti │ │ │ │ +00131c80: 6f6e 203c 623e 3c63 6f64 653e 2d44 3c2f on -D to set │ │ │ │ +00131ca0: 2074 6865 206d 6163 726f 3a3c 2f70 3e0a the macro:

    . │ │ │ │ +00131cb0: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61 ......< │ │ │ │ +00131e50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00131e60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00131e70: 3e3c 636f 6465 3e23 5749 5448 5f53 4f41 >#WITH_SOA │ │ │ │ +00131e80: 5044 4546 535f 483c 2f63 6f64 653e 2020 PDEFS_H │ │ │ │ +00131e90: 203c 2f74 643e 3c74 6420 636c 6173 733d .< │ │ │ │ +00131f60: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00131f70: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +00131f80: 3c74 6420 636c 6173 733d 226d 6172 6b64 │ │ │ │ +00132030: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .... │ │ │ │ +001321b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 . │ │ │ │ +00132270: 3c74 7220 636c 6173 733d 226d 6172 6b64 ....... │ │ │ │ +00132640: 656e 6162 6c65 7320 4950 7636 2073 7570 enables IPv6 sup │ │ │ │ +00132650: 706f 7274 2020 2020 3c2f 7464 3e3c 2f74 port ...< │ │ │ │ +00132730: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00132740: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +00132750: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ +001329d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .... │ │ │ │ +00132b60: 656e 6162 6c65 7320 6465 666c 6174 6520 enables deflate │ │ │ │ +00132b70: 636f 6d70 7265 7373 696f 6e20 6f6e 6c79 compression only │ │ │ │ +00132b80: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section Zlib c │ │ │ │ +00132bc0: 6f6d 7072 6573 7369 6f6e 3c2f 613e 2020 ompression │ │ │ │ +00132bd0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 .. │ │ │ │ +00132c20: 3c63 6f64 653e 2357 4954 485f 4e54 4c4d #WITH_NTLM │ │ │ │ +00132c30: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +00132c40: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00132c50: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00132c60: 3e65 6e61 626c 6573 204e 544c 4d20 7375 >enables NTLM su │ │ │ │ +00132c70: 7070 6f72 7420 2020 203c 2f74 643e 3c2f pport ...... │ │ │ │ +00132e90: 3c63 6f64 653e 2357 4954 485f 494e 434c #WITH_INCL │ │ │ │ +00132ea0: 5544 455f 584c 4f43 414c 455f 483c 2f63 UDE_XLOCALE_H .... │ │ │ │ +00133070: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ +001331b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 │ │ │ │ +00133230: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +00133360: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +00133470: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +00133530: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....... │ │ │ │ +001337c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 ... │ │ │ │ +00133950: 6469 7361 626c 6573 2064 6570 656e 6465 disables depende │ │ │ │ +00133960: 6e63 6520 6f6e 2067 6c6f 6261 6c20 3c63 nce on global namespaces table, a t │ │ │ │ +00133990: 6162 6c65 206d 7573 7420 6265 2073 6574 able must be set │ │ │ │ +001339a0: 2065 7870 6c69 6369 746c 7920 7769 7468 explicitly with │ │ │ │ +001339b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set_ │ │ │ │ +00133a80: 6e61 6d65 7370 6163 6573 3c2f 613e 3c2f namespaces see also S │ │ │ │ +00133aa0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection X │ │ │ │ +00133ad0: 4d4c 206e 616d 6573 7061 6365 7320 616e ML namespaces an │ │ │ │ +00133ae0: 6420 7468 6520 6e61 6d65 7370 6163 6520 d the namespace │ │ │ │ +00133af0: 6d61 7070 696e 6720 7461 626c 653c 2f61 mapping table . │ │ │ │ +00133b10: 3c74 7220 636c 6173 733d 226d 6172 6b64 ... │ │ │ │ +00133c20: 3c63 6f64 653e 2357 4954 485f 5055 5245 #WITH_PURE │ │ │ │ +00133c30: 5f56 4952 5455 414c 3c2f 636f 6465 3e20 _VIRTUAL │ │ │ │ +00133c40: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 .....< │ │ │ │ +00133f00: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00133f10: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven"> │ │ │ │ +00133f20: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...< │ │ │ │ +001340f0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.. │ │ │ │ +00134290: 0a3c 2f74 6162 6c65 3e0a 3c70 3e54 6865 .
    d │ │ │ │ +00131d10: 6566 696e 6520 2020 3c2f 7468 3e3c 7468 efine r │ │ │ │ +00131d40: 6573 756c 7420 2020 203c 2f74 683e 3c2f esult
    #SO │ │ │ │ +00131da0: 4150 4445 4653 5f48 3c2f 636f 6465 3e20 APDEFS_H │ │ │ │ +00131db0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 the hea │ │ │ │ +00131de0: 6465 7220 6669 6c65 2074 6f20 696e 636c der file to incl │ │ │ │ +00131df0: 7564 652c 2069 6620 6469 6666 6572 656e ude, if differen │ │ │ │ +00131e00: 7420 6672 6f6d 203c 636f 6465 3e73 6f61 t from soa │ │ │ │ +00131e10: 7064 6566 732e 683c 2f63 6f64 653e 2020 pdefs.h │ │ │ │ +00131e20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    includes │ │ │ │ +00131ec0: 2074 6865 203c 636f 6465 3e73 6f61 7064 the soapd │ │ │ │ +00131ed0: 6566 732e 683c 2f63 6f64 653e 2066 696c efs.h fil │ │ │ │ +00131ee0: 6520 666f 7220 6375 7374 6f6d 2073 6574 e for custom set │ │ │ │ +00131ef0: 7469 6e67 732c 2073 6565 2053 6563 7469 tings, see Secti │ │ │ │ +00131f00: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Usin │ │ │ │ +00131f30: 6720 7468 6520 736f 6170 6465 6673 2e68 g the soapdefs.h │ │ │ │ +00131f40: 2068 6561 6465 7220 6669 6c65 3c2f 613e header file │ │ │ │ +00131f50: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_CO │ │ │ │ +00131fb0: 4d50 4154 3c2f 636f 6465 3e20 2020 3c2f MPAT removes dep │ │ │ │ +00131ff0: 656e 6465 6e63 7920 6f6e 2043 2b2b 2073 endency on C++ s │ │ │ │ +00132000: 7472 6561 6d20 6c69 6272 6172 6965 7320 tream libraries │ │ │ │ +00132010: 616e 6420 432b 2b20 6578 6365 7074 696f and C++ exceptio │ │ │ │ +00132020: 6e73 2020 2020 3c2f 7464 3e3c 2f74 723e ns
    #WITH │ │ │ │ +00132080: 5f4c 4541 4e3c 2f63 6f64 653e 2020 203c _LEAN < │ │ │ │ +00132090: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>creates a │ │ │ │ +001320c0: 736d 616c 6c2d 666f 6f74 7072 696e 7420 small-footprint │ │ │ │ +001320d0: 6578 6563 7574 6162 6c65 2c20 7365 6520 executable, see │ │ │ │ +001320e0: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section How │ │ │ │ +00132110: 2074 6f20 6d69 6e69 6d69 7a65 2061 7070 to minimize app │ │ │ │ +00132120: 6c69 6361 7469 6f6e 206d 656d 6f72 7920 lication memory │ │ │ │ +00132130: 666f 6f74 7072 696e 743c 2f61 3e20 2020 footprint │ │ │ │ +00132140: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    < │ │ │ │ +00132190: 636f 6465 3e23 5749 5448 5f4c 4541 4e45 code>#WITH_LEANE │ │ │ │ +001321a0: 523c 2f63 6f64 653e 2020 203c 2f74 643e R creates an eve │ │ │ │ +001321e0: 6e20 736d 616c 6c65 7220 666f 6f74 7072 n smaller footpr │ │ │ │ +001321f0: 696e 7420 6578 6563 7574 6162 6c65 2c20 int executable, │ │ │ │ +00132200: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section How to minimize │ │ │ │ +00132240: 2061 7070 6c69 6361 7469 6f6e 206d 656d application mem │ │ │ │ +00132250: 6f72 7920 666f 6f74 7072 696e 743c 2f61 ory footprint
    #WITH_ │ │ │ │ +001322c0: 4641 5354 3c2f 636f 6465 3e20 2020 3c2f FAST use faster │ │ │ │ +00132300: 6d65 6d6f 7279 2061 6c6c 6f63 6174 696f memory allocatio │ │ │ │ +00132310: 6e20 7768 656e 2075 7365 6420 7769 7468 n when used with │ │ │ │ +00132320: 203c 636f 6465 3e23 5749 5448 5f4c 4541 #WITH_LEA │ │ │ │ +00132330: 4e3c 2f63 6f64 653e 206f 7220 3c63 6f64 N or #WITH_LEANER
    #WI │ │ │ │ +001323b0: 5448 5f43 4f4f 4b49 4553 3c2f 636f 6465 TH_COOKIES enabl │ │ │ │ +001323f0: 6573 2048 5454 5020 636f 6f6b 6965 732c es HTTP cookies, │ │ │ │ +00132400: 2073 6565 2053 6563 7469 6f6e 7320 3c61 see Sections Clien │ │ │ │ +00132440: 742d 7369 6465 2063 6f6f 6b69 6520 7375 t-side cookie su │ │ │ │ +00132450: 7070 6f72 743c 2f61 3e20 616e 6420 3c61 pport and Serve │ │ │ │ +00132490: 722d 7369 6465 2063 6f6f 6b69 6520 7375 r-side cookie su │ │ │ │ +001324a0: 7070 6f72 743c 2f61 3e20 2020 203c 2f74 pport
    #WITH_INSECURE │ │ │ │ +00132510: 5f43 4f4f 4b49 4553 3c2f 636f 6465 3e20 _COOKIES │ │ │ │ +00132520: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enables │ │ │ │ +00132550: 2048 5454 5020 636f 6f6b 6965 7320 616e HTTP cookies an │ │ │ │ +00132560: 6420 616c 6c6f 7773 2063 6f6f 6b69 6573 d allows cookies │ │ │ │ +00132570: 2077 6974 6820 7468 6569 7220 5365 6375 with their Secu │ │ │ │ +00132580: 7265 2066 6c61 6720 7365 7420 746f 2062 re flag set to b │ │ │ │ +00132590: 6520 7365 6e74 206f 7665 7220 696e 7365 e sent over inse │ │ │ │ +001325a0: 6375 7265 2063 6861 6e6e 656c 7320 2020 cure channels │ │ │ │ +001325b0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    < │ │ │ │ +00132600: 636f 6465 3e23 5749 5448 5f49 5056 363c code>#WITH_IPV6< │ │ │ │ +00132610: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #WI │ │ │ │ +001326b0: 5448 5f49 5056 365f 5636 4f4e 4c59 3c2f TH_IPV6_V6ONLY e │ │ │ │ +001326f0: 6e61 626c 6573 2049 5076 3620 7375 7070 nables IPv6 supp │ │ │ │ +00132700: 6f72 7420 7769 7468 2049 5076 362d 6f6e ort with IPv6-on │ │ │ │ +00132710: 6c79 2073 6572 7665 7220 6f70 7469 6f6e ly server option │ │ │ │ +00132720: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_OP │ │ │ │ +00132780: 454e 5353 4c3c 2f63 6f64 653e 2020 203c ENSSL < │ │ │ │ +00132790: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables Op │ │ │ │ +001327c0: 656e 5353 4c2c 2073 6565 2053 6563 7469 enSSL, see Secti │ │ │ │ +001327d0: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons Secure clients │ │ │ │ +00132810: 2077 6974 6820 4854 5450 533c 2f61 3e20 with HTTPS │ │ │ │ +00132820: 616e 6420 3c61 2063 6c61 7373 3d22 656c and Secure Web ser │ │ │ │ +00132860: 7669 6365 7320 7769 7468 2048 5454 5053 vices with HTTPS │ │ │ │ +00132870: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #WI │ │ │ │ +001328d0: 5448 5f47 4e55 544c 533c 2f63 6f64 653e TH_GNUTLS │ │ │ │ +001328e0: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable │ │ │ │ +00132910: 7320 474e 5554 4c53 2c20 7365 6520 5365 s GNUTLS, see Se │ │ │ │ +00132920: 6374 696f 6e73 203c 6120 636c 6173 733d ctions Secure clie │ │ │ │ +00132960: 6e74 7320 7769 7468 2048 5454 5053 3c2f nts with HTTPS and Secure Web │ │ │ │ +001329b0: 7365 7276 6963 6573 2077 6974 6820 4854 services with HT │ │ │ │ +001329c0: 5450 533c 2f61 3e20 2020 203c 2f74 643e TPS
    # │ │ │ │ +00132a20: 5749 5448 5f47 5a49 503c 2f63 6f64 653e WITH_GZIP │ │ │ │ +00132a30: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable │ │ │ │ +00132a60: 7320 677a 6970 2061 6e64 2064 6566 6c61 s gzip and defla │ │ │ │ +00132a70: 7465 2063 6f6d 7072 6573 7369 6f6e 2c20 te compression, │ │ │ │ +00132a80: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section Zlib com │ │ │ │ +00132ac0: 7072 6573 7369 6f6e 3c2f 613e 2020 2020 pression │ │ │ │ +00132ad0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    < │ │ │ │ +00132b20: 636f 6465 3e23 5749 5448 5f5a 4c49 423c code>#WITH_ZLIB< │ │ │ │ +00132b30: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #W │ │ │ │ +00132cd0: 4954 485f 435f 4c4f 4341 4c45 3c2f 636f ITH_C_LOCALE for │ │ │ │ +00132d10: 6365 2074 6865 2075 7365 206c 6f63 616c ce the use local │ │ │ │ +00132d20: 6520 6675 6e63 7469 6f6e 7320 7768 656e e functions when │ │ │ │ +00132d30: 2061 7661 696c 6162 6c65 2074 6f20 656e available to en │ │ │ │ +00132d40: 7375 7265 206c 6f63 616c 652d 696e 6465 sure locale-inde │ │ │ │ +00132d50: 7065 6e64 656e 7420 6e75 6d62 6572 2063 pendent number c │ │ │ │ +00132d60: 6f6e 7665 7273 696f 6e73 2020 2020 3c2f onversions
    #WITH_NO_C_LOC │ │ │ │ +00132dd0: 414c 453c 2f63 6f64 653e 2020 203c 2f74 ALE remove the u │ │ │ │ +00132e10: 7365 206f 6620 6c6f 6361 6c65 2066 756e se of locale fun │ │ │ │ +00132e20: 6374 696f 6e73 2074 6f20 696d 7072 6f76 ctions to improv │ │ │ │ +00132e30: 6520 706f 7274 6162 696c 6974 7920 2020 e portability │ │ │ │ +00132e40: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    fo │ │ │ │ +00132ee0: 7263 6520 7468 6520 696e 636c 7573 696f rce the inclusio │ │ │ │ +00132ef0: 6e20 6f66 203c 636f 6465 3e26 6c74 3b78 n of <x │ │ │ │ +00132f00: 6c6f 6361 6c65 2e68 2667 743b 3c2f 636f locale.h> to define locale_t and _l │ │ │ │ +00132f40: 3c2f 636f 6465 3e20 6675 6e63 7469 6f6e function │ │ │ │ +00132f50: 732c 2074 6f20 696d 7072 6f76 6520 706f s, to improve po │ │ │ │ +00132f60: 7274 6162 696c 6974 7920 2020 203c 2f74 rtability
    #WITH_DOM enabl │ │ │ │ +00133000: 6520 444f 4d20 7061 7273 696e 6720 696e e DOM parsing in │ │ │ │ +00133010: 2074 6865 2065 6e67 696e 652c 2072 6571 the engine, req │ │ │ │ +00133020: 7569 7265 6420 6279 2074 6865 2057 532d uired by the WS- │ │ │ │ +00133030: 5365 6375 7269 7479 2070 6c75 6769 6e20 Security plugin │ │ │ │ +00133040: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #WITH_RE │ │ │ │ +001330a0: 504c 4143 455f 494c 4c45 4741 4c5f 5554 PLACE_ILLEGAL_UT │ │ │ │ +001330b0: 4638 3c2f 636f 6465 3e20 2020 3c2f 7464 F8 enable strict │ │ │ │ +001330f0: 2055 5446 2d38 2c20 7265 706c 6163 6573 UTF-8, replaces │ │ │ │ +00133100: 2055 5446 2d38 2063 6f6e 7465 6e74 2074 UTF-8 content t │ │ │ │ +00133110: 6861 7420 6973 206f 7574 7369 6465 2074 hat is outside t │ │ │ │ +00133120: 6865 2061 6c6c 6f77 6564 2072 616e 6765 he allowed range │ │ │ │ +00133130: 2077 6974 6820 552b 4646 4644 2020 2020 with U+FFFD │ │ │ │ +00133140: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #WITH_FASTCG │ │ │ │ +001331a0: 493c 2f63 6f64 653e 2020 203c 2f74 643e I enables FastCG │ │ │ │ +001331e0: 492c 2073 6565 2053 6563 7469 6f6e 203c I, see Section < │ │ │ │ +001331f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00133200: 663d 2269 6e64 6578 2e68 746d 6c23 6661 f="index.html#fa │ │ │ │ +00133210: 7374 6367 6922 3e46 6173 7443 4749 3c2f stcgi">FastCGI
    #WITH │ │ │ │ +00133280: 5f4e 4f49 4f3c 2f63 6f64 653e 2020 203c _NOIO < │ │ │ │ +00133290: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>removes IO │ │ │ │ +001332c0: 206f 7065 7261 7469 6f6e 732c 2074 6f20 operations, to │ │ │ │ +001332d0: 656c 696d 696e 6174 6520 7468 6520 7573 eliminate the us │ │ │ │ +001332e0: 6520 6f66 2042 5344 2073 6f63 6b65 7473 e of BSD sockets │ │ │ │ +001332f0: 2c20 7365 6520 5365 6374 696f 6e20 3c61 , see Section How to remove │ │ │ │ +00133330: 2074 6865 2042 5344 2073 6f63 6b65 7420 the BSD socket │ │ │ │ +00133340: 6c69 6272 6172 7920 7265 7175 6972 656d library requirem │ │ │ │ +00133350: 656e 743c 2f61 3e20 2020 203c 2f74 643e ent
    # │ │ │ │ +001333b0: 5749 5448 5f4e 4f49 4452 4546 3c2f 636f WITH_NOIDREF rem │ │ │ │ +001333f0: 6f76 6573 2069 6420 616e 6420 6872 6566 oves id and href │ │ │ │ +00133400: 2f72 6566 206d 756c 7469 2d72 6566 6572 /ref multi-refer │ │ │ │ +00133410: 656e 6365 2064 6174 612c 206d 6f72 6520 ence data, more │ │ │ │ +00133420: 6167 6772 6573 7369 7665 2074 6861 6e20 aggressive than │ │ │ │ +00133430: 7573 696e 6720 7468 6520 3c63 6f64 653e using the │ │ │ │ +00133440: 2353 4f41 505f 584d 4c5f 5452 4545 3c2f #SOAP_XML_TREE runtime fl │ │ │ │ +00133460: 6167 2020 2020 3c2f 7464 3e3c 2f74 723e ag
    #WITH │ │ │ │ +001334c0: 5f4e 4f48 5454 503c 2f63 6f64 653e 2020 _NOHTTP │ │ │ │ +001334d0: 203c 2f74 643e 3c74 6420 636c 6173 733d removes │ │ │ │ +00133500: 7468 6520 4854 5450 2073 7461 636b 2074 the HTTP stack t │ │ │ │ +00133510: 6f20 7265 6475 6365 2063 6f64 6520 7369 o reduce code si │ │ │ │ +00133520: 7a65 2020 2020 3c2f 7464 3e3c 2f74 723e ze
    #WITH_ │ │ │ │ +00133580: 4e4f 5a4f 4e45 3c2f 636f 6465 3e20 2020 NOZONE │ │ │ │ +00133590: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disables │ │ │ │ +001335c0: 616e 6420 6967 6e6f 7265 7320 7468 6520 and ignores the │ │ │ │ +001335d0: 7469 6d65 7a6f 6e65 2069 6e20 3c63 6f64 timezone in xsd:dateTime values │ │ │ │ +00133600: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    < │ │ │ │ +00133650: 636f 6465 3e23 5749 5448 5f4e 4f45 4d50 code>#WITH_NOEMP │ │ │ │ +00133660: 5459 4e41 4d45 5350 4143 4553 3c2f 636f TYNAMESPACES dis │ │ │ │ +001336a0: 6162 6c65 7320 786d 6c6e 733d 2222 2064 ables xmlns="" d │ │ │ │ +001336b0: 6566 6175 6c74 2065 6d70 7479 206e 616d efault empty nam │ │ │ │ +001336c0: 6573 7061 6365 7320 6672 6f6d 2058 4d4c espaces from XML │ │ │ │ +001336d0: 206d 6573 7361 6765 7320 2020 203c 2f74 messages
    #WITH_NOEMPTYST │ │ │ │ +00133740: 5255 4354 3c2f 636f 6465 3e20 2020 3c2f RUCT inserts a d │ │ │ │ +00133780: 756d 6d79 206d 656d 6265 7220 696e 2065 ummy member in e │ │ │ │ +00133790: 6d70 7479 2073 7472 7563 7473 2074 6f20 mpty structs to │ │ │ │ +001337a0: 616c 6c6f 7720 636f 6d70 696c 6174 696f allow compilatio │ │ │ │ +001337b0: 6e20 2020 203c 2f74 643e 3c2f 7472 3e0a n
    #WITH_ │ │ │ │ +00133810: 4e4f 474c 4f42 414c 3c2f 636f 6465 3e20 NOGLOBAL │ │ │ │ +00133820: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 omit SO │ │ │ │ +00133850: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa │ │ │ │ +00133860: 756c 7420 7365 7269 616c 697a 6174 696f ult serializatio │ │ │ │ +00133870: 6e20 636f 6465 2c20 7072 6576 656e 7473 n code, prevents │ │ │ │ +00133880: 2064 7570 6c69 6361 7465 2064 6566 696e duplicate defin │ │ │ │ +00133890: 6974 696f 6e73 2077 6974 6820 6765 6e65 itions with gene │ │ │ │ +001338a0: 7261 7465 6420 736f 6170 5859 5a4c 6962 rated soapXYZLib │ │ │ │ +001338b0: 2063 6f64 6520 2020 203c 2f74 643e 3c2f code
    #WI │ │ │ │ +00133910: 5448 5f4e 4f4e 414d 4553 5041 4345 533c TH_NONAMESPACES< │ │ │ │ +00133920: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #WITH_ │ │ │ │ +00133b60: 4344 4154 413c 2f63 6f64 653e 2020 203c CDATA < │ │ │ │ +00133b70: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>retains th │ │ │ │ +00133ba0: 6520 7061 7273 6564 2043 4441 5441 2073 e parsed CDATA s │ │ │ │ +00133bb0: 6563 7469 6f6e 7320 696e 206c 6974 6572 ections in liter │ │ │ │ +00133bc0: 616c 2058 4d4c 2073 7472 696e 6773 2020 al XML strings │ │ │ │ +00133bd0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    enables │ │ │ │ +00133c70: 2043 2b2b 2061 6273 7472 6163 7420 7365 C++ abstract se │ │ │ │ +00133c80: 7276 6963 6520 636c 6173 7365 7320 7769 rvice classes wi │ │ │ │ +00133c90: 7468 2070 7572 6520 7669 7274 7561 6c20 th pure virtual │ │ │ │ +00133ca0: 6d65 7468 6f64 732c 2072 6571 7569 7265 methods, require │ │ │ │ +00133cb0: 7320 736f 6170 6370 7032 206f 7074 696f s soapcpp2 optio │ │ │ │ +00133cc0: 6e20 3c63 6f64 653e 2d69 3c2f 636f 6465 n -i or -j
    #WI │ │ │ │ +00133d40: 5448 5f44 4546 4155 4c54 5f56 4952 5455 TH_DEFAULT_VIRTU │ │ │ │ +00133d50: 414c 3c2f 636f 6465 3e20 2020 3c2f 7464 AL enables C++ b │ │ │ │ +00133d90: 6173 6520 7365 7276 6963 6520 636c 6173 ase service clas │ │ │ │ +00133da0: 7365 7320 7769 7468 2064 6566 6175 6c74 ses with default │ │ │ │ +00133db0: 2076 6972 7475 616c 206d 6574 686f 6473 virtual methods │ │ │ │ +00133dc0: 2072 6574 7572 6e69 6e67 2066 6175 6c74 returning fault │ │ │ │ +00133dd0: 203c 636f 6465 3e23 534f 4150 5f4e 4f5f #SOAP_NO_ │ │ │ │ +00133de0: 4d45 5448 4f44 3c2f 636f 6465 3e2c 2072 METHOD, r │ │ │ │ +00133df0: 6571 7569 7265 7320 736f 6170 6370 7032 equires soapcpp2 │ │ │ │ +00133e00: 206f 7074 696f 6e20 3c63 6f64 653e 2d69 option -i │ │ │ │ +00133e10: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or -j
    #WITH_CASEINSE │ │ │ │ +00133e90: 4e53 4954 4956 4554 4147 533c 2f63 6f64 NSITIVETAGS enab │ │ │ │ +00133ed0: 6c65 7320 6361 7365 2069 6e73 656e 7369 les case insensi │ │ │ │ +00133ee0: 7469 7665 2058 4d4c 2070 6172 7369 6e67 tive XML parsing │ │ │ │ +00133ef0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #WITH_S │ │ │ │ +00133f50: 4f43 4b45 545f 434c 4f53 455f 4f4e 5f45 OCKET_CLOSE_ON_E │ │ │ │ +00133f60: 5849 543c 2f63 6f64 653e 2020 203c 2f74 XIT prevents a s │ │ │ │ +00133fa0: 6572 7665 7220 706f 7274 2066 726f 6d20 erver port from │ │ │ │ +00133fb0: 7374 6179 696e 6720 696e 206c 6973 7465 staying in liste │ │ │ │ +00133fc0: 6e69 6e67 206d 6f64 6520 6166 7465 7220 ning mode after │ │ │ │ +00133fd0: 6578 6974 2062 7920 696e 7465 726e 616c exit by internal │ │ │ │ +00133fe0: 6c79 2073 6574 7469 6e67 203c 636f 6465 ly setting fcntl(sock, F_S │ │ │ │ +00134000: 4554 4644 2c20 4644 5f43 4c4f 4558 4543 ETFD, FD_CLOEXEC │ │ │ │ +00134010: 293c 2f63 6f64 653e 2020 2020 3c2f 7464 )
    │ │ │ │ +00134070: 2357 4954 485f 5443 5046 494e 3c2f 636f #WITH_TCPFIN ena │ │ │ │ +001340b0: 626c 6573 2054 4350 2046 494e 2061 6674 bles TCP FIN aft │ │ │ │ +001340c0: 6572 2073 656e 6473 2077 6865 6e20 736f er sends when so │ │ │ │ +001340d0: 636b 6574 2069 7320 7265 6164 7920 746f cket is ready to │ │ │ │ +001340e0: 2063 6c6f 7365 2020 2020 3c2f 7464 3e3c close
    # │ │ │ │ +00134140: 5749 5448 5f53 454c 465f 5049 5045 3c2f WITH_SELF_PIPE e │ │ │ │ +00134180: 6e61 626c 6573 2061 2022 7365 6c66 2070 nables a "self p │ │ │ │ +00134190: 6970 6522 2074 6f20 656e 6162 6c65 2074 ipe" to enable t │ │ │ │ +001341a0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he │ │ │ │ +00134240: 736f 6170 5f63 6c6f 7365 5f63 6f6e 6e65 soap_close_conne │ │ │ │ +00134250: 6374 696f 6e3c 2f61 3e3c 2f63 6f64 653e ction │ │ │ │ +00134260: 2066 756e 6374 696f 6e20 2867 534f 4150 function (gSOAP │ │ │ │ +00134270: 2032 2e38 2e37 3120 6f72 2067 7265 6174 2.8.71 or great │ │ │ │ +00134280: 6572 2920 2020 3c2f 7464 3e3c 2f74 723e er)
    .

    The │ │ │ │ +001342a0: 2066 6f6c 6c6f 7769 6e67 2073 7562 7365 following subse │ │ │ │ +001342b0: 7420 6f66 206d 6163 726f 7320 6172 6520 t of macros are │ │ │ │ +001342c0: 6465 6669 6e65 6420 696e 2074 6865 2041 defined in the A │ │ │ │ +001342d0: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation │ │ │ │ +001342e0: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module SOAP_MACRO │ │ │ │ +00134320: 636f 6d70 696c 652d 7469 6d65 2076 616c compile-time val │ │ │ │ +00134330: 7565 733c 2f61 3e2e 2054 6865 7365 206d ues. These m │ │ │ │ +00134340: 6163 726f 7320 6172 6520 7573 6564 2074 acros are used t │ │ │ │ +00134350: 6f20 656e 6162 6c65 206f 7220 6469 7361 o enable or disa │ │ │ │ +00134360: 626c 6520 6665 6174 7572 6573 2061 7320 ble features as │ │ │ │ +00134370: 7370 6563 6966 6965 6420 6265 6c6f 772c specified below, │ │ │ │ +00134380: 2062 7920 636f 6d70 696c 696e 6720 736f by compiling so │ │ │ │ +00134390: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files │ │ │ │ +001343a0: 7769 7468 2063 6f6d 7069 6c65 7220 6f70 with compiler op │ │ │ │ +001343b0: 7469 6f6e 203c 623e 3c63 6f64 653e 2d44 tion -D │ │ │ │ +001343c0: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2073 to s │ │ │ │ +001343d0: 6574 2074 6865 206d 6163 726f 3a3c 2f70 et the macro:

    .. │ │ │ │ +00134400: 3c74 7220 636c 6173 733d 226d 6172 6b64 .< │ │ │ │ +00134420: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class="markdo │ │ │ │ +00134430: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone" │ │ │ │ +00134440: 3e64 6566 696e 6520 2020 3c2f 7468 3e3c >define < │ │ │ │ +00134450: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class="markdo │ │ │ │ +00134460: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone" │ │ │ │ +00134470: 3e72 6573 756c 7420 2020 203c 2f74 683e >result │ │ │ │ +00134480: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .... │ │ │ │ +001345d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 │ │ │ │ +00134690: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....< │ │ │ │ +00134800: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...< │ │ │ │ +001348f0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00134900: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven"> │ │ │ │ +00134910: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ +001349d0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +00134a40: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ +00134b80: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.... │ │ │ │ +00134d40: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ......< │ │ │ │ +00135070: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>... │ │ │ │ +00135190: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +001351b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .......< │ │ │ │ +00135440: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00135450: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00135460: 3e3c 636f 6465 3e23 534f 4150 5f55 4e4b >#SOAP_UNK │ │ │ │ +00135470: 4e4f 574e 5f43 4841 523c 2f63 6f64 653e NOWN_CHAR │ │ │ │ +00135480: 2020 203c 2f74 643e 3c74 6420 636c 6173 │ │ │ │ +00135540: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .... │ │ │ │ +00135660: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ +001357f0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +00135880: 706f 7274 6162 6c65 2069 6e76 616c 6964 portable invalid │ │ │ │ +00135890: 2073 6f63 6b65 7420 7661 6c75 652c 2063 socket value, c │ │ │ │ +001358a0: 616e 2061 6c73 6f20 7573 6520 3c63 6f64 an also use # │ │ │ │ +00135960: 736f 6170 5f76 616c 6964 5f73 6f63 6b65 soap_valid_socke │ │ │ │ +00135970: 7428 736f 636b 293c 2f61 3e3c 2f63 6f64 t(sock) to check if < │ │ │ │ +00135990: 636f 6465 3e73 6f63 6b3c 2f63 6f64 653e code>sock │ │ │ │ +001359a0: 2069 7320 7661 6c69 6420 2020 3c2f 7464 is valid .
    # │ │ │ │ +001344d0: 534f 4150 5f4e 4f54 4852 4f57 3c2f 636f SOAP_NOTHROW exp │ │ │ │ +00134510: 616e 6473 2074 6f20 3c63 6f64 653e 2873 ands to (s │ │ │ │ +00134520: 7464 3a3a 6e6f 7468 726f 7729 3c2f 636f td::nothrow) to prevent m │ │ │ │ +00134540: 656d 6f72 7920 616c 6c6f 6361 7469 6f6e emory allocation │ │ │ │ +00134550: 2065 7863 6570 7469 6f6e 7320 283c 636f exceptions (#SOAP_EOM is used inst │ │ │ │ +00134580: 6561 6429 2c20 7468 6973 206d 6163 726f ead), this macro │ │ │ │ +00134590: 2063 616e 2062 6520 6368 616e 6765 6420 can be changed │ │ │ │ +001345a0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_BU │ │ │ │ +00134600: 464c 454e 3c2f 636f 6465 3e20 2020 3c2f FLEN the length │ │ │ │ +00134640: 6f66 2074 6865 2069 6e74 6572 6e61 6c20 of the internal │ │ │ │ +00134650: 6d65 7373 6167 6520 6275 6666 6572 2c20 message buffer, │ │ │ │ +00134660: 696d 7061 6374 7320 636f 6d6d 756e 6963 impacts communic │ │ │ │ +00134670: 6174 696f 6e73 2070 6572 666f 726d 616e ations performan │ │ │ │ +00134680: 6365 2020 2020 3c2f 7464 3e3c 2f74 723e ce
    #SOAP_ │ │ │ │ +001346e0: 4844 524c 454e 3c2f 636f 6465 3e20 2020 HDRLEN │ │ │ │ +001346f0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 the maxim │ │ │ │ +00134720: 756d 206c 656e 6774 6820 6f66 2048 5454 um length of HTT │ │ │ │ +00134730: 5020 6865 6164 6572 7320 2020 203c 2f74 P headers
    #SOAP_TAGLEN t │ │ │ │ +001347d0: 6865 206d 6178 696d 756d 206c 656e 6774 he maximum lengt │ │ │ │ +001347e0: 6820 6f66 2058 4d4c 2074 6167 7320 616e h of XML tags an │ │ │ │ +001347f0: 6420 5552 4c73 2020 2020 3c2f 7464 3e3c d URLs
    #S │ │ │ │ +00134850: 4f41 505f 544d 504c 454e 3c2f 636f 6465 OAP_TMPLEN the m │ │ │ │ +00134890: 6178 696d 756d 206c 656e 6774 6820 6f66 aximum length of │ │ │ │ +001348a0: 2074 656d 706f 7261 7279 2073 7472 696e temporary strin │ │ │ │ +001348b0: 6720 7661 6c75 6573 2c20 7368 6f72 7420 g values, short │ │ │ │ +001348c0: 7374 7269 6e67 7320 616e 6420 6272 6965 strings and brie │ │ │ │ +001348d0: 6620 6572 726f 7220 6d65 7373 6167 6573 f error messages │ │ │ │ +001348e0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_M │ │ │ │ +00134940: 4158 414c 4c4f 4353 495a 453c 2f63 6f64 AXALLOCSIZE the │ │ │ │ +00134980: 6d61 7869 6d75 6d20 7369 7a65 206f 6620 maximum size of │ │ │ │ +00134990: 6120 626c 6f63 6b20 6f66 206d 656d 6f72 a block of memor │ │ │ │ +001349a0: 7920 7468 6174 203c 636f 6465 3e6d 616c y that mal │ │ │ │ +001349b0: 6c6f 633c 2f63 6f64 653e 2063 616e 2061 loc can a │ │ │ │ +001349c0: 6c6c 6f63 6174 6520 2020 203c 2f74 643e llocate
    # │ │ │ │ +00134a20: 534f 4150 5f4d 4158 4152 5241 5953 495a SOAP_MAXARRAYSIZ │ │ │ │ +00134a30: 453c 2f63 6f64 653e 2020 203c 2f74 643e E the maximum al │ │ │ │ +00134a70: 6c6f 6361 7469 6f6e 2074 6872 6573 686f location thresho │ │ │ │ +00134a80: 6c64 2074 6f20 7072 652d 616c 6c6f 6361 ld to pre-alloca │ │ │ │ +00134a90: 7465 2053 4f41 5020 6172 7261 7973 2069 te SOAP arrays i │ │ │ │ +00134aa0: 6e20 6d65 6d6f 7279 2020 2020 3c2f 7464 n memory
    #SOAP_MAXDIMESI │ │ │ │ +00134b10: 5a45 3c2f 636f 6465 3e20 2020 3c2f 7464 ZE the maximum D │ │ │ │ +00134b50: 494d 4520 6174 7461 6368 6d65 6e74 2073 IME attachment s │ │ │ │ +00134b60: 697a 6520 616c 6c6f 7765 6420 746f 2072 ize allowed to r │ │ │ │ +00134b70: 6563 6569 7665 2020 2020 3c2f 7464 3e3c eceive
    #S │ │ │ │ +00134bd0: 4f41 505f 4d41 5845 494e 5452 3c2f 636f OAP_MAXEINTR max │ │ │ │ +00134c10: 696d 756d 206e 756d 6265 7220 6f66 2045 imum number of E │ │ │ │ +00134c20: 494e 5452 2069 6e74 6572 7275 7074 7320 INTR interrupts │ │ │ │ +00134c30: 746f 2069 676e 6f72 6520 7768 696c 6520 to ignore while │ │ │ │ +00134c40: 706f 6c6c 696e 6720 6120 736f 636b 6574 polling a socket │ │ │ │ +00134c50: 2066 6f72 2070 656e 6469 6e67 2061 6374 for pending act │ │ │ │ +00134c60: 6976 6974 7920 2020 203c 2f74 643e 3c2f ivity
    #S │ │ │ │ +00134cc0: 4f41 505f 4d41 5849 4e46 4c41 5445 5349 OAP_MAXINFLATESI │ │ │ │ +00134cd0: 5a45 3c2f 636f 6465 3e20 2020 3c2f 7464 ZE trusted infla │ │ │ │ +00134d10: 7465 6420 636f 6e74 656e 7420 7369 7a65 ted content size │ │ │ │ +00134d20: 2028 3120 4d42 2062 7920 6465 6661 756c (1 MB by defaul │ │ │ │ +00134d30: 7429 2020 2020 3c2f 7464 3e3c 2f74 723e t)
    #SOAP_ │ │ │ │ +00134d90: 4d41 584b 4545 5041 4c49 5645 3c2f 636f MAXKEEPALIVE max │ │ │ │ +00134dd0: 696d 756d 2069 7465 7261 7469 6f6e 7320 imum iterations │ │ │ │ +00134de0: 696e 2074 6865 203c 636f 6465 3e3c 6120 in the soap │ │ │ │ +00134e60: 5f73 6572 7665 3c2f 613e 3c2f 636f 6465 _serve loop on HTTP k │ │ │ │ +00134e80: 6565 702d 616c 6976 6520 636f 6e6e 6563 eep-alive connec │ │ │ │ +00134e90: 7469 6f6e 7320 2020 203c 2f74 643e 3c2f tions
    #S │ │ │ │ +00134ef0: 4f41 505f 4d41 584c 454e 4754 483c 2f63 OAP_MAXLENGTH ma │ │ │ │ +00134f30: 7869 6d75 6d20 7374 7269 6e67 2063 6f6e ximum string con │ │ │ │ +00134f40: 7465 6e74 206c 656e 6774 6820 666f 7220 tent length for │ │ │ │ +00134f50: 7374 7269 6e67 7320 6e6f 7420 616c 7265 strings not alre │ │ │ │ +00134f60: 6164 7920 636f 6e73 7472 6169 6e65 6420 ady constrained │ │ │ │ +00134f70: 6279 2058 4d4c 2073 6368 656d 6120 7661 by XML schema va │ │ │ │ +00134f80: 6c69 6461 7469 6f6e 2063 6f6e 7374 7261 lidation constra │ │ │ │ +00134f90: 696e 7473 2020 2020 3c2f 7464 3e3c 2f74 ints
    #SOA │ │ │ │ +00134ff0: 505f 4d41 584c 4556 454c 3c2f 636f 6465 P_MAXLEVEL maxim │ │ │ │ +00135030: 756d 2058 4d4c 206e 6573 7469 6e67 2064 um XML nesting d │ │ │ │ +00135040: 6570 7468 206c 6576 656c 2070 6572 6d69 epth level permi │ │ │ │ +00135050: 7474 6564 2062 7920 7468 6520 584d 4c20 tted by the XML │ │ │ │ +00135060: 7061 7273 6572 2020 2020 3c2f 7464 3e3c parser
    # │ │ │ │ +001350c0: 534f 4150 5f4d 4158 4f43 4355 5253 3c2f SOAP_MAXOCCURS m │ │ │ │ +00135100: 6178 696d 756d 206e 756d 6265 7220 6f66 aximum number of │ │ │ │ +00135110: 2061 7272 6179 206f 7220 636f 6e74 6169 array or contai │ │ │ │ +00135120: 6e65 7220 656c 656d 656e 7473 2066 6f72 ner elements for │ │ │ │ +00135130: 2063 6f6e 7461 696e 6572 7320 7468 6174 containers that │ │ │ │ +00135140: 2061 7265 206e 6f74 2061 6c72 6561 6479 are not already │ │ │ │ +00135150: 2063 6f6e 7374 7261 696e 6564 2062 7920 constrained by │ │ │ │ +00135160: 584d 4c20 7363 6865 6d61 2076 616c 6964 XML schema valid │ │ │ │ +00135170: 6174 696f 6e20 636f 6e73 7472 6169 6e74 ation constraint │ │ │ │ +00135180: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #SOAP_M │ │ │ │ +001351e0: 494e 4445 464c 4154 4552 4154 494f 3c2f INDEFLATERATIO t │ │ │ │ +00135220: 7275 7374 6564 2064 6566 6c61 7469 6f6e rusted deflation │ │ │ │ +00135230: 2072 6174 696f 2061 6674 6572 203c 636f ratio after #SOAP_MAXINFL │ │ │ │ +00135250: 4154 4553 495a 453c 2f63 6f64 653e 2069 ATESIZE i │ │ │ │ +00135260: 7320 7265 6163 6865 6420 2020 203c 2f74 s reached
    #SOAP_PURE_VIR │ │ │ │ +001352d0: 5455 414c 3c2f 636f 6465 3e20 2020 3c2f TUAL set to = 0 whe │ │ │ │ +00135320: 6e20 3c63 6f64 653e 2357 4954 485f 5055 n #WITH_PU │ │ │ │ +00135330: 5245 5f56 4952 5455 414c 3c2f 636f 6465 RE_VIRTUAL is defined │ │ │ │ +00135350: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_SSL_RS │ │ │ │ +001353b0: 415f 4249 5453 3c2f 636f 6465 3e20 2020 A_BITS │ │ │ │ +001353c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 length of │ │ │ │ +001353f0: 2074 6865 2052 5341 206b 6579 2028 3230 the RSA key (20 │ │ │ │ +00135400: 3438 2062 7920 6465 6661 756c 7429 2020 48 by default) │ │ │ │ +00135410: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    an 8 b │ │ │ │ +001354b0: 6974 2069 6e74 6567 6572 2074 6861 7420 it integer that │ │ │ │ +001354c0: 7265 7072 6573 656e 7473 2061 2063 6861 represents a cha │ │ │ │ +001354d0: 7261 6374 6572 2074 6861 7420 636f 756c racter that coul │ │ │ │ +001354e0: 6420 6e6f 7420 6265 2063 6f6e 7665 7274 d not be convert │ │ │ │ +001354f0: 6564 2074 6f20 616e 2041 5343 4949 2063 ed to an ASCII c │ │ │ │ +00135500: 6861 722c 2069 2e65 2e20 7768 656e 2063 har, i.e. when c │ │ │ │ +00135510: 6f6e 7665 7274 696e 6720 616e 2058 4d4c onverting an XML │ │ │ │ +00135520: 2055 6e69 636f 6465 2063 6861 7261 6374 Unicode charact │ │ │ │ +00135530: 6572 2020 2020 3c2f 7464 3e3c 2f74 723e er
    #SOAP_ │ │ │ │ +00135590: 554e 4b4e 4f57 4e5f 554e 4943 4f44 455f UNKNOWN_UNICODE_ │ │ │ │ +001355a0: 4348 4152 3c2f 636f 6465 3e20 2020 3c2f CHAR integer Uni │ │ │ │ +001355e0: 636f 6465 2076 616c 7565 2072 6570 7265 code value repre │ │ │ │ +001355f0: 7365 6e74 696e 6720 6120 6368 6172 6163 senting a charac │ │ │ │ +00135600: 7465 7220 7468 6174 2072 6570 6c61 6365 ter that replace │ │ │ │ +00135610: 7320 616e 2069 6e76 616c 6964 2055 6e69 s an invalid Uni │ │ │ │ +00135620: 636f 6465 2063 6f64 6520 706f 696e 7420 code code point │ │ │ │ +00135630: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_LO │ │ │ │ +00135690: 4e47 5f46 4f52 4d41 543c 2f63 6f64 653e NG_FORMAT │ │ │ │ +001356a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 macro │ │ │ │ +001356d0: 7468 6174 2072 6570 7265 7365 6e74 7320 that represents │ │ │ │ +001356e0: 7468 6520 3c63 6f64 653e 234c 4f4e 4736 the #LONG6 │ │ │ │ +001356f0: 343c 2f63 6f64 653e 2070 7269 6e74 6620 4 printf │ │ │ │ +00135700: 252d 666f 726d 6174 2020 2020 3c2f 7464 %-format
    │ │ │ │ +00135760: 2353 4f41 505f 554c 4f4e 475f 464f 524d #SOAP_ULONG_FORM │ │ │ │ +00135770: 4154 3c2f 636f 6465 3e20 2020 3c2f 7464 AT macro that re │ │ │ │ +001357b0: 7072 6573 656e 7473 2074 6865 203c 636f presents the #ULONG64 printf %-form │ │ │ │ +001357e0: 6174 2020 2020 3c2f 7464 3e3c 2f74 723e at
    #SOAP │ │ │ │ +00135840: 5f49 4e56 414c 4944 5f53 4f43 4b45 543c _INVALID_SOCKET< │ │ │ │ +00135850: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    . │ │ │ │ +001359c0: 3c64 6c20 636c 6173 733d 2273 6563 7469
    │ │ │ │ +001359e0: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    │ │ │ │ +001359f0: 4974 2069 7320 696d 706f 7274 616e 7420 It is important │ │ │ │ +00135a00: 7468 6174 2061 6e79 206f 6620 7468 6573 that any of thes │ │ │ │ +00135a10: 6520 6d61 6372 6f73 2077 6865 6e20 6465 e macros when de │ │ │ │ +00135a20: 6669 6e65 6420 7368 6f75 6c64 2062 6520 fined should be │ │ │ │ +00135a30: 636f 6e73 6973 7465 6e74 6c79 2064 6566 consistently def │ │ │ │ +00135a40: 696e 6564 2077 6865 6e20 636f 6d70 696c ined when compil │ │ │ │ +00135a50: 696e 6720 736f 7572 6365 2063 6f64 6520 ing source code │ │ │ │ +00135a60: 6669 6c65 732c 2073 7563 6820 6173 203c files, such as < │ │ │ │ +00135a70: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s │ │ │ │ +00135a80: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp, soapC.cpp, soapClient.c │ │ │ │ +00135ad0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, │ │ │ │ +00135ae0: 3c65 6d3e 3c63 6f64 653e 736f 6170 5365 soapSe │ │ │ │ +00135af0: 7276 6572 2e63 7070 3c2f 636f 6465 3e3c rver.cpp< │ │ │ │ +00135b00: 2f65 6d3e 2c20 616e 6420 616c 6c20 6170 /em>, and all ap │ │ │ │ +00135b10: 706c 6963 6174 696f 6e20 736f 7572 6365 plication source │ │ │ │ +00135b20: 2063 6f64 6520 6669 6c65 7320 7468 6174 code files that │ │ │ │ +00135b30: 2069 6e63 6c75 6465 203c 656d 3e3c 636f include gsoap/stdsoap │ │ │ │ +00135b50: 322e 683c 2f63 6f64 653e 3c2f 656d 3e20 2.h │ │ │ │ +00135b60: 6f72 203c 656d 3e3c 636f 6465 3e73 6f61 or soa │ │ │ │ +00135b70: 7048 2e68 3c2f 636f 6465 3e3c 2f65 6d3e pH.h │ │ │ │ +00135b80: 2e20 4966 2074 6865 206d 6163 726f 7320 . If the macros │ │ │ │ +00135b90: 6172 6520 6e6f 7420 636f 6e73 6973 7465 are not consiste │ │ │ │ +00135ba0: 6e74 6c79 2064 6566 696e 6564 2061 7420 ntly defined at │ │ │ │ +00135bb0: 636f 6d70 696c 6520 7469 6d65 2074 6865 compile time the │ │ │ │ +00135bc0: 6e20 7468 6520 6170 706c 6963 6174 696f n the applicatio │ │ │ │ +00135bd0: 6e20 7769 6c6c 206c 696b 656c 7920 6372 n will likely cr │ │ │ │ +00135be0: 6173 6820 6475 6520 746f 2061 206d 6973 ash due to a mis │ │ │ │ +00135bf0: 6d61 7463 6865 7320 696e 2074 6865 2064 matches in the d │ │ │ │ +00135c00: 6563 6c61 7261 7469 6f6e 2061 6e64 2075 eclaration and u │ │ │ │ +00135c10: 7365 206f 6620 7468 6520 3c63 6f64 653e se of the │ │ │ │ +00135c20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ +00135c70: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ +00135c80: 6578 7420 7468 6174 2069 7320 6375 7374 ext that is cust │ │ │ │ +00135c90: 6f6d 697a 6564 2062 7920 7468 6573 6520 omized by these │ │ │ │ +00135ca0: 666c 6167 732e 3c2f 6464 3e3c 2f64 6c3e flags.
    │ │ │ │ +00135cb0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ +00135cd0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    . │ │ │ │ +00135d10: 5573 696e 6720 7468 6520 736f 6170 6465 Using the soapde │ │ │ │ +00135d20: 6673 2e68 2068 6561 6465 7220 6669 6c65 fs.h header file │ │ │ │ +00135d30: 3c2f 6832 3e0a 3c70 3e54 6865 203c 656d

    .

    The soapdefs. │ │ │ │ +00135d50: 683c 2f63 6f64 653e 3c2f 656d 3e20 6865 h he │ │ │ │ +00135d60: 6164 6572 2066 696c 6520 6973 2069 6e63 ader file is inc │ │ │ │ +00135d70: 6c75 6465 6420 696e 203c 656d 3e3c 636f luded in gsoap/stdsoap │ │ │ │ +00135d90: 322e 683c 2f63 6f64 653e 3c2f 656d 3e20 2.h │ │ │ │ +00135da0: 7768 656e 2063 6f6d 7069 6c69 6e67 2077 when compiling w │ │ │ │ +00135db0: 6974 6820 636f 6d70 696c 652d 7469 6d65 ith compile-time │ │ │ │ +00135dc0: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT │ │ │ │ +00135dd0: 485f 534f 4150 4445 4653 5f48 3c2f 636f H_SOAPDEFS_H:

     
    │ │ │ │ +00135e00: 632b 2b20 2d44 2057 4954 485f 534f 4150  c++ -D WITH_SOAP
    │ │ │ │ +00135e10: 4445 4653 5f48 202d 6320 7374 6473 6f61  DEFS_H -c stdsoa
    │ │ │ │ +00135e20: 7032 2e63 7070 0a3c 2f70 7265 3e3c 703e  p2.cpp.

    │ │ │ │ +00135e30: 2054 6865 203c 656d 3e3c 636f 6465 3e73 The s │ │ │ │ +00135e40: 6f61 7064 6566 732e 683c 2f63 6f64 653e oapdefs.h │ │ │ │ +00135e50: 3c2f 656d 3e20 6669 6c65 2061 6c6c 6f77 file allow │ │ │ │ +00135e60: 7320 7573 6572 7320 746f 2069 6e63 6c75 s users to inclu │ │ │ │ +00135e70: 6465 2064 6566 696e 6974 696f 6e73 2061 de definitions a │ │ │ │ +00135e80: 6e64 2061 6464 2069 6e63 6c75 6465 7320 nd add includes │ │ │ │ +00135e90: 7769 7468 6f75 7420 7265 7175 6972 696e without requirin │ │ │ │ +00135ea0: 6720 6368 616e 6765 7320 746f 203c 656d g changes to gsoap/std │ │ │ │ +00135ec0: 736f 6170 322e 683c 2f63 6f64 653e 3c2f soap2.h. You can als │ │ │ │ +00135ee0: 6f20 7370 6563 6966 7920 7468 6520 6865 o specify the he │ │ │ │ +00135ef0: 6164 6572 2066 696c 6520 6e61 6d65 2074 ader file name t │ │ │ │ +00135f00: 6f20 696e 636c 7564 6520 6173 2061 206d o include as a m │ │ │ │ +00135f10: 6163 726f 203c 636f 6465 3e53 4f41 5044 acro SOAPD │ │ │ │ +00135f20: 4546 535f 483c 2f63 6f64 653e 2074 6f20 EFS_H to │ │ │ │ +00135f30: 6f76 6572 7269 6465 2074 6865 206e 616d override the nam │ │ │ │ +00135f40: 6520 3c65 6d3e 3c63 6f64 653e 736f 6170 e soap │ │ │ │ +00135f50: 6465 6673 2e68 3c2f 636f 6465 3e3c 2f65 defs.h:

     c
    │ │ │ │ +00135f80: 2b2b 202d 4420 534f 4150 4445 4653 5f48  ++ -D SOAPDEFS_H
    │ │ │ │ +00135f90: 3d6d 7964 6566 732e 6820 2d63 2073 7464  =mydefs.h -c std
    │ │ │ │ +00135fa0: 736f 6170 322e 6370 700a 3c2f 7072 653e  soap2.cpp.
    │ │ │ │ +00135fb0: 3c70 3e20 466f 7220 6578 616d 706c 652c

    For example, │ │ │ │ +00135fc0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    // Contents o │ │ │ │ +00136010: 6620 6669 6c65 2026 7175 6f74 3b73 6f61 f file "soa │ │ │ │ +00136020: 7064 6566 732e 6826 7175 6f74 3b3c 2f73 pdefs.h"
    .
    #include │ │ │ │ +00136070: 2026 6c74 3b6f 7374 7265 616d 2667 743b <ostream> │ │ │ │ +00136080: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00136090: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The fol │ │ │ │ +001360b0: 6c6f 7769 6e67 2068 6561 6465 7220 6669 lowing header fi │ │ │ │ +001360c0: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 │ │ │ │ +001360d0: 7265 6665 7273 2074 6f20 3c63 6f64 653e refers to │ │ │ │ +001360e0: 7374 643a 3a6f 7374 7265 616d 3c2f 636f std::ostream without soap │ │ │ │ +00136100: 6370 7032 2074 6872 6f77 696e 6720 6572 cpp2 throwing er │ │ │ │ +00136110: 726f 7273 2c20 6279 2075 7369 6e67 203c rors, by using < │ │ │ │ +00136120: 636f 6465 3e65 7874 6572 6e3c 2f63 6f64 code>extern to declare class std::o │ │ │ │ +00136150: 7374 7265 616d 3c2f 636f 6465 3e3a 3c2f stream:.

    // std::ostream │ │ │ │ +001361b0: 2063 616e 2623 3339 3b74 2062 6520 7365 can't be se │ │ │ │ +001361c0: 7269 616c 697a 6564 2c20 6275 7420 6e65 rialized, but ne │ │ │ │ +001361d0: 6564 2074 6f20 6265 2064 6563 6c61 7265 ed to be declare │ │ │ │ +001361e0: 6420 746f 206d 616b 6520 6974 2076 6973 d to make it vis │ │ │ │ +001361f0: 6962 6c65 2074 6f20 6753 4f41 5020 3c2f ible to gSOAP
    .
    extern class std::ostrea │ │ │ │ +00136270: 6d3b 3c2f 6469 763e 0a3c 6469 7620 636c m;
    .
    .
    .< │ │ │ │ -001362c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001362d0: 6f72 6422 3e63 6c61 7373 203c 2f73 7061 ord">class ns__myClass .
    { p │ │ │ │ -00136320: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    │ │ │ │ -00136360: 7669 7274 7561 6c3c 2f73 7061 6e3e 203c virtual < │ │ │ │ -00136370: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00136380: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void print(std:: │ │ │ │ -001363a0: 6f73 7472 6561 6d20 2661 6d70 3b73 2920 ostream &s) │ │ │ │ -001363b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const; // we │ │ │ │ -001363f0: 6e65 6564 2073 7464 3a3a 6f73 7472 6561 need std::ostrea │ │ │ │ -00136400: 6d20 6865 7265 203c 2f73 7061 6e3e 3c2f m here .
    ... < │ │ │ │ -00136430: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00136440: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    };
    . │ │ │ │ -00136470: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    See al │ │ │ │ -00136490: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section Transient d │ │ │ │ -001364d0: 6174 6120 7479 7065 733c 2f61 3e20 2c20 ata types , │ │ │ │ -001364e0: 6e6f 6e2d 7365 7269 616c 697a 6162 6c65 non-serializable │ │ │ │ -001364f0: 2064 6174 6120 7479 7065 732e 3c2f 703e data types.

    │ │ │ │ -00136500: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -00136520: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Run │ │ │ │ -00136560: 2d74 696d 6520 666c 6167 733c 2f68 313e -time flags

    │ │ │ │ -00136570: 0a3c 703e 5468 6520 6753 4f41 5020 656e .

    The gSOAP en │ │ │ │ -00136580: 6769 6e65 2073 7461 7465 2069 7320 7374 gine state is st │ │ │ │ -00136590: 6f72 6564 2069 6e20 7468 6520 3c63 6f64 ored in the so │ │ │ │ -001365f0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co │ │ │ │ -00136600: 6e74 6578 7420 7468 6174 2069 7320 696e ntext that is in │ │ │ │ -00136610: 6974 6961 6c69 7a65 6420 616e 6420 636f itialized and co │ │ │ │ -00136620: 6e74 726f 6c6c 6564 2062 7920 7661 7269 ntrolled by vari │ │ │ │ -00136630: 6f75 7320 6f70 7469 6f6e 616c 2072 756e ous optional run │ │ │ │ -00136640: 7469 6d65 2066 6c61 6773 2e20 4d6f 7374 time flags. Most │ │ │ │ -00136650: 2066 6c61 6773 2061 7265 2061 7070 6c69 flags are appli │ │ │ │ -00136660: 6361 626c 6520 746f 2065 6974 6865 7220 cable to either │ │ │ │ -00136670: 7072 6f63 6573 7369 6e67 2069 6e70 7574 processing input │ │ │ │ -00136680: 206f 7220 746f 2070 726f 6365 7373 696e or to processin │ │ │ │ -00136690: 6720 6f75 7470 7574 2c20 6275 7420 736f g output, but so │ │ │ │ -001366a0: 6d65 2061 7265 2061 7070 6c69 6361 626c me are applicabl │ │ │ │ -001366b0: 6520 746f 2062 6f74 6820 696e 7075 7420 e to both input │ │ │ │ -001366c0: 616e 6420 6f75 7470 7574 206d 6573 7361 and output messa │ │ │ │ -001366d0: 6765 2061 6e64 2064 6f63 756d 656e 7420 ge and document │ │ │ │ -001366e0: 7072 6f63 6573 7369 6e67 2e3c 2f70 3e0a processing.

    . │ │ │ │ -001366f0: 3c70 3e46 7572 7468 6572 6d6f 7265 2c20

    Furthermore, │ │ │ │ -00136700: 7468 6573 6520 666c 6167 7320 6172 6520 these flags are │ │ │ │ -00136710: 6469 7669 6465 6420 696e 746f 2066 6f75 divided into fou │ │ │ │ -00136720: 7220 6361 7465 676f 7269 6573 3a20 7472 r categories: tr │ │ │ │ -00136730: 616e 7370 6f72 7420 2849 4f29 2c20 636f ansport (IO), co │ │ │ │ -00136740: 6e74 656e 7420 656e 636f 6469 6e67 2028 ntent encoding ( │ │ │ │ -00136750: 454e 4329 2c20 584d 4c20 7061 7273 696e ENC), XML parsin │ │ │ │ -00136760: 6720 616e 6420 6765 6e65 7261 7469 6f6e g and generation │ │ │ │ -00136770: 2028 584d 4c29 2c20 616e 6420 432f 432b (XML), and C/C+ │ │ │ │ -00136780: 2b20 7573 6167 6520 2843 292e 3c2f 703e + usage (C).

    │ │ │ │ -00136790: 0a3c 703e 5468 6520 696e 7075 742d 6d6f .

    The input-mo │ │ │ │ -001367a0: 6465 2061 6e64 206f 7574 7075 742d 6d6f de and output-mo │ │ │ │ -001367b0: 6465 2066 6c61 6773 2066 6f72 2069 6e62 de flags for inb │ │ │ │ -001367c0: 6f75 6e64 2028 696e 2920 616e 6420 6f75 ound (in) and ou │ │ │ │ -001367d0: 7462 6f75 6e64 2028 6f75 7429 206d 6573 tbound (out) mes │ │ │ │ -001367e0: 7361 6765 2070 726f 6365 7373 696e 6720 sage processing │ │ │ │ -001367f0: 6172 653a 3c2f 703e 0a3c 7461 626c 6520 are:

    .... │ │ │ │ -001368d0: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ -001368f0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ... │ │ │ │ -001369f0: 3c63 6f64 653e 2353 4f41 505f 494f 5f42 #SOAP_IO_B │ │ │ │ -00136a00: 5546 4645 523c 2f63 6f64 653e 2020 203c UFFER < │ │ │ │ -00136a10: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>....< │ │ │ │ -00136c20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00136c30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -00136c40: 3e6f 7574 2020 203c 2f74 643e 3c74 6420 >out │ │ │ │ -00136c90: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....< │ │ │ │ -00136e20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00136e30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -00136e40: 3e69 6e2b 6f75 7420 2020 3c2f 7464 3e3c >in+out < │ │ │ │ -00136e50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00136e60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -00136e70: 3e6b 6565 7020 736f 636b 6574 2063 6f6e >keep socket con │ │ │ │ -00136e80: 6e65 6374 696f 6e73 2061 6c69 7665 2c20 nections alive, │ │ │ │ -00136e90: 7768 656e 2073 7570 706f 7274 6564 2062 when supported b │ │ │ │ -00136ea0: 7920 7468 6520 4854 5450 2070 6565 7220 y the HTTP peer │ │ │ │ -00136eb0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..< │ │ │ │ -00136ee0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00136ef0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -00136f00: 3e3c 636f 6465 3e23 534f 4150 5f49 4f5f >#SOAP_IO_ │ │ │ │ -00136f10: 5544 503c 2f63 6f64 653e 2020 203c 2f74 UDP ......< │ │ │ │ -00137250: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00137260: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -00137270: 3e75 7365 2044 494d 4520 656e 636f 6469 >use DIME encodi │ │ │ │ -00137280: 6e67 2c20 6175 746f 6d61 7469 6320 7768 ng, automatic wh │ │ │ │ -00137290: 656e 2044 494d 4520 6174 7461 6368 6d65 en DIME attachme │ │ │ │ -001372a0: 6e74 7320 6172 6520 7573 6564 2020 2020 nts are used │ │ │ │ -001372b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 .. │ │ │ │ -00137370: 7573 6520 4d49 4d45 2065 6e63 6f64 696e use MIME encodin │ │ │ │ -00137380: 6720 696e 7374 6561 6420 6f66 2044 494d g instead of DIM │ │ │ │ -00137390: 452c 2061 6374 6976 6174 6564 2075 7369 E, activated usi │ │ │ │ -001373a0: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng soap_s │ │ │ │ -00137420: 6574 5f6d 696d 653c 2f61 3e3c 2f63 6f64 et_mime │ │ │ │ -00137440: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .......... │ │ │ │ -00137880: 3c74 6420 636c 6173 733d 226d 6172 6b64 .... │ │ │ │ -00137a20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...... │ │ │ │ -00137dd0: 7365 7269 616c 697a 6520 6170 706c 6963 serialize applic │ │ │ │ -00137de0: 6174 696f 6e20 6461 7461 2061 7320 616e ation data as an │ │ │ │ -00137df0: 2058 4d4c 2067 7261 7068 2077 6974 6820 XML graph with │ │ │ │ -00137e00: 6d75 6c74 692d 7265 6620 6964 2f72 6566 multi-ref id/ref │ │ │ │ -00137e10: 2061 7474 7269 6275 7465 7320 2020 203c attributes < │ │ │ │ -00137e20: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>.. │ │ │ │ -00137e90: 3c74 6420 636c 6173 733d 226d 6172 6b64 . │ │ │ │ -00137f20: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ -00137f40: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ......< │ │ │ │ -00138220: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ -00138230: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven"> │ │ │ │ -00138240: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ -00138370: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....

    All fla │ │ │ │ -00138480: 6773 2061 7265 2069 6e64 6570 656e 6465 gs are independe │ │ │ │ -00138490: 6e74 2061 6e64 2063 616e 2062 6520 636f nt and can be co │ │ │ │ -001384a0: 6d62 696e 6564 2075 7369 6e67 2061 2062 mbined using a b │ │ │ │ -001384b0: 6974 7769 7365 206f 7220 283c 636f 6465 itwise or (|), exce │ │ │ │ -001384d0: 7074 2066 6f72 203c 636f 6465 3e23 534f pt for #SO │ │ │ │ -001384e0: 4150 5f49 4f5f 464c 5553 483c 2f63 6f64 AP_IO_FLUSH, #SOAP_ │ │ │ │ -00138500: 494f 5f42 5546 4645 523c 2f63 6f64 653e IO_BUFFER │ │ │ │ -00138510: 2c20 3c63 6f64 653e 2353 4f41 505f 494f , #SOAP_IO │ │ │ │ -00138520: 5f53 544f 5245 3c2f 636f 6465 3e2c 2061 _STORE, a │ │ │ │ -00138530: 6e64 203c 636f 6465 3e23 534f 4150 5f49 nd #SOAP_I │ │ │ │ -00138540: 4f5f 4348 554e 4b3c 2f63 6f64 653e 2077 O_CHUNK w │ │ │ │ -00138550: 6869 6368 2061 7265 2065 6e75 6d65 7261 hich are enumera │ │ │ │ -00138560: 7469 6f6e 7320 616e 6420 6f6e 6c79 206f tions and only o │ │ │ │ -00138570: 6e65 206f 6620 7468 6573 6520 492f 4f20 ne of these I/O │ │ │ │ -00138580: 666c 6167 7320 6361 6e20 6265 2075 7365 flags can be use │ │ │ │ -00138590: 642e 2041 6c73 6f20 7468 6520 584d 4c20 d. Also the XML │ │ │ │ -001385a0: 7365 7269 616c 697a 6174 696f 6e20 666c serialization fl │ │ │ │ -001385b0: 6167 7320 3c63 6f64 653e 2353 4f41 505f ags #SOAP_ │ │ │ │ -001385c0: 584d 4c5f 5452 4545 3c2f 636f 6465 3e20 XML_TREE │ │ │ │ -001385d0: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_ │ │ │ │ -001385e0: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH │ │ │ │ -001385f0: 2073 686f 756c 6420 6e6f 7420 6265 206d should not be m │ │ │ │ -00138600: 6978 6564 2e3c 2f70 3e0a 3c70 3e54 6f20 ixed.

    .

    To │ │ │ │ -00138610: 616c 6c6f 6361 7465 2061 6e64 2069 6e69 allocate and ini │ │ │ │ -00138620: 7469 616c 697a 6520 6120 3c63 6f64 653e tialize a │ │ │ │ -00138630: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ -00138680: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ -00138690: 6578 7420 7769 7468 2069 6e70 7574 2061 ext with input a │ │ │ │ -001386a0: 6e64 206f 7574 7075 7420 6d6f 6465 2066 nd output mode f │ │ │ │ -001386b0: 6c61 6773 3a3c 2f70 3e0a 3c64 6976 2063 lags:

    .
    │ │ │ │ -001386d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -00138700: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -00138730: 703c 2f61 3e20 2a20 3c61 2063 6c61 7373 p * soa │ │ │ │ -00138790: 705f 6e65 7731 3c2f 613e 283c 6120 636c p_new1(so │ │ │ │ -001387f0: 6170 5f6d 6f64 653c 2f61 3e20 696f 6d6f ap_mode iomo │ │ │ │ -00138800: 6465 293b 3c2f 6469 763e 0a3c 6469 7620 de);
    ..
    │ │ │ │ -00138ab0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_new │ │ │ │ -00138b00: 323c 2f61 3e3c 2f64 6976 3e3c 6469 7620 2
    s │ │ │ │ -00138b20: 7472 7563 7420 736f 6170 202a 2073 6f61 truct soap * soa │ │ │ │ -00138b30: 705f 6e65 7732 2873 6f61 705f 6d6f 6465 p_new2(soap_mode │ │ │ │ -00138b40: 2069 6e70 7574 5f6d 6f64 652c 2073 6f61 input_mode, soa │ │ │ │ -00138b50: 705f 6d6f 6465 206f 7574 7075 745f 6d6f p_mode output_mo │ │ │ │ -00138b60: 6465 293c 2f64 6976 3e3c 6469 7620 636c de)
    Allo │ │ │ │ -00138b80: 6361 7465 2061 6e64 2069 6e69 7469 616c cate and initial │ │ │ │ -00138b90: 697a 6520 6120 6e65 7720 736f 6170 2063 ize a new soap c │ │ │ │ -00138ba0: 6f6e 7465 7874 2077 6974 6820 7365 7061 ontext with sepa │ │ │ │ -00138bb0: 7261 7465 2069 6e70 7574 2061 6e64 206f rate input and o │ │ │ │ -00138bc0: 7574 7075 7420 736f 6170 5f6d 6f64 6520 utput soap_mode │ │ │ │ -00138bd0: 666c 6167 732e 3c2f 6469 763e 3c2f 6469 flags.
    .

    To │ │ │ │ -00138c00: 696e 6974 6961 6c69 7a65 2061 2073 7461 initialize a sta │ │ │ │ -00138c10: 636b 2d61 6c6c 6f63 6174 6564 203c 636f ck-allocated s │ │ │ │ -00138c70: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c │ │ │ │ -00138c80: 6f6e 7465 7874 2077 6974 6820 696e 7075 ontext with inpu │ │ │ │ -00138c90: 7420 616e 6420 6f75 7470 7574 206d 6f64 t and output mod │ │ │ │ -00138ca0: 6520 666c 6167 733a 3c2f 703e 0a3c 6469 e flags:

    .
    v │ │ │ │ -00138cf0: 6f69 643c 2f73 7061 6e3e 203c 6120 636c oid │ │ │ │ -00138d50: 736f 6170 5f69 6e69 7431 3c2f 613e 283c soap_init1(< │ │ │ │ -00138d60: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00138d70: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ -00138de0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap_mod │ │ │ │ -00138e40: 653c 2f61 3e20 696f 6d6f 6465 293b 3c2f e iomode);..void soap_init2 │ │ │ │ -001391d0: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -001391e0: 6170 2c20 736f 6170 5f6d 6f64 6520 696e ap, soap_mode in │ │ │ │ -001391f0: 7075 745f 6d6f 6465 2c20 736f 6170 5f6d put_mode, soap_m │ │ │ │ -00139200: 6f64 6520 6f75 7470 7574 5f6d 6f64 6529 ode output_mode) │ │ │ │ -00139210: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Initial │ │ │ │ -00139230: 697a 6520 6120 7374 6163 6b2d 616c 6c6f ize a stack-allo │ │ │ │ -00139240: 6361 7465 6420 736f 6170 2063 6f6e 7465 cated soap conte │ │ │ │ -00139250: 7874 2077 6974 6820 696e 7075 7420 616e xt with input an │ │ │ │ -00139260: 6420 6f75 7470 7574 2073 6f61 705f 6d6f d output soap_mo │ │ │ │ -00139270: 6465 2066 6c61 6773 2e3c 2f64 6976 3e3c de flags.
    < │ │ │ │ -00139280: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -001392a0: 546f 2073 6574 2061 6e64 2063 6c65 6172 To set and clear │ │ │ │ -001392b0: 206d 6f64 6520 666c 6167 7320 7573 653a mode flags use: │ │ │ │ -001392c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    void soap_set │ │ │ │ -00139370: 5f6d 6f64 653c 2f61 3e28 3c73 7061 6e20 _mode( │ │ │ │ -00139390: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ -001393d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001393e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001393f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -00139400: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_mode │ │ │ │ -00139460: 2069 6f6d 6f64 6529 3b20 3c73 7061 6e20 iomode); │ │ │ │ -00139480: 2f2f 2073 6574 2069 6e70 7574 2061 6e64 // set input and │ │ │ │ -00139490: 206f 7574 7075 7420 6d6f 6465 2066 6c61 output mode fla │ │ │ │ -001394a0: 6773 3c2f 7370 616e 3e3c 2f64 6976 3e0a gs
    . │ │ │ │ -001394b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void │ │ │ │ -001394e0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soa │ │ │ │ -00139540: 705f 7365 745f 696d 6f64 653c 2f61 3e28 p_set_imode( │ │ │ │ -00139550: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ -001395a0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap │ │ │ │ -001395d0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soap_mo │ │ │ │ -00139630: 6465 3c2f 613e 203c 6120 636c 6173 733d de │ │ │ │ -00139680: 696d 6f64 653c 2f61 3e29 3b20 3c73 7061 imode); // set input m │ │ │ │ -001396b0: 6f64 6520 666c 6167 733c 2f73 7061 6e3e ode flags │ │ │ │ -001396c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void < │ │ │ │ -00139700: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00139710: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00139720: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ -00139730: 6761 6636 6661 3665 3139 3766 3336 3038 gaf6fa6e197f3608 │ │ │ │ -00139740: 3334 6561 6531 3234 6661 3337 6536 3863 34eae124fa37e68c │ │ │ │ -00139750: 6637 223e 736f 6170 5f73 6574 5f6f 6d6f f7">soap_set_omo │ │ │ │ -00139760: 6465 3c2f 613e 283c 7370 616e 2063 6c61 de(str │ │ │ │ -00139780: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, │ │ │ │ -00139840: 736f 6170 5f6d 6f64 653c 2f61 3e20 3c61 soap_mode omode │ │ │ │ -001398a0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // set │ │ │ │ -001398c0: 6f75 7470 7574 206d 6f64 6520 666c 6167 output mode flag │ │ │ │ -001398d0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ -001398e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001398f0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ -00139910: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap │ │ │ │ -00139970: 5f63 6c72 5f6d 6f64 653c 2f61 3e28 3c73 _clr_mode(struct soap *soap, soap_mode │ │ │ │ -00139a60: 3c2f 613e 2069 6f6d 6f64 6529 3b20 3c73 iomode); // clear inp │ │ │ │ -00139a90: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo │ │ │ │ -00139aa0: 6465 2066 6c61 6773 3c2f 7370 616e 3e3c de flags< │ │ │ │ -00139ab0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void soap_clr_imod │ │ │ │ -00139b50: 653c 2f61 3e28 3c73 7061 6e20 636c 6173 e(stru │ │ │ │ -00139b70: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, s │ │ │ │ -00139c30: 6f61 705f 6d6f 6465 3c2f 613e 203c 6120 oap_mode imode) │ │ │ │ -00139c90: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // clear │ │ │ │ -00139cb0: 2069 6e70 7574 206d 6f64 6520 666c 6167 input mode flag │ │ │ │ -00139cc0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ -00139cd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00139ce0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ -00139d00: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap │ │ │ │ -00139d60: 5f63 6c72 5f6f 6d6f 6465 3c2f 613e 283c _clr_omode(< │ │ │ │ -00139d70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00139d80: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ -00139df0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap_mod │ │ │ │ -00139e50: 653c 2f61 3e20 3c61 2063 6c61 7373 3d22 e o │ │ │ │ -00139ea0: 6d6f 6465 3c2f 613e 293b 203c 7370 616e mode); // clear output │ │ │ │ -00139ed0: 206d 6f64 6520 666c 6167 733c 2f73 7061 mode flags
    .
    void soap_c │ │ │ │ -00139fd0: 6c72 5f6d 6f64 6528 7374 7275 6374 2073 lr_mode(struct s │ │ │ │ -00139fe0: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_ │ │ │ │ -00139ff0: 6d6f 6465 2069 6e70 7574 5f61 6e64 5f6f mode input_and_o │ │ │ │ -0013a000: 7574 7075 745f 6d6f 6465 293c 2f64 6976 utput_mode)
    Clear input │ │ │ │ -0013a030: 616e 6420 6f75 7470 7574 2073 6f61 705f and output soap_ │ │ │ │ -0013a040: 6d6f 6465 2066 6c61 6773 206f 6620 7468 mode flags of th │ │ │ │ -0013a050: 6520 6769 7665 6e20 736f 6170 2063 6f6e e given soap con │ │ │ │ -0013a060: 7465 7874 2e3c 2f64 6976 3e3c 2f64 6976 text.
    .
    v │ │ │ │ -0013a150: 6f69 6420 736f 6170 5f63 6c72 5f69 6d6f oid soap_clr_imo │ │ │ │ -0013a160: 6465 2873 7472 7563 7420 736f 6170 202a de(struct soap * │ │ │ │ -0013a170: 736f 6170 2c20 736f 6170 5f6d 6f64 6520 soap, soap_mode │ │ │ │ -0013a180: 696e 7075 745f 6d6f 6465 293c 2f64 6976 input_mode)
    Clear input │ │ │ │ -0013a1b0: 736f 6170 5f6d 6f64 6520 666c 6167 7320 soap_mode flags │ │ │ │ -0013a1c0: 6f66 2074 6865 2067 6976 656e 2073 6f61 of the given soa │ │ │ │ -0013a1d0: 7020 636f 6e74 6578 742e 3c2f 6469 763e p context.
    │ │ │ │ -0013a1e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0013a250: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_clr │ │ │ │ -0013a2a0: 5f6f 6d6f 6465 3c2f 613e 3c2f 6469 763e _omode
    │ │ │ │ -0013a2b0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_cl │ │ │ │ -0013a2d0: 725f 6f6d 6f64 6528 7374 7275 6374 2073 r_omode(struct s │ │ │ │ -0013a2e0: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_ │ │ │ │ -0013a2f0: 6d6f 6465 206f 7574 7075 745f 6d6f 6465 mode output_mode │ │ │ │ -0013a300: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Clear │ │ │ │ -0013a320: 6f75 7470 7574 2073 6f61 705f 6d6f 6465 output soap_mode │ │ │ │ -0013a330: 2066 6c61 6773 206f 6620 7468 6520 6769 flags of the gi │ │ │ │ -0013a340: 7665 6e20 736f 6170 2063 6f6e 7465 7874 ven soap context │ │ │ │ -0013a350: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .
    void │ │ │ │ -0013a440: 736f 6170 5f73 6574 5f69 6d6f 6465 2873 soap_set_imode(s │ │ │ │ -0013a450: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -0013a460: 2c20 736f 6170 5f6d 6f64 6520 696e 7075 , soap_mode inpu │ │ │ │ -0013a470: 745f 6d6f 6465 293c 2f64 6976 3e3c 6469 t_mode)
    │ │ │ │ -0013a490: 5365 7420 696e 7075 7420 736f 6170 5f6d Set input soap_m │ │ │ │ -0013a4a0: 6f64 6520 666c 6167 7320 6f66 2074 6865 ode flags of the │ │ │ │ -0013a4b0: 2067 6976 656e 2073 6f61 7020 636f 6e74 given soap cont │ │ │ │ -0013a4c0: 6578 742e 3c2f 6469 763e 3c2f 6469 763e ext. │ │ │ │ -0013a4d0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    vo │ │ │ │ -0013a5b0: 6964 2073 6f61 705f 7365 745f 6f6d 6f64 id soap_set_omod │ │ │ │ -0013a5c0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s │ │ │ │ -0013a5d0: 6f61 702c 2073 6f61 705f 6d6f 6465 206f oap, soap_mode o │ │ │ │ -0013a5e0: 7574 7075 745f 6d6f 6465 293c 2f64 6976 utput_mode)
    Set output s │ │ │ │ -0013a610: 6f61 705f 6d6f 6465 2066 6c61 6773 206f oap_mode flags o │ │ │ │ -0013a620: 6620 7468 6520 6769 7665 6e20 736f 6170 f the given soap │ │ │ │ -0013a630: 2063 6f6e 7465 7874 2e3c 2f64 6976 3e3c context.
    < │ │ │ │ -0013a640: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.
    Note
    The #SOAP_XML_TREE< │ │ │ │ -0013a6a0: 2f63 6f64 653e 206d 6f64 6520 666c 6167 /code> mode flag │ │ │ │ -0013a6b0: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to │ │ │ │ -0013a6c0: 696d 7072 6f76 6520 696e 7465 726f 7065 improve interope │ │ │ │ -0013a6d0: 7261 6269 6c69 7479 2077 6974 6820 534f rability with SO │ │ │ │ -0013a6e0: 4150 2069 6d70 6c65 6d65 6e74 6174 696f AP implementatio │ │ │ │ -0013a6f0: 6e73 2074 6861 7420 6172 6520 6e6f 7420 ns that are not │ │ │ │ -0013a700: 6675 6c6c 7920 534f 4150 2031 2e31 2f31 fully SOAP 1.1/1 │ │ │ │ -0013a710: 2e32 2052 5043 2065 6e63 6f64 696e 6720 .2 RPC encoding │ │ │ │ -0013a720: 636f 6d70 6c69 616e 7420 7769 7468 2072 compliant with r │ │ │ │ -0013a730: 6573 7065 6374 2074 6f20 7072 6f63 6573 espect to proces │ │ │ │ -0013a740: 7369 6e67 2069 642d 6872 6566 2f72 6566 sing id-href/ref │ │ │ │ -0013a750: 2061 7474 7269 6275 7465 732e 2048 6f77 attributes. How │ │ │ │ -0013a760: 6576 6572 2c20 7472 6565 2073 6572 6961 ever, tree seria │ │ │ │ -0013a770: 6c69 7a61 7469 6f6e 2077 696c 6c20 6475 lization will du │ │ │ │ -0013a780: 706c 6963 6174 6520 6461 7461 2077 6865 plicate data whe │ │ │ │ -0013a790: 6e20 7468 6973 2064 6174 6120 6973 2063 n this data is c │ │ │ │ -0013a7a0: 6f2d 7265 6665 7265 6e63 6564 2e20 4379 o-referenced. Cy │ │ │ │ -0013a7b0: 636c 6573 2061 7265 2064 6574 6563 7465 cles are detecte │ │ │ │ -0013a7c0: 6420 616e 6420 6272 6f6b 656e 2074 6f20 d and broken to │ │ │ │ -0013a7d0: 6176 6f69 6420 696e 6669 6e69 7465 2073 avoid infinite s │ │ │ │ -0013a7e0: 6572 6961 6c69 7a61 7469 6f6e 2e3c 2f64 erialization.
    .

    In ad │ │ │ │ -0013a800: 6469 7469 6f6e 2074 6f20 7468 6520 636f dition to the co │ │ │ │ -0013a810: 6e74 6578 7420 6d6f 6465 2066 6c61 6773 ntext mode flags │ │ │ │ -0013a820: 2c20 7468 6520 666f 6c6c 6f77 696e 6720 , the following │ │ │ │ -0013a830: 636f 6e74 6578 7420 666c 6167 7320 6361 context flags ca │ │ │ │ -0013a840: 6e20 6265 2075 7365 6420 746f 2073 6574 n be used to set │ │ │ │ -0013a850: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop │ │ │ │ -0013a860: 743c 2f63 6f64 653e 206c 6576 656c 203c t level < │ │ │ │ -0013a870: 636f 6465 3e53 4f4c 5f53 4f43 4b45 543c code>SOL_SOCKET< │ │ │ │ -0013a880: 2f63 6f64 653e 206f 7074 696f 6e73 2077 /code> options w │ │ │ │ -0013a890: 6865 6e20 736f 636b 6574 7320 6172 6520 hen sockets are │ │ │ │ -0013a8a0: 6372 6561 7465 642c 2074 686f 7567 6820 created, though │ │ │ │ -0013a8b0: 736f 6d65 206f 7074 696f 6e73 206d 6179 some options may │ │ │ │ -0013a8c0: 206e 6f74 2062 6520 6170 706c 6963 6162 not be applicab │ │ │ │ -0013a8d0: 6c65 2074 6f20 796f 7572 206f 7065 7261 le to your opera │ │ │ │ -0013a8e0: 7469 6e67 2073 7973 7465 6d3a 3c2f 703e ting system:

    │ │ │ │ -0013a8f0: 0a3c 7461 626c 6520 636c 6173 733d 226d .
    mode fla │ │ │ │ -00136860: 6720 2020 3c2f 7468 3e3c 7468 2063 6c61 g in/ou │ │ │ │ -00136890: 7420 2020 3c2f 7468 3e3c 7468 2063 6c61 t resul │ │ │ │ -001368c0: 7420 2020 203c 2f74 683e 3c2f 7472 3e0a t
    #SOAP_I │ │ │ │ -00136920: 4f5f 464c 5553 483c 2f63 6f64 653e 2020 O_FLUSH │ │ │ │ -00136930: 203c 2f74 643e 3c74 6420 636c 6173 733d out flush outpu │ │ │ │ -00136990: 7420 696d 6d65 6469 6174 656c 7920 2020 t immediately │ │ │ │ -001369a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    out enable output │ │ │ │ -00136a70: 2062 7566 6665 7269 6e67 2c20 7468 6520 buffering, the │ │ │ │ -00136a80: 6465 6661 756c 7420 6d6f 6465 2066 6f72 default mode for │ │ │ │ -00136a90: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti │ │ │ │ -00136aa0: 6f6e 7320 2020 203c 2f74 643e 3c2f 7472 ons
    #SOAP │ │ │ │ -00136b00: 5f49 4f5f 5354 4f52 453c 2f63 6f64 653e _IO_STORE │ │ │ │ -00136b10: 2020 203c 2f74 643e 3c74 6420 636c 6173 out │ │ │ │ -00136b40: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 store the │ │ │ │ -00136b70: 2065 6e74 6972 6520 6f75 7462 6f75 6e64 entire outbound │ │ │ │ -00136b80: 206d 6573 7361 6765 2074 6f20 6361 6c63 message to calc │ │ │ │ -00136b90: 756c 6174 6520 4854 5450 2063 6f6e 7465 ulate HTTP conte │ │ │ │ -00136ba0: 6e74 206c 656e 6774 6820 2020 203c 2f74 nt length
    #SOAP_IO_CHUNK │ │ │ │ -00136c10: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c en │ │ │ │ -00136c70: 6162 6c65 2048 5454 5020 6368 756e 6b69 able HTTP chunki │ │ │ │ -00136c80: 6e67 2020 2020 3c2f 7464 3e3c 2f74 723e ng
    #SOAP_ │ │ │ │ -00136ce0: 494f 5f4c 454e 4754 483c 2f63 6f64 653e IO_LENGTH │ │ │ │ -00136cf0: 2020 203c 2f74 643e 3c74 6420 636c 6173 out │ │ │ │ -00136d20: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 used with │ │ │ │ -00136d50: 2074 776f 2d70 6861 7365 2073 6572 6961 two-phase seria │ │ │ │ -00136d60: 6c69 7a61 7469 6f6e 2c20 6669 7273 7420 lization, first │ │ │ │ -00136d70: 7068 6173 6520 7769 7468 2074 6869 7320 phase with this │ │ │ │ -00136d80: 666c 6167 2074 6f20 6361 6c63 756c 6174 flag to calculat │ │ │ │ -00136d90: 6520 4854 5450 2063 6f6e 7465 6e74 206c e HTTP content l │ │ │ │ -00136da0: 656e 6774 6820 2020 203c 2f74 643e 3c2f ength
    #S │ │ │ │ -00136e00: 4f41 505f 494f 5f4b 4545 5041 4c49 5645 OAP_IO_KEEPALIVE │ │ │ │ -00136e10: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    in+out use UDP (dat │ │ │ │ -00136f80: 6167 7261 6d29 2074 7261 6e73 706f 7274 agram) transport │ │ │ │ -00136f90: 2c20 6d61 7869 6d75 6d20 6d65 7373 6167 , maximum messag │ │ │ │ -00136fa0: 6520 6c65 6e67 7468 2069 7320 3c63 6f64 e length is #SOAP_BUFLEN
    #S │ │ │ │ -00137020: 4f41 505f 454e 435f 504c 4149 4e3c 2f63 OAP_ENC_PLAIN in │ │ │ │ -00137060: 2b6f 7574 2020 203c 2f74 643e 3c74 6420 +out us │ │ │ │ -00137090: 6520 706c 6169 6e20 6d65 7373 6167 6573 e plain messages │ │ │ │ -001370a0: 2077 6974 686f 7574 2070 6172 7369 6e67 without parsing │ │ │ │ -001370b0: 206f 7220 656d 6974 7469 6e67 2048 5454 or emitting HTT │ │ │ │ -001370c0: 5020 6865 6164 6572 7320 2020 203c 2f74 P headers
    #SOAP_ENC_XML < │ │ │ │ -00137160: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>alias for │ │ │ │ -00137190: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_ │ │ │ │ -001371a0: 504c 4149 4e3c 2f63 6f64 653e 2020 2020 PLAIN │ │ │ │ -001371b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    < │ │ │ │ -00137200: 636f 6465 3e23 534f 4150 5f45 4e43 5f44 code>#SOAP_ENC_D │ │ │ │ -00137210: 494d 453c 2f63 6f64 653e 2020 203c 2f74 IME out
    #SOAP_ENC_MI │ │ │ │ -00137310: 4d45 3c2f 636f 6465 3e20 2020 3c2f 7464 ME out
    #SOAP │ │ │ │ -00137490: 5f45 4e43 5f4d 544f 4d3c 2f63 6f64 653e _ENC_MTOM │ │ │ │ -001374a0: 2020 203c 2f74 643e 3c74 6420 636c 6173 out │ │ │ │ -001374d0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 use MTOM │ │ │ │ -00137500: 584f 5020 6174 7461 6368 6d65 6e74 7320 XOP attachments │ │ │ │ -00137510: 696e 7374 6561 6420 6f66 2044 494d 4520 instead of DIME │ │ │ │ -00137520: 616e 6420 4d49 4d45 2020 2020 3c2f 7464 and MIME
    │ │ │ │ -00137580: 2353 4f41 505f 454e 435f 5a4c 4942 3c2f #SOAP_ENC_ZLIB o │ │ │ │ -001375c0: 7574 2020 203c 2f74 643e 3c74 6420 636c ut comp │ │ │ │ -001375f0: 7265 7373 206f 7574 7075 7420 7769 7468 ress output with │ │ │ │ -00137600: 205a 6c69 622c 2075 7369 6e67 2064 6566 Zlib, using def │ │ │ │ -00137610: 6c61 7465 206f 7220 677a 6970 2066 6f72 late or gzip for │ │ │ │ -00137620: 6d61 7420 2020 203c 2f74 643e 3c2f 7472 mat
    #SOA │ │ │ │ -00137680: 505f 454e 435f 5353 4c3c 2f63 6f64 653e P_ENC_SSL │ │ │ │ -00137690: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out │ │ │ │ -001376c0: 2020 203c 2f74 643e 3c74 6420 636c 6173 use SS │ │ │ │ -001376f0: 4c2f 544c 532c 2061 7574 6f6d 6174 6963 L/TLS, automatic │ │ │ │ -00137700: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting │ │ │ │ -00137710: 2022 6874 7470 733a 2220 656e 6470 6f69 "https:" endpoi │ │ │ │ -00137720: 6e74 7320 2020 203c 2f74 643e 3c2f 7472 nts
    #SOAP │ │ │ │ -00137780: 5f58 4d4c 5f49 4e44 454e 543c 2f63 6f64 _XML_INDENT out │ │ │ │ -001377c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 output │ │ │ │ -001377f0: 696e 6465 6e74 6564 2058 4d4c 2061 6e64 indented XML and │ │ │ │ -00137800: 204a 534f 4e20 2020 203c 2f74 643e 3c2f JSON
    #S │ │ │ │ -00137860: 4f41 505f 584d 4c5f 4341 4e4f 4e49 4341 OAP_XML_CANONICA │ │ │ │ -00137870: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L out o │ │ │ │ -001378d0: 7574 7075 7420 6361 6e6f 6e69 6361 6c20 utput canonical │ │ │ │ -001378e0: 584d 4c20 2020 203c 2f74 643e 3c2f 7472 XML
    #SOAP │ │ │ │ -00137940: 5f58 4d4c 5f44 4546 4155 4c54 4e53 3c2f _XML_DEFAULTNS o │ │ │ │ -00137980: 7574 2020 203c 2f74 643e 3c74 6420 636c ut outp │ │ │ │ -001379b0: 7574 2058 4d4c 2077 6974 6820 6465 6661 ut XML with defa │ │ │ │ -001379c0: 756c 7420 6e61 6d65 7370 6163 6520 6269 ult namespace bi │ │ │ │ -001379d0: 6e64 696e 6773 203c 636f 6465 3e78 6d6c ndings xml │ │ │ │ -001379e0: 6e73 3d22 2e2e 2e22 3c2f 636f 6465 3e20 ns="..." │ │ │ │ -001379f0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_XM │ │ │ │ -00137a50: 4c5f 4947 4e4f 5245 4e53 3c2f 636f 6465 L_IGNORENS in │ │ │ │ -00137a90: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ignores X │ │ │ │ -00137ac0: 4d4c 206e 616d 6573 7061 6365 7320 696e ML namespaces in │ │ │ │ -00137ad0: 2058 4d4c 2069 6e70 7574 2020 2020 3c2f XML input
    #SOAP_XML_STRI │ │ │ │ -00137b40: 4354 3c2f 636f 6465 3e20 2020 3c2f 7464 CT in a │ │ │ │ -00137ba0: 7070 6c79 2073 7472 6963 7420 7661 6c69 pply strict vali │ │ │ │ -00137bb0: 6461 7469 6f6e 206f 6620 584d 4c20 696e dation of XML in │ │ │ │ -00137bc0: 7075 7420 2020 203c 2f74 643e 3c2f 7472 put
    #SOA │ │ │ │ -00137c20: 505f 584d 4c5f 5452 4545 3c2f 636f 6465 P_XML_TREE in+ou │ │ │ │ -00137c60: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t out: │ │ │ │ -00137c90: 7365 7269 616c 697a 6520 6461 7461 2061 serialize data a │ │ │ │ -00137ca0: 7320 584d 4c20 7472 6565 7320 286e 6f20 s XML trees (no │ │ │ │ -00137cb0: 6d75 6c74 692d 7265 662c 2064 7570 6c69 multi-ref, dupli │ │ │ │ -00137cc0: 6361 7465 2064 6174 6120 7768 656e 206e cate data when n │ │ │ │ -00137cd0: 6563 6573 7361 7279 293b 2069 6e3a 2069 ecessary); in: i │ │ │ │ -00137ce0: 676e 6f72 6520 6964 2061 7474 7269 6275 gnore id attribu │ │ │ │ -00137cf0: 7465 7320 2864 6f20 6e6f 7420 7265 736f tes (do not reso │ │ │ │ -00137d00: 6c76 6520 6964 2d72 6566 2920 2020 203c lve id-ref) < │ │ │ │ -00137d10: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_XML_GRA │ │ │ │ -00137d70: 5048 3c2f 636f 6465 3e20 2020 3c2f 7464 PH out
    #SOAP_XML_NI │ │ │ │ -00137e80: 4c3c 2f63 6f64 653e 2020 203c 2f74 643e L out s │ │ │ │ -00137ee0: 6572 6961 6c69 7a65 204e 554c 4c20 6461 erialize NULL da │ │ │ │ -00137ef0: 7461 2061 7320 7873 693a 6e69 6c20 6174 ta as xsi:nil at │ │ │ │ -00137f00: 7472 6962 7574 6564 2065 6c65 6d65 6e74 tributed element │ │ │ │ -00137f10: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #SOAP_X │ │ │ │ -00137f70: 4d4c 5f4e 4f54 5950 453c 2f63 6f64 653e ML_NOTYPE │ │ │ │ -00137f80: 2020 203c 2f74 643e 3c74 6420 636c 6173 out │ │ │ │ -00137fb0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disable < │ │ │ │ -00137fe0: 656d 3e3c 636f 6465 3e78 7369 3a74 7970 em>xsi:typ │ │ │ │ -00137ff0: 653c 2f63 6f64 653e 3c2f 656d 3e20 6174 e at │ │ │ │ -00138000: 7472 6962 7574 6573 2020 2020 3c2f 7464 tributes
    #SOAP_C_NOIOB i │ │ │ │ -001380a0: 6e20 2020 3c2f 7464 3e3c 7464 2063 6c61 n do no │ │ │ │ -001380d0: 7420 6661 756c 7420 7769 7468 203c 636f t fault with #SOAP_IOB
    #SOAP │ │ │ │ -00138150: 5f43 5f55 5446 5354 5249 4e47 3c2f 636f _C_UTFSTRING in+ │ │ │ │ -00138190: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ser │ │ │ │ -001381c0: 6961 6c69 7a65 2038 2d62 6974 2063 6861 ialize 8-bit cha │ │ │ │ -001381d0: 7261 6374 6572 2073 7472 696e 6773 2022 racter strings " │ │ │ │ -001381e0: 6173 2069 7322 2c20 6d65 616e 696e 6720 as is", meaning │ │ │ │ -001381f0: 382d 6269 7420 7374 7269 6e67 7320 6861 8-bit strings ha │ │ │ │ -00138200: 7665 2055 5446 2d38 2063 6f6e 7465 6e74 ve UTF-8 content │ │ │ │ -00138210: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_C │ │ │ │ -00138270: 5f4d 4253 5452 494e 473c 2f63 6f64 653e _MBSTRING │ │ │ │ -00138280: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out │ │ │ │ -001382b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 enable │ │ │ │ -001382e0: 206d 756c 7469 6279 7465 2063 6861 7261 multibyte chara │ │ │ │ -001382f0: 6374 6572 2073 7570 706f 7274 2066 6f72 cter support for │ │ │ │ -00138300: 2038 2d62 6974 2063 6861 7261 6374 6572 8-bit character │ │ │ │ -00138310: 2073 7472 696e 6773 2077 6974 6820 3c63 strings with wctomb and mbto │ │ │ │ -00138340: 7763 3c2f 636f 6465 3e20 7573 696e 6720 wc using │ │ │ │ -00138350: 7468 6520 6375 7272 656e 7420 6c6f 6361 the current loca │ │ │ │ -00138360: 6c65 2020 2020 3c2f 7464 3e3c 2f74 723e le
    #SOAP_ │ │ │ │ -001383c0: 435f 4e49 4c53 5452 494e 473c 2f63 6f64 C_NILSTRING out │ │ │ │ -00138400: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 seriali │ │ │ │ -00138430: 7a65 2065 6d70 7479 2073 7472 696e 6773 ze empty strings │ │ │ │ -00138440: 2061 7320 7873 693a 6e69 6c20 6174 7472 as xsi:nil attr │ │ │ │ -00138450: 6962 7574 6564 2065 6c65 6d65 6e74 7320 ibuted elements │ │ │ │ -00138460: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 2f74
    .< │ │ │ │ -0013a910: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ -0013a920: 776e 5461 626c 6548 6561 6422 3e0a 3c74 wnTableHead">. │ │ │ │ -0013a950: 636f 6e74 6578 7420 666c 6167 2077 6974 context flag wit │ │ │ │ -0013a960: 6820 7365 7473 6f63 6b6f 7074 206f 7074 h setsockopt opt │ │ │ │ -0013a970: 696f 6e20 2020 3c2f 7468 3e3c 7468 2063 ion .. │ │ │ │ -0013ab30: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..< │ │ │ │ -0013acf0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...... │ │ │ │ -0013b170: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ -0013b230: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag │ │ │ │ -0013b240: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = < │ │ │ │ -0013b250: 636f 6465 3e53 4f5f 444f 4e54 524f 5554 code>SO_DONTROUT │ │ │ │ -0013b260: 453c 2f63 6f64 653e 2020 203c 2f74 643e E │ │ │ │ -0013b270: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ -0013b2f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -0013b300: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -0013b310: 3e3c 636f 6465 3e3c 6120 636c 6173 733d >s │ │ │ │ -0013b3d0: 6f61 703a 3a61 6363 6570 745f 666c 6167 oap::accept_flag │ │ │ │ -0013b3e0: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = < │ │ │ │ -0013b3f0: 636f 6465 3e53 4f5f 4e4f 5349 4750 4950 code>SO_NOSIGPIP │ │ │ │ -0013b400: 453c 2f63 6f64 653e 2020 203c 2f74 643e E │ │ │ │ -0013b410: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...... │ │ │ │ -0013ba10: 656e 6162 6c65 7320 726f 7574 696e 6720 enables routing │ │ │ │ -0013ba20: 6279 7061 7373 2066 6f72 206f 7574 676f bypass for outgo │ │ │ │ -0013ba30: 696e 6720 6d65 7373 6167 6573 2020 2020 ing messages │ │ │ │ -0013ba40: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 .. │ │ │ │ -0013bbf0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ -0013bd90: 0a3c 2f74 6162 6c65 3e0a 3c70 3e46 6f72 .
    res │ │ │ │ -0013a9a0: 756c 7420 2020 203c 2f74 683e 3c2f 7472 ult
    soap::connect │ │ │ │ -0013aac0: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = SO_NOS │ │ │ │ -0013aae0: 4947 5049 5045 3c2f 636f 6465 3e20 2020 IGPIPE │ │ │ │ -0013aaf0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disables │ │ │ │ -0013ab20: 5349 4750 4950 4520 2020 203c 2f74 643e SIGPIPE
    │ │ │ │ -0013ab80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co │ │ │ │ -0013ac40: 6e6e 6563 745f 666c 6167 733c 2f61 3e3c nnect_flags< │ │ │ │ -0013ac50: 2f63 6f64 653e 203d 203c 636f 6465 3e53 /code> = S │ │ │ │ -0013ac60: 4f5f 4445 4255 473c 2f63 6f64 653e 2020 O_DEBUG │ │ │ │ -0013ac70: 203c 2f74 643e 3c74 6420 636c 6173 733d turns on │ │ │ │ -0013aca0: 2072 6563 6f72 6469 6e67 206f 6620 6465 recording of de │ │ │ │ -0013acb0: 6275 6767 696e 6720 696e 666f 726d 6174 bugging informat │ │ │ │ -0013acc0: 696f 6e20 696e 2074 6865 2075 6e64 6572 ion in the under │ │ │ │ -0013acd0: 6c79 696e 6720 7072 6f74 6f63 6f6c 206d lying protocol m │ │ │ │ -0013ace0: 6f64 756c 6573 2020 2020 3c2f 7464 3e3c odules
    soap::conn │ │ │ │ -0013ae00: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_ │ │ │ │ -0013ae20: 4252 4f41 4443 4153 543c 2f63 6f64 653e BROADCAST │ │ │ │ -0013ae30: 2020 203c 2f74 643e 3c74 6420 636c 6173 permit │ │ │ │ -0013ae60: 7320 7365 6e64 696e 6720 6f66 2062 726f s sending of bro │ │ │ │ -0013ae70: 6164 6361 7374 206d 6573 7361 6765 732c adcast messages, │ │ │ │ -0013ae80: 2066 6f72 2065 7861 6d70 6c65 2077 6974 for example wit │ │ │ │ -0013ae90: 6820 5544 502c 2077 6865 6e20 7065 726d h UDP, when perm │ │ │ │ -0013aea0: 6974 7465 6420 2020 203c 2f74 643e 3c2f itted
    soap::conn │ │ │ │ -0013afc0: 6563 745f 666c 6167 733c 2f61 3e3c 2f63 ect_flags = SO_ │ │ │ │ -0013afe0: 4c49 4e47 4552 3c2f 636f 6465 3e20 2020 LINGER │ │ │ │ -0013aff0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 sets clie │ │ │ │ -0013b020: 6e74 2d73 6964 6520 6c69 6e67 6572 2074 nt-side linger t │ │ │ │ -0013b030: 696d 6520 746f 2074 6865 2076 616c 7565 ime to the value │ │ │ │ -0013b040: 206f 6620 3c63 6f64 653e 3c61 2063 6c61 of soap::linger_t │ │ │ │ -0013b110: 696d 653c 2f61 3e3c 2f63 6f64 653e 2020 ime │ │ │ │ -0013b120: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    enables routin │ │ │ │ -0013b2a0: 6720 6279 7061 7373 2066 6f72 206f 7574 g bypass for out │ │ │ │ -0013b2b0: 676f 696e 6720 6d65 7373 6167 6573 2020 going messages │ │ │ │ -0013b2c0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    disables SIGPI │ │ │ │ -0013b440: 5045 2028 6368 6563 6b20 796f 7572 204f PE (check your O │ │ │ │ -0013b450: 532c 2074 6869 7320 6973 206e 6f74 2070 S, this is not p │ │ │ │ -0013b460: 6f72 7461 626c 6529 2020 2020 3c2f 7464 ortable)
    │ │ │ │ -0013b4c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac │ │ │ │ -0013b580: 6365 7074 5f66 6c61 6773 3c2f 613e 3c2f cept_flags = SO │ │ │ │ -0013b5a0: 5f44 4542 5547 3c2f 636f 6465 3e20 2020 _DEBUG │ │ │ │ -0013b5b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 turns on │ │ │ │ -0013b5e0: 7265 636f 7264 696e 6720 6f66 2064 6562 recording of deb │ │ │ │ -0013b5f0: 7567 6769 6e67 2069 6e66 6f72 6d61 7469 ugging informati │ │ │ │ -0013b600: 6f6e 2069 6e20 7468 6520 756e 6465 726c on in the underl │ │ │ │ -0013b610: 7969 6e67 2070 726f 746f 636f 6c20 6d6f ying protocol mo │ │ │ │ -0013b620: 6475 6c65 7320 2020 203c 2f74 643e 3c2f dules
    soap::acce │ │ │ │ -0013b740: 7074 5f66 6c61 6773 3c2f 613e 3c2f 636f pt_flags = SO_L │ │ │ │ -0013b760: 494e 4745 523c 2f63 6f64 653e 2020 203c INGER < │ │ │ │ -0013b770: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>sets serve │ │ │ │ -0013b7a0: 722d 7369 6465 206c 696e 6765 7220 7469 r-side linger ti │ │ │ │ -0013b7b0: 6d65 2074 6f20 7468 6520 7661 6c75 6520 me to the value │ │ │ │ -0013b7c0: 6f66 203c 636f 6465 3e3c 6120 636c 6173 of soap::linger_ti │ │ │ │ -0013b890: 6d65 3c2f 613e 3c2f 636f 6465 3e20 2020 me │ │ │ │ -0013b8a0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    < │ │ │ │ -0013b8f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -0013b9b0: 703a 3a61 6363 6570 745f 666c 6167 733c p::accept_flags< │ │ │ │ -0013b9c0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_DONTROUTE< │ │ │ │ -0013b9e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    < │ │ │ │ -0013ba90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -0013bb50: 703a 3a62 696e 645f 666c 6167 733c 2f61 p::bind_flags = SO_REUSEADDR en │ │ │ │ -0013bbb0: 6162 6c65 7320 6c6f 6361 6c20 6164 6472 ables local addr │ │ │ │ -0013bbc0: 6573 7320 7265 7573 6520 696d 6d65 6469 ess reuse immedi │ │ │ │ -0013bbd0: 6174 656c 792c 2075 7365 2077 6974 6820 ately, use with │ │ │ │ -0013bbe0: 6361 7574 696f 6e20 2020 203c 2f74 643e caution
    < │ │ │ │ -0013bc40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0013bc50: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -0013bc60: 6d6c 2361 3662 3138 6230 3137 6365 3263 ml#a6b18b017ce2c │ │ │ │ -0013bc70: 3737 6163 3262 3633 3331 3436 3930 3934 77ac2b6331469094 │ │ │ │ -0013bc80: 6465 3539 2220 7469 746c 653d 2255 7365 de59" title="Use │ │ │ │ -0013bc90: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets │ │ │ │ -0013bca0: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL │ │ │ │ -0013bcb0: 5f53 4f43 4b45 5420 666c 6167 7320 7768 _SOCKET flags wh │ │ │ │ -0013bcc0: 656e 2062 696e 6469 6e67 2073 6f61 703a en binding soap: │ │ │ │ -0013bcd0: 3a6d 6173 7465 7220 736f 636b 6574 2028 :master socket ( │ │ │ │ -0013bce0: 7468 6520 7661 6c75 6520 6973 2030 2062 the value is 0 b │ │ │ │ -0013bcf0: 7920 2e2e 2e22 3e73 6f61 703a 3a62 696e y ...">soap::bin │ │ │ │ -0013bd00: 645f 666c 6167 733c 2f61 3e3c 2f63 6f64 d_flags = SO_RE │ │ │ │ -0013bd20: 5553 4550 4f52 543c 2f63 6f64 653e 2020 USEPORT │ │ │ │ -0013bd30: 203c 2f74 643e 3c74 6420 636c 6173 733d enables │ │ │ │ -0013bd60: 6475 706c 6963 6174 6520 6164 6472 6573 duplicate addres │ │ │ │ -0013bd70: 7320 616e 6420 706f 7274 2062 696e 6469 s and port bindi │ │ │ │ -0013bd80: 6e67 7320 2020 3c2f 7464 3e3c 2f74 723e ngs
    .

    For │ │ │ │ -0013bda0: 2065 7861 6d70 6c65 2c20 7768 656e 203c example, when < │ │ │ │ -0013bdb0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -0013be70: 703a 3a61 6363 6570 745f 666c 6167 733c p::accept_flags< │ │ │ │ -0013be80: 2f61 3e3c 2f63 6f64 653e 2069 7320 7365 /a> is se │ │ │ │ -0013be90: 7420 746f 203c 636f 6465 3e28 534f 5f4e t to (SO_N │ │ │ │ -0013bea0: 4f53 4947 5049 5045 207c 2053 4f5f 4c49 OSIGPIPE | SO_LI │ │ │ │ -0013beb0: 4e47 4552 293c 2f63 6f64 653e 2074 6869 NGER) thi │ │ │ │ -0013bec0: 7320 6469 7361 626c 6573 2053 4947 5049 s disables SIGPI │ │ │ │ -0013bed0: 5045 2073 6967 6e61 6c73 2061 6e64 2073 PE signals and s │ │ │ │ -0013bee0: 6574 206c 696e 6765 7220 7469 6d65 2076 et linger time v │ │ │ │ -0013bef0: 616c 7565 2067 6976 656e 2062 7920 3c63 alue given by soap │ │ │ │ -0013bfc0: 3a3a 6c69 6e67 6572 5f74 696d 653c 2f61 ::linger_time, which │ │ │ │ -0013bfe0: 6973 207a 6572 6f20 6279 2064 6566 6175 is zero by defau │ │ │ │ -0013bff0: 6c74 2e3c 2f70 3e0a 3c70 3e54 6865 203c lt.

    .

    The < │ │ │ │ -0013c000: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -0013c0c0: 703a 3a73 6f63 6b65 745f 666c 6167 733c p::socket_flags< │ │ │ │ -0013c0d0: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte │ │ │ │ -0013c0e0: 7874 2066 6c61 6720 6361 6e20 6265 2075 xt flag can be u │ │ │ │ -0013c0f0: 7365 6420 746f 2070 6173 7320 6f70 7469 sed to pass opti │ │ │ │ -0013c100: 6f6e 7320 746f 2074 6865 203c 636f 6465 ons to the <sys/socket. │ │ │ │ -0013c120: 6826 6774 3b3c 2f63 6f64 653e 203c 636f h> send, │ │ │ │ -0013c140: 3c63 6f64 653e 7365 6e64 746f 3c2f 636f sendto, recv< │ │ │ │ -0013c160: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and recvfrom calls made by │ │ │ │ -0013c190: 7468 6520 656e 6769 6e65 2c20 7468 6f75 the engine, thou │ │ │ │ -0013c1a0: 6768 2073 6f6d 6520 6f70 7469 6f6e 7320 gh some options │ │ │ │ -0013c1b0: 6d61 7920 6e6f 7420 6265 2061 7070 6c69 may not be appli │ │ │ │ -0013c1c0: 6361 626c 6520 746f 2079 6f75 7220 6f70 cable to your op │ │ │ │ -0013c1d0: 6572 6174 696e 6720 7379 7374 656d 3a3c erating system:< │ │ │ │ -0013c1e0: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>.. │ │ │ │ -0013c220: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b ... │ │ │ │ -0013c420: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ -0013c5c0: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    context flag │ │ │ │ -0013c250: 7769 7468 2073 656e 742f 7265 6376 2066 with sent/recv f │ │ │ │ -0013c260: 6c61 6773 2020 203c 2f74 683e 3c74 6820 lags re │ │ │ │ -0013c290: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult
    soap::socket │ │ │ │ -0013c3b0: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags = MSG_NO │ │ │ │ -0013c3d0: 5349 474e 414c 3c2f 636f 6465 3e20 2020 SIGNAL │ │ │ │ -0013c3e0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 disables │ │ │ │ -0013c410: 5349 4750 4950 4520 2020 203c 2f74 643e SIGPIPE
    │ │ │ │ -0013c470: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so │ │ │ │ -0013c530: 636b 6574 5f66 6c61 6773 3c2f 613e 3c2f cket_flags = MS │ │ │ │ -0013c550: 475f 444f 4e54 524f 5554 453c 2f63 6f64 G_DONTROUTE enab │ │ │ │ -0013c590: 6c65 7320 726f 7574 696e 6720 6279 7061 les routing bypa │ │ │ │ -0013c5a0: 7373 2066 6f72 206f 7574 676f 696e 6720 ss for outgoing │ │ │ │ -0013c5b0: 6d65 7373 6167 6573 2020 203c 2f74 643e messages
    .< │ │ │ │ -0013c5d0: 703e 4675 7274 6865 726d 6f72 652c 2074 p>Furthermore, t │ │ │ │ -0013c5e0: 6865 203c 636f 6465 3e73 6574 736f 636b he setsock │ │ │ │ -0013c5f0: 6f70 743c 2f63 6f64 653e 206c 6576 656c opt level │ │ │ │ -0013c600: 203c 636f 6465 3e53 4f4c 5f53 4f43 4b45 SOL_SOCKE │ │ │ │ -0013c610: 543c 2f63 6f64 653e 206f 7074 696f 6e73 T options │ │ │ │ -0013c620: 203c 636f 6465 3e53 4f5f 534e 4442 5546 SO_SNDBUF │ │ │ │ -0013c630: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and SO_RCVBUF are set the e │ │ │ │ -0013c660: 6e67 696e 6520 7768 656e 203c 636f 6465 ngine when
    soap::sn │ │ │ │ -0013c720: 6462 7566 3c2f 613e 3c2f 636f 6465 3e20 dbuf │ │ │ │ -0013c730: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::rcvbuf are set │ │ │ │ -0013c800: 2074 6f20 6120 6e6f 6e7a 6572 6f20 7661 to a nonzero va │ │ │ │ -0013c810: 6c75 652e 2054 6865 2064 6566 6175 6c74 lue. The default │ │ │ │ -0013c820: 2076 616c 7565 2069 7320 3c63 6f64 653e value is │ │ │ │ -0013c830: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN, which is th │ │ │ │ -0013c850: 6520 7361 6d65 2073 697a 6520 7573 6564 e same size used │ │ │ │ -0013c860: 2062 7920 7468 6520 696e 7465 726e 616c by the internal │ │ │ │ -0013c870: 2062 7566 6665 7220 3c63 6f64 653e 3c61 buffer soap::buf< │ │ │ │ -0013c940: 2f61 3e3c 2f63 6f64 653e 2074 6f20 7365 /a> to se │ │ │ │ -0013c950: 6e64 2061 6e64 2072 6563 6569 7665 206d nd and receive m │ │ │ │ -0013c960: 6573 7361 6765 732e 2041 207a 6572 6f20 essages. A zero │ │ │ │ -0013c970: 7661 6c75 6520 6f6d 6974 7320 7468 6520 value omits the │ │ │ │ -0013c980: 696e 7465 726e 616c 203c 636f 6465 3e73 internal s │ │ │ │ -0013c990: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt │ │ │ │ -0013c9a0: 2063 616c 6c20 746f 2073 6574 2074 6865 call to set the │ │ │ │ -0013c9b0: 7365 206f 7074 696f 6e73 2e20 5365 7474 se options. Sett │ │ │ │ -0013c9c0: 696e 6720 7468 6573 6520 7661 6c75 6573 ing these values │ │ │ │ -0013c9d0: 2074 6f20 7a65 726f 2061 6374 6976 6174 to zero activat │ │ │ │ -0013c9e0: 6573 2061 7574 6f2d 7475 6e69 6e67 2077 es auto-tuning w │ │ │ │ -0013c9f0: 6974 6820 4c69 6e75 7820 322e 3420 616e ith Linux 2.4 an │ │ │ │ -0013ca00: 6420 6772 6561 7465 722e 3c2f 703e 0a3c d greater.

    .< │ │ │ │ -0013ca10: 703e 5468 6520 3c63 6f64 653e 7365 7473 p>The sets │ │ │ │ -0013ca20: 6f63 6b6f 7074 3c2f 636f 6465 3e20 6c65 ockopt le │ │ │ │ -0013ca30: 7665 6c20 3c63 6f64 653e 534f 4c5f 534f vel SOL_SO │ │ │ │ -0013ca40: 434b 4554 3c2f 636f 6465 3e20 6f70 7469 CKET opti │ │ │ │ -0013ca50: 6f6e 203c 636f 6465 3e53 4f5f 4b45 4550 on SO_KEEP │ │ │ │ -0013ca60: 414c 4956 453c 2f63 6f64 653e 2069 7320 ALIVE is │ │ │ │ -0013ca70: 7365 7420 7768 656e 206b 6565 702d 616c set when keep-al │ │ │ │ -0013ca80: 6976 6520 6973 2065 6e61 626c 6564 2077 ive is enabled w │ │ │ │ -0013ca90: 6974 6820 636f 6e74 6578 7420 666c 6167 ith context flag │ │ │ │ -0013caa0: 203c 636f 6465 3e23 534f 4150 5f49 4f5f #SOAP_IO_ │ │ │ │ -0013cab0: 4b45 4550 414c 4956 453c 2f63 6f64 653e KEEPALIVE │ │ │ │ -0013cac0: 206f 7220 7768 656e 203c 636f 6465 3e3c or when < │ │ │ │ -0013cad0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0013cae0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -0013caf0: 6d6c 2361 6638 6638 3061 3762 6438 6330 ml#af8f80a7bd8c0 │ │ │ │ -0013cb00: 3933 3335 6336 6662 3833 3661 3631 3232 9335c6fb836a6122 │ │ │ │ -0013cb10: 3331 6262 2220 7469 746c 653d 2255 7365 31bb" title="Use │ │ │ │ -0013cb20: 722d 6465 6669 6e61 626c 6520 7661 6c75 r-definable valu │ │ │ │ -0013cb30: 6520 746f 2073 6574 2053 4f5f 4b45 4550 e to set SO_KEEP │ │ │ │ -0013cb40: 414c 4956 4520 7365 7473 6f63 6b6f 7074 ALIVE setsockopt │ │ │ │ -0013cb50: 2028 3020 6279 2064 6566 6175 6c74 2075 (0 by default u │ │ │ │ -0013cb60: 6e6c 6573 7320 7468 6520 2353 4f41 505f nless the #SOAP_ │ │ │ │ -0013cb70: 494f 5f4b 4545 5041 4c49 5645 206d 6f64 IO_KEEPALIVE mod │ │ │ │ -0013cb80: 6520 2e2e 2e22 3e73 6f61 703a 3a74 6370 e ...">soap::tcp │ │ │ │ -0013cb90: 5f6b 6565 705f 616c 6976 653c 2f61 3e3c _keep_alive< │ │ │ │ -0013cba0: 2f63 6f64 653e 2069 7320 6e6f 6e7a 6572 /code> is nonzer │ │ │ │ -0013cbb0: 6f2e 2057 6974 6820 3c63 6f64 653e 3c61 o. With soap::tcp_ │ │ │ │ -0013cc80: 6b65 6570 5f61 6c69 7665 3c2f 613e 3c2f keep_alive additional │ │ │ │ -0013cca0: 206f 7074 696f 6e73 2063 616e 2062 6520 options can be │ │ │ │ -0013ccb0: 7370 6563 6966 6965 6420 7769 7468 203c specified with < │ │ │ │ -0013ccc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::tcp_ke │ │ │ │ -0013cd70: 6570 5f69 646c 653c 2f61 3e3c 2f63 6f64 ep_idle, soap:: │ │ │ │ -0013ce30: 7463 705f 6b65 6570 5f69 6e74 766c 3c2f tcp_keep_intvl, and < │ │ │ │ -0013ce50: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::tcp_kee │ │ │ │ -0013cf00: 705f 636e 743c 2f61 3e3c 2f63 6f64 653e p_cnt │ │ │ │ -0013cf10: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.
    struct < │ │ │ │ -0013cf70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0013cf80: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0013cf90: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -0013cfa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -0013cfd0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new< │ │ │ │ -0013d030: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    .< │ │ │ │ -0013d050: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0013d060: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0013d070: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -0013d080: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;tcp_ │ │ │ │ -0013d0d0: 6b65 6570 5f61 6c69 7665 3c2f 613e 203d keep_alive = │ │ │ │ -0013d0e0: 2031 3b20 2020 3c73 7061 6e20 636c 6173 1; // s │ │ │ │ -0013d100: 6574 736f 636b 6f70 7420 534f 5f4b 4545 etsockopt SO_KEE │ │ │ │ -0013d110: 5041 4c49 5645 3c2f 7370 616e 3e3c 2f64 PALIVE.
    soa │ │ │ │ -0013d160: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->tcp_keep_idle │ │ │ │ -0013d1c0: 3c2f 613e 203d 2033 303b 2020 203c 7370 = 30; // time in se │ │ │ │ -0013d1f0: 636f 6e64 7320 7468 6520 636f 6e6e 6563 conds the connec │ │ │ │ -0013d200: 7469 6f6e 206e 6565 6473 2074 6f20 7265 tion needs to re │ │ │ │ -0013d210: 6d61 696e 2069 646c 6520 6265 666f 7265 main idle before │ │ │ │ -0013d220: 2054 4350 2073 7461 7274 7320 7365 6e64 TCP starts send │ │ │ │ -0013d230: 696e 6720 6b65 6570 616c 6976 6520 7072 ing keepalive pr │ │ │ │ -0013d240: 6f62 6573 3c2f 7370 616e 3e3c 2f64 6976 obes
    .
    soap< │ │ │ │ -0013d290: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->tcp_keep_intvl< │ │ │ │ -0013d2f0: 2f61 3e20 3d20 3132 303b 203c 7370 616e /a> = 120; // time in seco │ │ │ │ -0013d320: 6e64 7320 6265 7477 6565 6e20 696e 6469 nds between indi │ │ │ │ -0013d330: 7669 6475 616c 206b 6565 7061 6c69 7665 vidual keepalive │ │ │ │ -0013d340: 2070 726f 6265 733c 2f73 7061 6e3e 3c2f probes.
    so │ │ │ │ -0013d390: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->tcp_keep_cnt │ │ │ │ -0013d3f0: 3c2f 613e 203d 2035 3b20 2020 2020 3c73 = 5; // maximum n │ │ │ │ -0013d420: 756d 6265 7220 6f66 206b 6565 7061 6c69 umber of keepali │ │ │ │ -0013d430: 7665 2070 726f 6265 7320 5443 5020 7368 ve probes TCP sh │ │ │ │ -0013d440: 6f75 6c64 2073 656e 6420 6265 666f 7265 ould send before │ │ │ │ -0013d450: 2064 726f 7070 696e 6720 7468 6520 636f dropping the co │ │ │ │ -0013d460: 6e6e 6563 7469 6f6e 3c2f 7370 616e 3e3c nnection< │ │ │ │ -0013d470: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -0013d4c0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -0013d4d0: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ -0013d510: 6f61 703a 3a74 6370 5f6b 6565 705f 636e oap::tcp_keep_cn │ │ │ │ -0013d520: 743c 2f61 3e3c 2f64 6976 3e3c 6469 7620 t
    u │ │ │ │ -0013d540: 6e73 6967 6e65 6420 696e 7420 7463 705f nsigned int tcp_ │ │ │ │ -0013d550: 6b65 6570 5f63 6e74 3c2f 6469 763e 3c64 keep_cnt
    User-definable │ │ │ │ -0013d580: 7661 6c75 6520 746f 2073 6574 2054 4350 value to set TCP │ │ │ │ -0013d590: 5f4b 4545 5043 4e54 2073 6574 736f 636b _KEEPCNT setsock │ │ │ │ -0013d5a0: 6f70 7420 2874 6865 2076 616c 7565 2069 opt (the value i │ │ │ │ -0013d5b0: 7320 3020 6279 2064 6566 6175 6c74 293c s 0 by default)< │ │ │ │ -0013d5c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -0013d5e0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -0013d5f0: 6170 322e 683a 3335 3834 3c2f 6469 763e ap2.h:3584
    │ │ │ │ -0013d600: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0013d650: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 unsigned int t │ │ │ │ -0013d6e0: 6370 5f6b 6565 705f 696e 7476 6c3c 2f64 cp_keep_intvl
    User-defin │ │ │ │ -0013d710: 6162 6c65 2076 616c 7565 2074 6f20 7365 able value to se │ │ │ │ -0013d720: 7420 5443 505f 4b45 4550 494e 5456 4c20 t TCP_KEEPINTVL │ │ │ │ -0013d730: 7365 7473 6f63 6b6f 7074 2028 7468 6520 setsockopt (the │ │ │ │ -0013d740: 7661 6c75 6520 6973 2030 2062 7920 6465 value is 0 by de │ │ │ │ -0013d750: 6661 756c 7429 3c2f 6469 763e 3c64 6976 fault)
    < │ │ │ │ -0013d770: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:355 │ │ │ │ -0013d790: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 9
    .
    soap::tcp │ │ │ │ -0013d840: 5f6b 6565 705f 6964 6c65 3c2f 613e 3c2f _keep_idle
    unsigned │ │ │ │ -0013d870: 2069 6e74 2074 6370 5f6b 6565 705f 6964 int tcp_keep_id │ │ │ │ -0013d880: 6c65 3c2f 6469 763e 3c64 6976 2063 6c61 le
    User- │ │ │ │ -0013d8a0: 6465 6669 6e61 626c 6520 7661 6c75 6520 definable value │ │ │ │ -0013d8b0: 746f 2073 6574 2054 4350 5f4b 4545 5049 to set TCP_KEEPI │ │ │ │ -0013d8c0: 444c 4520 7365 7473 6f63 6b6f 7074 2028 DLE setsockopt ( │ │ │ │ -0013d8d0: 7468 6520 7661 6c75 6520 6973 2030 2062 the value is 0 b │ │ │ │ -0013d8e0: 7920 6465 6661 756c 7429 3c2f 6469 763e y default)
    │ │ │ │ -0013d8f0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -0013d910: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -0013d920: 3a33 3533 343c 2f64 6976 3e3c 2f64 6976 :3534
    .
    < │ │ │ │ -0013d990: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ -0013d9a0: 6170 2e68 746d 6c23 6166 3866 3830 6137 ap.html#af8f80a7 │ │ │ │ -0013d9b0: 6264 3863 3039 3333 3563 3666 6238 3336 bd8c09335c6fb836 │ │ │ │ -0013d9c0: 6136 3132 3233 3162 6222 3e73 6f61 703a a612231bb">soap: │ │ │ │ -0013d9d0: 3a74 6370 5f6b 6565 705f 616c 6976 653c :tcp_keep_alive< │ │ │ │ -0013d9e0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    int │ │ │ │ -0013da00: 2074 6370 5f6b 6565 705f 616c 6976 653c tcp_keep_alive< │ │ │ │ -0013da10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def │ │ │ │ -0013da30: 696e 6162 6c65 2076 616c 7565 2074 6f20 inable value to │ │ │ │ -0013da40: 7365 7420 534f 5f4b 4545 5041 4c49 5645 set SO_KEEPALIVE │ │ │ │ -0013da50: 2073 6574 736f 636b 6f70 7420 2830 2062 setsockopt (0 b │ │ │ │ -0013da60: 7920 6465 6661 756c 7420 756e 6c65 7373 y default unless │ │ │ │ -0013da70: 2074 6865 2023 534f 4150 5f49 4f5f 4b45 the #SOAP_IO_KE │ │ │ │ -0013da80: 4550 414c 4956 4520 6d6f 6465 202e 2e2e EPALIVE mode ... │ │ │ │ -0013da90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -0013dab0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -0013dac0: 6f61 7032 2e68 3a33 3530 393c 2f64 6976 oap2.h:3509
    .
    < │ │ │ │ -0013daf0: 703e 466f 7220 5544 5020 6d65 7373 6167 p>For UDP messag │ │ │ │ -0013db00: 696e 672c 2075 7365 203c 636f 6465 3e23 ing, use # │ │ │ │ -0013db10: 534f 4150 5f49 4f5f 5544 503c 2f63 6f64 SOAP_IO_UDP. See also Sec │ │ │ │ -0013db30: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion SOAP/XM │ │ │ │ -0013db60: 4c20 6f76 6572 2055 4450 3c2f 613e 2e20 L over UDP. │ │ │ │ -0013db70: 5468 6520 636f 6e74 6578 7420 666c 6167 The context flag │ │ │ │ -0013db80: 7320 7468 6174 2063 616e 2062 6520 7365 s that can be se │ │ │ │ -0013db90: 7420 6174 2074 6865 2063 6c69 656e 7420 t at the client │ │ │ │ -0013dba0: 7369 6465 2066 6f72 2055 4450 206d 6573 side for UDP mes │ │ │ │ -0013dbb0: 7361 6769 6e67 2061 7265 203c 636f 6465 saging are soap:: │ │ │ │ -0013dc70: 6970 7634 5f6d 756c 7469 6361 7374 5f69 ipv4_multicast_i │ │ │ │ -0013dc80: 663c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 f, soa │ │ │ │ -0013dd40: 703a 3a69 7076 345f 6d75 6c74 6963 6173 p::ipv4_multicas │ │ │ │ -0013dd50: 745f 7474 6c3c 2f61 3e3c 2f63 6f64 653e t_ttl │ │ │ │ -0013dd60: 2c20 616e 6420 3c63 6f64 653e 3c61 2063 , and soap::ipv6_mult │ │ │ │ -0013de10: 6963 6173 745f 6966 3c2f 613e 3c2f 636f icast_if:

    .....< │ │ │ │ -0013dff0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -0013e000: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -0013e010: 3e73 6574 203c 636f 6465 3e73 6574 736f >set setso │ │ │ │ -0013e020: 636b 6f70 743c 2f63 6f64 653e 206c 6576 ckopt lev │ │ │ │ -0013e030: 656c 203c 636f 6465 3e49 5050 524f 544f el IPPROTO │ │ │ │ -0013e040: 5f49 503c 2f63 6f64 653e 2074 6f20 3c63 _IP to IP_MULTICAST │ │ │ │ -0013e060: 5f49 463c 2f63 6f64 653e 2077 6974 6820 _IF with │ │ │ │ -0013e070: 7661 6c75 6520 3c63 6f64 653e 3c61 2063 value soap::ipv4_ │ │ │ │ -0013e130: 6d75 6c74 6963 6173 745f 6966 3c2f 613e multicast_if │ │ │ │ -0013e140: 3c2f 636f 6465 3e20 7768 656e 206e 6f6e when non │ │ │ │ -0013e150: 2d4e 554c 4c20 2020 203c 2f74 643e 3c2f -NULL .... │ │ │ │ -0013e500: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    .... Back to t │ │ │ │ -0013e650: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -0013e660: 3c2f 613e 3c2f 703e 0a3c 6831 3e3c 6120

    .

    .Run-time error │ │ │ │ -0013e6a0: 2063 6f64 6573 3c2f 6831 3e0a 3c70 3e53 codes

    .

    S │ │ │ │ -0013e6b0: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code │ │ │ │ -0013e6c0: 7320 6172 6520 696e 7465 6765 7220 7661 s are integer va │ │ │ │ -0013e6d0: 6c75 6573 2c20 7768 6963 6820 6172 6520 lues, which are │ │ │ │ -0013e6e0: 7265 7475 726e 6564 2062 7920 7468 6520 returned by the │ │ │ │ -0013e6f0: 6753 4f41 5020 4150 4920 6675 6e63 7469 gSOAP API functi │ │ │ │ -0013e700: 6f6e 732e 2054 6865 2066 756c 6c20 6c69 ons. The full li │ │ │ │ -0013e710: 7374 206f 6620 3c63 6f64 653e 3c61 2063 st of soa │ │ │ │ -0013e7d0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error codes │ │ │ │ -0013e7f0: 6973 206c 6973 7465 6420 6265 6c6f 773a is listed below: │ │ │ │ -0013e800: 3c2f 703e 0a3c 7461 626c 6520 636c 6173

    .
    context │ │ │ │ -0013de90: 666c 6167 2020 203c 2f74 683e 3c74 6820 flag re │ │ │ │ -0013dec0: 7375 6c74 2020 2020 3c2f 7468 3e3c 2f74 sult
    soap::ipv4_ │ │ │ │ -0013dfd0: 6d75 6c74 6963 6173 745f 6966 3c2f 613e multicast_if │ │ │ │ -0013dfe0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    soap::ipv │ │ │ │ -0013e260: 345f 6d75 6c74 6963 6173 745f 7474 6c3c 4_multicast_ttl< │ │ │ │ -0013e270: 2f61 3e3c 2f63 6f64 653e 2020 203c 2f74 /a> set se │ │ │ │ -0013e2b0: 7473 6f63 6b6f 7074 3c2f 636f 6465 3e20 tsockopt │ │ │ │ -0013e2c0: 6c65 7665 6c20 3c63 6f64 653e 4950 5052 level IPPR │ │ │ │ -0013e2d0: 4f54 4f5f 4950 3c2f 636f 6465 3e20 746f OTO_IP to │ │ │ │ -0013e2e0: 203c 636f 6465 3e49 505f 4d55 4c54 4943 IP_MULTIC │ │ │ │ -0013e2f0: 4153 545f 5454 4c3c 2f63 6f64 653e 2077 AST_TTL w │ │ │ │ -0013e300: 6974 6820 7661 6c75 6520 3c63 6f64 653e ith value │ │ │ │ -0013e310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::i │ │ │ │ -0013e3c0: 7076 345f 6d75 6c74 6963 6173 745f 7474 pv4_multicast_tt │ │ │ │ -0013e3d0: 6c3c 2f61 3e3c 2f63 6f64 653e 2077 6865 l whe │ │ │ │ -0013e3e0: 6e20 6e6f 6e7a 6572 6f20 2020 203c 2f74 n nonzero
    soap::ipv6 │ │ │ │ -0013e4e0: 5f6d 756c 7469 6361 7374 5f69 663c 2f61 _multicast_if set sock │ │ │ │ -0013e530: 6164 6472 5f69 6e36 3a3a 7369 6e36 5f73 addr_in6::sin6_s │ │ │ │ -0013e540: 636f 7065 5f69 643c 2f63 6f64 653e 2074 cope_id t │ │ │ │ -0013e550: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soa │ │ │ │ -0013e5f0: 703a 3a69 7076 365f 6d75 6c74 6963 6173 p::ipv6_multicas │ │ │ │ -0013e600: 745f 6966 3c2f 613e 3c2f 636f 6465 3e20 t_if │ │ │ │ -0013e610: 7768 656e 206e 6f6e 7a65 726f 2020 203c when nonzero < │ │ │ │ -0013e620: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    ........ │ │ │ │ -0013ea80: 3c63 6f64 653e 2353 4f41 505f 4441 5441 #SOAP_DATA │ │ │ │ -0013ea90: 454e 434f 4449 4e47 554e 4b4e 4f57 4e3c ENCODINGUNKNOWN< │ │ │ │ -0013eaa0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> │ │ │ │ -0013ead0: 534f 4150 2031 2e32 2044 6174 6145 6e63 SOAP 1.2 DataEnc │ │ │ │ -0013eae0: 6f64 696e 6755 6e6b 6e6f 776e 2066 6175 odingUnknown fau │ │ │ │ -0013eaf0: 6c74 2020 2020 3c2f 7464 3e3c 2f74 723e lt │ │ │ │ -0013eb00: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .... │ │ │ │ -0013ee10: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...< │ │ │ │ -0013ef00: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ -0013ef10: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ -0013ef20: 3c74 6420 636c 6173 733d 226d 6172 6b64 .................... │ │ │ │ -0013f9f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 . │ │ │ │ -0013fc30: 3c74 7220 636c 6173 733d 226d 6172 6b64 ... │ │ │ │ -0013fde0: 3c63 6f64 653e 2353 4f41 505f 4854 5450 #SOAP_HTTP │ │ │ │ -0013fdf0: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR │ │ │ │ -0013fe00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..< │ │ │ │ -0013ff30: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..< │ │ │ │ -0013ffe0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...... │ │ │ │ -00140260: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ....< │ │ │ │ -00140380: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00140390: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -001403a0: 3e4d 494d 4520 6174 7461 6368 6d65 6e74 >MIME attachment │ │ │ │ -001403b0: 2068 6173 206e 6f20 6872 6566 2066 726f has no href fro │ │ │ │ -001403c0: 6d20 534f 4150 2062 6f64 7920 616e 6420 m SOAP body and │ │ │ │ -001403d0: 6e6f 204d 494d 4520 6361 6c6c 6261 636b no MIME callback │ │ │ │ -001403e0: 7320 7765 7265 2064 6566 696e 6564 2074 s were defined t │ │ │ │ -001403f0: 6f20 7361 7665 2074 6865 2061 7474 6163 o save the attac │ │ │ │ -00140400: 686d 656e 7420 2020 203c 2f74 643e 3c2f hment ..< │ │ │ │ -00140560: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>... │ │ │ │ -00140650: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ -00140670: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b ...< │ │ │ │ -001407c0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -001407d0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -001407e0: 3e58 4d4c 206e 616d 6573 7061 6365 206e >XML namespace n │ │ │ │ -001407f0: 616d 6520 6d69 736d 6174 6368 2076 616c ame mismatch val │ │ │ │ -00140800: 6964 6174 696f 6e20 6572 726f 7220 2020 idation error │ │ │ │ -00140810: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ....... │ │ │ │ -00140aa0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .....< │ │ │ │ -00140cd0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -00140ce0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -00140cf0: 3e58 4d4c 2065 6c65 6d65 6e74 206d 696e >XML element min │ │ │ │ -00140d00: 4f63 6375 7273 206f 7220 6d61 784f 6363 Occurs or maxOcc │ │ │ │ -00140d10: 7572 7320 7661 6c69 6461 7469 6f6e 2065 urs validation e │ │ │ │ -00140d20: 7272 6f72 206f 7220 3c63 6f64 653e 2353 rror or #S │ │ │ │ -00140d30: 4f41 505f 4d41 584f 4343 5552 533c 2f63 OAP_MAXOCCURS exceeded │ │ │ │ -00140d50: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ... │ │ │ │ -00140fb0: 3c74 7220 636c 6173 733d 226d 6172 6b64 . │ │ │ │ -00141070: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ -001410e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ........ │ │ │ │ -001415a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...< │ │ │ │ -00141690: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ -001416a0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ -001416b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ -00141780: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ -001418a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...... │ │ │ │ -00141af0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ...... │ │ │ │ -00141e10: 3c63 6f64 653e 2353 4f41 505f 5a4c 4942 #SOAP_ZLIB │ │ │ │ -00141e20: 5f45 5252 4f52 3c2f 636f 6465 3e20 2020 _ERROR │ │ │ │ -00141e30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 ..

    A status c │ │ │ │ -00141e90: 6f64 6520 6f66 203c 636f 6465 3e23 534f ode of #SO │ │ │ │ -00141ea0: 4150 5f4f 4b3c 2f63 6f64 653e 2028 7a65 AP_OK (ze │ │ │ │ -00141eb0: 726f 2920 6973 2072 6574 7572 6e65 6420 ro) is returned │ │ │ │ -00141ec0: 6279 2061 2067 534f 4150 2041 5049 2066 by a gSOAP API f │ │ │ │ -00141ed0: 756e 6374 696f 6e20 7768 656e 2074 6865 unction when the │ │ │ │ -00141ee0: 2066 756e 6374 696f 6e20 6361 6c6c 2077 function call w │ │ │ │ -00141ef0: 6173 2073 7563 6365 7373 6675 6c2c 206f as successful, o │ │ │ │ -00141f00: 7468 6572 7769 7365 2061 206e 6f6e 2d7a therwise a non-z │ │ │ │ -00141f10: 6572 6f20 6572 726f 7220 636f 6465 2069 ero error code i │ │ │ │ -00141f20: 7320 7265 7475 726e 6564 2e20 5468 6520 s returned. The │ │ │ │ -00141f30: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod │ │ │ │ -00141f40: 6520 6973 2061 6c73 6f20 7374 6f72 6564 e is also stored │ │ │ │ -00141f50: 2069 6e20 7468 6520 6375 7272 656e 7420 in the current │ │ │ │ -00141f60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context as soap::e │ │ │ │ -00142080: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e2e rror. │ │ │ │ -00142090: 2046 6f72 2049 4f20 616e 6420 736f 636b For IO and sock │ │ │ │ -001420a0: 6574 2d72 656c 6174 6564 2065 7272 6f72 et-related error │ │ │ │ -001420b0: 732c 2061 6c73 6f20 7468 6520 3c63 6f64 s, also the soap::errnum variab │ │ │ │ -00142160: 6c65 2069 7320 7365 7420 746f 2074 6865 le is set to the │ │ │ │ -00142170: 203c 636f 6465 3e65 7272 6e6f 3c2f 636f errno value of the │ │ │ │ -00142190: 2073 7973 7465 6d20 6572 726f 7220 666f system error fo │ │ │ │ -001421a0: 7220 6578 616d 706c 6520 7768 656e 2061 r example when a │ │ │ │ -001421b0: 203c 636f 6465 3e23 534f 4150 5f45 4f46 #SOAP_EOF │ │ │ │ -001421c0: 3c2f 636f 6465 3e20 6572 726f 7220 6f63 error oc │ │ │ │ -001421d0: 6375 7272 6564 2e3c 2f70 3e0a 3c70 3e54 curred.

    .

    T │ │ │ │ -001421e0: 6f20 6469 7370 6c61 7920 7468 6520 6572 o display the er │ │ │ │ -001421f0: 726f 722c 2075 7365 203c 636f 6465 3e3c ror, use < │ │ │ │ -00142200: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00142210: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -00142220: 5f66 6175 6c74 2e68 746d 6c23 6761 3933 _fault.html#ga93 │ │ │ │ -00142230: 3161 3461 6236 6466 3235 3533 6234 3861 1a4ab6df2553b48a │ │ │ │ -00142240: 3063 3237 3066 3861 3061 3838 6166 2220 0c270f8a0a88af" │ │ │ │ -00142250: 7469 746c 653d 2250 7269 6e74 2065 7272 title="Print err │ │ │ │ -00142260: 6f72 206d 6573 7361 6765 206f 6e20 7468 or message on th │ │ │ │ -00142270: 6520 7370 6563 6966 6965 6420 6f75 7470 e specified outp │ │ │ │ -00142280: 7574 2e22 3e73 6f61 705f 7072 696e 745f ut.">soap_print_ │ │ │ │ -00142290: 6661 756c 7428 7374 7275 6374 2073 6f61 fault(struct soa │ │ │ │ -001422a0: 7020 2a73 6f61 702c 2046 494c 4520 2a66 p *soap, FILE *f │ │ │ │ -001422b0: 6429 3c2f 613e 3c2f 636f 6465 3e20 7768 d) wh │ │ │ │ -001422c0: 6572 6520 7468 6520 6375 7272 656e 7420 ere the current │ │ │ │ -001422d0: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of < │ │ │ │ -001422e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001422f0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -00142300: 6d6c 2361 6238 3566 3564 3432 3730 3239 ml#ab85f5d427029 │ │ │ │ -00142310: 3633 6431 3365 6135 3430 6264 3938 3736 63d13ea540bd9876 │ │ │ │ -00142320: 6536 6432 2220 7469 746c 653d 2254 6865 e6d2" title="The │ │ │ │ -00142330: 2073 6f61 7020 636f 6e74 6578 7420 736f soap context so │ │ │ │ -00142340: 6170 5f73 7461 7475 7320 2869 6e74 2920 ap_status (int) │ │ │ │ -00142350: 6572 726f 7220 636f 6465 206f 6620 7468 error code of th │ │ │ │ -00142360: 6520 6c61 7374 206f 7065 7261 7469 6f6e e last operation │ │ │ │ -00142370: 206f 7220 2353 4f41 505f 4f4b 2028 7a65 or #SOAP_OK (ze │ │ │ │ -00142380: 726f 2922 3e73 6f61 703a 3a65 7272 6f72 ro)">soap::error │ │ │ │ -00142390: 3c2f 613e 3c2f 636f 6465 3e20 6973 2075 is u │ │ │ │ -001423a0: 7365 6420 6279 2074 6865 2066 756e 6374 sed by the funct │ │ │ │ -001423b0: 696f 6e20 746f 2070 7269 6e74 2074 6865 ion to print the │ │ │ │ -001423c0: 2065 7272 6f72 2074 6f20 7468 6520 7370 error to the sp │ │ │ │ -001423d0: 6563 6966 6965 6420 3c63 6f64 653e 6664 ecified fd │ │ │ │ -001423e0: 3c2f 636f 6465 3e20 6669 6c65 2e20 416c file. Al │ │ │ │ -001423f0: 7465 726e 6174 6976 656c 792c 2069 6e20 ternatively, in │ │ │ │ -00142400: 432b 2b20 796f 7520 6361 6e20 7573 6520 C++ you can use │ │ │ │ -00142410: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stream_f │ │ │ │ -001424b0: 6175 6c74 2873 7472 7563 7420 736f 6170 ault(struct soap │ │ │ │ -001424c0: 202a 736f 6170 2c20 7374 643a 3a6f 7374 *soap, std::ost │ │ │ │ -001424d0: 7265 616d 2661 6d70 3b20 6f73 293c 2f61 ream& os) to prin │ │ │ │ -001424f0: 7420 7468 6520 6572 726f 7220 6f6e 2074 t the error on t │ │ │ │ -00142500: 6865 2073 7065 6369 6669 6564 203c 636f he specified os out │ │ │ │ -00142520: 7075 7420 7374 7265 616d 2e3c 2f70 3e0a put stream.

    . │ │ │ │ -00142530: 3c70 3e54 6f20 6469 7370 6c61 7920 7468

    To display th │ │ │ │ -00142540: 6520 6c6f 6361 7469 6f6e 206f 6620 616e e location of an │ │ │ │ -00142550: 2058 4d4c 2070 6172 7369 6e67 2061 6e64 XML parsing and │ │ │ │ -00142560: 2076 616c 6964 6174 696f 6e20 6572 726f validation erro │ │ │ │ -00142570: 722c 2075 7365 203c 636f 6465 3e3c 6120 r, use soap_ │ │ │ │ -00142620: 7072 696e 745f 6661 756c 745f 6c6f 6361 print_fault_loca │ │ │ │ -00142630: 7469 6f6e 2873 7472 7563 7420 736f 6170 tion(struct soap │ │ │ │ -00142640: 202a 736f 6170 2c20 4649 4c45 202a 6664 *soap, FILE *fd │ │ │ │ -00142650: 293c 2f61 3e3c 2f63 6f64 653e 206f 7220 ) or │ │ │ │ -00142660: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stream_ │ │ │ │ -00142710: 6661 756c 745f 6c6f 6361 7469 6f6e 2873 fault_location(s │ │ │ │ -00142720: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -00142730: 2c20 7374 643a 3a6f 7374 7265 616d 2661 , std::ostream&a │ │ │ │ -00142740: 6d70 3b20 6f73 293c 2f61 3e3c 2f63 6f64 mp; os) to print part │ │ │ │ -00142760: 206f 6620 7468 6520 584d 4c20 7769 7468 of the XML with │ │ │ │ -00142770: 2074 6865 2065 7272 6f72 206c 6f63 6174 the error locat │ │ │ │ -00142780: 696f 6e20 6d61 726b 6564 2069 6e20 7468 ion marked in th │ │ │ │ -00142790: 6520 584d 4c20 6f75 7470 7574 2e3c 2f70 e XML output.

    .

    To save the │ │ │ │ -001427b0: 2065 7272 6f72 2069 6e20 6120 7374 7269 error in a stri │ │ │ │ -001427c0: 6e67 2062 7566 6665 7220 3c63 6f64 653e ng buffer │ │ │ │ -001427d0: 6275 665b 302e 2e2e 6c65 6e2d 315d 3c2f buf[0...len-1], use so │ │ │ │ -00142880: 6170 5f73 7072 696e 745f 6661 756c 7428 ap_sprint_fault( │ │ │ │ -00142890: 7374 7275 6374 2073 6f61 702a 2c20 6368 struct soap*, ch │ │ │ │ -001428a0: 6172 202a 6275 662c 2073 697a 655f 7420 ar *buf, size_t │ │ │ │ -001428b0: 6c65 6e29 3c2f 613e 3c2f 636f 6465 3e2c len), │ │ │ │ -001428c0: 2077 6865 7265 203c 636f 6465 3e62 7566 where buf │ │ │ │ -001428d0: 3c2f 636f 6465 3e20 6973 2070 6f70 756c is popul │ │ │ │ -001428e0: 6174 6564 2077 6974 6820 7468 6520 6661 ated with the fa │ │ │ │ -001428f0: 756c 7420 6d65 7373 6167 6520 7465 726d ult message term │ │ │ │ -00142900: 696e 6174 696e 6720 7769 7468 2061 203c inating with a < │ │ │ │ -00142910: 636f 6465 3e5c 303c 2f63 6f64 653e 2e3c code>\0.< │ │ │ │ -00142920: 2f70 3e0a 3c70 3e54 6f20 6465 7465 726d /p>.

    To determ │ │ │ │ -00142930: 696e 6520 7468 6520 7479 7065 206f 6620 ine the type of │ │ │ │ -00142940: 6572 726f 7220 7468 6174 206f 6363 7572 error that occur │ │ │ │ -00142950: 7265 642c 2075 7365 3a3c 2f70 3e3c 756c red, use:

    .

    A │ │ │ │ -00143600: 6e20 4854 5450 2073 7461 7475 7320 636f n HTTP status co │ │ │ │ -00143610: 6465 2069 7320 7265 7475 726e 6564 2077 de is returned w │ │ │ │ -00143620: 6865 6e20 7468 6520 636c 6965 6e74 2066 hen the client f │ │ │ │ -00143630: 6169 6c73 2074 6f20 636f 6e6e 6563 7420 ails to connect │ │ │ │ -00143640: 746f 2061 6e20 4854 5450 2073 6572 7665 to an HTTP serve │ │ │ │ -00143650: 7220 616e 6420 7468 6520 4854 5450 2073 r and the HTTP s │ │ │ │ -00143660: 6572 7665 7220 7265 7370 6f6e 7365 2077 erver response w │ │ │ │ -00143670: 6974 6820 616e 2065 7272 6f72 2e20 5468 ith an error. Th │ │ │ │ -00143680: 6520 6c69 7374 206f 6620 4854 5450 2073 e list of HTTP s │ │ │ │ -00143690: 7461 7475 7320 636f 6465 7320 6973 2067 tatus codes is g │ │ │ │ -001436a0: 6976 656e 2062 656c 6f77 3a3c 2f70 3e0a iven below:

    . │ │ │ │ -001436b0: 3c74 6162 6c65 2063 6c61 7373 3d22 6d61
    Error code │ │ │ │ -0013e870: 203c 2f74 683e 3c74 6820 636c 6173 733d Descript │ │ │ │ -0013e8a0: 696f 6e20 2020 203c 2f74 683e 3c2f 7472 ion
    #SOAP │ │ │ │ -0013e900: 5f4f 4b3c 2f63 6f64 653e 2020 203c 2f74 _OK No error (ze │ │ │ │ -0013e940: 726f 2920 2020 203c 2f74 643e 3c2f 7472 ro)
    #SOA │ │ │ │ -0013e9a0: 505f 434c 495f 4641 554c 543c 2f63 6f64 P_CLI_FAULT The │ │ │ │ -0013e9e0: 7365 7276 6963 6520 7265 7475 726e 6564 service returned │ │ │ │ -0013e9f0: 2061 2053 4f41 5020 312e 3120 636c 6965 a SOAP 1.1 clie │ │ │ │ -0013ea00: 6e74 2066 6175 6c74 202f 2053 4f41 5020 nt fault / SOAP │ │ │ │ -0013ea10: 312e 3220 7365 6e64 6572 2066 6175 6c74 1.2 sender fault │ │ │ │ -0013ea20: 2074 6f20 7468 6520 636c 6965 6e74 2020 to the client │ │ │ │ -0013ea30: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    #SOAP │ │ │ │ -0013eb50: 5f44 454c 5f4d 4554 484f 443c 2f63 6f64 _DEL_METHOD An H │ │ │ │ -0013eb90: 5454 5020 4445 4c45 5445 2072 6571 7565 TTP DELETE reque │ │ │ │ -0013eba0: 7374 2077 6173 2072 6563 6569 7665 6420 st was received │ │ │ │ -0013ebb0: 6279 2074 6865 2073 6572 7669 6365 2062 by the service b │ │ │ │ -0013ebc0: 7574 2074 6865 2044 454c 4554 4520 7265 ut the DELETE re │ │ │ │ -0013ebd0: 7175 6573 7420 6361 6c6c 6261 636b 203c quest callback < │ │ │ │ -0013ebe0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap: │ │ │ │ -0013ecb0: 3a66 6465 6c3c 2f61 3e3c 2f63 6f64 653e :fdel │ │ │ │ -0013ecc0: 2069 7320 6e6f 7420 696d 706c 656d 656e is not implemen │ │ │ │ -0013ecd0: 7465 642c 2073 6565 2053 6563 7469 6f6e ted, see Section │ │ │ │ -0013ece0: 203c 6120 636c 6173 733d 2265 6c22 2068 Functi │ │ │ │ -0013ed10: 6f6e 2063 616c 6c62 6163 6b73 2066 6f72 on callbacks for │ │ │ │ -0013ed20: 2063 7573 746f 6d69 7a65 6420 492f 4f20 customized I/O │ │ │ │ -0013ed30: 616e 6420 4854 5450 2068 616e 646c 696e and HTTP handlin │ │ │ │ -0013ed40: 673c 2f61 3e20 2020 203c 2f74 643e 3c2f g
    #SO │ │ │ │ -0013eda0: 4150 5f44 494d 455f 454e 443c 2f63 6f64 AP_DIME_END End │ │ │ │ -0013ede0: 6f66 2044 494d 4520 6174 7461 6368 6d65 of DIME attachme │ │ │ │ -0013edf0: 6e74 7320 7072 6f74 6f63 6f6c 2065 7272 nts protocol err │ │ │ │ -0013ee00: 6f72 2020 2020 3c2f 7464 3e3c 2f74 723e or
    #SOAP │ │ │ │ -0013ee60: 5f44 494d 455f 4552 524f 523c 2f63 6f64 _DIME_ERROR DIME │ │ │ │ -0013eea0: 2066 6f72 6d61 7474 696e 6720 6572 726f formatting erro │ │ │ │ -0013eeb0: 7220 6f72 2044 494d 4520 6174 7461 6368 r or DIME attach │ │ │ │ -0013eec0: 6d65 6e74 2073 697a 6520 6578 6365 6564 ment size exceed │ │ │ │ -0013eed0: 7320 3c63 6f64 653e 2353 4f41 505f 4d41 s #SOAP_MA │ │ │ │ -0013eee0: 5844 494d 4553 495a 453c 2f63 6f64 653e XDIMESIZE │ │ │ │ -0013eef0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_DI │ │ │ │ -0013ef50: 4d45 5f48 5245 463c 2f63 6f64 653e 2020 ME_HREF │ │ │ │ -0013ef60: 203c 2f74 643e 3c74 6420 636c 6173 733d DIME att │ │ │ │ -0013ef90: 6163 686d 656e 7420 6861 7320 6e6f 2068 achment has no h │ │ │ │ -0013efa0: 7265 6620 6672 6f6d 2053 4f41 5020 626f ref from SOAP bo │ │ │ │ -0013efb0: 6479 2061 6e64 206e 6f20 4449 4d45 2063 dy and no DIME c │ │ │ │ -0013efc0: 616c 6c62 6163 6b73 2077 6572 6520 6465 allbacks were de │ │ │ │ -0013efd0: 6669 6e65 6420 746f 2073 6176 6520 7468 fined to save th │ │ │ │ -0013efe0: 6520 6174 7461 6368 6d65 6e74 2020 2020 e attachment │ │ │ │ -0013eff0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    < │ │ │ │ -0013f040: 636f 6465 3e23 534f 4150 5f44 494d 455f code>#SOAP_DIME_ │ │ │ │ -0013f050: 4d49 534d 4154 4348 3c2f 636f 6465 3e20 MISMATCH │ │ │ │ -0013f060: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 DIME ve │ │ │ │ -0013f090: 7273 696f 6e20 6572 726f 7220 2020 203c rsion error < │ │ │ │ -0013f0a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_DUPLICA │ │ │ │ -0013f100: 5445 5f49 443c 2f63 6f64 653e 2020 203c TE_ID < │ │ │ │ -0013f110: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>XML elemen │ │ │ │ -0013f140: 7420 6861 7320 6475 706c 6963 6174 6520 t has duplicate │ │ │ │ -0013f150: 6964 2061 7474 7269 6275 7465 2076 616c id attribute val │ │ │ │ -0013f160: 7565 2028 6170 706c 6963 6162 6c65 2074 ue (applicable t │ │ │ │ -0013f170: 6f20 534f 4150 206d 756c 7469 2d72 6566 o SOAP multi-ref │ │ │ │ -0013f180: 2065 6e63 6f64 696e 6720 616e 6420 3c63 encoding and #SOAP_XML_GR │ │ │ │ -0013f1a0: 4150 483c 2f63 6f64 653e 2073 6572 6961 APH seria │ │ │ │ -0013f1b0: 6c69 7a61 7469 6f6e 2920 2020 203c 2f74 lization)
    #SOAP_EMPTY XM │ │ │ │ -0013f250: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att │ │ │ │ -0013f260: 7269 6275 7465 2069 7320 656d 7074 7920 ribute is empty │ │ │ │ -0013f270: 7768 656e 2061 2076 616c 7565 2069 7320 when a value is │ │ │ │ -0013f280: 7265 7175 6972 6564 2020 2020 3c2f 7464 required
    │ │ │ │ -0013f2e0: 2353 4f41 505f 454f 463c 2f63 6f64 653e #SOAP_EOF │ │ │ │ -0013f2f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Unexpe │ │ │ │ -0013f320: 6374 6564 2065 6e64 206f 6620 6669 6c65 cted end of file │ │ │ │ -0013f330: 2c20 6e6f 2069 6e70 7574 2c20 7472 616e , no input, tran │ │ │ │ -0013f340: 736d 6973 7369 6f6e 2069 6e74 6572 7275 smission interru │ │ │ │ -0013f350: 7074 6564 206f 7220 7469 6d65 6420 6f75 pted or timed ou │ │ │ │ -0013f360: 742c 2073 616d 6520 6173 203c 636f 6465 t, same as EOF < │ │ │ │ -0013f380: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_EOM Ou │ │ │ │ -0013f410: 7420 6f66 206d 656d 6f72 7920 2020 203c t of memory < │ │ │ │ -0013f420: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_ERR Sam │ │ │ │ -0013f4b0: 6520 6173 203c 636f 6465 3e45 4f46 3c2f e as EOF, but indic │ │ │ │ -0013f4d0: 6174 6573 2061 6e20 756e 7370 6563 6966 ates an unspecif │ │ │ │ -0013f4e0: 6965 6420 6572 726f 7220 2020 203c 2f74 ied error
    #SOAP_FAULT Th │ │ │ │ -0013f580: 6520 6661 756c 7420 636f 6465 2074 6f20 e fault code to │ │ │ │ -0013f590: 6265 2072 6574 7572 6e65 6420 6279 2061 be returned by a │ │ │ │ -0013f5a0: 2073 6572 7669 6365 206f 7065 7261 7469 service operati │ │ │ │ -0013f5b0: 6f6e 2077 6865 6e20 6361 6c6c 696e 6720 on when calling │ │ │ │ -0013f5c0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_sender_ │ │ │ │ -0013f670: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault │ │ │ │ -0013f680: 2028 636c 6965 6e74 2069 7320 6174 2066 (client is at f │ │ │ │ -0013f690: 6175 6c74 2920 6f72 203c 636f 6465 3e3c ault) or < │ │ │ │ -0013f6a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0013f6b0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -0013f6c0: 5f66 6175 6c74 2e68 746d 6c23 6761 3931 _fault.html#ga91 │ │ │ │ -0013f6d0: 6463 3662 6363 3363 3566 3335 6530 3233 dc6bcc3c5f35e023 │ │ │ │ -0013f6e0: 6237 3861 3666 3436 6137 3965 6436 2220 b78a6f46a79ed6" │ │ │ │ -0013f6f0: 7469 746c 653d 2253 6574 2053 4f41 5020 title="Set SOAP │ │ │ │ -0013f700: 312e 3120 7365 7276 6572 2066 6175 6c74 1.1 server fault │ │ │ │ -0013f710: 202f 2053 4f41 5020 312e 3220 7265 6365 / SOAP 1.2 rece │ │ │ │ -0013f720: 6976 6572 2066 6175 6c74 2073 7472 696e iver fault strin │ │ │ │ -0013f730: 6720 616e 6420 6465 7461 696c 2e22 3e73 g and detail.">s │ │ │ │ -0013f740: 6f61 705f 7265 6365 6976 6572 5f66 6175 oap_receiver_fau │ │ │ │ -0013f750: 6c74 3c2f 613e 3c2f 636f 6465 3e20 2873 lt (s │ │ │ │ -0013f760: 6572 7665 7220 6973 2061 7420 6661 756c erver is at faul │ │ │ │ -0013f770: 7429 2c20 636c 6965 6e74 7320 7265 6365 t), clients rece │ │ │ │ -0013f780: 6976 6520 7468 6520 6661 756c 7420 6173 ive the fault as │ │ │ │ -0013f790: 203c 636f 6465 3e23 534f 4150 5f43 4c49 #SOAP_CLI │ │ │ │ -0013f7a0: 5f46 4155 4c54 3c2f 636f 6465 3e20 6f72 _FAULT or │ │ │ │ -0013f7b0: 203c 636f 6465 3e23 534f 4150 5f53 5652 #SOAP_SVR │ │ │ │ -0013f7c0: 5f46 4155 4c54 3c2f 636f 6465 3e20 7265 _FAULT re │ │ │ │ -0013f7d0: 7370 6563 7469 7665 6c79 2020 2020 3c2f spectively
    #SOAP_FD_EXCEE │ │ │ │ -0013f840: 4445 443c 2f63 6f64 653e 2020 203c 2f74 DED Too many ope │ │ │ │ -0013f880: 6e20 736f 636b 6574 7320 2020 203c 2f74 n sockets
    #SOAP_FIXED XM │ │ │ │ -0013f920: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att │ │ │ │ -0013f930: 7269 6275 7465 2076 616c 7565 2069 7320 ribute value is │ │ │ │ -0013f940: 6669 7865 6420 616e 6420 7468 6520 7061 fixed and the pa │ │ │ │ -0013f950: 7273 6564 2076 616c 7565 2064 6f65 7320 rsed value does │ │ │ │ -0013f960: 6e6f 7420 6d61 7463 6820 7468 6520 6669 not match the fi │ │ │ │ -0013f970: 7865 6420 7661 6c75 6520 2020 203c 2f74 xed value
    #SOAP_GET_METHO │ │ │ │ -0013f9e0: 443c 2f63 6f64 653e 2020 203c 2f74 643e D An HTTP GET re │ │ │ │ -0013fa20: 7175 6573 7420 7761 7320 7265 6365 6976 quest was receiv │ │ │ │ -0013fa30: 6564 2062 7920 7468 6520 7365 7276 6963 ed by the servic │ │ │ │ -0013fa40: 6520 6275 7420 7468 6520 4745 5420 7265 e but the GET re │ │ │ │ -0013fa50: 7175 6573 7420 6361 6c6c 6261 636b 203c quest callback < │ │ │ │ -0013fa60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fge │ │ │ │ -0013fb30: 743c 2f61 3e3c 2f63 6f64 653e 2069 7320 t is │ │ │ │ -0013fb40: 6e6f 7420 696d 706c 656d 656e 7465 642c not implemented, │ │ │ │ -0013fb50: 2073 6565 2053 6563 7469 6f6e 7320 3c61 see Sections How to impleme │ │ │ │ -0013fb90: 6e74 2048 5454 5020 4745 542c 2050 5554 nt HTTP GET, PUT │ │ │ │ -0013fba0: 2c20 616e 6420 5041 5443 4820 7365 7276 , and PATCH serv │ │ │ │ -0013fbb0: 6963 6573 3c2f 613e 2061 6e64 203c 6120 ices and Function c │ │ │ │ -0013fbf0: 616c 6c62 6163 6b73 2066 6f72 2063 7573 allbacks for cus │ │ │ │ -0013fc00: 746f 6d69 7a65 6420 492f 4f20 616e 6420 tomized I/O and │ │ │ │ -0013fc10: 4854 5450 2068 616e 646c 696e 673c 2f61 HTTP handling
    #SOAP_ │ │ │ │ -0013fc80: 4852 4546 3c2f 636f 6465 3e20 2020 3c2f HREF Reference t │ │ │ │ -0013fcc0: 6f20 6f62 6a65 6374 2069 6e20 584d 4c20 o object in XML │ │ │ │ -0013fcd0: 6964 656e 7469 6669 6564 2062 7920 6974 identified by it │ │ │ │ -0013fce0: 7320 6964 2061 7474 7269 6275 7465 2069 s id attribute i │ │ │ │ -0013fcf0: 7320 696e 636f 6d70 6174 6962 6c65 2077 s incompatible w │ │ │ │ -0013fd00: 6974 6820 7468 6520 6f62 6a65 6374 2072 ith the object r │ │ │ │ -0013fd10: 6566 6572 7265 6420 746f 2062 7920 7468 eferred to by th │ │ │ │ -0013fd20: 6520 7265 6620 6f72 2068 7265 6620 6174 e ref or href at │ │ │ │ -0013fd30: 7472 6962 7574 6520 2861 7070 6c69 6361 tribute (applica │ │ │ │ -0013fd40: 626c 6520 746f 2053 4f41 5020 6d75 6c74 ble to SOAP mult │ │ │ │ -0013fd50: 692d 7265 6620 656e 636f 6469 6e67 2061 i-ref encoding a │ │ │ │ -0013fd60: 6e64 203c 636f 6465 3e23 534f 4150 5f58 nd #SOAP_X │ │ │ │ -0013fd70: 4d4c 5f47 5241 5048 3c2f 636f 6465 3e20 ML_GRAPH │ │ │ │ -0013fd80: 7365 7269 616c 697a 6174 696f 6e29 2020 serialization) │ │ │ │ -0013fd90: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    An unspec │ │ │ │ -0013fe30: 6966 6965 6420 4854 5450 2065 7272 6f72 ified HTTP error │ │ │ │ -0013fe40: 206f 6363 7572 7265 6420 2020 203c 2f74 occurred
    #SOAP_HTTP_MET │ │ │ │ -0013feb0: 484f 443c 2f63 6f64 653e 2020 203c 2f74 HOD An HTTP requ │ │ │ │ -0013fef0: 6573 7420 7761 7320 7265 6365 6976 6564 est was received │ │ │ │ -0013ff00: 2062 7920 7468 6520 7365 7276 6963 6520 by the service │ │ │ │ -0013ff10: 7468 6174 2063 616e 6e6f 7420 6265 2068 that cannot be h │ │ │ │ -0013ff20: 616e 646c 6564 2020 2020 3c2f 7464 3e3c andled
    #S │ │ │ │ -0013ff80: 4f41 505f 494f 423c 2f63 6f64 653e 2020 OAP_IOB │ │ │ │ -0013ff90: 203c 2f74 643e 3c74 6420 636c 6173 733d SOAP arr │ │ │ │ -0013ffc0: 6179 2069 6e64 6578 206f 7574 206f 6620 ay index out of │ │ │ │ -0013ffd0: 626f 756e 6473 2020 2020 3c2f 7464 3e3c bounds
    # │ │ │ │ -00140030: 534f 4150 5f4c 454e 4754 483c 2f63 6f64 SOAP_LENGTH XML │ │ │ │ -00140070: 656c 656d 656e 7420 6f72 2061 7474 7269 element or attri │ │ │ │ -00140080: 6275 7465 206c 656e 6774 6820 7661 6c69 bute length vali │ │ │ │ -00140090: 6461 7469 6f6e 2065 7272 6f72 206f 7220 dation error or │ │ │ │ -001400a0: 3c63 6f64 653e 2353 4f41 505f 4d41 584c #SOAP_MAXL │ │ │ │ -001400b0: 454e 4754 483c 2f63 6f64 653e 2065 7863 ENGTH exc │ │ │ │ -001400c0: 6565 6465 6420 2020 203c 2f74 643e 3c2f eeded
    #SO │ │ │ │ -00140120: 4150 5f4c 4556 454c 3c2f 636f 6465 3e20 AP_LEVEL │ │ │ │ -00140130: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 XML nes │ │ │ │ -00140160: 7469 6e67 2064 6570 7468 206c 6576 656c ting depth level │ │ │ │ -00140170: 2065 7863 6565 6473 203c 636f 6465 3e23 exceeds # │ │ │ │ -00140180: 534f 4150 5f4d 4158 4c45 5645 4c3c 2f63 SOAP_MAXLEVEL
    #SO │ │ │ │ -001401f0: 4150 5f4d 494d 455f 454e 443c 2f63 6f64 AP_MIME_END End │ │ │ │ -00140230: 6f66 204d 494d 4520 6174 7461 6368 6d65 of MIME attachme │ │ │ │ -00140240: 6e74 7320 7072 6f74 6f63 6f6c 2065 7272 nts protocol err │ │ │ │ -00140250: 6f72 2020 2020 3c2f 7464 3e3c 2f74 723e or
    #SOAP_ │ │ │ │ -001402b0: 4d49 4d45 5f45 5252 4f52 3c2f 636f 6465 MIME_ERROR MIME │ │ │ │ -001402f0: 6174 7461 6368 6d65 6e74 2070 6172 7369 attachment parsi │ │ │ │ -00140300: 6e67 2065 7272 6f72 2020 2020 3c2f 7464 ng error
    #SOAP_MIME_HREF │ │ │ │ -00140370: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SO │ │ │ │ -00140460: 4150 5f4d 4953 5349 4e47 5f49 443c 2f63 AP_MISSING_ID An │ │ │ │ -001404a0: 2058 4d4c 2065 6c65 6d65 6e74 2077 6974 XML element wit │ │ │ │ -001404b0: 6820 6964 2061 7474 7269 6275 7465 2069 h id attribute i │ │ │ │ -001404c0: 7320 6d69 7373 696e 6720 7468 6174 2073 s missing that s │ │ │ │ -001404d0: 686f 756c 6420 6d61 7463 6820 7468 6520 hould match the │ │ │ │ -001404e0: 656c 656d 656e 7420 7769 7468 2068 7265 element with hre │ │ │ │ -001404f0: 662f 7265 6620 6174 7472 6962 7574 6520 f/ref attribute │ │ │ │ -00140500: 2861 7070 6c69 6361 626c 6520 746f 2053 (applicable to S │ │ │ │ -00140510: 4f41 5020 6d75 6c74 692d 7265 6620 656e OAP multi-ref en │ │ │ │ -00140520: 636f 6469 6e67 2061 6e64 203c 636f 6465 coding and #SOAP_XML_GRAPH │ │ │ │ -00140540: 3c2f 636f 6465 3e20 7365 7269 616c 697a serializ │ │ │ │ -00140550: 6174 696f 6e29 2020 2020 3c2f 7464 3e3c ation)
    # │ │ │ │ -001405b0: 534f 4150 5f4d 4f45 3c2f 636f 6465 3e20 SOAP_MOE │ │ │ │ -001405c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Memory │ │ │ │ -001405f0: 6f76 6572 666c 6f77 206f 7220 6d65 6d6f overflow or memo │ │ │ │ -00140600: 7279 2063 6f72 7275 7074 696f 6e20 6572 ry corruption er │ │ │ │ -00140610: 726f 7220 2861 7070 6c69 6361 626c 6520 ror (applicable │ │ │ │ -00140620: 696e 203c 636f 6465 3e23 4445 4255 473c in #DEBUG< │ │ │ │ -00140630: 2f63 6f64 653e 206d 6f64 6520 6f6e 6c79 /code> mode only │ │ │ │ -00140640: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a )
    #SOAP_M │ │ │ │ -001406a0: 5553 5455 4e44 4552 5354 414e 443c 2f63 USTUNDERSTAND An │ │ │ │ -001406e0: 2058 4d4c 2065 6c65 6d65 6e74 2069 7320 XML element is │ │ │ │ -001406f0: 7072 6573 656e 7420 7769 7468 2061 206d present with a m │ │ │ │ -00140700: 7573 7455 6e64 6572 7374 616e 6420 6174 ustUnderstand at │ │ │ │ -00140710: 7472 6962 7574 6520 7768 6963 6820 6d75 tribute which mu │ │ │ │ -00140720: 7374 2062 6520 756e 6465 7273 746f 6f64 st be understood │ │ │ │ -00140730: 2062 7574 2069 7320 6e6f 7420 6465 7365 but is not dese │ │ │ │ -00140740: 7269 616c 697a 6564 2020 2020 3c2f 7464 rialized
    #SOAP_NAMESPACE │ │ │ │ -001407b0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    < │ │ │ │ -00140860: 636f 6465 3e23 534f 4150 5f4e 4f5f 4441 code>#SOAP_NO_DA │ │ │ │ -00140870: 5441 3c2f 636f 6465 3e20 2020 3c2f 7464 TA No data in th │ │ │ │ -001408b0: 6520 4854 5450 2062 6f64 7920 6f66 2074 e HTTP body of t │ │ │ │ -001408c0: 6865 206d 6573 7361 6765 2072 6563 6569 he message recei │ │ │ │ -001408d0: 7665 6420 2020 203c 2f74 643e 3c2f 7472 ved
    #SOA │ │ │ │ -00140930: 505f 4e4f 5f4d 4554 484f 443c 2f63 6f64 P_NO_METHOD The │ │ │ │ -00140970: 7365 7276 6963 6520 7265 7175 6573 7420 service request │ │ │ │ -00140980: 6469 7370 6174 6368 6572 2064 6964 206e dispatcher did n │ │ │ │ -00140990: 6f74 2066 696e 6420 6120 6d61 7463 6869 ot find a matchi │ │ │ │ -001409a0: 6e67 2073 6572 7669 6365 206f 7065 7261 ng service opera │ │ │ │ -001409b0: 7469 6f6e 2066 6f72 2061 2073 6572 7669 tion for a servi │ │ │ │ -001409c0: 6365 2072 6571 7565 7374 2020 2020 3c2f ce request
    #SOAP_NO_TAG N │ │ │ │ -00140a60: 6f20 584d 4c20 656c 656d 656e 7420 7461 o XML element ta │ │ │ │ -00140a70: 6720 7761 7320 666f 756e 6420 7768 656e g was found when │ │ │ │ -00140a80: 206f 6e65 2077 6173 2065 7870 6563 7465 one was expecte │ │ │ │ -00140a90: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    #SOAP_ │ │ │ │ -00140af0: 4e54 4c4d 5f45 5252 4f52 3c2f 636f 6465 NTLM_ERROR An NT │ │ │ │ -00140b30: 4c4d 2061 7574 6865 6e74 6963 6174 696f LM authenticatio │ │ │ │ -00140b40: 6e20 6861 6e64 7368 616b 6520 6572 726f n handshake erro │ │ │ │ -00140b50: 7220 6f63 6375 7272 6564 2020 2020 3c2f r occurred
    #SOAP_NULL XML │ │ │ │ -00140bf0: 2065 6c65 6d65 6e74 2068 6173 2061 6e20 element has an │ │ │ │ -00140c00: 3c63 6f64 653e 7873 693a 6e69 6c3c 2f63 xsi:nil attribute w │ │ │ │ -00140c20: 6865 6e20 7468 6520 656c 656d 656e 7420 hen the element │ │ │ │ -00140c30: 6973 206e 6f74 206e 696c 6c61 626c 652c is not nillable, │ │ │ │ -00140c40: 2063 6175 7369 6e67 2061 2076 616c 6964 causing a valid │ │ │ │ -00140c50: 6174 696f 6e20 6572 726f 7220 2020 203c ation error < │ │ │ │ -00140c60: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_OCCURS │ │ │ │ -00140cc0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    < │ │ │ │ -00140da0: 636f 6465 3e23 534f 4150 5f50 4154 4348 code>#SOAP_PATCH │ │ │ │ -00140db0: 5f4d 4554 484f 443c 2f63 6f64 653e 2020 _METHOD │ │ │ │ -00140dc0: 203c 2f74 643e 3c74 6420 636c 6173 733d An HTTP │ │ │ │ -00140df0: 5041 5443 4820 7265 7175 6573 7420 7761 PATCH request wa │ │ │ │ -00140e00: 7320 7265 6365 6976 6564 2062 7920 7468 s received by th │ │ │ │ -00140e10: 6520 7365 7276 6963 6520 6275 7420 7468 e service but th │ │ │ │ -00140e20: 6520 5041 5443 4820 7265 7175 6573 7420 e PATCH request │ │ │ │ -00140e30: 6361 6c6c 6261 636b 203c 636f 6465 3e3c callback < │ │ │ │ -00140e40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00140e50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -00140e60: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ -00140e70: 6761 3830 3861 3661 3962 3765 3664 3137 ga808a6a9b7e6d17 │ │ │ │ -00140e80: 6530 3339 6662 3533 6135 6538 6139 6238 e039fb53a5e8a9b8 │ │ │ │ -00140e90: 3461 2220 7469 746c 653d 2243 616c 6c62 4a" title="Callb │ │ │ │ -00140ea0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement │ │ │ │ -00140eb0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se │ │ │ │ -00140ec0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser │ │ │ │ -00140ed0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to │ │ │ │ -00140ee0: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque │ │ │ │ -00140ef0: 7374 7320 6672 6f6d 2063 6c69 656e 7473 sts from clients │ │ │ │ -00140f00: 2e2e 2e22 3e73 6f61 703a 3a66 7061 7463 ...">soap::fpatc │ │ │ │ -00140f10: 683c 2f61 3e3c 2f63 6f64 653e 2069 7320 h is │ │ │ │ -00140f20: 6e6f 7420 696d 706c 656d 656e 7465 642c not implemented, │ │ │ │ -00140f30: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section Function c │ │ │ │ -00140f70: 616c 6c62 6163 6b73 2066 6f72 2063 7573 allbacks for cus │ │ │ │ -00140f80: 746f 6d69 7a65 6420 492f 4f20 616e 6420 tomized I/O and │ │ │ │ -00140f90: 4854 5450 2068 616e 646c 696e 673c 2f61 HTTP handling
    #SOAP_ │ │ │ │ -00141000: 5041 5454 4552 4e3c 2f63 6f64 653e 2020 PATTERN │ │ │ │ -00141010: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem │ │ │ │ -00141040: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute │ │ │ │ -00141050: 2076 616c 7565 2070 6174 7465 726e 206d value pattern m │ │ │ │ -00141060: 6973 6d61 7463 6820 2020 203c 2f74 643e ismatch
    # │ │ │ │ -001410c0: 534f 4150 5f50 4c55 4749 4e5f 4552 524f SOAP_PLUGIN_ERRO │ │ │ │ -001410d0: 523c 2f63 6f64 653e 2020 203c 2f74 643e R Failed to regi │ │ │ │ -00141110: 7374 6572 2070 6c75 6769 6e20 2020 203c ster plugin < │ │ │ │ -00141120: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_PROHIB │ │ │ │ -00141180: 4954 4544 3c2f 636f 6465 3e20 2020 3c2f ITED XML attribu │ │ │ │ -001411c0: 7465 2069 7320 7072 6f68 6962 6974 6564 te is prohibited │ │ │ │ -001411d0: 2062 7574 2070 7265 7365 6e74 2020 2020 but present │ │ │ │ -001411e0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    #SOAP_PUT_ME │ │ │ │ -00141240: 5448 4f44 3c2f 636f 6465 3e20 2020 3c2f THOD An HTTP PUT │ │ │ │ -00141280: 2072 6571 7565 7374 2077 6173 2072 6563 request was rec │ │ │ │ -00141290: 6569 7665 6420 6279 2074 6865 2073 6572 eived by the ser │ │ │ │ -001412a0: 7669 6365 2062 7574 2074 6865 2050 5554 vice but the PUT │ │ │ │ -001412b0: 2072 6571 7565 7374 2063 616c 6c62 6163 request callbac │ │ │ │ -001412c0: 6b20 3c63 6f64 653e 3c61 2063 6c61 7373 k soap:: │ │ │ │ -00141390: 6670 7574 3c2f 613e 3c2f 636f 6465 3e20 fput │ │ │ │ -001413a0: 6973 206e 6f74 2069 6d70 6c65 6d65 6e74 is not implement │ │ │ │ -001413b0: 6564 2c20 7365 6520 5365 6374 696f 6e20 ed, see Section │ │ │ │ -001413c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Functio │ │ │ │ -001413f0: 6e20 6361 6c6c 6261 636b 7320 666f 7220 n callbacks for │ │ │ │ -00141400: 6375 7374 6f6d 697a 6564 2049 2f4f 2061 customized I/O a │ │ │ │ -00141410: 6e64 2048 5454 5020 6861 6e64 6c69 6e67 nd HTTP handling │ │ │ │ -00141420: 3c2f 613e 2020 2020 3c2f 7464 3e3c 2f74
    #SO │ │ │ │ -00141480: 4150 5f52 4551 5549 5245 443c 2f63 6f64 AP_REQUIRED XML │ │ │ │ -001414c0: 6174 7472 6962 7574 6520 6973 2072 6571 attribute is req │ │ │ │ -001414d0: 7569 7265 6420 6275 7420 6e6f 7420 7072 uired but not pr │ │ │ │ -001414e0: 6573 656e 7420 2020 203c 2f74 643e 3c2f esent
    #SO │ │ │ │ -00141540: 4150 5f53 534c 5f45 5252 4f52 3c2f 636f AP_SSL_ERROR An │ │ │ │ -00141580: 5353 4c20 6572 726f 7220 6f63 6375 7272 SSL error occurr │ │ │ │ -00141590: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    #SOAP │ │ │ │ -001415f0: 5f53 5652 5f46 4155 4c54 3c2f 636f 6465 _SVR_FAULT The s │ │ │ │ -00141630: 6572 7669 6365 2072 6574 7572 6e65 6420 ervice returned │ │ │ │ -00141640: 6120 534f 4150 2031 2e31 2073 6572 7665 a SOAP 1.1 serve │ │ │ │ -00141650: 7220 6661 756c 7420 6f72 2053 4f41 5020 r fault or SOAP │ │ │ │ -00141660: 312e 3220 7265 6365 6976 6572 2066 6175 1.2 receiver fau │ │ │ │ -00141670: 6c74 2074 6f20 7468 6520 636c 6965 6e74 lt to the client │ │ │ │ -00141680: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_SY │ │ │ │ -001416e0: 4e54 4158 5f45 5252 4f52 3c2f 636f 6465 NTAX_ERROR An XM │ │ │ │ -00141720: 4c20 7379 6e74 6178 2065 7272 6f72 206f L syntax error o │ │ │ │ -00141730: 6363 7572 7265 6420 7768 696c 6520 7061 ccurred while pa │ │ │ │ -00141740: 7273 696e 6720 7468 6520 696e 7075 7420 rsing the input │ │ │ │ -00141750: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_TA │ │ │ │ -001417b0: 475f 4d49 534d 4154 4348 3c2f 636f 6465 G_MISMATCH XML e │ │ │ │ -001417f0: 6c65 6d65 6e74 2074 6167 2070 6172 7365 lement tag parse │ │ │ │ -00141800: 6420 646f 6573 206e 6f74 206d 6174 6368 d does not match │ │ │ │ -00141810: 2061 6e79 7468 696e 6720 7468 6174 2069 anything that i │ │ │ │ -00141820: 7320 6578 7065 6374 6564 2020 2020 3c2f s expected
    #SOAP_TCP_ERRO │ │ │ │ -00141890: 523c 2f63 6f64 653e 2020 203c 2f74 643e R A TCP/IP conne │ │ │ │ -001418d0: 6374 696f 6e20 6572 726f 7220 6f63 6375 ction error occu │ │ │ │ -001418e0: 7272 6564 2020 2020 3c2f 7464 3e3c 2f74 rred
    #SO │ │ │ │ -00141940: 4150 5f54 5950 453c 2f63 6f64 653e 2020 AP_TYPE │ │ │ │ -00141950: 203c 2f74 643e 3c74 6420 636c 6173 733d XML elem │ │ │ │ -00141980: 656e 7420 6f72 2061 7474 7269 6275 7465 ent or attribute │ │ │ │ -00141990: 2068 6173 2061 206d 6973 6d61 7463 6869 has a mismatchi │ │ │ │ -001419a0: 6e67 2074 7970 6520 6f72 2076 616c 7565 ng type or value │ │ │ │ -001419b0: 2074 6861 7420 6973 2063 6175 7369 6e67 that is causing │ │ │ │ -001419c0: 2061 2076 616c 6964 6174 696f 6e20 6572 a validation er │ │ │ │ -001419d0: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror
    #SOAP │ │ │ │ -00141a30: 5f55 4450 5f45 5252 4f52 3c2f 636f 6465 _UDP_ERROR A UDP │ │ │ │ -00141a70: 2f49 5020 636f 6e6e 6563 7469 6f6e 2065 /IP connection e │ │ │ │ -00141a80: 7272 6f72 206f 6363 7572 7265 6420 6f72 rror occurred or │ │ │ │ -00141a90: 2074 6865 206d 6573 7361 6765 2074 6f6f the message too │ │ │ │ -00141aa0: 206c 6172 6765 2074 6f20 7374 6f72 6520 large to store │ │ │ │ -00141ab0: 696e 2061 2055 4450 2070 6163 6b65 7420 in a UDP packet │ │ │ │ -00141ac0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_US │ │ │ │ -00141b20: 4552 5f45 5252 4f52 3c2f 636f 6465 3e20 ER_ERROR │ │ │ │ -00141b30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 soap::user │ │ │ │ -00141c20: 6e6f 7420 7365 7420 746f 206e 6f6e 2d4e not set to non-N │ │ │ │ -00141c30: 554c 4c20 2020 203c 2f74 643e 3c2f 7472 ULL
    #SOAP │ │ │ │ -00141c90: 5f55 5446 5f45 5252 4f52 3c2f 636f 6465 _UTF_ERROR An UT │ │ │ │ -00141cd0: 462d 3820 6465 636f 6469 6e67 2065 7272 F-8 decoding err │ │ │ │ -00141ce0: 6f72 206f 6363 7572 7265 6420 2020 203c or occurred < │ │ │ │ -00141cf0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_VERSIO │ │ │ │ -00141d50: 4e4d 4953 4d41 5443 483c 2f63 6f64 653e NMISMATCH │ │ │ │ -00141d60: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP v │ │ │ │ -00141d90: 6572 7369 6f6e 206d 6973 6d61 7463 6820 ersion mismatch │ │ │ │ -00141da0: 6f72 206e 6f20 534f 4150 206d 6573 7361 or no SOAP messa │ │ │ │ -00141db0: 6765 2069 7320 7265 6365 6976 6564 2020 ge is received │ │ │ │ -00141dc0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    A zlib er │ │ │ │ -00141e60: 726f 7220 6f63 6375 7272 6564 2020 203c ror occurred < │ │ │ │ -00141e70: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    ........ │ │ │ │ -001438f0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ -00143940: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ -001439b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -001439c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -001439d0: 3e32 3034 2020 203c 2f74 643e 3c74 6420 >204 ........ │ │ │ │ -00143c10: 3c74 6420 636c 6173 733d 226d 6172 6b64 .....< │ │ │ │ -00143d60: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ -00143d70: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven"> │ │ │ │ -00143d80: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ -00143dd0: 4e6f 7420 4d6f 6469 6669 6564 2020 2020 Not Modified │ │ │ │ -00143de0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ....< │ │ │ │ -00143f00: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>...< │ │ │ │ -00143f90: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ -00143fa0: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven"> │ │ │ │ -00143fb0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ -00144000: 556e 6175 7468 6f72 697a 6564 2020 2020 Unauthorized │ │ │ │ -00144010: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 .......... │ │ │ │ -00144290: 3430 3620 2020 3c2f 7464 3e3c 7464 2063 406 .... │ │ │ │ -00144400: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ....< │ │ │ │ -001444b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ -001444c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ -001444d0: 3e34 3130 2020 203c 2f74 643e 3c74 6420 >410 │ │ │ │ -00144510: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ -00144560: 3c74 6420 636c 6173 733d 226d 6172 6b64 . │ │ │ │ -001445a0: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ -001445c0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ -00144610: 5072 6563 6f6e 6469 7469 6f6e 2046 6169 Precondition Fai │ │ │ │ -00144620: 6c65 6420 2020 203c 2f74 643e 3c2f 7472 led ...... │ │ │ │ -00144780: 3c74 6420 636c 6173 733d 226d 6172 6b64 .......... │ │ │ │ -00144ad0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ -00144b20: 3c74 6420 636c 6173 733d 226d 6172 6b64 ......

    HTTP sta │ │ │ │ -00144ca0: 7475 7320 636f 6465 2032 3030 2069 7320 tus code 200 is │ │ │ │ -00144cb0: 6e6f 7420 666c 6167 6765 6420 6173 2061 not flagged as a │ │ │ │ -00144cc0: 6e20 6572 726f 7220 6279 2074 6865 2065 n error by the e │ │ │ │ -00144cd0: 6e67 696e 652e 2053 7461 7475 7320 636f ngine. Status co │ │ │ │ -00144ce0: 6465 7320 3230 3120 616e 6420 3230 3220 des 201 and 202 │ │ │ │ -00144cf0: 6172 6520 696e 666f 726d 6174 6976 6520 are informative │ │ │ │ -00144d00: 616e 6420 7368 6f75 6c64 206e 6f74 2062 and should not b │ │ │ │ -00144d10: 6520 636f 6e73 6964 6572 6564 2065 7272 e considered err │ │ │ │ -00144d20: 6f72 7320 6279 2074 6865 2061 7070 6c69 ors by the appli │ │ │ │ -00144d30: 6361 7469 6f6e 206c 6f67 6963 2e3c 2f70 cation logic.

    .

    Server-side │ │ │ │ -00144d50: 2069 6d70 6c65 6d65 6e74 6174 696f 6e73 implementations │ │ │ │ -00144d60: 206f 6620 7365 7276 6963 6520 6f70 6572 of service oper │ │ │ │ -00144d70: 6174 696f 6e73 2073 686f 756c 6420 7265 ations should re │ │ │ │ -00144d80: 7475 726e 203c 636f 6465 3e23 534f 4150 turn #SOAP │ │ │ │ -00144d90: 5f4f 4b3c 2f63 6f64 653e 2077 6865 6e20 _OK when │ │ │ │ -00144da0: 7468 6520 6f70 6572 6174 696f 6e20 7761 the operation wa │ │ │ │ -00144db0: 7320 7375 6363 6573 7366 756c 2c20 7768 s successful, wh │ │ │ │ -00144dc0: 6963 6820 7265 7475 726e 7320 6120 2232 ich returns a "2 │ │ │ │ -00144dd0: 3030 204f 4b22 2048 5454 5020 6865 6164 00 OK" HTTP head │ │ │ │ -00144de0: 6572 2077 6974 6820 7468 6520 584d 4c20 er with the XML │ │ │ │ -00144df0: 7265 7370 6f6e 7365 206d 6573 7361 6765 response message │ │ │ │ -00144e00: 2e20 5365 7276 6572 2d73 6964 6520 696d . Server-side im │ │ │ │ -00144e10: 706c 656d 656e 7461 7469 6f6e 7320 6f66 plementations of │ │ │ │ -00144e20: 2073 6572 7669 6365 206f 7065 7261 7469 service operati │ │ │ │ -00144e30: 6f6e 7320 696e 2067 534f 4150 206d 6179 ons in gSOAP may │ │ │ │ -00144e40: 2064 6972 6563 746c 7920 7265 7475 726e directly return │ │ │ │ -00144e50: 2061 6e20 4854 5450 2073 7461 7475 7320 an HTTP status │ │ │ │ -00144e60: 636f 6465 2077 6865 6e20 616e 2048 5454 code when an HTT │ │ │ │ -00144e70: 502d 7265 6c61 7465 6420 6572 726f 7220 P-related error │ │ │ │ -00144e80: 7368 6f75 6c64 2062 6520 7265 7475 726e should be return │ │ │ │ -00144e90: 6564 2e20 466f 7220 6578 616d 706c 652c ed. For example, │ │ │ │ -00144ea0: 203c 636f 6465 3e72 6574 7572 6e20 3430 return 40 │ │ │ │ -00144eb0: 343c 2f63 6f64 653e 2072 6574 7572 6e73 4 returns │ │ │ │ -00144ec0: 2022 3430 3420 4e6f 7420 466f 756e 6422 "404 Not Found" │ │ │ │ -00144ed0: 2074 6f20 7468 6520 636c 6965 6e74 2061 to the client a │ │ │ │ -00144ee0: 6e64 2074 6865 203c 636f 6465 3e3c 6120 nd the soap::error variab │ │ │ │ -00144fb0: 6c65 2069 7320 7365 7420 746f 2034 3034 le is set to 404 │ │ │ │ -00144fc0: 2061 7420 7468 6520 636c 6965 6e74 2073 at the client s │ │ │ │ -00144fd0: 6964 652e 3c2f 703e 0a3c 703e 546f 2072 ide.

    .

    To r │ │ │ │ -00144fe0: 6574 7572 6e20 6120 534f 4150 2046 6175 eturn a SOAP Fau │ │ │ │ -00144ff0: 6c74 2066 726f 6d20 6120 7365 7276 6572 lt from a server │ │ │ │ -00145000: 2d73 6964 6520 696d 706c 656d 656e 7461 -side implementa │ │ │ │ -00145010: 7469 6f6e 206f 6620 6120 7365 7276 6963 tion of a servic │ │ │ │ -00145020: 6520 6f70 6572 6174 696f 6e2c 2075 7365 e operation, use │ │ │ │ -00145030: 206f 6e65 206f 6620 7468 6520 666f 6c6c one of the foll │ │ │ │ -00145040: 6f77 696e 6720 6675 6e63 7469 6f6e 7320 owing functions │ │ │ │ -00145050: 746f 2070 6f70 756c 6174 6520 7468 6520 to populate the │ │ │ │ -00145060: 534f 4150 2046 6175 6c74 206d 6573 7361 SOAP Fault messa │ │ │ │ -00145070: 6765 3a3c 2f70 3e3c 756c 3e0a 3c6c 693e ge:

    .

    A │ │ │ │ -00145950: 2072 6563 6569 7665 7220 6572 726f 7220 receiver error │ │ │ │ -00145960: 696e 6469 6361 7465 7320 7468 6174 2074 indicates that t │ │ │ │ -00145970: 6865 2073 6572 7669 6365 2063 6f75 6c64 he service could │ │ │ │ -00145980: 206e 6f74 2068 616e 646c 6520 7468 6520 not handle the │ │ │ │ -00145990: 636c 6965 6e74 2072 6571 7565 7374 2c20 client request, │ │ │ │ -001459a0: 6275 7420 6974 2063 616e 2070 6f73 7369 but it can possi │ │ │ │ -001459b0: 626c 7920 7265 636f 7665 7220 6672 6f6d bly recover from │ │ │ │ -001459c0: 2074 6865 2065 7272 6f72 206c 6174 6572 the error later │ │ │ │ -001459d0: 2c20 666f 7220 6578 616d 706c 6520 7768 , for example wh │ │ │ │ -001459e0: 656e 2072 6573 6f75 7263 6573 2061 7265 en resources are │ │ │ │ -001459f0: 2074 656d 706f 7261 7269 6c79 2075 6e61 temporarily una │ │ │ │ -00145a00: 7661 696c 6162 6c65 2e20 4120 7365 6e64 vailable. A send │ │ │ │ -00145a10: 6572 2065 7272 6f72 2069 6e64 6963 6174 er error indicat │ │ │ │ -00145a20: 6573 2074 6861 7420 7468 6520 636c 6965 es that the clie │ │ │ │ -00145a30: 6e74 2072 6571 7565 7374 2069 7320 6661 nt request is fa │ │ │ │ -00145a40: 756c 7479 2061 6e64 2073 2072 656a 6563 ulty and s rejec │ │ │ │ -00145a50: 7465 6420 6279 2074 6865 2073 6572 7669 ted by the servi │ │ │ │ -00145a60: 6365 2e3c 2f70 3e0a 3c70 3e53 6565 2053 ce.

    .

    See S │ │ │ │ -00145a70: 6563 7469 6f6e 203c 6120 636c 6173 733d ection SOA │ │ │ │ -00145aa0: 5020 4661 756c 7420 7072 6f63 6573 7369 P Fault processi │ │ │ │ -00145ab0: 6e67 3c2f 613e 2066 6f72 206d 6f72 6520 ng for more │ │ │ │ -00145ac0: 6465 7461 696c 7320 6f6e 2068 6f77 2074 details on how t │ │ │ │ -00145ad0: 6f20 7573 6520 7468 6573 6520 6675 6e63 o use these func │ │ │ │ -00145ae0: 7469 6f6e 732e 3c2f 703e 0a3c 703e f09f tions.

    .

    .. │ │ │ │ -00145af0: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ -00145b00: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ -00145b10: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ -00145b20: 0a3c 6831 3e3c 6120 636c 6173 733d 2261 .

    .Memory m │ │ │ │ -00145b50: 616e 6167 656d 656e 743c 2f68 313e 0a3c anagement

    .< │ │ │ │ -00145b60: 703e 4d65 6d6f 7279 206d 616e 6167 656d p>Memory managem │ │ │ │ -00145b70: 656e 7420 7769 7468 2067 534f 4150 2069 ent with gSOAP i │ │ │ │ -00145b80: 7320 6175 746f 6d61 7469 632e 2054 6865 s automatic. The │ │ │ │ -00145b90: 2065 6e67 696e 6520 636f 6e74 6578 7420 engine context │ │ │ │ -00145ba0: 6d61 6e61 6765 7320 616c 6c20 6d65 6d6f manages all memo │ │ │ │ -00145bb0: 7279 2061 6c6c 6f63 6174 6564 2074 6f20 ry allocated to │ │ │ │ -00145bc0: 7365 7269 616c 697a 6520 6461 7461 2061 serialize data a │ │ │ │ -00145bd0: 6e64 2066 6f72 2074 656d 706f 7261 7279 nd for temporary │ │ │ │ -00145be0: 2073 746f 7261 6765 2e20 4465 7365 7269 storage. Deseri │ │ │ │ -00145bf0: 616c 697a 6564 2064 6174 6120 6973 2061 alized data is a │ │ │ │ -00145c00: 6c6c 6f63 6174 6564 2069 6e20 6d61 6e61 llocated in mana │ │ │ │ -00145c10: 6765 6420 6d65 6d6f 7279 2061 6e64 2064 ged memory and d │ │ │ │ -00145c20: 6174 6120 7374 7275 6374 7572 6573 2063 ata structures c │ │ │ │ -00145c30: 616e 2062 6520 616c 6c6f 6361 7465 6420 an be allocated │ │ │ │ -00145c40: 696e 206d 616e 6167 6564 206d 656d 6f72 in managed memor │ │ │ │ -00145c50: 7920 6279 2074 6865 2075 7365 7220 7768 y by the user wh │ │ │ │ -00145c60: 656e 2064 6573 6972 6564 2075 7369 6e67 en desired using │ │ │ │ -00145c70: 203c 636f 6465 3e73 6f61 705f 6e65 775f soap_new_ │ │ │ │ -00145c80: 543c 2f63 6f64 653e 2066 756e 6374 696f T functio │ │ │ │ -00145c90: 6e73 2067 656e 6572 6174 6564 2062 7920 ns generated by │ │ │ │ -00145ca0: 736f 6170 6370 7032 2066 6f72 2065 6163 soapcpp2 for eac │ │ │ │ -00145cb0: 6820 7365 7269 616c 697a 6162 6c65 2074 h serializable t │ │ │ │ -00145cc0: 7970 6520 3c63 6f64 653e 543c 2f63 6f64 ype T. All memory m │ │ │ │ -00145ce0: 616e 6167 6564 2062 7920 6120 636f 6e74 anaged by a cont │ │ │ │ -00145cf0: 6578 7420 6973 2064 6561 6c6c 6f63 6174 ext is deallocat │ │ │ │ -00145d00: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soa │ │ │ │ -00145dc0: 705f 6465 7374 726f 793c 2f61 3e3c 2f63 p_destroy to destroy │ │ │ │ -00145de0: 6d61 6e61 6765 6420 432b 2b20 6f62 6a65 managed C++ obje │ │ │ │ -00145df0: 6374 7320 616e 6420 3c63 6f64 653e 3c61 cts and soap_end to delete │ │ │ │ -00145ee0: 616c 6c20 6f74 6865 7220 6d61 6e61 6765 all other manage │ │ │ │ -00145ef0: 6420 6461 7461 2e20 5768 656e 2061 2063 d data. When a c │ │ │ │ -00145f00: 6f6e 7465 7874 2069 7320 6669 6e61 6c69 ontext is finali │ │ │ │ -00145f10: 7a65 6420 6f72 2066 7265 6564 2077 6974 zed or freed wit │ │ │ │ -00145f20: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap │ │ │ │ -00145ff0: 5f64 6f6e 6528 7374 7275 6374 2073 6f61 _done(struct soa │ │ │ │ -00146000: 702a 293c 2f61 3e3c 2f63 6f64 653e 2061 p*) a │ │ │ │ -00146010: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap_fr │ │ │ │ -001460c0: 6565 2873 7472 7563 7420 736f 6170 2a29 ee(struct soap*) │ │ │ │ -001460d0: 3c2f 613e 3c2f 636f 6465 3e20 7468 656e then │ │ │ │ -001460e0: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory │ │ │ │ -001460f0: 6973 206e 6f74 2072 656c 6561 7365 642c is not released, │ │ │ │ -00146100: 2073 6f20 6974 2069 7320 696d 706f 7274 so it is import │ │ │ │ -00146110: 616e 7420 746f 2063 616c 6c20 7468 6520 ant to call the │ │ │ │ -00146120: 6465 616c 6c6f 6361 7469 6f6e 2066 756e deallocation fun │ │ │ │ -00146130: 6374 696f 6e73 2066 6972 7374 2e20 5468 ctions first. Th │ │ │ │ -00146140: 6973 2077 6173 2064 6f6e 6520 746f 2061 is was done to a │ │ │ │ -00146150: 6c6c 6f77 206d 616e 6167 6564 2064 6174 llow managed dat │ │ │ │ -00146160: 6120 746f 206f 7574 6c69 7665 2074 6865 a to outlive the │ │ │ │ -00146170: 2063 6f6e 7465 7874 2c20 7375 6368 2061 context, such a │ │ │ │ -00146180: 7320 6465 7365 7269 616c 697a 6564 206f s deserialized o │ │ │ │ -00146190: 626a 6563 7473 2c20 6275 7420 7468 6973 bjects, but this │ │ │ │ -001461a0: 2069 7320 7261 7265 6c79 2069 6620 6576 is rarely if ev │ │ │ │ -001461b0: 6572 2075 7365 6420 6265 6361 7573 6520 er used because │ │ │ │ -001461c0: 6465 6c65 7469 6e67 2074 6865 206f 7574 deleting the out │ │ │ │ -001461d0: 6c69 7665 6420 6461 7461 2065 7870 6c69 lived data expli │ │ │ │ -001461e0: 6369 746c 7920 6973 2070 726f 6e65 2074 citly is prone t │ │ │ │ -001461f0: 6f20 6d69 7374 616b 6573 2e3c 2f70 3e0a o mistakes.

    . │ │ │ │ -00146200: 3c70 3e49 6620 796f 7520 7761 6e74 2074

    If you want t │ │ │ │ -00146210: 6f20 6c65 7420 6465 7365 7269 616c 697a o let deserializ │ │ │ │ -00146220: 6564 2064 6174 6120 6f75 746c 6976 6520 ed data outlive │ │ │ │ -00146230: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap context that │ │ │ │ -001462a0: 2079 6f75 2061 7265 2061 626f 7574 2074 you are about t │ │ │ │ -001462b0: 6f20 6672 6565 2c20 7468 656e 2079 6f75 o free, then you │ │ │ │ -001462c0: 2063 616e 2064 656c 6567 6174 6520 6d61 can delegate ma │ │ │ │ -001462d0: 6e61 6765 6d65 6e74 206f 6620 7468 6520 nagement of the │ │ │ │ -001462e0: 6461 7461 2074 6f20 616e 6f74 6865 7220 data to another │ │ │ │ -001462f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with < │ │ │ │ -00146360: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_de │ │ │ │ -00146430: 6c65 6761 7465 5f64 656c 6574 696f 6e28 legate_deletion( │ │ │ │ -00146440: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ -00146450: 705f 6672 6f6d 2c20 7374 7275 6374 2073 p_from, struct s │ │ │ │ -00146460: 6f61 7020 2a73 6f61 705f 746f 293c 2f61 oap *soap_to). This m │ │ │ │ -00146480: 6f76 6573 2061 6c6c 2064 6573 6572 6961 oves all deseria │ │ │ │ -00146490: 6c69 7a65 6420 616e 6420 7465 6d70 6f72 lized and tempor │ │ │ │ -001464a0: 6172 7920 6461 7461 2074 6f20 7468 6520 ary data to the │ │ │ │ -001464b0: 6f74 6865 7220 3c63 6f64 653e 3c61 2063 other soap │ │ │ │ -00146510: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context │ │ │ │ -00146520: 3c63 6f64 653e 736f 6170 5f74 6f3c 2f63 soap_to, which will │ │ │ │ -00146540: 2064 656c 6574 6520 6974 7320 6461 7461 delete its data │ │ │ │ -00146550: 2061 6e64 2061 6c6c 2074 6865 2064 656c and all the del │ │ │ │ -00146560: 6567 6174 6564 2064 6174 6120 6974 2069 egated data it i │ │ │ │ -00146570: 7320 7265 7370 6f6e 7369 626c 6520 666f s responsible fo │ │ │ │ -00146580: 7220 7768 656e 2079 6f75 2063 616c 6c20 r when you call │ │ │ │ -00146590: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_destro │ │ │ │ -00146650: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and │ │ │ │ -00146660: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_ │ │ │ │ -00146730: 656e 643c 2f61 3e3c 2f63 6f64 653e 2e20 end. │ │ │ │ -00146740: 5468 6973 2063 616e 2062 6520 7061 7274 This can be part │ │ │ │ -00146750: 6963 756c 6172 6c79 2075 7365 6675 6c20 icularly useful │ │ │ │ -00146760: 666f 7220 6d61 6b69 6e67 2063 6c69 656e for making clien │ │ │ │ -00146770: 7420 6361 6c6c 7320 696e 7369 6465 2061 t calls inside a │ │ │ │ -00146780: 2073 6572 7665 7220 6f70 6572 6174 696f server operatio │ │ │ │ -00146790: 6e2c 2069 2e65 2e20 6120 6d69 7865 6420 n, i.e. a mixed │ │ │ │ -001467a0: 7365 7276 6572 2061 6e64 2063 6c69 656e server and clien │ │ │ │ -001467b0: 742e 2054 6865 2063 6c69 656e 7420 6361 t. The client ca │ │ │ │ -001467c0: 6c6c 2069 6e73 6964 6520 7468 6520 7365 ll inside the se │ │ │ │ -001467d0: 7276 6572 206f 7065 7261 7469 6f6e 2072 rver operation r │ │ │ │ -001467e0: 6571 7569 7265 7320 6120 6e65 7720 3c63 equires a new │ │ │ │ -00146840: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap │ │ │ │ -00146850: 636f 6e74 6578 742c 2065 2e67 2e20 636f context, e.g. co │ │ │ │ -00146860: 7069 6564 2066 726f 6d20 7468 6520 7365 pied from the se │ │ │ │ -00146870: 7276 6572 2773 2077 6974 6820 3c63 6f64 rver's with soa │ │ │ │ -00146930: 705f 636f 7079 3c2f 613e 3c2f 636f 6465 p_copy. Before destro │ │ │ │ -00146950: 7969 6e67 2074 6865 2063 6c69 656e 7420 ying the client │ │ │ │ -00146960: 636f 6e74 6578 7420 7769 7468 203c 636f context with soap_free │ │ │ │ -00146a20: 3c2f 636f 6465 3e2c 2074 6865 2064 6174 , the dat │ │ │ │ -00146a30: 6120 6361 6e20 6265 2064 656c 6567 6174 a can be delegat │ │ │ │ -00146a40: 6564 2074 6f20 7468 6520 7365 7276 6572 ed to the server │ │ │ │ -00146a50: 2773 2063 6f6e 7465 7874 2077 6974 6820 's context with │ │ │ │ -00146a60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d │ │ │ │ -00146b30: 656c 6567 6174 655f 6465 6c65 7469 6f6e elegate_deletion │ │ │ │ -00146b40: 3c2f 613e 3c2f 636f 6465 3e2e 2053 6565 . See │ │ │ │ -00146b50: 2066 6f72 2065 7861 6d70 6c65 203c 656d for example gsoap/sam │ │ │ │ -00146b70: 706c 6573 2f6d 6173 6875 702f 6d61 7368 ples/mashup/mash │ │ │ │ -00146b80: 7570 7365 7276 6572 2e63 3c2f 636f 6465 upserver.c in the gS │ │ │ │ -00146ba0: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code │ │ │ │ -00146bb0: 7061 636b 6167 652e 3c2f 703e 0a3c 703e package.

    .

    │ │ │ │ -00146bc0: 5468 6520 6675 6e63 7469 6f6e 7320 7265 The functions re │ │ │ │ -00146bd0: 6c61 7465 6420 746f 206d 656d 6f72 7920 lated to memory │ │ │ │ -00146be0: 6d61 6e61 6765 6d65 6e74 2062 7920 7468 management by th │ │ │ │ -00146bf0: 6520 636f 6e74 6578 7420 6172 653a 3c2f e context are:.

    .

    To help underst │ │ │ │ -00148180: 616e 6420 7468 6520 6469 6666 6572 656e and the differen │ │ │ │ -00148190: 6365 7320 6265 7477 6565 6e20 6d61 6e61 ces between mana │ │ │ │ -001481a0: 6765 6420 6f62 6a65 6374 732c 206d 616e ged objects, man │ │ │ │ -001481b0: 6167 6564 2064 6174 612c 2061 6e64 206d aged data, and m │ │ │ │ -001481c0: 616e 6167 6564 2074 656d 706f 7261 7279 anaged temporary │ │ │ │ -001481d0: 2064 6174 613a 2074 656d 706f 7261 7279 data: temporary │ │ │ │ -001481e0: 2064 6174 6120 6973 2063 7265 6174 6564 data is created │ │ │ │ -001481f0: 2062 7920 7468 6520 656e 6769 6e65 2074 by the engine t │ │ │ │ -00148200: 6f20 6b65 6570 2074 7261 636b 206f 6620 o keep track of │ │ │ │ -00148210: 7468 696e 6773 2c20 7375 6368 2061 7320 things, such as │ │ │ │ -00148220: 6861 7368 2074 6162 6c65 7320 746f 206b hash tables to k │ │ │ │ -00148230: 6565 7020 706f 696e 7465 7220 7265 6665 eep pointer refe │ │ │ │ -00148240: 7265 6e63 6520 696e 666f 726d 6174 696f rence informatio │ │ │ │ -00148250: 6e20 666f 7220 7365 7269 616c 697a 6174 n for serializat │ │ │ │ -00148260: 696f 6e20 616e 6420 6861 7368 2074 6162 ion and hash tab │ │ │ │ -00148270: 6c65 7320 746f 206b 6565 7020 584d 4c20 les to keep XML │ │ │ │ -00148280: 6964 2f68 7265 6620 696e 666f 726d 6174 id/href informat │ │ │ │ -00148290: 696f 6e20 666f 7220 6d75 6c74 692d 7265 ion for multi-re │ │ │ │ -001482a0: 6665 7265 6e63 6520 6f62 6a65 6374 2064 ference object d │ │ │ │ -001482b0: 6573 6572 6961 6c69 7a61 7469 6f6e 2e20 eserialization. │ │ │ │ -001482c0: 4465 7365 7269 616c 697a 6564 2064 6174 Deserialized dat │ │ │ │ -001482d0: 6120 6973 2061 6c6c 6f63 6174 6564 2062 a is allocated b │ │ │ │ -001482e0: 7920 7468 6520 636f 6e74 6578 7420 696e y the context in │ │ │ │ -001482f0: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory │ │ │ │ -00148300: 7768 656e 2063 6f6e 7374 7275 6374 696e when constructin │ │ │ │ -00148310: 6720 6461 7461 2073 7472 7563 7475 7265 g data structure │ │ │ │ -00148320: 7320 6279 2064 6573 6572 6961 6c69 7a69 s by deserializi │ │ │ │ -00148330: 6e67 2058 4d4c 2061 6e64 204a 534f 4e20 ng XML and JSON │ │ │ │ -00148340: 6d65 7373 6167 6573 2e20 4461 7461 2069 messages. Data i │ │ │ │ -00148350: 7320 7374 6f72 6564 2069 6e20 6d65 6d6f s stored in memo │ │ │ │ -00148360: 7279 206d 616e 6167 6564 2062 7920 7468 ry managed by th │ │ │ │ -00148370: 6520 636f 6e74 6578 7420 7573 696e 6720 e context using │ │ │ │ -00148380: 6361 6c6c 7320 746f 203c 636f 6465 3e3c calls to < │ │ │ │ -00148390: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001483a0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -001483b0: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga │ │ │ │ -001483c0: 6261 3535 3637 3130 6530 3130 6665 6562 ba556710e010feeb │ │ │ │ -001483d0: 3232 3131 6564 3433 6235 6266 3035 3963 2211ed43b5bf059c │ │ │ │ -001483e0: 2220 7469 746c 653d 2241 6c6c 6f63 6174 " title="Allocat │ │ │ │ -001483f0: 6520 6120 626c 6f63 6b20 6f66 2068 6561 e a block of hea │ │ │ │ -00148400: 7020 6d65 6d6f 7279 206d 616e 6167 6564 p memory managed │ │ │ │ -00148410: 2062 7920 7468 6520 7370 6563 6966 6965 by the specifie │ │ │ │ -00148420: 6420 736f 6170 2063 6f6e 7465 7874 2e22 d soap context." │ │ │ │ -00148430: 3e73 6f61 705f 6d61 6c6c 6f63 3c2f 613e >soap_malloc │ │ │ │ -00148440: 3c2f 636f 6465 3e20 746f 2061 6c6c 6f63 to alloc │ │ │ │ -00148450: 6174 6520 6865 6170 2073 7061 6365 2077 ate heap space w │ │ │ │ -00148460: 6974 6820 3c63 6f64 653e 6d61 6c6c 6f63 ith malloc │ │ │ │ -00148470: 3c2f 636f 6465 3e2e 2041 2074 696e 7920 . A tiny │ │ │ │ -00148480: 6269 7420 6d6f 7265 2073 7061 6365 2069 bit more space i │ │ │ │ -00148490: 7320 616c 6c6f 6361 7465 6420 746f 206b s allocated to k │ │ │ │ -001484a0: 6565 7020 7472 6163 6b20 6f66 2074 6865 eep track of the │ │ │ │ -001484b0: 2061 6c6c 6f63 6174 696f 6e73 2061 6e64 allocations and │ │ │ │ -001484c0: 2074 6f20 6164 6420 6120 2263 616e 6172 to add a "canar │ │ │ │ -001484d0: 7922 2077 6f72 6420 746f 2064 6574 6563 y" word to detec │ │ │ │ -001484e0: 7420 6865 6170 206d 656d 6f72 7920 6f76 t heap memory ov │ │ │ │ -001484f0: 6572 666c 6f77 732e 2048 6561 7020 6d65 erflows. Heap me │ │ │ │ -00148500: 6d6f 7279 206f 7665 7266 6c6f 7773 2061 mory overflows a │ │ │ │ -00148510: 7265 2064 6574 6563 7465 6420 7768 656e re detected when │ │ │ │ -00148520: 2063 6f6e 7465 7874 2d6d 616e 6167 6564 context-managed │ │ │ │ -00148530: 2064 6174 6120 6973 2064 6561 6c6c 6f63 data is dealloc │ │ │ │ -00148540: 6174 6564 2077 6974 6820 3c63 6f64 653e ated with │ │ │ │ -00148550: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_end │ │ │ │ -00148620: 3c2f 636f 6465 3e2e 2043 2b2b 206f 626a . C++ obj │ │ │ │ -00148630: 6563 7473 2061 7265 2061 6c6c 6f63 6174 ects are allocat │ │ │ │ -00148640: 6564 2077 6974 6820 3c63 6f64 653e 6e65 ed with ne │ │ │ │ -00148650: 773c 2f63 6f64 653e 2069 6e73 7465 6164 w instead │ │ │ │ -00148660: 206f 6620 3c63 6f64 653e 6d61 6c6c 6f63 of malloc │ │ │ │ -00148670: 3c2f 636f 6465 3e20 616e 6420 6172 6520 and are │ │ │ │ -00148680: 7472 6163 6b65 6420 6173 2077 656c 6c2e tracked as well. │ │ │ │ -00148690: 2054 6865 7365 206f 626a 6563 7473 2061 These objects a │ │ │ │ -001486a0: 7265 2064 6561 6c6c 6f63 6174 6564 2077 re deallocated w │ │ │ │ -001486b0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_de │ │ │ │ -00148770: 7374 726f 793c 2f61 3e3c 2f63 6f64 653e stroy │ │ │ │ -00148780: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 7468 .

    .

    When th │ │ │ │ -00148790: 6520 6753 4f41 5020 6170 706c 6963 6174 e gSOAP applicat │ │ │ │ -001487a0: 696f 6e20 6973 2063 6f6d 7069 6c65 6420 ion is compiled │ │ │ │ -001487b0: 7769 7468 203c 623e 3c63 6f64 653e 2d44 with -D │ │ │ │ -001487c0: 4445 4255 473c 2f63 6f64 653e 3c2f 623e DEBUG │ │ │ │ -001487d0: 2075 7369 6e67 2074 6865 2063 6f6d 7069 using the compi │ │ │ │ -001487e0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #DEBUG │ │ │ │ -00148800: 2c20 7468 6520 656e 6769 6e65 2072 6570 , the engine rep │ │ │ │ -00148810: 6f72 7473 206d 656d 6f72 7920 6c65 616b orts memory leak │ │ │ │ -00148820: 7320 7768 6963 6820 6172 6520 6465 7465 s which are dete │ │ │ │ -00148830: 6374 6564 2062 7920 3c63 6f64 653e 3c61 cted by soap_done< │ │ │ │ -00148910: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_free. To improv │ │ │ │ -001489e0: 6520 7468 6520 6163 6375 7261 6379 206f e the accuracy o │ │ │ │ -001489f0: 6620 6465 7465 6374 696f 6e2c 206e 6f20 f detection, no │ │ │ │ -00148a00: 6d65 6d6f 7279 2069 7320 6163 7475 616c memory is actual │ │ │ │ -00148a10: 6c79 2066 7265 6564 2075 6e74 696c 203c ly freed until < │ │ │ │ -00148a20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_do │ │ │ │ -00148af0: 6e65 3c2f 613e 3c2f 636f 6465 3e20 6f72 ne or │ │ │ │ -00148b00: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_free │ │ │ │ -00148bb0: 3c2f 613e 3c2f 636f 6465 3e20 6172 6520 are │ │ │ │ -00148bc0: 6361 6c6c 6564 2074 6f20 6465 7465 6374 called to detect │ │ │ │ -00148bd0: 206d 656d 6f72 7920 6973 7375 6573 2c20 memory issues, │ │ │ │ -00148be0: 736f 2061 6e79 2063 616c 6c73 2074 6f20 so any calls to │ │ │ │ -00148bf0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_destro │ │ │ │ -00148cb0: 793c 2f61 3e3c 2f63 6f64 653e 2061 6e64 y and │ │ │ │ -00148cc0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_ │ │ │ │ -00148d90: 656e 643c 2f61 3e3c 2f63 6f64 653e 2061 end a │ │ │ │ -00148da0: 7265 2061 6374 7561 6c6c 7920 6465 6665 re actually defe │ │ │ │ -00148db0: 7272 6564 2074 6f20 6265 2065 7865 6375 rred to be execu │ │ │ │ -00148dc0: 7465 6420 7768 656e 2074 6865 2063 6f6e ted when the con │ │ │ │ -00148dd0: 7465 7874 2066 696e 616c 697a 6573 2e3c text finalizes.< │ │ │ │ -00148de0: 2f70 3e0a 3c70 3e57 6869 6c65 206d 656d /p>.

    While mem │ │ │ │ -00148df0: 6f72 7920 6d61 6e61 6765 6d65 6e74 2069 ory management i │ │ │ │ -00148e00: 6e20 6753 4f41 5020 6973 2061 7574 6f6d n gSOAP is autom │ │ │ │ -00148e10: 6174 6963 2c20 6974 2064 6f65 7320 6e6f atic, it does no │ │ │ │ -00148e20: 7420 656e 666f 7263 6520 6974 7320 6f77 t enforce its ow │ │ │ │ -00148e30: 6e20 6d65 6d6f 7279 206d 616e 6167 656d n memory managem │ │ │ │ -00148e40: 656e 7420 706f 6c69 6379 206f 6e20 7468 ent policy on th │ │ │ │ -00148e50: 6520 7573 6572 2e20 546f 206d 6f76 6520 e user. To move │ │ │ │ -00148e60: 6d61 6e61 6765 6420 6f62 6a65 6374 7320 managed objects │ │ │ │ -00148e70: 616e 6420 6461 7461 2069 6e74 6f20 756e and data into un │ │ │ │ -00148e80: 6d61 6e61 6765 6420 6865 6170 2073 7061 managed heap spa │ │ │ │ -00148e90: 6365 2c20 7468 6520 3c63 6f64 653e 736f ce, the so │ │ │ │ -00148ea0: 6170 5f64 7570 5f54 3c2f 636f 6465 3e20 ap_dup_T │ │ │ │ -00148eb0: 6465 6570 2063 6f70 7920 6675 6e63 7469 deep copy functi │ │ │ │ -00148ec0: 6f6e 7320 6765 6e65 7261 7465 6420 6279 ons generated by │ │ │ │ -00148ed0: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp │ │ │ │ -00148ee0: 7032 202d 4563 3c2f 636f 6465 3e3c 2f62 p2 -Ec option -Ec │ │ │ │ -00148f10: 2063 616e 2062 6520 7573 6564 2e20 546f can be used. To │ │ │ │ -00148f20: 2064 656c 6574 6520 6465 6570 2063 6f70 delete deep cop │ │ │ │ -00148f30: 6965 732c 2074 6865 203c 636f 6465 3e73 ies, the s │ │ │ │ -00148f40: 6f61 705f 6465 6c5f 543c 2f63 6f64 653e oap_del_T │ │ │ │ -00148f50: 2064 6565 7020 6465 6c65 7469 6f6e 2066 deep deletion f │ │ │ │ -00148f60: 756e 6374 696f 6e73 2067 656e 6572 6174 unctions generat │ │ │ │ -00148f70: 6564 2062 7920 3c62 3e3c 636f 6465 3e73 ed by s │ │ │ │ -00148f80: 6f61 7063 7070 3220 2d45 643c 2f63 6f64 oapcpp2 -Ed option -Ed can be use │ │ │ │ -00148fc0: 642e 2041 6674 6572 2063 6f70 7969 6e67 d. After copying │ │ │ │ -00148fd0: 2074 6865 2075 7375 616c 203c 636f 6465 the usual │ │ │ │ -00149090: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy │ │ │ │ -001490a0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap_end functi │ │ │ │ -00149190: 6f6e 7320 7265 6d6f 7665 2074 6865 206d ons remove the m │ │ │ │ -001491a0: 616e 6167 6564 206f 7269 6769 6e61 6c73 anaged originals │ │ │ │ -001491b0: 2e20 5365 6520 616c 736f 2053 6563 7469 . See also Secti │ │ │ │ -001491c0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Generati │ │ │ │ -001491f0: 6e67 2064 6565 7020 636f 7079 2061 6e64 ng deep copy and │ │ │ │ -00149200: 2064 656c 6574 696f 6e20 6675 6e63 7469 deletion functi │ │ │ │ -00149210: 6f6e 733c 2f61 3e2e 3c2f 703e 0a3c 703e ons.

    .

    │ │ │ │ -00149220: 4675 7274 6865 726d 6f72 652c 2074 6865 Furthermore, the │ │ │ │ -00149230: 206d 656d 6f72 7920 616c 6c6f 6361 7469 memory allocati │ │ │ │ -00149240: 6f6e 2066 756e 6374 696f 6e73 203c 636f on functions malloc │ │ │ │ -00149260: 2061 6e64 203c 636f 6465 3e6e 6577 3c2f and new used by th │ │ │ │ -00149280: 6520 656e 6769 6e65 2069 6e74 6572 6e61 e engine interna │ │ │ │ -00149290: 6c6c 7920 6361 6e20 6265 2072 6570 6c61 lly can be repla │ │ │ │ -001492a0: 6365 6420 7769 7468 206f 7468 6572 2061 ced with other a │ │ │ │ -001492b0: 6c6c 6f63 6174 6f72 7320 6279 2064 6566 llocators by def │ │ │ │ -001492c0: 696e 696e 6720 3c63 6f64 653e 534f 4150 ining SOAP │ │ │ │ -001492d0: 5f4d 414c 4c4f 433c 2f63 6f64 653e 2061 _MALLOC a │ │ │ │ -001492e0: 6e64 203c 636f 6465 3e53 4f41 505f 4652 nd SOAP_FR │ │ │ │ -001492f0: 4545 3c2f 636f 6465 3e20 746f 2072 6570 EE to rep │ │ │ │ -00149300: 6c61 6365 203c 636f 6465 3e6d 616c 6c6f lace mallo │ │ │ │ -00149310: 633c 2f63 6f64 653e 2061 6e64 203c 636f c and free, │ │ │ │ -00149330: 616e 6420 6465 6669 6e65 203c 636f 6465 and define SOAP_NEW │ │ │ │ -00149350: 2c20 3c63 6f64 653e 534f 4150 5f4e 4557 , SOAP_NEW │ │ │ │ -00149360: 5f41 5252 4159 3c2f 636f 6465 3e2c 203c _ARRAY, < │ │ │ │ -00149370: 636f 6465 3e53 4f41 505f 504c 4143 454d code>SOAP_PLACEM │ │ │ │ -00149380: 454e 545f 4e45 573c 2f63 6f64 653e 2c20 ENT_NEW, │ │ │ │ -00149390: 616e 6420 3c63 6f64 653e 534f 4150 5f44 and SOAP_D │ │ │ │ -001493a0: 454c 4554 453c 2f63 6f64 653e 2c20 3c63 ELETE, SOAP_DELETE_ │ │ │ │ -001493c0: 4152 5241 593c 2f63 6f64 653e 2074 6f20 ARRAY to │ │ │ │ -001493d0: 7265 706c 6163 6520 3c63 6f64 653e 6e65 replace ne │ │ │ │ -001493e0: 773c 2f63 6f64 653e 2061 6e64 203c 636f w and delete │ │ │ │ -00149400: 2075 7365 6420 6279 2074 6865 2065 6e67 used by the eng │ │ │ │ -00149410: 696e 6520 746f 2061 6c6c 6f63 6174 6520 ine to allocate │ │ │ │ -00149420: 6d61 6e61 6765 6420 6d65 6d6f 7279 2e20 managed memory. │ │ │ │ -00149430: 4f6e 6520 6361 6e20 666f 7220 6578 616d One can for exam │ │ │ │ -00149440: 706c 6520 7573 6520 6120 6761 7262 6167 ple use a garbag │ │ │ │ -00149450: 6520 636f 6c6c 6563 746f 7220 7769 7468 e collector with │ │ │ │ -00149460: 2067 534f 4150 2062 7920 6465 6669 6e69 gSOAP by defini │ │ │ │ -00149470: 6e67 2073 7569 7461 626c 6520 7265 706c ng suitable repl │ │ │ │ -00149480: 6163 656d 656e 7473 2e3c 2f70 3e0a 3c70 acements.

    .

    More informatio │ │ │ │ -001494a0: 6e20 6f6e 206d 656d 6f72 7920 6d61 6e61 n on memory mana │ │ │ │ -001494b0: 6765 6d65 6e74 2063 616e 2062 6520 666f gement can be fo │ │ │ │ -001494c0: 756e 6420 696e 2074 6865 203c 6120 6872 und in the C and C++ │ │ │ │ -00149500: 2058 4d4c 2044 6174 6120 4269 6e64 696e XML Data Bindin │ │ │ │ -00149510: 6773 3c2f 613e 2064 6f63 756d 656e 7461 gs documenta │ │ │ │ -00149520: 7469 6f6e 2074 6861 7420 6861 7320 7365 tion that has se │ │ │ │ -00149530: 7061 7261 7465 2073 6563 7469 6f6e 7320 parate sections │ │ │ │ -00149540: 6f6e 206d 656d 6f72 7920 6d61 6e61 6765 on memory manage │ │ │ │ -00149550: 6d65 6e74 2069 6e20 4320 616e 6420 696e ment in C and in │ │ │ │ -00149560: 2043 2b2b 2e3c 2f70 3e0a 3c70 3ef0 9f94 C++.

    .

    ... │ │ │ │ -00149570: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -00149580: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -00149590: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -001495a0: 3c68 313e 3c61 2063 6c61 7373 3d22 616e

    .Intr │ │ │ │ -001495d0: 612d 636c 6173 7320 6d65 6d6f 7279 206d a-class memory m │ │ │ │ -001495e0: 616e 6167 656d 656e 743c 2f68 313e 0a3c anagement

    .< │ │ │ │ -001495f0: 703e 5768 656e 2061 2063 6c61 7373 203c p>When a class < │ │ │ │ -00149600: 636f 6465 3e54 3c2f 636f 6465 3e20 6861 code>T
    ha │ │ │ │ -00149610: 7320 6120 3c63 6f64 653e 7374 7275 6374 s a struct │ │ │ │ -00149620: 2073 6f61 7020 2a20 543a 3a73 6f61 703c soap * T::soap< │ │ │ │ -00149630: 2f63 6f64 653e 206d 656d 6265 7220 6465 /code> member de │ │ │ │ -00149640: 636c 6172 6564 2069 6e20 616e 2069 6e74 clared in an int │ │ │ │ -00149650: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ -00149660: 6c65 2066 6f72 2073 6f61 7063 7070 322c le for soapcpp2, │ │ │ │ -00149670: 2074 6865 6e20 7468 6973 206d 656d 6265 then this membe │ │ │ │ -00149680: 7220 7769 6c6c 2062 6520 7365 7420 746f r will be set to │ │ │ │ -00149690: 2070 6f69 6e74 2074 6f20 7468 6520 6375 point to the cu │ │ │ │ -001496a0: 7272 656e 7420 636f 6e74 6578 7420 6279 rrent context by │ │ │ │ -001496b0: 2074 6865 2064 6573 6572 6961 6c69 7a65 the deserialize │ │ │ │ -001496c0: 7273 2061 6e64 2062 7920 7468 6520 3c63 rs and by the soap_default │ │ │ │ -001496e0: 3c2f 636f 6465 3e20 6d65 7468 6f64 206f method o │ │ │ │ -001496f0: 6620 7468 6520 636c 6173 7320 616e 6420 f the class and │ │ │ │ -00149700: 6279 2074 6865 203c 636f 6465 3e73 6f61 by the soa │ │ │ │ -00149710: 705f 6465 6661 756c 745f 543c 2f63 6f64 p_default_T and soa │ │ │ │ -00149730: 705f 6e65 775f 543c 2f63 6f64 653e 2066 p_new_T f │ │ │ │ -00149740: 756e 6374 696f 6e73 2066 6f72 2074 6869 unctions for thi │ │ │ │ -00149750: 7320 636c 6173 7320 6e61 6d65 6420 3c63 s class named T. Th │ │ │ │ -00149770: 6973 2073 696d 706c 6966 6965 7320 6d65 is simplifies me │ │ │ │ -00149780: 6d6f 7279 206d 616e 6167 656d 656e 7420 mory management │ │ │ │ -00149790: 6279 2063 6c61 7373 206d 6574 686f 6473 by class methods │ │ │ │ -001497a0: 2074 6861 7420 616c 6c6f 6361 7465 2064 that allocate d │ │ │ │ -001497b0: 6174 6120 6173 736f 6369 6174 6564 2077 ata associated w │ │ │ │ -001497c0: 6974 6820 7468 6520 636c 6173 7320 696e ith the class in │ │ │ │ -001497d0: 7374 616e 6365 2074 6861 7420 6d75 7374 stance that must │ │ │ │ -001497e0: 2062 6520 6d61 6e61 6765 6420 6279 2074 be managed by t │ │ │ │ -001497f0: 6865 2063 6f6e 7465 7874 2e3c 2f70 3e0a he context.

    . │ │ │ │ -00149800: 3c70 3e43 6f6e 7369 6465 7220 666f 7220

    Consider for │ │ │ │ -00149810: 6578 616d 706c 6520 7468 6520 666f 6c6c example the foll │ │ │ │ -00149820: 6f77 696e 6720 636c 6173 7320 6465 636c owing class decl │ │ │ │ -00149830: 6172 6174 696f 6e3a 3c2f 703e 0a3c 6469 aration:

    .
    class │ │ │ │ -00149880: 203c 2f73 7061 6e3e 436c 6173 7320 3c2f Class .
    { p │ │ │ │ -001498c0: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    Class( │ │ │ │ -001498f0: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    ~ │ │ │ │ -00149910: 436c 6173 7328 293b 3c2f 6469 763e 0a3c Class();
    .< │ │ │ │ -00149920: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00149930: 3e20 2020 203c 7370 616e 2063 6c61 7373 > struc │ │ │ │ -00149950: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ -00149980: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap;.
    char * │ │ │ │ -00149a20: 6e61 6d65 3b20 3c2f 6469 763e 0a3c 6469 name;
    . │ │ │ │ -00149a40: 2020 203c 7370 616e 2063 6c61 7373 3d22 voi │ │ │ │ -00149a60: 643c 2f73 7061 6e3e 2073 6574 4e61 6d65 d setName │ │ │ │ -00149a70: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (const ch │ │ │ │ -00149ab0: 6172 3c2f 7370 616e 3e20 2a73 293b 203c ar *s); < │ │ │ │ -00149ac0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *getName();.
    };
    .< │ │ │ │ -00149b30: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Since t │ │ │ │ -00149b50: 6865 203c 636f 6465 3e6e 616d 653c 2f63 he name member is a │ │ │ │ -00149b70: 2063 6861 7261 6374 6572 2070 6f69 6e74 character point │ │ │ │ -00149b80: 6572 2074 6f20 6120 7374 7269 6e67 2c20 er to a string, │ │ │ │ -00149b90: 7768 6572 6520 7368 6f75 6c64 2077 6520 where should we │ │ │ │ -00149ba0: 616c 6c6f 6361 7465 2074 6869 7320 7374 allocate this st │ │ │ │ -00149bb0: 7269 6e67 3f20 496e 206d 6f73 7420 6361 ring? In most ca │ │ │ │ -00149bc0: 7365 7320 7765 2077 696c 6c20 6164 6420 ses we will add │ │ │ │ -00149bd0: 6120 636f 6e73 7472 7563 746f 7220 7468 a constructor th │ │ │ │ -00149be0: 6174 2069 6e69 7469 616c 6c79 2073 6574 at initially set │ │ │ │ -00149bf0: 7320 3c63 6f64 653e 6e61 6d65 3c2f 636f s name to NULL and │ │ │ │ -00149c10: 6120 6465 7374 7275 6374 6f72 2074 6861 a destructor tha │ │ │ │ -00149c20: 7420 6465 6c65 7465 7320 3c63 6f64 653e t deletes │ │ │ │ -00149c30: 6e61 6d65 3c2f 636f 6465 3e20 7768 656e name when │ │ │ │ -00149c40: 206e 6f6e 2d4e 554c 4c2c 206c 696b 6520 non-NULL, like │ │ │ │ -00149c50: 736f 3a3c 2f70 3e0a 3c64 6976 2063 6c61 so:

    .
    │ │ │ │ -00149c80: 436c 6173 733a 3a43 6c61 7373 2829 203c Class::Class() < │ │ │ │ +001362a0: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine">class │ │ │ │ +001362c0: 203c 2f73 7061 6e3e 6e73 5f5f 6d79 436c ns__myCl │ │ │ │ +001362d0: 6173 7320 3c2f 6469 763e 0a3c 6469 7620 ass
    .
    { < │ │ │ │ +001362f0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00136300: 6f72 6422 3e70 7562 6c69 633c 2f73 7061 ord">public:
    .
    │ │ │ │ +00136330: 3c73 7061 6e20 636c 6173 733d 226b 6579 virtual v │ │ │ │ +00136370: 6f69 643c 2f73 7061 6e3e 2070 7269 6e74 oid print │ │ │ │ +00136380: 2873 7464 3a3a 6f73 7472 6561 6d20 2661 (std::ostream &a │ │ │ │ +00136390: 6d70 3b73 2920 3c73 7061 6e20 636c 6173 mp;s) cons │ │ │ │ +001363b0: 743c 2f73 7061 6e3e 3b20 3c73 7061 6e20 t; │ │ │ │ +001363d0: 2f2f 2077 6520 6e65 6564 2073 7464 3a3a // we need std:: │ │ │ │ +001363e0: 6f73 7472 6561 6d20 6865 7265 203c 2f73 ostream here
    .
    │ │ │ │ +00136410: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... //
    .
    };< │ │ │ │ +00136450: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +00136470: 5365 6520 616c 736f 2053 6563 7469 6f6e See also Section │ │ │ │ +00136480: 203c 6120 636c 6173 733d 2265 6c22 2068 Trans │ │ │ │ +001364b0: 6965 6e74 2064 6174 6120 7479 7065 733c ient data types< │ │ │ │ +001364c0: 2f61 3e20 2c20 6e6f 6e2d 7365 7269 616c /a> , non-serial │ │ │ │ +001364d0: 697a 6162 6c65 2064 6174 6120 7479 7065 izable data type │ │ │ │ +001364e0: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ +001364f0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +00136500: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +00136510: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6831 ents

    .

    .Run-time flag │ │ │ │ +00136550: 733c 2f68 313e 0a3c 703e 5468 6520 6753 s

    .

    The gS │ │ │ │ +00136560: 4f41 5020 656e 6769 6e65 2073 7461 7465 OAP engine state │ │ │ │ +00136570: 2069 7320 7374 6f72 6564 2069 6e20 7468 is stored in th │ │ │ │ +00136580: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context that │ │ │ │ +001365f0: 2069 7320 696e 6974 6961 6c69 7a65 6420 is initialized │ │ │ │ +00136600: 616e 6420 636f 6e74 726f 6c6c 6564 2062 and controlled b │ │ │ │ +00136610: 7920 7661 7269 6f75 7320 6f70 7469 6f6e y various option │ │ │ │ +00136620: 616c 2072 756e 7469 6d65 2066 6c61 6773 al runtime flags │ │ │ │ +00136630: 2e20 4d6f 7374 2066 6c61 6773 2061 7265 . Most flags are │ │ │ │ +00136640: 2061 7070 6c69 6361 626c 6520 746f 2065 applicable to e │ │ │ │ +00136650: 6974 6865 7220 7072 6f63 6573 7369 6e67 ither processing │ │ │ │ +00136660: 2069 6e70 7574 206f 7220 746f 2070 726f input or to pro │ │ │ │ +00136670: 6365 7373 696e 6720 6f75 7470 7574 2c20 cessing output, │ │ │ │ +00136680: 6275 7420 736f 6d65 2061 7265 2061 7070 but some are app │ │ │ │ +00136690: 6c69 6361 626c 6520 746f 2062 6f74 6820 licable to both │ │ │ │ +001366a0: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output │ │ │ │ +001366b0: 206d 6573 7361 6765 2061 6e64 2064 6f63 message and doc │ │ │ │ +001366c0: 756d 656e 7420 7072 6f63 6573 7369 6e67 ument processing │ │ │ │ +001366d0: 2e3c 2f70 3e0a 3c70 3e46 7572 7468 6572 .

    .

    Further │ │ │ │ +001366e0: 6d6f 7265 2c20 7468 6573 6520 666c 6167 more, these flag │ │ │ │ +001366f0: 7320 6172 6520 6469 7669 6465 6420 696e s are divided in │ │ │ │ +00136700: 746f 2066 6f75 7220 6361 7465 676f 7269 to four categori │ │ │ │ +00136710: 6573 3a20 7472 616e 7370 6f72 7420 2849 es: transport (I │ │ │ │ +00136720: 4f29 2c20 636f 6e74 656e 7420 656e 636f O), content enco │ │ │ │ +00136730: 6469 6e67 2028 454e 4329 2c20 584d 4c20 ding (ENC), XML │ │ │ │ +00136740: 7061 7273 696e 6720 616e 6420 6765 6e65 parsing and gene │ │ │ │ +00136750: 7261 7469 6f6e 2028 584d 4c29 2c20 616e ration (XML), an │ │ │ │ +00136760: 6420 432f 432b 2b20 7573 6167 6520 2843 d C/C++ usage (C │ │ │ │ +00136770: 292e 3c2f 703e 0a3c 703e 5468 6520 696e ).

    .

    The in │ │ │ │ +00136780: 7075 742d 6d6f 6465 2061 6e64 206f 7574 put-mode and out │ │ │ │ +00136790: 7075 742d 6d6f 6465 2066 6c61 6773 2066 put-mode flags f │ │ │ │ +001367a0: 6f72 2069 6e62 6f75 6e64 2028 696e 2920 or inbound (in) │ │ │ │ +001367b0: 616e 6420 6f75 7462 6f75 6e64 2028 6f75 and outbound (ou │ │ │ │ +001367c0: 7429 206d 6573 7361 6765 2070 726f 6365 t) message proce │ │ │ │ +001367d0: 7373 696e 6720 6172 653a 3c2f 703e 0a3c ssing are:

    .< │ │ │ │ +001367e0: 7461 626c 6520 636c 6173 733d 226d 6172 table class="mar │ │ │ │ +001367f0: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable">.
    .< │ │ │ │ +00136850: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class="markdo │ │ │ │ +00136860: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone" │ │ │ │ +00136870: 3e69 6e2f 6f75 7420 2020 3c2f 7468 3e3c >in/out < │ │ │ │ +00136880: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class="markdo │ │ │ │ +00136890: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone" │ │ │ │ +001368a0: 3e72 6573 756c 7420 2020 203c 2f74 683e >result │ │ │ │ +001368b0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...... │ │ │ │ +00136b20: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out .. │ │ │ │ +00136bc0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ +00136d00: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ........< │ │ │ │ +001370e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001370f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00137100: 3e3c 636f 6465 3e23 534f 4150 5f45 4e43 >#SOAP_ENC │ │ │ │ +00137110: 5f58 4d4c 3c2f 636f 6465 3e20 2020 3c2f _XML │ │ │ │ +001371a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +001372a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .... │ │ │ │ +001374b0: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out .. │ │ │ │ +00137560: 3c63 6f64 653e 2353 4f41 505f 454e 435f #SOAP_ENC_ │ │ │ │ +00137570: 5a4c 4942 3c2f 636f 6465 3e20 2020 3c2f ZLIB │ │ │ │ +001375b0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ +001376a0: 696e 2b6f 7574 2020 203c 2f74 643e 3c74 in+out │ │ │ │ +001376d0: 7573 6520 5353 4c2f 544c 532c 2061 7574 use SSL/TLS, aut │ │ │ │ +001376e0: 6f6d 6174 6963 2077 6865 6e20 636f 6e6e omatic when conn │ │ │ │ +001376f0: 6563 7469 6e67 2022 6874 7470 733a 2220 ecting "https:" │ │ │ │ +00137700: 656e 6470 6f69 6e74 7320 2020 203c 2f74 endpoints .. │ │ │ │ +00137780: 3c74 6420 636c 6173 733d 226d 6172 6b64 .... │ │ │ │ +00137970: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ +00137a50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00137a60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00137a70: 3e69 6e20 2020 3c2f 7464 3e3c 7464 2063 >in .< │ │ │ │ +00137ad0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00137ae0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +00137af0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ +00137c20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00137c30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00137c40: 3e69 6e2b 6f75 7420 2020 3c2f 7464 3e3c >in+out < │ │ │ │ +00137c50: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00137c60: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00137c70: 3e6f 7574 3a20 7365 7269 616c 697a 6520 >out: serialize │ │ │ │ +00137c80: 6461 7461 2061 7320 584d 4c20 7472 6565 data as XML tree │ │ │ │ +00137c90: 7320 286e 6f20 6d75 6c74 692d 7265 662c s (no multi-ref, │ │ │ │ +00137ca0: 2064 7570 6c69 6361 7465 2064 6174 6120 duplicate data │ │ │ │ +00137cb0: 7768 656e 206e 6563 6573 7361 7279 293b when necessary); │ │ │ │ +00137cc0: 2069 6e3a 2069 676e 6f72 6520 6964 2061 in: ignore id a │ │ │ │ +00137cd0: 7474 7269 6275 7465 7320 2864 6f20 6e6f ttributes (do no │ │ │ │ +00137ce0: 7420 7265 736f 6c76 6520 6964 2d72 6566 t resolve id-ref │ │ │ │ +00137cf0: 2920 2020 203c 2f74 643e 3c2f 7472 3e0a ) . │ │ │ │ +00137d00: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +00137d20: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +00137e10: 3c74 7220 636c 6173 733d 226d 6172 6b64 . │ │ │ │ +00137f00: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +00137f90: 6f75 7420 2020 3c2f 7464 3e3c 7464 2063 out ..< │ │ │ │ +00138020: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00138030: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00138040: 3e3c 636f 6465 3e23 534f 4150 5f43 5f4e >#SOAP_C_N │ │ │ │ +00138050: 4f49 4f42 3c2f 636f 6465 3e20 2020 3c2f OIOB < │ │ │ │ +00138090: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001380a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +001380b0: 3e64 6f20 6e6f 7420 6661 756c 7420 7769 >do not fault wi │ │ │ │ +001380c0: 7468 203c 636f 6465 3e23 534f 4150 5f49 th #SOAP_I │ │ │ │ +001380d0: 4f42 3c2f 636f 6465 3e20 2020 203c 2f74 OB ..< │ │ │ │ +00138200: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.. │ │ │ │ +00138290: 696e 2b6f 7574 2020 203c 2f74 643e 3c74 in+out │ │ │ │ +001382c0: 656e 6162 6c65 206d 756c 7469 6279 7465 enable multibyte │ │ │ │ +001382d0: 2063 6861 7261 6374 6572 2073 7570 706f character suppo │ │ │ │ +001382e0: 7274 2066 6f72 2038 2d62 6974 2063 6861 rt for 8-bit cha │ │ │ │ +001382f0: 7261 6374 6572 2073 7472 696e 6773 2077 racter strings w │ │ │ │ +00138300: 6974 6820 3c63 6f64 653e 7763 746f 6d62 ith wctomb │ │ │ │ +00138310: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and mbtowc │ │ │ │ +00138330: 7573 696e 6720 7468 6520 6375 7272 656e using the curren │ │ │ │ +00138340: 7420 6c6f 6361 6c65 2020 2020 3c2f 7464 t locale .. │ │ │ │ +001383c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .
    C │ │ │ │ -00143710: 6f64 6520 2020 3c2f 7468 3e3c 7468 2063 ode Des │ │ │ │ -00143740: 6372 6970 7469 6f6e 2020 2020 3c2f 7468 cription
    200 │ │ │ │ -001437a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 OK (no er │ │ │ │ -001437d0: 726f 7229 2020 2020 3c2f 7464 3e3c 2f74 ror)
    201 Created < │ │ │ │ -00143860: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    202 │ │ │ │ -001438b0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Accept │ │ │ │ -001438e0: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    203 Non-Authoritat │ │ │ │ -00143970: 6976 6520 496e 666f 726d 6174 696f 6e20 ive Information │ │ │ │ -00143980: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    No │ │ │ │ -00143a00: 2043 6f6e 7465 6e74 2020 2020 3c2f 7464 Content
    205 │ │ │ │ -00143a60: 203c 2f74 643e 3c74 6420 636c 6173 733d Reset Co │ │ │ │ -00143a90: 6e74 656e 7420 2020 203c 2f74 643e 3c2f ntent
    206 Partial Cont │ │ │ │ -00143b20: 656e 7420 2020 203c 2f74 643e 3c2f 7472 ent
    300 Multiple Choi │ │ │ │ -00143bb0: 6365 7320 2020 203c 2f74 643e 3c2f 7472 ces
    301 Moved Permanen │ │ │ │ -00143c40: 746c 7920 2020 203c 2f74 643e 3c2f 7472 tly
    302 Found
    303 │ │ │ │ -00143d20: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 See Other │ │ │ │ -00143d50: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    304
    30 │ │ │ │ -00143e30: 3520 2020 3c2f 7464 3e3c 7464 2063 6c61 5 Use P │ │ │ │ -00143e60: 726f 7879 2020 2020 3c2f 7464 3e3c 2f74 roxy
    307 Temporary Re │ │ │ │ -00143ef0: 6469 7265 6374 2020 2020 3c2f 7464 3e3c direct
    400 Bad Request │ │ │ │ -00143f80: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    401
    40 │ │ │ │ -00144060: 3220 2020 3c2f 7464 3e3c 7464 2063 6c61 2 Payme │ │ │ │ -00144090: 6e74 2052 6571 7569 7265 6420 2020 203c nt Required < │ │ │ │ -001440a0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    40 │ │ │ │ -001440f0: 3320 2020 3c2f 7464 3e3c 7464 2063 6c61 3 Forbi │ │ │ │ -00144120: 6464 656e 2020 2020 3c2f 7464 3e3c 2f74 dden
    404 Not Found │ │ │ │ -001441b0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    4 │ │ │ │ -00144200: 3035 2020 203c 2f74 643e 3c74 6420 636c 05 Meth │ │ │ │ -00144230: 6f64 204e 6f74 2041 6c6c 6f77 6564 2020 od Not Allowed │ │ │ │ -00144240: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    Not │ │ │ │ -001442c0: 2041 6363 6570 7461 626c 6520 2020 203c Acceptable < │ │ │ │ -001442d0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    40 │ │ │ │ -00144320: 3720 2020 3c2f 7464 3e3c 7464 2063 6c61 7 Proxy │ │ │ │ -00144350: 2041 7574 6865 6e74 6963 6174 696f 6e20 Authentication │ │ │ │ -00144360: 5265 7175 6972 6564 2020 2020 3c2f 7464 Required
    408 │ │ │ │ -001443c0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Request T │ │ │ │ -001443f0: 696d 652d 6f75 7420 2020 203c 2f74 643e ime-out
    409 │ │ │ │ -00144450: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Conflict │ │ │ │ -00144480: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    Go │ │ │ │ -00144500: 6e65 2020 2020 3c2f 7464 3e3c 2f74 723e ne
    411 Length Require │ │ │ │ -00144590: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    412
    413 Request Entit │ │ │ │ -001446b0: 7920 546f 6f20 4c61 7267 6520 2020 203c y Too Large < │ │ │ │ -001446c0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    414 │ │ │ │ -00144710: 2020 203c 2f74 643e 3c74 6420 636c 6173 Reques │ │ │ │ -00144740: 742d 5552 4920 546f 6f20 4c61 7267 6520 t-URI Too Large │ │ │ │ -00144750: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    415 U │ │ │ │ -001447d0: 6e73 7570 706f 7274 6564 204d 6564 6961 nsupported Media │ │ │ │ -001447e0: 2054 7970 6520 2020 203c 2f74 643e 3c2f Type
    416 Requested ra │ │ │ │ -00144870: 6e67 6520 6e6f 7420 7361 7469 7366 6961 nge not satisfia │ │ │ │ -00144880: 626c 6520 2020 203c 2f74 643e 3c2f 7472 ble
    417 Expectation F │ │ │ │ -00144910: 6169 6c65 6420 2020 203c 2f74 643e 3c2f ailed
    500 Internal Ser │ │ │ │ -001449a0: 7665 7220 4572 726f 7220 2020 203c 2f74 ver Error
    501 │ │ │ │ -00144a00: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Not Imp │ │ │ │ -00144a30: 6c65 6d65 6e74 6564 2020 2020 3c2f 7464 lemented
    502 │ │ │ │ -00144a90: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 Bad Gatew │ │ │ │ -00144ac0: 6179 2020 2020 3c2f 7464 3e3c 2f74 723e ay
    503 Service Unavai │ │ │ │ -00144b50: 6c61 626c 6520 2020 203c 2f74 643e 3c2f lable
    504 Gateway Time │ │ │ │ -00144be0: 2d6f 7574 2020 2020 3c2f 7464 3e3c 2f74 -out
    505 HTTP Version │ │ │ │ -00144c70: 206e 6f74 2073 7570 706f 7274 6564 2020 not supported │ │ │ │ -00144c80: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461
    mo │ │ │ │ +00136840: 6465 2066 6c61 6720 2020 3c2f 7468 3e3c de flag
    # │ │ │ │ +00136900: 534f 4150 5f49 4f5f 464c 5553 483c 2f63 SOAP_IO_FLUSH ou │ │ │ │ +00136940: 7420 2020 3c2f 7464 3e3c 7464 2063 6c61 t flush │ │ │ │ +00136970: 206f 7574 7075 7420 696d 6d65 6469 6174 output immediat │ │ │ │ +00136980: 656c 7920 2020 203c 2f74 643e 3c2f 7472 ely
    #SOA │ │ │ │ +001369e0: 505f 494f 5f42 5546 4645 523c 2f63 6f64 P_IO_BUFFER out │ │ │ │ +00136a20: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 enable │ │ │ │ +00136a50: 6f75 7470 7574 2062 7566 6665 7269 6e67 output buffering │ │ │ │ +00136a60: 2c20 7468 6520 6465 6661 756c 7420 6d6f , the default mo │ │ │ │ +00136a70: 6465 2066 6f72 2073 6f63 6b65 7420 636f de for socket co │ │ │ │ +00136a80: 6e6e 6563 7469 6f6e 7320 2020 203c 2f74 nnections
    #SOAP_IO_STORE< │ │ │ │ +00136af0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> sto │ │ │ │ +00136b50: 7265 2074 6865 2065 6e74 6972 6520 6f75 re the entire ou │ │ │ │ +00136b60: 7462 6f75 6e64 206d 6573 7361 6765 2074 tbound message t │ │ │ │ +00136b70: 6f20 6361 6c63 756c 6174 6520 4854 5450 o calculate HTTP │ │ │ │ +00136b80: 2063 6f6e 7465 6e74 206c 656e 6774 6820 content length │ │ │ │ +00136b90: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    #SOAP_IO │ │ │ │ +00136bf0: 5f43 4855 4e4b 3c2f 636f 6465 3e20 2020 _CHUNK │ │ │ │ +00136c00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 out enable HTTP │ │ │ │ +00136c60: 6368 756e 6b69 6e67 2020 2020 3c2f 7464 chunking
    │ │ │ │ +00136cc0: 2353 4f41 505f 494f 5f4c 454e 4754 483c #SOAP_IO_LENGTH< │ │ │ │ +00136cd0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> use │ │ │ │ +00136d30: 6420 7769 7468 2074 776f 2d70 6861 7365 d with two-phase │ │ │ │ +00136d40: 2073 6572 6961 6c69 7a61 7469 6f6e 2c20 serialization, │ │ │ │ +00136d50: 6669 7273 7420 7068 6173 6520 7769 7468 first phase with │ │ │ │ +00136d60: 2074 6869 7320 666c 6167 2074 6f20 6361 this flag to ca │ │ │ │ +00136d70: 6c63 756c 6174 6520 4854 5450 2063 6f6e lculate HTTP con │ │ │ │ +00136d80: 7465 6e74 206c 656e 6774 6820 2020 203c tent length < │ │ │ │ +00136d90: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_IO_KEE │ │ │ │ +00136df0: 5041 4c49 5645 3c2f 636f 6465 3e20 2020 PALIVE │ │ │ │ +00136e00: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 in+out │ │ │ │ +00136e30: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 keep sock │ │ │ │ +00136e60: 6574 2063 6f6e 6e65 6374 696f 6e73 2061 et connections a │ │ │ │ +00136e70: 6c69 7665 2c20 7768 656e 2073 7570 706f live, when suppo │ │ │ │ +00136e80: 7274 6564 2062 7920 7468 6520 4854 5450 rted by the HTTP │ │ │ │ +00136e90: 2070 6565 7220 2020 203c 2f74 643e 3c2f peer
    #SO │ │ │ │ +00136ef0: 4150 5f49 4f5f 5544 503c 2f63 6f64 653e AP_IO_UDP │ │ │ │ +00136f00: 2020 203c 2f74 643e 3c74 6420 636c 6173 in+out │ │ │ │ +00136f30: 2020 203c 2f74 643e 3c74 6420 636c 6173 use UD │ │ │ │ +00136f60: 5020 2864 6174 6167 7261 6d29 2074 7261 P (datagram) tra │ │ │ │ +00136f70: 6e73 706f 7274 2c20 6d61 7869 6d75 6d20 nsport, maximum │ │ │ │ +00136f80: 6d65 7373 6167 6520 6c65 6e67 7468 2069 message length i │ │ │ │ +00136f90: 7320 3c63 6f64 653e 2353 4f41 505f 4255 s #SOAP_BU │ │ │ │ +00136fa0: 464c 454e 3c2f 636f 6465 3e20 2020 203c FLEN < │ │ │ │ +00136fb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_ENC_PL │ │ │ │ +00137010: 4149 4e3c 2f63 6f64 653e 2020 203c 2f74 AIN in+out use plain me │ │ │ │ +00137080: 7373 6167 6573 2077 6974 686f 7574 2070 ssages without p │ │ │ │ +00137090: 6172 7369 6e67 206f 7220 656d 6974 7469 arsing or emitti │ │ │ │ +001370a0: 6e67 2048 5454 5020 6865 6164 6572 7320 ng HTTP headers │ │ │ │ +001370b0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    alia │ │ │ │ +00137170: 7320 666f 7220 3c63 6f64 653e 2353 4f41 s for #SOA │ │ │ │ +00137180: 505f 454e 435f 504c 4149 4e3c 2f63 6f64 P_ENC_PLAIN
    #SOAP │ │ │ │ +001371f0: 5f45 4e43 5f44 494d 453c 2f63 6f64 653e _ENC_DIME │ │ │ │ +00137200: 2020 203c 2f74 643e 3c74 6420 636c 6173 out │ │ │ │ +00137230: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 use DIME │ │ │ │ +00137260: 656e 636f 6469 6e67 2c20 6175 746f 6d61 encoding, automa │ │ │ │ +00137270: 7469 6320 7768 656e 2044 494d 4520 6174 tic when DIME at │ │ │ │ +00137280: 7461 6368 6d65 6e74 7320 6172 6520 7573 tachments are us │ │ │ │ +00137290: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    #SOAP_ │ │ │ │ +001372f0: 454e 435f 4d49 4d45 3c2f 636f 6465 3e20 ENC_MIME │ │ │ │ +00137300: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out < │ │ │ │ +00137330: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>use MIME e │ │ │ │ +00137360: 6e63 6f64 696e 6720 696e 7374 6561 6420 ncoding instead │ │ │ │ +00137370: 6f66 2044 494d 452c 2061 6374 6976 6174 of DIME, activat │ │ │ │ +00137380: 6564 2075 7369 6e67 203c 636f 6465 3e3c ed using < │ │ │ │ +00137390: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +001373a0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +001373b0: 5f6d 696d 652e 6874 6d6c 2367 6139 3138 _mime.html#ga918 │ │ │ │ +001373c0: 3065 3562 6136 3334 6232 3033 3035 6237 0e5ba634b20305b7 │ │ │ │ +001373d0: 3535 6234 3130 3034 3564 3965 6522 2074 55b410045d9ee" t │ │ │ │ +001373e0: 6974 6c65 3d22 456e 6162 6c65 204d 494d itle="Enable MIM │ │ │ │ +001373f0: 4520 6174 7461 6368 6d65 6e74 732e 223e E attachments."> │ │ │ │ +00137400: 736f 6170 5f73 6574 5f6d 696d 653c 2f61 soap_set_mime
    #SOAP_ENC_MTOM< │ │ │ │ +00137480: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> use │ │ │ │ +001374e0: 204d 544f 4d20 584f 5020 6174 7461 6368 MTOM XOP attach │ │ │ │ +001374f0: 6d65 6e74 7320 696e 7374 6561 6420 6f66 ments instead of │ │ │ │ +00137500: 2044 494d 4520 616e 6420 4d49 4d45 2020 DIME and MIME │ │ │ │ +00137510: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    out compress outpu │ │ │ │ +001375e0: 7420 7769 7468 205a 6c69 622c 2075 7369 t with Zlib, usi │ │ │ │ +001375f0: 6e67 2064 6566 6c61 7465 206f 7220 677a ng deflate or gz │ │ │ │ +00137600: 6970 2066 6f72 6d61 7420 2020 203c 2f74 ip format
    #SOAP_ENC_SSL< │ │ │ │ +00137670: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    #SOAP_XML_INDEN │ │ │ │ +00137770: 543c 2f63 6f64 653e 2020 203c 2f74 643e T out o │ │ │ │ +001377d0: 7574 7075 7420 696e 6465 6e74 6564 2058 utput indented X │ │ │ │ +001377e0: 4d4c 2061 6e64 204a 534f 4e20 2020 203c ML and JSON < │ │ │ │ +001377f0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    #SOAP_XML_CA │ │ │ │ +00137850: 4e4f 4e49 4341 4c3c 2f63 6f64 653e 2020 NONICAL │ │ │ │ +00137860: 203c 2f74 643e 3c74 6420 636c 6173 733d out output cano │ │ │ │ +001378c0: 6e69 6361 6c20 584d 4c20 2020 203c 2f74 nical XML
    #SOAP_XML_DEFAU │ │ │ │ +00137930: 4c54 4e53 3c2f 636f 6465 3e20 2020 3c2f LTNS out output XML wit │ │ │ │ +001379a0: 6820 6465 6661 756c 7420 6e61 6d65 7370 h default namesp │ │ │ │ +001379b0: 6163 6520 6269 6e64 696e 6773 203c 636f ace bindings xmlns="..."
    #S │ │ │ │ +00137a30: 4f41 505f 584d 4c5f 4947 4e4f 5245 4e53 OAP_XML_IGNORENS │ │ │ │ +00137a40: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c ign │ │ │ │ +00137aa0: 6f72 6573 2058 4d4c 206e 616d 6573 7061 ores XML namespa │ │ │ │ +00137ab0: 6365 7320 696e 2058 4d4c 2069 6e70 7574 ces in XML input │ │ │ │ +00137ac0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    #SOAP_XM │ │ │ │ +00137b20: 4c5f 5354 5249 4354 3c2f 636f 6465 3e20 L_STRICT │ │ │ │ +00137b30: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 in apply stric │ │ │ │ +00137b90: 7420 7661 6c69 6461 7469 6f6e 206f 6620 t validation of │ │ │ │ +00137ba0: 584d 4c20 696e 7075 7420 2020 203c 2f74 XML input
    #SOAP_XML_TREE │ │ │ │ +00137c10: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    #SOAP_X │ │ │ │ +00137d50: 4d4c 5f47 5241 5048 3c2f 636f 6465 3e20 ML_GRAPH │ │ │ │ +00137d60: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 out < │ │ │ │ +00137d90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>serialize │ │ │ │ +00137dc0: 6170 706c 6963 6174 696f 6e20 6461 7461 application data │ │ │ │ +00137dd0: 2061 7320 616e 2058 4d4c 2067 7261 7068 as an XML graph │ │ │ │ +00137de0: 2077 6974 6820 6d75 6c74 692d 7265 6620 with multi-ref │ │ │ │ +00137df0: 6964 2f72 6566 2061 7474 7269 6275 7465 id/ref attribute │ │ │ │ +00137e00: 7320 2020 203c 2f74 643e 3c2f 7472 3e0a s
    #SOAP_ │ │ │ │ +00137e60: 584d 4c5f 4e49 4c3c 2f63 6f64 653e 2020 XML_NIL │ │ │ │ +00137e70: 203c 2f74 643e 3c74 6420 636c 6173 733d out serialize N │ │ │ │ +00137ed0: 554c 4c20 6461 7461 2061 7320 7873 693a ULL data as xsi: │ │ │ │ +00137ee0: 6e69 6c20 6174 7472 6962 7574 6564 2065 nil attributed e │ │ │ │ +00137ef0: 6c65 6d65 6e74 7320 2020 203c 2f74 643e lements
    # │ │ │ │ +00137f50: 534f 4150 5f58 4d4c 5f4e 4f54 5950 453c SOAP_XML_NOTYPE< │ │ │ │ +00137f60: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> dis │ │ │ │ +00137fc0: 6162 6c65 203c 656d 3e3c 636f 6465 3e78 able x │ │ │ │ +00137fd0: 7369 3a74 7970 653c 2f63 6f64 653e 3c2f si:type attributes │ │ │ │ +00137ff0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    in
    #SOAP_C_UTFSTRI │ │ │ │ +00138140: 4e47 3c2f 636f 6465 3e20 2020 3c2f 7464 NG in+out serialize 8-b │ │ │ │ +001381b0: 6974 2063 6861 7261 6374 6572 2073 7472 it character str │ │ │ │ +001381c0: 696e 6773 2022 6173 2069 7322 2c20 6d65 ings "as is", me │ │ │ │ +001381d0: 616e 696e 6720 382d 6269 7420 7374 7269 aning 8-bit stri │ │ │ │ +001381e0: 6e67 7320 6861 7665 2055 5446 2d38 2063 ngs have UTF-8 c │ │ │ │ +001381f0: 6f6e 7465 6e74 2020 2020 3c2f 7464 3e3c ontent
    # │ │ │ │ +00138250: 534f 4150 5f43 5f4d 4253 5452 494e 473c SOAP_C_MBSTRING< │ │ │ │ +00138260: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    │ │ │ │ +001383a0: 2353 4f41 505f 435f 4e49 4c53 5452 494e #SOAP_C_NILSTRIN │ │ │ │ +001383b0: 473c 2f63 6f64 653e 2020 203c 2f74 643e G out s │ │ │ │ +00138410: 6572 6961 6c69 7a65 2065 6d70 7479 2073 erialize empty s │ │ │ │ +00138420: 7472 696e 6773 2061 7320 7873 693a 6e69 trings as xsi:ni │ │ │ │ +00138430: 6c20 6174 7472 6962 7574 6564 2065 6c65 l attributed ele │ │ │ │ +00138440: 6d65 6e74 7320 2020 3c2f 7464 3e3c 2f74 ments
    .

    A │ │ │ │ +00138460: 6c6c 2066 6c61 6773 2061 7265 2069 6e64 ll flags are ind │ │ │ │ +00138470: 6570 656e 6465 6e74 2061 6e64 2063 616e ependent and can │ │ │ │ +00138480: 2062 6520 636f 6d62 696e 6564 2075 7369 be combined usi │ │ │ │ +00138490: 6e67 2061 2062 6974 7769 7365 206f 7220 ng a bitwise or │ │ │ │ +001384a0: 283c 636f 6465 3e7c 3c2f 636f 6465 3e29 (|) │ │ │ │ +001384b0: 2c20 6578 6365 7074 2066 6f72 203c 636f , except for #SOAP_IO_FLUS │ │ │ │ +001384d0: 483c 2f63 6f64 653e 2c20 3c63 6f64 653e H, │ │ │ │ +001384e0: 2353 4f41 505f 494f 5f42 5546 4645 523c #SOAP_IO_BUFFER< │ │ │ │ +001384f0: 2f63 6f64 653e 2c20 3c63 6f64 653e 2353 /code>, #S │ │ │ │ +00138500: 4f41 505f 494f 5f53 544f 5245 3c2f 636f OAP_IO_STORE, and # │ │ │ │ +00138520: 534f 4150 5f49 4f5f 4348 554e 4b3c 2f63 SOAP_IO_CHUNK which are e │ │ │ │ +00138540: 6e75 6d65 7261 7469 6f6e 7320 616e 6420 numerations and │ │ │ │ +00138550: 6f6e 6c79 206f 6e65 206f 6620 7468 6573 only one of thes │ │ │ │ +00138560: 6520 492f 4f20 666c 6167 7320 6361 6e20 e I/O flags can │ │ │ │ +00138570: 6265 2075 7365 642e 2041 6c73 6f20 7468 be used. Also th │ │ │ │ +00138580: 6520 584d 4c20 7365 7269 616c 697a 6174 e XML serializat │ │ │ │ +00138590: 696f 6e20 666c 6167 7320 3c63 6f64 653e ion flags │ │ │ │ +001385a0: 2353 4f41 505f 584d 4c5f 5452 4545 3c2f #SOAP_XML_TREE and │ │ │ │ +001385c0: 2353 4f41 505f 584d 4c5f 4752 4150 483c #SOAP_XML_GRAPH< │ │ │ │ +001385d0: 2f63 6f64 653e 2073 686f 756c 6420 6e6f /code> should no │ │ │ │ +001385e0: 7420 6265 206d 6978 6564 2e3c 2f70 3e0a t be mixed.

    . │ │ │ │ +001385f0: 3c70 3e54 6f20 616c 6c6f 6361 7465 2061

    To allocate a │ │ │ │ +00138600: 6e64 2069 6e69 7469 616c 697a 6520 6120 nd initialize a │ │ │ │ +00138610: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with i │ │ │ │ +00138680: 6e70 7574 2061 6e64 206f 7574 7075 7420 nput and output │ │ │ │ +00138690: 6d6f 6465 2066 6c61 6773 3a3c 2f70 3e0a mode flags:

    . │ │ │ │ +001386a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ +001386e0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap * soap_new1 │ │ │ │ +00138780: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_mode iomode);
    │ │ │ │ +001387f0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    struct soap │ │ │ │ +00138b10: 202a 2073 6f61 705f 6e65 7732 2873 6f61 * soap_new2(soa │ │ │ │ +00138b20: 705f 6d6f 6465 2069 6e70 7574 5f6d 6f64 p_mode input_mod │ │ │ │ +00138b30: 652c 2073 6f61 705f 6d6f 6465 206f 7574 e, soap_mode out │ │ │ │ +00138b40: 7075 745f 6d6f 6465 293c 2f64 6976 3e3c put_mode)
    < │ │ │ │ +00138b50: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +00138b60: 223e 416c 6c6f 6361 7465 2061 6e64 2069 ">Allocate and i │ │ │ │ +00138b70: 6e69 7469 616c 697a 6520 6120 6e65 7720 nitialize a new │ │ │ │ +00138b80: 736f 6170 2063 6f6e 7465 7874 2077 6974 soap context wit │ │ │ │ +00138b90: 6820 7365 7061 7261 7465 2069 6e70 7574 h separate input │ │ │ │ +00138ba0: 2061 6e64 206f 7574 7075 7420 736f 6170 and output soap │ │ │ │ +00138bb0: 5f6d 6f64 6520 666c 6167 732e 3c2f 6469 _mode flags.
    .
    < │ │ │ │ +00138bd0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +00138be0: 3c70 3e54 6f20 696e 6974 6961 6c69 7a65

    To initialize │ │ │ │ +00138bf0: 2061 2073 7461 636b 2d61 6c6c 6f63 6174 a stack-allocat │ │ │ │ +00138c00: 6564 203c 636f 6465 3e3c 6120 636c 6173 ed soap context wit │ │ │ │ +00138c70: 6820 696e 7075 7420 616e 6420 6f75 7470 h input and outp │ │ │ │ +00138c80: 7574 206d 6f64 6520 666c 6167 733a 3c2f ut mode flags:.

    void │ │ │ │ +00138ce0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init1 │ │ │ │ +00138d40: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc │ │ │ │ +00138d60: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ +00138d90: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, so │ │ │ │ +00138e20: 6170 5f6d 6f64 653c 2f61 3e20 696f 6d6f ap_mode iomo │ │ │ │ +00138e30: 6465 293b 3c2f 6469 763e 0a3c 6469 7620 de);
    ..
    s │ │ │ │ +00139180: 6f61 705f 696e 6974 323c 2f61 3e3c 2f64 oap_init2
    void soap │ │ │ │ +001391b0: 5f69 6e69 7432 2873 7472 7563 7420 736f _init2(struct so │ │ │ │ +001391c0: 6170 202a 736f 6170 2c20 736f 6170 5f6d ap *soap, soap_m │ │ │ │ +001391d0: 6f64 6520 696e 7075 745f 6d6f 6465 2c20 ode input_mode, │ │ │ │ +001391e0: 736f 6170 5f6d 6f64 6520 6f75 7470 7574 soap_mode output │ │ │ │ +001391f0: 5f6d 6f64 6529 3c2f 6469 763e 3c64 6976 _mode)
    I │ │ │ │ +00139210: 6e69 7469 616c 697a 6520 6120 7374 6163 nitialize a stac │ │ │ │ +00139220: 6b2d 616c 6c6f 6361 7465 6420 736f 6170 k-allocated soap │ │ │ │ +00139230: 2063 6f6e 7465 7874 2077 6974 6820 696e context with in │ │ │ │ +00139240: 7075 7420 616e 6420 6f75 7470 7574 2073 put and output s │ │ │ │ +00139250: 6f61 705f 6d6f 6465 2066 6c61 6773 2e3c oap_mode flags.< │ │ │ │ +00139260: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    To set and │ │ │ │ +00139290: 2063 6c65 6172 206d 6f64 6520 666c 6167 clear mode flag │ │ │ │ +001392a0: 7320 7573 653a 3c2f 703e 0a3c 6469 7620 s use:

    .
    voi │ │ │ │ +001392f0: 643c 2f73 7061 6e3e 203c 6120 636c 6173 d so │ │ │ │ +00139350: 6170 5f73 6574 5f6d 6f64 653c 2f61 3e28 ap_set_mode( │ │ │ │ +00139360: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ +001393b0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap │ │ │ │ +001393e0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soap_mo │ │ │ │ +00139440: 6465 3c2f 613e 2069 6f6d 6f64 6529 3b20 de iomode); │ │ │ │ +00139450: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set inp │ │ │ │ +00139470: 7574 2061 6e64 206f 7574 7075 7420 6d6f ut and output mo │ │ │ │ +00139480: 6465 2066 6c61 6773 3c2f 7370 616e 3e3c de flags< │ │ │ │ +00139490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void soap_set_imod │ │ │ │ +00139530: 653c 2f61 3e28 3c73 7061 6e20 636c 6173 e(stru │ │ │ │ +00139550: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, s │ │ │ │ +00139610: 6f61 705f 6d6f 6465 3c2f 613e 203c 6120 oap_mode imode) │ │ │ │ +00139670: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // set i │ │ │ │ +00139690: 6e70 7574 206d 6f64 6520 666c 6167 733c nput mode flags< │ │ │ │ +001396a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001396c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001396d0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    soap_s │ │ │ │ +00139740: 6574 5f6f 6d6f 6465 3c2f 613e 283c 7370 et_omode(struct │ │ │ │ +00139770: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +001397a0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, soap_mode< │ │ │ │ +00139830: 2f61 3e20 3c61 2063 6c61 7373 3d22 636f /a> omo │ │ │ │ +00139880: 6465 3c2f 613e 293b 203c 7370 616e 2063 de); / │ │ │ │ +001398a0: 2f20 7365 7420 6f75 7470 7574 206d 6f64 / set output mod │ │ │ │ +001398b0: 6520 666c 6167 733c 2f73 7061 6e3e 3c2f e flags.
    void soap_clr_mode< │ │ │ │ +00139960: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(struct │ │ │ │ +00139980: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ +001399b0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ +001399e0: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, soa │ │ │ │ +00139a40: 705f 6d6f 6465 3c2f 613e 2069 6f6d 6f64 p_mode iomod │ │ │ │ +00139a50: 6529 3b20 3c73 7061 6e20 636c 6173 733d e); // cle │ │ │ │ +00139a70: 6172 2069 6e70 7574 2061 6e64 206f 7574 ar input and out │ │ │ │ +00139a80: 7075 7420 6d6f 6465 2066 6c61 6773 3c2f put mode flags
    .
    void soap_cl │ │ │ │ +00139b30: 725f 696d 6f64 653c 2f61 3e28 3c73 7061 r_imode(struct │ │ │ │ +00139b60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +00139b90: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +00139bc0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap_mode imod │ │ │ │ +00139c70: 653c 2f61 3e29 3b20 3c73 7061 6e20 636c e); // │ │ │ │ +00139c90: 2063 6c65 6172 2069 6e70 7574 206d 6f64 clear input mod │ │ │ │ +00139ca0: 6520 666c 6167 733c 2f73 7061 6e3e 3c2f e flags.
    void soap_clr_omode │ │ │ │ +00139d50: 3c2f 613e 283c 7370 616e 2063 6c61 7373 (struc │ │ │ │ +00139d70: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ +00139da0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, so │ │ │ │ +00139e30: 6170 5f6d 6f64 653c 2f61 3e20 3c61 2063 ap_mode omode); │ │ │ │ +00139e90: 203c 7370 616e 2063 6c61 7373 3d22 636f // clear │ │ │ │ +00139eb0: 6f75 7470 7574 206d 6f64 6520 666c 6167 output mode flag │ │ │ │ +00139ec0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ +00139ed0: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00139ee0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +00139ef0: 705f 5f63 6f6e 7465 7874 5f68 746d 6c5f p__context_html_ │ │ │ │ +00139f00: 6761 3036 6637 3639 6638 3062 6365 6137 ga06f769f80bcea7 │ │ │ │ +00139f10: 6265 6232 6562 6666 6430 6134 3066 6335 beb2ebffd0a40fc5 │ │ │ │ +00139f20: 3231 223e 3c64 6976 2063 6c61 7373 3d22 21">
    void │ │ │ │ +00139fb0: 736f 6170 5f63 6c72 5f6d 6f64 6528 7374 soap_clr_mode(st │ │ │ │ +00139fc0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ +00139fd0: 2073 6f61 705f 6d6f 6465 2069 6e70 7574 soap_mode input │ │ │ │ +00139fe0: 5f61 6e64 5f6f 7574 7075 745f 6d6f 6465 _and_output_mode │ │ │ │ +00139ff0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Clear │ │ │ │ +0013a010: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output │ │ │ │ +0013a020: 2073 6f61 705f 6d6f 6465 2066 6c61 6773 soap_mode flags │ │ │ │ +0013a030: 206f 6620 7468 6520 6769 7665 6e20 736f of the given so │ │ │ │ +0013a040: 6170 2063 6f6e 7465 7874 2e3c 2f64 6976 ap context.
    .
    void soap_c │ │ │ │ +0013a140: 6c72 5f69 6d6f 6465 2873 7472 7563 7420 lr_imode(struct │ │ │ │ +0013a150: 736f 6170 202a 736f 6170 2c20 736f 6170 soap *soap, soap │ │ │ │ +0013a160: 5f6d 6f64 6520 696e 7075 745f 6d6f 6465 _mode input_mode │ │ │ │ +0013a170: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Clear │ │ │ │ +0013a190: 696e 7075 7420 736f 6170 5f6d 6f64 6520 input soap_mode │ │ │ │ +0013a1a0: 666c 6167 7320 6f66 2074 6865 2067 6976 flags of the giv │ │ │ │ +0013a1b0: 656e 2073 6f61 7020 636f 6e74 6578 742e en soap context. │ │ │ │ +0013a1c0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    so │ │ │ │ +0013a280: 6170 5f63 6c72 5f6f 6d6f 6465 3c2f 613e ap_clr_omode │ │ │ │ +0013a290: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s │ │ │ │ +0013a2b0: 6f61 705f 636c 725f 6f6d 6f64 6528 7374 oap_clr_omode(st │ │ │ │ +0013a2c0: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ +0013a2d0: 2073 6f61 705f 6d6f 6465 206f 7574 7075 soap_mode outpu │ │ │ │ +0013a2e0: 745f 6d6f 6465 293c 2f64 6976 3e3c 6469 t_mode)
    │ │ │ │ +0013a300: 436c 6561 7220 6f75 7470 7574 2073 6f61 Clear output soa │ │ │ │ +0013a310: 705f 6d6f 6465 2066 6c61 6773 206f 6620 p_mode flags of │ │ │ │ +0013a320: 7468 6520 6769 7665 6e20 736f 6170 2063 the given soap c │ │ │ │ +0013a330: 6f6e 7465 7874 2e3c 2f64 6976 3e3c 2f64 ontext.
    .
    void soap_set_i │ │ │ │ +0013a430: 6d6f 6465 2873 7472 7563 7420 736f 6170 mode(struct soap │ │ │ │ +0013a440: 202a 736f 6170 2c20 736f 6170 5f6d 6f64 *soap, soap_mod │ │ │ │ +0013a450: 6520 696e 7075 745f 6d6f 6465 293c 2f64 e input_mode)
    Set input │ │ │ │ +0013a480: 736f 6170 5f6d 6f64 6520 666c 6167 7320 soap_mode flags │ │ │ │ +0013a490: 6f66 2074 6865 2067 6976 656e 2073 6f61 of the given soa │ │ │ │ +0013a4a0: 7020 636f 6e74 6578 742e 3c2f 6469 763e p context.
    │ │ │ │ +0013a4b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0013a520: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_set │ │ │ │ +0013a570: 5f6f 6d6f 6465 3c2f 613e 3c2f 6469 763e _omode
    │ │ │ │ +0013a580: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_se │ │ │ │ +0013a5a0: 745f 6f6d 6f64 6528 7374 7275 6374 2073 t_omode(struct s │ │ │ │ +0013a5b0: 6f61 7020 2a73 6f61 702c 2073 6f61 705f oap *soap, soap_ │ │ │ │ +0013a5c0: 6d6f 6465 206f 7574 7075 745f 6d6f 6465 mode output_mode │ │ │ │ +0013a5d0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Set ou │ │ │ │ +0013a5f0: 7470 7574 2073 6f61 705f 6d6f 6465 2066 tput soap_mode f │ │ │ │ +0013a600: 6c61 6773 206f 6620 7468 6520 6769 7665 lags of the give │ │ │ │ +0013a610: 6e20 736f 6170 2063 6f6e 7465 7874 2e3c n soap context.< │ │ │ │ +0013a620: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .
    │ │ │ │ +0013a660: 4e6f 7465 3c2f 6474 3e3c 6464 3e54 6865 Note
    The │ │ │ │ +0013a670: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML │ │ │ │ +0013a680: 5f54 5245 453c 2f63 6f64 653e 206d 6f64 _TREE mod │ │ │ │ +0013a690: 6520 666c 6167 2063 616e 2062 6520 7573 e flag can be us │ │ │ │ +0013a6a0: 6564 2074 6f20 696d 7072 6f76 6520 696e ed to improve in │ │ │ │ +0013a6b0: 7465 726f 7065 7261 6269 6c69 7479 2077 teroperability w │ │ │ │ +0013a6c0: 6974 6820 534f 4150 2069 6d70 6c65 6d65 ith SOAP impleme │ │ │ │ +0013a6d0: 6e74 6174 696f 6e73 2074 6861 7420 6172 ntations that ar │ │ │ │ +0013a6e0: 6520 6e6f 7420 6675 6c6c 7920 534f 4150 e not fully SOAP │ │ │ │ +0013a6f0: 2031 2e31 2f31 2e32 2052 5043 2065 6e63 1.1/1.2 RPC enc │ │ │ │ +0013a700: 6f64 696e 6720 636f 6d70 6c69 616e 7420 oding compliant │ │ │ │ +0013a710: 7769 7468 2072 6573 7065 6374 2074 6f20 with respect to │ │ │ │ +0013a720: 7072 6f63 6573 7369 6e67 2069 642d 6872 processing id-hr │ │ │ │ +0013a730: 6566 2f72 6566 2061 7474 7269 6275 7465 ef/ref attribute │ │ │ │ +0013a740: 732e 2048 6f77 6576 6572 2c20 7472 6565 s. However, tree │ │ │ │ +0013a750: 2073 6572 6961 6c69 7a61 7469 6f6e 2077 serialization w │ │ │ │ +0013a760: 696c 6c20 6475 706c 6963 6174 6520 6461 ill duplicate da │ │ │ │ +0013a770: 7461 2077 6865 6e20 7468 6973 2064 6174 ta when this dat │ │ │ │ +0013a780: 6120 6973 2063 6f2d 7265 6665 7265 6e63 a is co-referenc │ │ │ │ +0013a790: 6564 2e20 4379 636c 6573 2061 7265 2064 ed. Cycles are d │ │ │ │ +0013a7a0: 6574 6563 7465 6420 616e 6420 6272 6f6b etected and brok │ │ │ │ +0013a7b0: 656e 2074 6f20 6176 6f69 6420 696e 6669 en to avoid infi │ │ │ │ +0013a7c0: 6e69 7465 2073 6572 6961 6c69 7a61 7469 nite serializati │ │ │ │ +0013a7d0: 6f6e 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 on.
    .

    In addition to │ │ │ │ +0013a7f0: 7468 6520 636f 6e74 6578 7420 6d6f 6465 the context mode │ │ │ │ +0013a800: 2066 6c61 6773 2c20 7468 6520 666f 6c6c flags, the foll │ │ │ │ +0013a810: 6f77 696e 6720 636f 6e74 6578 7420 666c owing context fl │ │ │ │ +0013a820: 6167 7320 6361 6e20 6265 2075 7365 6420 ags can be used │ │ │ │ +0013a830: 746f 2073 6574 203c 636f 6465 3e73 6574 to set set │ │ │ │ +0013a840: 736f 636b 6f70 743c 2f63 6f64 653e 206c sockopt l │ │ │ │ +0013a850: 6576 656c 203c 636f 6465 3e53 4f4c 5f53 evel SOL_S │ │ │ │ +0013a860: 4f43 4b45 543c 2f63 6f64 653e 206f 7074 OCKET opt │ │ │ │ +0013a870: 696f 6e73 2077 6865 6e20 736f 636b 6574 ions when socket │ │ │ │ +0013a880: 7320 6172 6520 6372 6561 7465 642c 2074 s are created, t │ │ │ │ +0013a890: 686f 7567 6820 736f 6d65 206f 7074 696f hough some optio │ │ │ │ +0013a8a0: 6e73 206d 6179 206e 6f74 2062 6520 6170 ns may not be ap │ │ │ │ +0013a8b0: 706c 6963 6162 6c65 2074 6f20 796f 7572 plicable to your │ │ │ │ +0013a8c0: 206f 7065 7261 7469 6e67 2073 7973 7465 operating syste │ │ │ │ +0013a8d0: 6d3a 3c2f 703e 0a3c 7461 626c 6520 636c m:

    ....... │ │ │ │ +0013ab60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +0013ac20: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag │ │ │ │ +0013ac30: 733c 2f61 3e3c 2f63 6f64 653e 203d 203c s = < │ │ │ │ +0013ac40: 636f 6465 3e53 4f5f 4445 4255 473c 2f63 code>SO_DEBUG .. │ │ │ │ +0013ae40: 7065 726d 6974 7320 7365 6e64 696e 6720 permits sending │ │ │ │ +0013ae50: 6f66 2062 726f 6164 6361 7374 206d 6573 of broadcast mes │ │ │ │ +0013ae60: 7361 6765 732c 2066 6f72 2065 7861 6d70 sages, for examp │ │ │ │ +0013ae70: 6c65 2077 6974 6820 5544 502c 2077 6865 le with UDP, whe │ │ │ │ +0013ae80: 6e20 7065 726d 6974 7465 6420 2020 203c n permitted < │ │ │ │ +0013ae90: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>........ │ │ │ │ +0013b4a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +0013b560: 6170 3a3a 6163 6365 7074 5f66 6c61 6773 ap::accept_flags │ │ │ │ +0013b570: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_DEBUG .... │ │ │ │ +0013ba30: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .....
    context fl │ │ │ │ +0013a940: 6167 2077 6974 6820 7365 7473 6f63 6b6f ag with setsocko │ │ │ │ +0013a950: 7074 206f 7074 696f 6e20 2020 3c2f 7468 pt option result
    soap::c │ │ │ │ +0013aaa0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags │ │ │ │ +0013aab0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = │ │ │ │ +0013aac0: 534f 5f4e 4f53 4947 5049 5045 3c2f 636f SO_NOSIGPIPE dis │ │ │ │ +0013ab00: 6162 6c65 7320 5349 4750 4950 4520 2020 ables SIGPIPE │ │ │ │ +0013ab10: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    tu │ │ │ │ +0013ac80: 726e 7320 6f6e 2072 6563 6f72 6469 6e67 rns on recording │ │ │ │ +0013ac90: 206f 6620 6465 6275 6767 696e 6720 696e of debugging in │ │ │ │ +0013aca0: 666f 726d 6174 696f 6e20 696e 2074 6865 formation in the │ │ │ │ +0013acb0: 2075 6e64 6572 6c79 696e 6720 7072 6f74 underlying prot │ │ │ │ +0013acc0: 6f63 6f6c 206d 6f64 756c 6573 2020 2020 ocol modules │ │ │ │ +0013acd0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    soap │ │ │ │ +0013ade0: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags< │ │ │ │ +0013adf0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_BROADCAST< │ │ │ │ +0013ae10: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    soap │ │ │ │ +0013afa0: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags< │ │ │ │ +0013afb0: 2f61 3e3c 2f63 6f64 653e 203d 203c 636f /a> = SO_LINGER set │ │ │ │ +0013b000: 7320 636c 6965 6e74 2d73 6964 6520 6c69 s client-side li │ │ │ │ +0013b010: 6e67 6572 2074 696d 6520 746f 2074 6865 nger time to the │ │ │ │ +0013b020: 2076 616c 7565 206f 6620 3c63 6f64 653e value of │ │ │ │ +0013b030: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::li │ │ │ │ +0013b0f0: 6e67 6572 5f74 696d 653c 2f61 3e3c 2f63 nger_time
    soap::connec │ │ │ │ +0013b220: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_DO │ │ │ │ +0013b240: 4e54 524f 5554 453c 2f63 6f64 653e 2020 NTROUTE │ │ │ │ +0013b250: 203c 2f74 643e 3c74 6420 636c 6173 733d enables │ │ │ │ +0013b280: 726f 7574 696e 6720 6279 7061 7373 2066 routing bypass f │ │ │ │ +0013b290: 6f72 206f 7574 676f 696e 6720 6d65 7373 or outgoing mess │ │ │ │ +0013b2a0: 6167 6573 2020 2020 3c2f 7464 3e3c 2f74 ages
    soap::accep │ │ │ │ +0013b3c0: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags = SO_NO │ │ │ │ +0013b3e0: 5349 4750 4950 453c 2f63 6f64 653e 2020 SIGPIPE │ │ │ │ +0013b3f0: 203c 2f74 643e 3c74 6420 636c 6173 733d disables │ │ │ │ +0013b420: 2053 4947 5049 5045 2028 6368 6563 6b20 SIGPIPE (check │ │ │ │ +0013b430: 796f 7572 204f 532c 2074 6869 7320 6973 your OS, this is │ │ │ │ +0013b440: 206e 6f74 2070 6f72 7461 626c 6529 2020 not portable) │ │ │ │ +0013b450: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    tur │ │ │ │ +0013b5c0: 6e73 206f 6e20 7265 636f 7264 696e 6720 ns on recording │ │ │ │ +0013b5d0: 6f66 2064 6562 7567 6769 6e67 2069 6e66 of debugging inf │ │ │ │ +0013b5e0: 6f72 6d61 7469 6f6e 2069 6e20 7468 6520 ormation in the │ │ │ │ +0013b5f0: 756e 6465 726c 7969 6e67 2070 726f 746f underlying proto │ │ │ │ +0013b600: 636f 6c20 6d6f 6475 6c65 7320 2020 203c col modules < │ │ │ │ +0013b610: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    soap │ │ │ │ +0013b720: 3a3a 6163 6365 7074 5f66 6c61 6773 3c2f ::accept_flags = SO_LINGER sets │ │ │ │ +0013b780: 2073 6572 7665 722d 7369 6465 206c 696e server-side lin │ │ │ │ +0013b790: 6765 7220 7469 6d65 2074 6f20 7468 6520 ger time to the │ │ │ │ +0013b7a0: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of < │ │ │ │ +0013b7b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0013b7c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +0013b7d0: 6d6c 2361 3066 3464 3032 3530 3533 6664 ml#a0f4d025053fd │ │ │ │ +0013b7e0: 6537 3732 3136 6130 6361 3637 3430 3737 e77216a0ca674077 │ │ │ │ +0013b7f0: 3139 3864 2220 7469 746c 653d 2255 7365 198d" title="Use │ │ │ │ +0013b800: 722d 6465 6669 6e61 626c 6520 6c69 6e67 r-definable ling │ │ │ │ +0013b810: 6572 2074 696d 6520 7661 6c75 652c 2072 er time value, r │ │ │ │ +0013b820: 6571 7569 7265 7320 7468 6520 534f 5f4c equires the SO_L │ │ │ │ +0013b830: 494e 4745 5220 7365 7473 6f63 6b6f 7074 INGER setsockopt │ │ │ │ +0013b840: 2066 6c61 6720 7661 6c75 6520 746f 2062 flag value to b │ │ │ │ +0013b850: 6520 6173 7369 676e 6564 2074 6f20 736f e assigned to so │ │ │ │ +0013b860: 6170 2e2e 2e22 3e73 6f61 703a 3a6c 696e ap...">soap::lin │ │ │ │ +0013b870: 6765 725f 7469 6d65 3c2f 613e 3c2f 636f ger_time
    soap::accept_ │ │ │ │ +0013b9a0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags │ │ │ │ +0013b9b0: 203d 203c 636f 6465 3e53 4f5f 444f 4e54 = SO_DONT │ │ │ │ +0013b9c0: 524f 5554 453c 2f63 6f64 653e 2020 203c ROUTE < │ │ │ │ +0013b9d0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>enables ro │ │ │ │ +0013ba00: 7574 696e 6720 6279 7061 7373 2066 6f72 uting bypass for │ │ │ │ +0013ba10: 206f 7574 676f 696e 6720 6d65 7373 6167 outgoing messag │ │ │ │ +0013ba20: 6573 2020 2020 3c2f 7464 3e3c 2f74 723e es
    soap::bind_fl │ │ │ │ +0013bb40: 6167 733c 2f61 3e3c 2f63 6f64 653e 203d ags = │ │ │ │ +0013bb50: 203c 636f 6465 3e53 4f5f 5245 5553 4541 SO_REUSEA │ │ │ │ +0013bb60: 4444 523c 2f63 6f64 653e 2020 203c 2f74 DDR enables loca │ │ │ │ +0013bba0: 6c20 6164 6472 6573 7320 7265 7573 6520 l address reuse │ │ │ │ +0013bbb0: 696d 6d65 6469 6174 656c 792c 2075 7365 immediately, use │ │ │ │ +0013bbc0: 2077 6974 6820 6361 7574 696f 6e20 2020 with caution │ │ │ │ +0013bbd0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    < │ │ │ │ +0013bc20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ +0013bce0: 703a 3a62 696e 645f 666c 6167 733c 2f61 p::bind_flags = SO_REUSEPORT en │ │ │ │ +0013bd40: 6162 6c65 7320 6475 706c 6963 6174 6520 ables duplicate │ │ │ │ +0013bd50: 6164 6472 6573 7320 616e 6420 706f 7274 address and port │ │ │ │ +0013bd60: 2062 696e 6469 6e67 7320 2020 3c2f 7464 bindings
    . │ │ │ │ +0013bd80: 3c70 3e46 6f72 2065 7861 6d70 6c65 2c20

    For example, │ │ │ │ +0013bd90: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap::accept_ │ │ │ │ +0013be60: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags │ │ │ │ +0013be70: 2069 7320 7365 7420 746f 203c 636f 6465 is set to (SO_NOSIGPIPE | │ │ │ │ +0013be90: 2053 4f5f 4c49 4e47 4552 293c 2f63 6f64 SO_LINGER) this disables │ │ │ │ +0013beb0: 2053 4947 5049 5045 2073 6967 6e61 6c73 SIGPIPE signals │ │ │ │ +0013bec0: 2061 6e64 2073 6574 206c 696e 6765 7220 and set linger │ │ │ │ +0013bed0: 7469 6d65 2076 616c 7565 2067 6976 656e time value given │ │ │ │ +0013bee0: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap::linger_t │ │ │ │ +0013bfb0: 696d 653c 2f61 3e3c 2f63 6f64 653e 2c20 ime, │ │ │ │ +0013bfc0: 7768 6963 6820 6973 207a 6572 6f20 6279 which is zero by │ │ │ │ +0013bfd0: 2064 6566 6175 6c74 2e3c 2f70 3e0a 3c70 default.

    .

    The soap::socket_ │ │ │ │ +0013c0b0: 666c 6167 733c 2f61 3e3c 2f63 6f64 653e flags │ │ │ │ +0013c0c0: 2063 6f6e 7465 7874 2066 6c61 6720 6361 context flag ca │ │ │ │ +0013c0d0: 6e20 6265 2075 7365 6420 746f 2070 6173 n be used to pas │ │ │ │ +0013c0e0: 7320 6f70 7469 6f6e 7320 746f 2074 6865 s options to the │ │ │ │ +0013c0f0: 203c 636f 6465 3e26 6c74 3b73 7973 2f73 <sys/s │ │ │ │ +0013c100: 6f63 6b65 742e 6826 6774 3b3c 2f63 6f64 ocket.h> send, send │ │ │ │ +0013c130: 746f 3c2f 636f 6465 3e2c 203c 636f 6465 to, recv, an │ │ │ │ +0013c150: 6420 3c63 6f64 653e 7265 6376 6672 6f6d d recvfrom │ │ │ │ +0013c160: 3c2f 636f 6465 3e20 6361 6c6c 7320 6d61 calls ma │ │ │ │ +0013c170: 6465 2062 7920 7468 6520 656e 6769 6e65 de by the engine │ │ │ │ +0013c180: 2c20 7468 6f75 6768 2073 6f6d 6520 6f70 , though some op │ │ │ │ +0013c190: 7469 6f6e 7320 6d61 7920 6e6f 7420 6265 tions may not be │ │ │ │ +0013c1a0: 2061 7070 6c69 6361 626c 6520 746f 2079 applicable to y │ │ │ │ +0013c1b0: 6f75 7220 6f70 6572 6174 696e 6720 7379 our operating sy │ │ │ │ +0013c1c0: 7374 656d 3a3c 2f70 3e0a 3c74 6162 6c65 stem:

    ....... │ │ │ │ +0013c450: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +0013c510: 6170 3a3a 736f 636b 6574 5f66 6c61 6773 ap::socket_flags │ │ │ │ +0013c520: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = MSG_DONTROUT │ │ │ │ +0013c540: 453c 2f63 6f64 653e 2020 203c 2f74 643e E │ │ │ │ +0013c550: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..

    Furtherm │ │ │ │ +0013c5c0: 6f72 652c 2074 6865 203c 636f 6465 3e73 ore, the s │ │ │ │ +0013c5d0: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt │ │ │ │ +0013c5e0: 206c 6576 656c 203c 636f 6465 3e53 4f4c level SOL │ │ │ │ +0013c5f0: 5f53 4f43 4b45 543c 2f63 6f64 653e 206f _SOCKET o │ │ │ │ +0013c600: 7074 696f 6e73 203c 636f 6465 3e53 4f5f ptions SO_ │ │ │ │ +0013c610: 534e 4442 5546 3c2f 636f 6465 3e20 616e SNDBUF an │ │ │ │ +0013c620: 6420 3c63 6f64 653e 534f 5f52 4356 4255 d SO_RCVBU │ │ │ │ +0013c630: 463c 2f63 6f64 653e 2061 7265 2073 6574 F are set │ │ │ │ +0013c640: 2074 6865 2065 6e67 696e 6520 7768 656e the engine when │ │ │ │ +0013c650: 203c 636f 6465 3e3c 6120 636c 6173 733d so │ │ │ │ +0013c700: 6170 3a3a 736e 6462 7566 3c2f 613e 3c2f ap::sndbuf and │ │ │ │ +0013c720: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::rcv │ │ │ │ +0013c7d0: 6275 663c 2f61 3e3c 2f63 6f64 653e 2061 buf a │ │ │ │ +0013c7e0: 7265 2073 6574 2074 6f20 6120 6e6f 6e7a re set to a nonz │ │ │ │ +0013c7f0: 6572 6f20 7661 6c75 652e 2054 6865 2064 ero value. The d │ │ │ │ +0013c800: 6566 6175 6c74 2076 616c 7565 2069 7320 efault value is │ │ │ │ +0013c810: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL │ │ │ │ +0013c820: 454e 3c2f 636f 6465 3e2c 2077 6869 6368 EN, which │ │ │ │ +0013c830: 2069 7320 7468 6520 7361 6d65 2073 697a is the same siz │ │ │ │ +0013c840: 6520 7573 6564 2062 7920 7468 6520 696e e used by the in │ │ │ │ +0013c850: 7465 726e 616c 2062 7566 6665 7220 3c63 ternal buffer soap │ │ │ │ +0013c920: 3a3a 6275 663c 2f61 3e3c 2f63 6f64 653e ::buf │ │ │ │ +0013c930: 2074 6f20 7365 6e64 2061 6e64 2072 6563 to send and rec │ │ │ │ +0013c940: 6569 7665 206d 6573 7361 6765 732e 2041 eive messages. A │ │ │ │ +0013c950: 207a 6572 6f20 7661 6c75 6520 6f6d 6974 zero value omit │ │ │ │ +0013c960: 7320 7468 6520 696e 7465 726e 616c 203c s the internal < │ │ │ │ +0013c970: 636f 6465 3e73 6574 736f 636b 6f70 743c code>setsockopt< │ │ │ │ +0013c980: 2f63 6f64 653e 2063 616c 6c20 746f 2073 /code> call to s │ │ │ │ +0013c990: 6574 2074 6865 7365 206f 7074 696f 6e73 et these options │ │ │ │ +0013c9a0: 2e20 5365 7474 696e 6720 7468 6573 6520 . Setting these │ │ │ │ +0013c9b0: 7661 6c75 6573 2074 6f20 7a65 726f 2061 values to zero a │ │ │ │ +0013c9c0: 6374 6976 6174 6573 2061 7574 6f2d 7475 ctivates auto-tu │ │ │ │ +0013c9d0: 6e69 6e67 2077 6974 6820 4c69 6e75 7820 ning with Linux │ │ │ │ +0013c9e0: 322e 3420 616e 6420 6772 6561 7465 722e 2.4 and greater. │ │ │ │ +0013c9f0: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The setsockopt level │ │ │ │ +0013ca20: 534f 4c5f 534f 434b 4554 3c2f 636f 6465 SOL_SOCKET option S │ │ │ │ +0013ca40: 4f5f 4b45 4550 414c 4956 453c 2f63 6f64 O_KEEPALIVE is set when k │ │ │ │ +0013ca60: 6565 702d 616c 6976 6520 6973 2065 6e61 eep-alive is ena │ │ │ │ +0013ca70: 626c 6564 2077 6974 6820 636f 6e74 6578 bled with contex │ │ │ │ +0013ca80: 7420 666c 6167 203c 636f 6465 3e23 534f t flag #SO │ │ │ │ +0013ca90: 4150 5f49 4f5f 4b45 4550 414c 4956 453c AP_IO_KEEPALIVE< │ │ │ │ +0013caa0: 2f63 6f64 653e 206f 7220 7768 656e 203c /code> or when < │ │ │ │ +0013cab0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ +0013cb70: 703a 3a74 6370 5f6b 6565 705f 616c 6976 p::tcp_keep_aliv │ │ │ │ +0013cb80: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is │ │ │ │ +0013cb90: 6e6f 6e7a 6572 6f2e 2057 6974 6820 3c63 nonzero. With soap │ │ │ │ +0013cc60: 3a3a 7463 705f 6b65 6570 5f61 6c69 7665 ::tcp_keep_alive │ │ │ │ +0013cc70: 3c2f 613e 3c2f 636f 6465 3e20 6164 6469 addi │ │ │ │ +0013cc80: 7469 6f6e 616c 206f 7074 696f 6e73 2063 tional options c │ │ │ │ +0013cc90: 616e 2062 6520 7370 6563 6966 6965 6420 an be specified │ │ │ │ +0013cca0: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap:: │ │ │ │ +0013cd50: 7463 705f 6b65 6570 5f69 646c 653c 2f61 tcp_keep_idle, │ │ │ │ +0013cd70: 3c61 2063 6c61 7373 3d22 656c 2220 6872 │ │ │ │ +0013ce10: 736f 6170 3a3a 7463 705f 6b65 6570 5f69 soap::tcp_keep_i │ │ │ │ +0013ce20: 6e74 766c 3c2f 613e 3c2f 636f 6465 3e2c ntvl, │ │ │ │ +0013ce30: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::t │ │ │ │ +0013cee0: 6370 5f6b 6565 705f 636e 743c 2f61 3e3c cp_keep_cnt< │ │ │ │ +0013cef0: 2f63 6f64 653e 2e20 466f 7220 6578 616d /code>. For exam │ │ │ │ +0013cf00: 706c 653a 3c2f 703e 0a3c 6469 7620 636c ple:

    .
    < │ │ │ │ +0013cf20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0013cf30: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap │ │ │ │ +0013cf80: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +0013cfb0: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa │ │ │ │ +0013d010: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();..
    soap-> │ │ │ │ +0013d150: 3c61 2063 6c61 7373 3d22 636f 6465 2220 tcp_kee │ │ │ │ +0013d1a0: 705f 6964 6c65 3c2f 613e 203d 2033 303b p_idle = 30; │ │ │ │ +0013d1b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 // time │ │ │ │ +0013d1d0: 2069 6e20 7365 636f 6e64 7320 7468 6520 in seconds the │ │ │ │ +0013d1e0: 636f 6e6e 6563 7469 6f6e 206e 6565 6473 connection needs │ │ │ │ +0013d1f0: 2074 6f20 7265 6d61 696e 2069 646c 6520 to remain idle │ │ │ │ +0013d200: 6265 666f 7265 2054 4350 2073 7461 7274 before TCP start │ │ │ │ +0013d210: 7320 7365 6e64 696e 6720 6b65 6570 616c s sending keepal │ │ │ │ +0013d220: 6976 6520 7072 6f62 6573 3c2f 7370 616e ive probes
    .
    soap->tcp_keep_ │ │ │ │ +0013d2d0: 696e 7476 6c3c 2f61 3e20 3d20 3132 303b intvl = 120; │ │ │ │ +0013d2e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // time i │ │ │ │ +0013d300: 6e20 7365 636f 6e64 7320 6265 7477 6565 n seconds betwee │ │ │ │ +0013d310: 6e20 696e 6469 7669 6475 616c 206b 6565 n individual kee │ │ │ │ +0013d320: 7061 6c69 7665 2070 726f 6265 733c 2f73 palive probes
    .
    soap-> │ │ │ │ +0013d380: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;tcp_ke │ │ │ │ +0013d3d0: 6570 5f63 6e74 3c2f 613e 203d 2035 3b20 ep_cnt = 5; │ │ │ │ +0013d3e0: 2020 2020 3c73 7061 6e20 636c 6173 733d // max │ │ │ │ +0013d400: 696d 756d 206e 756d 6265 7220 6f66 206b imum number of k │ │ │ │ +0013d410: 6565 7061 6c69 7665 2070 726f 6265 7320 eepalive probes │ │ │ │ +0013d420: 5443 5020 7368 6f75 6c64 2073 656e 6420 TCP should send │ │ │ │ +0013d430: 6265 666f 7265 2064 726f 7070 696e 6720 before dropping │ │ │ │ +0013d440: 7468 6520 636f 6e6e 6563 7469 6f6e 3c2f the connection
    .
    unsigned in │ │ │ │ +0013d530: 7420 7463 705f 6b65 6570 5f63 6e74 3c2f t tcp_keep_cnt
    User-defi │ │ │ │ +0013d560: 6e61 626c 6520 7661 6c75 6520 746f 2073 nable value to s │ │ │ │ +0013d570: 6574 2054 4350 5f4b 4545 5043 4e54 2073 et TCP_KEEPCNT s │ │ │ │ +0013d580: 6574 736f 636b 6f70 7420 2874 6865 2076 etsockopt (the v │ │ │ │ +0013d590: 616c 7565 2069 7320 3020 6279 2064 6566 alue is 0 by def │ │ │ │ +0013d5a0: 6175 6c74 293c 2f64 6976 3e3c 6469 7620 ault)
    Definition: │ │ │ │ +0013d5d0: 2073 7464 736f 6170 322e 683a 3335 3834 stdsoap2.h:3584 │ │ │ │ +0013d5e0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .
    soap::tcp_ │ │ │ │ +0013d690: 6b65 6570 5f69 6e74 766c 3c2f 613e 3c2f keep_intvl
    unsigned │ │ │ │ +0013d6c0: 2069 6e74 2074 6370 5f6b 6565 705f 696e int tcp_keep_in │ │ │ │ +0013d6d0: 7476 6c3c 2f64 6976 3e3c 6469 7620 636c tvl
    User │ │ │ │ +0013d6f0: 2d64 6566 696e 6162 6c65 2076 616c 7565 -definable value │ │ │ │ +0013d700: 2074 6f20 7365 7420 5443 505f 4b45 4550 to set TCP_KEEP │ │ │ │ +0013d710: 494e 5456 4c20 7365 7473 6f63 6b6f 7074 INTVL setsockopt │ │ │ │ +0013d720: 2028 7468 6520 7661 6c75 6520 6973 2030 (the value is 0 │ │ │ │ +0013d730: 2062 7920 6465 6661 756c 7429 3c2f 6469 by default)
    Definiti │ │ │ │ +0013d760: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ +0013d770: 2e68 3a33 3535 393c 2f64 6976 3e3c 2f64 .h:3559
    .
    un │ │ │ │ +0013d850: 7369 676e 6564 2069 6e74 2074 6370 5f6b signed int tcp_k │ │ │ │ +0013d860: 6565 705f 6964 6c65 3c2f 6469 763e 3c64 eep_idle
    User-definable │ │ │ │ +0013d890: 7661 6c75 6520 746f 2073 6574 2054 4350 value to set TCP │ │ │ │ +0013d8a0: 5f4b 4545 5049 444c 4520 7365 7473 6f63 _KEEPIDLE setsoc │ │ │ │ +0013d8b0: 6b6f 7074 2028 7468 6520 7661 6c75 6520 kopt (the value │ │ │ │ +0013d8c0: 6973 2030 2062 7920 6465 6661 756c 7429 is 0 by default) │ │ │ │ +0013d8d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +0013d8f0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +0013d900: 6f61 7032 2e68 3a33 3533 343c 2f64 6976 oap2.h:3534
    .
    < │ │ │ │ +0013d9d0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0013d9e0: 6922 3e69 6e74 2074 6370 5f6b 6565 705f i">int tcp_keep_ │ │ │ │ +0013d9f0: 616c 6976 653c 2f64 6976 3e3c 6469 7620 alive
    Us │ │ │ │ +0013da10: 6572 2d64 6566 696e 6162 6c65 2076 616c er-definable val │ │ │ │ +0013da20: 7565 2074 6f20 7365 7420 534f 5f4b 4545 ue to set SO_KEE │ │ │ │ +0013da30: 5041 4c49 5645 2073 6574 736f 636b 6f70 PALIVE setsockop │ │ │ │ +0013da40: 7420 2830 2062 7920 6465 6661 756c 7420 t (0 by default │ │ │ │ +0013da50: 756e 6c65 7373 2074 6865 2023 534f 4150 unless the #SOAP │ │ │ │ +0013da60: 5f49 4f5f 4b45 4550 414c 4956 4520 6d6f _IO_KEEPALIVE mo │ │ │ │ +0013da70: 6465 202e 2e2e 3c2f 6469 763e 3c64 6976 de ...
    < │ │ │ │ +0013da90: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:350 │ │ │ │ +0013dab0: 393c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 9
    .

    For UDP │ │ │ │ +0013dae0: 6d65 7373 6167 696e 672c 2075 7365 203c messaging, use < │ │ │ │ +0013daf0: 636f 6465 3e23 534f 4150 5f49 4f5f 5544 code>#SOAP_IO_UD │ │ │ │ +0013db00: 503c 2f63 6f64 653e 2e20 5365 6520 616c P. See al │ │ │ │ +0013db10: 736f 2053 6563 7469 6f6e 203c 6120 636c so Section S │ │ │ │ +0013db40: 4f41 502f 584d 4c20 6f76 6572 2055 4450 OAP/XML over UDP │ │ │ │ +0013db50: 3c2f 613e 2e20 5468 6520 636f 6e74 6578 . The contex │ │ │ │ +0013db60: 7420 666c 6167 7320 7468 6174 2063 616e t flags that can │ │ │ │ +0013db70: 2062 6520 7365 7420 6174 2074 6865 2063 be set at the c │ │ │ │ +0013db80: 6c69 656e 7420 7369 6465 2066 6f72 2055 lient side for U │ │ │ │ +0013db90: 4450 206d 6573 7361 6769 6e67 2061 7265 DP messaging are │ │ │ │ +0013dba0: 203c 636f 6465 3e3c 6120 636c 6173 733d │ │ │ │ +0013dc50: 736f 6170 3a3a 6970 7634 5f6d 756c 7469 soap::ipv4_multi │ │ │ │ +0013dc60: 6361 7374 5f69 663c 2f61 3e3c 2f63 6f64 cast_if, soap::ipv4_mu │ │ │ │ +0013dd30: 6c74 6963 6173 745f 7474 6c3c 2f61 3e3c lticast_ttl< │ │ │ │ +0013dd40: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and soap::ipv │ │ │ │ +0013ddf0: 365f 6d75 6c74 6963 6173 745f 6966 3c2f 6_multicast_if:

    .< │ │ │ │ +0013de10: 7461 626c 6520 636c 6173 733d 226d 6172 table class="mar │ │ │ │ +0013de20: 6b64 6f77 6e54 6162 6c65 223e 0a3c 7472 kdownTable">.
    .......< │ │ │ │ +0013e400: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0013e410: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0013e420: 3e3c 636f 6465 3e3c 6120 636c 6173 733d >soap │ │ │ │ +0013e4c0: 3a3a 6970 7636 5f6d 756c 7469 6361 7374 ::ipv6_multicast │ │ │ │ +0013e4d0: 5f69 663c 2f61 3e3c 2f63 6f64 653e 2020 _if │ │ │ │ +0013e4e0: 203c 2f74 643e 3c74 6420 636c 6173 733d . │ │ │ │ +0013e610: 3c2f 7461 626c 653e 0a3c 703e f09f 949d
    context │ │ │ │ +0013c230: 2066 6c61 6720 7769 7468 2073 656e 742f flag with sent/ │ │ │ │ +0013c240: 7265 6376 2066 6c61 6773 2020 203c 2f74 recv flags result
    soap:: │ │ │ │ +0013c390: 736f 636b 6574 5f66 6c61 6773 3c2f 613e socket_flags │ │ │ │ +0013c3a0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = │ │ │ │ +0013c3b0: 4d53 475f 4e4f 5349 474e 414c 3c2f 636f MSG_NOSIGNAL dis │ │ │ │ +0013c3f0: 6162 6c65 7320 5349 4750 4950 4520 2020 ables SIGPIPE │ │ │ │ +0013c400: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    enables routin │ │ │ │ +0013c580: 6720 6279 7061 7373 2066 6f72 206f 7574 g bypass for out │ │ │ │ +0013c590: 676f 696e 6720 6d65 7373 6167 6573 2020 going messages │ │ │ │ +0013c5a0: 203c 2f74 643e 3c2f 7472 3e0a 3c2f 7461
    co │ │ │ │ +0013de70: 6e74 6578 7420 666c 6167 2020 203c 2f74 ntext flag result
    soap: │ │ │ │ +0013dfb0: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_ │ │ │ │ +0013dfc0: 6966 3c2f 613e 3c2f 636f 6465 3e20 2020 if │ │ │ │ +0013dfd0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 set setsockopt level I │ │ │ │ +0013e020: 5050 524f 544f 5f49 503c 2f63 6f64 653e PPROTO_IP │ │ │ │ +0013e030: 2074 6f20 3c63 6f64 653e 4950 5f4d 554c to IP_MUL │ │ │ │ +0013e040: 5449 4341 5354 5f49 463c 2f63 6f64 653e TICAST_IF │ │ │ │ +0013e050: 2077 6974 6820 7661 6c75 6520 3c63 6f64 with value soap: │ │ │ │ +0013e110: 3a69 7076 345f 6d75 6c74 6963 6173 745f :ipv4_multicast_ │ │ │ │ +0013e120: 6966 3c2f 613e 3c2f 636f 6465 3e20 7768 if wh │ │ │ │ +0013e130: 656e 206e 6f6e 2d4e 554c 4c20 2020 203c en non-NULL < │ │ │ │ +0013e140: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    soa │ │ │ │ +0013e240: 703a 3a69 7076 345f 6d75 6c74 6963 6173 p::ipv4_multicas │ │ │ │ +0013e250: 745f 7474 6c3c 2f61 3e3c 2f63 6f64 653e t_ttl │ │ │ │ +0013e260: 2020 203c 2f74 643e 3c74 6420 636c 6173 set setsockopt level IPPROTO_IP to IP_ │ │ │ │ +0013e2d0: 4d55 4c54 4943 4153 545f 5454 4c3c 2f63 MULTICAST_TTL with value │ │ │ │ +0013e2f0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s │ │ │ │ +0013e3a0: 6f61 703a 3a69 7076 345f 6d75 6c74 6963 oap::ipv4_multic │ │ │ │ +0013e3b0: 6173 745f 7474 6c3c 2f61 3e3c 2f63 6f64 ast_ttl when nonzero │ │ │ │ +0013e3d0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    set sockaddr_in6:: │ │ │ │ +0013e520: 7369 6e36 5f73 636f 7065 5f69 643c 2f63 sin6_scope_id to soap::ipv6_mu │ │ │ │ +0013e5e0: 6c74 6963 6173 745f 6966 3c2f 613e 3c2f lticast_if when nonze │ │ │ │ +0013e600: 726f 2020 203c 2f74 643e 3c2f 7472 3e0a ro
    .

    .... │ │ │ │ +0013e620: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +0013e630: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +0013e640: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +0013e650: 6831 3e3c 6120 636c 6173 733d 2261 6e63 h1>.Run-time │ │ │ │ +0013e680: 2065 7272 6f72 2063 6f64 6573 3c2f 6831 error codes

    .

    Status erro │ │ │ │ +0013e6a0: 7220 636f 6465 7320 6172 6520 696e 7465 r codes are inte │ │ │ │ +0013e6b0: 6765 7220 7661 6c75 6573 2c20 7768 6963 ger values, whic │ │ │ │ +0013e6c0: 6820 6172 6520 7265 7475 726e 6564 2062 h are returned b │ │ │ │ +0013e6d0: 7920 7468 6520 6753 4f41 5020 4150 4920 y the gSOAP API │ │ │ │ +0013e6e0: 6675 6e63 7469 6f6e 732e 2054 6865 2066 functions. The f │ │ │ │ +0013e6f0: 756c 6c20 6c69 7374 206f 6620 3c63 6f64 ull list of soap_status error │ │ │ │ +0013e7d0: 636f 6465 7320 6973 206c 6973 7465 6420 codes is listed │ │ │ │ +0013e7e0: 6265 6c6f 773a 3c2f 703e 0a3c 7461 626c below:

    ...Error │ │ │ │ +0013e850: 636f 6465 2020 203c 2f74 683e 3c74 6820 code De │ │ │ │ +0013e880: 7363 7269 7074 696f 6e20 2020 203c 2f74 scription ..#SOAP_OK │ │ │ │ +0013e8f0: 2020 203c 2f74 643e 3c74 6420 636c 6173 No err │ │ │ │ +0013e920: 6f72 2028 7a65 726f 2920 2020 203c 2f74 or (zero) ..#SOAP_CLI_FAUL │ │ │ │ +0013e990: 543c 2f63 6f64 653e 2020 203c 2f74 643e T
    │ │ │ │ +0013e9a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 The service re │ │ │ │ +0013e9d0: 7475 726e 6564 2061 2053 4f41 5020 312e turned a SOAP 1. │ │ │ │ +0013e9e0: 3120 636c 6965 6e74 2066 6175 6c74 202f 1 client fault / │ │ │ │ +0013e9f0: 2053 4f41 5020 312e 3220 7365 6e64 6572 SOAP 1.2 sender │ │ │ │ +0013ea00: 2066 6175 6c74 2074 6f20 7468 6520 636c fault to the cl │ │ │ │ +0013ea10: 6965 6e74 2020 2020 3c2f 7464 3e3c 2f74 ient ..#SOA │ │ │ │ +0013ea70: 505f 4441 5441 454e 434f 4449 4e47 554e P_DATAENCODINGUN │ │ │ │ +0013ea80: 4b4e 4f57 4e3c 2f63 6f64 653e 2020 203c KNOWN < │ │ │ │ +0013ea90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>SOAP 1.2 D │ │ │ │ +0013eac0: 6174 6145 6e63 6f64 696e 6755 6e6b 6e6f ataEncodingUnkno │ │ │ │ +0013ead0: 776e 2066 6175 6c74 2020 2020 3c2f 7464 wn fault ..#SOAP_DEL_METHO │ │ │ │ +0013eb40: 443c 2f63 6f64 653e 2020 203c 2f74 643e D │ │ │ │ +0013eb50: 3c74 6420 636c 6173 733d 226d 6172 6b64 An HTTP DELETE │ │ │ │ +0013eb80: 2072 6571 7565 7374 2077 6173 2072 6563 request was rec │ │ │ │ +0013eb90: 6569 7665 6420 6279 2074 6865 2073 6572 eived by the ser │ │ │ │ +0013eba0: 7669 6365 2062 7574 2074 6865 2044 454c vice but the DEL │ │ │ │ +0013ebb0: 4554 4520 7265 7175 6573 7420 6361 6c6c ETE request call │ │ │ │ +0013ebc0: 6261 636b 203c 636f 6465 3e3c 6120 636c back soap::fdel< │ │ │ │ +0013eca0: 2f63 6f64 653e 2069 7320 6e6f 7420 696d /code> is not im │ │ │ │ +0013ecb0: 706c 656d 656e 7465 642c 2073 6565 2053 plemented, see S │ │ │ │ +0013ecc0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection │ │ │ │ +0013ecf0: 4675 6e63 7469 6f6e 2063 616c 6c62 6163 Function callbac │ │ │ │ +0013ed00: 6b73 2066 6f72 2063 7573 746f 6d69 7a65 ks for customize │ │ │ │ +0013ed10: 6420 492f 4f20 616e 6420 4854 5450 2068 d I/O and HTTP h │ │ │ │ +0013ed20: 616e 646c 696e 673c 2f61 3e20 2020 203c andling < │ │ │ │ +0013ed30: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_DIME_EN │ │ │ │ +0013ed90: 443c 2f63 6f64 653e 2020 203c 2f74 643e D │ │ │ │ +0013eda0: 3c74 6420 636c 6173 733d 226d 6172 6b64 End of DIME at │ │ │ │ +0013edd0: 7461 6368 6d65 6e74 7320 7072 6f74 6f63 tachments protoc │ │ │ │ +0013ede0: 6f6c 2065 7272 6f72 2020 2020 3c2f 7464 ol error ..#SOAP_DIME_ERRO │ │ │ │ +0013ee50: 523c 2f63 6f64 653e 2020 203c 2f74 643e R │ │ │ │ +0013ee60: 3c74 6420 636c 6173 733d 226d 6172 6b64 DIME formattin │ │ │ │ +0013ee90: 6720 6572 726f 7220 6f72 2044 494d 4520 g error or DIME │ │ │ │ +0013eea0: 6174 7461 6368 6d65 6e74 2073 697a 6520 attachment size │ │ │ │ +0013eeb0: 6578 6365 6564 7320 3c63 6f64 653e 2353 exceeds #S │ │ │ │ +0013eec0: 4f41 505f 4d41 5844 494d 4553 495a 453c OAP_MAXDIMESIZE< │ │ │ │ +0013eed0: 2f63 6f64 653e 2020 2020 3c2f 7464 3e3c /code> < │ │ │ │ +0013eee0: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S │ │ │ │ +0013ef30: 4f41 505f 4449 4d45 5f48 5245 463c 2f63 OAP_DIME_HREF DI │ │ │ │ +0013ef70: 4d45 2061 7474 6163 686d 656e 7420 6861 ME attachment ha │ │ │ │ +0013ef80: 7320 6e6f 2068 7265 6620 6672 6f6d 2053 s no href from S │ │ │ │ +0013ef90: 4f41 5020 626f 6479 2061 6e64 206e 6f20 OAP body and no │ │ │ │ +0013efa0: 4449 4d45 2063 616c 6c62 6163 6b73 2077 DIME callbacks w │ │ │ │ +0013efb0: 6572 6520 6465 6669 6e65 6420 746f 2073 ere defined to s │ │ │ │ +0013efc0: 6176 6520 7468 6520 6174 7461 6368 6d65 ave the attachme │ │ │ │ +0013efd0: 6e74 2020 2020 3c2f 7464 3e3c 2f74 723e nt │ │ │ │ +0013efe0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP │ │ │ │ +0013f030: 5f44 494d 455f 4d49 534d 4154 4348 3c2f _DIME_MISMATCH D │ │ │ │ +0013f070: 494d 4520 7665 7273 696f 6e20 6572 726f IME version erro │ │ │ │ +0013f080: 7220 2020 203c 2f74 643e 3c2f 7472 3e0a r . │ │ │ │ +0013f090: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +0013f0b0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_D │ │ │ │ +0013f0e0: 5550 4c49 4341 5445 5f49 443c 2f63 6f64 UPLICATE_ID XML │ │ │ │ +0013f120: 656c 656d 656e 7420 6861 7320 6475 706c element has dupl │ │ │ │ +0013f130: 6963 6174 6520 6964 2061 7474 7269 6275 icate id attribu │ │ │ │ +0013f140: 7465 2076 616c 7565 2028 6170 706c 6963 te value (applic │ │ │ │ +0013f150: 6162 6c65 2074 6f20 534f 4150 206d 756c able to SOAP mul │ │ │ │ +0013f160: 7469 2d72 6566 2065 6e63 6f64 696e 6720 ti-ref encoding │ │ │ │ +0013f170: 616e 6420 3c63 6f64 653e 2353 4f41 505f and #SOAP_ │ │ │ │ +0013f180: 584d 4c5f 4752 4150 483c 2f63 6f64 653e XML_GRAPH │ │ │ │ +0013f190: 2073 6572 6961 6c69 7a61 7469 6f6e 2920 serialization) │ │ │ │ +0013f1a0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 .. │ │ │ │ +0013f1d0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_EM │ │ │ │ +0013f200: 5054 593c 2f63 6f64 653e 2020 203c 2f74 PTY XML element │ │ │ │ +0013f240: 6f72 2061 7474 7269 6275 7465 2069 7320 or attribute is │ │ │ │ +0013f250: 656d 7074 7920 7768 656e 2061 2076 616c empty when a val │ │ │ │ +0013f260: 7565 2069 7320 7265 7175 6972 6564 2020 ue is required │ │ │ │ +0013f270: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 .. │ │ │ │ +0013f2c0: 3c63 6f64 653e 2353 4f41 505f 454f 463c #SOAP_EOF< │ │ │ │ +0013f2d0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> │ │ │ │ +0013f300: 556e 6578 7065 6374 6564 2065 6e64 206f Unexpected end o │ │ │ │ +0013f310: 6620 6669 6c65 2c20 6e6f 2069 6e70 7574 f file, no input │ │ │ │ +0013f320: 2c20 7472 616e 736d 6973 7369 6f6e 2069 , transmission i │ │ │ │ +0013f330: 6e74 6572 7275 7074 6564 206f 7220 7469 nterrupted or ti │ │ │ │ +0013f340: 6d65 6420 6f75 742c 2073 616d 6520 6173 med out, same as │ │ │ │ +0013f350: 203c 636f 6465 3e45 4f46 3c2f 636f 6465 EOF . │ │ │ │ +0013f370: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_ │ │ │ │ +0013f3c0: 454f 4d3c 2f63 6f64 653e 2020 203c 2f74 EOM Out of memor │ │ │ │ +0013f400: 7920 2020 203c 2f74 643e 3c2f 7472 3e0a y . │ │ │ │ +0013f410: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +0013f430: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .#SOAP_E │ │ │ │ +0013f460: 5252 3c2f 636f 6465 3e20 2020 3c2f 7464 RR Same as EOF, but │ │ │ │ +0013f4b0: 2069 6e64 6963 6174 6573 2061 6e20 756e indicates an un │ │ │ │ +0013f4c0: 7370 6563 6966 6965 6420 6572 726f 7220 specified error │ │ │ │ +0013f4d0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 .. │ │ │ │ +0013f500: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_FA │ │ │ │ +0013f530: 554c 543c 2f63 6f64 653e 2020 203c 2f74 ULT The fault co │ │ │ │ +0013f570: 6465 2074 6f20 6265 2072 6574 7572 6e65 de to be returne │ │ │ │ +0013f580: 6420 6279 2061 2073 6572 7669 6365 206f d by a service o │ │ │ │ +0013f590: 7065 7261 7469 6f6e 2077 6865 6e20 6361 peration when ca │ │ │ │ +0013f5a0: 6c6c 696e 6720 3c63 6f64 653e 3c61 2063 lling soap_s │ │ │ │ +0013f650: 656e 6465 725f 6661 756c 743c 2f61 3e3c ender_fault< │ │ │ │ +0013f660: 2f63 6f64 653e 2028 636c 6965 6e74 2069 /code> (client i │ │ │ │ +0013f670: 7320 6174 2066 6175 6c74 2920 6f72 203c s at fault) or < │ │ │ │ +0013f680: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_receiv │ │ │ │ +0013f730: 6572 5f66 6175 6c74 3c2f 613e 3c2f 636f er_fault (server is a │ │ │ │ +0013f750: 7420 6661 756c 7429 2c20 636c 6965 6e74 t fault), client │ │ │ │ +0013f760: 7320 7265 6365 6976 6520 7468 6520 6661 s receive the fa │ │ │ │ +0013f770: 756c 7420 6173 203c 636f 6465 3e23 534f ult as #SO │ │ │ │ +0013f780: 4150 5f43 4c49 5f46 4155 4c54 3c2f 636f AP_CLI_FAULT or #SO │ │ │ │ +0013f7a0: 4150 5f53 5652 5f46 4155 4c54 3c2f 636f AP_SVR_FAULT respectively │ │ │ │ +0013f7c0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .< │ │ │ │ +0013f7d0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +0013f7e0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +0013f7f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_FD │ │ │ │ +0013f820: 5f45 5843 4545 4445 443c 2f63 6f64 653e _EXCEEDED │ │ │ │ +0013f830: 2020 203c 2f74 643e 3c74 6420 636c 6173 Too ma │ │ │ │ +0013f860: 6e79 206f 7065 6e20 736f 636b 6574 7320 ny open sockets │ │ │ │ +0013f870: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 .. │ │ │ │ +0013f8a0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_FI │ │ │ │ +0013f8d0: 5845 443c 2f63 6f64 653e 2020 203c 2f74 XED XML element │ │ │ │ +0013f910: 6f72 2061 7474 7269 6275 7465 2076 616c or attribute val │ │ │ │ +0013f920: 7565 2069 7320 6669 7865 6420 616e 6420 ue is fixed and │ │ │ │ +0013f930: 7468 6520 7061 7273 6564 2076 616c 7565 the parsed value │ │ │ │ +0013f940: 2064 6f65 7320 6e6f 7420 6d61 7463 6820 does not match │ │ │ │ +0013f950: 7468 6520 6669 7865 6420 7661 6c75 6520 the fixed value │ │ │ │ +0013f960: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..< │ │ │ │ +0013f990: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0013f9a0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0013f9b0: 3e3c 636f 6465 3e23 534f 4150 5f47 4554 >#SOAP_GET │ │ │ │ +0013f9c0: 5f4d 4554 484f 443c 2f63 6f64 653e 2020 _METHOD │ │ │ │ +0013f9d0: 203c 2f74 643e 3c74 6420 636c 6173 733d An HTTP │ │ │ │ +0013fa00: 4745 5420 7265 7175 6573 7420 7761 7320 GET request was │ │ │ │ +0013fa10: 7265 6365 6976 6564 2062 7920 7468 6520 received by the │ │ │ │ +0013fa20: 7365 7276 6963 6520 6275 7420 7468 6520 service but the │ │ │ │ +0013fa30: 4745 5420 7265 7175 6573 7420 6361 6c6c GET request call │ │ │ │ +0013fa40: 6261 636b 203c 636f 6465 3e3c 6120 636c back soa │ │ │ │ +0013fb10: 703a 3a66 6765 743c 2f61 3e3c 2f63 6f64 p::fget is not implem │ │ │ │ +0013fb30: 656e 7465 642c 2073 6565 2053 6563 7469 ented, see Secti │ │ │ │ +0013fb40: 6f6e 7320 3c61 2063 6c61 7373 3d22 656c ons How to i │ │ │ │ +0013fb70: 6d70 6c65 6d65 6e74 2048 5454 5020 4745 mplement HTTP GE │ │ │ │ +0013fb80: 542c 2050 5554 2c20 616e 6420 5041 5443 T, PUT, and PATC │ │ │ │ +0013fb90: 4820 7365 7276 6963 6573 3c2f 613e 2061 H services a │ │ │ │ +0013fba0: 6e64 203c 6120 636c 6173 733d 2265 6c22 nd Func │ │ │ │ +0013fbd0: 7469 6f6e 2063 616c 6c62 6163 6b73 2066 tion callbacks f │ │ │ │ +0013fbe0: 6f72 2063 7573 746f 6d69 7a65 6420 492f or customized I/ │ │ │ │ +0013fbf0: 4f20 616e 6420 4854 5450 2068 616e 646c O and HTTP handl │ │ │ │ +0013fc00: 696e 673c 2f61 3e20 2020 203c 2f74 643e ing │ │ │ │ +0013fc10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +0013fc60: 2353 4f41 505f 4852 4546 3c2f 636f 6465 #SOAP_HREF Refer │ │ │ │ +0013fca0: 656e 6365 2074 6f20 6f62 6a65 6374 2069 ence to object i │ │ │ │ +0013fcb0: 6e20 584d 4c20 6964 656e 7469 6669 6564 n XML identified │ │ │ │ +0013fcc0: 2062 7920 6974 7320 6964 2061 7474 7269 by its id attri │ │ │ │ +0013fcd0: 6275 7465 2069 7320 696e 636f 6d70 6174 bute is incompat │ │ │ │ +0013fce0: 6962 6c65 2077 6974 6820 7468 6520 6f62 ible with the ob │ │ │ │ +0013fcf0: 6a65 6374 2072 6566 6572 7265 6420 746f ject referred to │ │ │ │ +0013fd00: 2062 7920 7468 6520 7265 6620 6f72 2068 by the ref or h │ │ │ │ +0013fd10: 7265 6620 6174 7472 6962 7574 6520 2861 ref attribute (a │ │ │ │ +0013fd20: 7070 6c69 6361 626c 6520 746f 2053 4f41 pplicable to SOA │ │ │ │ +0013fd30: 5020 6d75 6c74 692d 7265 6620 656e 636f P multi-ref enco │ │ │ │ +0013fd40: 6469 6e67 2061 6e64 203c 636f 6465 3e23 ding and # │ │ │ │ +0013fd50: 534f 4150 5f58 4d4c 5f47 5241 5048 3c2f SOAP_XML_GRAPH serializat │ │ │ │ +0013fd70: 696f 6e29 2020 2020 3c2f 7464 3e3c 2f74 ion) ..#SOA │ │ │ │ +0013fdd0: 505f 4854 5450 5f45 5252 4f52 3c2f 636f P_HTTP_ERROR An │ │ │ │ +0013fe10: 756e 7370 6563 6966 6965 6420 4854 5450 unspecified HTTP │ │ │ │ +0013fe20: 2065 7272 6f72 206f 6363 7572 7265 6420 error occurred │ │ │ │ +0013fe30: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 .. │ │ │ │ +0013fe60: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_HT │ │ │ │ +0013fe90: 5450 5f4d 4554 484f 443c 2f63 6f64 653e TP_METHOD │ │ │ │ +0013fea0: 2020 203c 2f74 643e 3c74 6420 636c 6173 An HTT │ │ │ │ +0013fed0: 5020 7265 7175 6573 7420 7761 7320 7265 P request was re │ │ │ │ +0013fee0: 6365 6976 6564 2062 7920 7468 6520 7365 ceived by the se │ │ │ │ +0013fef0: 7276 6963 6520 7468 6174 2063 616e 6e6f rvice that canno │ │ │ │ +0013ff00: 7420 6265 2068 616e 646c 6564 2020 2020 t be handled │ │ │ │ +0013ff10: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..#SOAP_IOB SO │ │ │ │ +0013ffa0: 4150 2061 7272 6179 2069 6e64 6578 206f AP array index o │ │ │ │ +0013ffb0: 7574 206f 6620 626f 756e 6473 2020 2020 ut of bounds │ │ │ │ +0013ffc0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..< │ │ │ │ +00140010: 636f 6465 3e23 534f 4150 5f4c 454e 4754 code>#SOAP_LENGT │ │ │ │ +00140020: 483c 2f63 6f64 653e 2020 203c 2f74 643e H │ │ │ │ +00140030: 3c74 6420 636c 6173 733d 226d 6172 6b64 XML element or │ │ │ │ +00140060: 2061 7474 7269 6275 7465 206c 656e 6774 attribute lengt │ │ │ │ +00140070: 6820 7661 6c69 6461 7469 6f6e 2065 7272 h validation err │ │ │ │ +00140080: 6f72 206f 7220 3c63 6f64 653e 2353 4f41 or or #SOA │ │ │ │ +00140090: 505f 4d41 584c 454e 4754 483c 2f63 6f64 P_MAXLENGTH exceeded < │ │ │ │ +001400b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_LEVEL X │ │ │ │ +00140140: 4d4c 206e 6573 7469 6e67 2064 6570 7468 ML nesting depth │ │ │ │ +00140150: 206c 6576 656c 2065 7863 6565 6473 203c level exceeds < │ │ │ │ +00140160: 636f 6465 3e23 534f 4150 5f4d 4158 4c45 code>#SOAP_MAXLE │ │ │ │ +00140170: 5645 4c3c 2f63 6f64 653e 2020 2020 3c2f VEL ..#SOAP_MIME_EN │ │ │ │ +001401e0: 443c 2f63 6f64 653e 2020 203c 2f74 643e D │ │ │ │ +001401f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 End of MIME at │ │ │ │ +00140220: 7461 6368 6d65 6e74 7320 7072 6f74 6f63 tachments protoc │ │ │ │ +00140230: 6f6c 2065 7272 6f72 2020 2020 3c2f 7464 ol error .. │ │ │ │ +00140290: 2353 4f41 505f 4d49 4d45 5f45 5252 4f52 #SOAP_MIME_ERROR │ │ │ │ +001402a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +001402b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001402c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +001402d0: 3e4d 494d 4520 6174 7461 6368 6d65 6e74 >MIME attachment │ │ │ │ +001402e0: 2070 6172 7369 6e67 2065 7272 6f72 2020 parsing error │ │ │ │ +001402f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..< │ │ │ │ +00140320: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00140330: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00140340: 3e3c 636f 6465 3e23 534f 4150 5f4d 494d >#SOAP_MIM │ │ │ │ +00140350: 455f 4852 4546 3c2f 636f 6465 3e20 2020 E_HREF │ │ │ │ +00140360: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 MIME atta │ │ │ │ +00140390: 6368 6d65 6e74 2068 6173 206e 6f20 6872 chment has no hr │ │ │ │ +001403a0: 6566 2066 726f 6d20 534f 4150 2062 6f64 ef from SOAP bod │ │ │ │ +001403b0: 7920 616e 6420 6e6f 204d 494d 4520 6361 y and no MIME ca │ │ │ │ +001403c0: 6c6c 6261 636b 7320 7765 7265 2064 6566 llbacks were def │ │ │ │ +001403d0: 696e 6564 2074 6f20 7361 7665 2074 6865 ined to save the │ │ │ │ +001403e0: 2061 7474 6163 686d 656e 7420 2020 203c attachment < │ │ │ │ +001403f0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_MISSING │ │ │ │ +00140450: 5f49 443c 2f63 6f64 653e 2020 203c 2f74 _ID
    An XML eleme │ │ │ │ +00140490: 6e74 2077 6974 6820 6964 2061 7474 7269 nt with id attri │ │ │ │ +001404a0: 6275 7465 2069 7320 6d69 7373 696e 6720 bute is missing │ │ │ │ +001404b0: 7468 6174 2073 686f 756c 6420 6d61 7463 that should matc │ │ │ │ +001404c0: 6820 7468 6520 656c 656d 656e 7420 7769 h the element wi │ │ │ │ +001404d0: 7468 2068 7265 662f 7265 6620 6174 7472 th href/ref attr │ │ │ │ +001404e0: 6962 7574 6520 2861 7070 6c69 6361 626c ibute (applicabl │ │ │ │ +001404f0: 6520 746f 2053 4f41 5020 6d75 6c74 692d e to SOAP multi- │ │ │ │ +00140500: 7265 6620 656e 636f 6469 6e67 2061 6e64 ref encoding and │ │ │ │ +00140510: 203c 636f 6465 3e23 534f 4150 5f58 4d4c #SOAP_XML │ │ │ │ +00140520: 5f47 5241 5048 3c2f 636f 6465 3e20 7365 _GRAPH se │ │ │ │ +00140530: 7269 616c 697a 6174 696f 6e29 2020 2020 rialization) │ │ │ │ +00140540: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063 ..< │ │ │ │ +00140590: 636f 6465 3e23 534f 4150 5f4d 4f45 3c2f code>#SOAP_MOE M │ │ │ │ +001405d0: 656d 6f72 7920 6f76 6572 666c 6f77 206f emory overflow o │ │ │ │ +001405e0: 7220 6d65 6d6f 7279 2063 6f72 7275 7074 r memory corrupt │ │ │ │ +001405f0: 696f 6e20 6572 726f 7220 2861 7070 6c69 ion error (appli │ │ │ │ +00140600: 6361 626c 6520 696e 203c 636f 6465 3e23 cable in # │ │ │ │ +00140610: 4445 4255 473c 2f63 6f64 653e 206d 6f64 DEBUG mod │ │ │ │ +00140620: 6520 6f6e 6c79 2920 2020 203c 2f74 643e e only) │ │ │ │ +00140630: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..# │ │ │ │ +00140680: 534f 4150 5f4d 5553 5455 4e44 4552 5354 SOAP_MUSTUNDERST │ │ │ │ +00140690: 414e 443c 2f63 6f64 653e 2020 203c 2f74 AND An XML eleme │ │ │ │ +001406d0: 6e74 2069 7320 7072 6573 656e 7420 7769 nt is present wi │ │ │ │ +001406e0: 7468 2061 206d 7573 7455 6e64 6572 7374 th a mustUnderst │ │ │ │ +001406f0: 616e 6420 6174 7472 6962 7574 6520 7768 and attribute wh │ │ │ │ +00140700: 6963 6820 6d75 7374 2062 6520 756e 6465 ich must be unde │ │ │ │ +00140710: 7273 746f 6f64 2062 7574 2069 7320 6e6f rstood but is no │ │ │ │ +00140720: 7420 6465 7365 7269 616c 697a 6564 2020 t deserialized │ │ │ │ +00140730: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 ..< │ │ │ │ +00140760: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00140770: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00140780: 3e3c 636f 6465 3e23 534f 4150 5f4e 414d >#SOAP_NAM │ │ │ │ +00140790: 4553 5041 4345 3c2f 636f 6465 3e20 2020 ESPACE │ │ │ │ +001407a0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML names │ │ │ │ +001407d0: 7061 6365 206e 616d 6520 6d69 736d 6174 pace name mismat │ │ │ │ +001407e0: 6368 2076 616c 6964 6174 696f 6e20 6572 ch validation er │ │ │ │ +001407f0: 726f 7220 2020 203c 2f74 643e 3c2f 7472 ror ..#SOAP │ │ │ │ +00140850: 5f4e 4f5f 4441 5441 3c2f 636f 6465 3e20 _NO_DATA │ │ │ │ +00140860: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 No data │ │ │ │ +00140890: 2069 6e20 7468 6520 4854 5450 2062 6f64 in the HTTP bod │ │ │ │ +001408a0: 7920 6f66 2074 6865 206d 6573 7361 6765 y of the message │ │ │ │ +001408b0: 2072 6563 6569 7665 6420 2020 203c 2f74 received ..#SOAP_NO_METHO │ │ │ │ +00140920: 443c 2f63 6f64 653e 2020 203c 2f74 643e D │ │ │ │ +00140930: 3c74 6420 636c 6173 733d 226d 6172 6b64 The service re │ │ │ │ +00140960: 7175 6573 7420 6469 7370 6174 6368 6572 quest dispatcher │ │ │ │ +00140970: 2064 6964 206e 6f74 2066 696e 6420 6120 did not find a │ │ │ │ +00140980: 6d61 7463 6869 6e67 2073 6572 7669 6365 matching service │ │ │ │ +00140990: 206f 7065 7261 7469 6f6e 2066 6f72 2061 operation for a │ │ │ │ +001409a0: 2073 6572 7669 6365 2072 6571 7565 7374 service request │ │ │ │ +001409b0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .< │ │ │ │ +001409c0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +001409d0: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +001409e0: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_NO │ │ │ │ +00140a10: 5f54 4147 3c2f 636f 6465 3e20 2020 3c2f _TAG No XML elem │ │ │ │ +00140a50: 656e 7420 7461 6720 7761 7320 666f 756e ent tag was foun │ │ │ │ +00140a60: 6420 7768 656e 206f 6e65 2077 6173 2065 d when one was e │ │ │ │ +00140a70: 7870 6563 7465 6420 2020 203c 2f74 643e xpected │ │ │ │ +00140a80: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +00140ad0: 2353 4f41 505f 4e54 4c4d 5f45 5252 4f52 #SOAP_NTLM_ERROR │ │ │ │ +00140ae0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +00140af0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00140b00: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00140b10: 3e41 6e20 4e54 4c4d 2061 7574 6865 6e74 >An NTLM authent │ │ │ │ +00140b20: 6963 6174 696f 6e20 6861 6e64 7368 616b ication handshak │ │ │ │ +00140b30: 6520 6572 726f 7220 6f63 6375 7272 6564 e error occurred │ │ │ │ +00140b40: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .< │ │ │ │ +00140b50: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00140b60: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +00140b70: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_NU │ │ │ │ +00140ba0: 4c4c 3c2f 636f 6465 3e20 2020 3c2f 7464 LL XML element h │ │ │ │ +00140be0: 6173 2061 6e20 3c63 6f64 653e 7873 693a as an xsi: │ │ │ │ +00140bf0: 6e69 6c3c 2f63 6f64 653e 2061 7474 7269 nil attri │ │ │ │ +00140c00: 6275 7465 2077 6865 6e20 7468 6520 656c bute when the el │ │ │ │ +00140c10: 656d 656e 7420 6973 206e 6f74 206e 696c ement is not nil │ │ │ │ +00140c20: 6c61 626c 652c 2063 6175 7369 6e67 2061 lable, causing a │ │ │ │ +00140c30: 2076 616c 6964 6174 696f 6e20 6572 726f validation erro │ │ │ │ +00140c40: 7220 2020 203c 2f74 643e 3c2f 7472 3e0a r . │ │ │ │ +00140c50: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_ │ │ │ │ +00140ca0: 4f43 4355 5253 3c2f 636f 6465 3e20 2020 OCCURS │ │ │ │ +00140cb0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 XML eleme │ │ │ │ +00140ce0: 6e74 206d 696e 4f63 6375 7273 206f 7220 nt minOccurs or │ │ │ │ +00140cf0: 6d61 784f 6363 7572 7320 7661 6c69 6461 maxOccurs valida │ │ │ │ +00140d00: 7469 6f6e 2065 7272 6f72 206f 7220 3c63 tion error or #SOAP_MAXOCC │ │ │ │ +00140d20: 5552 533c 2f63 6f64 653e 2065 7863 6565 URS excee │ │ │ │ +00140d30: 6465 6420 2020 203c 2f74 643e 3c2f 7472 ded ..#SOAP │ │ │ │ +00140d90: 5f50 4154 4348 5f4d 4554 484f 443c 2f63 _PATCH_METHOD An │ │ │ │ +00140dd0: 2048 5454 5020 5041 5443 4820 7265 7175 HTTP PATCH requ │ │ │ │ +00140de0: 6573 7420 7761 7320 7265 6365 6976 6564 est was received │ │ │ │ +00140df0: 2062 7920 7468 6520 7365 7276 6963 6520 by the service │ │ │ │ +00140e00: 6275 7420 7468 6520 5041 5443 4820 7265 but the PATCH re │ │ │ │ +00140e10: 7175 6573 7420 6361 6c6c 6261 636b 203c quest callback < │ │ │ │ +00140e20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap: │ │ │ │ +00140ef0: 3a66 7061 7463 683c 2f61 3e3c 2f63 6f64 :fpatch is not implem │ │ │ │ +00140f10: 656e 7465 642c 2073 6565 2053 6563 7469 ented, see Secti │ │ │ │ +00140f20: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Func │ │ │ │ +00140f50: 7469 6f6e 2063 616c 6c62 6163 6b73 2066 tion callbacks f │ │ │ │ +00140f60: 6f72 2063 7573 746f 6d69 7a65 6420 492f or customized I/ │ │ │ │ +00140f70: 4f20 616e 6420 4854 5450 2068 616e 646c O and HTTP handl │ │ │ │ +00140f80: 696e 673c 2f61 3e20 2020 203c 2f74 643e ing │ │ │ │ +00140f90: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +00140fe0: 2353 4f41 505f 5041 5454 4552 4e3c 2f63 #SOAP_PATTERN XM │ │ │ │ +00141020: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att │ │ │ │ +00141030: 7269 6275 7465 2076 616c 7565 2070 6174 ribute value pat │ │ │ │ +00141040: 7465 726e 206d 6973 6d61 7463 6820 2020 tern mismatch │ │ │ │ +00141050: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220 ..< │ │ │ │ +001410a0: 636f 6465 3e23 534f 4150 5f50 4c55 4749 code>#SOAP_PLUGI │ │ │ │ +001410b0: 4e5f 4552 524f 523c 2f63 6f64 653e 2020 N_ERROR │ │ │ │ +001410c0: 203c 2f74 643e 3c74 6420 636c 6173 733d Failed t │ │ │ │ +001410f0: 6f20 7265 6769 7374 6572 2070 6c75 6769 o register plugi │ │ │ │ +00141100: 6e20 2020 203c 2f74 643e 3c2f 7472 3e0a n . │ │ │ │ +00141110: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_ │ │ │ │ +00141160: 5052 4f48 4942 4954 4544 3c2f 636f 6465 PROHIBITED XML a │ │ │ │ +001411a0: 7474 7269 6275 7465 2069 7320 7072 6f68 ttribute is proh │ │ │ │ +001411b0: 6962 6974 6564 2062 7574 2070 7265 7365 ibited but prese │ │ │ │ +001411c0: 6e74 2020 2020 3c2f 7464 3e3c 2f74 723e nt │ │ │ │ +001411d0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..#SOAP_ │ │ │ │ +00141220: 5055 545f 4d45 5448 4f44 3c2f 636f 6465 PUT_METHOD An HT │ │ │ │ +00141260: 5450 2050 5554 2072 6571 7565 7374 2077 TP PUT request w │ │ │ │ +00141270: 6173 2072 6563 6569 7665 6420 6279 2074 as received by t │ │ │ │ +00141280: 6865 2073 6572 7669 6365 2062 7574 2074 he service but t │ │ │ │ +00141290: 6865 2050 5554 2072 6571 7565 7374 2063 he PUT request c │ │ │ │ +001412a0: 616c 6c62 6163 6b20 3c63 6f64 653e 3c61 allback │ │ │ │ +00141370: 736f 6170 3a3a 6670 7574 3c2f 613e 3c2f soap::fput is not imp │ │ │ │ +00141390: 6c65 6d65 6e74 6564 2c20 7365 6520 5365 lemented, see Se │ │ │ │ +001413a0: 6374 696f 6e20 3c61 2063 6c61 7373 3d22 ction F │ │ │ │ +001413d0: 756e 6374 696f 6e20 6361 6c6c 6261 636b unction callback │ │ │ │ +001413e0: 7320 666f 7220 6375 7374 6f6d 697a 6564 s for customized │ │ │ │ +001413f0: 2049 2f4f 2061 6e64 2048 5454 5020 6861 I/O and HTTP ha │ │ │ │ +00141400: 6e64 6c69 6e67 3c2f 613e 2020 2020 3c2f ndling ..#SOAP_REQUIRE │ │ │ │ +00141470: 443c 2f63 6f64 653e 2020 203c 2f74 643e D │ │ │ │ +00141480: 3c74 6420 636c 6173 733d 226d 6172 6b64 XML attribute │ │ │ │ +001414b0: 6973 2072 6571 7569 7265 6420 6275 7420 is required but │ │ │ │ +001414c0: 6e6f 7420 7072 6573 656e 7420 2020 203c not present < │ │ │ │ +001414d0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..#SOAP_SSL_ERR │ │ │ │ +00141530: 4f52 3c2f 636f 6465 3e20 2020 3c2f 7464 OR An SSL error │ │ │ │ +00141570: 6f63 6375 7272 6564 2020 2020 3c2f 7464 occurred ..#SOAP_SVR_FAULT │ │ │ │ +001415e0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +001415f0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00141600: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00141610: 3e54 6865 2073 6572 7669 6365 2072 6574 >The service ret │ │ │ │ +00141620: 7572 6e65 6420 6120 534f 4150 2031 2e31 urned a SOAP 1.1 │ │ │ │ +00141630: 2073 6572 7665 7220 6661 756c 7420 6f72 server fault or │ │ │ │ +00141640: 2053 4f41 5020 312e 3220 7265 6365 6976 SOAP 1.2 receiv │ │ │ │ +00141650: 6572 2066 6175 6c74 2074 6f20 7468 6520 er fault to the │ │ │ │ +00141660: 636c 6965 6e74 2020 2020 3c2f 7464 3e3c client < │ │ │ │ +00141670: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..#S │ │ │ │ +001416c0: 4f41 505f 5359 4e54 4158 5f45 5252 4f52 OAP_SYNTAX_ERROR │ │ │ │ +001416d0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +001416e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001416f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00141700: 3e41 6e20 584d 4c20 7379 6e74 6178 2065 >An XML syntax e │ │ │ │ +00141710: 7272 6f72 206f 6363 7572 7265 6420 7768 rror occurred wh │ │ │ │ +00141720: 696c 6520 7061 7273 696e 6720 7468 6520 ile parsing the │ │ │ │ +00141730: 696e 7075 7420 2020 203c 2f74 643e 3c2f input ..#S │ │ │ │ +00141790: 4f41 505f 5441 475f 4d49 534d 4154 4348 OAP_TAG_MISMATCH │ │ │ │ +001417a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +001417b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001417c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +001417d0: 3e58 4d4c 2065 6c65 6d65 6e74 2074 6167 >XML element tag │ │ │ │ +001417e0: 2070 6172 7365 6420 646f 6573 206e 6f74 parsed does not │ │ │ │ +001417f0: 206d 6174 6368 2061 6e79 7468 696e 6720 match anything │ │ │ │ +00141800: 7468 6174 2069 7320 6578 7065 6374 6564 that is expected │ │ │ │ +00141810: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c .< │ │ │ │ +00141820: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +00141830: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +00141840: 3c74 6420 636c 6173 733d 226d 6172 6b64 #SOAP_TC │ │ │ │ +00141870: 505f 4552 524f 523c 2f63 6f64 653e 2020 P_ERROR │ │ │ │ +00141880: 203c 2f74 643e 3c74 6420 636c 6173 733d A TCP/IP │ │ │ │ +001418b0: 2063 6f6e 6e65 6374 696f 6e20 6572 726f connection erro │ │ │ │ +001418c0: 7220 6f63 6375 7272 6564 2020 2020 3c2f r occurred ..#SOAP_TYPE XM │ │ │ │ +00141960: 4c20 656c 656d 656e 7420 6f72 2061 7474 L element or att │ │ │ │ +00141970: 7269 6275 7465 2068 6173 2061 206d 6973 ribute has a mis │ │ │ │ +00141980: 6d61 7463 6869 6e67 2074 7970 6520 6f72 matching type or │ │ │ │ +00141990: 2076 616c 7565 2074 6861 7420 6973 2063 value that is c │ │ │ │ +001419a0: 6175 7369 6e67 2061 2076 616c 6964 6174 ausing a validat │ │ │ │ +001419b0: 696f 6e20 6572 726f 7220 2020 203c 2f74 ion error ..#SOAP_UDP_ERROR │ │ │ │ +00141a20: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +00141a30: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00141a40: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00141a50: 3e41 2055 4450 2f49 5020 636f 6e6e 6563 >A UDP/IP connec │ │ │ │ +00141a60: 7469 6f6e 2065 7272 6f72 206f 6363 7572 tion error occur │ │ │ │ +00141a70: 7265 6420 6f72 2074 6865 206d 6573 7361 red or the messa │ │ │ │ +00141a80: 6765 2074 6f6f 206c 6172 6765 2074 6f20 ge too large to │ │ │ │ +00141a90: 7374 6f72 6520 696e 2061 2055 4450 2070 store in a UDP p │ │ │ │ +00141aa0: 6163 6b65 7420 2020 203c 2f74 643e 3c2f acket ..#S │ │ │ │ +00141b00: 4f41 505f 5553 4552 5f45 5252 4f52 3c2f OAP_USER_ERROR < │ │ │ │ +00141b40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00141b50: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +00141b60: 6d6c 2361 3865 6233 3563 3034 3335 3961 ml#a8eb35c04359a │ │ │ │ +00141b70: 3536 3763 3062 3565 3236 3634 6633 6639 567c0b5e2664f3f9 │ │ │ │ +00141b80: 3464 3562 2220 7469 746c 653d 2255 7365 4d5b" title="Use │ │ │ │ +00141b90: 722d 6465 6669 6e61 626c 6520 7661 7269 r-definable vari │ │ │ │ +00141ba0: 6162 6c65 2074 6861 7420 6d61 7920 706f able that may po │ │ │ │ +00141bb0: 696e 7420 746f 2075 7365 722d 7370 6563 int to user-spec │ │ │ │ +00141bc0: 6966 6965 6420 6461 7461 206f 6620 616e ified data of an │ │ │ │ +00141bd0: 7920 7479 7065 2074 6f20 7061 7373 2074 y type to pass t │ │ │ │ +00141be0: 6865 2064 6174 6120 7468 726f 7567 6820 he data through │ │ │ │ +00141bf0: 746f 2e2e 2e22 3e73 6f61 703a 3a75 7365 to...">soap::use │ │ │ │ +00141c00: 723c 2f61 3e20 6e6f 7420 7365 7420 746f r not set to │ │ │ │ +00141c10: 206e 6f6e 2d4e 554c 4c20 2020 203c 2f74 non-NULL ..#SOAP_UTF_ERROR │ │ │ │ +00141c80: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c < │ │ │ │ +00141c90: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00141ca0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00141cb0: 3e41 6e20 5554 462d 3820 6465 636f 6469 >An UTF-8 decodi │ │ │ │ +00141cc0: 6e67 2065 7272 6f72 206f 6363 7572 7265 ng error occurre │ │ │ │ +00141cd0: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d . │ │ │ │ +00141ce0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .#SOAP_ │ │ │ │ +00141d30: 5645 5253 494f 4e4d 4953 4d41 5443 483c VERSIONMISMATCH< │ │ │ │ +00141d40: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> │ │ │ │ +00141d70: 534f 4150 2076 6572 7369 6f6e 206d 6973 SOAP version mis │ │ │ │ +00141d80: 6d61 7463 6820 6f72 206e 6f20 534f 4150 match or no SOAP │ │ │ │ +00141d90: 206d 6573 7361 6765 2069 7320 7265 6365 message is rece │ │ │ │ +00141da0: 6976 6564 2020 2020 3c2f 7464 3e3c 2f74 ived ..#SOA │ │ │ │ +00141e00: 505f 5a4c 4942 5f45 5252 4f52 3c2f 636f P_ZLIB_ERROR A z │ │ │ │ +00141e40: 6c69 6220 6572 726f 7220 6f63 6375 7272 lib error occurr │ │ │ │ +00141e50: 6564 2020 203c 2f74 643e 3c2f 7472 3e0a ed . │ │ │ │ +00141e60: 3c2f 7461 626c 653e 0a3c 703e 4120 7374 .

    A st │ │ │ │ +00141e70: 6174 7573 2063 6f64 6520 6f66 203c 636f atus code of #SOAP_OK (zero) is ret │ │ │ │ +00141ea0: 7572 6e65 6420 6279 2061 2067 534f 4150 urned by a gSOAP │ │ │ │ +00141eb0: 2041 5049 2066 756e 6374 696f 6e20 7768 API function wh │ │ │ │ +00141ec0: 656e 2074 6865 2066 756e 6374 696f 6e20 en the function │ │ │ │ +00141ed0: 6361 6c6c 2077 6173 2073 7563 6365 7373 call was success │ │ │ │ +00141ee0: 6675 6c2c 206f 7468 6572 7769 7365 2061 ful, otherwise a │ │ │ │ +00141ef0: 206e 6f6e 2d7a 6572 6f20 6572 726f 7220 non-zero error │ │ │ │ +00141f00: 636f 6465 2069 7320 7265 7475 726e 6564 code is returned │ │ │ │ +00141f10: 2e20 5468 6520 7374 6174 7573 2065 7272 . The status err │ │ │ │ +00141f20: 6f72 2063 6f64 6520 6973 2061 6c73 6f20 or code is also │ │ │ │ +00141f30: 7374 6f72 6564 2069 6e20 7468 6520 6375 stored in the cu │ │ │ │ +00141f40: 7272 656e 7420 3c63 6f64 653e 3c61 2063 rrent soap │ │ │ │ +00141fa0: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context │ │ │ │ +00141fb0: 6173 203c 636f 6465 3e3c 6120 636c 6173 as s │ │ │ │ +00142060: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error. For IO an │ │ │ │ +00142080: 6420 736f 636b 6574 2d72 656c 6174 6564 d socket-related │ │ │ │ +00142090: 2065 7272 6f72 732c 2061 6c73 6f20 7468 errors, also th │ │ │ │ +001420a0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::er │ │ │ │ +00142130: 726e 756d 3c2f 613e 3c2f 636f 6465 3e20 rnum │ │ │ │ +00142140: 7661 7269 6162 6c65 2069 7320 7365 7420 variable is set │ │ │ │ +00142150: 746f 2074 6865 203c 636f 6465 3e65 7272 to the err │ │ │ │ +00142160: 6e6f 3c2f 636f 6465 3e20 7661 6c75 6520 no value │ │ │ │ +00142170: 6f66 2074 6865 2073 7973 7465 6d20 6572 of the system er │ │ │ │ +00142180: 726f 7220 666f 7220 6578 616d 706c 6520 ror for example │ │ │ │ +00142190: 7768 656e 2061 203c 636f 6465 3e23 534f when a #SO │ │ │ │ +001421a0: 4150 5f45 4f46 3c2f 636f 6465 3e20 6572 AP_EOF er │ │ │ │ +001421b0: 726f 7220 6f63 6375 7272 6564 2e3c 2f70 ror occurred.

    .

    To display │ │ │ │ +001421d0: 7468 6520 6572 726f 722c 2075 7365 203c the error, use < │ │ │ │ +001421e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ │ │ │ │ +00142270: 7072 696e 745f 6661 756c 7428 7374 7275 print_fault(stru │ │ │ │ +00142280: 6374 2073 6f61 7020 2a73 6f61 702c 2046 ct soap *soap, F │ │ │ │ +00142290: 494c 4520 2a66 6429 3c2f 613e 3c2f 636f ILE *fd) where the cu │ │ │ │ +001422b0: 7272 656e 7420 7661 6c75 6520 6f66 203c rrent value of < │ │ │ │ +001422c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap: │ │ │ │ +00142370: 3a65 7272 6f72 3c2f 613e 3c2f 636f 6465 :error is used by the │ │ │ │ +00142390: 2066 756e 6374 696f 6e20 746f 2070 7269 function to pri │ │ │ │ +001423a0: 6e74 2074 6865 2065 7272 6f72 2074 6f20 nt the error to │ │ │ │ +001423b0: 7468 6520 7370 6563 6966 6965 6420 3c63 the specified fd fi │ │ │ │ +001423d0: 6c65 2e20 416c 7465 726e 6174 6976 656c le. Alternativel │ │ │ │ +001423e0: 792c 2069 6e20 432b 2b20 796f 7520 6361 y, in C++ you ca │ │ │ │ +001423f0: 6e20 7573 6520 3c63 6f64 653e 3c61 2063 n use soap_st │ │ │ │ +00142490: 7265 616d 5f66 6175 6c74 2873 7472 7563 ream_fault(struc │ │ │ │ +001424a0: 7420 736f 6170 202a 736f 6170 2c20 7374 t soap *soap, st │ │ │ │ +001424b0: 643a 3a6f 7374 7265 616d 2661 6d70 3b20 d::ostream& │ │ │ │ +001424c0: 6f73 293c 2f61 3e3c 2f63 6f64 653e 2074 os) t │ │ │ │ +001424d0: 6f20 7072 696e 7420 7468 6520 6572 726f o print the erro │ │ │ │ +001424e0: 7220 6f6e 2074 6865 2073 7065 6369 6669 r on the specifi │ │ │ │ +001424f0: 6564 203c 636f 6465 3e6f 733c 2f63 6f64 ed os output stream │ │ │ │ +00142510: 2e3c 2f70 3e0a 3c70 3e54 6f20 6469 7370 .

    .

    To disp │ │ │ │ +00142520: 6c61 7920 7468 6520 6c6f 6361 7469 6f6e lay the location │ │ │ │ +00142530: 206f 6620 616e 2058 4d4c 2070 6172 7369 of an XML parsi │ │ │ │ +00142540: 6e67 2061 6e64 2076 616c 6964 6174 696f ng and validatio │ │ │ │ +00142550: 6e20 6572 726f 722c 2075 7365 203c 636f n error, use soap_print_faul │ │ │ │ +00142610: 745f 6c6f 6361 7469 6f6e 2873 7472 7563 t_location(struc │ │ │ │ +00142620: 7420 736f 6170 202a 736f 6170 2c20 4649 t soap *soap, FI │ │ │ │ +00142630: 4c45 202a 6664 293c 2f61 3e3c 2f63 6f64 LE *fd) or soap_s │ │ │ │ +001426f0: 7472 6561 6d5f 6661 756c 745f 6c6f 6361 tream_fault_loca │ │ │ │ +00142700: 7469 6f6e 2873 7472 7563 7420 736f 6170 tion(struct soap │ │ │ │ +00142710: 202a 736f 6170 2c20 7374 643a 3a6f 7374 *soap, std::ost │ │ │ │ +00142720: 7265 616d 2661 6d70 3b20 6f73 293c 2f61 ream& os) to prin │ │ │ │ +00142740: 7420 7061 7274 206f 6620 7468 6520 584d t part of the XM │ │ │ │ +00142750: 4c20 7769 7468 2074 6865 2065 7272 6f72 L with the error │ │ │ │ +00142760: 206c 6f63 6174 696f 6e20 6d61 726b 6564 location marked │ │ │ │ +00142770: 2069 6e20 7468 6520 584d 4c20 6f75 7470 in the XML outp │ │ │ │ +00142780: 7574 2e3c 2f70 3e0a 3c70 3e54 6f20 7361 ut.

    .

    To sa │ │ │ │ +00142790: 7665 2074 6865 2065 7272 6f72 2069 6e20 ve the error in │ │ │ │ +001427a0: 6120 7374 7269 6e67 2062 7566 6665 7220 a string buffer │ │ │ │ +001427b0: 3c63 6f64 653e 6275 665b 302e 2e2e 6c65 buf[0...le │ │ │ │ +001427c0: 6e2d 315d 3c2f 636f 6465 3e2c 2075 7365 n-1], use │ │ │ │ +001427d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sprint_ │ │ │ │ +00142870: 6661 756c 7428 7374 7275 6374 2073 6f61 fault(struct soa │ │ │ │ +00142880: 702a 2c20 6368 6172 202a 6275 662c 2073 p*, char *buf, s │ │ │ │ +00142890: 697a 655f 7420 6c65 6e29 3c2f 613e 3c2f ize_t len), where buf is │ │ │ │ +001428c0: 2070 6f70 756c 6174 6564 2077 6974 6820 populated with │ │ │ │ +001428d0: 7468 6520 6661 756c 7420 6d65 7373 6167 the fault messag │ │ │ │ +001428e0: 6520 7465 726d 696e 6174 696e 6720 7769 e terminating wi │ │ │ │ +001428f0: 7468 2061 203c 636f 6465 3e5c 303c 2f63 th a \0.

    .

    To │ │ │ │ +00142910: 6465 7465 726d 696e 6520 7468 6520 7479 determine the ty │ │ │ │ +00142920: 7065 206f 6620 6572 726f 7220 7468 6174 pe of error that │ │ │ │ +00142930: 206f 6363 7572 7265 642c 2075 7365 3a3c occurred, use:< │ │ │ │ +00142940: 2f70 3e3c 756c 3e0a 3c6c 693e 3c63 6f64 /p>

    .

    An HTTP sta │ │ │ │ +001435f0: 7475 7320 636f 6465 2069 7320 7265 7475 tus code is retu │ │ │ │ +00143600: 726e 6564 2077 6865 6e20 7468 6520 636c rned when the cl │ │ │ │ +00143610: 6965 6e74 2066 6169 6c73 2074 6f20 636f ient fails to co │ │ │ │ +00143620: 6e6e 6563 7420 746f 2061 6e20 4854 5450 nnect to an HTTP │ │ │ │ +00143630: 2073 6572 7665 7220 616e 6420 7468 6520 server and the │ │ │ │ +00143640: 4854 5450 2073 6572 7665 7220 7265 7370 HTTP server resp │ │ │ │ +00143650: 6f6e 7365 2077 6974 6820 616e 2065 7272 onse with an err │ │ │ │ +00143660: 6f72 2e20 5468 6520 6c69 7374 206f 6620 or. The list of │ │ │ │ +00143670: 4854 5450 2073 7461 7475 7320 636f 6465 HTTP status code │ │ │ │ +00143680: 7320 6973 2067 6976 656e 2062 656c 6f77 s is given below │ │ │ │ +00143690: 3a3c 2f70 3e0a 3c74 6162 6c65 2063 6c61 :

    ..... │ │ │ │ +00143780: 3230 3020 2020 3c2f 7464 3e3c 7464 2063 200 ... │ │ │ │ +00143850: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +00143870: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ +001438c0: 4163 6365 7074 6564 2020 2020 3c2f 7464 Accepted ......< │ │ │ │ +00143a20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00143a30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00143a40: 3e32 3035 2020 203c 2f74 643e 3c74 6420 >205 .......... │ │ │ │ +00143d00: 3330 3320 2020 3c2f 7464 3e3c 7464 2063 303 < │ │ │ │ +00143d40: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.. │ │ │ │ +00143dd0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..< │ │ │ │ +00143e20: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00143e30: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00143e40: 3e55 7365 2050 726f 7879 2020 2020 3c2f >Use Proxy ....< │ │ │ │ +00143f70: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>.. │ │ │ │ +00144000: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..< │ │ │ │ +00144050: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00144060: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00144070: 3e50 6179 6d65 6e74 2052 6571 7569 7265 >Payment Require │ │ │ │ +00144080: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d . │ │ │ │ +00144090: 3c74 7220 636c 6173 733d 226d 6172 6b64 .< │ │ │ │ +001440e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001440f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00144100: 3e46 6f72 6269 6464 656e 2020 2020 3c2f >Forbidden .. │ │ │ │ +001441a0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +001441f0: 3c74 6420 636c 6173 733d 226d 6172 6b64 ... │ │ │ │ +001442c0: 3c74 7220 636c 6173 733d 226d 6172 6b64 .< │ │ │ │ +00144310: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +00144320: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00144330: 3e50 726f 7879 2041 7574 6865 6e74 6963 >Proxy Authentic │ │ │ │ +00144340: 6174 696f 6e20 5265 7175 6972 6564 2020 ation Required │ │ │ │ +00144350: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 .. │ │ │ │ +001443a0: 3430 3820 2020 3c2f 7464 3e3c 7464 2063 408 .. │ │ │ │ +00144430: 3430 3920 2020 3c2f 7464 3e3c 7464 2063 409 .... │ │ │ │ +00144580: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ..... │ │ │ │ +001446b0: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +001446d0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ +00144720: 5265 7175 6573 742d 5552 4920 546f 6f20 Request-URI Too │ │ │ │ +00144730: 4c61 7267 6520 2020 203c 2f74 643e 3c2f Large .......... │ │ │ │ +001449c0: 3c74 6420 636c 6173 733d 226d 6172 6b64 .. │ │ │ │ +00144a70: 3530 3220 2020 3c2f 7464 3e3c 7464 2063 502 .......
    Code Description │ │ │ │ +00143730: 2020 3c2f 7468 3e3c 2f74 723e 0a3c 7472
    OK │ │ │ │ +001437b0: 286e 6f20 6572 726f 7229 2020 2020 3c2f (no error)
    201 │ │ │ │ +00143810: 2020 203c 2f74 643e 3c74 6420 636c 6173 Create │ │ │ │ +00143840: 6420 2020 203c 2f74 643e 3c2f 7472 3e0a d
    202
    203 │ │ │ │ +00143920: 203c 2f74 643e 3c74 6420 636c 6173 733d Non-Auth │ │ │ │ +00143950: 6f72 6974 6174 6976 6520 496e 666f 726d oritative Inform │ │ │ │ +00143960: 6174 696f 6e20 2020 203c 2f74 643e 3c2f ation
    204 No Content │ │ │ │ +001439f0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    Re │ │ │ │ +00143a70: 7365 7420 436f 6e74 656e 7420 2020 203c set Content < │ │ │ │ +00143a80: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    206 │ │ │ │ +00143ad0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Partia │ │ │ │ +00143b00: 6c20 436f 6e74 656e 7420 2020 203c 2f74 l Content
    300 │ │ │ │ +00143b60: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Multipl │ │ │ │ +00143b90: 6520 4368 6f69 6365 7320 2020 203c 2f74 e Choices
    301 │ │ │ │ +00143bf0: 203c 2f74 643e 3c74 6420 636c 6173 733d Moved Pe │ │ │ │ +00143c20: 726d 616e 656e 746c 7920 2020 203c 2f74 rmanently
    302 │ │ │ │ +00143c80: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Found │ │ │ │ +00143cb0: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    See │ │ │ │ +00143d30: 204f 7468 6572 2020 2020 3c2f 7464 3e3c Other
    304 < │ │ │ │ +00143d90: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Not Modifi │ │ │ │ +00143dc0: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    305
    307 │ │ │ │ +00143ea0: 2020 203c 2f74 643e 3c74 6420 636c 6173 Tempor │ │ │ │ +00143ed0: 6172 7920 5265 6469 7265 6374 2020 2020 ary Redirect │ │ │ │ +00143ee0: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    40 │ │ │ │ +00143f30: 3020 2020 3c2f 7464 3e3c 7464 2063 6c61 0 Bad R │ │ │ │ +00143f60: 6571 7565 7374 2020 2020 3c2f 7464 3e3c equest
    401 < │ │ │ │ +00143fc0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Unauthoriz │ │ │ │ +00143ff0: 6564 2020 2020 3c2f 7464 3e3c 2f74 723e ed
    402
    403
    404 │ │ │ │ +00144160: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Not Fou │ │ │ │ +00144190: 6e64 2020 2020 3c2f 7464 3e3c 2f74 723e nd
    405 Method Not All │ │ │ │ +00144220: 6f77 6564 2020 2020 3c2f 7464 3e3c 2f74 owed
    406 Not Acceptabl │ │ │ │ +001442b0: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e
    407
    Req │ │ │ │ +001443d0: 7565 7374 2054 696d 652d 6f75 7420 2020 uest Time-out │ │ │ │ +001443e0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    Con │ │ │ │ +00144460: 666c 6963 7420 2020 203c 2f74 643e 3c2f flict
    410 Gone
    411 │ │ │ │ +00144540: 203c 2f74 643e 3c74 6420 636c 6173 733d Length R │ │ │ │ +00144570: 6571 7569 7265 6420 2020 203c 2f74 643e equired
    412 < │ │ │ │ +001445d0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>Preconditi │ │ │ │ +00144600: 6f6e 2046 6169 6c65 6420 2020 203c 2f74 on Failed
    413 │ │ │ │ +00144660: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Request │ │ │ │ +00144690: 2045 6e74 6974 7920 546f 6f20 4c61 7267 Entity Too Larg │ │ │ │ +001446a0: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e
    414
    415 Unsupported │ │ │ │ +001447c0: 204d 6564 6961 2054 7970 6520 2020 203c Media Type < │ │ │ │ +001447d0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    416 │ │ │ │ +00144820: 2020 203c 2f74 643e 3c74 6420 636c 6173 Reques │ │ │ │ +00144850: 7465 6420 7261 6e67 6520 6e6f 7420 7361 ted range not sa │ │ │ │ +00144860: 7469 7366 6961 626c 6520 2020 203c 2f74 tisfiable
    417 │ │ │ │ +001448c0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Expecta │ │ │ │ +001448f0: 7469 6f6e 2046 6169 6c65 6420 2020 203c tion Failed < │ │ │ │ +00144900: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    500 │ │ │ │ +00144950: 2020 203c 2f74 643e 3c74 6420 636c 6173 Intern │ │ │ │ +00144980: 616c 2053 6572 7665 7220 4572 726f 7220 al Server Error │ │ │ │ +00144990: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    501 N │ │ │ │ +00144a10: 6f74 2049 6d70 6c65 6d65 6e74 6564 2020 ot Implemented │ │ │ │ +00144a20: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    Bad │ │ │ │ +00144aa0: 2047 6174 6577 6179 2020 2020 3c2f 7464 Gateway
    503 │ │ │ │ +00144b00: 203c 2f74 643e 3c74 6420 636c 6173 733d Service │ │ │ │ +00144b30: 556e 6176 6169 6c61 626c 6520 2020 203c Unavailable < │ │ │ │ +00144b40: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    504 │ │ │ │ +00144b90: 2020 203c 2f74 643e 3c74 6420 636c 6173 Gatewa │ │ │ │ +00144bc0: 7920 5469 6d65 2d6f 7574 2020 2020 3c2f y Time-out
    505 │ │ │ │ +00144c20: 2020 203c 2f74 643e 3c74 6420 636c 6173 HTTP V │ │ │ │ +00144c50: 6572 7369 6f6e 206e 6f74 2073 7570 706f ersion not suppo │ │ │ │ +00144c60: 7274 6564 2020 203c 2f74 643e 3c2f 7472 rted
    .

    HT │ │ │ │ +00144c80: 5450 2073 7461 7475 7320 636f 6465 2032 TP status code 2 │ │ │ │ +00144c90: 3030 2069 7320 6e6f 7420 666c 6167 6765 00 is not flagge │ │ │ │ +00144ca0: 6420 6173 2061 6e20 6572 726f 7220 6279 d as an error by │ │ │ │ +00144cb0: 2074 6865 2065 6e67 696e 652e 2053 7461 the engine. Sta │ │ │ │ +00144cc0: 7475 7320 636f 6465 7320 3230 3120 616e tus codes 201 an │ │ │ │ +00144cd0: 6420 3230 3220 6172 6520 696e 666f 726d d 202 are inform │ │ │ │ +00144ce0: 6174 6976 6520 616e 6420 7368 6f75 6c64 ative and should │ │ │ │ +00144cf0: 206e 6f74 2062 6520 636f 6e73 6964 6572 not be consider │ │ │ │ +00144d00: 6564 2065 7272 6f72 7320 6279 2074 6865 ed errors by the │ │ │ │ +00144d10: 2061 7070 6c69 6361 7469 6f6e 206c 6f67 application log │ │ │ │ +00144d20: 6963 2e3c 2f70 3e0a 3c70 3e53 6572 7665 ic.

    .

    Serve │ │ │ │ +00144d30: 722d 7369 6465 2069 6d70 6c65 6d65 6e74 r-side implement │ │ │ │ +00144d40: 6174 696f 6e73 206f 6620 7365 7276 6963 ations of servic │ │ │ │ +00144d50: 6520 6f70 6572 6174 696f 6e73 2073 686f e operations sho │ │ │ │ +00144d60: 756c 6420 7265 7475 726e 203c 636f 6465 uld return #SOAP_OK │ │ │ │ +00144d80: 2077 6865 6e20 7468 6520 6f70 6572 6174 when the operat │ │ │ │ +00144d90: 696f 6e20 7761 7320 7375 6363 6573 7366 ion was successf │ │ │ │ +00144da0: 756c 2c20 7768 6963 6820 7265 7475 726e ul, which return │ │ │ │ +00144db0: 7320 6120 2232 3030 204f 4b22 2048 5454 s a "200 OK" HTT │ │ │ │ +00144dc0: 5020 6865 6164 6572 2077 6974 6820 7468 P header with th │ │ │ │ +00144dd0: 6520 584d 4c20 7265 7370 6f6e 7365 206d e XML response m │ │ │ │ +00144de0: 6573 7361 6765 2e20 5365 7276 6572 2d73 essage. Server-s │ │ │ │ +00144df0: 6964 6520 696d 706c 656d 656e 7461 7469 ide implementati │ │ │ │ +00144e00: 6f6e 7320 6f66 2073 6572 7669 6365 206f ons of service o │ │ │ │ +00144e10: 7065 7261 7469 6f6e 7320 696e 2067 534f perations in gSO │ │ │ │ +00144e20: 4150 206d 6179 2064 6972 6563 746c 7920 AP may directly │ │ │ │ +00144e30: 7265 7475 726e 2061 6e20 4854 5450 2073 return an HTTP s │ │ │ │ +00144e40: 7461 7475 7320 636f 6465 2077 6865 6e20 tatus code when │ │ │ │ +00144e50: 616e 2048 5454 502d 7265 6c61 7465 6420 an HTTP-related │ │ │ │ +00144e60: 6572 726f 7220 7368 6f75 6c64 2062 6520 error should be │ │ │ │ +00144e70: 7265 7475 726e 6564 2e20 466f 7220 6578 returned. For ex │ │ │ │ +00144e80: 616d 706c 652c 203c 636f 6465 3e72 6574 ample, ret │ │ │ │ +00144e90: 7572 6e20 3430 343c 2f63 6f64 653e 2072 urn 404 r │ │ │ │ +00144ea0: 6574 7572 6e73 2022 3430 3420 4e6f 7420 eturns "404 Not │ │ │ │ +00144eb0: 466f 756e 6422 2074 6f20 7468 6520 636c Found" to the cl │ │ │ │ +00144ec0: 6965 6e74 2061 6e64 2074 6865 203c 636f ient and the soap::e │ │ │ │ +00144f80: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e20 rror │ │ │ │ +00144f90: 7661 7269 6162 6c65 2069 7320 7365 7420 variable is set │ │ │ │ +00144fa0: 746f 2034 3034 2061 7420 7468 6520 636c to 404 at the cl │ │ │ │ +00144fb0: 6965 6e74 2073 6964 652e 3c2f 703e 0a3c ient side.

    .< │ │ │ │ +00144fc0: 703e 546f 2072 6574 7572 6e20 6120 534f p>To return a SO │ │ │ │ +00144fd0: 4150 2046 6175 6c74 2066 726f 6d20 6120 AP Fault from a │ │ │ │ +00144fe0: 7365 7276 6572 2d73 6964 6520 696d 706c server-side impl │ │ │ │ +00144ff0: 656d 656e 7461 7469 6f6e 206f 6620 6120 ementation of a │ │ │ │ +00145000: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio │ │ │ │ +00145010: 6e2c 2075 7365 206f 6e65 206f 6620 7468 n, use one of th │ │ │ │ +00145020: 6520 666f 6c6c 6f77 696e 6720 6675 6e63 e following func │ │ │ │ +00145030: 7469 6f6e 7320 746f 2070 6f70 756c 6174 tions to populat │ │ │ │ +00145040: 6520 7468 6520 534f 4150 2046 6175 6c74 e the SOAP Fault │ │ │ │ +00145050: 206d 6573 7361 6765 3a3c 2f70 3e3c 756c message:

    .

    A receiver │ │ │ │ +00145940: 6572 726f 7220 696e 6469 6361 7465 7320 error indicates │ │ │ │ +00145950: 7468 6174 2074 6865 2073 6572 7669 6365 that the service │ │ │ │ +00145960: 2063 6f75 6c64 206e 6f74 2068 616e 646c could not handl │ │ │ │ +00145970: 6520 7468 6520 636c 6965 6e74 2072 6571 e the client req │ │ │ │ +00145980: 7565 7374 2c20 6275 7420 6974 2063 616e uest, but it can │ │ │ │ +00145990: 2070 6f73 7369 626c 7920 7265 636f 7665 possibly recove │ │ │ │ +001459a0: 7220 6672 6f6d 2074 6865 2065 7272 6f72 r from the error │ │ │ │ +001459b0: 206c 6174 6572 2c20 666f 7220 6578 616d later, for exam │ │ │ │ +001459c0: 706c 6520 7768 656e 2072 6573 6f75 7263 ple when resourc │ │ │ │ +001459d0: 6573 2061 7265 2074 656d 706f 7261 7269 es are temporari │ │ │ │ +001459e0: 6c79 2075 6e61 7661 696c 6162 6c65 2e20 ly unavailable. │ │ │ │ +001459f0: 4120 7365 6e64 6572 2065 7272 6f72 2069 A sender error i │ │ │ │ +00145a00: 6e64 6963 6174 6573 2074 6861 7420 7468 ndicates that th │ │ │ │ +00145a10: 6520 636c 6965 6e74 2072 6571 7565 7374 e client request │ │ │ │ +00145a20: 2069 7320 6661 756c 7479 2061 6e64 2073 is faulty and s │ │ │ │ +00145a30: 2072 656a 6563 7465 6420 6279 2074 6865 rejected by the │ │ │ │ +00145a40: 2073 6572 7669 6365 2e3c 2f70 3e0a 3c70 service.

    .

    See Section SOAP Fault pr │ │ │ │ +00145a90: 6f63 6573 7369 6e67 3c2f 613e 2066 6f72 ocessing for │ │ │ │ +00145aa0: 206d 6f72 6520 6465 7461 696c 7320 6f6e more details on │ │ │ │ +00145ab0: 2068 6f77 2074 6f20 7573 6520 7468 6573 how to use thes │ │ │ │ +00145ac0: 6520 6675 6e63 7469 6f6e 732e 3c2f 703e e functions.

    │ │ │ │ +00145ad0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ +00145af0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Me │ │ │ │ +00145b30: 6d6f 7279 206d 616e 6167 656d 656e 743c mory management< │ │ │ │ +00145b40: 2f68 313e 0a3c 703e 4d65 6d6f 7279 206d /h1>.

    Memory m │ │ │ │ +00145b50: 616e 6167 656d 656e 7420 7769 7468 2067 anagement with g │ │ │ │ +00145b60: 534f 4150 2069 7320 6175 746f 6d61 7469 SOAP is automati │ │ │ │ +00145b70: 632e 2054 6865 2065 6e67 696e 6520 636f c. The engine co │ │ │ │ +00145b80: 6e74 6578 7420 6d61 6e61 6765 7320 616c ntext manages al │ │ │ │ +00145b90: 6c20 6d65 6d6f 7279 2061 6c6c 6f63 6174 l memory allocat │ │ │ │ +00145ba0: 6564 2074 6f20 7365 7269 616c 697a 6520 ed to serialize │ │ │ │ +00145bb0: 6461 7461 2061 6e64 2066 6f72 2074 656d data and for tem │ │ │ │ +00145bc0: 706f 7261 7279 2073 746f 7261 6765 2e20 porary storage. │ │ │ │ +00145bd0: 4465 7365 7269 616c 697a 6564 2064 6174 Deserialized dat │ │ │ │ +00145be0: 6120 6973 2061 6c6c 6f63 6174 6564 2069 a is allocated i │ │ │ │ +00145bf0: 6e20 6d61 6e61 6765 6420 6d65 6d6f 7279 n managed memory │ │ │ │ +00145c00: 2061 6e64 2064 6174 6120 7374 7275 6374 and data struct │ │ │ │ +00145c10: 7572 6573 2063 616e 2062 6520 616c 6c6f ures can be allo │ │ │ │ +00145c20: 6361 7465 6420 696e 206d 616e 6167 6564 cated in managed │ │ │ │ +00145c30: 206d 656d 6f72 7920 6279 2074 6865 2075 memory by the u │ │ │ │ +00145c40: 7365 7220 7768 656e 2064 6573 6972 6564 ser when desired │ │ │ │ +00145c50: 2075 7369 6e67 203c 636f 6465 3e73 6f61 using soa │ │ │ │ +00145c60: 705f 6e65 775f 543c 2f63 6f64 653e 2066 p_new_T f │ │ │ │ +00145c70: 756e 6374 696f 6e73 2067 656e 6572 6174 unctions generat │ │ │ │ +00145c80: 6564 2062 7920 736f 6170 6370 7032 2066 ed by soapcpp2 f │ │ │ │ +00145c90: 6f72 2065 6163 6820 7365 7269 616c 697a or each serializ │ │ │ │ +00145ca0: 6162 6c65 2074 7970 6520 3c63 6f64 653e able type │ │ │ │ +00145cb0: 543c 2f63 6f64 653e 2e20 416c 6c20 6d65 T. All me │ │ │ │ +00145cc0: 6d6f 7279 206d 616e 6167 6564 2062 7920 mory managed by │ │ │ │ +00145cd0: 6120 636f 6e74 6578 7420 6973 2064 6561 a context is dea │ │ │ │ +00145ce0: 6c6c 6f63 6174 6564 2077 6974 6820 3c63 llocated with soap_destroy< │ │ │ │ +00145db0: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6465 /a> to de │ │ │ │ +00145dc0: 7374 726f 7920 6d61 6e61 6765 6420 432b stroy managed C+ │ │ │ │ +00145dd0: 2b20 6f62 6a65 6374 7320 616e 6420 3c63 + objects and soap_end │ │ │ │ +00145eb0: 3c2f 613e 3c2f 636f 6465 3e20 746f 2064 to d │ │ │ │ +00145ec0: 656c 6574 6520 616c 6c20 6f74 6865 7220 elete all other │ │ │ │ +00145ed0: 6d61 6e61 6765 6420 6461 7461 2e20 5768 managed data. Wh │ │ │ │ +00145ee0: 656e 2061 2063 6f6e 7465 7874 2069 7320 en a context is │ │ │ │ +00145ef0: 6669 6e61 6c69 7a65 6420 6f72 2066 7265 finalized or fre │ │ │ │ +00145f00: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with soap_done(stru │ │ │ │ +00145fe0: 6374 2073 6f61 702a 293c 2f61 3e3c 2f63 ct soap*) and < │ │ │ │ +00146000: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00146010: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +00146020: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga │ │ │ │ +00146030: 3537 3130 3863 6134 3638 3131 3836 6535 57108ca4681186e5 │ │ │ │ +00146040: 3862 3562 3138 3963 3335 3238 6631 3061 8b5b189c3528f10a │ │ │ │ +00146050: 2220 7469 746c 653d 2246 696e 616c 697a " title="Finaliz │ │ │ │ +00146060: 6520 616e 6420 6672 6565 2074 6865 2067 e and free the g │ │ │ │ +00146070: 6976 656e 2073 6f61 7020 636f 6e74 6578 iven soap contex │ │ │ │ +00146080: 7420 6672 6f6d 2075 6e6d 616e 6167 6564 t from unmanaged │ │ │ │ +00146090: 2068 6561 7020 6d65 6d6f 7279 2e22 3e73 heap memory.">s │ │ │ │ +001460a0: 6f61 705f 6672 6565 2873 7472 7563 7420 oap_free(struct │ │ │ │ +001460b0: 736f 6170 2a29 3c2f 613e 3c2f 636f 6465 soap*) then managed m │ │ │ │ +001460d0: 656d 6f72 7920 6973 206e 6f74 2072 656c emory is not rel │ │ │ │ +001460e0: 6561 7365 642c 2073 6f20 6974 2069 7320 eased, so it is │ │ │ │ +001460f0: 696d 706f 7274 616e 7420 746f 2063 616c important to cal │ │ │ │ +00146100: 6c20 7468 6520 6465 616c 6c6f 6361 7469 l the deallocati │ │ │ │ +00146110: 6f6e 2066 756e 6374 696f 6e73 2066 6972 on functions fir │ │ │ │ +00146120: 7374 2e20 5468 6973 2077 6173 2064 6f6e st. This was don │ │ │ │ +00146130: 6520 746f 2061 6c6c 6f77 206d 616e 6167 e to allow manag │ │ │ │ +00146140: 6564 2064 6174 6120 746f 206f 7574 6c69 ed data to outli │ │ │ │ +00146150: 7665 2074 6865 2063 6f6e 7465 7874 2c20 ve the context, │ │ │ │ +00146160: 7375 6368 2061 7320 6465 7365 7269 616c such as deserial │ │ │ │ +00146170: 697a 6564 206f 626a 6563 7473 2c20 6275 ized objects, bu │ │ │ │ +00146180: 7420 7468 6973 2069 7320 7261 7265 6c79 t this is rarely │ │ │ │ +00146190: 2069 6620 6576 6572 2075 7365 6420 6265 if ever used be │ │ │ │ +001461a0: 6361 7573 6520 6465 6c65 7469 6e67 2074 cause deleting t │ │ │ │ +001461b0: 6865 206f 7574 6c69 7665 6420 6461 7461 he outlived data │ │ │ │ +001461c0: 2065 7870 6c69 6369 746c 7920 6973 2070 explicitly is p │ │ │ │ +001461d0: 726f 6e65 2074 6f20 6d69 7374 616b 6573 rone to mistakes │ │ │ │ +001461e0: 2e3c 2f70 3e0a 3c70 3e49 6620 796f 7520 .

    .

    If you │ │ │ │ +001461f0: 7761 6e74 2074 6f20 6c65 7420 6465 7365 want to let dese │ │ │ │ +00146200: 7269 616c 697a 6564 2064 6174 6120 6f75 rialized data ou │ │ │ │ +00146210: 746c 6976 6520 6120 3c63 6f64 653e 3c61 tlive a soap contex │ │ │ │ +00146280: 7420 7468 6174 2079 6f75 2061 7265 2061 t that you are a │ │ │ │ +00146290: 626f 7574 2074 6f20 6672 6565 2c20 7468 bout to free, th │ │ │ │ +001462a0: 656e 2079 6f75 2063 616e 2064 656c 6567 en you can deleg │ │ │ │ +001462b0: 6174 6520 6d61 6e61 6765 6d65 6e74 206f ate management o │ │ │ │ +001462c0: 6620 7468 6520 6461 7461 2074 6f20 616e f the data to an │ │ │ │ +001462d0: 6f74 6865 7220 3c63 6f64 653e 3c61 2063 other soap │ │ │ │ +00146330: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context │ │ │ │ +00146340: 7769 7468 203c 636f 6465 3e3c 6120 636c with s │ │ │ │ +00146410: 6f61 705f 6465 6c65 6761 7465 5f64 656c oap_delegate_del │ │ │ │ +00146420: 6574 696f 6e28 7374 7275 6374 2073 6f61 etion(struct soa │ │ │ │ +00146430: 7020 2a73 6f61 705f 6672 6f6d 2c20 7374 p *soap_from, st │ │ │ │ +00146440: 7275 6374 2073 6f61 7020 2a73 6f61 705f ruct soap *soap_ │ │ │ │ +00146450: 746f 293c 2f61 3e3c 2f63 6f64 653e 2e20 to). │ │ │ │ +00146460: 5468 6973 206d 6f76 6573 2061 6c6c 2064 This moves all d │ │ │ │ +00146470: 6573 6572 6961 6c69 7a65 6420 616e 6420 eserialized and │ │ │ │ +00146480: 7465 6d70 6f72 6172 7920 6461 7461 2074 temporary data t │ │ │ │ +00146490: 6f20 7468 6520 6f74 6865 7220 3c63 6f64 o the other so │ │ │ │ +001464f0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co │ │ │ │ +00146500: 6e74 6578 7420 3c63 6f64 653e 736f 6170 ntext soap │ │ │ │ +00146510: 5f74 6f3c 2f63 6f64 653e 2c20 7768 6963 _to, whic │ │ │ │ +00146520: 6820 7769 6c6c 2064 656c 6574 6520 6974 h will delete it │ │ │ │ +00146530: 7320 6461 7461 2061 6e64 2061 6c6c 2074 s data and all t │ │ │ │ +00146540: 6865 2064 656c 6567 6174 6564 2064 6174 he delegated dat │ │ │ │ +00146550: 6120 6974 2069 7320 7265 7370 6f6e 7369 a it is responsi │ │ │ │ +00146560: 626c 6520 666f 7220 7768 656e 2079 6f75 ble for when you │ │ │ │ +00146570: 2063 616c 6c20 3c63 6f64 653e 3c61 2063 call soap_ │ │ │ │ +00146630: 6465 7374 726f 793c 2f61 3e3c 2f63 6f64 destroy and soap_end. This can b │ │ │ │ +00146730: 6520 7061 7274 6963 756c 6172 6c79 2075 e particularly u │ │ │ │ +00146740: 7365 6675 6c20 666f 7220 6d61 6b69 6e67 seful for making │ │ │ │ +00146750: 2063 6c69 656e 7420 6361 6c6c 7320 696e client calls in │ │ │ │ +00146760: 7369 6465 2061 2073 6572 7665 7220 6f70 side a server op │ │ │ │ +00146770: 6572 6174 696f 6e2c 2069 2e65 2e20 6120 eration, i.e. a │ │ │ │ +00146780: 6d69 7865 6420 7365 7276 6572 2061 6e64 mixed server and │ │ │ │ +00146790: 2063 6c69 656e 742e 2054 6865 2063 6c69 client. The cli │ │ │ │ +001467a0: 656e 7420 6361 6c6c 2069 6e73 6964 6520 ent call inside │ │ │ │ +001467b0: 7468 6520 7365 7276 6572 206f 7065 7261 the server opera │ │ │ │ +001467c0: 7469 6f6e 2072 6571 7569 7265 7320 6120 tion requires a │ │ │ │ +001467d0: 6e65 7720 3c63 6f64 653e 3c61 2063 6c61 new soap context, e │ │ │ │ +00146840: 2e67 2e20 636f 7069 6564 2066 726f 6d20 .g. copied from │ │ │ │ +00146850: 7468 6520 7365 7276 6572 2773 2077 6974 the server's wit │ │ │ │ +00146860: 6820 3c63 6f64 653e 3c61 2063 6c61 7373 h soap_copy │ │ │ │ +00146920: 3c2f 636f 6465 3e2e 2042 6566 6f72 6520 . Before │ │ │ │ +00146930: 6465 7374 726f 7969 6e67 2074 6865 2063 destroying the c │ │ │ │ +00146940: 6c69 656e 7420 636f 6e74 6578 7420 7769 lient context wi │ │ │ │ +00146950: 7468 203c 636f 6465 3e3c 6120 636c 6173 th soap_fr │ │ │ │ +00146a00: 6565 3c2f 613e 3c2f 636f 6465 3e2c 2074 ee, t │ │ │ │ +00146a10: 6865 2064 6174 6120 6361 6e20 6265 2064 he data can be d │ │ │ │ +00146a20: 656c 6567 6174 6564 2074 6f20 7468 6520 elegated to the │ │ │ │ +00146a30: 7365 7276 6572 2773 2063 6f6e 7465 7874 server's context │ │ │ │ +00146a40: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with │ │ │ │ +00146b10: 736f 6170 5f64 656c 6567 6174 655f 6465 soap_delegate_de │ │ │ │ +00146b20: 6c65 7469 6f6e 3c2f 613e 3c2f 636f 6465 letion. See for examp │ │ │ │ +00146b40: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso │ │ │ │ +00146b50: 6170 2f73 616d 706c 6573 2f6d 6173 6875 ap/samples/mashu │ │ │ │ +00146b60: 702f 6d61 7368 7570 7365 7276 6572 2e63 p/mashupserver.c │ │ │ │ +00146b70: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 6e20 in │ │ │ │ +00146b80: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source │ │ │ │ +00146b90: 2063 6f64 6520 7061 636b 6167 652e 3c2f code package..

    The functi │ │ │ │ +00146bb0: 6f6e 7320 7265 6c61 7465 6420 746f 206d ons related to m │ │ │ │ +00146bc0: 656d 6f72 7920 6d61 6e61 6765 6d65 6e74 emory management │ │ │ │ +00146bd0: 2062 7920 7468 6520 636f 6e74 6578 7420 by the context │ │ │ │ +00146be0: 6172 653a 3c2f 703e 0a3c 756c 3e0a 3c6c are:

    .

    where < │ │ │ │ +0014e560: 636f 6465 3e26 6c74 3b70 7265 6669 7826 code><prefix& │ │ │ │ +0014e570: 6774 3b3c 2f63 6f64 653e 2069 7320 7468 gt; is th │ │ │ │ +0014e580: 6520 584d 4c20 6e61 6d65 7370 6163 6520 e XML namespace │ │ │ │ +0014e590: 7072 6566 6978 206f 6620 6120 7365 7276 prefix of a serv │ │ │ │ +0014e5a0: 6963 6520 6269 6e64 696e 672e 2054 6865 ice binding. The │ │ │ │ +0014e5b0: 203c 636f 6465 3e26 6c74 3b70 726f 7065 <prope │ │ │ │ +0014e5c0: 7274 7926 6774 3b3c 2f63 6f64 653e 2061 rty> a │ │ │ │ +0014e5d0: 6e64 203c 636f 6465 3e26 6c74 3b76 616c nd <val │ │ │ │ +0014e5e0: 7565 2667 743b 3c2f 636f 6465 3e20 6669 ue> fi │ │ │ │ +0014e5f0: 656c 6473 2061 7265 206f 6e65 206f 6620 elds are one of │ │ │ │ +0014e600: 7468 6520 666f 6c6c 6f77 696e 673a 3c2f the following:. │ │ │ │ +0014e630: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +0014e650: 3c74 6820 636c 6173 733d 226d 6172 6b64 .... │ │ │ │ +0014e7d0: 3c63 6f64 653e 6e61 6d65 7370 6163 653c namespace< │ │ │ │ +0014e7e0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code> │ │ │ │ +0014e810: 5552 4920 6f66 2074 6865 2057 5344 4c20 URI of the WSDL │ │ │ │ +0014e820: 7461 7267 6574 4e61 6d65 7370 6163 6520 targetNamespace │ │ │ │ +0014e830: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74 ..< │ │ │ │ +0014e860: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0014e870: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0014e880: 3e3c 636f 6465 3e64 6f63 756d 656e 7461 >documenta │ │ │ │ +0014e890: 7469 6f6e 3c2f 636f 6465 3e20 2020 3c2f tion ..< │ │ │ │ +0014e950: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0014e960: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0014e970: 3e3c 636f 6465 3e64 6f63 3c2f 636f 6465 >doc ..< │ │ │ │ +0014ea10: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0014ea20: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0014ea30: 3e3c 636f 6465 3e73 7479 6c65 3c2f 636f >style │ │ │ │ +0014ead0: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ...... │ │ │ │ +0014ecb0: 3c63 6f64 653e 706f 7274 3c2f 636f 6465 port │ │ │ │ +0014ed70: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .....< │ │ │ │ +0014eef0: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +0014ef00: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +0014ef10: 3c74 6420 636c 6173 733d 226d 6172 6b64 │ │ │ │ +0014ef50: 3c74 6420 636c 6173 733d 226d 6172 6b64 .< │ │ │ │ +0014f010: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +0014f020: 776e 5461 626c 6552 6f77 4576 656e 223e wnTableRowEven"> │ │ │ │ +0014f030: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b . │ │ │ │ +0014f0c0: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .... │ │ │ │ +0014f290: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b .... │ │ │ │ +0014f440: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +0014f500: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ...< │ │ │ │ +0014f5f0: 2f74 6162 6c65 3e0a 3c70 3e54 6865 2073 /table>.

    The s │ │ │ │ +0014f600: 6572 7669 6365 203c 636f 6465 3e6e 616d ervice nam │ │ │ │ +0014f610: 653c 2f63 6f64 653e 2061 6e64 203c 636f e and namespace properties a │ │ │ │ +0014f640: 7265 2072 6571 7569 7265 6420 696e 206f re required in o │ │ │ │ +0014f650: 7264 6572 2074 6f20 6765 6e65 7261 7465 rder to generate │ │ │ │ +0014f660: 2061 2076 616c 6964 2057 5344 4c20 7769 a valid WSDL wi │ │ │ │ +0014f670: 7468 2073 6f61 7063 7070 322e 2054 6865 th soapcpp2. The │ │ │ │ +0014f680: 206f 7468 6572 2070 726f 7065 7274 6965 other propertie │ │ │ │ +0014f690: 7320 6172 6520 6f70 7469 6f6e 616c 2e3c s are optional.< │ │ │ │ +0014f6a0: 2f70 3e0a 3c70 3e54 6865 203c 636f 6465 /p>.

    The style an │ │ │ │ +0014f6c0: 6420 3c63 6f64 653e 656e 636f 6469 6e67 d encoding │ │ │ │ +0014f6d0: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property │ │ │ │ +0014f6e0: 2064 6566 6175 6c74 7320 6172 6520 6368 defaults are ch │ │ │ │ +0014f6f0: 616e 6765 6420 7769 7468 203c 623e 3c63 anged with soapcpp2 -e< │ │ │ │ +0014f710: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio │ │ │ │ +0014f720: 6e20 3c62 3e3c 636f 6465 3e2d 653c 2f63 n -e to rpc and │ │ │ │ +0014f750: 203c 636f 6465 3e65 6e63 6f64 6564 3c2f encoded.

    .

    Yo │ │ │ │ +0014f770: 7520 6361 6e20 6f76 6572 7269 6465 2074 u can override t │ │ │ │ +0014f780: 6865 203c 636f 6465 3e70 6f72 743c 2f63 he port endpoint UR │ │ │ │ +0014f7a0: 4c20 6174 2072 756e 7469 6d65 2069 6e20 L at runtime in │ │ │ │ +0014f7b0: 7468 6520 6175 746f 2d67 656e 6572 6174 the auto-generat │ │ │ │ +0014f7c0: 6564 203c 636f 6465 3e73 6f61 705f 6361 ed soap_ca │ │ │ │ +0014f7d0: 6c6c 5f70 7265 6669 785f 5f66 756e 633c ll_prefix__func< │ │ │ │ +0014f7e0: 2f63 6f64 653e 2073 6572 7669 6365 2063 /code> service c │ │ │ │ +0014f7f0: 616c 6c20 2843 2f43 2b2b 2063 6c69 656e all (C/C++ clien │ │ │ │ +0014f800: 7420 7369 6465 2920 616e 6420 696e 2074 t side) and in t │ │ │ │ +0014f810: 6865 2043 2b2b 2070 726f 7879 2063 6c61 he C++ proxy cla │ │ │ │ +0014f820: 7373 2073 6572 7669 6365 2063 616c 6c2e ss service call. │ │ │ │ +0014f830: 3c2f 703e 0a3c 703e 5072 6f74 6f63 6f6c

    .

    Protocol │ │ │ │ +0014f840: 2070 726f 7065 7274 7920 7661 6c75 6573 property values │ │ │ │ +0014f850: 2061 7265 3a3c 2f70 3e0a 3c74 6162 6c65 are:

    .
    property value
    name < │ │ │ │ +0014e710: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>name of th │ │ │ │ +0014e740: 6520 7365 7276 6963 652c 206f 7074 696f e service, optio │ │ │ │ +0014e750: 6e61 6c6c 7920 666f 6c6c 6f77 6564 2062 nally followed b │ │ │ │ +0014e760: 7920 7465 7874 2064 6573 6372 6962 696e y text describin │ │ │ │ +0014e770: 6720 7468 6520 7365 7276 6963 6520 2020 g the service │ │ │ │ +0014e780: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    text descri │ │ │ │ +0014e8d0: 6269 6e67 2074 6865 2073 6572 7669 6365 bing the service │ │ │ │ +0014e8e0: 2028 7365 6520 616c 736f 2074 6865 203c (see also the < │ │ │ │ +0014e8f0: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name │ │ │ │ +0014e900: 2070 726f 7065 7274 7929 2c20 6d75 6c74 property), mult │ │ │ │ +0014e910: 6970 6c65 2070 6572 6d69 7474 6564 2020 iple permitted │ │ │ │ +0014e920: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    an al │ │ │ │ +0014e9b0: 6961 7320 666f 7220 7468 6520 3c63 6f64 ias for the documentation< │ │ │ │ +0014e9d0: 2f63 6f64 653e 2070 726f 7065 7274 7920 /code> property │ │ │ │ +0014e9e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    document (default) SOA │ │ │ │ +0014ea90: 5020 6d65 7373 6167 696e 6720 7374 796c P messaging styl │ │ │ │ +0014eaa0: 6520 6f72 203c 636f 6465 3e72 7063 3c2f e or rpc for SOAP R │ │ │ │ +0014eac0: 5043 2020 2020 3c2f 7464 3e3c 2f74 723e PC
    encod │ │ │ │ +0014eb20: 696e 673c 2f63 6f64 653e 2020 203c 2f74 ing litera │ │ │ │ +0014eb60: 6c3c 2f63 6f64 653e 2028 6465 6661 756c l (defaul │ │ │ │ +0014eb70: 7429 2c20 3c63 6f64 653e 656e 636f 6465 t), encode │ │ │ │ +0014eb80: 643c 2f63 6f64 653e 2066 6f72 2053 4f41 d for SOA │ │ │ │ +0014eb90: 5020 656e 636f 6469 6e67 2c20 6f72 2061 P encoding, or a │ │ │ │ +0014eba0: 2063 7573 746f 6d20 5552 4920 2020 203c custom URI < │ │ │ │ +0014ebb0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    protocol spec │ │ │ │ +0014ec40: 6966 6965 7320 534f 4150 206f 7220 5245 ifies SOAP or RE │ │ │ │ +0014ec50: 5354 2c20 7365 6520 6265 6c6f 7720 2020 ST, see below │ │ │ │ +0014ec60: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    URL o │ │ │ │ +0014ecf0: 6620 7468 6520 7365 7276 6963 6520 656e f the service en │ │ │ │ +0014ed00: 6470 6f69 6e74 2c20 7573 7561 6c6c 7920 dpoint, usually │ │ │ │ +0014ed10: 616e 2068 7474 7020 6f72 2068 7474 7073 an http or https │ │ │ │ +0014ed20: 2061 6464 7265 7373 2c20 746f 2075 7365 address, to use │ │ │ │ +0014ed30: 2069 6e20 7468 6520 5753 444c 2064 6566 in the WSDL def │ │ │ │ +0014ed40: 696e 6974 696f 6e73 2f73 6572 7669 6365 initions/service │ │ │ │ +0014ed50: 2f70 6f72 742f 6164 6472 6573 732f 406c /port/address/@l │ │ │ │ +0014ed60: 6f63 6174 696f 6e20 2020 203c 2f74 643e ocation
    l │ │ │ │ +0014edc0: 6f63 6174 696f 6e3c 2f63 6f64 653e 2020 ocation │ │ │ │ +0014edd0: 203c 2f74 643e 3c74 6420 636c 6173 733d an alias │ │ │ │ +0014ee00: 2066 6f72 2074 6865 203c 636f 6465 3e70 for the p │ │ │ │ +0014ee10: 6f72 743c 2f63 6f64 653e 2070 726f 7065 ort prope │ │ │ │ +0014ee20: 7274 7920 2020 203c 2f74 643e 3c2f 7472 rty
    endp │ │ │ │ +0014ee80: 6f69 6e74 3c2f 636f 6465 3e20 2020 3c2f oint an alias fo │ │ │ │ +0014eec0: 7220 7468 6520 3c63 6f64 653e 706f 7274 r the port │ │ │ │ +0014eed0: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property │ │ │ │ +0014eee0: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    transpor │ │ │ │ +0014ef40: 743c 2f63 6f64 653e 2020 203c 2f74 643e t URI declaratio │ │ │ │ +0014ef80: 6e20 6f66 2074 6865 2074 7261 6e73 706f n of the transpo │ │ │ │ +0014ef90: 7274 2c20 7573 7561 6c6c 7920 3c63 6f64 rt, usually http://schemas. │ │ │ │ +0014efe0: 786d 6c73 6f61 702e 6f72 672f 736f 6170 xmlsoap.org/soap │ │ │ │ +0014eff0: 2f68 7474 703c 2f61 3e3c 2f63 6f64 653e /http │ │ │ │ +0014f000: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    definit │ │ │ │ +0014f060: 696f 6e73 3c2f 636f 6465 3e20 2020 3c2f ions name of the │ │ │ │ +0014f0a0: 2057 5344 4c20 6465 6669 6e69 7469 6f6e WSDL definition │ │ │ │ +0014f0b0: 732f 406e 616d 6520 2020 203c 2f74 643e s/@name
    t │ │ │ │ +0014f110: 7970 653c 2f63 6f64 653e 2020 203c 2f74 ype name of the │ │ │ │ +0014f150: 5753 444c 2064 6566 696e 6974 696f 6e73 WSDL definitions │ │ │ │ +0014f160: 2f70 6f72 7454 7970 652f 406e 616d 6520 /portType/@name │ │ │ │ +0014f170: 2857 5344 4c32 2e30 2069 6e74 6572 6661 (WSDL2.0 interfa │ │ │ │ +0014f180: 6365 2f40 6e61 6d65 2920 2020 203c 2f74 ce/@name)
    portType an al │ │ │ │ +0014f220: 6961 7320 666f 7220 7468 6520 3c63 6f64 ias for the type pr │ │ │ │ +0014f240: 6f70 6572 7479 2028 3c63 6f64 653e 706f operty (po │ │ │ │ +0014f250: 7274 5479 7065 3c2f 636f 6465 3e20 666f rtType fo │ │ │ │ +0014f260: 6c6c 6f77 7320 534f 4150 2031 2e31 206e llows SOAP 1.1 n │ │ │ │ +0014f270: 616d 696e 6720 636f 6e76 656e 7469 6f6e aming convention │ │ │ │ +0014f280: 7329 2020 2020 3c2f 7464 3e3c 2f74 723e s)
    interf │ │ │ │ +0014f2e0: 6163 653c 2f63 6f64 653e 2020 203c 2f74 ace an alias for │ │ │ │ +0014f320: 2074 6865 203c 636f 6465 3e74 7970 653c the type< │ │ │ │ +0014f330: 2f63 6f64 653e 2070 726f 7065 7274 7920 /code> property │ │ │ │ +0014f340: 283c 636f 6465 3e69 6e74 6572 6661 6365 (interface │ │ │ │ +0014f350: 3c2f 636f 6465 3e20 666f 6c6c 6f77 7320 follows │ │ │ │ +0014f360: 534f 4150 2031 2e32 206e 616d 696e 6720 SOAP 1.2 naming │ │ │ │ +0014f370: 636f 6e76 656e 7469 6f6e 7329 2020 2020 conventions) │ │ │ │ +0014f380: 3c2f 7464 3e3c 2f74 723e 0a3c 7472 2063
    < │ │ │ │ +0014f3d0: 636f 6465 3e62 696e 6469 6e67 3c2f 636f code>binding nam │ │ │ │ +0014f410: 6520 6f66 2074 6865 2057 5344 4c20 6465 e of the WSDL de │ │ │ │ +0014f420: 6669 6e69 7469 6f6e 732f 6269 6e64 696e finitions/bindin │ │ │ │ +0014f430: 672f 406e 616d 6520 2020 203c 2f74 643e g/@name
    p │ │ │ │ +0014f490: 6f72 744e 616d 653c 2f63 6f64 653e 2020 ortName │ │ │ │ +0014f4a0: 203c 2f74 643e 3c74 6420 636c 6173 733d name of │ │ │ │ +0014f4d0: 7468 6520 5753 444c 2064 6566 696e 6974 the WSDL definit │ │ │ │ +0014f4e0: 696f 6e73 2f73 6572 7669 6365 2f70 6f72 ions/service/por │ │ │ │ +0014f4f0: 742f 406e 616d 6520 2020 203c 2f74 643e t/@name
    │ │ │ │ +0014f550: 6578 6563 7574 6162 6c65 3c2f 636f 6465 executable name │ │ │ │ +0014f590: 6f66 2074 6865 2022 6578 6563 7574 6162 of the "executab │ │ │ │ +0014f5a0: 6c65 2220 746f 2075 7365 2069 6e20 7468 le" to use in th │ │ │ │ +0014f5b0: 6520 5753 444c 2064 6566 696e 6974 696f e WSDL definitio │ │ │ │ +0014f5c0: 6e73 2f73 6572 7669 6365 2f70 6f72 742f ns/service/port/ │ │ │ │ +0014f5d0: 6164 6472 6573 732f 406c 6f63 6174 696f address/@locatio │ │ │ │ +0014f5e0: 6e20 2020 3c2f 7464 3e3c 2f74 723e 0a3c n
    ..< │ │ │ │ +0014f8d0: 7468 2063 6c61 7373 3d22 6d61 726b 646f th class="markdo │ │ │ │ +0014f8e0: 776e 5461 626c 6548 6561 644e 6f6e 6522 wnTableHeadNone" │ │ │ │ +0014f8f0: 3e64 6573 6372 6970 7469 6f6e 2020 2020 >description │ │ │ │ +0014f900: 3c2f 7468 3e3c 2f74 723e 0a3c 7472 2063 ......< │ │ │ │ +0014fab0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0014fac0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0014fad0: 3e3c 636f 6465 3e53 4f41 5031 2e32 3c2f >SOAP1.2 ...... │ │ │ │ +0014fd00: 3c63 6f64 653e 534f 4150 312e 322d 4745 SOAP1.2-GE │ │ │ │ +0014fd10: 543c 2f63 6f64 653e 2020 203c 2f74 643e T │ │ │ │ +0014fd20: 3c74 6420 636c 6173 733d 226d 6172 6b64 .< │ │ │ │ +0014fd70: 7472 2063 6c61 7373 3d22 6d61 726b 646f tr class="markdo │ │ │ │ +0014fd80: 776e 5461 626c 6552 6f77 4f64 6422 3e0a wnTableRowOdd">. │ │ │ │ +0014fd90: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ +0014fe60: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0014fe70: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0014fe80: 3e3c 636f 6465 3e50 4f53 543c 2f63 6f64 >POST . │ │ │ │ +0014fef0: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +0014ff10: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .. │ │ │ │ +0014ffa0: 3c74 7220 636c 6173 733d 226d 6172 6b64 . │ │ │ │ +00150050: 0a3c 7472 2063 6c61 7373 3d22 6d61 726b ..< │ │ │ │ +001500b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001500c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +001500d0: 3e6e 6f6e 2d53 4f41 5020 5245 5354 2070 >non-SOAP REST p │ │ │ │ +001500e0: 726f 746f 636f 6c20 7769 7468 2048 5454 rotocol with HTT │ │ │ │ +001500f0: 5020 4445 4c45 5445 2020 203c 2f74 643e P DELETE │ │ │ │ +00150100: 3c2f 7472 3e0a 3c2f 7461 626c 653e 0a3c .
    protoco │ │ │ │ +0014f8c0: 6c20 7661 6c75 6520 2020 3c2f 7468 3e3c l value
    SOAP │ │ │ │ +0014f960: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 SOAP tr │ │ │ │ +0014f990: 616e 7370 6f72 742c 2073 7570 706f 7274 ansport, support │ │ │ │ +0014f9a0: 696e 6720 626f 7468 2053 4f41 5020 312e ing both SOAP 1. │ │ │ │ +0014f9b0: 3120 616e 6420 312e 3220 2020 203c 2f74 1 and 1.2
    SOAP1.1 │ │ │ │ +0014fa20: 2020 203c 2f74 643e 3c74 6420 636c 6173 SOAP 1 │ │ │ │ +0014fa50: 2e31 2074 7261 6e73 706f 7274 2028 7361 .1 transport (sa │ │ │ │ +0014fa60: 6d65 2061 7320 3c63 6f64 653e 736f 6170 me as soap │ │ │ │ +0014fa70: 6370 7032 202d 313c 2f63 6f64 653e 2920 cpp2 -1) │ │ │ │ +0014fa80: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    S │ │ │ │ +0014fb10: 4f41 5020 312e 3220 7472 616e 7370 6f72 OAP 1.2 transpor │ │ │ │ +0014fb20: 7420 2873 616d 6520 6173 203c 636f 6465 t (same as soapcpp2 -2)
    SOA │ │ │ │ +0014fba0: 502d 4745 543c 2f63 6f64 653e 2020 203c P-GET < │ │ │ │ +0014fbb0: 2f74 643e 3c74 6420 636c 6173 733d 226d /td>one-way SO │ │ │ │ +0014fbe0: 4150 2031 2e31 206f 7220 312e 3220 7769 AP 1.1 or 1.2 wi │ │ │ │ +0014fbf0: 7468 2048 5454 5020 4745 5420 2020 203c th HTTP GET < │ │ │ │ +0014fc00: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    SOAP1.1-GET o │ │ │ │ +0014fc90: 6e65 2d77 6179 2053 4f41 5020 312e 3120 ne-way SOAP 1.1 │ │ │ │ +0014fca0: 7769 7468 2048 5454 5020 4745 5420 2020 with HTTP GET │ │ │ │ +0014fcb0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    one-way SOAP 1 │ │ │ │ +0014fd50: 2e32 2077 6974 6820 4854 5450 2047 4554 .2 with HTTP GET │ │ │ │ +0014fd60: 2020 2020 3c2f 7464 3e3c 2f74 723e 0a3c
    HTTP an │ │ │ │ +0014fdf0: 616c 6961 7320 666f 7220 3c63 6f64 653e alias for │ │ │ │ +0014fe00: 504f 5354 3c2f 636f 6465 3e20 2873 616d POST (sam │ │ │ │ +0014fe10: 6520 6173 203c 636f 6465 3e73 6f61 7063 e as soapc │ │ │ │ +0014fe20: 7070 3220 2d30 3c2f 636f 6465 3e29 2020 pp2 -0) │ │ │ │ +0014fe30: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472
    non- │ │ │ │ +0014fec0: 534f 4150 2052 4553 5420 7072 6f74 6f63 SOAP REST protoc │ │ │ │ +0014fed0: 6f6c 2077 6974 6820 4854 5450 2050 4f53 ol with HTTP POS │ │ │ │ +0014fee0: 5420 2020 203c 2f74 643e 3c2f 7472 3e0a T
    GET non │ │ │ │ +0014ff70: 2d53 4f41 5020 5245 5354 2070 726f 746f -SOAP REST proto │ │ │ │ +0014ff80: 636f 6c20 7769 7468 2048 5454 5020 4745 col with HTTP GE │ │ │ │ +0014ff90: 5420 2020 203c 2f74 643e 3c2f 7472 3e0a T
    PUT no │ │ │ │ +00150020: 6e2d 534f 4150 2052 4553 5420 7072 6f74 n-SOAP REST prot │ │ │ │ +00150030: 6f63 6f6c 2077 6974 6820 4854 5450 2050 ocol with HTTP P │ │ │ │ +00150040: 5554 2020 2020 3c2f 7464 3e3c 2f74 723e UT
    DELETE │ │ │ │ +001500a0: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    .< │ │ │ │ +00150110: 703e 5468 6520 3c63 6f64 653e 7072 6f74 p>The prot │ │ │ │ +00150120: 6f63 6f6c 3c2f 636f 6465 3e20 7072 6f70 ocol prop │ │ │ │ +00150130: 6572 7479 2069 7320 3c63 6f64 653e 534f erty is SO │ │ │ │ +00150140: 4150 3c2f 636f 6465 3e20 6279 2064 6566 AP by def │ │ │ │ +00150150: 6175 6c74 2e20 5468 6520 6465 6661 756c ault. The defaul │ │ │ │ +00150160: 7420 6973 2063 6861 6e67 6564 2077 6974 t is changed wit │ │ │ │ +00150170: 6820 3c62 3e3c 636f 6465 3e73 6f61 7063 h soapc │ │ │ │ +00150180: 7070 3220 2d31 3c2f 636f 6465 3e3c 2f62 pp2 -1 option -1 │ │ │ │ +001501b0: 746f 2053 4f41 5020 312e 312c 203c 623e to SOAP 1.1, │ │ │ │ +001501c0: 3c63 6f64 653e 736f 6170 6370 7032 202d soapcpp2 - │ │ │ │ +001501d0: 323c 2f63 6f64 653e 3c2f 623e 206f 7074 2 opt │ │ │ │ +001501e0: 696f 6e20 3c62 3e3c 636f 6465 3e2d 323c ion -2< │ │ │ │ +001501f0: 2f63 6f64 653e 3c2f 623e 2074 6f20 534f /code> to SO │ │ │ │ +00150200: 4150 2031 2e32 2c20 616e 6420 6e6f 6e2d AP 1.2, and non- │ │ │ │ +00150210: 534f 4150 2052 4553 5420 7769 7468 203c SOAP REST with < │ │ │ │ +00150220: 623e 3c63 6f64 653e 736f 6170 6370 7032 b>soapcpp2 │ │ │ │ +00150230: 202d 303c 2f63 6f64 653e 3c2f 623e 206f -0
    o │ │ │ │ +00150240: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption - │ │ │ │ +00150250: 303c 2f63 6f64 653e 3c2f 623e 3c2f 703e 0

    │ │ │ │ +00150260: 0a3c 703e 5468 6520 3c63 6f64 653e 4745 .

    The GE │ │ │ │ +00150270: 543c 2f63 6f64 653e 2070 726f 746f 636f T protoco │ │ │ │ +00150280: 6c73 2066 6f72 2053 4f41 5020 616e 6420 ls for SOAP and │ │ │ │ +00150290: 5245 5354 2072 6571 7569 7265 2074 6861 REST require tha │ │ │ │ +001502a0: 7420 7468 6520 7365 7276 6963 6520 6f70 t the service op │ │ │ │ +001502b0: 6572 6174 696f 6e73 206f 6e6c 7920 7573 erations only us │ │ │ │ +001502c0: 6520 7072 696d 6974 6976 6520 7479 7065 e primitive type │ │ │ │ +001502d0: 7320 7769 7468 2074 6865 6972 2069 6e70 s with their inp │ │ │ │ +001502e0: 7574 2070 6172 616d 6574 6572 732c 2062 ut parameters, b │ │ │ │ +001502f0: 6563 6175 7365 2074 6865 7365 2070 6172 ecause these par │ │ │ │ +00150300: 616d 6574 6572 7320 6172 6520 656e 636f ameters are enco │ │ │ │ +00150310: 6465 6420 7769 7468 2074 6865 2055 524c ded with the URL │ │ │ │ +00150320: 2061 7320 5552 4c20 7175 6572 7920 7661 as URL query va │ │ │ │ +00150330: 6c75 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 lues.

    .

    To │ │ │ │ +00150340: 6c65 7420 6469 7265 6374 6976 6573 2074 let directives t │ │ │ │ +00150350: 616b 6520 6566 6665 6374 2077 6974 6820 ake effect with │ │ │ │ +00150360: 7365 7276 6963 6520 6f70 6572 6174 696f service operatio │ │ │ │ +00150370: 6e73 2c20 796f 7520 7368 6f75 6c64 2062 ns, you should b │ │ │ │ +00150380: 696e 6420 7468 6520 7365 7276 6963 6520 ind the service │ │ │ │ +00150390: 6f70 6572 6174 696f 6e73 2074 6f20 7468 operations to th │ │ │ │ +001503a0: 6520 5753 444c 206e 616d 6573 7061 6365 e WSDL namespace │ │ │ │ +001503b0: 206f 6620 6120 7365 7276 6963 6520 6279 of a service by │ │ │ │ +001503c0: 2075 7369 6e67 2074 6865 206e 616d 6573 using the names │ │ │ │ +001503d0: 7061 6365 2070 7265 6669 7820 6173 2070 pace prefix as p │ │ │ │ +001503e0: 6172 7420 6f66 2074 6865 2069 6465 6e74 art of the ident │ │ │ │ +001503f0: 6966 6965 7220 6e61 6d65 206f 6620 7468 ifier name of th │ │ │ │ +00150400: 6520 6675 6e63 7469 6f6e 2074 6861 7420 e function that │ │ │ │ +00150410: 6465 6669 6e65 7320 7468 6520 7365 7276 defines the serv │ │ │ │ +00150420: 6963 6520 6f70 6572 6174 696f 6e3a 3c2f ice operation:.

    int │ │ │ │ +00150480: 7072 6566 6978 5f5f 6675 6e63 2861 7267 prefix__func(arg │ │ │ │ +00150490: 312c 2061 7267 322c 202e 2e2e 2c20 6172 1, arg2, ..., ar │ │ │ │ +001504a0: 676e 2c20 7265 7375 6c74 293b 3c2f 6469 gn, result);.

    whe │ │ │ │ +001504d0: 7265 203c 636f 6465 3e70 7265 6669 783c re prefix< │ │ │ │ +001504e0: 2f63 6f64 653e 2063 616e 206e 6f77 2062 /code> can now b │ │ │ │ +001504f0: 6520 7573 6564 2074 6f20 6c65 7420 6469 e used to let di │ │ │ │ +00150500: 7265 6374 6976 6573 2074 616b 6520 6566 rectives take ef │ │ │ │ +00150510: 6665 6374 206f 6e20 7468 6973 2073 6572 fect on this ser │ │ │ │ +00150520: 7669 6365 206f 7065 7261 7469 6f6e 2e3c vice operation.< │ │ │ │ +00150530: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to │ │ │ │ +00150550: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ +00150560: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

    .

    .Service m │ │ │ │ +001505a0: 6574 686f 6420 6469 7265 6374 6976 6573 ethod directives │ │ │ │ +001505b0: 3c2f 6833 3e0a 3c70 3e53 6572 7669 6365

    .

    Service │ │ │ │ +001505c0: 2070 726f 7065 7274 6965 7320 6172 6520 properties are │ │ │ │ +001505d0: 6170 706c 6963 6162 6c65 2074 6f20 6120 applicable to a │ │ │ │ +001505e0: 7365 7276 6963 6520 616e 6420 746f 2061 service and to a │ │ │ │ +001505f0: 6c6c 206f 6620 6974 7320 6f70 6572 6174 ll of its operat │ │ │ │ +00150600: 696f 6e73 2e20 5365 7276 6963 6520 6d65 ions. Service me │ │ │ │ +00150610: 7468 6f64 2064 6972 6563 7469 7665 7320 thod directives │ │ │ │ +00150620: 6172 6520 7370 6563 6966 6963 616c 6c79 are specifically │ │ │ │ +00150630: 2061 7070 6c69 6361 626c 6520 746f 2061 applicable to a │ │ │ │ +00150640: 2073 6572 7669 6365 206f 7065 7261 7469 service operati │ │ │ │ +00150650: 6f6e 2e3c 2f70 3e0a 3c70 3e41 2073 6572 on.

    .

    A ser │ │ │ │ +00150660: 7669 6365 206d 6574 686f 6420 6469 7265 vice method dire │ │ │ │ +00150670: 6374 6976 6520 6973 206f 6620 7468 6520 ctive is of the │ │ │ │ +00150680: 666f 726d 3a3c 2f70 3e0a 3c64 6976 2063 form:

    .
    │ │ │ │ +001506a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ +001506d0: 266c 743b 7072 6566 6978 2667 743b 2073 <prefix> s │ │ │ │ +001506e0: 6572 7669 6365 206d 6574 686f 642d 266c ervice method-&l │ │ │ │ +001506f0: 743b 7072 6f70 6572 7479 2667 743b 3a20 t;property>: │ │ │ │ +00150700: 266c 743b 6d65 7468 6f64 2667 743b 2026 <method> & │ │ │ │ +00150710: 6c74 3b76 616c 7565 2667 743b 3c2f 7370 lt;value>
    .
    │ │ │ │ +00150730: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    where │ │ │ │ +00152430: 3c63 6f64 653e 266c 743b 7072 6566 6978 <prefix │ │ │ │ +00152440: 2667 743b 3c2f 636f 6465 3e20 6973 2074 > is t │ │ │ │ +00152450: 6865 2058 4d4c 206e 616d 6573 7061 6365 he XML namespace │ │ │ │ +00152460: 2070 7265 6669 7820 6f66 2061 2073 6368 prefix of a sch │ │ │ │ +00152470: 656d 612e 2054 6865 203c 636f 6465 3e26 ema. The & │ │ │ │ +00152480: 6c74 3b70 726f 7065 7274 7926 6774 3b3c lt;property>< │ │ │ │ +00152490: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and <value> fields are │ │ │ │ +001524c0: 206f 6e65 206f 6620 7468 6520 666f 6c6c one of the foll │ │ │ │ +001524d0: 6f77 696e 673a 3c2f 703e 0a3c 7461 626c owing:

    ...proper │ │ │ │ +00152540: 7479 2020 203c 2f74 683e 3c74 6820 636c ty valu │ │ │ │ +00152570: 6520 2020 203c 2f74 683e 3c2f 7472 3e0a e . │ │ │ │ +00152580: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +001525a0: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .namespa │ │ │ │ +001525d0: 6365 3c2f 636f 6465 3e20 2020 3c2f 7464 ce URI of the XS │ │ │ │ +00152610: 4420 7461 7267 6574 4e61 6d65 7370 6163 D targetNamespac │ │ │ │ +00152620: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e . │ │ │ │ +00152630: 3c74 7220 636c 6173 733d 226d 6172 6b64 .namesp │ │ │ │ +00152680: 6163 6532 3c2f 636f 6465 3e20 2020 3c2f ace2 alternate U │ │ │ │ +001526c0: 5249 2070 6174 7465 726e 2066 6f72 2074 RI pattern for t │ │ │ │ +001526d0: 6865 2058 5344 206e 616d 6573 7061 6365 he XSD namespace │ │ │ │ +001526e0: 2028 692e 652e 2055 5249 2069 7320 616c (i.e. URI is al │ │ │ │ +001526f0: 736f 2061 6363 6570 7465 6420 6279 2074 so accepted by t │ │ │ │ +00152700: 6865 2058 4d4c 2070 6172 7365 7229 2020 he XML parser) │ │ │ │ +00152710: 2020 3c2f 7464 3e3c 2f74 723e 0a3c 7472 .. │ │ │ │ +00152760: 3c63 6f64 653e 696d 706f 7274 3c2f 636f import URI │ │ │ │ +001527a0: 206f 6620 616e 2069 6d70 6f72 7465 6420 of an imported │ │ │ │ +001527b0: 6e61 6d65 7370 6163 652c 2061 7320 616e namespace, as an │ │ │ │ +001527c0: 2061 6c74 6572 6e61 7469 7665 206f 7220 alternative or │ │ │ │ +001527d0: 696e 2061 6464 6974 696f 6e20 746f 203c in addition to < │ │ │ │ +001527e0: 636f 6465 3e6e 616d 6573 7061 6365 3c2f code>namespace, adds xsd:import to the gener │ │ │ │ +00152820: 6174 6564 2057 5344 4c20 616e 6420 5853 ated WSDL and XS │ │ │ │ +00152830: 4420 6669 6c65 7320 2020 203c 2f74 643e D files │ │ │ │ +00152840: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d .. │ │ │ │ +00152890: 666f 726d 3c2f 636f 6465 3e20 2020 3c2f form unqua │ │ │ │ +001528d0: 6c69 6669 6564 3c2f 636f 6465 3e20 2864 lified (d │ │ │ │ +001528e0: 6566 6175 6c74 2920 6f72 203c 636f 6465 efault) or qualified local element │ │ │ │ +00152910: 616e 6420 6174 7472 6962 7574 6520 666f and attribute fo │ │ │ │ +00152920: 726d 2064 6566 6175 6c74 7320 2020 203c rm defaults < │ │ │ │ +00152930: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>..elementForm < │ │ │ │ +001529c0: 636f 6465 3e75 6e71 7561 6c69 6669 6564 code>unqualified │ │ │ │ +001529d0: 3c2f 636f 6465 3e20 2864 6566 6175 6c74 (default │ │ │ │ +001529e0: 2920 6f72 203c 636f 6465 3e71 7561 6c69 ) or quali │ │ │ │ +001529f0: 6669 6564 3c2f 636f 6465 3e20 6c6f 6361 fied loca │ │ │ │ +00152a00: 6c20 656c 656d 656e 7420 666f 726d 2064 l element form d │ │ │ │ +00152a10: 6566 6175 6c74 2020 2020 3c2f 7464 3e3c efault < │ │ │ │ +00152a20: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..a │ │ │ │ +00152a70: 7474 7269 6275 7465 466f 726d 3c2f 636f ttributeForm unqualified (default) │ │ │ │ +00152ad0: 6f72 203c 636f 6465 3e71 7561 6c69 6669 or qualifi │ │ │ │ +00152ae0: 6564 3c2f 636f 6465 3e20 6c6f 6361 6c20 ed local │ │ │ │ +00152af0: 6174 7472 6962 7574 6520 666f 726d 2064 attribute form d │ │ │ │ +00152b00: 6566 6175 6c74 2020 2020 3c2f 7464 3e3c efault < │ │ │ │ +00152b10: 2f74 723e 0a3c 7472 2063 6c61 7373 3d22 /tr>..ty │ │ │ │ +00152b60: 7065 643c 2f63 6f64 653e 2020 203c 2f74 ped no (default) or │ │ │ │ +00152bb0: 203c 636f 6465 3e79 6573 3c2f 636f 6465 yes for serializer │ │ │ │ +00152bd0: 7320 746f 2061 6464 203c 636f 6465 3e78 s to add x │ │ │ │ +00152be0: 7369 3a74 7970 653c 2f63 6f64 653e 2061 si:type a │ │ │ │ +00152bf0: 7474 7269 6275 7465 7320 746f 2058 4d4c ttributes to XML │ │ │ │ +00152c00: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f ..

    The namespace2 URI is a p │ │ │ │ +00152c40: 6174 7465 726e 2077 6974 6820 3c63 6f64 attern with * match │ │ │ │ +00152c60: 696e 6720 616e 7920 7365 7175 656e 6365 ing any sequence │ │ │ │ +00152c70: 206f 6620 6368 6172 6163 7465 7273 2061 of characters a │ │ │ │ +00152c80: 6e64 203c 636f 6465 3e2d 3c2f 636f 6465 nd - matching any c │ │ │ │ +00152ca0: 6861 7261 6374 6572 2e20 5468 6973 2070 haracter. This p │ │ │ │ +00152cb0: 6174 7465 726e 2069 6e73 7472 7563 7473 attern instructs │ │ │ │ +00152cc0: 2074 6865 2058 4d4c 2070 6172 7365 7220 the XML parser │ │ │ │ +00152cd0: 616e 6420 7661 6c69 6461 746f 7220 746f and validator to │ │ │ │ +00152ce0: 2061 6c73 6f20 6163 6365 7074 2074 6865 also accept the │ │ │ │ +00152cf0: 2055 5249 2070 6174 7465 726e 2061 7320 URI pattern as │ │ │ │ +00152d00: 6120 7661 6c69 6420 6e61 6d65 7370 6163 a valid namespac │ │ │ │ +00152d10: 6520 666f 7220 7468 6520 7370 6563 6966 e for the specif │ │ │ │ +00152d20: 6965 6420 3c63 6f64 653e 266c 743b 7072 ied <pr │ │ │ │ +00152d30: 6566 6978 2667 743b 3c2f 636f 6465 3e2e efix>. │ │ │ │ +00152d40: 3c2f 703e 0a3c 703e 5468 6520 3c63 6f64

    .

    The typed p │ │ │ │ +00152d60: 726f 7065 7274 7920 6973 203c 636f 6465 roperty is no by de │ │ │ │ +00152d80: 6661 756c 7420 616e 6420 6361 6e20 6265 fault and can be │ │ │ │ +00152d90: 2063 6861 6e67 6564 2074 6f20 3c63 6f64 changed to yes wit │ │ │ │ +00152db0: 6820 3c62 3e3c 636f 6465 3e73 6f61 7063 h soapc │ │ │ │ +00152dc0: 7070 3220 2d74 3c2f 636f 6465 3e3c 2f62 pp2 -t option -t. │ │ │ │ +00152df0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ +00152e10: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +00152e20: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ +00152e30: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +00152e40: 2069 643d 2264 6972 6563 7469 7665 732d id="directives- │ │ │ │ +00152e50: 3422 3e3c 2f61 3e0a 5363 6865 6d61 2074 4">.Schema t │ │ │ │ +00152e60: 7970 6520 6469 7265 6374 6976 6573 3c2f ype directives.

    A schema │ │ │ │ +00152e80: 7479 7065 2064 6972 6563 7469 7665 2069 type directive i │ │ │ │ +00152e90: 7320 6f66 2074 6865 2066 6f72 6d3a 3c2f s of the form:.

    //gsoap <pre │ │ │ │ +00152ef0: 6669 7826 6774 3b20 7363 6865 6d61 2074 fix> schema t │ │ │ │ +00152f00: 7970 652d 266c 743b 7072 6f70 6572 7479 ype-<property │ │ │ │ +00152f10: 2667 743b 3a20 266c 743b 6e61 6d65 2667 >: <name&g │ │ │ │ +00152f20: 743b 2026 6c74 3b76 616c 7565 2667 743b t; <value> │ │ │ │ +00152f30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00152f50: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap &l │ │ │ │ +00152f70: 743b 7072 6566 6978 2667 743b 2073 6368 t;prefix> sch │ │ │ │ +00152f80: 656d 6120 7479 7065 2d26 6c74 3b70 726f ema type-<pro │ │ │ │ +00152f90: 7065 7274 7926 6774 3b3a 2026 6c74 3b6e perty>: <n │ │ │ │ +00152fa0: 616d 6526 6774 3b3a 3a26 6c74 3b6d 656d ame>::<mem │ │ │ │ +00152fb0: 6265 7226 6774 3b20 266c 743b 7661 6c75 ber> <valu │ │ │ │ +00152fc0: 6526 6774 3b3c 2f73 7061 6e3e 3c2f 6469 e>.

    whe │ │ │ │ +00152ff0: 7265 203c 636f 6465 3e26 6c74 3b70 7265 re <pre │ │ │ │ +00153000: 6669 7826 6774 3b3c 2f63 6f64 653e 2069 fix> i │ │ │ │ +00153010: 7320 7468 6520 584d 4c20 6e61 6d65 7370 s the XML namesp │ │ │ │ +00153020: 6163 6520 7072 6566 6978 206f 6620 6120 ace prefix of a │ │ │ │ +00153030: 7363 6865 6d61 2061 6e64 203c 636f 6465 schema and <name> is an unqua │ │ │ │ +00153060: 6c69 6669 6564 206e 616d 6520 6f66 2061 lified name of a │ │ │ │ +00153070: 2043 2f43 2b2b 2074 7970 652c 2061 6e64 C/C++ type, and │ │ │ │ +00153080: 2074 6865 206f 7074 696f 6e61 6c20 3c63 the optional <member&g │ │ │ │ +001530a0: 743b 3c2f 636f 6465 3e20 6973 2061 2063 t; is a c │ │ │ │ +001530b0: 6c61 7373 2f73 7472 7563 7420 6d65 6d62 lass/struct memb │ │ │ │ +001530c0: 6572 7320 6f72 2065 6e75 6d20 636f 6e73 ers or enum cons │ │ │ │ +001530d0: 7461 6e74 2e3c 2f70 3e0a 3c70 3e59 6f75 tant.

    .

    You │ │ │ │ +001530e0: 2063 616e 2064 6573 6372 6962 6520 6120 can describe a │ │ │ │ +001530f0: 7479 7065 2077 6974 6820 6f6e 6520 6f66 type with one of │ │ │ │ +00153100: 2074 6865 2066 6f6c 6c6f 7769 6e67 3a3c the following:< │ │ │ │ +00153110: 2f70 3e0a 3c74 6162 6c65 2063 6c61 7373 /p>.. │ │ │ │ +00153150: 0a3c 7468 2063 6c61 7373 3d22 6d61 726b ...< │ │ │ │ +001531e0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +001531f0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +00153200: 3e3c 636f 6465 3e74 7970 652d 646f 6375 >type-docu │ │ │ │ +00153210: 6d65 6e74 6174 696f 6e3c 2f63 6f64 653e mentation │ │ │ │ +00153220: 2020 203c 2f74 643e 3c74 6420 636c 6173 ....

    For ex │ │ │ │ +00153350: 616d 706c 652c 2079 6f75 2063 616e 2061 ample, you can a │ │ │ │ +00153360: 6464 2061 2064 6573 6372 6970 7469 6f6e dd a description │ │ │ │ +00153370: 2074 6f20 616e 2065 6e75 6d65 7261 7469 to an enumerati │ │ │ │ +00153380: 6f6e 3a3c 2f70 3e0a 3c64 6976 2063 6c61 on:

    .
    │ │ │ │ +001533b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ +001533d0: 2073 6368 656d 6120 7479 7065 3a20 566f schema type: Vo │ │ │ │ +001533e0: 7765 6c73 2054 6865 206c 6574 7465 7273 wels The letters │ │ │ │ +001533f0: 2041 2c20 452c 2049 2c20 4f2c 2055 2c20 A, E, I, O, U, │ │ │ │ +00153400: 616e 6420 736f 6d65 7469 6d65 7320 593c and sometimes Y< │ │ │ │ +00153410: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00153430: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00153440: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +00153450: 7363 6865 6d61 2074 7970 653a 2056 6f77 schema type: Vow │ │ │ │ +00153460: 656c 733a 3a59 2041 2076 6f77 656c 2c20 els::Y A vowel, │ │ │ │ +00153470: 736f 6d65 7469 6d65 733c 2f73 7061 6e3e sometimes │ │ │ │ +00153480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173 .
    e │ │ │ │ +001534b0: 6e75 6d20 636c 6173 733c 2f73 7061 6e3e num class │ │ │ │ +001534c0: 206e 735f 5f56 6f77 656c 7320 3a20 6368 ns__Vowels : ch │ │ │ │ +001534d0: 6172 207b 2041 203d 203c 7370 616e 2063 ar { A = 'A', E = 'E' │ │ │ │ +00153530: 3c2f 7370 616e 3e2c 2049 203d 203c 7370 , I = 'I │ │ │ │ +00153560: 393b 3c2f 7370 616e 3e2c 204f 203d 203c 9;, O = < │ │ │ │ +00153570: 7370 616e 2063 6c61 7373 3d22 6368 6172 span class="char │ │ │ │ +00153580: 6c69 7465 7261 6c22 3e26 2333 393b 4f26 literal">'O& │ │ │ │ +00153590: 2333 393b 3c2f 7370 616e 3e2c 2055 203d #39;, U = │ │ │ │ +001535a0: 203c 7370 616e 2063 6c61 7373 3d22 6368 ' │ │ │ │ +001535c0: 5526 2333 393b 3c2f 7370 616e 3e2c 2059 U', Y │ │ │ │ +001535d0: 203d 203c 7370 616e 2063 6c61 7373 3d22 =  │ │ │ │ +001535f0: 393b 5926 2333 393b 3c2f 7370 616e 3e20 9;Y' │ │ │ │ +00153600: 7d3b 3c2f 6469 763e 0a3c 2f64 6976 3e3c };
    .< │ │ │ │ +00153610: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +00153620: 3c70 3e54 6869 7320 646f 6375 6d65 6e74

    This document │ │ │ │ +00153630: 6564 2065 6e75 6d65 7261 7469 6f6e 206d ed enumeration m │ │ │ │ +00153640: 6170 7320 746f 2061 2073 696d 706c 6554 aps to a simpleT │ │ │ │ +00153650: 7970 6520 7265 7374 7269 6374 696f 6e20 ype restriction │ │ │ │ +00153660: 6f66 203c 656d 3e3c 636f 6465 3e78 7364 of xsd │ │ │ │ +00153670: 3a73 7472 696e 673c 2f63 6f64 653e 3c2f :string in the soapc │ │ │ │ +00153690: 7070 322d 6765 6e65 7261 7465 6420 7363 pp2-generated sc │ │ │ │ +001536a0: 6865 6d61 3a3c 2f70 3e0a 3c64 6976 2063 hema:

    .
    <simpleType name="Vowels&q │ │ │ │ +00153760: 756f 743b 3c2f 7370 616e 3e26 6774 3b3c uot;>< │ │ │ │ +00153770: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    <annotati │ │ │ │ +001537b0: 6f6e 3c2f 7370 616e 3e26 6774 3b3c 2f64 on>.
    <document │ │ │ │ +00153800: 6174 696f 6e3c 2f73 7061 6e3e 2667 743b ation> │ │ │ │ +00153810: 3c73 7061 6e20 636c 6173 733d 226b 6579 The │ │ │ │ +00153830: 203c 7370 616e 2063 6c61 7373 3d22 6b65 letters A, E, I, O, U, and< │ │ │ │ +00153910: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> som │ │ │ │ +00153930: 6574 696d 6573 3c2f 7370 616e 3e20 3c73 etimes Y< │ │ │ │ +00153960: 2f3c 7370 616e 2063 6c61 7373 3d22 6b65 /docum │ │ │ │ +00153980: 656e 7461 7469 6f6e 3c2f 7370 616e 3e26 entation& │ │ │ │ +00153990: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    &l │ │ │ │ +001539b0: 743b 2f3c 7370 616e 2063 6c61 7373 3d22 t;/ann │ │ │ │ +001539d0: 6f74 6174 696f 6e3c 2f73 7061 6e3e 2667 otation&g │ │ │ │ +001539e0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    < │ │ │ │ +00153a00: 3b3c 7370 616e 2063 6c61 7373 3d22 6b65 ;restr │ │ │ │ +00153a20: 6963 7469 6f6e 3c2f 7370 616e 3e20 3c73 iction base= │ │ │ │ +00153a50: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +00153a70: 743b 7873 643a 7374 7269 6e67 2671 756f t;xsd:string&quo │ │ │ │ +00153a80: 743b 3c2f 7370 616e 3e26 6774 3b3c 2f64 t;>.
    <enumerat │ │ │ │ +00153ad0: 696f 6e3c 2f73 7061 6e3e 203c 7370 616e ion value=" │ │ │ │ +00153b20: 4126 7175 6f74 3b3c 2f73 7061 6e3e 2f26 A"/& │ │ │ │ +00153b30: 6774 3b3c 2f64 6976 3e0a 3c64 6976 2063 gt;
    .
    │ │ │ │ +00153b50: 266c 743b 3c73 7061 6e20 636c 6173 733d <en │ │ │ │ +00153b70: 756d 6572 6174 696f 6e3c 2f73 7061 6e3e umeration │ │ │ │ +00153b80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 value= │ │ │ │ +00153bc0: 2671 756f 743b 4526 7175 6f74 3b3c 2f73 "E"/>
    . │ │ │ │ +00153be0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    <enumeration< │ │ │ │ +00153c20: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> val │ │ │ │ +00153c40: 7565 3c2f 7370 616e 3e3d 3c73 7061 6e20 ue="I&qu │ │ │ │ +00153c70: 6f74 3b3c 2f73 7061 6e3e 2f26 6774 3b3c ot;/>< │ │ │ │ +00153c80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00153ca0: 3c73 7061 6e20 636c 6173 733d 226b 6579 enumer │ │ │ │ +00153cc0: 6174 696f 6e3c 2f73 7061 6e3e 203c 7370 ation value= │ │ │ │ +00153cf0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +00153d10: 743b 4f26 7175 6f74 3b3c 2f73 7061 6e3e t;O" │ │ │ │ +00153d20: 2f26 6774 3b3c 2f64 6976 3e0a 3c64 6976 />
    .
    │ │ │ │ +00153d40: 2020 266c 743b 3c73 7061 6e20 636c 6173 < │ │ │ │ +00153d60: 656e 756d 6572 6174 696f 6e3c 2f73 7061 enumeration value="U"< │ │ │ │ +00153dc0: 2f73 7061 6e3e 2f26 6774 3b3c 2f64 6976 /span>/>
    .
    <enumeratio │ │ │ │ +00153e10: 6e3c 2f73 7061 6e3e 203c 7370 616e 2063 n v │ │ │ │ +00153e30: 616c 7565 3c2f 7370 616e 3e3d 3c73 7061 alue="Y& │ │ │ │ +00153e60: 7175 6f74 3b3c 2f73 7061 6e3e 2667 743b quot;> │ │ │ │ +00153e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    & │ │ │ │ +00153e90: 6c74 3b3c 7370 616e 2063 6c61 7373 3d22 lt;ann │ │ │ │ +00153eb0: 6f74 6174 696f 6e3c 2f73 7061 6e3e 2667 otation&g │ │ │ │ +00153ec0: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
    .
    │ │ │ │ +00153ee0: 2020 2026 6c74 3b3c 7370 616e 2063 6c61 <documentation>A │ │ │ │ +00153f30: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c vo │ │ │ │ +00153f50: 7765 6c3c 2f73 7061 6e3e 2c20 3c73 7061 wel, sometimes</documentation>
    . │ │ │ │ +00153fc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    </annotatio │ │ │ │ +00154000: 6e3c 2f73 7061 6e3e 2667 743b 3c2f 6469 n>.
    <enumerati │ │ │ │ +00154050: 6f6e 3c2f 7370 616e 3e2f 2667 743b 3c2f on/>.
    </restrict │ │ │ │ +001540a0: 696f 6e3c 2f73 7061 6e3e 2667 743b 3c2f ion>.
    </simpleType │ │ │ │ +001540f0: 3c2f 7370 616e 3e26 6774 3b3c 2f64 6976 >
    .
    │ │ │ │ +00154120: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +00154140: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    . │ │ │ │ +00154180: 4578 616d 706c 653c 2f68 333e 0a3c 703e Example

    .

    │ │ │ │ +00154190: 5468 6520 7573 6520 6f66 2064 6972 6563 The use of direc │ │ │ │ +001541a0: 7469 7665 7320 6973 2062 6573 7420 696c tives is best il │ │ │ │ +001541b0: 6c75 7374 7261 7465 6420 7769 7468 2061 lustrated with a │ │ │ │ +001541c0: 6e20 6578 616d 706c 652e 2054 6865 2065 n example. The e │ │ │ │ +001541d0: 7861 6d70 6c65 2075 7365 7320 6120 6879 xample uses a hy │ │ │ │ +001541e0: 706f 7468 6574 6963 616c 2073 746f 636b pothetical stock │ │ │ │ +001541f0: 2071 756f 7465 2073 6572 7669 6365 2061 quote service a │ │ │ │ +00154200: 6e64 2065 7863 6861 6e67 6520 7261 7465 nd exchange rate │ │ │ │ +00154210: 2073 6572 7669 6365 2c20 6163 7475 616c service, actual │ │ │ │ +00154220: 2073 6572 7669 6365 7320 7375 6368 2061 services such a │ │ │ │ +00154230: 7320 7468 6573 6520 6172 6520 6176 6169 s these are avai │ │ │ │ +00154240: 6c61 626c 6520 666f 7220 6672 6565 206f lable for free o │ │ │ │ +00154250: 6e20 7468 6520 7765 622e 3c2f 703e 0a3c n the web.

    .< │ │ │ │ +00154260: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +00154270: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    //g │ │ │ │ +001542a0: 736f 6170 206e 7331 2073 6572 7669 6365 soap ns1 service │ │ │ │ +001542b0: 206e 616d 6573 7061 6365 3a20 2075 726e namespace: urn │ │ │ │ +001542c0: 3a47 6574 5175 6f74 6520 3c2f 7370 616e :GetQuote
    .
    int n │ │ │ │ +00154310: 7331 5f5f 6765 7451 756f 7465 283c 7370 s1__getQuote(char *symbol, float &result); │ │ │ │ +00154380: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .
    //gsoap ns2 │ │ │ │ -001543f0: 7365 7276 6963 6520 6e61 6d65 7370 6163 service namespac │ │ │ │ -00154400: 653a 2020 7572 6e3a 4375 7272 656e 6379 e: urn:Currency │ │ │ │ -00154410: 4578 6368 616e 6765 203c 2f73 7061 6e3e Exchange │ │ │ │ -00154420: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns │ │ │ │ -00154460: 325f 5f67 6574 5261 7465 283c 7370 616e 2__getRate(char │ │ │ │ -00154490: 202a 636f 756e 7472 7931 2c20 3c73 7061 *country1, char *country2, float &result) │ │ │ │ -00154500: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    //gso │ │ │ │ -00154550: 6170 206e 7333 2073 6572 7669 6365 206e ap ns3 service n │ │ │ │ -00154560: 616d 653a 2020 2020 2020 2071 756f 7465 ame: quote │ │ │ │ -00154570: 7820 3c2f 7370 616e 3e3c 2f64 6976 3e0a x
    . │ │ │ │ -00154580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ -001545b0: 6e73 3320 7365 7276 6963 6520 7374 796c ns3 service styl │ │ │ │ -001545c0: 653a 2020 2020 2020 7270 6320 3c2f 7370 e: rpc
    .
    //gsoap ns3 se │ │ │ │ -00154610: 7276 6963 6520 656e 636f 6469 6e67 3a20 rvice encoding: │ │ │ │ -00154620: 2020 656e 636f 6465 6420 3c2f 7370 616e encoded
    .
    │ │ │ │ -00154660: 2f2f 6773 6f61 7020 6e73 3320 7365 7276 //gsoap ns3 serv │ │ │ │ -00154670: 6963 6520 706f 7274 3a20 2020 2020 2020 ice port: │ │ │ │ -00154680: 6874 7470 3a2f 2f77 7777 2e6d 7964 6f6d http://www.mydom │ │ │ │ -00154690: 6169 6e2e 636f 6d2f 7175 6f74 6578 2e63 ain.com/quotex.c │ │ │ │ -001546a0: 6769 203c 2f73 7061 6e3e 3c2f 6469 763e gi
    │ │ │ │ -001546b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ -001546e0: 206e 7333 2073 6572 7669 6365 206e 616d ns3 service nam │ │ │ │ -001546f0: 6573 7061 6365 3a20 2075 726e 3a71 756f espace: urn:quo │ │ │ │ -00154700: 7465 7820 3c2f 7370 616e 3e3c 2f64 6976 tex
    .
    in │ │ │ │ -00154740: 743c 2f73 7061 6e3e 206e 7333 5f5f 6765 t ns3__ge │ │ │ │ -00154750: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(char *sy │ │ │ │ -00154780: 6d62 6f6c 2c20 3c73 7061 6e20 636c 6173 mbol, │ │ │ │ -001547a0: 6368 6172 3c2f 7370 616e 3e20 2a63 6f75 char *cou │ │ │ │ -001547b0: 6e74 7279 2c20 3c73 7061 6e20 636c 6173 ntry, │ │ │ │ -001547d0: 666c 6f61 743c 2f73 7061 6e3e 2026 616d float &am │ │ │ │ -001547e0: 703b 7265 7375 6c74 293b 3c2f 6469 763e p;result);
    │ │ │ │ -001547f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The < │ │ │ │ -00154810: 656d 3e3c 636f 6465 3e71 756f 7465 782e em>quotex. │ │ │ │ -00154820: 683c 2f63 6f64 653e 3c2f 656d 3e20 6578 h ex │ │ │ │ -00154830: 616d 706c 6520 6973 2061 206e 6577 2057 ample is a new W │ │ │ │ -00154840: 6562 2053 6572 7669 6365 2063 7265 6174 eb Service creat │ │ │ │ -00154850: 6564 2062 7920 636f 6d62 696e 696e 6720 ed by combining │ │ │ │ -00154860: 7477 6f20 6578 6973 7469 6e67 2057 6562 two existing Web │ │ │ │ -00154870: 2053 6572 7669 6365 733a 2061 2053 746f Services: a Sto │ │ │ │ -00154880: 636b 2051 756f 7465 2073 6572 7669 6365 ck Quote service │ │ │ │ -00154890: 2061 6e64 2061 2043 7572 7265 6e63 7920 and a Currency │ │ │ │ -001548a0: 4578 6368 616e 6765 2073 6572 7669 6365 Exchange service │ │ │ │ -001548b0: 2e3c 2f70 3e0a 3c70 3e54 6865 206e 616d .

    .

    The nam │ │ │ │ -001548c0: 6573 7061 6365 2070 7265 6669 7820 3c63 espace prefix ns3 i │ │ │ │ -001548e0: 7320 7573 6564 2066 6f72 2074 6865 206e s used for the n │ │ │ │ -001548f0: 6577 203c 636f 6465 3e71 756f 7465 783c ew quotex< │ │ │ │ -00154900: 2f63 6f64 653e 2057 6562 2053 6572 7669 /code> Web Servi │ │ │ │ -00154910: 6365 2077 6974 6820 6e61 6d65 7370 6163 ce with namespac │ │ │ │ -00154920: 6520 5552 4920 3c65 6d3e 3c63 6f64 653e e URI │ │ │ │ -00154930: 7572 6e3a 7175 6f74 6578 3c2f 636f 6465 urn:quotex, service │ │ │ │ -00154950: 6e61 6d65 203c 636f 6465 3e71 756f 7465 name quote │ │ │ │ -00154960: 783c 2f63 6f64 653e 2c20 616e 6420 656e x, and en │ │ │ │ -00154970: 6470 6f69 6e74 2070 6f72 7420 3c65 6d3e dpoint port │ │ │ │ -00154980: 3c63 6f64 653e 3c61 2068 7265 663d 2268 http://www.my │ │ │ │ -001549c0: 646f 6d61 696e 2e63 6f6d 2f71 756f 7465 domain.com/quote │ │ │ │ -001549d0: 782e 6367 693c 2f61 3e3c 2f63 6f64 653e x.cgi │ │ │ │ -001549e0: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e 5369 .

    .

    Si │ │ │ │ -001549f0: 6e63 6520 7468 6520 6e65 7720 5765 6220 nce the new Web │ │ │ │ -00154a00: 5365 7276 6963 6520 696e 766f 6b65 7320 Service invokes │ │ │ │ -00154a10: 7468 6520 3c63 6f64 653e 6e73 315f 5f67 the ns1__g │ │ │ │ -00154a20: 6574 5175 6f74 653c 2f63 6f64 653e 2061 etQuote a │ │ │ │ -00154a30: 6e64 203c 636f 6465 3e6e 7332 5f5f 6765 nd ns2__ge │ │ │ │ -00154a40: 7452 6174 653c 2f63 6f64 653e 2073 6572 tRate ser │ │ │ │ -00154a50: 7669 6365 206f 7065 7261 7469 6f6e 732c vice operations, │ │ │ │ -00154a60: 2074 6865 2073 6572 7669 6365 206e 616d the service nam │ │ │ │ -00154a70: 6573 7061 6365 7320 616e 6420 6f74 6865 espaces and othe │ │ │ │ -00154a80: 7220 6465 7461 696c 7320 7375 6368 2061 r details such a │ │ │ │ -00154a90: 7320 7374 796c 6520 616e 6420 656e 636f s style and enco │ │ │ │ -00154aa0: 6469 6e67 206f 6620 7468 6573 6520 6d65 ding of these me │ │ │ │ -00154ab0: 7468 6f64 7320 6172 6520 6769 7665 6e20 thods are given │ │ │ │ -00154ac0: 6279 2064 6972 6563 7469 7665 732e 2041 by directives. A │ │ │ │ -00154ad0: 6674 6572 2069 6e76 6f6b 696e 6720 7468 fter invoking th │ │ │ │ -00154ae0: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool │ │ │ │ -00154af0: 6f6e 2074 6865 203c 656d 3e3c 636f 6465 on the quotex.h │ │ │ │ -00154b10: 3c2f 656d 3e20 6865 6164 6572 2066 696c header fil │ │ │ │ -00154b20: 653a 203c 2f70 3e3c 7072 6520 636c 6173 e:

     so
    │ │ │ │ -00154b40: 6170 6370 7032 2071 756f 7465 782e 680a  apcpp2 quotex.h.
    │ │ │ │ -00154b50: 3c2f 7072 653e 3c70 3e20 7468 6520 5753  

    the WS │ │ │ │ -00154b60: 444c 206f 6620 7468 6520 6e65 7720 3c63 DL of the new quotex Web Service is │ │ │ │ -00154b90: 2073 6176 6564 2061 7320 3c65 6d3e 3c63 saved as quotex.wsdl< │ │ │ │ -00154bb0: 2f63 6f64 653e 3c2f 656d 3e2e 2053 696e /code>. Sin │ │ │ │ -00154bc0: 6365 2074 6865 2073 6572 7669 6365 206e ce the service n │ │ │ │ -00154bd0: 616d 652c 2065 6e64 706f 696e 7420 706f ame, endpoint po │ │ │ │ -00154be0: 7274 2c20 616e 6420 6e61 6d65 7370 6163 rt, and namespac │ │ │ │ -00154bf0: 6520 5552 4920 7765 7265 2070 726f 7669 e URI were provi │ │ │ │ -00154c00: 6465 6420 696e 2074 6865 2068 6561 6465 ded in the heade │ │ │ │ -00154c10: 7220 6669 6c65 2c20 7468 6520 6765 6e65 r file, the gene │ │ │ │ -00154c20: 7261 7465 6420 5753 444c 2066 696c 6520 rated WSDL file │ │ │ │ -00154c30: 6361 6e20 6265 2070 7562 6c69 7368 6564 can be published │ │ │ │ -00154c40: 2074 6f67 6574 6865 7220 7769 7468 2074 together with t │ │ │ │ -00154c50: 6865 2063 6f6d 7069 6c65 6420 5765 6220 he compiled Web │ │ │ │ -00154c60: 5365 7276 6963 6520 696e 7374 616c 6c65 Service installe │ │ │ │ -00154c70: 6420 6173 2061 2043 4749 2061 7070 6c69 d as a CGI appli │ │ │ │ -00154c80: 6361 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 cation.

    .

    T │ │ │ │ -00154c90: 6865 206e 616d 6573 7061 6365 206d 6170 he namespace map │ │ │ │ -00154ca0: 7069 6e67 2074 6162 6c65 2066 6f72 2074 ping table for t │ │ │ │ -00154cb0: 6865 203c 656d 3e3c 636f 6465 3e71 756f he quo │ │ │ │ -00154cc0: 7465 782e 6370 703c 2f63 6f64 653e 3c2f tex.cpp Web Service │ │ │ │ -00154ce0: 696d 706c 656d 656e 7461 7469 6f6e 2069 implementation i │ │ │ │ -00154cf0: 7320 7361 7665 6420 6173 203c 656d 3e3c s saved as < │ │ │ │ -00154d00: 636f 6465 3e71 756f 7465 782e 6e73 6d61 code>quotex.nsma │ │ │ │ -00154d10: 703c 2f63 6f64 653e 3c2f 656d 3e2e 2054 p. T │ │ │ │ -00154d20: 6869 7320 6669 6c65 2063 616e 2062 6520 his file can be │ │ │ │ -00154d30: 6469 7265 6374 6c79 2069 6e63 6c75 6465 directly include │ │ │ │ -00154d40: 6420 696e 203c 656d 3e3c 636f 6465 3e71 d in q │ │ │ │ -00154d50: 756f 7465 782e 6370 703c 2f63 6f64 653e uotex.cpp │ │ │ │ -00154d60: 3c2f 656d 3e20 696e 7374 6561 6420 6f66 instead of │ │ │ │ -00154d70: 2073 7065 6369 6669 6564 2062 7920 6861 specified by ha │ │ │ │ -00154d80: 6e64 2069 6e20 7468 6520 736f 7572 6365 nd in the source │ │ │ │ -00154d90: 206f 6620 3c65 6d3e 3c63 6f64 653e 7175 of qu │ │ │ │ -00154da0: 6f74 6578 2e63 7070 3c2f 636f 6465 3e3c otex.cpp< │ │ │ │ -00154db0: 2f65 6d3e 2e3c 2f70 3e0a 3c70 3ef0 9f94 /em>.

    .

    ... │ │ │ │ -00154dc0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -00154dd0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -00154de0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -00154df0: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Transi │ │ │ │ -00154e20: 656e 7420 6461 7461 2074 7970 6573 3c2f ent data types.

    There are │ │ │ │ -00154e40: 2073 6974 7561 7469 6f6e 7320 7768 656e situations when │ │ │ │ -00154e50: 2063 6572 7461 696e 2074 7970 6573 2068 certain types h │ │ │ │ -00154e60: 6176 6520 746f 2062 6520 7573 6564 2069 ave to be used i │ │ │ │ -00154e70: 6e20 616e 2069 6e74 6572 6661 6365 2068 n an interface h │ │ │ │ -00154e80: 6561 6465 7220 6669 6c65 2c20 6275 7420 eader file, but │ │ │ │ -00154e90: 7468 6520 7479 7065 7320 6172 6520 6e6f the types are no │ │ │ │ -00154ea0: 7420 7365 7269 616c 697a 6162 6c65 2061 t serializable a │ │ │ │ -00154eb0: 6e64 2074 6865 7265 666f 7265 2068 6176 nd therefore hav │ │ │ │ -00154ec0: 6520 746f 2062 6520 2269 6e76 6973 6962 e to be "invisib │ │ │ │ -00154ed0: 6c65 2220 746f 2074 6865 2073 6f61 7063 le" to the soapc │ │ │ │ -00154ee0: 7070 3220 746f 6f6c 2e20 5468 6573 6520 pp2 tool. These │ │ │ │ -00154ef0: 7479 7065 7320 6172 6520 6361 6c6c 6564 types are called │ │ │ │ -00154f00: 2074 7261 6e73 6965 6e74 2e3c 2f70 3e0a transient.

    . │ │ │ │ -00154f10: 3c70 3e54 6869 7320 6665 6174 7572 6520

    This feature │ │ │ │ -00154f20: 6973 2075 7365 6675 6c20 7768 656e 2061 is useful when a │ │ │ │ -00154f30: 206c 6962 7261 7279 2074 7970 6520 6973 library type is │ │ │ │ -00154f40: 2075 7365 6420 696e 2074 6865 2069 6e74 used in the int │ │ │ │ -00154f50: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ -00154f60: 6c65 2061 7320 7061 7274 206f 6620 6120 le as part of a │ │ │ │ -00154f70: 7374 7275 6374 206f 7220 636c 6173 732c struct or class, │ │ │ │ -00154f80: 2066 6f72 2065 7861 6d70 6c65 2074 6865 for example the │ │ │ │ -00154f90: 203c 636f 6465 3e46 494c 453c 2f63 6f64 FILE type or std::ostream that are cl │ │ │ │ -00154fd0: 6561 726c 7920 6e6f 7420 7365 7269 616c early not serial │ │ │ │ -00154fe0: 697a 6162 6c65 2e20 4966 2074 6865 7365 izable. If these │ │ │ │ -00154ff0: 2074 7970 6573 2061 7265 2069 6e74 726f types are intro │ │ │ │ -00155000: 6475 6365 6420 696e 2061 6e20 696e 7465 duced in an inte │ │ │ │ -00155010: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil │ │ │ │ -00155020: 6520 7468 656e 2074 6865 7365 2074 7970 e then these typ │ │ │ │ -00155030: 6573 206d 7573 7420 6265 2064 6563 6c61 es must be decla │ │ │ │ -00155040: 7265 6420 7472 616e 7369 656e 742e 204f red transient. O │ │ │ │ -00155050: 7468 6572 7769 7365 2c20 736f 6170 6370 therwise, soapcp │ │ │ │ -00155060: 7032 2077 696c 6c20 7468 726f 7720 616e p2 will throw an │ │ │ │ -00155070: 2065 7272 6f72 2e3c 2f70 3e0a 3c70 3e54 error.

    .

    T │ │ │ │ -00155080: 6f20 6465 636c 6172 6520 6120 7472 616e o declare a tran │ │ │ │ -00155090: 7369 656e 7420 7479 7065 2075 7365 203c sient type use < │ │ │ │ -001550a0: 636f 6465 3e65 7874 6572 6e3c 2f63 6f64 code>extern. For example: │ │ │ │ -001550c0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    extern │ │ │ │ -00155110: 203c 7370 616e 2063 6c61 7373 3d22 6b65 class FILE;
    . │ │ │ │ -00155140: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Even t │ │ │ │ -00155160: 686f 7567 6820 3c63 6f64 653e 4649 4c45 hough FILE │ │ │ │ -00155170: 3c2f 636f 6465 3e20 6973 206e 6f74 2061 is not a │ │ │ │ -00155180: 2063 6c61 7373 2c20 7468 6973 2064 6563 class, this dec │ │ │ │ -00155190: 6c61 7261 7469 6f6e 206d 6572 656c 7920 laration merely │ │ │ │ -001551a0: 696e 7472 6f64 7563 6573 2074 6865 203c introduces the < │ │ │ │ -001551b0: 636f 6465 3e46 494c 453c 2f63 6f64 653e code>FILE │ │ │ │ -001551c0: 2074 7970 6520 6e61 6d65 2077 6974 686f type name witho │ │ │ │ -001551d0: 7574 2073 7065 6369 6679 696e 6720 6974 ut specifying it │ │ │ │ -001551e0: 7320 6465 7461 696c 732e 3c2f 703e 0a3c s details.

    .< │ │ │ │ -001551f0: 703e 496e 2043 2077 6520 6361 6e20 7374 p>In C we can st │ │ │ │ -00155200: 696c 6c20 7573 6520 7468 6520 636c 6173 ill use the clas │ │ │ │ -00155210: 7320 6b65 7977 6f72 642c 2062 6563 6175 s keyword, becau │ │ │ │ -00155220: 7365 206e 6f20 636f 6465 2069 7320 6765 se no code is ge │ │ │ │ -00155230: 6e65 7261 7465 6420 6279 2073 6f61 7063 nerated by soapc │ │ │ │ -00155240: 7070 3220 666f 7220 7468 6973 2074 7261 pp2 for this tra │ │ │ │ -00155250: 6e73 6965 6e74 2074 7970 652e 3c2f 703e nsient type.

    │ │ │ │ -00155260: 0a3c 703e 5765 2063 616e 2074 6865 6e20 .

    We can then │ │ │ │ -00155270: 7573 6520 7468 6973 2074 7970 6520 656c use this type el │ │ │ │ -00155280: 7365 7768 6572 652c 2066 6f72 2065 7861 sewhere, for exa │ │ │ │ -00155290: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    │ │ │ │ -001552b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -001552e0: 2f73 7061 6e3e 6e73 5f5f 7265 636f 7264 /span>ns__record │ │ │ │ +001543b0: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne">//gsoa │ │ │ │ +001543d0: 7020 6e73 3220 7365 7276 6963 6520 6e61 p ns2 service na │ │ │ │ +001543e0: 6d65 7370 6163 653a 2020 7572 6e3a 4375 mespace: urn:Cu │ │ │ │ +001543f0: 7272 656e 6379 4578 6368 616e 6765 203c rrencyExchange < │ │ │ │ +00154400: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00154420: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00154430: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int ns2__getRate │ │ │ │ +00154450: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char< │ │ │ │ +00154470: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1 │ │ │ │ +00154480: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char │ │ │ │ +001544a0: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country │ │ │ │ +001544b0: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo │ │ │ │ +001544d0: 6174 3c2f 7370 616e 3e20 2661 6d70 3b72 at &r │ │ │ │ +001544e0: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .< │ │ │ │ +001544f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00154500: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >

    .
    //gsoap ns3 ser │ │ │ │ +00154540: 7669 6365 206e 616d 653a 2020 2020 2020 vice name: │ │ │ │ +00154550: 2071 756f 7465 7820 3c2f 7370 616e 3e3c quotex < │ │ │ │ +00154560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ +00154590: 6773 6f61 7020 6e73 3320 7365 7276 6963 gsoap ns3 servic │ │ │ │ +001545a0: 6520 7374 796c 653a 2020 2020 2020 7270 e style: rp │ │ │ │ +001545b0: 6320 3c2f 7370 616e 3e3c 2f64 6976 3e0a c
    . │ │ │ │ +001545c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ +001545f0: 6e73 3320 7365 7276 6963 6520 656e 636f ns3 service enco │ │ │ │ +00154600: 6469 6e67 3a20 2020 656e 636f 6465 6420 ding: encoded │ │ │ │ +00154610: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00154630: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ +00154650: 3320 7365 7276 6963 6520 706f 7274 3a20 3 service port: │ │ │ │ +00154660: 2020 2020 2020 6874 7470 3a2f 2f77 7777 http://www │ │ │ │ +00154670: 2e6d 7964 6f6d 6169 6e2e 636f 6d2f 7175 .mydomain.com/qu │ │ │ │ +00154680: 6f74 6578 2e63 6769 203c 2f73 7061 6e3e otex.cgi │ │ │ │ +00154690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +001546c0: 2f67 736f 6170 206e 7333 2073 6572 7669 /gsoap ns3 servi │ │ │ │ +001546d0: 6365 206e 616d 6573 7061 6365 3a20 2075 ce namespace: u │ │ │ │ +001546e0: 726e 3a71 756f 7465 7820 3c2f 7370 616e rn:quotex
    .
    int n │ │ │ │ +00154730: 7333 5f5f 6765 7451 756f 7465 283c 7370 s3__getQuote(char *symbol, char *country, float &result); │ │ │ │ +001547d0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The q │ │ │ │ +00154800: 756f 7465 782e 683c 2f63 6f64 653e 3c2f uotex.h example is a │ │ │ │ +00154820: 206e 6577 2057 6562 2053 6572 7669 6365 new Web Service │ │ │ │ +00154830: 2063 7265 6174 6564 2062 7920 636f 6d62 created by comb │ │ │ │ +00154840: 696e 696e 6720 7477 6f20 6578 6973 7469 ining two existi │ │ │ │ +00154850: 6e67 2057 6562 2053 6572 7669 6365 733a ng Web Services: │ │ │ │ +00154860: 2061 2053 746f 636b 2051 756f 7465 2073 a Stock Quote s │ │ │ │ +00154870: 6572 7669 6365 2061 6e64 2061 2043 7572 ervice and a Cur │ │ │ │ +00154880: 7265 6e63 7920 4578 6368 616e 6765 2073 rency Exchange s │ │ │ │ +00154890: 6572 7669 6365 2e3c 2f70 3e0a 3c70 3e54 ervice.

    .

    T │ │ │ │ +001548a0: 6865 206e 616d 6573 7061 6365 2070 7265 he namespace pre │ │ │ │ +001548b0: 6669 7820 3c63 6f64 653e 6e73 333c 2f63 fix ns3 is used for │ │ │ │ +001548d0: 2074 6865 206e 6577 203c 636f 6465 3e71 the new q │ │ │ │ +001548e0: 756f 7465 783c 2f63 6f64 653e 2057 6562 uotex Web │ │ │ │ +001548f0: 2053 6572 7669 6365 2077 6974 6820 6e61 Service with na │ │ │ │ +00154900: 6d65 7370 6163 6520 5552 4920 3c65 6d3e mespace URI │ │ │ │ +00154910: 3c63 6f64 653e 7572 6e3a 7175 6f74 6578 urn:quotex │ │ │ │ +00154920: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 7365 , se │ │ │ │ +00154930: 7276 6963 6520 6e61 6d65 203c 636f 6465 rvice name quotex, │ │ │ │ +00154950: 616e 6420 656e 6470 6f69 6e74 2070 6f72 and endpoint por │ │ │ │ +00154960: 7420 3c65 6d3e 3c63 6f64 653e 3c61 2068 t http:// │ │ │ │ +001549a0: 7777 772e 6d79 646f 6d61 696e 2e63 6f6d www.mydomain.com │ │ │ │ +001549b0: 2f71 756f 7465 782e 6367 693c 2f61 3e3c /quotex.cgi< │ │ │ │ +001549c0: 2f63 6f64 653e 3c2f 656d 3e2e 3c2f 703e /code>.

    │ │ │ │ +001549d0: 0a3c 703e 5369 6e63 6520 7468 6520 6e65 .

    Since the ne │ │ │ │ +001549e0: 7720 5765 6220 5365 7276 6963 6520 696e w Web Service in │ │ │ │ +001549f0: 766f 6b65 7320 7468 6520 3c63 6f64 653e vokes the │ │ │ │ +00154a00: 6e73 315f 5f67 6574 5175 6f74 653c 2f63 ns1__getQuote and n │ │ │ │ +00154a20: 7332 5f5f 6765 7452 6174 653c 2f63 6f64 s2__getRate service opera │ │ │ │ +00154a40: 7469 6f6e 732c 2074 6865 2073 6572 7669 tions, the servi │ │ │ │ +00154a50: 6365 206e 616d 6573 7061 6365 7320 616e ce namespaces an │ │ │ │ +00154a60: 6420 6f74 6865 7220 6465 7461 696c 7320 d other details │ │ │ │ +00154a70: 7375 6368 2061 7320 7374 796c 6520 616e such as style an │ │ │ │ +00154a80: 6420 656e 636f 6469 6e67 206f 6620 7468 d encoding of th │ │ │ │ +00154a90: 6573 6520 6d65 7468 6f64 7320 6172 6520 ese methods are │ │ │ │ +00154aa0: 6769 7665 6e20 6279 2064 6972 6563 7469 given by directi │ │ │ │ +00154ab0: 7665 732e 2041 6674 6572 2069 6e76 6f6b ves. After invok │ │ │ │ +00154ac0: 696e 6720 7468 6520 736f 6170 6370 7032 ing the soapcpp2 │ │ │ │ +00154ad0: 2074 6f6f 6c20 6f6e 2074 6865 203c 656d tool on the quotex.h< │ │ │ │ +00154af0: 2f63 6f64 653e 3c2f 656d 3e20 6865 6164 /code> head │ │ │ │ +00154b00: 6572 2066 696c 653a 203c 2f70 3e3c 7072 er file:

    soapcpp2 quo │ │ │ │ +00154b30: 7465 782e 680a 3c2f 7072 653e 3c70 3e20 tex.h.

    │ │ │ │ +00154b40: 7468 6520 5753 444c 206f 6620 7468 6520 the WSDL of the │ │ │ │ +00154b50: 6e65 7720 3c63 6f64 653e 7175 6f74 6578 new quotex │ │ │ │ +00154b60: 3c2f 636f 6465 3e20 5765 6220 5365 7276 Web Serv │ │ │ │ +00154b70: 6963 6520 6973 2073 6176 6564 2061 7320 ice is saved as │ │ │ │ +00154b80: 3c65 6d3e 3c63 6f64 653e 7175 6f74 6578 quotex │ │ │ │ +00154b90: 2e77 7364 6c3c 2f63 6f64 653e 3c2f 656d .wsdl. Since the ser │ │ │ │ +00154bb0: 7669 6365 206e 616d 652c 2065 6e64 706f vice name, endpo │ │ │ │ +00154bc0: 696e 7420 706f 7274 2c20 616e 6420 6e61 int port, and na │ │ │ │ +00154bd0: 6d65 7370 6163 6520 5552 4920 7765 7265 mespace URI were │ │ │ │ +00154be0: 2070 726f 7669 6465 6420 696e 2074 6865 provided in the │ │ │ │ +00154bf0: 2068 6561 6465 7220 6669 6c65 2c20 7468 header file, th │ │ │ │ +00154c00: 6520 6765 6e65 7261 7465 6420 5753 444c e generated WSDL │ │ │ │ +00154c10: 2066 696c 6520 6361 6e20 6265 2070 7562 file can be pub │ │ │ │ +00154c20: 6c69 7368 6564 2074 6f67 6574 6865 7220 lished together │ │ │ │ +00154c30: 7769 7468 2074 6865 2063 6f6d 7069 6c65 with the compile │ │ │ │ +00154c40: 6420 5765 6220 5365 7276 6963 6520 696e d Web Service in │ │ │ │ +00154c50: 7374 616c 6c65 6420 6173 2061 2043 4749 stalled as a CGI │ │ │ │ +00154c60: 2061 7070 6c69 6361 7469 6f6e 2e3c 2f70 application.

    .

    The namespa │ │ │ │ +00154c80: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table │ │ │ │ +00154c90: 2066 6f72 2074 6865 203c 656d 3e3c 636f for the quotex.cpp Web Se │ │ │ │ +00154cc0: 7276 6963 6520 696d 706c 656d 656e 7461 rvice implementa │ │ │ │ +00154cd0: 7469 6f6e 2069 7320 7361 7665 6420 6173 tion is saved as │ │ │ │ +00154ce0: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote │ │ │ │ +00154cf0: 782e 6e73 6d61 703c 2f63 6f64 653e 3c2f x.nsmap. This file c │ │ │ │ +00154d10: 616e 2062 6520 6469 7265 6374 6c79 2069 an be directly i │ │ │ │ +00154d20: 6e63 6c75 6465 6420 696e 203c 656d 3e3c ncluded in < │ │ │ │ +00154d30: 636f 6465 3e71 756f 7465 782e 6370 703c code>quotex.cpp< │ │ │ │ +00154d40: 2f63 6f64 653e 3c2f 656d 3e20 696e 7374 /code> inst │ │ │ │ +00154d50: 6561 6420 6f66 2073 7065 6369 6669 6564 ead of specified │ │ │ │ +00154d60: 2062 7920 6861 6e64 2069 6e20 7468 6520 by hand in the │ │ │ │ +00154d70: 736f 7572 6365 206f 6620 3c65 6d3e 3c63 source of quotex.cpp.

    . │ │ │ │ +00154da0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +00154dc0: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    . │ │ │ │ +00154e00: 5472 616e 7369 656e 7420 6461 7461 2074 Transient data t │ │ │ │ +00154e10: 7970 6573 3c2f 6832 3e0a 3c70 3e54 6865 ypes

    .

    The │ │ │ │ +00154e20: 7265 2061 7265 2073 6974 7561 7469 6f6e re are situation │ │ │ │ +00154e30: 7320 7768 656e 2063 6572 7461 696e 2074 s when certain t │ │ │ │ +00154e40: 7970 6573 2068 6176 6520 746f 2062 6520 ypes have to be │ │ │ │ +00154e50: 7573 6564 2069 6e20 616e 2069 6e74 6572 used in an inter │ │ │ │ +00154e60: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ +00154e70: 2c20 6275 7420 7468 6520 7479 7065 7320 , but the types │ │ │ │ +00154e80: 6172 6520 6e6f 7420 7365 7269 616c 697a are not serializ │ │ │ │ +00154e90: 6162 6c65 2061 6e64 2074 6865 7265 666f able and therefo │ │ │ │ +00154ea0: 7265 2068 6176 6520 746f 2062 6520 2269 re have to be "i │ │ │ │ +00154eb0: 6e76 6973 6962 6c65 2220 746f 2074 6865 nvisible" to the │ │ │ │ +00154ec0: 2073 6f61 7063 7070 3220 746f 6f6c 2e20 soapcpp2 tool. │ │ │ │ +00154ed0: 5468 6573 6520 7479 7065 7320 6172 6520 These types are │ │ │ │ +00154ee0: 6361 6c6c 6564 2074 7261 6e73 6965 6e74 called transient │ │ │ │ +00154ef0: 2e3c 2f70 3e0a 3c70 3e54 6869 7320 6665 .

    .

    This fe │ │ │ │ +00154f00: 6174 7572 6520 6973 2075 7365 6675 6c20 ature is useful │ │ │ │ +00154f10: 7768 656e 2061 206c 6962 7261 7279 2074 when a library t │ │ │ │ +00154f20: 7970 6520 6973 2075 7365 6420 696e 2074 ype is used in t │ │ │ │ +00154f30: 6865 2069 6e74 6572 6661 6365 2068 6561 he interface hea │ │ │ │ +00154f40: 6465 7220 6669 6c65 2061 7320 7061 7274 der file as part │ │ │ │ +00154f50: 206f 6620 6120 7374 7275 6374 206f 7220 of a struct or │ │ │ │ +00154f60: 636c 6173 732c 2066 6f72 2065 7861 6d70 class, for examp │ │ │ │ +00154f70: 6c65 2074 6865 203c 636f 6465 3e46 494c le the FIL │ │ │ │ +00154f80: 453c 2f63 6f64 653e 2074 7970 6520 6f72 E type or │ │ │ │ +00154f90: 203c 636f 6465 3e73 7464 3a3a 6f73 7472 std::ostr │ │ │ │ +00154fa0: 6561 6d3c 2f63 6f64 653e 2074 6861 7420 eam that │ │ │ │ +00154fb0: 6172 6520 636c 6561 726c 7920 6e6f 7420 are clearly not │ │ │ │ +00154fc0: 7365 7269 616c 697a 6162 6c65 2e20 4966 serializable. If │ │ │ │ +00154fd0: 2074 6865 7365 2074 7970 6573 2061 7265 these types are │ │ │ │ +00154fe0: 2069 6e74 726f 6475 6365 6420 696e 2061 introduced in a │ │ │ │ +00154ff0: 6e20 696e 7465 7266 6163 6520 6865 6164 n interface head │ │ │ │ +00155000: 6572 2066 696c 6520 7468 656e 2074 6865 er file then the │ │ │ │ +00155010: 7365 2074 7970 6573 206d 7573 7420 6265 se types must be │ │ │ │ +00155020: 2064 6563 6c61 7265 6420 7472 616e 7369 declared transi │ │ │ │ +00155030: 656e 742e 204f 7468 6572 7769 7365 2c20 ent. Otherwise, │ │ │ │ +00155040: 736f 6170 6370 7032 2077 696c 6c20 7468 soapcpp2 will th │ │ │ │ +00155050: 726f 7720 616e 2065 7272 6f72 2e3c 2f70 row an error.

    .

    To declare │ │ │ │ +00155070: 6120 7472 616e 7369 656e 7420 7479 7065 a transient type │ │ │ │ +00155080: 2075 7365 203c 636f 6465 3e65 7874 6572 use exter │ │ │ │ +00155090: 6e3c 2f63 6f64 653e 2e20 466f 7220 6578 n. For ex │ │ │ │ +001550a0: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    extern< │ │ │ │ +001550f0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> cla │ │ │ │ +00155110: 7373 203c 2f73 7061 6e3e 4649 4c45 3b3c ss FILE;< │ │ │ │ +00155120: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +00155140: 4576 656e 2074 686f 7567 6820 3c63 6f64 Even though FILE is │ │ │ │ +00155160: 206e 6f74 2061 2063 6c61 7373 2c20 7468 not a class, th │ │ │ │ +00155170: 6973 2064 6563 6c61 7261 7469 6f6e 206d is declaration m │ │ │ │ +00155180: 6572 656c 7920 696e 7472 6f64 7563 6573 erely introduces │ │ │ │ +00155190: 2074 6865 203c 636f 6465 3e46 494c 453c the FILE< │ │ │ │ +001551a0: 2f63 6f64 653e 2074 7970 6520 6e61 6d65 /code> type name │ │ │ │ +001551b0: 2077 6974 686f 7574 2073 7065 6369 6679 without specify │ │ │ │ +001551c0: 696e 6720 6974 7320 6465 7461 696c 732e ing its details. │ │ │ │ +001551d0: 3c2f 703e 0a3c 703e 496e 2043 2077 6520

    .

    In C we │ │ │ │ +001551e0: 6361 6e20 7374 696c 6c20 7573 6520 7468 can still use th │ │ │ │ +001551f0: 6520 636c 6173 7320 6b65 7977 6f72 642c e class keyword, │ │ │ │ +00155200: 2062 6563 6175 7365 206e 6f20 636f 6465 because no code │ │ │ │ +00155210: 2069 7320 6765 6e65 7261 7465 6420 6279 is generated by │ │ │ │ +00155220: 2073 6f61 7063 7070 3220 666f 7220 7468 soapcpp2 for th │ │ │ │ +00155230: 6973 2074 7261 6e73 6965 6e74 2074 7970 is transient typ │ │ │ │ +00155240: 652e 3c2f 703e 0a3c 703e 5765 2063 616e e.

    .

    We can │ │ │ │ +00155250: 2074 6865 6e20 7573 6520 7468 6973 2074 then use this t │ │ │ │ +00155260: 7970 6520 656c 7365 7768 6572 652c 2066 ype elsewhere, f │ │ │ │ +00155270: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ +00155280: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ +001552c0: 7275 6374 203c 2f73 7061 6e3e 6e73 5f5f ruct ns__ │ │ │ │ +001552d0: 7265 636f 7264 3c2f 6469 763e 0a3c 6469 record
    .{ │ │ │ │ 001552f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ -00155310: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    FILE *fd; │ │ │ │ -00155330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    const │ │ │ │ -00155370: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *name;.
    };
    .

    Only the │ │ │ │ -001553e0: 203c 636f 6465 3e6e 616d 653c 2f63 6f64 name member is ser │ │ │ │ -00155400: 6961 6c69 7a65 6420 6f66 203c 636f 6465 ialized of ns__record.

    .

    Anoth │ │ │ │ -00155430: 6572 2065 7861 6d70 6c65 3a3c 2f70 3e0a er example:

    . │ │ │ │ -00155440: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    ex │ │ │ │ -00155480: 7465 726e 3c2f 7370 616e 3e20 3c73 7061 tern class s │ │ │ │ -001554b0: 7464 3a3a 6f73 7472 6561 6d3b 203c 7370 td::ostream; // std::ostre │ │ │ │ -001554e0: 616d 2063 616e 2623 3339 3b74 2062 6520 am can't be │ │ │ │ -001554f0: 7365 7269 616c 697a 6564 2c20 6275 7420 serialized, but │ │ │ │ -00155500: 6e65 6564 2074 6f20 6265 2064 6563 6c61 need to be decla │ │ │ │ -00155510: 7265 643c 2f73 7061 6e3e 3c2f 6469 763e red
    │ │ │ │ -00155520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    class < │ │ │ │ -00155550: 2f73 7061 6e3e 6e73 5f5f 6d79 436c 6173 /span>ns__myClas │ │ │ │ -00155560: 7320 3c2f 6469 763e 0a3c 6469 7620 636c s
    .
    { public │ │ │ │ -001555a0: 3a3c 2f64 6976 3e0a 3c64 6976 2063 6c61 :
    .
    virtual voi │ │ │ │ -00155600: 643c 2f73 7061 6e3e 2070 7269 6e74 2873 d print(s │ │ │ │ -00155610: 7464 3a3a 6f73 7472 6561 6d20 2661 6d70 td::ostream & │ │ │ │ -00155620: 3b73 2920 3c73 7061 6e20 636c 6173 733d ;s) const< │ │ │ │ -00155640: 2f73 7061 6e3e 3b20 3c73 7061 6e20 636c /span>; // │ │ │ │ -00155660: 206e 6565 6420 6f73 7472 6561 6d20 6865 need ostream he │ │ │ │ -00155670: 7265 203c 2f73 7061 6e3e 3c2f 6469 763e re
    │ │ │ │ -00155680: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //
    │ │ │ │ -001556c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    };
    .

    In other c │ │ │ │ -00155700: 6173 6573 2077 6520 646f 2077 616e 7420 ases we do want │ │ │ │ -00155710: 746f 2064 6563 6c61 7265 2061 2074 7970 to declare a typ │ │ │ │ -00155720: 6520 7468 6174 2073 6f61 7063 7070 3220 e that soapcpp2 │ │ │ │ -00155730: 7368 6f75 6c64 2063 6f70 7920 696e 746f should copy into │ │ │ │ -00155740: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS │ │ │ │ -00155750: 7475 622e 683c 2f63 6f64 653e 3c2f 656d tub.h for the applic │ │ │ │ -00155770: 6174 696f 6e20 736f 7572 6365 2063 6f64 ation source cod │ │ │ │ -00155780: 652c 2062 7574 2077 6869 6368 2073 686f e, but which sho │ │ │ │ -00155790: 756c 6420 6e6f 7420 6265 2073 6572 6961 uld not be seria │ │ │ │ -001557a0: 6c69 7a61 626c 652e 2057 6520 6361 6e20 lizable. We can │ │ │ │ -001557b0: 7573 6520 3c63 6f64 653e 6578 7465 726e use extern │ │ │ │ -001557c0: 3c2f 636f 6465 3e20 666f 7220 7468 6973 for this │ │ │ │ -001557d0: 206f 7220 7075 7420 7468 6520 6465 636c or put the decl │ │ │ │ -001557e0: 6172 6174 696f 6e20 696e 203c 636f 6465 aration in [ and ] bra │ │ │ │ -00155810: 636b 6574 733a 3c2f 703e 0a3c 6469 7620 ckets:

    .
    [
    .
    │ │ │ │ -00155860: 3c73 7061 6e20 636c 6173 733d 226b 6579 class ns__myBase // base clas │ │ │ │ -001558b0: 7320 6e65 6564 206e 6f74 2062 6520 7365 s need not be se │ │ │ │ -001558c0: 7269 616c 697a 6162 6c65 3c2f 7370 616e rializable
    .
    {.
    ... // members
    .
    │ │ │ │ -00155950: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    ] .
    cla │ │ │ │ -001559a0: 7373 203c 2f73 7061 6e3e 6e73 5f5f 6d79 ss ns__my │ │ │ │ -001559b0: 4465 7269 7665 6420 3a20 6e73 5f5f 6d79 Derived : ns__my │ │ │ │ -001559c0: 4261 7365 203c 2f64 6976 3e0a 3c64 6976 Base
    .
    {< │ │ │ │ -001559e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // members
    .
    }; │ │ │ │ -00155a40: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
    .
    < │ │ │ │ -00155a60: 703e 5765 2063 616e 2075 7365 203c 636f p>We can use [
    and │ │ │ │ -00155a80: 3c63 6f64 653e 5d3c 2f63 6f64 653e 2062 ] b │ │ │ │ -00155a90: 7261 636b 6574 7320 666f 7220 7061 7274 rackets for part │ │ │ │ -00155aa0: 7320 6f66 2074 6865 2063 6f64 652c 2066 s of the code, f │ │ │ │ -00155ab0: 6f72 2065 7861 6d70 6c65 2074 6f20 6d61 or example to ma │ │ │ │ -00155ac0: 6b65 2073 6576 6572 616c 2063 6c61 7373 ke several class │ │ │ │ -00155ad0: 206d 656d 6265 7273 2074 7261 6e73 6965 members transie │ │ │ │ -00155ae0: 6e74 3a3c 2f70 3e0a 3c64 6976 2063 6c61 nt:

    .
    │ │ │ │ -00155b10: 5b20 3c73 7061 6e20 636c 6173 733d 226b [ typedef< │ │ │ │ -00155b30: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int tran │ │ │ │ -00155b60: 7369 656e 7449 6e74 3b20 5d20 3c2f 6469 sientInt; ] .
    class │ │ │ │ -00155ba0: 203c 2f73 7061 6e3e 6e73 5f5f 6d79 436c ns__myCl │ │ │ │ -00155bb0: 6173 7320 3c2f 6469 763e 0a3c 6469 7620 ass
    .
    {.
    int a; │ │ │ │ -00155c10: 203c 7370 616e 2063 6c61 7373 3d22 636f // will b │ │ │ │ -00155c30: 6520 7365 7269 616c 697a 6564 203c 2f73 e serialized
    .
    [ │ │ │ │ -00155c60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int │ │ │ │ -00155ca0: 2062 3b20 3c73 7061 6e20 636c 6173 733d b; // tra │ │ │ │ -00155cc0: 6e73 6965 6e74 206d 656d 6265 7220 3c2f nsient member
    .
    │ │ │ │ -00155cf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char s[256]; // transient │ │ │ │ -00155d40: 206d 656d 6265 7220 3c2f 7370 616e 3e3c member < │ │ │ │ -00155d50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ] .
    ex │ │ │ │ -00155da0: 7465 726e 3c2f 7370 616e 3e20 3c73 7061 tern float d; // t │ │ │ │ -00155df0: 7261 6e73 6965 6e74 2074 7970 6520 666c ransient type fl │ │ │ │ -00155e00: 6f61 7420 616e 6420 6d65 6d62 6572 3c2f oat and member
    .
    │ │ │ │ -00155e30: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *t; │ │ │ │ -00155e70: 2f2f 2077 696c 6c20 6265 2073 6572 6961 // will be seria │ │ │ │ -00155e80: 6c69 7a65 6420 3c2f 7370 616e 3e3c 2f64 lized .
    transien │ │ │ │ -00155eb0: 7449 6e74 202a 6e3b 203c 7370 616e 2063 tInt *n; / │ │ │ │ -00155ed0: 2f20 7472 616e 7369 656e 7420 7479 7065 / transient type │ │ │ │ -00155ee0: 2069 6e74 2061 6e64 206d 656d 6265 7220 int and member │ │ │ │ -00155ef0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00155f10: 2020 5b20 3c2f 6469 763e 0a3c 6469 7620 [
    .
    < │ │ │ │ -00155f30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00155f40: 6f72 6422 3e76 6972 7475 616c 3c2f 7370 ord">virtual vo │ │ │ │ -00155f70: 6964 3c2f 7370 616e 3e20 6d65 7468 6f64 id method │ │ │ │ -00155f80: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char< │ │ │ │ -00155fa0: 2f73 7061 6e3e 2062 7566 5b31 3032 345d /span> buf[1024] │ │ │ │ -00155fb0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // does │ │ │ │ -00155fd0: 206e 6f74 2063 7265 6174 6520 6120 6368 not create a ch │ │ │ │ -00155fe0: 6172 5b31 3032 345d 2073 6572 6961 6c69 ar[1024] seriali │ │ │ │ -00155ff0: 7a65 7220 3c2f 7370 616e 3e3c 2f64 6976 zer
    .
    ]
    . │ │ │ │ -00156020: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

    On │ │ │ │ +001553c0: 6c79 2074 6865 203c 636f 6465 3e6e 616d ly the nam │ │ │ │ +001553d0: 653c 2f63 6f64 653e 206d 656d 6265 7220 e member │ │ │ │ +001553e0: 6973 2073 6572 6961 6c69 7a65 6420 6f66 is serialized of │ │ │ │ +001553f0: 203c 636f 6465 3e6e 735f 5f72 6563 6f72 ns__recor │ │ │ │ +00155400: 643c 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 d.

    .

    Another example │ │ │ │ +00155420: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    extern class std::ostrea │ │ │ │ +001554a0: 6d3b 203c 7370 616e 2063 6c61 7373 3d22 m; // std: │ │ │ │ +001554c0: 3a6f 7374 7265 616d 2063 616e 2623 3339 :ostream can' │ │ │ │ +001554d0: 3b74 2062 6520 7365 7269 616c 697a 6564 ;t be serialized │ │ │ │ +001554e0: 2c20 6275 7420 6e65 6564 2074 6f20 6265 , but need to be │ │ │ │ +001554f0: 2064 6563 6c61 7265 643c 2f73 7061 6e3e declared │ │ │ │ +00155500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c │ │ │ │ +00155530: 6c61 7373 203c 2f73 7061 6e3e 6e73 5f5f lass ns__ │ │ │ │ +00155540: 6d79 436c 6173 7320 3c2f 6469 763e 0a3c myClass
    .< │ │ │ │ +00155550: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00155560: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public< │ │ │ │ +00155580: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    . │ │ │ │ +001555a0: 2020 2020 3c73 7061 6e20 636c 6173 733d virtua │ │ │ │ +001555c0: 6c3c 2f73 7061 6e3e 203c 7370 616e 2063 l void p │ │ │ │ +001555f0: 7269 6e74 2873 7464 3a3a 6f73 7472 6561 rint(std::ostrea │ │ │ │ +00155600: 6d20 2661 6d70 3b73 2920 3c73 7061 6e20 m &s) │ │ │ │ +00155620: 636f 6e73 743c 2f73 7061 6e3e 3b20 3c73 const; // need ostr │ │ │ │ +00155650: 6561 6d20 6865 7265 203c 2f73 7061 6e3e eam here │ │ │ │ +00155660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... │ │ │ │ +00155680: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ +001556a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    In o │ │ │ │ +001556e0: 7468 6572 2063 6173 6573 2077 6520 646f ther cases we do │ │ │ │ +001556f0: 2077 616e 7420 746f 2064 6563 6c61 7265 want to declare │ │ │ │ +00155700: 2061 2074 7970 6520 7468 6174 2073 6f61 a type that soa │ │ │ │ +00155710: 7063 7070 3220 7368 6f75 6c64 2063 6f70 pcpp2 should cop │ │ │ │ +00155720: 7920 696e 746f 203c 656d 3e3c 636f 6465 y into soapStub.h for the │ │ │ │ +00155750: 6170 706c 6963 6174 696f 6e20 736f 7572 application sour │ │ │ │ +00155760: 6365 2063 6f64 652c 2062 7574 2077 6869 ce code, but whi │ │ │ │ +00155770: 6368 2073 686f 756c 6420 6e6f 7420 6265 ch should not be │ │ │ │ +00155780: 2073 6572 6961 6c69 7a61 626c 652e 2057 serializable. W │ │ │ │ +00155790: 6520 6361 6e20 7573 6520 3c63 6f64 653e e can use │ │ │ │ +001557a0: 6578 7465 726e 3c2f 636f 6465 3e20 666f extern fo │ │ │ │ +001557b0: 7220 7468 6973 206f 7220 7075 7420 7468 r this or put th │ │ │ │ +001557c0: 6520 6465 636c 6172 6174 696f 6e20 696e e declaration in │ │ │ │ +001557d0: 203c 636f 6465 3e5b 3c2f 636f 6465 3e20 [ │ │ │ │ +001557e0: 616e 6420 3c63 6f64 653e 5d3c 2f63 6f64 and ] brackets:

    │ │ │ │ +00155800: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    [
    .
    clas │ │ │ │ +00155860: 7320 3c2f 7370 616e 3e6e 735f 5f6d 7942 s ns__myB │ │ │ │ +00155870: 6173 6520 3c73 7061 6e20 636c 6173 733d ase // bas │ │ │ │ +00155890: 6520 636c 6173 7320 6e65 6564 206e 6f74 e class need not │ │ │ │ +001558a0: 2062 6520 7365 7269 616c 697a 6162 6c65 be serializable │ │ │ │ +001558b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001558d0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ +001558f0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mem │ │ │ │ +00155910: 6265 7273 3c2f 7370 616e 3e3c 2f64 6976 bers
    .
    };
    . │ │ │ │ +00155940: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ]
    .
    class │ │ │ │ +00155990: 6e73 5f5f 6d79 4465 7269 7665 6420 3a20 ns__myDerived : │ │ │ │ +001559a0: 6e73 5f5f 6d79 4261 7365 203c 2f64 6976 ns__myBase
    .
    {
    .
    │ │ │ │ +001559e0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // mem │ │ │ │ +00155a00: 6265 7273 3c2f 7370 616e 3e3c 2f64 6976 bers
    .
    };
    .

    We can u │ │ │ │ +00155a50: 7365 203c 636f 6465 3e5b 3c2f 636f 6465 se [ and ] brackets fo │ │ │ │ +00155a80: 7220 7061 7274 7320 6f66 2074 6865 2063 r parts of the c │ │ │ │ +00155a90: 6f64 652c 2066 6f72 2065 7861 6d70 6c65 ode, for example │ │ │ │ +00155aa0: 2074 6f20 6d61 6b65 2073 6576 6572 616c to make several │ │ │ │ +00155ab0: 2063 6c61 7373 206d 656d 6265 7273 2074 class members t │ │ │ │ +00155ac0: 7261 6e73 6965 6e74 3a3c 2f70 3e0a 3c64 ransient:

    .
    [ ty │ │ │ │ +00155b10: 7065 6465 663c 2f73 7061 6e3e 203c 7370 pedef int transientInt; │ │ │ │ +00155b50: 5d20 3c2f 6469 763e 0a3c 6469 7620 636c ]
    .
    class ns │ │ │ │ +00155b90: 5f5f 6d79 436c 6173 7320 3c2f 6469 763e __myClass
    │ │ │ │ +00155ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +00155bd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00155be0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int a; // │ │ │ │ +00155c10: 7769 6c6c 2062 6520 7365 7269 616c 697a will be serializ │ │ │ │ +00155c20: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    │ │ │ │ +00155c30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    [
    . │ │ │ │ +00155c60: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +00155c80: 2f73 7061 6e3e 2062 3b20 3c73 7061 6e20 /span> b; │ │ │ │ +00155ca0: 2f2f 2074 7261 6e73 6965 6e74 206d 656d // transient mem │ │ │ │ +00155cb0: 6265 7220 3c2f 7370 616e 3e3c 2f64 6976 ber
    .
    │ │ │ │ +00155cf0: 6368 6172 3c2f 7370 616e 3e20 735b 3235 char s[25 │ │ │ │ +00155d00: 365d 3b20 3c73 7061 6e20 636c 6173 733d 6]; // tra │ │ │ │ +00155d20: 6e73 6965 6e74 206d 656d 6265 7220 3c2f nsient member
    .
    │ │ │ │ +00155d50: 5d20 203c 2f64 6976 3e0a 3c64 6976 2063 ]
    .
    extern floa │ │ │ │ +00155db0: 743c 2f73 7061 6e3e 2064 3b20 3c73 7061 t d; // transient t │ │ │ │ +00155de0: 7970 6520 666c 6f61 7420 616e 6420 6d65 ype float and me │ │ │ │ +00155df0: 6d62 6572 3c2f 7370 616e 3e3c 2f64 6976 mber
    .
    │ │ │ │ +00155e30: 6368 6172 3c2f 7370 616e 3e20 2a74 3b20 char *t; │ │ │ │ +00155e40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // will be │ │ │ │ +00155e60: 2073 6572 6961 6c69 7a65 6420 3c2f 7370 serialized
    .
    tr │ │ │ │ +00155e90: 616e 7369 656e 7449 6e74 202a 6e3b 203c ansientInt *n; < │ │ │ │ +00155ea0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00155eb0: 656e 7422 3e2f 2f20 7472 616e 7369 656e ent">// transien │ │ │ │ +00155ec0: 7420 7479 7065 2069 6e74 2061 6e64 206d t type int and m │ │ │ │ +00155ed0: 656d 6265 7220 3c2f 7370 616e 3e3c 2f64 ember .
    [
    │ │ │ │ +00155f00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    virtu │ │ │ │ +00155f30: 616c 3c2f 7370 616e 3e20 3c73 7061 6e20 al void │ │ │ │ +00155f60: 6d65 7468 6f64 283c 7370 616e 2063 6c61 method(char buf │ │ │ │ +00155f90: 5b31 3032 345d 293b 203c 7370 616e 2063 [1024]); / │ │ │ │ +00155fb0: 2f20 646f 6573 206e 6f74 2063 7265 6174 / does not creat │ │ │ │ +00155fc0: 6520 6120 6368 6172 5b31 3032 345d 2073 e a char[1024] s │ │ │ │ +00155fd0: 6572 6961 6c69 7a65 7220 3c2f 7370 616e erializer
    .
    ] < │ │ │ │ +00156000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    │ │ │ │ +00156020: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    In th │ │ │ │ +00156040: 6973 2065 7861 6d70 6c65 2c20 3c63 6f64 is example, ns__myClass has three t │ │ │ │ +00156070: 7261 6e73 6965 6e74 206d 656d 6265 7273 ransient members │ │ │ │ +00156080: 3a20 3c63 6f64 653e 623c 2f63 6f64 653e : b │ │ │ │ +00156090: 2c20 3c63 6f64 653e 733c 2f63 6f64 653e , s │ │ │ │ +001560a0: 2c20 616e 6420 3c63 6f64 653e 6e3c 2f63 , and n which will │ │ │ │ +001560c0: 6e6f 7420 6265 2073 6572 6961 6c69 7a65 not be serialize │ │ │ │ +001560d0: 642e 204d 656d 6265 7220 3c63 6f64 653e d. Member │ │ │ │ +001560e0: 6e3c 2f63 6f64 653e 2069 7320 7472 616e n is tran │ │ │ │ +001560f0: 7369 656e 7420 6265 6361 7573 6520 7468 sient because th │ │ │ │ +00156100: 6520 7479 7065 2069 7320 6465 636c 6172 e type is declar │ │ │ │ +00156110: 6564 2077 6974 6869 6e20 6120 7472 616e ed within a tran │ │ │ │ +00156120: 7369 656e 7420 626c 6f63 6b2e 2050 6f69 sient block. Poi │ │ │ │ +00156130: 6e74 6572 732c 2072 6566 6572 656e 6365 nters, reference │ │ │ │ +00156140: 732c 2061 6e64 2061 7272 6179 7320 6f66 s, and arrays of │ │ │ │ +00156150: 2074 7261 6e73 6965 6e74 2074 7970 6573 transient types │ │ │ │ +00156160: 2061 7265 2074 7261 6e73 6965 6e74 2e20 are transient. │ │ │ │ +00156170: 5468 6520 7369 6e67 6c65 2063 6c61 7373 The single class │ │ │ │ +00156180: 206d 6574 686f 6420 6973 2065 6e63 6170 method is encap │ │ │ │ +00156190: 7375 6c61 7465 6420 7769 7468 696e 203c sulated within < │ │ │ │ +001561a0: 636f 6465 3e5b 3c2f 636f 6465 3e20 616e code>[ an │ │ │ │ +001561b0: 6420 3c63 6f64 653e 5d3c 2f63 6f64 653e d ] │ │ │ │ +001561c0: 2074 6f20 7072 6576 656e 7420 736f 6170 to prevent soap │ │ │ │ +001561d0: 6370 7032 2066 726f 6d20 6372 6561 7469 cpp2 from creati │ │ │ │ +001561e0: 6e67 2073 6572 6961 6c69 7a65 7273 2066 ng serializers f │ │ │ │ +001561f0: 6f72 2074 6865 203c 636f 6465 3e63 6861 or the cha │ │ │ │ +00156200: 725b 3130 3234 5d3c 2f63 6f64 653e 2074 r[1024] t │ │ │ │ +00156210: 7970 652e 3c2f 703e 0a3c 703e 5765 2061 ype.

    .

    We a │ │ │ │ +00156220: 6c73 6f20 7573 6520 3c63 6f64 653e 5b3c lso use [< │ │ │ │ +00156230: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and ] bracke │ │ │ │ +00156250: 7473 2074 6f20 696e 7472 6f64 7563 6520 ts to introduce │ │ │ │ +00156260: 6120 7472 616e 7369 656e 7420 696e 7465 a transient inte │ │ │ │ +00156270: 6765 7220 7479 7065 203c 636f 6465 3e74 ger type t │ │ │ │ +00156280: 7261 6e73 6965 6e74 496e 743c 2f63 6f64 ransientInt using a typed │ │ │ │ +001562a0: 6566 2e20 5765 2063 616e 6e6f 7420 7573 ef. We cannot us │ │ │ │ +001562b0: 6520 3c63 6f64 653e 6578 7465 726e 3c2f e extern with typedef │ │ │ │ +001562e0: 6265 6361 7573 6520 7468 6973 2063 6f6e because this con │ │ │ │ +001562f0: 7374 7275 6374 2069 7320 7265 7365 7276 struct is reserv │ │ │ │ +00156300: 6564 2066 6f72 2063 7573 746f 6d20 7365 ed for custom se │ │ │ │ +00156310: 7269 616c 697a 6572 732e 3c2f 703e 0a3c rializers.

    .< │ │ │ │ +00156320: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ +00156340: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ +00156350: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Se │ │ │ │ +00156380: 7269 616c 697a 6174 696f 6e20 2261 7320 rialization "as │ │ │ │ +00156390: 6973 2220 6f66 2076 6f6c 6174 696c 6520 is" of volatile │ │ │ │ +001563a0: 6461 7461 2074 7970 6573 3c2f 6832 3e0a data types

    . │ │ │ │ +001563b0: 3c70 3e54 7970 6573 2064 6563 6c61 7265

    Types declare │ │ │ │ +001563c0: 6420 3c63 6f64 653e 766f 6c61 7469 6c65 d volatile │ │ │ │ +001563d0: 3c2f 636f 6465 3e20 696e 2061 6e20 696e in an in │ │ │ │ +001563e0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f │ │ │ │ +001563f0: 696c 6520 6172 6520 7365 7269 616c 697a ile are serializ │ │ │ │ +00156400: 6162 6c65 2062 7574 206e 6f74 2063 6f70 able but not cop │ │ │ │ +00156410: 6965 6420 6279 2073 6f61 7063 7070 3220 ied by soapcpp2 │ │ │ │ +00156420: 746f 203c 656d 3e3c 636f 6465 3e73 6f61 to soa │ │ │ │ +00156430: 7053 7475 622e 683c 2f63 6f64 653e 3c2f pStub.h. These types │ │ │ │ +00156450: 2061 7265 2074 7970 6963 616c 6c79 206c are typically l │ │ │ │ +00156460: 6962 7261 7279 2074 7970 6573 2074 6861 ibrary types tha │ │ │ │ +00156470: 7420 6172 6520 696e 636c 7564 6564 2069 t are included i │ │ │ │ +00156480: 6e20 7468 6520 736f 7572 6365 2063 6f64 n the source cod │ │ │ │ +00156490: 6520 616e 6420 7368 6f75 6c64 206e 6f74 e and should not │ │ │ │ +001564a0: 2062 6520 7265 6465 6669 6e65 6420 696e be redefined in │ │ │ │ +001564b0: 2074 6865 2061 7070 6c69 6361 7469 6f6e the application │ │ │ │ +001564c0: 2073 6f75 7263 6520 636f 6465 2e20 5765 source code. We │ │ │ │ +001564d0: 2077 616e 7420 746f 2073 6572 6961 6c69 want to seriali │ │ │ │ +001564e0: 7a65 2074 6865 7365 206c 6962 7261 7279 ze these library │ │ │ │ +001564f0: 2074 7970 6573 2022 6173 2069 7322 2077 types "as is" w │ │ │ │ +00156500: 6974 686f 7574 2072 6564 6566 696e 696e ithout redefinin │ │ │ │ +00156510: 6720 7468 656d 2e3c 2f70 3e0a 3c70 3e43 g them.

    .

    C │ │ │ │ +00156520: 6f6e 7369 6465 7220 666f 7220 6578 616d onsider for exam │ │ │ │ +00156530: 706c 6520 3c63 6f64 653e 7374 7275 6374 ple struct │ │ │ │ +00156540: 2074 6d3c 2f63 6f64 653e 2c20 6465 636c tm, decl │ │ │ │ +00156550: 6172 6564 2069 6e20 3c65 6d3e 3c63 6f64 ared in time.h< │ │ │ │ +00156570: 2f65 6d3e 2e20 5468 6520 7374 7275 6374 /em>. The struct │ │ │ │ +00156580: 7572 6520 6d61 7920 6163 7475 616c 6c79 ure may actually │ │ │ │ +00156590: 2076 6172 7920 6265 7477 6565 6e20 706c vary between pl │ │ │ │ +001565a0: 6174 666f 726d 732c 2062 7574 2074 6865 atforms, but the │ │ │ │ +001565b0: 203c 636f 6465 3e74 6d3c 2f63 6f64 653e tm │ │ │ │ +001565c0: 2073 7472 7563 7475 7265 2069 6e63 6c75 structure inclu │ │ │ │ +001565d0: 6465 7320 6174 206c 6561 7374 2074 6865 des at least the │ │ │ │ +001565e0: 2066 6f6c 6c6f 7769 6e67 206d 656d 6265 following membe │ │ │ │ +001565f0: 7273 2061 7320 6465 636c 6172 6564 2069 rs as declared i │ │ │ │ +00156600: 6e20 7468 6520 666f 6c6c 6f77 696e 6720 n the following │ │ │ │ +00156610: 696e 7465 7266 6163 6520 6865 6164 6572 interface header │ │ │ │ +00156620: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp │ │ │ │ +00156630: 7032 3a3c 2f70 3e0a 3c64 6976 2063 6c61 p2:

    .
    │ │ │ │ +00156660: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ +00156680: 7564 6520 266c 743b 7469 6d65 2e68 2667 ude <time.h&g │ │ │ │ +00156690: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ │ +001566a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    volatile │ │ │ │ +001566d0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c st │ │ │ │ +001566f0: 7275 6374 203c 2f73 7061 6e3e 746d 203c ruct tm < │ │ │ │ +00156700: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 00156720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ -00156750: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_sec; │ │ │ │ -00156780: 2020 2020 203c 7370 616e 2063 6c61 7373 /* se │ │ │ │ -001567a0: 636f 6e64 7320 2830 202d 2036 3029 202a conds (0 - 60) * │ │ │ │ -001567b0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ -001567c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -001567f0: 696e 743c 2f73 7061 6e3e 2074 6d5f 6d69 int tm_mi │ │ │ │ -00156800: 6e3b 2020 2020 2020 2020 203c 7370 616e n; /* minutes (0 - │ │ │ │ -00156830: 2035 3929 202a 2f3c 2f73 7061 6e3e 203c 59) */ < │ │ │ │ -00156840: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int │ │ │ │ -00156880: 2074 6d5f 686f 7572 3b20 2020 2020 2020 tm_hour; │ │ │ │ -00156890: 203c 7370 616e 2063 6c61 7373 3d22 636f /* hours │ │ │ │ -001568b0: 2830 202d 2032 3329 202a 2f3c 2f73 7061 (0 - 23) */
    .
    │ │ │ │ -001568e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int tm_mday; │ │ │ │ -00156910: 2020 2020 203c 7370 616e 2063 6c61 7373 /* da │ │ │ │ -00156930: 7920 6f66 206d 6f6e 7468 2028 3120 2d20 y of month (1 - │ │ │ │ -00156940: 3331 2920 2a2f 3c2f 7370 616e 3e20 3c2f 31) */ .
    int │ │ │ │ -00156990: 746d 5f6d 6f6e 3b20 2020 2020 2020 2020 tm_mon; │ │ │ │ -001569a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* month o │ │ │ │ -001569c0: 6620 7965 6172 2028 3020 2d20 3131 2920 f year (0 - 11) │ │ │ │ -001569d0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    │ │ │ │ -001569e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_y │ │ │ │ -00156a20: 6561 723b 2020 2020 2020 2020 3c73 7061 ear; /* year - 1900 │ │ │ │ -00156a50: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */
    .
    int tm_ │ │ │ │ -00156aa0: 7764 6179 3b20 2020 2020 2020 203c 7370 wday; /* day of wee │ │ │ │ -00156ad0: 6b20 2853 756e 6461 7920 3d20 3029 202a k (Sunday = 0) * │ │ │ │ -00156ae0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ -00156af0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -00156b20: 696e 743c 2f73 7061 6e3e 2074 6d5f 7964 int tm_yd │ │ │ │ -00156b30: 6179 3b20 2020 2020 2020 203c 7370 616e ay; /* day of year │ │ │ │ -00156b60: 2830 202d 2033 3635 2920 2a2f 3c2f 7370 (0 - 365) */
    .
    │ │ │ │ -00156b90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_isdst; │ │ │ │ -00156bc0: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* i │ │ │ │ -00156be0: 7320 7375 6d6d 6572 2074 696d 6520 696e s summer time in │ │ │ │ -00156bf0: 2065 6666 6563 743f 202a 2f3c 2f73 7061 effect? */
    .
    │ │ │ │ -00156c20: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *tm_zone; │ │ │ │ -00156c50: 2020 2020 2020 203c 7370 616e 2063 6c61 /* │ │ │ │ -00156c70: 6162 6272 6576 6961 7469 6f6e 206f 6620 abbreviation of │ │ │ │ -00156c80: 7469 6d65 7a6f 6e65 206e 616d 6520 2a2f timezone name */ │ │ │ │ -00156c90: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00156ca0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00156cb0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > l │ │ │ │ -00156cd0: 6f6e 673c 2f73 7061 6e3e 2074 6d5f 676d ong tm_gm │ │ │ │ -00156ce0: 746f 6666 3b20 2020 2020 203c 7370 616e toff; /* offset from │ │ │ │ -00156d10: 5554 4320 696e 2073 6563 6f6e 6473 202a UTC in seconds * │ │ │ │ -00156d20: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ -00156d30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

    It is als │ │ │ │ -001572e0: 6f20 706f 7373 6962 6c65 2074 6f20 7365 o possible to se │ │ │ │ -001572f0: 7269 616c 697a 6520 7468 6520 3c63 6f64 rialize the tm memb │ │ │ │ -00157310: 6572 7320 6173 2058 4d4c 2061 7474 7269 ers as XML attri │ │ │ │ -00157320: 6275 7465 7320 6279 2064 6563 6c61 7269 butes by declari │ │ │ │ -00157330: 6e67 2074 6865 206d 656d 6265 7273 2061 ng the members a │ │ │ │ -00157340: 7320 6174 7472 6962 7574 6573 2077 6974 s attributes wit │ │ │ │ -00157350: 6820 7468 6520 3c63 6f64 653e 403c 2f63 h the @ qualifier, │ │ │ │ -00157370: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section How to de │ │ │ │ -001573b0: 636c 6172 6520 584d 4c20 6174 7472 6962 clare XML attrib │ │ │ │ -001573c0: 7574 6573 3c2f 613e 202e 3c2f 703e 0a3c utes .

    .< │ │ │ │ -001573d0: 703e 4966 2079 6f75 2077 616e 7420 746f p>If you want to │ │ │ │ -001573e0: 2070 726f 6475 6365 2061 2073 6368 656d produce a schem │ │ │ │ -001573f0: 6120 6669 6c65 2c20 7361 7920 3c65 6d3e a file, say │ │ │ │ -00157400: 3c63 6f64 653e 7469 6d65 2e78 7364 3c2f time.xsd, that │ │ │ │ -00157420: 2064 6566 696e 6573 2061 6e20 584d 4c20 defines an XML │ │ │ │ -00157430: 7363 6865 6d61 2061 6e64 206e 616d 6573 schema and names │ │ │ │ -00157440: 7061 6365 2066 6f72 2074 6865 203c 636f pace for the tm str │ │ │ │ -00157460: 7563 742c 2079 6f75 2063 616e 2061 6464 uct, you can add │ │ │ │ -00157470: 2061 203c 636f 6465 3e74 7970 6564 6566 a typedef │ │ │ │ -00157480: 3c2f 636f 6465 3e20 6465 636c 6172 6174 declarat │ │ │ │ -00157490: 696f 6e20 746f 2074 6865 2068 6561 6465 ion to the heade │ │ │ │ -001574a0: 7220 6669 6c65 3a3c 2f70 3e0a 3c64 6976 r file:

    .
    # │ │ │ │ -001574f0: 696e 636c 7564 6520 266c 743b 7469 6d65 include <time │ │ │ │ -00157500: 2e68 2667 743b 3c2f 7370 616e 3e3c 2f64 .h>.
    vola │ │ │ │ -00157540: 7469 6c65 3c2f 7370 616e 3e20 3c73 7061 tile struct │ │ │ │ -00157570: 746d 3c2f 6469 763e 0a3c 6469 7620 636c tm
    .
    {.
    ... // see above< │ │ │ │ -001575d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .} │ │ │ │ -001575f0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00157620: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef < │ │ │ │ -00157630: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00157640: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct tm time__stru │ │ │ │ -00157660: 6374 5f74 6d3b 3c2f 6469 763e 0a3c 2f64 ct_tm;
    .

    or simply │ │ │ │ -00157690: 2075 7365 2063 6f6c 6f6e 206e 6f74 6174 use colon notat │ │ │ │ -001576a0: 696f 6e20 7369 6e63 6520 7765 206b 6565 ion since we kee │ │ │ │ -001576b0: 7020 7468 6520 3c63 6f64 653e 746d 3c2f p the tm name:

    . │ │ │ │ -001576d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include < │ │ │ │ -00157720: 7469 6d65 2e68 2667 743b 3c2f 7370 616e time.h>
    .
    │ │ │ │ -00157760: 766f 6c61 7469 6c65 3c2f 7370 616e 3e20 volatile │ │ │ │ -00157770: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct time:tm │ │ │ │ +00156750: 696e 743c 2f73 7061 6e3e 2074 6d5f 7365 int tm_se │ │ │ │ +00156760: 633b 2020 2020 2020 2020 203c 7370 616e c; /* seconds (0 - │ │ │ │ +00156790: 2036 3029 202a 2f3c 2f73 7061 6e3e 203c 60) */ < │ │ │ │ +001567a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int │ │ │ │ +001567e0: 2074 6d5f 6d69 6e3b 2020 2020 2020 2020 tm_min; │ │ │ │ +001567f0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* minute │ │ │ │ +00156810: 7320 2830 202d 2035 3929 202a 2f3c 2f73 s (0 - 59) */
    .
    │ │ │ │ +00156840: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ +00156860: 2f73 7061 6e3e 2074 6d5f 686f 7572 3b20 /span> tm_hour; │ │ │ │ +00156870: 2020 2020 2020 203c 7370 616e 2063 6c61 /* │ │ │ │ +00156890: 686f 7572 7320 2830 202d 2032 3329 202a hours (0 - 23) * │ │ │ │ +001568a0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ +001568b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +001568e0: 696e 743c 2f73 7061 6e3e 2074 6d5f 6d64 int tm_md │ │ │ │ +001568f0: 6179 3b20 2020 2020 2020 203c 7370 616e ay; /* day of month │ │ │ │ +00156920: 2028 3120 2d20 3331 2920 2a2f 3c2f 7370 (1 - 31) */
    .
    │ │ │ │ +00156950: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int tm_mon; │ │ │ │ +00156980: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* m │ │ │ │ +001569a0: 6f6e 7468 206f 6620 7965 6172 2028 3020 onth of year (0 │ │ │ │ +001569b0: 2d20 3131 2920 2a2f 3c2f 7370 616e 3e20 - 11) */ │ │ │ │ +001569c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int tm_year; │ │ │ │ +00156a10: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* year │ │ │ │ +00156a30: 2d20 3139 3030 202a 2f3c 2f73 7061 6e3e - 1900 */ │ │ │ │ +00156a40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int tm_wday; │ │ │ │ +00156a90: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* day │ │ │ │ +00156ab0: 6f66 2077 6565 6b20 2853 756e 6461 7920 of week (Sunday │ │ │ │ +00156ac0: 3d20 3029 202a 2f3c 2f73 7061 6e3e 203c = 0) */ < │ │ │ │ +00156ad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int │ │ │ │ +00156b10: 2074 6d5f 7964 6179 3b20 2020 2020 2020 tm_yday; │ │ │ │ +00156b20: 203c 7370 616e 2063 6c61 7373 3d22 636f /* day of │ │ │ │ +00156b40: 2079 6561 7220 2830 202d 2033 3635 2920 year (0 - 365) │ │ │ │ +00156b50: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    │ │ │ │ +00156b60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int tm_i │ │ │ │ +00156ba0: 7364 7374 3b20 2020 2020 2020 3c73 7061 sdst; /* is summer t │ │ │ │ +00156bd0: 696d 6520 696e 2065 6666 6563 743f 202a ime in effect? * │ │ │ │ +00156be0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ +00156bf0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +00156c20: 6368 6172 3c2f 7370 616e 3e20 2a74 6d5f char *tm_ │ │ │ │ +00156c30: 7a6f 6e65 3b20 2020 2020 2020 203c 7370 zone; /* abbreviati │ │ │ │ +00156c60: 6f6e 206f 6620 7469 6d65 7a6f 6e65 206e on of timezone n │ │ │ │ +00156c70: 616d 6520 2a2f 3c2f 7370 616e 3e20 3c2f ame */ .
    long │ │ │ │ +00156cc0: 2074 6d5f 676d 746f 6666 3b20 2020 2020 tm_gmtoff; │ │ │ │ +00156cd0: 203c 7370 616e 2063 6c61 7373 3d22 636f /* offset │ │ │ │ +00156cf0: 2066 726f 6d20 5554 4320 696e 2073 6563 from UTC in sec │ │ │ │ +00156d00: 6f6e 6473 202a 2f3c 2f73 7061 6e3e 203c onds */ < │ │ │ │ +00156d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    };
    │ │ │ │ +00156d30: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    By de │ │ │ │ +00156d50: 636c 6172 696e 6720 7374 7275 6374 203c claring struct < │ │ │ │ +00156d60: 636f 6465 3e74 6d3c 2f63 6f64 653e 2076 code>tm v │ │ │ │ +00156d70: 6f6c 6174 696c 652c 2073 6f61 7063 7070 olatile, soapcpp │ │ │ │ +00156d80: 3220 646f 6573 206e 6f74 2072 6564 6566 2 does not redef │ │ │ │ +00156d90: 696e 6520 6974 2069 6e20 7468 6520 6f75 ine it in the ou │ │ │ │ +00156da0: 7470 7574 2073 6f75 7263 6520 636f 6465 tput source code │ │ │ │ +00156db0: 2e20 5468 6520 3c63 6f64 653e 2369 6e63 . The #inc │ │ │ │ +00156dc0: 6c75 6465 2026 6c74 3b74 696d 652e 6826 lude <time.h& │ │ │ │ +00156dd0: 6774 3b3c 2f63 6f64 653e 2069 7320 636f gt; is co │ │ │ │ +00156de0: 7069 6564 2074 6f20 7468 6520 736f 7572 pied to the sour │ │ │ │ +00156df0: 6365 2063 6f64 6520 6f75 7470 7574 2e20 ce code output. │ │ │ │ +00156e00: 5765 2063 616e 206e 6f77 2073 6572 6961 We can now seria │ │ │ │ +00156e10: 6c69 7a65 2074 6865 203c 636f 6465 3e74 lize the t │ │ │ │ +00156e20: 6d3c 2f63 6f64 653e 2073 7472 7563 7475 m structu │ │ │ │ +00156e30: 7265 2e20 5468 6520 666f 6c6c 6f77 696e re. The followin │ │ │ │ +00156e40: 6720 6578 616d 706c 6520 7365 7269 616c g example serial │ │ │ │ +00156e50: 697a 6573 2074 6865 206c 6f63 616c 2074 izes the local t │ │ │ │ +00156e60: 696d 6520 7374 6f72 6564 2069 6e20 6120 ime stored in a │ │ │ │ +00156e70: 3c63 6f64 653e 746d 3c2f 636f 6465 3e20 tm │ │ │ │ +00156e80: 7374 7275 6374 7572 6520 746f 2073 7464 structure to std │ │ │ │ +00156e90: 6f75 743a 3c2f 703e 0a3c 6469 7620 636c out:

    .
    < │ │ │ │ +00156eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00156ec0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap │ │ │ │ +00156f10: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +00156f40: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa │ │ │ │ +00156fa0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); .
    time_t T = │ │ │ │ +00156fd0: 2074 696d 6528 4e55 4c4c 293b 203c 2f64 time(NULL); .
    stru │ │ │ │ +00157010: 6374 203c 2f73 7061 6e3e 746d 202a 7420 ct tm *t │ │ │ │ +00157020: 3d20 6c6f 6361 6c74 696d 6528 2661 6d70 = localtime(& │ │ │ │ +00157030: 3b54 293b 203c 2f64 6976 3e0a 3c64 6976 ;T);
    .
    so │ │ │ │ +00157050: 6170 5f77 7269 7465 5f74 6d28 3c61 2063 ap_write_tm(soap, t); │ │ │ │ +00157090: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s │ │ │ │ +00157100: 6f61 705f 6465 7374 726f 793c 2f61 3e28 oap_destroy( │ │ │ │ +00157110: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +00157140: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ +001571b0: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); < │ │ │ │ +001571f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

    It │ │ │ │ +001572c0: 6973 2061 6c73 6f20 706f 7373 6962 6c65 is also possible │ │ │ │ +001572d0: 2074 6f20 7365 7269 616c 697a 6520 7468 to serialize th │ │ │ │ +001572e0: 6520 3c63 6f64 653e 746d 3c2f 636f 6465 e tm members as XML │ │ │ │ +00157300: 2061 7474 7269 6275 7465 7320 6279 2064 attributes by d │ │ │ │ +00157310: 6563 6c61 7269 6e67 2074 6865 206d 656d eclaring the mem │ │ │ │ +00157320: 6265 7273 2061 7320 6174 7472 6962 7574 bers as attribut │ │ │ │ +00157330: 6573 2077 6974 6820 7468 6520 3c63 6f64 es with the @ quali │ │ │ │ +00157350: 6669 6572 2c20 7365 6520 5365 6374 696f fier, see Sectio │ │ │ │ +00157360: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How │ │ │ │ +00157390: 2074 6f20 6465 636c 6172 6520 584d 4c20 to declare XML │ │ │ │ +001573a0: 6174 7472 6962 7574 6573 3c2f 613e 202e attributes . │ │ │ │ +001573b0: 3c2f 703e 0a3c 703e 4966 2079 6f75 2077

    .

    If you w │ │ │ │ +001573c0: 616e 7420 746f 2070 726f 6475 6365 2061 ant to produce a │ │ │ │ +001573d0: 2073 6368 656d 6120 6669 6c65 2c20 7361 schema file, sa │ │ │ │ +001573e0: 7920 3c65 6d3e 3c63 6f64 653e 7469 6d65 y time │ │ │ │ +001573f0: 2e78 7364 3c2f 636f 6465 3e3c 2f65 6d3e .xsd │ │ │ │ +00157400: 2c20 7468 6174 2064 6566 696e 6573 2061 , that defines a │ │ │ │ +00157410: 6e20 584d 4c20 7363 6865 6d61 2061 6e64 n XML schema and │ │ │ │ +00157420: 206e 616d 6573 7061 6365 2066 6f72 2074 namespace for t │ │ │ │ +00157430: 6865 203c 636f 6465 3e74 6d3c 2f63 6f64 he tm struct, you c │ │ │ │ +00157450: 616e 2061 6464 2061 203c 636f 6465 3e74 an add a t │ │ │ │ +00157460: 7970 6564 6566 3c2f 636f 6465 3e20 6465 ypedef de │ │ │ │ +00157470: 636c 6172 6174 696f 6e20 746f 2074 6865 claration to the │ │ │ │ +00157480: 2068 6561 6465 7220 6669 6c65 3a3c 2f70 header file:

    .
    #include &l │ │ │ │ +001574e0: 743b 7469 6d65 2e68 2667 743b 3c2f 7370 t;time.h>
    .
    volatile struct < │ │ │ │ +00157550: 2f73 7061 6e3e 746d 3c2f 6469 763e 0a3c /span>tm
    .< │ │ │ │ +00157560: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00157570: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    . │ │ │ │ +00157590: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // see │ │ │ │ +001575b0: 6162 6f76 653c 2f73 7061 6e3e 3c2f 6469 above.
    };
    . │ │ │ │ +001575f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef
    struc │ │ │ │ +00157630: 7420 3c2f 7370 616e 3e74 6d20 7469 6d65 t tm time │ │ │ │ +00157640: 5f5f 7374 7275 6374 5f74 6d3b 3c2f 6469 __struct_tm;.

    or │ │ │ │ +00157670: 7369 6d70 6c79 2075 7365 2063 6f6c 6f6e simply use colon │ │ │ │ +00157680: 206e 6f74 6174 696f 6e20 7369 6e63 6520 notation since │ │ │ │ +00157690: 7765 206b 6565 7020 7468 6520 3c63 6f64 we keep the tm name │ │ │ │ +001576b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ │ │ │ │ +00157700: 6520 266c 743b 7469 6d65 2e68 2667 743b e <time.h> │ │ │ │ +00157710: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00157730: 3c73 7061 6e20 636c 6173 733d 226b 6579 volatile stru │ │ │ │ +00157770: 6374 203c 2f73 7061 6e3e 7469 6d65 3a74 ct time:t │ │ │ │ +00157780: 6d20 3c2f 6469 763e 0a3c 6469 7620 636c m
    .
    {.
    {
    . │ │ │ │ -001577d0: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -001577f0: 3c2f 7370 616e 3e20 746d 5f73 6563 3b20 tm_sec; │ │ │ │ -00157800: 2020 2020 2020 2020 3c73 7061 6e20 636c /* │ │ │ │ -00157820: 2073 6563 6f6e 6473 2028 3020 2d20 3630 seconds (0 - 60 │ │ │ │ -00157830: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    int tm │ │ │ │ -00157880: 5f6d 696e 3b20 2020 2020 2020 2020 3c73 _min; /* minutes ( │ │ │ │ -001578b0: 3020 2d20 3539 2920 2a2f 3c2f 7370 616e 0 - 59) */
    .
    < │ │ │ │ -001578e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001578f0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int tm_hour; │ │ │ │ -00157910: 2020 2020 3c73 7061 6e20 636c 6173 733d /* hou │ │ │ │ -00157930: 7273 2028 3020 2d20 3233 2920 2a2f 3c2f rs (0 - 23) */
    . │ │ │ │ -00157960: 2020 203c 7370 616e 2063 6c61 7373 3d22 int │ │ │ │ -00157980: 3c2f 7370 616e 3e20 746d 5f6d 6461 793b tm_mday; │ │ │ │ -00157990: 2020 2020 2020 2020 3c73 7061 6e20 636c /* │ │ │ │ -001579b0: 2064 6179 206f 6620 6d6f 6e74 6820 2831 day of month (1 │ │ │ │ -001579c0: 202d 2033 3129 202a 2f3c 2f73 7061 6e3e - 31) */ │ │ │ │ -001579d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int tm_mon; │ │ │ │ -00157a20: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* mont │ │ │ │ -00157a40: 6820 6f66 2079 6561 7220 2830 202d 2031 h of year (0 - 1 │ │ │ │ -00157a50: 3129 202a 2f3c 2f73 7061 6e3e 203c 2f64 1) */ .
    int t │ │ │ │ -00157aa0: 6d5f 7965 6172 3b20 2020 2020 2020 203c m_year; < │ │ │ │ -00157ab0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00157ac0: 656e 7422 3e2f 2a20 7965 6172 202d 2031 ent">/* year - 1 │ │ │ │ -00157ad0: 3930 3020 2a2f 3c2f 7370 616e 3e20 3c2f 900 */ .
    int │ │ │ │ -00157b20: 746d 5f77 6461 793b 2020 2020 2020 2020 tm_wday; │ │ │ │ -00157b30: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* day of │ │ │ │ -00157b50: 7765 656b 2028 5375 6e64 6179 203d 2030 week (Sunday = 0 │ │ │ │ -00157b60: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    int tm │ │ │ │ -00157bb0: 5f79 6461 793b 2020 2020 2020 2020 3c73 _yday; /* day of ye │ │ │ │ -00157be0: 6172 2028 3020 2d20 3336 3529 202a 2f3c ar (0 - 365) */< │ │ │ │ -00157bf0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -00157c10: 2020 2020 3c73 7061 6e20 636c 6173 733d in │ │ │ │ -00157c30: 743c 2f73 7061 6e3e 2074 6d5f 6973 6473 t tm_isds │ │ │ │ -00157c40: 743b 2020 2020 2020 203c 7370 616e 2063 t; / │ │ │ │ -00157c60: 2a20 6973 2073 756d 6d65 7220 7469 6d65 * is summer time │ │ │ │ -00157c70: 2069 6e20 6566 6665 6374 3f20 2a2f 3c2f in effect? */
    . │ │ │ │ -00157ca0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ -00157cc0: 723c 2f73 7061 6e3e 202a 746d 5f7a 6f6e r *tm_zon │ │ │ │ -00157cd0: 653b 2020 2020 2020 3c73 7061 6e20 636c e; /* │ │ │ │ -00157cf0: 2061 6262 7265 7669 6174 696f 6e20 6f66 abbreviation of │ │ │ │ -00157d00: 2074 696d 657a 6f6e 6520 6e61 6d65 202a timezone name * │ │ │ │ -00157d10: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ -00157d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -00157d50: 6c6f 6e67 3c2f 7370 616e 3e20 746d 5f67 long tm_g │ │ │ │ -00157d60: 6d74 6f66 663b 2020 2020 203c 7370 616e mtoff; /* offset from │ │ │ │ -00157d90: 5554 4320 696e 2073 6563 6f6e 6473 202a UTC in seconds * │ │ │ │ -00157da0: 2f3c 2f73 7061 6e3e 203c 2f64 6976 3e0a /
    . │ │ │ │ -00157db0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    };
    .

    We us │ │ │ │ +00157dd0: 6564 2074 6865 2074 7970 6564 6566 206e ed the typedef n │ │ │ │ +00157de0: 616d 6520 3c63 6f64 653e 7469 6d65 5f5f ame time__ │ │ │ │ +00157df0: 7374 7275 6374 5f74 6d3c 2f63 6f64 653e struct_tm │ │ │ │ +00157e00: 2072 6174 6865 7220 7468 616e 203c 636f rather than time__tm, because a sc │ │ │ │ +00157e30: 6865 6d61 206e 616d 6520 636c 6173 6820 hema name clash │ │ │ │ +00157e40: 7769 6c6c 206f 6363 7572 2066 6f72 2074 will occur for t │ │ │ │ +00157e50: 6865 2066 6972 7374 2065 7861 6d70 6c65 he first example │ │ │ │ +00157e60: 2061 626f 7665 2074 6861 7420 6861 7320 above that has │ │ │ │ +00157e70: 3c63 6f64 653e 746d 3c2f 636f 6465 3e20 tm │ │ │ │ +00157e80: 616c 7265 6164 7920 6465 636c 6172 6564 already declared │ │ │ │ +00157e90: 2061 7320 7365 7269 616c 697a 6162 6c65 as serializable │ │ │ │ +00157ea0: 2074 7970 6520 696e 2074 6865 2073 6368 type in the sch │ │ │ │ +00157eb0: 656d 6120 6f66 2074 6865 2067 656e 6572 ema of the gener │ │ │ │ +00157ec0: 6174 6564 2057 5344 4c2e 2054 6865 2073 ated WSDL. The s │ │ │ │ +00157ed0: 6563 6f6e 6420 6578 616d 706c 6520 7769 econd example wi │ │ │ │ +00157ee0: 7468 2074 6865 2063 6f6c 6f6e 206e 6f74 th the colon not │ │ │ │ +00157ef0: 6174 696f 6e20 6176 6f69 6473 2074 6869 ation avoids thi │ │ │ │ +00157f00: 7320 616c 746f 6765 7468 6572 2e3c 2f70 s altogether.

    .

    .... Back to ta │ │ │ │ +00157f30: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +00157f40: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    .H │ │ │ │ +00157f70: 6f77 2074 6f20 6465 636c 6172 6520 6375 ow to declare cu │ │ │ │ +00157f80: 7374 6f6d 2073 6572 6961 6c69 7a65 7273 stom serializers │ │ │ │ +00157f90: 2061 6e64 2064 6573 6572 6961 6c69 7a65 and deserialize │ │ │ │ +00157fa0: 7273 3c2f 6832 3e0a 3c70 3e59 6f75 2063 rs

    .

    You c │ │ │ │ +00157fb0: 616e 2069 6d70 6c65 6d65 6e74 2079 6f75 an implement you │ │ │ │ +00157fc0: 7220 6f77 6e20 6375 7374 6f6d 2073 6572 r own custom ser │ │ │ │ +00157fd0: 6961 6c69 7a65 7273 2066 6f72 2064 6174 ializers for dat │ │ │ │ +00157fe0: 6120 7479 7065 732e 2041 2063 7573 746f a types. A custo │ │ │ │ +00157ff0: 6d20 7365 7269 616c 697a 6572 2069 7320 m serializer is │ │ │ │ +00158000: 6465 636c 6172 6564 2069 6e20 616e 2069 declared in an i │ │ │ │ +00158010: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header │ │ │ │ +00158020: 6669 6c65 2066 6f72 2073 6f61 7063 7070 file for soapcpp │ │ │ │ +00158030: 3220 7573 696e 6720 7468 6520 7061 6972 2 using the pair │ │ │ │ +00158040: 206f 6620 6b65 7977 6f72 6473 203c 636f of keywords extern typede │ │ │ │ +00158060: 663c 2f63 6f64 653e 2e20 466f 7220 6578 f. For ex │ │ │ │ +00158070: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

    .
    extern< │ │ │ │ +001580c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> typ │ │ │ │ +001580e0: 6564 6566 3c2f 7370 616e 3e20 3c73 7061 edef char *MyData;
    .
    struct │ │ │ │ +00158150: 203c 2f73 7061 6e3e 5361 6d70 6c65 203c Sample < │ │ │ │ +00158160: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 00158180: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ -001581b0: 4d79 4461 7461 2073 3b20 3c73 7061 6e20 MyData s; │ │ │ │ -001581d0: 2f2f 2075 7365 2063 7573 746f 6d20 7365 // use custom se │ │ │ │ -001581e0: 7269 616c 697a 6572 2066 6f72 2074 6869 rializer for thi │ │ │ │ -001581f0: 7320 6d65 6d62 6572 203c 2f73 7061 6e3e s member │ │ │ │ -00158200: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    char *t; // │ │ │ │ -00158260: 2075 7365 2061 7574 6f2d 6765 6e65 7261 use auto-genera │ │ │ │ -00158270: 7465 6420 7365 7269 616c 697a 6572 3c2f ted serializer
    .
    }; │ │ │ │ -001582a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    Then provide th │ │ │ │ -001582d0: 6520 666f 6c6c 6f77 696e 6720 6675 6e63 e following func │ │ │ │ -001582e0: 7469 6f6e 7320 666f 7220 6561 6368 203c tions for each < │ │ │ │ -001582f0: 636f 6465 3e65 7874 6572 6e20 7479 7065 code>extern type │ │ │ │ -00158300: 6465 663c 2f63 6f64 653e 2064 6563 6c61 def decla │ │ │ │ -00158310: 7265 7320 7479 7065 203c 636f 6465 3e54 res type T │ │ │ │ -00158320: 3c2f 636f 6465 3e3a 3c2f 703e 0a3c 6469 :

    .
    i │ │ │ │ -00158370: 6e74 3c2f 7370 616e 3e20 736f 6170 5f73 nt soap_s │ │ │ │ -00158380: 6572 6961 6c69 7a65 5f54 283c 7370 616e erialize_T(struct < │ │ │ │ -001583b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001583c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001583d0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -001583e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -00158410: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const T *a);
    │ │ │ │ -00158440: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    voi │ │ │ │ -00158470: 643c 2f73 7061 6e3e 2073 6f61 705f 6465 d soap_de │ │ │ │ -00158480: 6661 756c 745f 5428 3c73 7061 6e20 636c fault_T(st │ │ │ │ -001584a0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, T │ │ │ │ -00158510: 2a61 293b 3c2f 6469 763e 0a3c 6469 7620 *a);
    .
    int soap_out_T(struct │ │ │ │ -00158580: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -001585b0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, const │ │ │ │ -00158620: 6368 6172 3c2f 7370 616e 3e20 2a74 6167 char *tag │ │ │ │ -00158630: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int< │ │ │ │ -00158650: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> id, const T │ │ │ │ -001586a0: 202a 612c 203c 7370 616e 2063 6c61 7373 *a, const │ │ │ │ -001586c0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *t │ │ │ │ -001586f0: 7970 6529 3b3c 2f64 6976 3e0a 3c64 6976 ype);
    .
    T │ │ │ │ -00158710: 2a73 6f61 705f 696e 5f54 283c 7370 616e *soap_in_T(struct < │ │ │ │ -00158740: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00158750: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00158760: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -00158770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -001587a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ -001587e0: 6172 3c2f 7370 616e 3e20 2a74 6167 2c20 ar *tag, │ │ │ │ -001587f0: 5420 2a61 2c20 3c73 7061 6e20 636c 6173 T *a, cons │ │ │ │ -00158810: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ -00158840: 7479 7065 293b 3c2f 6469 763e 0a3c 2f64 type);
    .

    The funct │ │ │ │ -00158870: 696f 6e20 7072 6f74 6f74 7970 6573 206f ion prototypes o │ │ │ │ -00158880: 6620 7468 6573 6520 6675 6e63 7469 6f6e f these function │ │ │ │ -00158890: 7320 6361 6e20 6265 2066 6f75 6e64 2069 s can be found i │ │ │ │ -001588a0: 6e20 7468 6520 736f 6170 6370 7032 2d67 n the soapcpp2-g │ │ │ │ -001588b0: 656e 6572 6174 6564 203c 656d 3e3c 636f enerated soapH.h file.

    │ │ │ │ -001588e0: 0a3c 703e 466f 7220 6578 616d 706c 652c .

    For example, │ │ │ │ -001588f0: 2074 6865 2073 6572 6961 6c69 7a61 7469 the serializati │ │ │ │ -00158900: 6f6e 206f 6620 3c63 6f64 653e 4d79 4461 on of MyDa │ │ │ │ -00158910: 7461 3c2f 636f 6465 3e20 6361 6e20 6265 ta can be │ │ │ │ -00158920: 2064 6f6e 6520 7769 7468 2074 6865 2066 done with the f │ │ │ │ -00158930: 6f6c 6c6f 7769 6e67 2063 6f64 653a 3c2f ollowing code:.

    int │ │ │ │ -00158990: 736f 6170 5f73 6572 6961 6c69 7a65 5f4d soap_serialize_M │ │ │ │ -001589a0: 7944 6174 6128 3c73 7061 6e20 636c 6173 yData(stru │ │ │ │ -001589c0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, MyDa │ │ │ │ -00158a30: 7461 203c 7370 616e 2063 6c61 7373 3d22 ta const*a)
    . │ │ │ │ +00158190: 223e 2020 2020 4d79 4461 7461 2073 3b20 "> MyData s; │ │ │ │ +001581a0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // use cus │ │ │ │ +001581c0: 746f 6d20 7365 7269 616c 697a 6572 2066 tom serializer f │ │ │ │ +001581d0: 6f72 2074 6869 7320 6d65 6d62 6572 203c or this member < │ │ │ │ +001581e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +00158200: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ +00158220: 723c 2f73 7061 6e3e 202a 743b 2020 3c73 r *t; // use auto- │ │ │ │ +00158250: 6765 6e65 7261 7465 6420 7365 7269 616c generated serial │ │ │ │ +00158260: 697a 6572 3c2f 7370 616e 3e3c 2f64 6976 izer
    .
    };
    .

    Then prov │ │ │ │ +001582b0: 6964 6520 7468 6520 666f 6c6c 6f77 696e ide the followin │ │ │ │ +001582c0: 6720 6675 6e63 7469 6f6e 7320 666f 7220 g functions for │ │ │ │ +001582d0: 6561 6368 203c 636f 6465 3e65 7874 6572 each exter │ │ │ │ +001582e0: 6e20 7479 7065 6465 663c 2f63 6f64 653e n typedef │ │ │ │ +001582f0: 2064 6563 6c61 7265 7320 7479 7065 203c declares type < │ │ │ │ +00158300: 636f 6465 3e54 3c2f 636f 6465 3e3a 3c2f code>T:.

    int │ │ │ │ +00158360: 736f 6170 5f73 6572 6961 6c69 7a65 5f54 soap_serialize_T │ │ │ │ +00158370: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ +001583c0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +001583f0: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con │ │ │ │ +00158410: 7374 3c2f 7370 616e 3e20 5420 2a61 293b st T *a); │ │ │ │ +00158420: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    void s │ │ │ │ +00158460: 6f61 705f 6465 6661 756c 745f 5428 3c73 oap_default_T(struct soap *soap, T *a);
    │ │ │ │ +00158500: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    T *soap_in_T │ │ │ │ +00158700: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ +00158750: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +00158780: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, con │ │ │ │ +001587a0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +001587d0: 2a74 6167 2c20 5420 2a61 2c20 3c73 7061 *tag, T *a, const < │ │ │ │ +00158800: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00158810: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *type);.

    The │ │ │ │ +00158850: 2066 756e 6374 696f 6e20 7072 6f74 6f74 function protot │ │ │ │ +00158860: 7970 6573 206f 6620 7468 6573 6520 6675 ypes of these fu │ │ │ │ +00158870: 6e63 7469 6f6e 7320 6361 6e20 6265 2066 nctions can be f │ │ │ │ +00158880: 6f75 6e64 2069 6e20 7468 6520 736f 6170 ound in the soap │ │ │ │ +00158890: 6370 7032 2d67 656e 6572 6174 6564 203c cpp2-generated < │ │ │ │ +001588a0: 656d 3e3c 636f 6465 3e73 6f61 7048 2e68 em>soapH.h │ │ │ │ +001588b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil │ │ │ │ +001588c0: 652e 3c2f 703e 0a3c 703e 466f 7220 6578 e.

    .

    For ex │ │ │ │ +001588d0: 616d 706c 652c 2074 6865 2073 6572 6961 ample, the seria │ │ │ │ +001588e0: 6c69 7a61 7469 6f6e 206f 6620 3c63 6f64 lization of MyData │ │ │ │ +00158900: 6361 6e20 6265 2064 6f6e 6520 7769 7468 can be done with │ │ │ │ +00158910: 2074 6865 2066 6f6c 6c6f 7769 6e67 2063 the following c │ │ │ │ +00158920: 6f64 653a 3c2f 703e 0a3c 6469 7620 636c ode:

    .
    < │ │ │ │ +00158940: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00158950: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int soap_seria │ │ │ │ +00158980: 6c69 7a65 5f4d 7944 6174 6128 3c73 7061 lize_MyData(struct │ │ │ │ +001589b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +001589e0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +00158a10: 2c20 4d79 4461 7461 203c 7370 616e 2063 , MyData c │ │ │ │ +00158a30: 6f6e 7374 3c2f 7370 616e 3e2a 6129 203c onst*a) < │ │ │ │ +00158a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 00158a60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    // no need t │ │ │ │ -00158ab0: 6f20 6d61 726b 2074 6869 7320 6e6f 6465 o mark this node │ │ │ │ -00158ac0: 2028 666f 7220 6d75 6c74 692d 7265 6620 (for multi-ref │ │ │ │ -00158ad0: 616e 6420 6379 636c 6520 6465 7465 6374 and cycle detect │ │ │ │ -00158ae0: 696f 6e29 203c 2f73 7061 6e3e 3c2f 6469 ion) .
    return < │ │ │ │ -00158b30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00158b40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00158b50: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ -00158b60: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c │ │ │ │ -00158b70: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c │ │ │ │ -00158b80: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b3c 0">SOAP_OK;< │ │ │ │ +00158a70: 223e 2020 3c73 7061 6e20 636c 6173 733d "> // no │ │ │ │ +00158a90: 6e65 6564 2074 6f20 6d61 726b 2074 6869 need to mark thi │ │ │ │ +00158aa0: 7320 6e6f 6465 2028 666f 7220 6d75 6c74 s node (for mult │ │ │ │ +00158ab0: 692d 7265 6620 616e 6420 6379 636c 6520 i-ref and cycle │ │ │ │ +00158ac0: 6465 7465 6374 696f 6e29 203c 2f73 7061 detection)
    .
    .
    }< │ │ │ │ 00158b90: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ -00158bb0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void │ │ │ │ -00158be0: 3c2f 7370 616e 3e20 736f 6170 5f64 6566 soap_def │ │ │ │ -00158bf0: 6175 6c74 5f4d 7944 6174 6128 3c73 7061 ault_MyData(struct │ │ │ │ -00158c20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -00158c50: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -00158c80: 2c20 4d79 4461 7461 202a 6129 203c 2f64 , MyData *a) void so │ │ │ │ +00158bd0: 6170 5f64 6566 6175 6c74 5f4d 7944 6174 ap_default_MyDat │ │ │ │ +00158be0: 6128 3c73 7061 6e20 636c 6173 733d 226b a(struct soa │ │ │ │ +00158c30: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +00158c60: 6170 3c2f 613e 2c20 4d79 4461 7461 202a ap, MyData * │ │ │ │ +00158c70: 6129 203c 2f64 6976 3e0a 3c64 6976 2063 a)
    .
    {.
    {
    . │ │ │ │ -00158cc0: 2020 2a61 203d 204e 554c 4c3b 3c2f 6469 *a = NULL;.
    }
    . │ │ │ │ -00158d00: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    soap_out_My │ │ │ │ -00158d30: 4461 7461 283c 7370 616e 2063 6c61 7373 Data(struc │ │ │ │ -00158d50: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -00158d80: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag, int < │ │ │ │ -00158e30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00158e40: 6f72 6474 7970 6522 3e69 643c 2f73 7061 ordtype">id, MyData const*a, │ │ │ │ -00158e80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ -00158ec0: 6172 3c2f 7370 616e 3e20 2a74 7970 6529 ar *type) │ │ │ │ -00158ed0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    │ │ │ │ -00158f20: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_ │ │ │ │ -00158f30: 656c 656d 656e 745f 6265 6769 6e5f 6f75 element_begin_ou │ │ │ │ -00158f40: 7428 3c61 2063 6c61 7373 3d22 636f 6465 t(soap, tag, id, typ │ │ │ │ -00158fa0: 6529 203c 7370 616e 2063 6c61 7373 3d22 e) // prin │ │ │ │ -00158fc0: 7420 584d 4c20 6265 6769 6e6e 696e 6720 t XML beginning │ │ │ │ -00158fd0: 7461 6720 3c2f 7370 616e 3e3c 2f64 6976 tag
    .
    || soap_s │ │ │ │ -00159050: 656e 643c 2f61 3e28 3c61 2063 6c61 7373 end(s │ │ │ │ -00159080: 6f61 703c 2f61 3e2c 202a 6129 203c 7370 oap, *a) // just print │ │ │ │ -001590b0: 2074 6865 2073 7472 696e 6720 286e 6f20 the string (no │ │ │ │ -001590c0: 584d 4c20 636f 6e76 6572 7369 6f6e 2920 XML conversion) │ │ │ │ -001590d0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001590f0: 2020 207c 7c20 736f 6170 5f65 6c65 6d65 || soap_eleme │ │ │ │ -00159100: 6e74 5f65 6e64 5f6f 7574 283c 6120 636c nt_end_out(soap, tag) │ │ │ │ -00159140: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // print │ │ │ │ -00159160: 2058 4d4c 2065 6e64 696e 6720 7461 6720 XML ending tag │ │ │ │ -00159170: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00159190: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ -001591b0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn soap-> │ │ │ │ -001591f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error;
    ..< │ │ │ │ -001592f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00159300: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    MyDa │ │ │ │ -00159320: 7461 202a 2a73 6f61 705f 696e 5f4d 7944 ta **soap_in_MyD │ │ │ │ -00159330: 6174 6128 3c73 7061 6e20 636c 6173 733d ata(struct │ │ │ │ -00159350: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ -00159380: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ -001593b0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, │ │ │ │ -001593d0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *tag, MyData │ │ │ │ -00159410: 2a61 2c20 3c73 7061 6e20 636c 6173 733d *a, const< │ │ │ │ -00159430: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *ty │ │ │ │ -00159460: 7065 2920 3c2f 6469 763e 0a3c 6469 7620 pe)
    .
    {.
    if (so │ │ │ │ -001594c0: 6170 5f65 6c65 6d65 6e74 5f62 6567 696e ap_element_begin │ │ │ │ -001594d0: 5f69 6e28 3c61 2063 6c61 7373 3d22 636f _in(soap< │ │ │ │ -00159500: 2f61 3e2c 2074 6167 2929 203c 2f64 6976 /a>, tag))
    .
    return │ │ │ │ -00159550: 4e55 4c4c 3b20 3c2f 6469 763e 0a3c 6469 NULL;
    . │ │ │ │ -00159570: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if
    (!a)
    │ │ │ │ -001595a0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -00159690: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001596a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ -001596c0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s │ │ │ │ -001596f0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->null) < │ │ │ │ -00159750: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    *a = │ │ │ │ -00159770: 204e 554c 4c3b 203c 7370 616e 2063 6c61 NULL; // │ │ │ │ -00159790: 7873 693a 6e69 6c20 656c 656d 656e 7420 xsi:nil element │ │ │ │ -001597a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001597c0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (*s │ │ │ │ -00159810: 6f61 703c 2f61 3e2d 2667 743b 7479 7065 oap->type │ │ │ │ -00159820: 2026 616d 703b 2661 6d70 3b20 3c61 2063 && so │ │ │ │ -00159880: 6170 5f6d 6174 6368 5f74 6167 3c2f 613e ap_match_tag │ │ │ │ -00159890: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001598c0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , soap->type, type │ │ │ │ -00159900: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {< │ │ │ │ -00159920: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap-> │ │ │ │ -00159970: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error = SOAP_TY │ │ │ │ -00159a20: 5045 3c2f 613e 3b20 3c2f 6469 763e 0a3c PE;
    .< │ │ │ │ -00159a30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00159a40: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r │ │ │ │ -00159a60: 6574 7572 6e3c 2f73 7061 6e3e 204e 554c eturn NUL │ │ │ │ -00159a70: 4c3b 203c 7370 616e 2063 6c61 7373 3d22 L; // type │ │ │ │ -00159a90: 206d 6973 6d61 7463 6820 3c2f 7370 616e mismatch
    .
    } .
    if (*< │ │ │ │ -00159b00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00159b10: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00159b20: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -00159b30: 6774 3b68 7265 6629 203c 2f64 6976 3e0a gt;href)
    . │ │ │ │ -00159b40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    a = (MyDat │ │ │ │ -00159b60: 612a 2a29 736f 6170 5f69 645f 666f 7277 a**)soap_id_forw │ │ │ │ -00159b70: 6172 6428 3c61 2063 6c61 7373 3d22 636f ard(soap< │ │ │ │ -00159ba0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, soap │ │ │ │ -00159bd0: 3c2f 613e 2d26 6774 3b68 7265 662c 2061 ->href, a │ │ │ │ -00159be0: 2c20 302c 2053 4f41 505f 5459 5045 5f4d , 0, SOAP_TYPE_M │ │ │ │ -00159bf0: 7944 6174 612c 2030 2c20 3c73 7061 6e20 yData, 0, │ │ │ │ -00159c10: 7369 7a65 6f66 3c2f 7370 616e 3e28 4d79 sizeof(My │ │ │ │ -00159c20: 4461 7461 292c 2030 2c20 4e55 4c4c 2c20 Data), 0, NULL, │ │ │ │ -00159c30: 4e55 4c4c 2920 3c2f 6469 763e 0a3c 6469 NULL)
    . │ │ │ │ -00159c50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ -00159c70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap-> │ │ │ │ -00159cd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 body)
    .
    {< │ │ │ │ -00159d40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char *s = soap_valu │ │ │ │ -00159d90: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap); // fil │ │ │ │ -00159de0: 6c20 6275 6666 6572 203c 2f73 7061 6e3e l buffer │ │ │ │ -00159df0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    *a │ │ │ │ -00159e10: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (cha │ │ │ │ -00159e30: 723c 2f73 7061 6e3e 2a29 3c61 2063 6c61 r*)s │ │ │ │ -00159e90: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(< │ │ │ │ -00159ea0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00159eb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00159ec0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -00159ed0: 7374 726c 656e 2873 292b 3129 3b20 3c2f strlen(s)+1); .
    strcp │ │ │ │ -00159f00: 7928 2a61 2c20 7329 3b20 3c2f 6469 763e y(*a, s);
    │ │ │ │ -00159f10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ -00159f40: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so │ │ │ │ -00159f90: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->body &am │ │ │ │ -00159ff0: 703b 2661 6d70 3b20 736f 6170 5f65 6c65 p;& soap_ele │ │ │ │ -0015a000: 6d65 6e74 5f65 6e64 5f69 6e28 3c61 2063 ment_end_in(soap, tag │ │ │ │ -0015a040: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    │ │ │ │ -0015a060: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -0015a080: 3c2f 7370 616e 3e20 4e55 4c4c 3b20 3c2f NULL; .
    return │ │ │ │ -0015a0d0: 2061 3b20 3c2f 6469 763e 0a3c 6469 7620 a;
    .
    }.
    #defi │ │ │ │ -0015a1d0: 6e65 2053 4f41 505f 5459 5045 3c2f 6469 ne SOAP_TYPE
    A soap_stat │ │ │ │ -0015a200: 7573 2065 7272 6f72 2063 6f64 653a 2058 us error code: X │ │ │ │ -0015a210: 4d4c 2065 6c65 6d65 6e74 206f 7220 6174 ML element or at │ │ │ │ -0015a220: 7472 6962 7574 6520 6861 7320 6120 6d69 tribute has a mi │ │ │ │ -0015a230: 736d 6174 6368 696e 6720 7479 7065 206f smatching type o │ │ │ │ -0015a240: 7220 7661 6c75 6520 7468 6174 2069 7320 r value that is │ │ │ │ -0015a250: 6361 7573 696e 6720 6120 2e2e 2e3c 2f64 causing a ...
    Definit │ │ │ │ -0015a280: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ -0015a290: 322e 683a 3236 3037 3c2f 6469 763e 3c2f 2.h:2607
    .
    < │ │ │ │ -0015a360: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0015a370: 6922 3e69 6e74 2073 6f61 705f 7365 6e64 i">int soap_send │ │ │ │ -0015a380: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -0015a390: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char * │ │ │ │ -0015a3a0: 7329 3c2f 6469 763e 3c64 6976 2063 6c61 s)
    Send │ │ │ │ -0015a3c0: 6120 7374 7269 6e67 2e3c 2f64 6976 3e3c a string.
    < │ │ │ │ -0015a3d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    < │ │ │ │ -0015a5e0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0015a5f0: 6922 3e73 686f 7274 2062 6f64 793c 2f64 i">short body
    The soap:: │ │ │ │ -0015a620: 626f 6479 2066 6c61 6720 6973 2073 6574 body flag is set │ │ │ │ -0015a630: 2077 6865 6e20 616e 2065 6c65 6d65 6e74 when an element │ │ │ │ -0015a640: 2068 6173 2065 6c65 6d65 6e74 2063 6f6e has element con │ │ │ │ -0015a650: 7465 6e74 2064 7572 696e 6720 584d 4c20 tent during XML │ │ │ │ -0015a660: 7061 7273 696e 6720 6f72 2077 6865 6e20 parsing or when │ │ │ │ -0015a670: 6120 4854 5450 206d 6573 732e 2e2e 3c2f a HTTP mess...
    Defini │ │ │ │ -0015a6a0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ -0015a6b0: 7032 2e68 3a32 3936 353c 2f64 6976 3e3c p2.h:2965
    < │ │ │ │ -0015a6c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -0015a710: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -0015a720: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ -0015a760: 6f61 703a 3a6e 756c 6c3c 2f61 3e3c 2f64 oap::null
    short nul │ │ │ │ -0015a790: 6c3c 2f64 6976 3e3c 6469 7620 636c 6173 l
    The so │ │ │ │ -0015a7b0: 6170 3a3a 6e75 6c6c 2066 6c61 6720 6973 ap::null flag is │ │ │ │ -0015a7c0: 2073 6574 2077 6865 6e20 616e 2065 6c65 set when an ele │ │ │ │ -0015a7d0: 6d65 6e74 2063 6172 7269 6573 2061 2078 ment carries a x │ │ │ │ -0015a7e0: 7369 3a6e 696c 2061 7474 7269 6275 7465 si:nil attribute │ │ │ │ -0015a7f0: 2074 6861 7420 6973 2074 7275 652e 3c2f that is true.
    Defini │ │ │ │ -0015a820: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ -0015a830: 7032 2e68 3a32 3936 333c 2f64 6976 3e3c p2.h:2963
    < │ │ │ │ -0015a840: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -0015a860: 4d6f 7265 2069 6e66 6f72 6d61 7469 6f6e More information │ │ │ │ -0015a870: 206f 6e20 6375 7374 6f6d 2073 6572 6961 on custom seria │ │ │ │ -0015a880: 6c69 7a61 7469 6f6e 2069 7320 6176 6169 lization is avai │ │ │ │ -0015a890: 6c61 626c 6520 696e 2074 6865 2067 534f lable in the gSO │ │ │ │ -0015a8a0: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p │ │ │ │ -0015a8b0: 6163 6b61 6765 2069 6e20 7468 6520 3c65 ackage in the gsoap/cu │ │ │ │ -0015a8d0: 7374 6f6d 3c2f 636f 6465 3e3c 2f65 6d3e stom │ │ │ │ -0015a8e0: 2064 6972 6563 746f 7279 2c20 7768 6572 directory, wher │ │ │ │ -0015a8f0: 6520 796f 7520 6361 6e20 616c 736f 2066 e you can also f │ │ │ │ -0015a900: 696e 6420 7365 7665 7261 6c20 6375 7374 ind several cust │ │ │ │ -0015a910: 6f6d 2073 6572 6961 6c69 7a65 7273 2074 om serializers t │ │ │ │ -0015a920: 6f20 7573 6520 7769 7468 2079 6f75 7220 o use with your │ │ │ │ -0015a930: 7072 6f6a 6563 7473 2e3c 2f70 3e0a 3c70 projects.

    .

    .... Back to table │ │ │ │ -0015a960: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents< │ │ │ │ -0015a970: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .Fun │ │ │ │ -0015a9a0: 6374 696f 6e20 6361 6c6c 6261 636b 7320 ction callbacks │ │ │ │ -0015a9b0: 666f 7220 6375 7374 6f6d 697a 6564 2049 for customized I │ │ │ │ -0015a9c0: 2f4f 2061 6e64 2048 5454 5020 6861 6e64 /O and HTTP hand │ │ │ │ -0015a9d0: 6c69 6e67 3c2f 6832 3e0a 3c70 3e54 6865 ling

    .

    The │ │ │ │ -0015a9e0: 2066 6f6c 6c6f 7769 6e67 206c 6973 7420 following list │ │ │ │ -0015a9f0: 6f66 2066 756e 6374 696f 6e73 2063 616e of functions can │ │ │ │ -0015aa00: 2062 6520 7573 6564 2066 6f72 2063 7573 be used for cus │ │ │ │ -0015aa10: 746f 6d69 7a65 6420 4854 5450 2068 616e tomized HTTP han │ │ │ │ -0015aa20: 646c 696e 6720 616e 6420 492f 4f2e 3c2f dling and I/O..

    See also A │ │ │ │ -0015aa40: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation │ │ │ │ -0015aa50: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module Callba │ │ │ │ -0015aa90: 636b 2066 756e 6374 696f 6e73 3c2f 613e ck functions │ │ │ │ -0015aaa0: 2e3c 2f70 3e0a 3c70 3e54 6f20 7265 7365 .

    .

    To rese │ │ │ │ -0015aab0: 7420 7468 6520 6361 6c6c 6261 636b 2066 t the callback f │ │ │ │ -0015aac0: 756e 6374 696f 6e73 2074 6f20 7468 6520 unctions to the │ │ │ │ -0015aad0: 696e 7465 726e 616c 2066 756e 6374 696f internal functio │ │ │ │ -0015aae0: 6e73 206f 6620 7468 6520 656e 6769 6e65 ns of the engine │ │ │ │ -0015aaf0: 2c20 7573 6520 3c63 6f64 653e 3c61 2063 , use │ │ │ │ -0015abc0: 736f 6170 5f64 6f6e 653c 2f61 3e3c 2f63 soap_done followed by │ │ │ │ -0015abe0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa │ │ │ │ -0015ac70: 705f 696e 6974 3c2f 613e 3c2f 636f 6465 p_init. This re-initi │ │ │ │ -0015ac90: 616c 697a 6573 2074 6865 203c 636f 6465 alizes the soa │ │ │ │ -0015acf0: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con │ │ │ │ -0015ad00: 7465 7874 2c20 7265 6d6f 7665 7320 616c text, removes al │ │ │ │ -0015ad10: 6c20 706c 7567 696e 732c 2061 6e64 2072 l plugins, and r │ │ │ │ -0015ad20: 6573 6574 7320 6675 6e63 7469 6f6e 2063 esets function c │ │ │ │ -0015ad30: 616c 6c62 6163 6b73 2e3c 2f70 3e0a 3c68 allbacks.

    ..fpost │ │ │ │ -0015ad70: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69 .

    i │ │ │ │ -0015ad80: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::fpos │ │ │ │ -0015ae50: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so │ │ │ │ -0015ae60: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const │ │ │ │ -0015ae70: 6368 6172 202a 656e 6470 6f69 6e74 2c20 char *endpoint, │ │ │ │ -0015ae80: 636f 6e73 7420 6368 6172 202a 686f 7374 const char *host │ │ │ │ -0015ae90: 2c20 696e 7420 706f 7274 2c20 636f 6e73 , int port, cons │ │ │ │ -0015aea0: 7420 6368 6172 202a 7061 7468 2c20 636f t char *path, co │ │ │ │ -0015aeb0: 6e73 7420 6368 6172 202a 6163 7469 6f6e nst char *action │ │ │ │ -0015aec0: 2c20 554c 4f4e 4736 3420 636f 756e 7429 , ULONG64 count) │ │ │ │ -0015aed0: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T │ │ │ │ -0015aee0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is │ │ │ │ -0015aef0: 6361 6c6c 6564 2061 7420 7468 6520 7365 called at the se │ │ │ │ -0015af00: 7276 6572 2073 6964 6520 6279 2074 6865 rver side by the │ │ │ │ -0015af10: 2065 6e67 696e 6520 746f 2073 656e 6420 engine to send │ │ │ │ -0015af20: 7468 6520 4854 5450 2068 6561 6465 7273 the HTTP headers │ │ │ │ -0015af30: 2074 6f20 7468 6520 636f 6e6e 6563 7465 to the connecte │ │ │ │ -0015af40: 6420 636c 6965 6e74 2e20 5468 6520 7061 d client. The pa │ │ │ │ -0015af50: 7261 6d65 7465 7220 3c63 6f64 653e 7374 rameter st │ │ │ │ -0015af60: 6174 7573 3c2f 636f 6465 3e20 7368 6f75 atus shou │ │ │ │ -0015af70: 6c64 2062 6520 616e 2048 5454 5020 7374 ld be an HTTP st │ │ │ │ -0015af80: 6174 7573 2065 7272 6f72 2063 6f64 6520 atus error code │ │ │ │ -0015af90: 6f72 203c 636f 6465 3e23 534f 4150 5f4f or #SOAP_O │ │ │ │ -0015afa0: 4b3c 2f63 6f64 653e 2028 3230 3020 4f4b K (200 OK │ │ │ │ -0015afb0: 2920 6f72 203c 636f 6465 3e23 534f 4150 ) or #SOAP │ │ │ │ -0015afc0: 5f48 544d 4c3c 2f63 6f64 653e 206f 7220 _HTML or │ │ │ │ -0015afd0: 3c63 6f64 653e 2353 4f41 505f 4649 4c45 #SOAP_FILE │ │ │ │ -0015afe0: 3c2f 636f 6465 3e2e 2055 7369 6e67 203c . Using < │ │ │ │ -0015aff0: 636f 6465 3e23 534f 4150 5f48 544d 4c3c code>#SOAP_HTML< │ │ │ │ -0015b000: 2f63 6f64 653e 2073 6574 7320 7468 6520 /code> sets the │ │ │ │ -0015b010: 636f 6e74 656e 742d 7479 7065 2068 6561 content-type hea │ │ │ │ -0015b020: 6465 7220 746f 203c 636f 6465 3e74 6578 der to tex │ │ │ │ -0015b030: 742f 6874 6d6c 3b20 6368 6172 7365 743d t/html; charset= │ │ │ │ -0015b040: 7574 662d 383c 2f63 6f64 653e 2e20 5573 utf-8. Us │ │ │ │ -0015b050: 696e 6720 3c63 6f64 653e 2353 4f41 505f ing #SOAP_ │ │ │ │ -0015b060: 4649 4c45 3c2f 636f 6465 3e20 7365 7473 FILE sets │ │ │ │ -0015b070: 2074 6865 2063 6f6e 7465 6e74 2d74 7970 the content-typ │ │ │ │ -0015b080: 6520 6865 6164 6572 2074 6f20 7468 6520 e header to the │ │ │ │ -0015b090: 7661 6c75 6520 6f66 203c 636f 6465 3e3c value of < │ │ │ │ -0015b0a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0015b0b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -0015b0c0: 6d6c 2361 6535 6539 3837 3333 6134 3334 ml#ae5e98733a434 │ │ │ │ -0015b0d0: 3962 3565 3134 3636 6139 6530 6363 6332 9b5e1466a9e0ccc2 │ │ │ │ -0015b0e0: 3263 3131 2220 7469 746c 653d 2253 7472 2c11" title="Str │ │ │ │ -0015b0f0: 696e 6720 7769 7468 2048 5454 5020 636f ing with HTTP co │ │ │ │ -0015b100: 6e74 656e 7420 7479 7065 2068 6561 6465 ntent type heade │ │ │ │ -0015b110: 7220 7661 6c75 6520 7265 6365 6976 6564 r value received │ │ │ │ -0015b120: 2c20 6361 6e20 616c 736f 2062 6520 6173 , can also be as │ │ │ │ -0015b130: 7369 676e 6564 2074 6f20 7370 6563 6966 signed to specif │ │ │ │ -0015b140: 7920 6120 636f 6e74 656e 7420 7479 7065 y a content type │ │ │ │ -0015b150: 2068 2e2e 2e22 3e73 6f61 703a 3a68 7474 h...">soap::htt │ │ │ │ -0015b160: 705f 636f 6e74 656e 743c 2f61 3e3c 2f63 p_content. Extra HTTP │ │ │ │ -0015b180: 2068 6561 6465 7273 2061 7265 2061 6464 headers are add │ │ │ │ -0015b190: 6564 2077 6865 6e20 3c63 6f64 653e 3c61 ed when soa │ │ │ │ -0015b250: 703a 3a68 7474 705f 6578 7472 615f 6865 p::http_extra_he │ │ │ │ -0015b260: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader │ │ │ │ -0015b270: 6973 2073 6574 2074 6f20 6f6e 6520 6f72 is set to one or │ │ │ │ -0015b280: 206d 6f72 6520 6865 6164 6572 206c 696e more header lin │ │ │ │ -0015b290: 6573 2073 6570 6172 6174 6564 2062 7920 es separated by │ │ │ │ -0015b2a0: 4352 4c46 2e20 5768 656e 2072 6564 6566 CRLF. When redef │ │ │ │ -0015b2b0: 696e 696e 6720 7468 6973 2063 616c 6c62 ining this callb │ │ │ │ -0015b2c0: 6163 6b2c 2075 7365 2066 756e 6374 696f ack, use functio │ │ │ │ -0015b2d0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soa │ │ │ │ -0015b340: 705f 7365 6e64 3c2f 613e 3c2f 636f 6465 p_send to write the h │ │ │ │ -0015b360: 6561 6465 7220 636f 6e74 656e 7473 2e20 eader contents. │ │ │ │ -0015b370: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S │ │ │ │ -0015b380: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or │ │ │ │ -0015b390: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s │ │ │ │ -0015b450: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus │ │ │ │ -0015b460: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The │ │ │ │ -0015b470: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi │ │ │ │ -0015b480: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to < │ │ │ │ -0015b490: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::frespons │ │ │ │ -0015b560: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is │ │ │ │ -0015b570: 3c63 6f64 653e 6874 7470 5f72 6573 706f http_respo │ │ │ │ -0015b580: 6e73 653c 2f63 6f64 653e 2e3c 2f70 3e0a nse.

    . │ │ │ │ -0015b590: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fre │ │ │ │ -0015b5c0: 7370 6f6e 7365 3c2f 6833 3e0a 3c70 3e3c sponse

    .

    < │ │ │ │ -0015b5d0: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fre │ │ │ │ -0015b6a0: 7370 6f6e 7365 3c2f 613e 2928 7374 7275 sponse)(stru │ │ │ │ -0015b6b0: 6374 2073 6f61 7020 2a73 6f61 702c 2069 ct soap *soap, i │ │ │ │ -0015b6c0: 6e74 2073 6f61 705f 6572 726f 725f 636f nt soap_error_co │ │ │ │ -0015b6d0: 6465 2c20 554c 4f4e 4736 3420 636f 756e de, ULONG64 coun │ │ │ │ -0015b6e0: 7429 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 t)

    .

    This callback i │ │ │ │ -0015b700: 7320 6361 6c6c 6564 2061 7420 7468 6520 s called at the │ │ │ │ -0015b710: 7365 7276 6572 2073 6964 6520 6279 2074 server side by t │ │ │ │ -0015b720: 6865 2065 6e67 696e 6520 746f 2073 656e he engine to sen │ │ │ │ -0015b730: 6420 7468 6520 4854 5450 2068 6561 6465 d the HTTP heade │ │ │ │ -0015b740: 7273 2074 6f20 7468 6520 636f 6e6e 6563 rs to the connec │ │ │ │ -0015b750: 7465 6420 636c 6965 6e74 2e20 5468 6520 ted client. The │ │ │ │ -0015b760: 7061 7261 6d65 7465 7220 3c63 6f64 653e parameter │ │ │ │ -0015b770: 7374 6174 7573 3c2f 636f 6465 3e20 7368 status sh │ │ │ │ -0015b780: 6f75 6c64 2062 6520 616e 2048 5454 5020 ould be an HTTP │ │ │ │ -0015b790: 7374 6174 7573 2065 7272 6f72 2063 6f64 status error cod │ │ │ │ -0015b7a0: 6520 6f72 203c 636f 6465 3e23 534f 4150 e or #SOAP │ │ │ │ -0015b7b0: 5f4f 4b3c 2f63 6f64 653e 2028 3230 3020 _OK (200 │ │ │ │ -0015b7c0: 4f4b 2920 6f72 203c 636f 6465 3e23 534f OK) or #SO │ │ │ │ -0015b7d0: 4150 5f48 544d 4c3c 2f63 6f64 653e 206f AP_HTML o │ │ │ │ -0015b7e0: 7220 3c63 6f64 653e 2353 4f41 505f 4649 r #SOAP_FI │ │ │ │ -0015b7f0: 4c45 3c2f 636f 6465 3e2e 2055 7369 6e67 LE. Using │ │ │ │ -0015b800: 203c 636f 6465 3e23 534f 4150 5f48 544d #SOAP_HTM │ │ │ │ -0015b810: 4c3c 2f63 6f64 653e 2073 6574 7320 7468 L sets th │ │ │ │ -0015b820: 6520 636f 6e74 656e 742d 7479 7065 2068 e content-type h │ │ │ │ -0015b830: 6561 6465 7220 746f 203c 636f 6465 3e74 eader to t │ │ │ │ -0015b840: 6578 742f 6874 6d6c 3b20 6368 6172 7365 ext/html; charse │ │ │ │ -0015b850: 743d 7574 662d 383c 2f63 6f64 653e 2e20 t=utf-8. │ │ │ │ -0015b860: 5573 696e 6720 3c63 6f64 653e 2353 4f41 Using #SOA │ │ │ │ -0015b870: 505f 4649 4c45 3c2f 636f 6465 3e20 7365 P_FILE se │ │ │ │ -0015b880: 7473 2074 6865 2063 6f6e 7465 6e74 2d74 ts the content-t │ │ │ │ -0015b890: 7970 6520 6865 6164 6572 2074 6f20 7468 ype header to th │ │ │ │ -0015b8a0: 6520 7661 6c75 6520 6f66 203c 636f 6465 e value of soap::h │ │ │ │ -0015b970: 7474 705f 636f 6e74 656e 743c 2f61 3e3c ttp_content< │ │ │ │ -0015b980: 2f63 6f64 653e 2e20 4578 7472 6120 4854 /code>. Extra HT │ │ │ │ -0015b990: 5450 2068 6561 6465 7273 2061 7265 2061 TP headers are a │ │ │ │ -0015b9a0: 6464 6564 2077 6865 6e20 3c63 6f64 653e dded when │ │ │ │ -0015b9b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s │ │ │ │ -0015ba60: 6f61 703a 3a68 7474 705f 6578 7472 615f oap::http_extra_ │ │ │ │ -0015ba70: 6865 6164 6572 3c2f 613e 3c2f 636f 6465 header is set to one │ │ │ │ -0015ba90: 6f72 206d 6f72 6520 6865 6164 6572 206c or more header l │ │ │ │ -0015baa0: 696e 6573 2073 6570 6172 6174 6564 2062 ines separated b │ │ │ │ -0015bab0: 7920 4352 4c46 2e20 5768 656e 2072 6564 y CRLF. When red │ │ │ │ -0015bac0: 6566 696e 696e 6720 7468 6973 2063 616c efining this cal │ │ │ │ -0015bad0: 6c62 6163 6b2c 2075 7365 2066 756e 6374 lback, use funct │ │ │ │ -0015bae0: 696f 6e20 3c63 6f64 653e 3c61 2063 6c61 ion s │ │ │ │ -0015bb50: 6f61 705f 7365 6e64 3c2f 613e 3c2f 636f oap_send to write the │ │ │ │ -0015bb70: 2068 6561 6465 7220 636f 6e74 656e 7473 header contents │ │ │ │ -0015bb80: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns │ │ │ │ -0015bb90: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK │ │ │ │ -0015bba0: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap │ │ │ │ -0015bc60: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status error code. T │ │ │ │ -0015bc80: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func │ │ │ │ -0015bc90: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to │ │ │ │ -0015bca0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::frespo │ │ │ │ -0015bd70: 6e73 653c 2f61 3e3c 2f63 6f64 653e 2069 nse i │ │ │ │ -0015bd80: 7320 3c63 6f64 653e 6874 7470 5f72 6573 s http_res │ │ │ │ -0015bd90: 706f 6e73 653c 2f63 6f64 653e 2e3c 2f70 ponse.

    .

    .f │ │ │ │ -0015bdd0: 706f 7374 6864 723c 2f68 333e 0a3c 703e posthdr

    .

    │ │ │ │ -0015bde0: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap::f │ │ │ │ -0015be90: 706f 7374 6864 723c 2f61 3e29 2873 7472 posthdr)(str │ │ │ │ -0015bea0: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ -0015beb0: 636f 6e73 7420 6368 6172 202a 6b65 792c const char *key, │ │ │ │ -0015bec0: 2063 6f6e 7374 2063 6861 7220 2a76 616c const char *val │ │ │ │ -0015bed0: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    │ │ │ │ -0015bee0: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is │ │ │ │ -0015bef0: 2063 616c 6c65 6420 6279 203c 636f 6465 called by soap::fpost and soap::fresponse │ │ │ │ -0015c0b0: 3c2f 613e 3c2f 636f 6465 3e20 746f 2073 to s │ │ │ │ -0015c0c0: 656e 6420 616e 2048 5454 5020 6865 6164 end an HTTP head │ │ │ │ -0015c0d0: 6572 2077 6974 6820 6120 6b65 7920 616e er with a key an │ │ │ │ -0015c0e0: 6420 616e 206f 7074 696f 6e61 6c20 7661 d an optional va │ │ │ │ -0015c0f0: 6c75 652e 2052 6574 7572 6e73 203c 636f lue. Returns #SOAP_OK or a s │ │ │ │ -0015c1d0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro │ │ │ │ -0015c1f0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil │ │ │ │ -0015c200: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as │ │ │ │ -0015c210: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to │ │ │ │ -0015c220: 3c61 2063 6c61 7373 3d22 656c 2220 6872 so │ │ │ │ -0015c2c0: 6170 3a3a 6670 6f73 7468 6472 3c2f 613e ap::fposthdr │ │ │ │ -0015c2d0: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is http_post_heade │ │ │ │ -0015c2f0: 723c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 r.

    ..fpars │ │ │ │ -0015c330: 653c 2f68 333e 0a3c 703e 3c63 6f64 653e e.

    │ │ │ │ -0015c340: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fp │ │ │ │ -0015c3e0: 6172 7365 3c2f 613e 2928 7374 7275 6374 arse)(struct │ │ │ │ -0015c3f0: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This │ │ │ │ -0015c410: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ -0015c420: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine │ │ │ │ -0015c430: 2028 6173 2061 2063 6c69 656e 7420 6f72 (as a client or │ │ │ │ -0015c440: 2073 6572 7665 7229 2074 6f20 7265 6164 server) to read │ │ │ │ -0015c450: 2061 6e64 2070 6172 7365 2048 5454 5020 and parse HTTP │ │ │ │ -0015c460: 6865 6164 6572 7320 6f72 204d 494d 4520 headers or MIME │ │ │ │ -0015c470: 6865 6164 6572 732e 2057 6865 6e20 7265 headers. When re │ │ │ │ -0015c480: 6465 6669 6e65 642c 2074 6869 7320 6675 defined, this fu │ │ │ │ -0015c490: 6e63 7469 6f6e 2073 686f 756c 6420 6174 nction should at │ │ │ │ -0015c4a0: 2072 6561 6420 6f72 2073 6b69 7020 7468 read or skip th │ │ │ │ -0015c4b0: 6520 656e 7469 7265 2048 5454 5020 6865 e entire HTTP he │ │ │ │ -0015c4c0: 6164 6572 2074 6f20 7265 6163 6820 7468 ader to reach th │ │ │ │ -0015c4d0: 6520 6d65 7373 6167 6520 626f 6479 2e20 e message body. │ │ │ │ -0015c4e0: 4675 6e63 7469 6f6e 203c 636f 6465 3e3c Function < │ │ │ │ -0015c4f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0015c500: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -0015c510: 5f69 6f2e 6874 6d6c 2367 6133 6635 3463 _io.html#ga3f54c │ │ │ │ -0015c520: 3539 3136 6336 6636 6464 6666 6563 3564 5916c6f6ddffec5d │ │ │ │ -0015c530: 3731 3230 6132 3330 6634 3622 2074 6974 7120a230f46" tit │ │ │ │ -0015c540: 6c65 3d22 4765 7420 6120 6865 6164 6572 le="Get a header │ │ │ │ -0015c550: 206c 696e 652e 223e 736f 6170 5f67 6574 line.">soap_get │ │ │ │ -0015c560: 6c69 6e65 3c2f 613e 3c2f 636f 6465 3e20 line │ │ │ │ -0015c570: 6973 2075 7365 6420 6279 2074 6869 7320 is used by this │ │ │ │ -0015c580: 6361 6c6c 6261 636b 2074 6f20 7265 6164 callback to read │ │ │ │ -0015c590: 2065 6163 6820 6865 6164 6572 206c 696e each header lin │ │ │ │ -0015c5a0: 6520 696e 746f 2061 6e20 696e 7465 726e e into an intern │ │ │ │ -0015c5b0: 616c 2062 7566 6665 7220 3c63 6f64 653e al buffer │ │ │ │ -0015c5c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ms │ │ │ │ -0015c680: 6762 7566 3c2f 613e 3c2f 636f 6465 3e20 gbuf │ │ │ │ -0015c690: 7769 7468 203c 636f 6465 3e3c 6120 636c with soap_getline │ │ │ │ -0015c710: 3c2f 613e 2873 6f61 702c 2073 6f61 702d (soap, soap- │ │ │ │ -0015c720: 2667 743b 6d73 6762 7566 2c20 7369 7a65 >msgbuf, size │ │ │ │ -0015c730: 6f66 2873 6f61 702d 2667 743b 6d73 6762 of(soap->msgb │ │ │ │ -0015c740: 7566 2929 3c2f 636f 6465 3e2e 2052 6574 uf)). Ret │ │ │ │ -0015c750: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ -0015c760: 5f4f 4b3c 2f63 6f64 653e 2c20 6f72 2061 _OK, or a │ │ │ │ -0015c770: 2067 534f 4150 2065 7272 6f72 2063 6f64 gSOAP error cod │ │ │ │ -0015c780: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in │ │ │ │ -0015c790: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne │ │ │ │ -0015c7a0: 6420 746f 203c 636f 6465 3e3c 6120 636c d to so │ │ │ │ -0015c840: 6170 3a3a 6670 6172 7365 3c2f 613e 3c2f ap::fparse is h │ │ │ │ -0015c860: 7474 705f 7061 7273 653c 2f63 6f64 653e ttp_parse │ │ │ │ -0015c870: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fparsehdr

    .

    int ( │ │ │ │ -0015c8c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fpar │ │ │ │ -0015c970: 7365 6864 723c 2f61 3e29 2873 7472 7563 sehdr)(struc │ │ │ │ -0015c980: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co │ │ │ │ -0015c990: 6e73 7420 6368 6172 202a 6b65 792c 2063 nst char *key, c │ │ │ │ -0015c9a0: 6f6e 7374 2063 6861 7220 2a76 616c 293c onst char *val)< │ │ │ │ -0015c9b0: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th │ │ │ │ -0015c9c0: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c │ │ │ │ -0015c9d0: 616c 6c65 6420 6279 203c 636f 6465 3e3c alled by < │ │ │ │ -0015c9e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0015c9f0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -0015ca00: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ -0015ca10: 6761 3963 6230 3563 6539 3866 3834 3566 ga9cb05ce98f845f │ │ │ │ -0015ca20: 3136 6339 3230 6334 3434 3236 6163 3335 16c920c44426ac35 │ │ │ │ -0015ca30: 6135 2220 7469 746c 653d 2243 616c 6c62 a5" title="Callb │ │ │ │ -0015ca40: 6163 6b20 7468 6174 2072 6561 6473 2061 ack that reads a │ │ │ │ -0015ca50: 6e64 2070 6172 7365 7320 4854 5450 2061 nd parses HTTP a │ │ │ │ -0015ca60: 6e64 204d 494d 4520 6865 6164 6572 732e nd MIME headers. │ │ │ │ -0015ca70: 223e 736f 6170 3a3a 6670 6172 7365 3c2f ">soap::fparse, consu │ │ │ │ -0015ca90: 6d65 7320 616e 2048 5454 5020 6865 6164 mes an HTTP head │ │ │ │ -0015caa0: 6572 2074 6861 7420 6973 2073 706c 6974 er that is split │ │ │ │ -0015cab0: 2069 6e20 6120 6b65 792d 7661 6c75 6520 in a key-value │ │ │ │ -0015cac0: 7061 6972 2061 6e64 2075 7064 6174 6573 pair and updates │ │ │ │ -0015cad0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap< │ │ │ │ -0015cb30: 2f63 6f64 653e 2063 6f6e 7465 7874 2073 /code> context s │ │ │ │ -0015cb40: 7461 7465 2061 6363 6f72 6469 6e67 6c79 tate accordingly │ │ │ │ -0015cb50: 2e20 5468 6520 636f 6e74 6578 7420 6973 . The context is │ │ │ │ -0015cb60: 2075 7064 6174 6564 2077 6974 6820 7468 updated with th │ │ │ │ -0015cb70: 6520 4854 5450 2068 6561 6465 7220 696e e HTTP header in │ │ │ │ -0015cb80: 666f 726d 6174 696f 6e20 7265 6365 6976 formation receiv │ │ │ │ -0015cb90: 6564 2c20 6275 7420 4854 5450 2068 6561 ed, but HTTP hea │ │ │ │ -0015cba0: 6465 7273 2061 7265 206e 6f74 206c 6974 ders are not lit │ │ │ │ -0015cbb0: 6572 616c 6c79 2072 6574 6169 6e65 6420 erally retained │ │ │ │ -0015cbc0: 6279 2074 6865 2065 6e67 696e 652e 2052 by the engine. R │ │ │ │ -0015cbd0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO │ │ │ │ -0015cbe0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or │ │ │ │ -0015cbf0: 3c63 6f64 653e 2353 4f41 505f 5354 4f50 #SOAP_STOP │ │ │ │ -0015cc00: 3c2f 636f 6465 3e20 746f 2070 7265 7665 to preve │ │ │ │ -0015cc10: 6e74 2066 7572 7468 6572 2072 6561 6469 nt further readi │ │ │ │ -0015cc20: 6e67 206f 6620 7468 6520 4854 5450 2062 ng of the HTTP b │ │ │ │ -0015cc30: 6f64 792c 206f 7220 6120 3c63 6f64 653e ody, or a │ │ │ │ -0015cc40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status │ │ │ │ -0015cd00: 3c2f 636f 6465 3e20 2869 6e74 2920 6572 (int) er │ │ │ │ -0015cd10: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu │ │ │ │ -0015cd20: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function │ │ │ │ -0015cd30: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fp │ │ │ │ -0015cdf0: 6172 7365 6864 723c 2f61 3e3c 2f63 6f64 arsehdr is http │ │ │ │ -0015ce10: 5f70 6172 7365 5f68 6561 6465 723c 2f63 _parse_header.

    .

    .fget

    │ │ │ │ -0015ce60: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (< │ │ │ │ -0015ce70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0015ce80: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -0015ce90: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ -0015cea0: 6761 6530 3232 3230 3466 6637 3030 3464 gae022204ff7004d │ │ │ │ -0015ceb0: 6632 6435 6163 3965 3038 3363 6262 3562 f2d5ac9e083cbb5b │ │ │ │ -0015cec0: 3136 2220 7469 746c 653d 2243 616c 6c62 16" title="Callb │ │ │ │ -0015ced0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement │ │ │ │ -0015cee0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se │ │ │ │ -0015cef0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser │ │ │ │ -0015cf00: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to │ │ │ │ -0015cf10: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request │ │ │ │ -0015cf20: 7320 6672 6f6d 2063 6c69 656e 7473 2e22 s from clients." │ │ │ │ -0015cf30: 3e73 6f61 703a 3a66 6765 743c 2f61 3e29 >soap::fget) │ │ │ │ -0015cf40: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -0015cf50: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .< │ │ │ │ -0015cf60: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ -0015cf70: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ -0015cf80: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc │ │ │ │ -0015cf90: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP │ │ │ │ -0015cfa0: 2047 4554 2072 6571 7565 7374 2069 7320 GET request is │ │ │ │ -0015cfb0: 7065 6e64 696e 672e 2052 6564 6566 696e pending. Redefin │ │ │ │ -0015cfc0: 6520 7468 6973 2063 616c 6c62 6163 6b20 e this callback │ │ │ │ -0015cfd0: 746f 2072 6573 706f 6e64 2074 6f20 4854 to respond to HT │ │ │ │ -0015cfe0: 5450 2047 4554 2072 6571 7565 7374 7320 TP GET requests │ │ │ │ -0015cff0: 7769 7468 2063 6f6e 7465 6e74 2c20 7365 with content, se │ │ │ │ -0015d000: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the htt │ │ │ │ -0015d090: 705f 6765 743c 2f61 3e3c 2f63 6f64 653e p_get │ │ │ │ -0015d0a0: 2048 5454 5020 4745 5420 706c 7567 696e HTTP GET plugin │ │ │ │ -0015d0b0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail │ │ │ │ -0015d0c0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK │ │ │ │ -0015d0e0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa │ │ │ │ -0015d1a0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error │ │ │ │ -0015d1c0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built- │ │ │ │ -0015d1d0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi │ │ │ │ -0015d1e0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to │ │ │ │ -0015d2b0: 736f 6170 3a3a 6667 6574 3c2f 613e 3c2f soap::fget is the int │ │ │ │ -0015d2d0: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun │ │ │ │ -0015d2e0: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http │ │ │ │ -0015d2f0: 5f67 6574 3c2f 636f 6465 3e20 7468 6174 _get that │ │ │ │ -0015d300: 2072 6574 7572 6e73 2074 6865 203c 636f returns the #SOAP_GET_MET │ │ │ │ -0015d320: 484f 443c 2f63 6f64 653e 2065 7272 6f72 HOD error │ │ │ │ -0015d330: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fput

    .

    │ │ │ │ -0015d370: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soa │ │ │ │ -0015d440: 703a 3a66 7075 743c 2f61 3e29 2873 7472 p::fput)(str │ │ │ │ -0015d450: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)< │ │ │ │ -0015d460: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th │ │ │ │ -0015d470: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c │ │ │ │ -0015d480: 616c 6c65 6420 6279 2074 6865 2073 6572 alled by the ser │ │ │ │ -0015d490: 7669 6365 2064 6973 7061 7463 6865 7220 vice dispatcher │ │ │ │ -0015d4a0: 7768 656e 2061 6e20 4854 5450 2050 5554 when an HTTP PUT │ │ │ │ -0015d4b0: 2072 6571 7565 7374 2069 7320 7065 6e64 request is pend │ │ │ │ -0015d4c0: 696e 672e 2052 6564 6566 696e 6520 7468 ing. Redefine th │ │ │ │ -0015d4d0: 6973 2063 616c 6c62 6163 6b20 746f 2072 is callback to r │ │ │ │ -0015d4e0: 6573 706f 6e64 2074 6f20 4854 5450 2050 espond to HTTP P │ │ │ │ -0015d4f0: 5554 2072 6571 7565 7374 732c 2073 6565 UT requests, see │ │ │ │ -0015d500: 2074 6865 203c 636f 6465 3e3c 6120 636c the htt │ │ │ │ -0015d590: 705f 706f 7374 3c2f 613e 3c2f 636f 6465 p_post HTTP POST plug │ │ │ │ -0015d5b0: 696e 2066 6f72 206d 6f72 6520 6465 7461 in for more deta │ │ │ │ -0015d5c0: 696c 732e 2052 6574 7572 6e73 203c 636f ils. Returns #SOAP_OK or a s │ │ │ │ -0015d6a0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status error code │ │ │ │ -0015d6c0: 2e20 5468 6520 6275 696c 742d 696e 2066 . The built-in f │ │ │ │ -0015d6d0: 756e 6374 696f 6e20 6173 7369 676e 6564 unction assigned │ │ │ │ -0015d6e0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap │ │ │ │ -0015d7b0: 3a3a 6670 7574 3c2f 613e 3c2f 636f 6465 ::fput is the interna │ │ │ │ -0015d7d0: 6c20 7374 6174 6963 2066 756e 6374 696f l static functio │ │ │ │ -0015d7e0: 6e20 3c63 6f64 653e 6874 7470 5f70 7574 n http_put │ │ │ │ -0015d7f0: 3c2f 636f 6465 3e20 7468 6174 2072 6574 that ret │ │ │ │ -0015d800: 7572 6e73 2074 6865 203c 636f 6465 3e23 urns the # │ │ │ │ -0015d810: 534f 4150 5f50 5554 5f4d 4554 484f 443c SOAP_PUT_METHOD< │ │ │ │ -0015d820: 2f63 6f64 653e 2065 7272 6f72 2e3c 2f70 /code> error.

    .

    .f │ │ │ │ -0015d860: 7061 7463 683c 2f68 333e 0a3c 703e 3c63 patch

    .

    int (s │ │ │ │ -0015d940: 6f61 703a 3a66 7061 7463 683c 2f61 3e29 oap::fpatch) │ │ │ │ -0015d950: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -0015d960: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .< │ │ │ │ -0015d970: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ -0015d980: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ -0015d990: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc │ │ │ │ -0015d9a0: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP │ │ │ │ -0015d9b0: 2050 4154 4348 2072 6571 7565 7374 2069 PATCH request i │ │ │ │ -0015d9c0: 7320 7065 6e64 696e 672e 2052 6564 6566 s pending. Redef │ │ │ │ -0015d9d0: 696e 6520 7468 6973 2063 616c 6c62 6163 ine this callbac │ │ │ │ -0015d9e0: 6b20 746f 2072 6573 706f 6e64 2074 6f20 k to respond to │ │ │ │ -0015d9f0: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque │ │ │ │ -0015da00: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the http_post
    HTTP P │ │ │ │ -0015dab0: 4f53 5420 706c 7567 696e 2066 6f72 206d OST plugin for m │ │ │ │ -0015dac0: 6f72 6520 6465 7461 696c 732e 2052 6574 ore details. Ret │ │ │ │ -0015dad0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ -0015dae0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a │ │ │ │ -0015daf0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat │ │ │ │ -0015dbb0: 7573 3c2f 613e 3c2f 636f 6465 3e20 6572 us er │ │ │ │ -0015dbc0: 726f 7220 636f 6465 2e20 5468 6520 6275 ror code. The bu │ │ │ │ -0015dbd0: 696c 742d 696e 2066 756e 6374 696f 6e20 ilt-in function │ │ │ │ -0015dbe0: 6173 7369 676e 6564 2074 6f20 3c63 6f64 assigned to soap::fp │ │ │ │ -0015dcc0: 6174 6368 3c2f 613e 3c2f 636f 6465 3e20 atch
    │ │ │ │ -0015dcd0: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal │ │ │ │ -0015dce0: 7374 6174 6963 2066 756e 6374 696f 6e20 static function │ │ │ │ -0015dcf0: 3c63 6f64 653e 6874 7470 5f70 6174 6368 http_patch │ │ │ │ -0015dd00: 3c2f 636f 6465 3e20 7468 6174 2072 6574 that ret │ │ │ │ -0015dd10: 7572 6e73 2074 6865 203c 636f 6465 3e23 urns the # │ │ │ │ -0015dd20: 534f 4150 5f50 4154 4348 5f4d 4554 484f SOAP_PATCH_METHO │ │ │ │ -0015dd30: 443c 2f63 6f64 653e 2065 7272 6f72 2e3c D error.< │ │ │ │ -0015dd40: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ -0015dd70: 0a66 6465 6c3c 2f68 333e 0a3c 703e 3c63 .fdel

    .

    int (s │ │ │ │ -0015de50: 6f61 703a 3a66 6465 6c3c 2f61 3e29 2873 oap::fdel)(s │ │ │ │ -0015de60: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -0015de70: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    │ │ │ │ -0015de80: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is │ │ │ │ -0015de90: 2063 616c 6c65 6420 6279 2074 6865 2073 called by the s │ │ │ │ -0015dea0: 6572 7669 6365 2064 6973 7061 7463 6865 ervice dispatche │ │ │ │ -0015deb0: 7220 7768 656e 2061 6e20 4854 5450 2044 r when an HTTP D │ │ │ │ -0015dec0: 454c 4554 4520 7265 7175 6573 7420 6973 ELETE request is │ │ │ │ -0015ded0: 2070 656e 6469 6e67 2e20 5265 6465 6669 pending. Redefi │ │ │ │ -0015dee0: 6e65 2074 6869 7320 6361 6c6c 6261 636b ne this callback │ │ │ │ -0015def0: 2074 6f20 7265 7370 6f6e 6420 746f 2048 to respond to H │ │ │ │ -0015df00: 5454 5020 4445 4c45 5445 2072 6571 7565 TTP DELETE reque │ │ │ │ -0015df10: 7374 732c 2073 6565 2074 6865 203c 636f sts, see the http_post HTTP P │ │ │ │ -0015dfc0: 4f53 5420 706c 7567 696e 2066 6f72 206d OST plugin for m │ │ │ │ -0015dfd0: 6f72 6520 6465 7461 696c 732e 2052 6574 ore details. Ret │ │ │ │ -0015dfe0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ -0015dff0: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a │ │ │ │ -0015e000: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat │ │ │ │ -0015e0c0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i │ │ │ │ -0015e0d0: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. │ │ │ │ -0015e0e0: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun │ │ │ │ -0015e0f0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t │ │ │ │ -0015e100: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so │ │ │ │ -0015e1d0: 6170 3a3a 6664 656c 3c2f 613e 3c2f 636f ap::fdel is the inter │ │ │ │ -0015e1f0: 6e61 6c20 7374 6174 6963 2066 756e 6374 nal static funct │ │ │ │ -0015e200: 696f 6e20 3c63 6f64 653e 6874 7470 5f64 ion http_d │ │ │ │ -0015e210: 656c 3c2f 636f 6465 3e20 7468 6174 2072 el that r │ │ │ │ -0015e220: 6574 7572 6e73 2074 6865 203c 636f 6465 eturns the #SOAP_DEL_METHO │ │ │ │ -0015e240: 443c 2f63 6f64 653e 2065 7272 6f72 2e3c D error.< │ │ │ │ -0015e250: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ -0015e280: 0a66 6f70 743c 2f68 333e 0a3c 703e 3c63 .fopt

    .

    int (s │ │ │ │ -0015e360: 6f61 703a 3a66 6f70 743c 2f61 3e29 2873 oap::fopt)(s │ │ │ │ -0015e370: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -0015e380: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    │ │ │ │ -0015e390: 4361 6c6c 6564 2062 7920 7468 6520 7365 Called by the se │ │ │ │ -0015e3a0: 7276 6963 6520 6469 7370 6174 6368 6572 rvice dispatcher │ │ │ │ -0015e3b0: 2077 6865 6e20 616e 2048 5454 5020 4f50 when an HTTP OP │ │ │ │ -0015e3c0: 5449 4f4e 2072 6571 7565 7374 2069 7320 TION request is │ │ │ │ -0015e3d0: 7065 6e64 696e 672e 2052 6564 6566 696e pending. Redefin │ │ │ │ -0015e3e0: 6520 7468 6973 2063 616c 6c62 6163 6b20 e this callback │ │ │ │ -0015e3f0: 746f 2072 6573 706f 6e64 2074 6f20 4854 to respond to HT │ │ │ │ -0015e400: 5450 204f 5054 494f 4e20 7265 7175 6573 TP OPTION reques │ │ │ │ -0015e410: 7473 2c20 7365 6520 7468 6520 3c63 6f64 ts, see the http_post HTTP PO │ │ │ │ -0015e4c0: 5354 2070 6c75 6769 6e20 666f 7220 6d6f ST plugin for mo │ │ │ │ -0015e4d0: 7265 2064 6574 6169 6c73 2e20 5265 7475 re details. Retu │ │ │ │ -0015e4e0: 726e 7320 3c63 6f64 653e 2353 4f41 505f rns #SOAP_ │ │ │ │ -0015e4f0: 4f4b 3c2f 636f 6465 3e20 6f72 2061 203c OK or a < │ │ │ │ -0015e500: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu │ │ │ │ -0015e5c0: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in │ │ │ │ -0015e5d0: 7429 2065 7272 6f72 2063 6f64 652e 2054 t) error code. T │ │ │ │ -0015e5e0: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func │ │ │ │ -0015e5f0: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to │ │ │ │ -0015e600: 203c 636f 6465 3e3c 6120 636c 6173 733d soa │ │ │ │ -0015e6d0: 703a 3a66 6f70 743c 2f61 3e3c 2f63 6f64 p::fopt is the intern │ │ │ │ -0015e6f0: 616c 2073 7461 7469 6320 6675 6e63 7469 al static functi │ │ │ │ -0015e700: 6f6e 203c 636f 6465 3e68 7474 705f 3230 on http_20 │ │ │ │ -0015e710: 303c 2f63 6f64 653e 2074 6861 7420 7265 0 that re │ │ │ │ -0015e720: 7475 726e 7320 4854 5450 2032 3030 204f turns HTTP 200 O │ │ │ │ -0015e730: 4b2e 3c2f 703e 0a3c 6833 3e3c 6120 636c K.

    .

    < │ │ │ │ -0015e760: 2f61 3e0a 6668 6561 643c 2f68 333e 0a3c /a>.fhead

    .< │ │ │ │ -0015e770: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int ( │ │ │ │ -0015e840: 736f 6170 3a3a 6668 6561 643c 2f61 3e29 soap::fhead) │ │ │ │ -0015e850: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -0015e860: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .< │ │ │ │ -0015e870: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ -0015e880: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ -0015e890: 2073 6572 7669 6365 2064 6973 7061 7463 service dispatc │ │ │ │ -0015e8a0: 6865 7220 7768 656e 2061 6e20 4854 5450 her when an HTTP │ │ │ │ -0015e8b0: 2048 4541 4420 7265 7175 6573 7420 6973 HEAD request is │ │ │ │ -0015e8c0: 2070 656e 6469 6e67 2e20 5265 6465 6669 pending. Redefi │ │ │ │ -0015e8d0: 6e65 2074 6869 7320 6361 6c6c 6261 636b ne this callback │ │ │ │ -0015e8e0: 2074 6f20 7265 7370 6f6e 6420 746f 2048 to respond to H │ │ │ │ -0015e8f0: 5454 5020 4845 4144 2072 6571 7565 7374 TTP HEAD request │ │ │ │ -0015e900: 7320 6d6f 7265 2073 7065 6369 6669 6361 s more specifica │ │ │ │ -0015e910: 6c6c 792e 2052 6574 7572 6e73 203c 636f lly. Returns #SOAP_OK or a s │ │ │ │ -0015e9f0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status (int) erro │ │ │ │ -0015ea10: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil │ │ │ │ -0015ea20: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as │ │ │ │ -0015ea30: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to │ │ │ │ -0015ea40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fhead is the │ │ │ │ -0015eb20: 2069 6e74 6572 6e61 6c20 7374 6174 6963 internal static │ │ │ │ -0015eb30: 2066 756e 6374 696f 6e20 3c63 6f64 653e function │ │ │ │ -0015eb40: 6874 7470 5f32 3030 3c2f 636f 6465 3e20 http_200 │ │ │ │ -0015eb50: 7468 6174 2072 6574 7572 6e73 2048 5454 that returns HTT │ │ │ │ -0015eb60: 5020 3230 3020 4f4b 2e3c 2f70 3e0a 3c68 P 200 OK.

    .
    .fform │ │ │ │ -0015eba0: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69 .

    i │ │ │ │ -0015ebb0: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap:: │ │ │ │ -0015ec80: 6666 6f72 6d3c 2f61 3e29 2873 7472 7563 fform)(struc │ │ │ │ -0015ec90: 7420 736f 6170 202a 736f 6170 293c 2f63 t soap *soap)

    .

    This │ │ │ │ -0015ecb0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal │ │ │ │ -0015ecc0: 6c65 6420 6279 2074 6865 2048 5454 5020 led by the HTTP │ │ │ │ -0015ecd0: 464f 524d 2068 616e 646c 6572 2070 6c75 FORM handler plu │ │ │ │ -0015ece0: 6769 6e20 746f 2070 6172 7365 2048 544d gin to parse HTM │ │ │ │ -0015ecf0: 4c20 666f 726d 7320 7265 6365 6976 6564 L forms received │ │ │ │ -0015ed00: 2077 6974 6820 4854 5450 2050 4f53 5420 with HTTP POST │ │ │ │ -0015ed10: 616e 6420 5055 5420 7265 7175 6573 7473 and PUT requests │ │ │ │ -0015ed20: 2c20 7365 6520 7468 6520 3c63 6f64 653e , see the │ │ │ │ -0015ed30: 3b3a 6874 7470 5f66 6f72 6d3c 2f63 6f64 ;:http_form HTTP FORM plu │ │ │ │ -0015ed50: 6769 6e20 666f 7220 6d6f 7265 2064 6574 gin for more det │ │ │ │ -0015ed60: 6169 6c73 2e20 5468 6520 4854 5450 2062 ails. The HTTP b │ │ │ │ -0015ed70: 6f64 7920 7769 7468 2074 6865 2066 6f72 ody with the for │ │ │ │ -0015ed80: 6d20 6461 7461 2073 686f 756c 6420 6265 m data should be │ │ │ │ -0015ed90: 2070 6172 7365 6420 6279 2074 6869 7320 parsed by this │ │ │ │ -0015eda0: 6361 6c6c 6261 636b 2c20 6f74 6865 7277 callback, otherw │ │ │ │ -0015edb0: 6973 6520 4854 5450 206b 6565 702d 616c ise HTTP keep-al │ │ │ │ -0015edc0: 6976 6520 6d65 7373 6167 6573 2077 696c ive messages wil │ │ │ │ -0015edd0: 6c20 656e 6420 7570 206f 7574 206f 6620 l end up out of │ │ │ │ -0015ede0: 7379 6e63 2061 7320 6120 7265 7375 6c74 sync as a result │ │ │ │ -0015edf0: 206f 6620 7468 6520 6375 7272 656e 7420 of the current │ │ │ │ -0015ee00: 706f 7369 7469 6f6e 206e 6f74 2062 6569 position not bei │ │ │ │ -0015ee10: 6e67 2061 6476 616e 6365 6420 746f 2074 ng advanced to t │ │ │ │ -0015ee20: 6865 2065 6e64 206f 6620 7468 6520 4854 he end of the HT │ │ │ │ -0015ee30: 5450 2062 6f64 792e 2052 6574 7572 6e73 TP body. Returns │ │ │ │ -0015ee40: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK< │ │ │ │ -0015ee50: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) │ │ │ │ -0015ef30: 6572 726f 7220 636f 6465 2e20 4e6f 2062 error code. No b │ │ │ │ -0015ef40: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function │ │ │ │ -0015ef50: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to │ │ │ │ -0015ef60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap │ │ │ │ -0015f030: 3a3a 6666 6f72 6d3c 2f61 3e3c 2f63 6f64 ::fform.

    .

    │ │ │ │ -0015f070: 3c2f 613e 0a66 6865 6164 6572 3c2f 6833 .fheader

    .

    int ( │ │ │ │ -0015f090: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fhea │ │ │ │ -0015f160: 6465 723c 2f61 3e29 2873 7472 7563 7420 der)(struct │ │ │ │ -0015f170: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

    .

    This c │ │ │ │ -0015f190: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle │ │ │ │ -0015f1a0: 6420 696d 6d65 6469 6174 656c 7920 6166 d immediately af │ │ │ │ -0015f1b0: 7465 7220 7061 7273 696e 6720 6120 534f ter parsing a SO │ │ │ │ -0015f1c0: 4150 2048 6561 6465 7220 696e 746f 2074 AP Header into t │ │ │ │ -0015f1d0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::header structu │ │ │ │ -0015f2b0: 7265 2e20 5468 6520 534f 4150 2048 6561 re. The SOAP Hea │ │ │ │ -0015f2c0: 6465 7220 7374 7275 6374 7572 6520 3c63 der structure soap │ │ │ │ -0015f390: 3a3a 6865 6164 6572 3c2f 613e 3c2f 636f ::header can be inspe │ │ │ │ -0015f3b0: 6374 6564 2062 7920 7468 6973 2066 756e cted by this fun │ │ │ │ -0015f3c0: 6374 696f 6e20 616e 6420 7665 7269 6669 ction and verifi │ │ │ │ -0015f3d0: 6564 206f 7220 7265 6a65 6374 6564 2062 ed or rejected b │ │ │ │ -0015f3e0: 6566 6f72 6520 7468 6520 7265 7374 206f efore the rest o │ │ │ │ -0015f3f0: 6620 7468 6520 6d65 7373 6167 6520 7769 f the message wi │ │ │ │ -0015f400: 7468 2074 6865 2053 4f41 5020 426f 6479 th the SOAP Body │ │ │ │ -0015f410: 2069 7320 636f 6e73 756d 6564 2e20 5265 is consumed. Re │ │ │ │ -0015f420: 7475 726e 7320 3c63 6f64 653e 2353 4f41 turns #SOA │ │ │ │ -0015f430: 505f 4f4b 3c2f 636f 6465 3e20 6f72 2061 P_OK or a │ │ │ │ -0015f440: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_sta │ │ │ │ -0015f500: 7475 733c 2f61 3e3c 2f63 6f64 653e 2028 tus ( │ │ │ │ -0015f510: 696e 7429 2065 7272 6f72 2063 6f64 652e int) error code. │ │ │ │ -0015f520: 204e 6f20 6275 696c 742d 696e 2066 756e No built-in fun │ │ │ │ -0015f530: 6374 696f 6e20 6973 2061 7373 6967 6e65 ction is assigne │ │ │ │ -0015f540: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fheader.

    .< │ │ │ │ -0015f630: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fign │ │ │ │ -0015f660: 6f72 653c 2f68 333e 0a3c 703e 3c63 6f64 ore.

    int (soa │ │ │ │ -0015f740: 703a 3a66 6967 6e6f 7265 3c2f 613e 2928 p::fignore)( │ │ │ │ -0015f750: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ -0015f760: 702c 2063 6f6e 7374 2063 6861 7220 2a74 p, const char *t │ │ │ │ -0015f770: 6167 293c 2f63 6f64 653e 3c2f 703e 0a3c ag)

    .< │ │ │ │ -0015f780: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ -0015f790: 6973 2063 616c 6c65 6420 7768 656e 2061 is called when a │ │ │ │ -0015f7a0: 6e20 756e 7265 636f 676e 697a 6564 2058 n unrecognized X │ │ │ │ -0015f7b0: 4d4c 2065 6c65 6d65 6e74 2077 6173 2065 ML element was e │ │ │ │ -0015f7c0: 6e63 6f75 6e74 6572 6564 206f 6e20 7468 ncountered on th │ │ │ │ -0015f7d0: 6520 696e 7075 7420 7468 6174 2063 6f75 e input that cou │ │ │ │ -0015f7e0: 6c64 2062 6520 6967 6e6f 7265 6420 6465 ld be ignored de │ │ │ │ -0015f7f0: 7065 6e64 696e 6720 6f6e 2073 6f6d 6520 pending on some │ │ │ │ -0015f800: 7370 6563 6966 6965 6420 6c6f 6769 632e specified logic. │ │ │ │ -0015f810: 2054 6865 203c 636f 6465 3e74 6167 3c2f The tag parameter │ │ │ │ -0015f830: 6973 2074 6865 206f 6666 656e 6469 6e67 is the offending │ │ │ │ -0015f840: 2058 4d4c 2065 6c65 6d65 6e74 2074 6167 XML element tag │ │ │ │ -0015f850: 206e 616d 6520 7374 7269 6e67 2e20 5468 name string. Th │ │ │ │ -0015f860: 6520 6361 6c6c 6261 636b 2073 686f 756c e callback shoul │ │ │ │ -0015f870: 6420 7265 7475 726e 203c 636f 6465 3e23 d return # │ │ │ │ -0015f880: 534f 4150 5f4f 4b3c 2f63 6f64 653e 2074 SOAP_OK t │ │ │ │ -0015f890: 6f20 6967 6e6f 7265 2074 6865 2065 6c65 o ignore the ele │ │ │ │ -0015f8a0: 6d65 6e74 206f 7220 7265 7475 726e 2061 ment or return a │ │ │ │ -0015f8b0: 6e20 3c63 6f64 653e 3c61 2063 6c61 7373 n soap_st │ │ │ │ -0015f970: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus │ │ │ │ -0015f980: 6572 726f 7220 636f 6465 2073 7563 6820 error code such │ │ │ │ -0015f990: 6173 203c 636f 6465 3e23 534f 4150 5f54 as #SOAP_T │ │ │ │ -0015f9a0: 4147 5f4d 4953 4d41 5443 483c 2f63 6f64 AG_MISMATCH to trigger a │ │ │ │ -0015f9c0: 7661 6c69 6461 7469 6f6e 2065 7272 6f72 validation error │ │ │ │ -0015f9d0: 2e20 5468 6973 2063 616c 6c62 6163 6b20 . This callback │ │ │ │ -0015f9e0: 616c 736f 206f 7665 7272 6964 6573 203c also overrides < │ │ │ │ -0015f9f0: 636f 6465 3e6d 7573 7455 6e64 6572 7374 code>mustUnderst │ │ │ │ -0015fa00: 616e 643c 2f63 6f64 653e 2061 7474 7269 and attri │ │ │ │ -0015fa10: 6275 7465 7320 6f6e 2075 6e72 6563 6f67 butes on unrecog │ │ │ │ -0015fa20: 6e69 7a65 6420 534f 4150 2048 6561 6465 nized SOAP Heade │ │ │ │ -0015fa30: 7220 656c 656d 656e 7473 2074 6861 7420 r elements that │ │ │ │ -0015fa40: 6e6f 726d 616c 6c79 2072 6169 7365 2066 normally raise f │ │ │ │ -0015fa50: 6175 6c74 732e 2049 7420 6973 2073 7472 aults. It is str │ │ │ │ -0015fa60: 6f6e 676c 7920 7265 636f 6d6d 656e 6465 ongly recommende │ │ │ │ -0015fa70: 6420 7468 6174 2074 6865 2063 616c 6c62 d that the callb │ │ │ │ -0015fa80: 6163 6b20 7265 7475 726e 7320 3c63 6f64 ack returns #SOAP_MUSTUNDE │ │ │ │ -0015faa0: 5253 5441 4e44 3c2f 636f 6465 3e20 7768 RSTAND wh │ │ │ │ -0015fab0: 656e 203c 636f 6465 3e3c 6120 636c 6173 en soap::mustUnder │ │ │ │ -0015fb80: 7374 616e 643c 2f61 3e3c 2f63 6f64 653e stand │ │ │ │ -0015fb90: 2021 3d20 3c63 6f64 653e 303c 2f63 6f64 != 0. Returns #SOAP_OK or a so │ │ │ │ -0015fc80: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error │ │ │ │ -0015fca0: 2063 6f64 652e 204e 6f20 6275 696c 742d code. No built- │ │ │ │ -0015fcb0: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a │ │ │ │ -0015fcc0: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fig │ │ │ │ -0015fda0: 6e6f 7265 3c2f 613e 3c2f 636f 6465 3e2e nore. │ │ │ │ -0015fdb0: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fsvalidate

    .

    int ( │ │ │ │ -0015fe00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fsva │ │ │ │ -0015fea0: 6c69 6461 7465 3c2f 613e 2928 7374 7275 lidate)(stru │ │ │ │ -0015feb0: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c │ │ │ │ -0015fec0: 6f6e 7374 2063 6861 7220 2a70 6174 7465 onst char *patte │ │ │ │ -0015fed0: 726e 2c20 636f 6e73 7420 6368 6172 202a rn, const char * │ │ │ │ -0015fee0: 7374 7269 6e67 293c 2f63 6f64 653e 3c2f string).

    This callb │ │ │ │ -0015ff00: 6163 6b20 6973 2063 616c 6c65 6420 746f ack is called to │ │ │ │ -0015ff10: 2076 616c 6964 6174 6520 6120 7374 7269 validate a stri │ │ │ │ -0015ff20: 6e67 2061 6761 696e 7374 2061 6e20 584d ng against an XM │ │ │ │ -0015ff30: 4c20 7265 6765 7820 7061 7474 6572 6e2e L regex pattern. │ │ │ │ -0015ff40: 2050 6174 7465 726e 7320 7573 6520 584d Patterns use XM │ │ │ │ -0015ff50: 4c20 7363 6865 6d61 2072 6567 6578 2073 L schema regex s │ │ │ │ -0015ff60: 796e 7461 782e 2054 6869 7320 6361 6c6c yntax. This call │ │ │ │ -0015ff70: 6261 636b 2061 6c6c 6f77 7320 7573 6572 back allows user │ │ │ │ -0015ff80: 2d64 6566 696e 6564 2070 6174 7465 726e -defined pattern │ │ │ │ -0015ff90: 2076 616c 6964 6174 696f 6e20 7468 6174 validation that │ │ │ │ -0015ffa0: 2069 7320 6e6f 726d 616c 6c79 2064 6973 is normally dis │ │ │ │ -0015ffb0: 6162 6c65 642e 2052 6574 7572 6e73 203c abled. Returns < │ │ │ │ -0015ffc0: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK when the st │ │ │ │ -0015ffe0: 7269 6e67 206d 6174 6368 6573 2074 6865 ring matches the │ │ │ │ -0015fff0: 2070 6174 7465 726e 206f 7220 3c63 6f64 pattern or #SOAP_TYPE when the str │ │ │ │ -00160020: 696e 6720 646f 6573 206e 6f74 206d 6174 ing does not mat │ │ │ │ -00160030: 6368 2e20 4e6f 2062 7569 6c74 2d69 6e20 ch. No built-in │ │ │ │ -00160040: 6675 6e63 7469 6f6e 2069 7320 6173 7369 function is assi │ │ │ │ -00160050: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fsvali │ │ │ │ -00160100: 6461 7465 3c2f 613e 3c2f 636f 6465 3e2e date. │ │ │ │ -00160110: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fwvalidate

    .

    int ( │ │ │ │ -00160160: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap: │ │ │ │ -00160200: 3a66 7776 616c 6964 6174 653c 2f61 3e29 :fwvalidate) │ │ │ │ -00160210: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -00160220: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char * │ │ │ │ -00160230: 7061 7474 6572 6e2c 2063 6f6e 7374 2077 pattern, const w │ │ │ │ -00160240: 6368 6172 5f74 202a 7374 7269 6e67 293c char_t *string)< │ │ │ │ -00160250: 2f63 6f64 653e 2054 6869 7320 6361 6c6c /code> This call │ │ │ │ -00160260: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t │ │ │ │ -00160270: 6f20 7661 6c69 6461 7465 2061 2077 6964 o validate a wid │ │ │ │ -00160280: 6520 7374 7269 6e67 2061 6761 696e 7374 e string against │ │ │ │ -00160290: 2061 6e20 584d 4c20 7265 6765 7820 7061 an XML regex pa │ │ │ │ -001602a0: 7474 6572 6e2e 2050 6174 7465 726e 7320 ttern. Patterns │ │ │ │ -001602b0: 7573 6520 584d 4c20 7363 6865 6d61 2072 use XML schema r │ │ │ │ -001602c0: 6567 6578 2073 796e 7461 782e 2054 6869 egex syntax. Thi │ │ │ │ -001602d0: 7320 6361 6c6c 6261 636b 2061 6c6c 6f77 s callback allow │ │ │ │ -001602e0: 7320 7573 6572 2d64 6566 696e 6564 2070 s user-defined p │ │ │ │ -001602f0: 6174 7465 726e 2076 616c 6964 6174 696f attern validatio │ │ │ │ -00160300: 6e20 7468 6174 2069 7320 6e6f 726d 616c n that is normal │ │ │ │ -00160310: 6c79 2064 6973 6162 6c65 642e 2052 6574 ly disabled. Ret │ │ │ │ -00160320: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ -00160330: 5f4f 4b3c 2f63 6f64 653e 2077 6865 6e20 _OK when │ │ │ │ -00160340: 7468 6520 7374 7269 6e67 206d 6174 6368 the string match │ │ │ │ -00160350: 6573 2074 6865 2070 6174 7465 726e 206f es the pattern o │ │ │ │ -00160360: 7220 3c63 6f64 653e 2353 4f41 505f 5459 r #SOAP_TY │ │ │ │ -00160370: 5045 3c2f 636f 6465 3e20 7768 656e 2074 PE when t │ │ │ │ -00160380: 6865 2073 7472 696e 6720 646f 6573 206e he string does n │ │ │ │ -00160390: 6f74 206d 6174 6368 2e20 4e6f 2062 7569 ot match. No bui │ │ │ │ -001603a0: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i │ │ │ │ -001603b0: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to s │ │ │ │ -00160460: 6f61 703a 3a66 7776 616c 6964 6174 653c oap::fwvalidate< │ │ │ │ -00160470: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    . │ │ │ │ -00160480: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fse │ │ │ │ -001604b0: 7465 7272 6f72 3c2f 6833 3e0a 3c70 3e3c terror

    .

    < │ │ │ │ -001604c0: 636f 6465 3e76 6f69 6420 283c 6120 636c code>void (soa │ │ │ │ -00160570: 703a 3a66 7365 7465 7272 6f72 3c2f 613e p::fseterror │ │ │ │ -00160580: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s │ │ │ │ -00160590: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char │ │ │ │ -001605a0: 2a2a 636f 6465 2c20 636f 6e73 7420 6368 **code, const ch │ │ │ │ -001605b0: 6172 202a 2a73 7472 696e 6729 3c2f 636f ar **string)

    .

    This │ │ │ │ -001605d0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ -001605e0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine │ │ │ │ -001605f0: 2077 6865 6e20 616e 2065 7272 6f72 2069 when an error i │ │ │ │ -00160600: 7320 7261 6973 6564 2074 6f20 616c 6c6f s raised to allo │ │ │ │ -00160610: 7720 696e 7370 6563 7469 6f6e 206f 7220 w inspection or │ │ │ │ -00160620: 6f76 6572 7269 6469 6e67 206f 6620 7468 overriding of th │ │ │ │ -00160630: 6520 6661 756c 7420 636f 6465 206f 7220 e fault code or │ │ │ │ -00160640: 6661 756c 7420 7374 7269 6e67 206d 6573 fault string mes │ │ │ │ -00160650: 7361 6765 7320 6265 666f 7265 2074 6865 sages before the │ │ │ │ -00160660: 2065 7272 6f72 2069 7320 7265 706f 7274 error is report │ │ │ │ -00160670: 6564 206f 7220 7472 616e 736d 6974 7465 ed or transmitte │ │ │ │ -00160680: 642e 204e 6f20 6275 696c 742d 696e 2066 d. No built-in f │ │ │ │ -00160690: 756e 6374 696f 6e20 6973 2061 7373 6967 unction is assig │ │ │ │ -001606a0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to s │ │ │ │ -00160750: 6f61 703a 3a66 7365 7465 7272 6f72 3c2f oap::fseterror.

    .< │ │ │ │ -00160770: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fope │ │ │ │ -001607a0: 6e3c 2f68 333e 0a3c 703e 3c63 6f64 653e n.

    │ │ │ │ -001607b0: 534f 4150 5f53 4f43 4b45 5420 283c 6120 SOAP_SOCKET (soap::fo │ │ │ │ -00160860: 7065 6e3c 2f61 3e29 2873 7472 7563 7420 pen)(struct │ │ │ │ -00160870: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons │ │ │ │ -00160880: 7420 6368 6172 202a 656e 6470 6f69 6e74 t char *endpoint │ │ │ │ -00160890: 2c20 636f 6e73 7420 6368 6172 202a 686f , const char *ho │ │ │ │ -001608a0: 7374 2c20 696e 7420 706f 7274 293c 2f63 st, int port)

    .

    This │ │ │ │ -001608c0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal │ │ │ │ -001608d0: 6c65 6420 6279 2074 6865 2065 6e67 696e led by the engin │ │ │ │ -001608e0: 6520 6174 2074 6865 2063 6c69 656e 742d e at the client- │ │ │ │ -001608f0: 7369 6465 2062 7920 3c63 6f64 653e 3c61 side by soap_co │ │ │ │ -00160980: 6e6e 6563 743c 2f61 3e3c 2f63 6f64 653e nnect │ │ │ │ -00160990: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or soap_connec │ │ │ │ -00160a10: 745f 636f 6d6d 616e 643c 2f61 3e3c 2f63 t_command to open a T │ │ │ │ -00160a30: 4350 206f 7220 5544 5020 636f 6e6e 6563 CP or UDP connec │ │ │ │ -00160a40: 7469 6f6e 2074 6f20 6120 7365 7276 6572 tion to a server │ │ │ │ -00160a50: 2073 7065 6369 6669 6564 2061 7420 616e specified at an │ │ │ │ -00160a60: 2065 6e64 706f 696e 742e 2050 6172 616d endpoint. Param │ │ │ │ -00160a70: 6574 6572 7320 3c63 6f64 653e 686f 7374 eters host │ │ │ │ -00160a80: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and port ar │ │ │ │ -00160aa0: 6520 6d69 6372 6f2d 7061 7273 6564 2066 e micro-parsed f │ │ │ │ -00160ab0: 726f 6d20 3c63 6f64 653e 656e 6470 6f69 rom endpoi │ │ │ │ -00160ac0: 6e74 3c2f 636f 6465 3e20 6265 666f 7265 nt before │ │ │ │ -00160ad0: 2062 6569 6e67 2070 6173 7365 6420 746f being passed to │ │ │ │ -00160ae0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fopen. Return │ │ │ │ -00160ba0: 7320 6120 7661 6c69 6420 736f 636b 6574 s a valid socket │ │ │ │ -00160bb0: 206f 7220 3c63 6f64 653e 2353 4f41 505f or #SOAP_ │ │ │ │ -00160bc0: 494e 5641 4c49 445f 534f 434b 4554 3c2f INVALID_SOCKET with a soap::e │ │ │ │ -00160c90: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e20 rror │ │ │ │ -00160ca0: 7365 7420 746f 2061 203c 636f 6465 3e3c set to a < │ │ │ │ -00160cb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00160cc0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -00160cd0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac │ │ │ │ -00160ce0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4 │ │ │ │ -00160cf0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444" │ │ │ │ -00160d00: 2074 6974 6c65 3d22 5374 6174 7573 2061 title="Status a │ │ │ │ -00160d10: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a │ │ │ │ -00160d20: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a │ │ │ │ -00160d30: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or # │ │ │ │ -00160d40: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean │ │ │ │ -00160d50: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,..."> │ │ │ │ -00160d60: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status< │ │ │ │ -00160d70: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err │ │ │ │ -00160d80: 6f72 2063 6f64 6520 616e 6420 3c63 6f64 or code and soap::errnum set to │ │ │ │ -00160e30: 203c 636f 6465 3e65 7272 6e6f 3c2f 636f errno of the conne │ │ │ │ -00160e50: 6374 696f 6e20 6661 696c 7572 652e 2054 ction failure. T │ │ │ │ -00160e60: 6865 2062 7569 6c74 2d69 6e20 6675 6e63 he built-in func │ │ │ │ -00160e70: 7469 6f6e 2061 7373 6967 6e65 6420 746f tion assigned to │ │ │ │ -00160e80: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fopen is tcp_connect.

    .

    .faccept.

    SOA │ │ │ │ -00160fa0: 505f 534f 434b 4554 2028 3c61 2063 6c61 P_SOCKET (soap::facc │ │ │ │ -00161060: 6570 743c 2f61 3e29 2873 7472 7563 7420 ept)(struct │ │ │ │ -00161070: 736f 6170 202a 736f 6170 2c20 534f 4150 soap *soap, SOAP │ │ │ │ -00161080: 5f53 4f43 4b45 5420 732c 2073 7472 7563 _SOCKET s, struc │ │ │ │ -00161090: 7420 736f 636b 6164 6472 202a 612c 2069 t sockaddr *a, i │ │ │ │ -001610a0: 6e74 202a 6e29 3c2f 636f 6465 3e3c 2f70 nt *n)

    .

    This callba │ │ │ │ -001610c0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ -001610d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 s │ │ │ │ -00161150: 6f61 705f 6163 6365 7074 3c2f 613e 3c2f oap_accept (or the C+ │ │ │ │ -00161170: 2b20 7365 7276 6963 6520 636c 6173 7320 + service class │ │ │ │ -00161180: 3c63 6f64 653e 6163 6365 7074 3c2f 636f accept method) to w │ │ │ │ -001611a0: 6169 7420 666f 7220 616e 6420 6163 6365 ait for and acce │ │ │ │ -001611b0: 7074 2061 2073 6f63 6b65 7420 636f 6e6e pt a socket conn │ │ │ │ -001611c0: 6563 7469 6f6e 2072 6571 7565 7374 6564 ection requested │ │ │ │ -001611d0: 2062 7920 6120 636c 6965 6e74 2e20 5265 by a client. Re │ │ │ │ -001611e0: 7475 726e 7320 6120 7661 6c69 6420 736f turns a valid so │ │ │ │ -001611f0: 636b 6574 206f 7220 3c63 6f64 653e 2353 cket or #S │ │ │ │ -00161200: 4f41 505f 494e 5641 4c49 445f 534f 434b OAP_INVALID_SOCK │ │ │ │ -00161210: 4554 3c2f 636f 6465 3e20 7768 656e 2061 ET when a │ │ │ │ -00161220: 6e20 6572 726f 7220 6f63 6375 7272 6564 n error occurred │ │ │ │ -00161230: 2061 6e64 2073 6574 7320 3c63 6f64 653e and sets │ │ │ │ -00161240: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::erro │ │ │ │ -001612f0: 723c 2f61 3e3c 2f63 6f64 653e 2074 6f20 r to │ │ │ │ -00161300: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st │ │ │ │ -001613c0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus │ │ │ │ -001613d0: 7661 6c75 652e 2054 6865 2062 7569 6c74 value. The built │ │ │ │ -001613e0: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass │ │ │ │ -001613f0: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to < │ │ │ │ -00161400: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00161410: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -00161420: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ -00161430: 6761 3832 3439 6234 6332 3366 3636 3264 ga8249b4c23f662d │ │ │ │ -00161440: 6265 3638 3061 6430 6465 6566 3237 3461 be680ad0deef274a │ │ │ │ -00161450: 6538 2220 7469 746c 653d 2243 616c 6c62 e8" title="Callb │ │ │ │ -00161460: 6163 6b20 7468 6174 2077 6169 7473 2066 ack that waits f │ │ │ │ -00161470: 6f72 2061 6e64 2061 6363 6570 7473 2061 or and accepts a │ │ │ │ -00161480: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti │ │ │ │ -00161490: 6f6e 2072 6571 7565 7374 6564 2062 7920 on requested by │ │ │ │ -001614a0: 6120 636c 6965 6e74 2e22 3e73 6f61 703a a client.">soap: │ │ │ │ -001614b0: 3a66 6163 6365 7074 3c2f 613e 3c2f 636f :faccept is tcp │ │ │ │ -001614d0: 5f61 6363 6570 743c 2f63 6f64 653e 2e3c _accept.< │ │ │ │ -001614e0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ -00161510: 0a66 636c 6f73 653c 2f68 333e 0a3c 703e .fclose

    .

    │ │ │ │ -00161520: 3c63 6f64 653e 696e 7420 283c 6120 636c int (soap │ │ │ │ -001615c0: 3a3a 6663 6c6f 7365 3c2f 613e 2928 7374 ::fclose)(st │ │ │ │ -001615d0: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap) │ │ │ │ -001615e0: 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 3e54

    .

    T │ │ │ │ -001615f0: 6869 7320 6361 6c6c 6261 636b 2069 7320 his callback is │ │ │ │ -00161600: 6361 6c6c 6564 2062 7920 7468 6520 656e called by the en │ │ │ │ -00161610: 6769 6e65 2061 7420 7468 6520 636c 6965 gine at the clie │ │ │ │ -00161620: 6e74 2d73 6964 6520 746f 2063 6c6f 7365 nt-side to close │ │ │ │ -00161630: 2074 6865 2063 7572 7265 6e74 2073 6f63 the current soc │ │ │ │ -00161640: 6b65 7420 636f 6e6e 6563 7469 6f6e 2062 ket connection b │ │ │ │ -00161650: 6566 6f72 6520 6120 6e65 7720 736f 636b efore a new sock │ │ │ │ -00161660: 6574 2063 6f6e 6e65 6374 696f 6e20 6973 et connection is │ │ │ │ -00161670: 2065 7374 6162 6c69 7368 6564 2e20 5468 established. Th │ │ │ │ -00161680: 6973 2063 616c 6c62 6163 6b20 6d61 7920 is callback may │ │ │ │ -00161690: 6265 2063 616c 6c65 6420 6d75 6c74 6970 be called multip │ │ │ │ -001616a0: 6c65 2074 696d 6573 2028 652e 672e 2062 le times (e.g. b │ │ │ │ -001616b0: 7920 7468 6520 656e 6769 6e65 2061 6e64 y the engine and │ │ │ │ -001616c0: 2062 7920 706c 7567 696e 7329 2074 6f20 by plugins) to │ │ │ │ -001616d0: 636c 6f73 6520 7468 6520 7361 6d65 2073 close the same s │ │ │ │ -001616e0: 6f63 6b65 7420 3c63 6f64 653e 3c61 2063 ocket soap::socket │ │ │ │ -001617b0: 3c2f 613e 3c2f 636f 6465 3e2e 2043 6865 . Che │ │ │ │ -001617c0: 636b 7320 696e 7465 726e 616c 6c79 2069 cks internally i │ │ │ │ -001617d0: 6620 3c63 6f64 653e 3c61 2063 6c61 7373 f │ │ │ │ -00161890: 736f 6170 3a3a 736f 636b 6574 3c2f 613e soap::socket │ │ │ │ -001618a0: 3c2f 636f 6465 3e20 3d3d 203c 636f 6465 == #SOAP_INVALID_S │ │ │ │ -001618c0: 4f43 4b45 543c 2f63 6f64 653e 2062 6566 OCKET bef │ │ │ │ -001618d0: 6f72 6520 636c 6f73 696e 672c 2077 6869 ore closing, whi │ │ │ │ -001618e0: 6368 206d 6561 6e73 2074 6861 7420 7468 ch means that th │ │ │ │ -001618f0: 6520 736f 636b 6574 2077 6173 2061 6c72 e socket was alr │ │ │ │ -00161900: 6561 6479 2063 6c6f 7365 642e 2052 6574 eady closed. Ret │ │ │ │ -00161910: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ -00161920: 5f4f 4b3c 2f63 6f64 653e 206f 7220 6120 _OK or a │ │ │ │ -00161930: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat │ │ │ │ -001619f0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i │ │ │ │ -00161a00: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. │ │ │ │ -00161a10: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun │ │ │ │ -00161a20: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t │ │ │ │ -00161a30: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o soap::f │ │ │ │ -00161ad0: 636c 6f73 653c 2f61 3e3c 2f63 6f64 653e close │ │ │ │ -00161ae0: 2069 7320 3c63 6f64 653e 7463 705f 6469 is tcp_di │ │ │ │ -00161af0: 7363 6f6e 6e65 6374 3c2f 636f 6465 3e2e sconnect. │ │ │ │ -00161b00: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fresolve

    . │ │ │ │ -00161b40: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fres │ │ │ │ -00161bf0: 6f6c 7665 3c2f 613e 2928 7374 7275 6374 olve)(struct │ │ │ │ -00161c00: 2073 6f61 7020 2a73 6f61 702c 2063 6f6e soap *soap, con │ │ │ │ -00161c10: 7374 2063 6861 7220 2a61 6464 722c 2073 st char *addr, s │ │ │ │ -00161c20: 7472 7563 7420 696e 5f61 6464 7220 2a69 truct in_addr *i │ │ │ │ -00161c30: 6e61 6464 7229 3c2f 636f 6465 3e3c 2f70 naddr)

    .

    This callba │ │ │ │ -00161c50: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ -00161c60: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_bind │ │ │ │ -00161ce0: 3c2f 613e 3c2f 636f 6465 3e20 286f 7220 (or │ │ │ │ -00161cf0: 7468 6520 432b 2b20 7365 7276 6963 6520 the C++ service │ │ │ │ -00161d00: 636c 6173 7320 3c63 6f64 653e 6269 6e64 class bind │ │ │ │ -00161d10: 3c2f 636f 6465 3e20 6d65 7468 6f64 2920 method) │ │ │ │ -00161d20: 6174 2074 6865 2073 6572 7665 722d 7369 at the server-si │ │ │ │ -00161d30: 6465 2061 6e64 2062 7920 3c63 6f64 653e de and by │ │ │ │ -00161d40: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ │ │ │ │ -00161dc0: 636f 6e6e 6563 743c 2f61 3e3c 2f63 6f64 connect or soap_conn │ │ │ │ -00161e50: 6563 745f 636f 6d6d 616e 643c 2f61 3e3c ect_command< │ │ │ │ -00161e60: 2f63 6f64 653e 2061 7420 7468 6520 636c /code> at the cl │ │ │ │ -00161e70: 6965 6e74 2d73 6964 6520 7769 7468 2061 ient-side with a │ │ │ │ -00161e80: 2068 6f73 7420 3c63 6f64 653e 6e61 6d65 host name │ │ │ │ -00161e90: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ -00161ea0: 7220 746f 2072 6573 6f6c 7665 2074 6f20 r to resolve to │ │ │ │ -00161eb0: 6164 6472 6573 7320 3c63 6f64 653e 696e address in │ │ │ │ -00161ec0: 6164 6472 3c2f 636f 6465 3e20 6279 2061 addr by a │ │ │ │ -00161ed0: 6464 7265 7373 2074 7261 6e73 6c61 7469 ddress translati │ │ │ │ -00161ee0: 6f6e 2e20 5768 656e 2073 7563 6365 7373 on. When success │ │ │ │ -00161ef0: 6675 6c20 7365 7473 2070 6172 616d 6574 ful sets paramet │ │ │ │ -00161f00: 6572 203c 636f 6465 3e69 6e61 6464 723c er inaddr< │ │ │ │ -00161f10: 2f63 6f64 653e 2061 6e64 2072 6574 7572 /code> and retur │ │ │ │ -00161f20: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O │ │ │ │ -00161f30: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status │ │ │ │ -00162000: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int │ │ │ │ -00162010: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th │ │ │ │ -00162020: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct │ │ │ │ -00162030: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to │ │ │ │ -00162040: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ -001620e0: 6170 3a3a 6672 6573 6f6c 7665 3c2f 613e ap::fresolve │ │ │ │ -001620f0: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is tcp_gethost.

    .

    .fconnect.

    int │ │ │ │ -00162160: 2028 3c61 2063 6c61 7373 3d22 656c 2220 (so │ │ │ │ -00162200: 6170 3a3a 6663 6f6e 6e65 6374 3c2f 613e ap::fconnect │ │ │ │ -00162210: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s │ │ │ │ -00162220: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char │ │ │ │ -00162230: 2a65 6e64 706f 696e 742c 2063 6f6e 7374 *endpoint, const │ │ │ │ -00162240: 2063 6861 7220 2a68 6f73 742c 2069 6e74 char *host, int │ │ │ │ -00162250: 2070 6f72 7429 3c2f 636f 6465 3e3c 2f70 port)

    .

    This callba │ │ │ │ -00162270: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ -00162280: 7468 6520 656e 6769 6e65 2074 6f20 6f70 the engine to op │ │ │ │ -00162290: 7469 6f6e 616c 6c79 206f 7665 7272 6964 tionally overrid │ │ │ │ -001622a0: 6520 636c 6965 6e74 2d73 6964 6520 636f e client-side co │ │ │ │ -001622b0: 6e6e 6563 7469 6e67 2e20 5468 6520 7061 nnecting. The pa │ │ │ │ -001622c0: 7261 6d65 7465 7273 203c 636f 6465 3e68 rameters h │ │ │ │ -001622d0: 6f73 743c 2f63 6f64 653e 2061 6e64 203c ost and < │ │ │ │ -001622e0: 636f 6465 3e70 6f72 743c 2f63 6f64 653e code>port │ │ │ │ -001622f0: 2077 6572 6520 6d69 6372 6f2d 7061 7273 were micro-pars │ │ │ │ -00162300: 6564 2066 726f 6d20 7468 6520 3c63 6f64 ed from the endpoint prior to passi │ │ │ │ -00162330: 6e67 2074 6865 6d20 746f 2074 6869 7320 ng them to this │ │ │ │ -00162340: 6361 6c6c 6261 636b 2e20 5265 7475 726e callback. Return │ │ │ │ -00162350: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK │ │ │ │ -00162360: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status< │ │ │ │ -00162430: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int) │ │ │ │ -00162440: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No │ │ │ │ -00162450: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio │ │ │ │ -00162460: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to │ │ │ │ -00162470: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fconnec │ │ │ │ -00162520: 743c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 t.

    .

    .f │ │ │ │ -00162560: 6469 7363 6f6e 6e65 6374 3c2f 6833 3e0a disconnect

    . │ │ │ │ -00162570: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fdiscon │ │ │ │ -00162620: 6e65 6374 3c2f 613e 2928 7374 7275 6374 nect)(struct │ │ │ │ -00162630: 2073 6f61 7020 2a73 6f61 7029 3c2f 636f soap *soap)

    .

    This │ │ │ │ -00162650: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ -00162660: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine │ │ │ │ -00162670: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_c │ │ │ │ -001626f0: 6c6f 7365 736f 636b 3c2f 613e 3c2f 636f losesock before the < │ │ │ │ -00162710: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fclo │ │ │ │ -001627b0: 7365 3c2f 613e 3c2f 636f 6465 3e20 6361 se ca │ │ │ │ -001627c0: 6c6c 6261 636b 2069 7320 6361 6c6c 6564 llback is called │ │ │ │ -001627d0: 2074 6f20 7368 7574 646f 776e 2f64 6973 to shutdown/dis │ │ │ │ -001627e0: 636f 6e6e 6563 742e 2052 6574 7572 6e73 connect. Returns │ │ │ │ -001627f0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK< │ │ │ │ -00162800: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) │ │ │ │ -001628e0: 6572 726f 7220 636f 6465 2e20 4e6f 2062 error code. No b │ │ │ │ -001628f0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function │ │ │ │ -00162900: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to │ │ │ │ -00162910: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap: │ │ │ │ -001629b0: 3a66 6469 7363 6f6e 6e65 6374 3c2f 613e :fdisconnect │ │ │ │ -001629c0: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    .

    .fclose │ │ │ │ -00162a00: 736f 636b 6574 3c2f 6833 3e0a 3c70 3e3c socket

    .

    < │ │ │ │ -00162a10: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap │ │ │ │ -00162aa0: 3a3a 6663 6c6f 7365 736f 636b 6574 3c2f ::fclosesocket)(struct soap │ │ │ │ -00162ac0: 2a73 6f61 702c 2053 4f41 505f 534f 434b *soap, SOAP_SOCK │ │ │ │ -00162ad0: 4554 2073 6f63 6b29 3c2f 636f 6465 3e3c ET sock)< │ │ │ │ -00162ae0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call │ │ │ │ -00162af0: 6261 636b 2069 7320 6361 6c6c 6564 2074 back is called t │ │ │ │ -00162b00: 6f20 636c 6f73 6520 6120 736f 636b 6574 o close a socket │ │ │ │ -00162b10: 2062 7920 7468 6520 656e 6769 6e65 2e20 by the engine. │ │ │ │ -00162b20: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S │ │ │ │ -00162b30: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or │ │ │ │ -00162b40: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s │ │ │ │ -00162c00: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus │ │ │ │ -00162c10: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod │ │ │ │ -00162c20: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in │ │ │ │ -00162c30: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne │ │ │ │ -00162c40: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soa │ │ │ │ -00162cd0: 703a 3a66 636c 6f73 6573 6f63 6b65 743c p::fclosesocket< │ │ │ │ -00162ce0: 2f61 3e3c 2f63 6f64 653e 2069 7320 3c63 /a> is tcp_closesoc │ │ │ │ -00162d00: 6b65 743c 2f63 6f64 653e 2e3c 2f70 3e0a ket.

    . │ │ │ │ -00162d10: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fsh │ │ │ │ -00162d40: 7574 646f 776e 736f 636b 6574 3c2f 6833 utdownsocket

    .

    int ( │ │ │ │ -00162d60: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fshu │ │ │ │ -00162df0: 7464 6f77 6e73 6f63 6b65 743c 2f61 3e29 tdownsocket) │ │ │ │ -00162e00: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ -00162e10: 6170 2c20 534f 4150 5f53 4f43 4b45 5420 ap, SOAP_SOCKET │ │ │ │ -00162e20: 736f 636b 2c20 696e 7420 686f 7729 3c2f sock, int how)

    .

    Thi │ │ │ │ -00162e40: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca │ │ │ │ -00162e50: 6c6c 6564 2074 6f20 7368 7574 2064 6f77 lled to shut dow │ │ │ │ -00162e60: 6e20 6120 736f 636b 6574 2062 7920 7468 n a socket by th │ │ │ │ -00162e70: 6520 656e 6769 6e65 2e20 5265 7475 726e e engine. Return │ │ │ │ -00162e80: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK │ │ │ │ -00162e90: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status< │ │ │ │ -00162f60: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int) │ │ │ │ -00162f70: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The │ │ │ │ -00162f80: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi │ │ │ │ -00162f90: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to < │ │ │ │ -00162fa0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap: │ │ │ │ -00163030: 3a66 7368 7574 646f 776e 736f 636b 6574 :fshutdownsocket │ │ │ │ -00163040: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is < │ │ │ │ -00163050: 636f 6465 3e74 6370 5f73 6875 7464 6f77 code>tcp_shutdow │ │ │ │ -00163060: 6e73 6f63 6b65 743c 2f63 6f64 653e 2e3c nsocket.< │ │ │ │ -00163070: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ -001630a0: 0a66 706f 6c6c 3c2f 6833 3e0a 3c70 3e3c .fpoll

    .

    < │ │ │ │ -001630b0: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap::fpol │ │ │ │ -00163180: 6c3c 2f61 3e29 2873 7472 7563 7420 736f l)(struct so │ │ │ │ -00163190: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap) │ │ │ │ -001631a0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal │ │ │ │ -001631b0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ -001631c0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to │ │ │ │ -001631d0: 2077 6169 7420 666f 7220 6163 7469 7669 wait for activi │ │ │ │ -001631e0: 7479 206f 6e20 7468 6520 3c63 6f64 653e ty on the │ │ │ │ -001631f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::so │ │ │ │ -001632b0: 636b 6574 3c2f 613e 3c2f 636f 6465 3e20 cket │ │ │ │ -001632c0: 6f72 203c 636f 6465 3e3c 6120 636c 6173 or soap::master socket │ │ │ │ -001633a0: 7573 696e 6720 3c63 6f64 653e 706f 6c6c using poll │ │ │ │ -001633b0: 3c2f 636f 6465 3e20 6f72 203c 636f 6465 or select. │ │ │ │ -001633d0: 5469 6d65 7320 6f75 7420 7768 656e 203c Times out when < │ │ │ │ -001633e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -00163490: 703a 3a73 656e 645f 7469 6d65 6f75 743c p::send_timeout< │ │ │ │ -001634a0: 2f61 3e3c 2f63 6f64 653e 206f 7220 3c63 /a> or s │ │ │ │ -00163560: 6f61 703a 3a72 6563 765f 7469 6d65 6f75 oap::recv_timeou │ │ │ │ -00163570: 743c 2f61 3e3c 2f63 6f64 653e 2061 7265 t are │ │ │ │ -00163580: 206e 6f6e 7a65 726f 2e20 5265 7475 726e nonzero. Return │ │ │ │ -00163590: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK │ │ │ │ -001635a0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status< │ │ │ │ -00163670: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int) │ │ │ │ -00163680: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The │ │ │ │ -00163690: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi │ │ │ │ -001636a0: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to < │ │ │ │ -001636b0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fpoll │ │ │ │ -00163780: 3c2f 636f 6465 3e20 6973 203c 636f 6465 is soap_poll.

    .

    < │ │ │ │ -001637d0: 2f61 3e0a 6672 6563 763c 2f68 333e 0a3c /a>.frecv

    .< │ │ │ │ -001637e0: 703e 3c63 6f64 653e 7369 7a65 5f74 2028 p>size_t ( │ │ │ │ -001637f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::f │ │ │ │ -00163890: 7265 6376 3c2f 613e 2928 7374 7275 6374 recv)(struct │ │ │ │ -001638a0: 2073 6f61 7020 2a73 6f61 702c 2063 6861 soap *soap, cha │ │ │ │ -001638b0: 7220 2a62 7566 2c20 7369 7a65 5f74 206c r *buf, size_t l │ │ │ │ -001638c0: 656e 293c 2f63 6f64 653e 3c2f 703e 0a3c en)

    .< │ │ │ │ -001638d0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ -001638e0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ -001638f0: 2065 6e67 696e 6520 746f 2072 6563 6569 engine to recei │ │ │ │ -00163900: 7665 2028 6f72 2072 6561 6429 2064 6174 ve (or read) dat │ │ │ │ -00163910: 6120 696e 746f 2061 2073 7065 6369 6669 a into a specifi │ │ │ │ -00163920: 6564 2062 7566 6665 7220 3c63 6f64 653e ed buffer │ │ │ │ -00163930: 6275 663c 2f63 6f64 653e 2061 6e64 203c buf and < │ │ │ │ -00163940: 636f 6465 3e6c 656e 3c2f 636f 6465 3e2e code>len
    . │ │ │ │ -00163950: 2054 6865 2073 6f75 7263 6520 666f 7220 The source for │ │ │ │ -00163960: 7468 6520 6461 7461 2074 6f20 7265 6164 the data to read │ │ │ │ -00163970: 2062 7920 7468 6973 2063 616c 6c62 6163 by this callbac │ │ │ │ -00163980: 6b20 6973 203c 636f 6465 3e3c 6120 636c k is soap::is< │ │ │ │ -00163a50: 2f63 6f64 653e 2077 6865 6e20 6e6f 6e2d /code> when non- │ │ │ │ -00163a60: 4e55 4c4c 2c20 3c63 6f64 653e 3c61 2063 NULL, soap::socket │ │ │ │ -00163b30: 3c2f 613e 3c2f 636f 6465 3e20 7768 656e when │ │ │ │ -00163b40: 2076 616c 6964 2c20 6f72 203c 636f 6465 valid, or soap::r │ │ │ │ -00163c10: 6563 7666 643c 2f61 3e3c 2f63 6f64 653e ecvfd │ │ │ │ -00163c20: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns │ │ │ │ -00163c30: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK │ │ │ │ -00163c40: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap │ │ │ │ -00163d00: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status (int) error c │ │ │ │ -00163d20: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i │ │ │ │ -00163d30: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig │ │ │ │ -00163d40: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::frec │ │ │ │ -00163df0: 763c 2f61 3e3c 2f63 6f64 653e 2069 7320 v is │ │ │ │ -00163e00: 3c63 6f64 653e 6672 6563 763c 2f63 6f64 frecv.

    .

    │ │ │ │ -00163e40: 3c2f 613e 0a66 7365 6e64 3c2f 6833 3e0a .fsend

    . │ │ │ │ -00163e50: 3c70 3e3c 636f 6465 3e69 6e74 2028 3c61

    int (soap::fs │ │ │ │ -00163ef0: 656e 643c 2f61 3e29 2873 7472 7563 7420 end)(struct │ │ │ │ -00163f00: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons │ │ │ │ -00163f10: 7420 6368 6172 202a 6275 662c 2073 697a t char *buf, siz │ │ │ │ -00163f20: 655f 7420 6c65 6e29 3c2f 636f 6465 3e3c e_t len)< │ │ │ │ -00163f30: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call │ │ │ │ -00163f40: 6261 636b 2069 7320 6361 6c6c 6564 2062 back is called b │ │ │ │ -00163f50: 7920 7468 6520 656e 6769 6e65 2074 6f20 y the engine to │ │ │ │ -00163f60: 7365 6e64 2028 6f72 2077 7269 7465 2920 send (or write) │ │ │ │ -00163f70: 6461 7461 2073 7065 6369 6669 6564 2062 data specified b │ │ │ │ -00163f80: 7920 3c63 6f64 653e 6461 7461 3c2f 636f y data bytes of len │ │ │ │ -00163fa0: 6774 6820 3c63 6f64 653e 6c65 6e3c 2f63 gth len. The sink f │ │ │ │ -00163fc0: 6f72 2074 6865 2064 6174 6120 746f 2062 or the data to b │ │ │ │ -00163fd0: 6520 7365 6e74 2074 6f20 6973 2074 7970 e sent to is typ │ │ │ │ -00163fe0: 6963 616c 6c79 203c 636f 6465 3e3c 6120 ically soap::socke │ │ │ │ -001640b0: 743c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 t, soap │ │ │ │ -00164180: 3a3a 7365 6e64 6664 3c2f 613e 3c2f 636f ::sendfd or soap::os. Return │ │ │ │ -00164270: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK │ │ │ │ -00164280: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status< │ │ │ │ -00164350: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int) │ │ │ │ -00164360: 2065 7272 6f72 2063 6f64 652e 2054 6865 error code. The │ │ │ │ -00164370: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi │ │ │ │ -00164380: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to < │ │ │ │ -00164390: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>s │ │ │ │ -00164420: 6f61 703a 3a66 7365 6e64 3c2f 613e 3c2f oap::fsend is f │ │ │ │ -00164440: 7365 6e64 3c2f 636f 6465 3e2e 3c2f 703e send.

    │ │ │ │ -00164450: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .fs │ │ │ │ -00164480: 6572 7665 726c 6f6f 703c 2f68 333e 0a3c erverloop

    .< │ │ │ │ -00164490: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::fservel │ │ │ │ -00164570: 6f6f 703c 2f61 3e29 2873 7472 7563 7420 oop)(struct │ │ │ │ -00164580: 736f 6170 202a 736f 6170 293c 2f63 6f64 soap *soap)

    .

    This c │ │ │ │ -001645a0: 616c 6c62 6163 6b20 6973 2063 616c 6c65 allback is calle │ │ │ │ -001645b0: 6420 6166 7465 7220 6561 6368 2073 7563 d after each suc │ │ │ │ -001645c0: 6365 7373 6675 6c20 636f 6d70 6c65 7469 cessful completi │ │ │ │ -001645d0: 6f6e 206f 6620 6120 7365 7276 6572 206f on of a server o │ │ │ │ -001645e0: 7065 7261 7469 6f6e 2069 6e20 7468 6520 peration in the │ │ │ │ -001645f0: 7365 7276 6572 206c 6f6f 702e 2045 7865 server loop. Exe │ │ │ │ -00164600: 6375 7465 7320 696d 6d65 6469 6174 656c cutes immediatel │ │ │ │ -00164610: 7920 6166 7465 7220 7365 6e64 696e 6720 y after sending │ │ │ │ -00164620: 7468 6520 7265 7370 6f6e 7365 2074 6f20 the response to │ │ │ │ -00164630: 6120 636c 6965 6e74 2061 6e64 2062 6566 a client and bef │ │ │ │ -00164640: 6f72 6520 7468 6520 6e65 7874 206b 6565 ore the next kee │ │ │ │ -00164650: 702d 616c 6976 6520 7365 7276 6572 206c p-alive server l │ │ │ │ -00164660: 6f6f 7020 6974 6572 6174 696f 6e20 7768 oop iteration wh │ │ │ │ -00164670: 656e 2065 6e61 626c 6564 2077 6974 6820 en enabled with │ │ │ │ -00164680: 3c63 6f64 653e 2353 4f41 505f 494f 5f4b #SOAP_IO_K │ │ │ │ -00164690: 4545 5041 4c49 5645 3c2f 636f 6465 3e2e EEPALIVE. │ │ │ │ -001646a0: 2054 6869 7320 6361 6c6c 6261 636b 2063 This callback c │ │ │ │ -001646b0: 616e 2062 6520 7573 6564 2074 6f20 7265 an be used to re │ │ │ │ -001646c0: 636c 6169 6d20 7265 736f 7572 6365 7320 claim resources │ │ │ │ -001646d0: 696e 2074 6865 206b 6565 702d 616c 6976 in the keep-aliv │ │ │ │ -001646e0: 6520 7365 7276 6572 206c 6f6f 702c 2066 e server loop, f │ │ │ │ -001646f0: 6f72 2065 7861 6d70 6c65 206d 616e 6167 or example manag │ │ │ │ -00164700: 6564 206d 656d 6f72 7920 6361 6e20 6265 ed memory can be │ │ │ │ -00164710: 2072 6563 6c61 696d 6564 2062 7920 6361 reclaimed by ca │ │ │ │ -00164720: 6c6c 696e 6720 3c63 6f64 653e 3c61 2063 lling soap_ │ │ │ │ -001647e0: 6465 7374 726f 793c 2f61 3e3c 2f63 6f64 destroy and soap_end in that ord │ │ │ │ -001648e0: 6572 2061 6e64 2061 6c6c 2064 6573 6572 er and all deser │ │ │ │ -001648f0: 6961 6c69 7a65 6420 616e 6420 6f74 6865 ialized and othe │ │ │ │ -00164900: 7220 6479 6e61 6d69 6361 6c6c 792d 616c r dynamically-al │ │ │ │ -00164910: 6c6f 6361 7465 6420 6461 7461 206d 616e located data man │ │ │ │ -00164920: 6167 6564 2062 7920 7468 6520 636f 6e74 aged by the cont │ │ │ │ -00164930: 6578 7420 7769 6c6c 2062 6520 6465 616c ext will be deal │ │ │ │ -00164940: 6c6f 6361 7465 642e 2052 6574 7572 6e73 located. Returns │ │ │ │ -00164950: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK< │ │ │ │ -00164960: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) │ │ │ │ -00164a40: 6572 726f 7220 636f 6465 2e20 4e6f 2062 error code. No b │ │ │ │ -00164a50: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function │ │ │ │ -00164a60: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to │ │ │ │ -00164a70: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap │ │ │ │ -00164b40: 3a3a 6673 6572 7665 6c6f 6f70 3c2f 613e ::fserveloop │ │ │ │ -00164b50: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    .

    .fmallo │ │ │ │ -00164b90: 633c 2f68 333e 0a3c 703e 3c63 6f64 653e c

    .

    │ │ │ │ -00164ba0: 766f 6964 2028 3c61 2063 6c61 7373 3d22 void (soap::fmalloc< │ │ │ │ -00164c50: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap │ │ │ │ -00164c60: 202a 736f 6170 2c20 7369 7a65 5f74 2073 *soap, size_t s │ │ │ │ -00164c70: 697a 6529 3c2f 636f 6465 3e3c 2f70 3e0a ize)

    . │ │ │ │ -00164c80: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback │ │ │ │ -00164c90: 2063 616e 2062 6520 7573 6564 2074 6f20 can be used to │ │ │ │ -00164ca0: 6f76 6572 7269 6465 206d 656d 6f72 7920 override memory │ │ │ │ -00164cb0: 616c 6c6f 6361 7469 6f6e 2061 6e64 206d allocation and m │ │ │ │ -00164cc0: 616e 6167 656d 656e 7420 646f 6e65 2062 anagement done b │ │ │ │ -00164cd0: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap_m │ │ │ │ -00164d80: 616c 6c6f 633c 2f61 3e3c 2f63 6f64 653e alloc │ │ │ │ -00164d90: 2069 6e20 432e 204d 656d 6f72 7920 616c in C. Memory al │ │ │ │ -00164da0: 6c6f 6361 7465 6420 7669 6120 7468 6973 located via this │ │ │ │ -00164db0: 2063 616c 6c62 6163 6b20 7769 6c6c 206e callback will n │ │ │ │ -00164dc0: 6f74 2062 6520 6d61 6e61 6765 6420 616e ot be managed an │ │ │ │ -00164dd0: 6420 6e6f 7420 6265 2061 7574 6f6d 6174 d not be automat │ │ │ │ -00164de0: 6963 616c 6c79 2072 656c 6561 7365 6420 ically released │ │ │ │ -00164df0: 6279 2074 6865 2065 6e67 696e 652e 2049 by the engine. I │ │ │ │ -00164e00: 6e73 7465 6164 2c20 7468 6520 6170 706c nstead, the appl │ │ │ │ -00164e10: 6963 6174 696f 6e20 7573 696e 6720 7468 ication using th │ │ │ │ -00164e20: 6973 2063 616c 6c62 6163 6b20 7368 6f75 is callback shou │ │ │ │ -00164e30: 6c64 2072 656c 6561 7365 2061 6c6c 6f63 ld release alloc │ │ │ │ -00164e40: 6174 6564 206d 656d 6f72 792e 2041 6c6c ated memory. All │ │ │ │ -00164e50: 2061 6c6c 6f63 6174 696f 6e73 2064 6f6e allocations don │ │ │ │ -00164e60: 6520 6279 203c 636f 6465 3e3c 6120 636c e by soa │ │ │ │ -00164f10: 705f 6d61 6c6c 6f63 3c2f 613e 3c2f 636f p_malloc are replaced │ │ │ │ -00164f30: 2077 6974 6820 6120 6361 6c6c 2074 6f20 with a call to │ │ │ │ -00164f40: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmalloc< │ │ │ │ -00164ff0: 2f61 3e3c 2f63 6f64 653e 2e20 486f 7765 /a>. Howe │ │ │ │ -00165000: 7665 722c 206e 6f20 6f74 6865 7220 616c ver, no other al │ │ │ │ -00165010: 6c6f 6361 7469 6f6e 732c 2073 7563 6820 locations, such │ │ │ │ -00165020: 6173 203c 636f 6465 3e3c 6120 636c 6173 as │ │ │ │ -001650b0: 736f 6170 5f6e 6577 3c2f 613e 3c2f 636f soap_new and so │ │ │ │ -001650d0: 6170 5f6e 6577 5f54 3c2f 636f 6465 3e20 ap_new_T │ │ │ │ -001650e0: 666f 7220 432b 2b20 636c 6173 7365 7320 for C++ classes │ │ │ │ -001650f0: 3c63 6f64 653e 543c 2f63 6f64 653e 2061 T a │ │ │ │ -00165100: 7265 2061 6666 6563 7465 642c 2062 6563 re affected, bec │ │ │ │ -00165110: 6175 7365 206f 626a 6563 7473 2061 7265 ause objects are │ │ │ │ -00165120: 2061 6c6c 6f63 6174 6564 2064 6966 6665 allocated diffe │ │ │ │ -00165130: 7265 6e74 6c79 2e20 5468 6973 2063 616c rently. This cal │ │ │ │ -00165140: 6c62 6163 6b20 6973 2074 6865 7265 666f lback is therefo │ │ │ │ -00165150: 7265 206e 6f74 2075 7365 6675 6c20 666f re not useful fo │ │ │ │ -00165160: 7220 432b 2b20 6170 706c 6963 6174 696f r C++ applicatio │ │ │ │ -00165170: 6e73 2e20 5265 7475 726e 7320 6120 706f ns. Returns a po │ │ │ │ -00165180: 696e 7465 7220 746f 2064 796e 616d 6963 inter to dynamic │ │ │ │ -00165190: 616c 6c79 2061 6c6c 6f63 6174 6564 206d ally allocated m │ │ │ │ -001651a0: 656d 6f72 7920 6f72 204e 554c 4c20 6f6e emory or NULL on │ │ │ │ -001651b0: 2066 6169 6c75 7265 2074 6f20 616c 6c6f failure to allo │ │ │ │ -001651c0: 6361 7465 2e20 4e6f 2062 7569 6c74 2d69 cate. No built-i │ │ │ │ -001651d0: 6e20 6675 6e63 7469 6f6e 2069 7320 6173 n function is as │ │ │ │ -001651e0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to │ │ │ │ -001651f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ -00165290: 3a3a 666d 616c 6c6f 633c 2f61 3e3c 2f63 ::fmalloc.

    .
    Warnin │ │ │ │ -001652d0: 673c 2f64 743e 3c64 643e 4465 7072 6563 g
    Deprec │ │ │ │ -001652e0: 6174 6564 2073 696e 6365 2032 2e38 2e37 ated since 2.8.7 │ │ │ │ -001652f0: 322e 2044 6566 696e 6520 3c63 6f64 653e 2. Define │ │ │ │ -00165300: 2353 4f41 505f 4d41 4c4c 4f43 3c2f 636f #SOAP_MALLOC and #S │ │ │ │ -00165320: 4f41 505f 4652 4545 3c2f 636f 6465 3e20 OAP_FREE │ │ │ │ -00165330: 696e 7374 6561 642e 3c2f 6464 3e3c 2f64 instead.
    .

    . │ │ │ │ -00165370: 7573 6572 2076 6172 6961 626c 653c 2f68 user variable.

    A vo │ │ │ │ -00165390: 6964 2a20 3c61 2063 6c61 7373 3d22 656c id* soap │ │ │ │ -00165450: 3a3a 7573 6572 3c2f 613e 3c2f 636f 6465 ::user variable is av │ │ │ │ -00165470: 6169 6c61 626c 6520 746f 2070 6173 7320 ailable to pass │ │ │ │ -00165480: 7573 6572 2d64 6566 696e 6564 2064 6174 user-defined dat │ │ │ │ -00165490: 6120 746f 2074 6865 2063 616c 6c62 6163 a to the callbac │ │ │ │ -001654a0: 6b73 2e3c 2f70 3e0a 3c68 333e 3c61 2063 ks.

    .

    │ │ │ │ -001654d0: 3c2f 613e 0a45 7861 6d70 6c65 733c 2f68 .Examples.

    The follow │ │ │ │ -001654f0: 696e 6720 6578 616d 706c 6520 7573 6573 ing example uses │ │ │ │ -00165500: 2049 2f4f 2063 616c 6c62 6163 6b73 2066 I/O callbacks f │ │ │ │ -00165510: 6f72 2063 7573 746f 6d69 7a65 6420 7365 or customized se │ │ │ │ -00165520: 7269 616c 697a 6174 696f 6e20 6f66 2064 rialization of d │ │ │ │ -00165530: 6174 6120 696e 746f 2061 2066 6978 6564 ata into a fixed │ │ │ │ -00165540: 2d73 697a 6520 6275 6666 6572 2061 6e64 -size buffer and │ │ │ │ -00165550: 2064 6573 6572 6961 6c69 7a61 7469 6f6e deserialization │ │ │ │ -00165560: 2062 6163 6b20 696e 746f 2061 2064 6174 back into a dat │ │ │ │ -00165570: 6120 7374 7275 6374 7572 653a 3c2f 703e a structure:

    │ │ │ │ -00165580: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    char b │ │ │ │ -001655d0: 7566 5b31 3030 3030 5d3b 203c 7370 616e uf[10000]; // XML buffer < │ │ │ │ -00165600: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -00165620: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00165630: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int len1 = 0; │ │ │ │ -00165650: 203c 7370 616e 2063 6c61 7373 3d22 636f // #chars │ │ │ │ -00165670: 2077 7269 7474 656e 203c 2f73 7061 6e3e written │ │ │ │ -00165680: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int le │ │ │ │ -001656c0: 6e32 203d 2030 3b20 2020 203c 7370 616e n2 = 0; // #chars read │ │ │ │ -001656f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . *a = NUL │ │ │ │ +00158cb0: 4c3b 3c2f 6469 763e 0a3c 6469 7620 636c L;

    .
    } .
    │ │ │ │ +00158d00: 696e 743c 2f73 7061 6e3e 2073 6f61 705f int soap_ │ │ │ │ +00158d10: 6f75 745f 4d79 4461 7461 283c 7370 616e out_MyData(struct < │ │ │ │ +00158d40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00158d50: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00158d60: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +00158d70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00158da0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ +00158de0: 6172 3c2f 7370 616e 3e20 2a74 6167 2c20 ar *tag, │ │ │ │ +00158df0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int i │ │ │ │ +00158e30: 643c 2f73 7061 6e3e 2c20 4d79 4461 7461 d, MyData │ │ │ │ +00158e40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const*a, con │ │ │ │ +00158e80: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +00158eb0: 2a74 7970 6529 203c 2f64 6976 3e0a 3c64 *type)
    . │ │ │ │ +00158ed0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if │ │ │ │ +00158f10: 2873 6f61 705f 656c 656d 656e 745f 6265 (soap_element_be │ │ │ │ +00158f20: 6769 6e5f 6f75 7428 3c61 2063 6c61 7373 gin_out(s │ │ │ │ +00158f50: 6f61 703c 2f61 3e2c 2074 6167 2c20 3c73 oap, tag, id, type) / │ │ │ │ +00158fa0: 2f20 7072 696e 7420 584d 4c20 6265 6769 / print XML begi │ │ │ │ +00158fb0: 6e6e 696e 6720 7461 6720 3c2f 7370 616e nning tag
    .
    || │ │ │ │ +00158fe0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 │ │ │ │ +00159030: 736f 6170 5f73 656e 643c 2f61 3e28 3c61 soap_send(soap, * │ │ │ │ +00159070: 6129 203c 7370 616e 2063 6c61 7373 3d22 a) // just │ │ │ │ +00159090: 2070 7269 6e74 2074 6865 2073 7472 696e print the strin │ │ │ │ +001590a0: 6720 286e 6f20 584d 4c20 636f 6e76 6572 g (no XML conver │ │ │ │ +001590b0: 7369 6f6e 2920 3c2f 7370 616e 3e3c 2f64 sion) .
    || soap │ │ │ │ +001590e0: 5f65 6c65 6d65 6e74 5f65 6e64 5f6f 7574 _element_end_out │ │ │ │ +001590f0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +00159120: 2c20 7461 6729 2920 3c73 7061 6e20 636c , tag)) // │ │ │ │ +00159140: 2070 7269 6e74 2058 4d4c 2065 6e64 696e print XML endin │ │ │ │ +00159150: 6720 7461 6720 3c2f 7370 616e 3e3c 2f64 g tag . │ │ │ │ +00159230: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r │ │ │ │ +00159260: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK; .
    }
    . │ │ │ │ +001592f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    MyData **soap_ │ │ │ │ +00159310: 696e 5f4d 7944 6174 6128 3c73 7061 6e20 in_MyData( │ │ │ │ +00159330: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +00159370: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00159380: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00159390: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001593a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ +001593e0: 723c 2f73 7061 6e3e 202a 7461 672c 204d r *tag, M │ │ │ │ +001593f0: 7944 6174 6120 2a61 2c20 3c73 7061 6e20 yData *a, │ │ │ │ +00159410: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *type)
    │ │ │ │ +00159450: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +00159480: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00159490: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (soap_element │ │ │ │ +001594b0: 5f62 6567 696e 5f69 6e28 3c61 2063 6c61 _begin_in(soap, tag)) │ │ │ │ +001594f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return NULL; .
    if (!a) │ │ │ │ +00159580: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    a = │ │ │ │ +001595a0: 2028 4d79 4461 7461 2a29 3c61 2063 6c61 (MyData*)s │ │ │ │ +00159600: 6f61 705f 6d61 6c6c 6f63 3c2f 613e 283c oap_malloc(< │ │ │ │ +00159610: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00159620: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00159630: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +00159640: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(MyData)); .
    if (soap-&g │ │ │ │ +001596e0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;null< │ │ │ │ +00159730: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    .
    │ │ │ │ +00159750: 2020 2a61 203d 204e 554c 4c3b 203c 7370 *a = NULL; // xsi:nil el │ │ │ │ +00159780: 656d 656e 7420 3c2f 7370 616e 3e3c 2f64 ement .
    if (*soap-&g │ │ │ │ +00159800: 743b 7479 7065 2026 616d 703b 2661 6d70 t;type && │ │ │ │ +00159810: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap_match_t │ │ │ │ +00159870: 6167 3c2f 613e 283c 6120 636c 6173 733d ag(so │ │ │ │ +001598a0: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, s │ │ │ │ +001598d0: 6f61 703c 2f61 3e2d 2667 743b 7479 7065 oap->type │ │ │ │ +001598e0: 2c20 7479 7065 2929 203c 2f64 6976 3e0a , type))
    . │ │ │ │ +001598f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ +00159920: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->e │ │ │ │ +001599a0: 7272 6f72 3c2f 613e 203d 203c 6120 636c rror = S │ │ │ │ +00159a00: 4f41 505f 5459 5045 3c2f 613e 3b20 3c2f OAP_TYPE; .
    return NULL; / │ │ │ │ +00159a70: 2f20 7479 7065 206d 6973 6d61 7463 6820 / type mismatch │ │ │ │ +00159a80: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00159aa0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    < │ │ │ │ +00159ac0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00159ad0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (*soap │ │ │ │ +00159b10: 3c2f 613e 2d26 6774 3b68 7265 6629 203c ->href) < │ │ │ │ +00159b20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    a = │ │ │ │ +00159b40: 284d 7944 6174 612a 2a29 736f 6170 5f69 (MyData**)soap_i │ │ │ │ +00159b50: 645f 666f 7277 6172 6428 3c61 2063 6c61 d_forward(soap, soap->h │ │ │ │ +00159bc0: 7265 662c 2061 2c20 302c 2053 4f41 505f ref, a, 0, SOAP_ │ │ │ │ +00159bd0: 5459 5045 5f4d 7944 6174 612c 2030 2c20 TYPE_MyData, 0, │ │ │ │ +00159be0: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(MyData), 0, │ │ │ │ +00159c10: 4e55 4c4c 2c20 4e55 4c4c 2920 3c2f 6469 NULL, NULL) .
    else if │ │ │ │ +00159c80: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->b │ │ │ │ +00159d00: 6f64 793c 2f61 3e29 203c 2f64 6976 3e0a ody)
    . │ │ │ │ +00159d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ +00159d40: 2020 3c73 7061 6e20 636c 6173 733d 226b char │ │ │ │ +00159d60: 3c2f 7370 616e 3e20 2a73 203d 2073 6f61 *s = soa │ │ │ │ +00159d70: 705f 7661 6c75 6528 3c61 2063 6c61 7373 p_value(s │ │ │ │ +00159da0: 6f61 703c 2f61 3e29 3b20 3c73 7061 6e20 oap); │ │ │ │ +00159dc0: 2f2f 2066 696c 6c20 6275 6666 6572 203c // fill buffer < │ │ │ │ +00159dd0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +00159df0: 2020 202a 6120 3d20 283c 7370 616e 2063 *a = (char*) │ │ │ │ +00159e20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_malloc │ │ │ │ +00159e80: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ +00159eb0: 3c2f 613e 2c20 7374 726c 656e 2873 292b , strlen(s)+ │ │ │ │ +00159ec0: 3129 3b20 3c2f 6469 763e 0a3c 6469 7620 1);
    .
    │ │ │ │ +00159ee0: 2073 7472 6370 7928 2a61 2c20 7329 3b20 strcpy(*a, s); │ │ │ │ +00159ef0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .. │ │ │ │ +0015a030: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +0015a060: 7265 7475 726e 3c2f 7370 616e 3e20 4e55 return NU │ │ │ │ +0015a070: 4c4c 3b20 3c2f 6469 763e 0a3c 6469 7620 LL;
    .
    < │ │ │ │ +0015a090: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0015a0a0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +0015a0b0: 2f73 7061 6e3e 2061 3b20 3c2f 6469 763e /span> a;
    │ │ │ │ +0015a0c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    < │ │ │ │ +0015a130: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +0015a140: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">SOAP_T │ │ │ │ +0015a190: 5950 453c 2f61 3e3c 2f64 6976 3e3c 6469 YPE
    #define SOAP_TY │ │ │ │ +0015a1c0: 5045 3c2f 6469 763e 3c64 6976 2063 6c61 PE
    A soa │ │ │ │ +0015a1e0: 705f 7374 6174 7573 2065 7272 6f72 2063 p_status error c │ │ │ │ +0015a1f0: 6f64 653a 2058 4d4c 2065 6c65 6d65 6e74 ode: XML element │ │ │ │ +0015a200: 206f 7220 6174 7472 6962 7574 6520 6861 or attribute ha │ │ │ │ +0015a210: 7320 6120 6d69 736d 6174 6368 696e 6720 s a mismatching │ │ │ │ +0015a220: 7479 7065 206f 7220 7661 6c75 6520 7468 type or value th │ │ │ │ +0015a230: 6174 2069 7320 6361 7573 696e 6720 6120 at is causing a │ │ │ │ +0015a240: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ │ +0015a260: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +0015a270: 7464 736f 6170 322e 683a 3236 3037 3c2f tdsoap2.h:2607
    .
    < │ │ │ │ +0015a2f0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ +0015a300: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga │ │ │ │ +0015a310: 3737 3132 6635 6263 3336 3132 3730 3530 7712f5bc36127050 │ │ │ │ +0015a320: 6131 3161 6439 3935 6430 3539 3362 6463 a11ad995d0593bdc │ │ │ │ +0015a330: 223e 736f 6170 5f73 656e 643c 2f61 3e3c ">soap_send< │ │ │ │ +0015a340: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa │ │ │ │ +0015a360: 705f 7365 6e64 2873 7472 7563 7420 736f p_send(struct so │ │ │ │ +0015a370: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const │ │ │ │ +0015a380: 6368 6172 202a 7329 3c2f 6469 763e 3c64 char *s)
    Send a string.< │ │ │ │ +0015a3b0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .< │ │ │ │ +0015a480: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0015a490: 6922 3e69 6e74 2073 6f61 705f 6d61 7463 i">int soap_matc │ │ │ │ +0015a4a0: 685f 7461 6728 7374 7275 6374 2073 6f61 h_tag(struct soa │ │ │ │ +0015a4b0: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c │ │ │ │ +0015a4c0: 6861 7220 2a74 6167 312c 2063 6f6e 7374 har *tag1, const │ │ │ │ +0015a4d0: 2063 6861 7220 2a74 6167 3229 3c2f 6469 char *tag2)
    Match an XM │ │ │ │ +0015a500: 4c20 7461 6720 6e61 6d65 2e3c 2f64 6976 L tag name.
    .
    soap::body< │ │ │ │ +0015a5c0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    short b │ │ │ │ +0015a5e0: 6f64 793c 2f64 6976 3e3c 6469 7620 636c ody
    The │ │ │ │ +0015a600: 736f 6170 3a3a 626f 6479 2066 6c61 6720 soap::body flag │ │ │ │ +0015a610: 6973 2073 6574 2077 6865 6e20 616e 2065 is set when an e │ │ │ │ +0015a620: 6c65 6d65 6e74 2068 6173 2065 6c65 6d65 lement has eleme │ │ │ │ +0015a630: 6e74 2063 6f6e 7465 6e74 2064 7572 696e nt content durin │ │ │ │ +0015a640: 6720 584d 4c20 7061 7273 696e 6720 6f72 g XML parsing or │ │ │ │ +0015a650: 2077 6865 6e20 6120 4854 5450 206d 6573 when a HTTP mes │ │ │ │ +0015a660: 732e 2e2e 3c2f 6469 763e 3c64 6976 2063 s...
    │ │ │ │ +0015a680: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ +0015a690: 7374 6473 6f61 7032 2e68 3a32 3936 353c stdsoap2.h:2965< │ │ │ │ +0015a6a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    ..

    More infor │ │ │ │ +0015a850: 6d61 7469 6f6e 206f 6e20 6375 7374 6f6d mation on custom │ │ │ │ +0015a860: 2073 6572 6961 6c69 7a61 7469 6f6e 2069 serialization i │ │ │ │ +0015a870: 7320 6176 6169 6c61 626c 6520 696e 2074 s available in t │ │ │ │ +0015a880: 6865 2067 534f 4150 2073 6f75 7263 6520 he gSOAP source │ │ │ │ +0015a890: 636f 6465 2070 6163 6b61 6765 2069 6e20 code package in │ │ │ │ +0015a8a0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs │ │ │ │ +0015a8b0: 6f61 702f 6375 7374 6f6d 3c2f 636f 6465 oap/custom directory │ │ │ │ +0015a8d0: 2c20 7768 6572 6520 796f 7520 6361 6e20 , where you can │ │ │ │ +0015a8e0: 616c 736f 2066 696e 6420 7365 7665 7261 also find severa │ │ │ │ +0015a8f0: 6c20 6375 7374 6f6d 2073 6572 6961 6c69 l custom seriali │ │ │ │ +0015a900: 7a65 7273 2074 6f20 7573 6520 7769 7468 zers to use with │ │ │ │ +0015a910: 2079 6f75 7220 7072 6f6a 6563 7473 2e3c your projects.< │ │ │ │ +0015a920: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to │ │ │ │ +0015a940: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ +0015a950: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

    .

    .Function call │ │ │ │ +0015a990: 6261 636b 7320 666f 7220 6375 7374 6f6d backs for custom │ │ │ │ +0015a9a0: 697a 6564 2049 2f4f 2061 6e64 2048 5454 ized I/O and HTT │ │ │ │ +0015a9b0: 5020 6861 6e64 6c69 6e67 3c2f 6832 3e0a P handling

    . │ │ │ │ +0015a9c0: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following │ │ │ │ +0015a9d0: 206c 6973 7420 6f66 2066 756e 6374 696f list of functio │ │ │ │ +0015a9e0: 6e73 2063 616e 2062 6520 7573 6564 2066 ns can be used f │ │ │ │ +0015a9f0: 6f72 2063 7573 746f 6d69 7a65 6420 4854 or customized HT │ │ │ │ +0015aa00: 5450 2068 616e 646c 696e 6720 616e 6420 TP handling and │ │ │ │ +0015aa10: 492f 4f2e 3c2f 703e 0a3c 703e 5365 6520 I/O.

    .

    See │ │ │ │ +0015aa20: 616c 736f 2041 5049 2064 6f63 756d 656e also API documen │ │ │ │ +0015aa30: 7461 7469 6f6e 204d 6f64 756c 6520 3c61 tation Module │ │ │ │ +0015aa70: 4361 6c6c 6261 636b 2066 756e 6374 696f Callback functio │ │ │ │ +0015aa80: 6e73 3c2f 613e 2e3c 2f70 3e0a 3c70 3e54 ns.

    .

    T │ │ │ │ +0015aa90: 6f20 7265 7365 7420 7468 6520 6361 6c6c o reset the call │ │ │ │ +0015aaa0: 6261 636b 2066 756e 6374 696f 6e73 2074 back functions t │ │ │ │ +0015aab0: 6f20 7468 6520 696e 7465 726e 616c 2066 o the internal f │ │ │ │ +0015aac0: 756e 6374 696f 6e73 206f 6620 7468 6520 unctions of the │ │ │ │ +0015aad0: 656e 6769 6e65 2c20 7573 6520 3c63 6f64 engine, use soap_done< │ │ │ │ +0015abb0: 2f61 3e3c 2f63 6f64 653e 2066 6f6c 6c6f /a> follo │ │ │ │ +0015abc0: 7765 6420 6279 203c 636f 6465 3e3c 6120 wed by soap_init │ │ │ │ +0015ac60: 3c2f 636f 6465 3e2e 2054 6869 7320 7265 . This re │ │ │ │ +0015ac70: 2d69 6e69 7469 616c 697a 6573 2074 6865 -initializes the │ │ │ │ +0015ac80: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context, remo │ │ │ │ +0015acf0: 7665 7320 616c 6c20 706c 7567 696e 732c ves all plugins, │ │ │ │ +0015ad00: 2061 6e64 2072 6573 6574 7320 6675 6e63 and resets func │ │ │ │ +0015ad10: 7469 6f6e 2063 616c 6c62 6163 6b73 2e3c tion callbacks.< │ │ │ │ +0015ad20: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ +0015ad50: 0a66 706f 7374 3c2f 6833 3e0a 3c70 3e3c .fpost

    .

    < │ │ │ │ +0015ad60: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int (soap │ │ │ │ +0015ae30: 3a3a 6670 6f73 743c 2f61 3e29 2873 7472 ::fpost)(str │ │ │ │ +0015ae40: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +0015ae50: 636f 6e73 7420 6368 6172 202a 656e 6470 const char *endp │ │ │ │ +0015ae60: 6f69 6e74 2c20 636f 6e73 7420 6368 6172 oint, const char │ │ │ │ +0015ae70: 202a 686f 7374 2c20 696e 7420 706f 7274 *host, int port │ │ │ │ +0015ae80: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa │ │ │ │ +0015ae90: 7468 2c20 636f 6e73 7420 6368 6172 202a th, const char * │ │ │ │ +0015aea0: 6163 7469 6f6e 2c20 554c 4f4e 4736 3420 action, ULONG64 │ │ │ │ +0015aeb0: 636f 756e 7429 3c2f 636f 6465 3e3c 2f70 count)

    .

    This callba │ │ │ │ +0015aed0: 636b 2069 7320 6361 6c6c 6564 2061 7420 ck is called at │ │ │ │ +0015aee0: 7468 6520 7365 7276 6572 2073 6964 6520 the server side │ │ │ │ +0015aef0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to │ │ │ │ +0015af00: 2073 656e 6420 7468 6520 4854 5450 2068 send the HTTP h │ │ │ │ +0015af10: 6561 6465 7273 2074 6f20 7468 6520 636f eaders to the co │ │ │ │ +0015af20: 6e6e 6563 7465 6420 636c 6965 6e74 2e20 nnected client. │ │ │ │ +0015af30: 5468 6520 7061 7261 6d65 7465 7220 3c63 The parameter status should be an H │ │ │ │ +0015af60: 5454 5020 7374 6174 7573 2065 7272 6f72 TTP status error │ │ │ │ +0015af70: 2063 6f64 6520 6f72 203c 636f 6465 3e23 code or # │ │ │ │ +0015af80: 534f 4150 5f4f 4b3c 2f63 6f64 653e 2028 SOAP_OK ( │ │ │ │ +0015af90: 3230 3020 4f4b 2920 6f72 203c 636f 6465 200 OK) or #SOAP_HTML or #SOA │ │ │ │ +0015afc0: 505f 4649 4c45 3c2f 636f 6465 3e2e 2055 P_FILE. U │ │ │ │ +0015afd0: 7369 6e67 203c 636f 6465 3e23 534f 4150 sing #SOAP │ │ │ │ +0015afe0: 5f48 544d 4c3c 2f63 6f64 653e 2073 6574 _HTML set │ │ │ │ +0015aff0: 7320 7468 6520 636f 6e74 656e 742d 7479 s the content-ty │ │ │ │ +0015b000: 7065 2068 6561 6465 7220 746f 203c 636f pe header to text/html; ch │ │ │ │ +0015b020: 6172 7365 743d 7574 662d 383c 2f63 6f64 arset=utf-8. Using │ │ │ │ +0015b040: 2353 4f41 505f 4649 4c45 3c2f 636f 6465 #SOAP_FILE sets the conte │ │ │ │ +0015b060: 6e74 2d74 7970 6520 6865 6164 6572 2074 nt-type header t │ │ │ │ +0015b070: 6f20 7468 6520 7661 6c75 6520 6f66 203c o the value of < │ │ │ │ +0015b080: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ +0015b140: 703a 3a68 7474 705f 636f 6e74 656e 743c p::http_content< │ │ │ │ +0015b150: 2f61 3e3c 2f63 6f64 653e 2e20 4578 7472 /a>. Extr │ │ │ │ +0015b160: 6120 4854 5450 2068 6561 6465 7273 2061 a HTTP headers a │ │ │ │ +0015b170: 7265 2061 6464 6564 2077 6865 6e20 3c63 re added when soap::http_ex │ │ │ │ +0015b240: 7472 615f 6865 6164 6572 3c2f 613e 3c2f tra_header is set to │ │ │ │ +0015b260: 6f6e 6520 6f72 206d 6f72 6520 6865 6164 one or more head │ │ │ │ +0015b270: 6572 206c 696e 6573 2073 6570 6172 6174 er lines separat │ │ │ │ +0015b280: 6564 2062 7920 4352 4c46 2e20 5768 656e ed by CRLF. When │ │ │ │ +0015b290: 2072 6564 6566 696e 696e 6720 7468 6973 redefining this │ │ │ │ +0015b2a0: 2063 616c 6c62 6163 6b2c 2075 7365 2066 callback, use f │ │ │ │ +0015b2b0: 756e 6374 696f 6e20 3c63 6f64 653e 3c61 unction soap_send │ │ │ │ +0015b330: 3c2f 636f 6465 3e20 746f 2077 7269 7465 to write │ │ │ │ +0015b340: 2074 6865 2068 6561 6465 7220 636f 6e74 the header cont │ │ │ │ +0015b350: 656e 7473 2e20 5265 7475 726e 7320 3c63 ents. Returns #SOAP_OK or a < │ │ │ │ +0015b380: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0015b390: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0015b3a0: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac │ │ │ │ +0015b3b0: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4 │ │ │ │ +0015b3c0: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444" │ │ │ │ +0015b3d0: 2074 6974 6c65 3d22 5374 6174 7573 2061 title="Status a │ │ │ │ +0015b3e0: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a │ │ │ │ +0015b3f0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a │ │ │ │ +0015b400: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or # │ │ │ │ +0015b410: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean │ │ │ │ +0015b420: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,..."> │ │ │ │ +0015b430: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status< │ │ │ │ +0015b440: 2f63 6f64 653e 2065 7272 6f72 2063 6f64 /code> error cod │ │ │ │ +0015b450: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in │ │ │ │ +0015b460: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne │ │ │ │ +0015b470: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fr │ │ │ │ +0015b540: 6573 706f 6e73 653c 2f61 3e3c 2f63 6f64 esponse is http │ │ │ │ +0015b560: 5f72 6573 706f 6e73 653c 2f63 6f64 653e _response │ │ │ │ +0015b570: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fresponse

    .

    int ( │ │ │ │ +0015b5c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soa │ │ │ │ +0015b680: 703a 3a66 7265 7370 6f6e 7365 3c2f 613e p::fresponse │ │ │ │ +0015b690: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s │ │ │ │ +0015b6a0: 6f61 702c 2069 6e74 2073 6f61 705f 6572 oap, int soap_er │ │ │ │ +0015b6b0: 726f 725f 636f 6465 2c20 554c 4f4e 4736 ror_code, ULONG6 │ │ │ │ +0015b6c0: 3420 636f 756e 7429 3c2f 636f 6465 3e3c 4 count)< │ │ │ │ +0015b6d0: 2f70 3e0a 3c70 3e54 6869 7320 6361 6c6c /p>.

    This call │ │ │ │ +0015b6e0: 6261 636b 2069 7320 6361 6c6c 6564 2061 back is called a │ │ │ │ +0015b6f0: 7420 7468 6520 7365 7276 6572 2073 6964 t the server sid │ │ │ │ +0015b700: 6520 6279 2074 6865 2065 6e67 696e 6520 e by the engine │ │ │ │ +0015b710: 746f 2073 656e 6420 7468 6520 4854 5450 to send the HTTP │ │ │ │ +0015b720: 2068 6561 6465 7273 2074 6f20 7468 6520 headers to the │ │ │ │ +0015b730: 636f 6e6e 6563 7465 6420 636c 6965 6e74 connected client │ │ │ │ +0015b740: 2e20 5468 6520 7061 7261 6d65 7465 7220 . The parameter │ │ │ │ +0015b750: 3c63 6f64 653e 7374 6174 7573 3c2f 636f status should be an │ │ │ │ +0015b770: 2048 5454 5020 7374 6174 7573 2065 7272 HTTP status err │ │ │ │ +0015b780: 6f72 2063 6f64 6520 6f72 203c 636f 6465 or code or #SOAP_OK │ │ │ │ +0015b7a0: 2028 3230 3020 4f4b 2920 6f72 203c 636f (200 OK) or #SOAP_HTML or #S │ │ │ │ +0015b7d0: 4f41 505f 4649 4c45 3c2f 636f 6465 3e2e OAP_FILE. │ │ │ │ +0015b7e0: 2055 7369 6e67 203c 636f 6465 3e23 534f Using #SO │ │ │ │ +0015b7f0: 4150 5f48 544d 4c3c 2f63 6f64 653e 2073 AP_HTML s │ │ │ │ +0015b800: 6574 7320 7468 6520 636f 6e74 656e 742d ets the content- │ │ │ │ +0015b810: 7479 7065 2068 6561 6465 7220 746f 203c type header to < │ │ │ │ +0015b820: 636f 6465 3e74 6578 742f 6874 6d6c 3b20 code>text/html; │ │ │ │ +0015b830: 6368 6172 7365 743d 7574 662d 383c 2f63 charset=utf-8. Using #SOAP_FILE sets the con │ │ │ │ +0015b870: 7465 6e74 2d74 7970 6520 6865 6164 6572 tent-type header │ │ │ │ +0015b880: 2074 6f20 7468 6520 7661 6c75 6520 6f66 to the value of │ │ │ │ +0015b890: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +0015b950: 6f61 703a 3a68 7474 705f 636f 6e74 656e oap::http_conten │ │ │ │ +0015b960: 743c 2f61 3e3c 2f63 6f64 653e 2e20 4578 t. Ex │ │ │ │ +0015b970: 7472 6120 4854 5450 2068 6561 6465 7273 tra HTTP headers │ │ │ │ +0015b980: 2061 7265 2061 6464 6564 2077 6865 6e20 are added when │ │ │ │ +0015b990: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::http_ │ │ │ │ +0015ba50: 6578 7472 615f 6865 6164 6572 3c2f 613e extra_header │ │ │ │ +0015ba60: 3c2f 636f 6465 3e20 6973 2073 6574 2074 is set t │ │ │ │ +0015ba70: 6f20 6f6e 6520 6f72 206d 6f72 6520 6865 o one or more he │ │ │ │ +0015ba80: 6164 6572 206c 696e 6573 2073 6570 6172 ader lines separ │ │ │ │ +0015ba90: 6174 6564 2062 7920 4352 4c46 2e20 5768 ated by CRLF. Wh │ │ │ │ +0015baa0: 656e 2072 6564 6566 696e 696e 6720 7468 en redefining th │ │ │ │ +0015bab0: 6973 2063 616c 6c62 6163 6b2c 2075 7365 is callback, use │ │ │ │ +0015bac0: 2066 756e 6374 696f 6e20 3c63 6f64 653e function │ │ │ │ +0015bad0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_send to wri │ │ │ │ +0015bb50: 7465 2074 6865 2068 6561 6465 7220 636f te the header co │ │ │ │ +0015bb60: 6e74 656e 7473 2e20 5265 7475 726e 7320 ntents. Returns │ │ │ │ +0015bb70: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status error c │ │ │ │ +0015bc60: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i │ │ │ │ +0015bc70: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig │ │ │ │ +0015bc80: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap:: │ │ │ │ +0015bd50: 6672 6573 706f 6e73 653c 2f61 3e3c 2f63 fresponse is ht │ │ │ │ +0015bd70: 7470 5f72 6573 706f 6e73 653c 2f63 6f64 tp_response.

    .

    │ │ │ │ +0015bdb0: 3c2f 613e 0a66 706f 7374 6864 723c 2f68 .fposthdr.

    int │ │ │ │ +0015bdd0: 283c 6120 636c 6173 733d 2265 6c22 2068 (s │ │ │ │ +0015be70: 6f61 703a 3a66 706f 7374 6864 723c 2f61 oap::fposthdr)(struct soap * │ │ │ │ +0015be90: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char │ │ │ │ +0015bea0: 202a 6b65 792c 2063 6f6e 7374 2063 6861 *key, const cha │ │ │ │ +0015beb0: 7220 2a76 616c 293c 2f63 6f64 653e 3c2f r *val).

    This callb │ │ │ │ +0015bed0: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by │ │ │ │ +0015bee0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::f │ │ │ │ +0015bfb0: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post │ │ │ │ +0015bfc0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and soap::fre │ │ │ │ +0015c090: 7370 6f6e 7365 3c2f 613e 3c2f 636f 6465 sponse to send an HTT │ │ │ │ +0015c0b0: 5020 6865 6164 6572 2077 6974 6820 6120 P header with a │ │ │ │ +0015c0c0: 6b65 7920 616e 6420 616e 206f 7074 696f key and an optio │ │ │ │ +0015c0d0: 6e61 6c20 7661 6c75 652e 2052 6574 7572 nal value. Retur │ │ │ │ +0015c0e0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O │ │ │ │ +0015c0f0: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status │ │ │ │ +0015c1c0: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int │ │ │ │ +0015c1d0: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th │ │ │ │ +0015c1e0: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct │ │ │ │ +0015c1f0: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to │ │ │ │ +0015c200: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fposth │ │ │ │ +0015c2b0: 6472 3c2f 613e 3c2f 636f 6465 3e20 6973 dr is │ │ │ │ +0015c2c0: 203c 636f 6465 3e68 7474 705f 706f 7374 http_post │ │ │ │ +0015c2d0: 5f68 6561 6465 723c 2f63 6f64 653e 2e3c _header.< │ │ │ │ +0015c2e0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ +0015c310: 0a66 7061 7273 653c 2f68 333e 0a3c 703e .fparse

    .

    │ │ │ │ +0015c320: 3c63 6f64 653e 696e 7420 283c 6120 636c int (so │ │ │ │ +0015c3c0: 6170 3a3a 6670 6172 7365 3c2f 613e 2928 ap::fparse)( │ │ │ │ +0015c3d0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +0015c3e0: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .

    This callback i │ │ │ │ +0015c400: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the │ │ │ │ +0015c410: 656e 6769 6e65 2028 6173 2061 2063 6c69 engine (as a cli │ │ │ │ +0015c420: 656e 7420 6f72 2073 6572 7665 7229 2074 ent or server) t │ │ │ │ +0015c430: 6f20 7265 6164 2061 6e64 2070 6172 7365 o read and parse │ │ │ │ +0015c440: 2048 5454 5020 6865 6164 6572 7320 6f72 HTTP headers or │ │ │ │ +0015c450: 204d 494d 4520 6865 6164 6572 732e 2057 MIME headers. W │ │ │ │ +0015c460: 6865 6e20 7265 6465 6669 6e65 642c 2074 hen redefined, t │ │ │ │ +0015c470: 6869 7320 6675 6e63 7469 6f6e 2073 686f his function sho │ │ │ │ +0015c480: 756c 6420 6174 2072 6561 6420 6f72 2073 uld at read or s │ │ │ │ +0015c490: 6b69 7020 7468 6520 656e 7469 7265 2048 kip the entire H │ │ │ │ +0015c4a0: 5454 5020 6865 6164 6572 2074 6f20 7265 TTP header to re │ │ │ │ +0015c4b0: 6163 6820 7468 6520 6d65 7373 6167 6520 ach the message │ │ │ │ +0015c4c0: 626f 6479 2e20 4675 6e63 7469 6f6e 203c body. Function < │ │ │ │ +0015c4d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>so │ │ │ │ +0015c540: 6170 5f67 6574 6c69 6e65 3c2f 613e 3c2f ap_getline is used by │ │ │ │ +0015c560: 2074 6869 7320 6361 6c6c 6261 636b 2074 this callback t │ │ │ │ +0015c570: 6f20 7265 6164 2065 6163 6820 6865 6164 o read each head │ │ │ │ +0015c580: 6572 206c 696e 6520 696e 746f 2061 6e20 er line into an │ │ │ │ +0015c590: 696e 7465 726e 616c 2062 7566 6665 7220 internal buffer │ │ │ │ +0015c5a0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +0015c660: 6170 3a3a 6d73 6762 7566 3c2f 613e 3c2f ap::msgbuf with soap_g │ │ │ │ +0015c6f0: 6574 6c69 6e65 3c2f 613e 2873 6f61 702c etline(soap, │ │ │ │ +0015c700: 2073 6f61 702d 2667 743b 6d73 6762 7566 soap->msgbuf │ │ │ │ +0015c710: 2c20 7369 7a65 6f66 2873 6f61 702d 2667 , sizeof(soap-&g │ │ │ │ +0015c720: 743b 6d73 6762 7566 2929 3c2f 636f 6465 t;msgbuf)). Returns #SOAP_OK │ │ │ │ +0015c750: 2c20 6f72 2061 2067 534f 4150 2065 7272 , or a gSOAP err │ │ │ │ +0015c760: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui │ │ │ │ +0015c770: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a │ │ │ │ +0015c780: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fparse │ │ │ │ +0015c830: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is < │ │ │ │ +0015c840: 636f 6465 3e68 7474 705f 7061 7273 653c code>http_parse< │ │ │ │ +0015c850: 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 333e /code>.

    .

    │ │ │ │ +0015c860: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fparseh │ │ │ │ +0015c890: 6472 3c2f 6833 3e0a 3c70 3e3c 636f 6465 dr

    .

    int (soap │ │ │ │ +0015c950: 3a3a 6670 6172 7365 6864 723c 2f61 3e29 ::fparsehdr) │ │ │ │ +0015c960: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ +0015c970: 6170 2c20 636f 6e73 7420 6368 6172 202a ap, const char * │ │ │ │ +0015c980: 6b65 792c 2063 6f6e 7374 2063 6861 7220 key, const char │ │ │ │ +0015c990: 2a76 616c 293c 2f63 6f64 653e 3c2f 703e *val)

    │ │ │ │ +0015c9a0: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac │ │ │ │ +0015c9b0: 6b20 6973 2063 616c 6c65 6420 6279 203c k is called by < │ │ │ │ +0015c9c0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::fp │ │ │ │ +0015ca60: 6172 7365 3c2f 613e 3c2f 636f 6465 3e2c arse, │ │ │ │ +0015ca70: 2063 6f6e 7375 6d65 7320 616e 2048 5454 consumes an HTT │ │ │ │ +0015ca80: 5020 6865 6164 6572 2074 6861 7420 6973 P header that is │ │ │ │ +0015ca90: 2073 706c 6974 2069 6e20 6120 6b65 792d split in a key- │ │ │ │ +0015caa0: 7661 6c75 6520 7061 6972 2061 6e64 2075 value pair and u │ │ │ │ +0015cab0: 7064 6174 6573 2074 6865 203c 636f 6465 pdates the soa │ │ │ │ +0015cb10: 703c 2f61 3e3c 2f63 6f64 653e 2063 6f6e p con │ │ │ │ +0015cb20: 7465 7874 2073 7461 7465 2061 6363 6f72 text state accor │ │ │ │ +0015cb30: 6469 6e67 6c79 2e20 5468 6520 636f 6e74 dingly. The cont │ │ │ │ +0015cb40: 6578 7420 6973 2075 7064 6174 6564 2077 ext is updated w │ │ │ │ +0015cb50: 6974 6820 7468 6520 4854 5450 2068 6561 ith the HTTP hea │ │ │ │ +0015cb60: 6465 7220 696e 666f 726d 6174 696f 6e20 der information │ │ │ │ +0015cb70: 7265 6365 6976 6564 2c20 6275 7420 4854 received, but HT │ │ │ │ +0015cb80: 5450 2068 6561 6465 7273 2061 7265 206e TP headers are n │ │ │ │ +0015cb90: 6f74 206c 6974 6572 616c 6c79 2072 6574 ot literally ret │ │ │ │ +0015cba0: 6169 6e65 6420 6279 2074 6865 2065 6e67 ained by the eng │ │ │ │ +0015cbb0: 696e 652e 2052 6574 7572 6e73 203c 636f ine. Returns #SOAP_OK or #SOA │ │ │ │ +0015cbe0: 505f 5354 4f50 3c2f 636f 6465 3e20 746f P_STOP to │ │ │ │ +0015cbf0: 2070 7265 7665 6e74 2066 7572 7468 6572 prevent further │ │ │ │ +0015cc00: 2072 6561 6469 6e67 206f 6620 7468 6520 reading of the │ │ │ │ +0015cc10: 4854 5450 2062 6f64 792c 206f 7220 6120 HTTP body, or a │ │ │ │ +0015cc20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_stat │ │ │ │ +0015cce0: 7573 3c2f 613e 3c2f 636f 6465 3e20 2869 us (i │ │ │ │ +0015ccf0: 6e74 2920 6572 726f 7220 636f 6465 2e20 nt) error code. │ │ │ │ +0015cd00: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun │ │ │ │ +0015cd10: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t │ │ │ │ +0015cd20: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so │ │ │ │ +0015cdd0: 6170 3a3a 6670 6172 7365 6864 723c 2f61 ap::fparsehdr is http_parse_hea │ │ │ │ +0015ce00: 6465 723c 2f63 6f64 653e 2e3c 2f70 3e0a der.

    . │ │ │ │ +0015ce10: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fge │ │ │ │ +0015ce40: 743c 2f68 333e 0a3c 703e 3c63 6f64 653e t

    .

    │ │ │ │ +0015ce50: 696e 7420 283c 6120 636c 6173 733d 2265 int (soap::fge │ │ │ │ +0015cf20: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so │ │ │ │ +0015cf30: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap) │ │ │ │ +0015cf40: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal │ │ │ │ +0015cf50: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ +0015cf60: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d │ │ │ │ +0015cf70: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a │ │ │ │ +0015cf80: 6e20 4854 5450 2047 4554 2072 6571 7565 n HTTP GET reque │ │ │ │ +0015cf90: 7374 2069 7320 7065 6e64 696e 672e 2052 st is pending. R │ │ │ │ +0015cfa0: 6564 6566 696e 6520 7468 6973 2063 616c edefine this cal │ │ │ │ +0015cfb0: 6c62 6163 6b20 746f 2072 6573 706f 6e64 lback to respond │ │ │ │ +0015cfc0: 2074 6f20 4854 5450 2047 4554 2072 6571 to HTTP GET req │ │ │ │ +0015cfd0: 7565 7374 7320 7769 7468 2063 6f6e 7465 uests with conte │ │ │ │ +0015cfe0: 6e74 2c20 7365 6520 7468 6520 3c63 6f64 nt, see the http_get< │ │ │ │ +0015d080: 2f63 6f64 653e 2048 5454 5020 4745 5420 /code> HTTP GET │ │ │ │ +0015d090: 706c 7567 696e 2066 6f72 206d 6f72 6520 plugin for more │ │ │ │ +0015d0a0: 6465 7461 696c 732e 2052 6574 7572 6e73 details. Returns │ │ │ │ +0015d0b0: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK< │ │ │ │ +0015d0c0: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status (int) │ │ │ │ +0015d1a0: 6572 726f 7220 636f 6465 2e20 5468 6520 error code. The │ │ │ │ +0015d1b0: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio │ │ │ │ +0015d1c0: 6e20 6173 7369 676e 6564 2074 6f20 3c63 n assigned to soap::fget │ │ │ │ +0015d2a0: 3c2f 613e 3c2f 636f 6465 3e20 6973 2074 is t │ │ │ │ +0015d2b0: 6865 2069 6e74 6572 6e61 6c20 7374 6174 he internal stat │ │ │ │ +0015d2c0: 6963 2066 756e 6374 696f 6e20 3c63 6f64 ic function http_get that returns t │ │ │ │ +0015d2f0: 6865 203c 636f 6465 3e23 534f 4150 5f47 he #SOAP_G │ │ │ │ +0015d300: 4554 5f4d 4554 484f 443c 2f63 6f64 653e ET_METHOD │ │ │ │ +0015d310: 2065 7272 6f72 2e3c 2f70 3e0a 3c68 333e error.

    .

    │ │ │ │ +0015d320: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .fput.

    int │ │ │ │ +0015d360: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fput)(struct soap * │ │ │ │ +0015d440: 736f 6170 293c 2f63 6f64 653e 3c2f 703e soap)

    │ │ │ │ +0015d450: 0a3c 703e 5468 6973 2063 616c 6c62 6163 .

    This callbac │ │ │ │ +0015d460: 6b20 6973 2063 616c 6c65 6420 6279 2074 k is called by t │ │ │ │ +0015d470: 6865 2073 6572 7669 6365 2064 6973 7061 he service dispa │ │ │ │ +0015d480: 7463 6865 7220 7768 656e 2061 6e20 4854 tcher when an HT │ │ │ │ +0015d490: 5450 2050 5554 2072 6571 7565 7374 2069 TP PUT request i │ │ │ │ +0015d4a0: 7320 7065 6e64 696e 672e 2052 6564 6566 s pending. Redef │ │ │ │ +0015d4b0: 696e 6520 7468 6973 2063 616c 6c62 6163 ine this callbac │ │ │ │ +0015d4c0: 6b20 746f 2072 6573 706f 6e64 2074 6f20 k to respond to │ │ │ │ +0015d4d0: 4854 5450 2050 5554 2072 6571 7565 7374 HTTP PUT request │ │ │ │ +0015d4e0: 732c 2073 6565 2074 6865 203c 636f 6465 s, see the http_post │ │ │ │ +0015d580: 3c2f 636f 6465 3e20 4854 5450 2050 4f53 HTTP POS │ │ │ │ +0015d590: 5420 706c 7567 696e 2066 6f72 206d 6f72 T plugin for mor │ │ │ │ +0015d5a0: 6520 6465 7461 696c 732e 2052 6574 7572 e details. Retur │ │ │ │ +0015d5b0: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O │ │ │ │ +0015d5c0: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status │ │ │ │ +0015d690: 3c2f 613e 3c2f 636f 6465 3e20 6572 726f erro │ │ │ │ +0015d6a0: 7220 636f 6465 2e20 5468 6520 6275 696c r code. The buil │ │ │ │ +0015d6b0: 742d 696e 2066 756e 6374 696f 6e20 6173 t-in function as │ │ │ │ +0015d6c0: 7369 676e 6564 2074 6f20 3c63 6f64 653e signed to │ │ │ │ +0015d6d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fput │ │ │ │ +0015d7a0: 3c2f 636f 6465 3e20 6973 2074 6865 2069 is the i │ │ │ │ +0015d7b0: 6e74 6572 6e61 6c20 7374 6174 6963 2066 nternal static f │ │ │ │ +0015d7c0: 756e 6374 696f 6e20 3c63 6f64 653e 6874 unction ht │ │ │ │ +0015d7d0: 7470 5f70 7574 3c2f 636f 6465 3e20 7468 tp_put th │ │ │ │ +0015d7e0: 6174 2072 6574 7572 6e73 2074 6865 203c at returns the < │ │ │ │ +0015d7f0: 636f 6465 3e23 534f 4150 5f50 5554 5f4d code>#SOAP_PUT_M │ │ │ │ +0015d800: 4554 484f 443c 2f63 6f64 653e 2065 7272 ETHOD err │ │ │ │ +0015d810: 6f72 2e3c 2f70 3e0a 3c68 333e 3c61 2063 or.

    .

    │ │ │ │ +0015d840: 3c2f 613e 0a66 7061 7463 683c 2f68 333e .fpatch

    │ │ │ │ +0015d850: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (< │ │ │ │ +0015d860: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0015d870: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0015d880: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0015d890: 6761 3830 3861 3661 3962 3765 3664 3137 ga808a6a9b7e6d17 │ │ │ │ +0015d8a0: 6530 3339 6662 3533 6135 6538 6139 6238 e039fb53a5e8a9b8 │ │ │ │ +0015d8b0: 3461 2220 7469 746c 653d 2243 616c 6c62 4a" title="Callb │ │ │ │ +0015d8c0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement │ │ │ │ +0015d8d0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se │ │ │ │ +0015d8e0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser │ │ │ │ +0015d8f0: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to │ │ │ │ +0015d900: 4854 5450 2050 4154 4348 2072 6571 7565 HTTP PATCH reque │ │ │ │ +0015d910: 7374 7320 6672 6f6d 2063 6c69 656e 7473 sts from clients │ │ │ │ +0015d920: 2e2e 2e22 3e73 6f61 703a 3a66 7061 7463 ...">soap::fpatc │ │ │ │ +0015d930: 683c 2f61 3e29 2873 7472 7563 7420 736f h)(struct so │ │ │ │ +0015d940: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap) │ │ │ │ +0015d950: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal │ │ │ │ +0015d960: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ +0015d970: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d │ │ │ │ +0015d980: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a │ │ │ │ +0015d990: 6e20 4854 5450 2050 4154 4348 2072 6571 n HTTP PATCH req │ │ │ │ +0015d9a0: 7565 7374 2069 7320 7065 6e64 696e 672e uest is pending. │ │ │ │ +0015d9b0: 2052 6564 6566 696e 6520 7468 6973 2063 Redefine this c │ │ │ │ +0015d9c0: 616c 6c62 6163 6b20 746f 2072 6573 706f allback to respo │ │ │ │ +0015d9d0: 6e64 2074 6f20 4854 5450 2050 4154 4348 nd to HTTP PATCH │ │ │ │ +0015d9e0: 2072 6571 7565 7374 732c 2073 6565 2074 requests, see t │ │ │ │ +0015d9f0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_ │ │ │ │ +0015da80: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post │ │ │ │ +0015da90: 4854 5450 2050 4f53 5420 706c 7567 696e HTTP POST plugin │ │ │ │ +0015daa0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail │ │ │ │ +0015dab0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK │ │ │ │ +0015dad0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa │ │ │ │ +0015db90: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status error code. │ │ │ │ +0015dbb0: 5468 6520 6275 696c 742d 696e 2066 756e The built-in fun │ │ │ │ +0015dbc0: 6374 696f 6e20 6173 7369 676e 6564 2074 ction assigned t │ │ │ │ +0015dbd0: 6f20 3c63 6f64 653e 3c61 2063 6c61 7373 o so │ │ │ │ +0015dca0: 6170 3a3a 6670 6174 6368 3c2f 613e 3c2f ap::fpatch is the int │ │ │ │ +0015dcc0: 6572 6e61 6c20 7374 6174 6963 2066 756e ernal static fun │ │ │ │ +0015dcd0: 6374 696f 6e20 3c63 6f64 653e 6874 7470 ction http │ │ │ │ +0015dce0: 5f70 6174 6368 3c2f 636f 6465 3e20 7468 _patch th │ │ │ │ +0015dcf0: 6174 2072 6574 7572 6e73 2074 6865 203c at returns the < │ │ │ │ +0015dd00: 636f 6465 3e23 534f 4150 5f50 4154 4348 code>#SOAP_PATCH │ │ │ │ +0015dd10: 5f4d 4554 484f 443c 2f63 6f64 653e 2065 _METHOD e │ │ │ │ +0015dd20: 7272 6f72 2e3c 2f70 3e0a 3c68 333e 3c61 rror.

    .

    .fdel

    │ │ │ │ +0015dd60: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (< │ │ │ │ +0015dd70: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0015dd80: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0015dd90: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0015dda0: 6761 6632 6264 6130 3138 3734 3839 6338 gaf2bda0187489c8 │ │ │ │ +0015ddb0: 6632 6239 3835 3766 3631 6239 3661 6430 f2b9857f61b96ad0 │ │ │ │ +0015ddc0: 6530 2220 7469 746c 653d 2243 616c 6c62 e0" title="Callb │ │ │ │ +0015ddd0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement │ │ │ │ +0015dde0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se │ │ │ │ +0015ddf0: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser │ │ │ │ +0015de00: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to │ │ │ │ +0015de10: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ │ │ │ │ +0015de20: 6573 7473 2066 726f 6d20 636c 6965 6e74 ests from client │ │ │ │ +0015de30: 2e2e 2e22 3e73 6f61 703a 3a66 6465 6c3c ...">soap::fdel< │ │ │ │ +0015de40: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap │ │ │ │ +0015de50: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    This callb │ │ │ │ +0015de70: 6163 6b20 6973 2063 616c 6c65 6420 6279 ack is called by │ │ │ │ +0015de80: 2074 6865 2073 6572 7669 6365 2064 6973 the service dis │ │ │ │ +0015de90: 7061 7463 6865 7220 7768 656e 2061 6e20 patcher when an │ │ │ │ +0015dea0: 4854 5450 2044 454c 4554 4520 7265 7175 HTTP DELETE requ │ │ │ │ +0015deb0: 6573 7420 6973 2070 656e 6469 6e67 2e20 est is pending. │ │ │ │ +0015dec0: 5265 6465 6669 6e65 2074 6869 7320 6361 Redefine this ca │ │ │ │ +0015ded0: 6c6c 6261 636b 2074 6f20 7265 7370 6f6e llback to respon │ │ │ │ +0015dee0: 6420 746f 2048 5454 5020 4445 4c45 5445 d to HTTP DELETE │ │ │ │ +0015def0: 2072 6571 7565 7374 732c 2073 6565 2074 requests, see t │ │ │ │ +0015df00: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_ │ │ │ │ +0015df90: 706f 7374 3c2f 613e 3c2f 636f 6465 3e20 post │ │ │ │ +0015dfa0: 4854 5450 2050 4f53 5420 706c 7567 696e HTTP POST plugin │ │ │ │ +0015dfb0: 2066 6f72 206d 6f72 6520 6465 7461 696c for more detail │ │ │ │ +0015dfc0: 732e 2052 6574 7572 6e73 203c 636f 6465 s. Returns #SOAP_OK │ │ │ │ +0015dfe0: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa │ │ │ │ +0015e0a0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error │ │ │ │ +0015e0c0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built- │ │ │ │ +0015e0d0: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi │ │ │ │ +0015e0e0: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to soap::fdel is the │ │ │ │ +0015e1d0: 2069 6e74 6572 6e61 6c20 7374 6174 6963 internal static │ │ │ │ +0015e1e0: 2066 756e 6374 696f 6e20 3c63 6f64 653e function │ │ │ │ +0015e1f0: 6874 7470 5f64 656c 3c2f 636f 6465 3e20 http_del │ │ │ │ +0015e200: 7468 6174 2072 6574 7572 6e73 2074 6865 that returns the │ │ │ │ +0015e210: 203c 636f 6465 3e23 534f 4150 5f44 454c #SOAP_DEL │ │ │ │ +0015e220: 5f4d 4554 484f 443c 2f63 6f64 653e 2065 _METHOD e │ │ │ │ +0015e230: 7272 6f72 2e3c 2f70 3e0a 3c68 333e 3c61 rror.

    .

    .fopt

    │ │ │ │ +0015e270: 0a3c 703e 3c63 6f64 653e 696e 7420 283c .

    int (< │ │ │ │ +0015e280: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0015e290: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0015e2a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0015e2b0: 6761 3635 3237 3263 3165 6362 3565 6439 ga65272c1ecb5ed9 │ │ │ │ +0015e2c0: 3932 3561 3561 3637 3063 6637 6537 3764 925a5a670cf7e77d │ │ │ │ +0015e2d0: 3130 2220 7469 746c 653d 2243 616c 6c62 10" title="Callb │ │ │ │ +0015e2e0: 6163 6b20 746f 2069 6d70 6c65 6d65 6e74 ack to implement │ │ │ │ +0015e2f0: 206c 6f67 6963 2061 7420 7468 6520 7365 logic at the se │ │ │ │ +0015e300: 7276 6572 2d73 6964 6520 746f 2073 6572 rver-side to ser │ │ │ │ +0015e310: 7665 2072 6573 706f 6e73 6573 2074 6f20 ve responses to │ │ │ │ +0015e320: 4854 5450 204f 5054 494f 4e20 7265 7175 HTTP OPTION requ │ │ │ │ +0015e330: 6573 7473 2066 726f 6d20 636c 6965 6e74 ests from client │ │ │ │ +0015e340: 2e2e 2e22 3e73 6f61 703a 3a66 6f70 743c ...">soap::fopt< │ │ │ │ +0015e350: 2f61 3e29 2873 7472 7563 7420 736f 6170 /a>)(struct soap │ │ │ │ +0015e360: 202a 736f 6170 293c 2f63 6f64 653e 3c2f *soap).

    Called by │ │ │ │ +0015e380: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp │ │ │ │ +0015e390: 6174 6368 6572 2077 6865 6e20 616e 2048 atcher when an H │ │ │ │ +0015e3a0: 5454 5020 4f50 5449 4f4e 2072 6571 7565 TTP OPTION reque │ │ │ │ +0015e3b0: 7374 2069 7320 7065 6e64 696e 672e 2052 st is pending. R │ │ │ │ +0015e3c0: 6564 6566 696e 6520 7468 6973 2063 616c edefine this cal │ │ │ │ +0015e3d0: 6c62 6163 6b20 746f 2072 6573 706f 6e64 lback to respond │ │ │ │ +0015e3e0: 2074 6f20 4854 5450 204f 5054 494f 4e20 to HTTP OPTION │ │ │ │ +0015e3f0: 7265 7175 6573 7473 2c20 7365 6520 7468 requests, see th │ │ │ │ +0015e400: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_p │ │ │ │ +0015e490: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2048 ost H │ │ │ │ +0015e4a0: 5454 5020 504f 5354 2070 6c75 6769 6e20 TTP POST plugin │ │ │ │ +0015e4b0: 666f 7220 6d6f 7265 2064 6574 6169 6c73 for more details │ │ │ │ +0015e4c0: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns │ │ │ │ +0015e4d0: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK │ │ │ │ +0015e4e0: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap │ │ │ │ +0015e5a0: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status (int) error c │ │ │ │ +0015e5c0: 6f64 652e 2054 6865 2062 7569 6c74 2d69 ode. The built-i │ │ │ │ +0015e5d0: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig │ │ │ │ +0015e5e0: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::fopt is the │ │ │ │ +0015e6d0: 696e 7465 726e 616c 2073 7461 7469 6320 internal static │ │ │ │ +0015e6e0: 6675 6e63 7469 6f6e 203c 636f 6465 3e68 function h │ │ │ │ +0015e6f0: 7474 705f 3230 303c 2f63 6f64 653e 2074 ttp_200 t │ │ │ │ +0015e700: 6861 7420 7265 7475 726e 7320 4854 5450 hat returns HTTP │ │ │ │ +0015e710: 2032 3030 204f 4b2e 3c2f 703e 0a3c 6833 200 OK.

    .

    .fhead< │ │ │ │ +0015e750: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in │ │ │ │ +0015e760: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::fhea │ │ │ │ +0015e830: 643c 2f61 3e29 2873 7472 7563 7420 736f d)(struct so │ │ │ │ +0015e840: 6170 202a 736f 6170 293c 2f63 6f64 653e ap *soap) │ │ │ │ +0015e850: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal │ │ │ │ +0015e860: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ +0015e870: 6279 2074 6865 2073 6572 7669 6365 2064 by the service d │ │ │ │ +0015e880: 6973 7061 7463 6865 7220 7768 656e 2061 ispatcher when a │ │ │ │ +0015e890: 6e20 4854 5450 2048 4541 4420 7265 7175 n HTTP HEAD requ │ │ │ │ +0015e8a0: 6573 7420 6973 2070 656e 6469 6e67 2e20 est is pending. │ │ │ │ +0015e8b0: 5265 6465 6669 6e65 2074 6869 7320 6361 Redefine this ca │ │ │ │ +0015e8c0: 6c6c 6261 636b 2074 6f20 7265 7370 6f6e llback to respon │ │ │ │ +0015e8d0: 6420 746f 2048 5454 5020 4845 4144 2072 d to HTTP HEAD r │ │ │ │ +0015e8e0: 6571 7565 7374 7320 6d6f 7265 2073 7065 equests more spe │ │ │ │ +0015e8f0: 6369 6669 6361 6c6c 792e 2052 6574 7572 cifically. Retur │ │ │ │ +0015e900: 6e73 203c 636f 6465 3e23 534f 4150 5f4f ns #SOAP_O │ │ │ │ +0015e910: 4b3c 2f63 6f64 653e 206f 7220 6120 3c63 K or a soap_status │ │ │ │ +0015e9e0: 3c2f 613e 3c2f 636f 6465 3e20 2869 6e74 (int │ │ │ │ +0015e9f0: 2920 6572 726f 7220 636f 6465 2e20 5468 ) error code. Th │ │ │ │ +0015ea00: 6520 6275 696c 742d 696e 2066 756e 6374 e built-in funct │ │ │ │ +0015ea10: 696f 6e20 6173 7369 676e 6564 2074 6f20 ion assigned to │ │ │ │ +0015ea20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::f │ │ │ │ +0015eaf0: 6865 6164 3c2f 613e 3c2f 636f 6465 3e20 head │ │ │ │ +0015eb00: 6973 2074 6865 2069 6e74 6572 6e61 6c20 is the internal │ │ │ │ +0015eb10: 7374 6174 6963 2066 756e 6374 696f 6e20 static function │ │ │ │ +0015eb20: 3c63 6f64 653e 6874 7470 5f32 3030 3c2f http_200 that retur │ │ │ │ +0015eb40: 6e73 2048 5454 5020 3230 3020 4f4b 2e3c ns HTTP 200 OK.< │ │ │ │ +0015eb50: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ +0015eb80: 0a66 666f 726d 3c2f 6833 3e0a 3c70 3e3c .fform

    .

    < │ │ │ │ +0015eb90: 636f 6465 3e69 6e74 2028 3c61 2063 6c61 code>int ( │ │ │ │ +0015ec60: 736f 6170 3a3a 6666 6f72 6d3c 2f61 3e29 soap::fform) │ │ │ │ +0015ec70: 2873 7472 7563 7420 736f 6170 202a 736f (struct soap *so │ │ │ │ +0015ec80: 6170 293c 2f63 6f64 653e 3c2f 703e 0a3c ap)

    .< │ │ │ │ +0015ec90: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ +0015eca0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ +0015ecb0: 2048 5454 5020 464f 524d 2068 616e 646c HTTP FORM handl │ │ │ │ +0015ecc0: 6572 2070 6c75 6769 6e20 746f 2070 6172 er plugin to par │ │ │ │ +0015ecd0: 7365 2048 544d 4c20 666f 726d 7320 7265 se HTML forms re │ │ │ │ +0015ece0: 6365 6976 6564 2077 6974 6820 4854 5450 ceived with HTTP │ │ │ │ +0015ecf0: 2050 4f53 5420 616e 6420 5055 5420 7265 POST and PUT re │ │ │ │ +0015ed00: 7175 6573 7473 2c20 7365 6520 7468 6520 quests, see the │ │ │ │ +0015ed10: 3c63 6f64 653e 3b3a 6874 7470 5f66 6f72 ;:http_for │ │ │ │ +0015ed20: 6d3c 2f63 6f64 653e 2048 5454 5020 464f m HTTP FO │ │ │ │ +0015ed30: 524d 2070 6c75 6769 6e20 666f 7220 6d6f RM plugin for mo │ │ │ │ +0015ed40: 7265 2064 6574 6169 6c73 2e20 5468 6520 re details. The │ │ │ │ +0015ed50: 4854 5450 2062 6f64 7920 7769 7468 2074 HTTP body with t │ │ │ │ +0015ed60: 6865 2066 6f72 6d20 6461 7461 2073 686f he form data sho │ │ │ │ +0015ed70: 756c 6420 6265 2070 6172 7365 6420 6279 uld be parsed by │ │ │ │ +0015ed80: 2074 6869 7320 6361 6c6c 6261 636b 2c20 this callback, │ │ │ │ +0015ed90: 6f74 6865 7277 6973 6520 4854 5450 206b otherwise HTTP k │ │ │ │ +0015eda0: 6565 702d 616c 6976 6520 6d65 7373 6167 eep-alive messag │ │ │ │ +0015edb0: 6573 2077 696c 6c20 656e 6420 7570 206f es will end up o │ │ │ │ +0015edc0: 7574 206f 6620 7379 6e63 2061 7320 6120 ut of sync as a │ │ │ │ +0015edd0: 7265 7375 6c74 206f 6620 7468 6520 6375 result of the cu │ │ │ │ +0015ede0: 7272 656e 7420 706f 7369 7469 6f6e 206e rrent position n │ │ │ │ +0015edf0: 6f74 2062 6569 6e67 2061 6476 616e 6365 ot being advance │ │ │ │ +0015ee00: 6420 746f 2074 6865 2065 6e64 206f 6620 d to the end of │ │ │ │ +0015ee10: 7468 6520 4854 5450 2062 6f64 792e 2052 the HTTP body. R │ │ │ │ +0015ee20: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO │ │ │ │ +0015ee30: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or │ │ │ │ +0015ee40: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st │ │ │ │ +0015ef00: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus │ │ │ │ +0015ef10: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code │ │ │ │ +0015ef20: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu │ │ │ │ +0015ef30: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign │ │ │ │ +0015ef40: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fform.

    ..fhead │ │ │ │ +0015f060: 6572 3c2f 6833 3e0a 3c70 3e3c 636f 6465 er.

    int (soap │ │ │ │ +0015f140: 3a3a 6668 6561 6465 723c 2f61 3e29 2873 ::fheader)(s │ │ │ │ +0015f150: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +0015f160: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    │ │ │ │ +0015f170: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is │ │ │ │ +0015f180: 2063 616c 6c65 6420 696d 6d65 6469 6174 called immediat │ │ │ │ +0015f190: 656c 7920 6166 7465 7220 7061 7273 696e ely after parsin │ │ │ │ +0015f1a0: 6720 6120 534f 4150 2048 6561 6465 7220 g a SOAP Header │ │ │ │ +0015f1b0: 696e 746f 2074 6865 203c 636f 6465 3e3c into the < │ │ │ │ +0015f1c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0015f1d0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +0015f1e0: 6d6c 2361 6330 3931 6466 6534 6530 3162 ml#ac091dfe4e01b │ │ │ │ +0015f1f0: 3661 3038 3264 3931 3663 3338 3165 3730 6a082d916c381e70 │ │ │ │ +0015f200: 3036 6261 2220 7469 746c 653d 2254 6865 06ba" title="The │ │ │ │ +0015f210: 2073 6f61 703a 3a68 6561 6465 7220 706f soap::header po │ │ │ │ +0015f220: 696e 7473 2074 6f20 6120 534f 4150 5f45 ints to a SOAP_E │ │ │ │ +0015f230: 4e56 5f5f 4865 6164 6572 2073 7472 7563 NV__Header struc │ │ │ │ +0015f240: 7475 7265 2077 6974 6820 7468 6520 534f ture with the SO │ │ │ │ +0015f250: 4150 2048 6561 6465 7220 7468 6174 2077 AP Header that w │ │ │ │ +0015f260: 6173 2072 6563 6569 7665 6420 6f72 2074 as received or t │ │ │ │ +0015f270: 6861 2e2e 2e22 3e73 6f61 703a 3a68 6561 ha...">soap::hea │ │ │ │ +0015f280: 6465 723c 2f61 3e3c 2f63 6f64 653e 2073 der s │ │ │ │ +0015f290: 7472 7563 7475 7265 2e20 5468 6520 534f tructure. The SO │ │ │ │ +0015f2a0: 4150 2048 6561 6465 7220 7374 7275 6374 AP Header struct │ │ │ │ +0015f2b0: 7572 6520 3c63 6f64 653e 3c61 2063 6c61 ure soap::header can be │ │ │ │ +0015f390: 2069 6e73 7065 6374 6564 2062 7920 7468 inspected by th │ │ │ │ +0015f3a0: 6973 2066 756e 6374 696f 6e20 616e 6420 is function and │ │ │ │ +0015f3b0: 7665 7269 6669 6564 206f 7220 7265 6a65 verified or reje │ │ │ │ +0015f3c0: 6374 6564 2062 6566 6f72 6520 7468 6520 cted before the │ │ │ │ +0015f3d0: 7265 7374 206f 6620 7468 6520 6d65 7373 rest of the mess │ │ │ │ +0015f3e0: 6167 6520 7769 7468 2074 6865 2053 4f41 age with the SOA │ │ │ │ +0015f3f0: 5020 426f 6479 2069 7320 636f 6e73 756d P Body is consum │ │ │ │ +0015f400: 6564 2e20 5265 7475 726e 7320 3c63 6f64 ed. Returns #SOAP_OK or a so │ │ │ │ +0015f4e0: 6170 5f73 7461 7475 733c 2f61 3e3c 2f63 ap_status (int) error │ │ │ │ +0015f500: 2063 6f64 652e 204e 6f20 6275 696c 742d code. No built- │ │ │ │ +0015f510: 696e 2066 756e 6374 696f 6e20 6973 2061 in function is a │ │ │ │ +0015f520: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fhe │ │ │ │ +0015f600: 6164 6572 3c2f 613e 3c2f 636f 6465 3e2e ader. │ │ │ │ +0015f610: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fignore

    .< │ │ │ │ +0015f650: 703e 3c63 6f64 653e 696e 7420 283c 6120 p>int (soap::fignore │ │ │ │ +0015f730: 3c2f 613e 2928 7374 7275 6374 2073 6f61 )(struct soa │ │ │ │ +0015f740: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c │ │ │ │ +0015f750: 6861 7220 2a74 6167 293c 2f63 6f64 653e har *tag) │ │ │ │ +0015f760: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal │ │ │ │ +0015f770: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ +0015f780: 7768 656e 2061 6e20 756e 7265 636f 676e when an unrecogn │ │ │ │ +0015f790: 697a 6564 2058 4d4c 2065 6c65 6d65 6e74 ized XML element │ │ │ │ +0015f7a0: 2077 6173 2065 6e63 6f75 6e74 6572 6564 was encountered │ │ │ │ +0015f7b0: 206f 6e20 7468 6520 696e 7075 7420 7468 on the input th │ │ │ │ +0015f7c0: 6174 2063 6f75 6c64 2062 6520 6967 6e6f at could be igno │ │ │ │ +0015f7d0: 7265 6420 6465 7065 6e64 696e 6720 6f6e red depending on │ │ │ │ +0015f7e0: 2073 6f6d 6520 7370 6563 6966 6965 6420 some specified │ │ │ │ +0015f7f0: 6c6f 6769 632e 2054 6865 203c 636f 6465 logic. The tag para │ │ │ │ +0015f810: 6d65 7465 7220 6973 2074 6865 206f 6666 meter is the off │ │ │ │ +0015f820: 656e 6469 6e67 2058 4d4c 2065 6c65 6d65 ending XML eleme │ │ │ │ +0015f830: 6e74 2074 6167 206e 616d 6520 7374 7269 nt tag name stri │ │ │ │ +0015f840: 6e67 2e20 5468 6520 6361 6c6c 6261 636b ng. The callback │ │ │ │ +0015f850: 2073 686f 756c 6420 7265 7475 726e 203c should return < │ │ │ │ +0015f860: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK to ignore t │ │ │ │ +0015f880: 6865 2065 6c65 6d65 6e74 206f 7220 7265 he element or re │ │ │ │ +0015f890: 7475 726e 2061 6e20 3c63 6f64 653e 3c61 turn an s │ │ │ │ +0015f950: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status error code │ │ │ │ +0015f970: 2073 7563 6820 6173 203c 636f 6465 3e23 such as # │ │ │ │ +0015f980: 534f 4150 5f54 4147 5f4d 4953 4d41 5443 SOAP_TAG_MISMATC │ │ │ │ +0015f990: 483c 2f63 6f64 653e 2074 6f20 7472 6967 H to trig │ │ │ │ +0015f9a0: 6765 7220 6120 7661 6c69 6461 7469 6f6e ger a validation │ │ │ │ +0015f9b0: 2065 7272 6f72 2e20 5468 6973 2063 616c error. This cal │ │ │ │ +0015f9c0: 6c62 6163 6b20 616c 736f 206f 7665 7272 lback also overr │ │ │ │ +0015f9d0: 6964 6573 203c 636f 6465 3e6d 7573 7455 ides mustU │ │ │ │ +0015f9e0: 6e64 6572 7374 616e 643c 2f63 6f64 653e nderstand │ │ │ │ +0015f9f0: 2061 7474 7269 6275 7465 7320 6f6e 2075 attributes on u │ │ │ │ +0015fa00: 6e72 6563 6f67 6e69 7a65 6420 534f 4150 nrecognized SOAP │ │ │ │ +0015fa10: 2048 6561 6465 7220 656c 656d 656e 7473 Header elements │ │ │ │ +0015fa20: 2074 6861 7420 6e6f 726d 616c 6c79 2072 that normally r │ │ │ │ +0015fa30: 6169 7365 2066 6175 6c74 732e 2049 7420 aise faults. It │ │ │ │ +0015fa40: 6973 2073 7472 6f6e 676c 7920 7265 636f is strongly reco │ │ │ │ +0015fa50: 6d6d 656e 6465 6420 7468 6174 2074 6865 mmended that the │ │ │ │ +0015fa60: 2063 616c 6c62 6163 6b20 7265 7475 726e callback return │ │ │ │ +0015fa70: 7320 3c63 6f64 653e 2353 4f41 505f 4d55 s #SOAP_MU │ │ │ │ +0015fa80: 5354 554e 4445 5253 5441 4e44 3c2f 636f STUNDERSTAND when < │ │ │ │ +0015faa0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0015fab0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +0015fac0: 6d6c 2361 3137 6337 3530 6632 3064 6162 ml#a17c750f20dab │ │ │ │ +0015fad0: 3537 3961 3661 3233 6333 3031 3939 6564 579a6a23c30199ed │ │ │ │ +0015fae0: 3132 3633 2220 7469 746c 653d 2254 6865 1263" title="The │ │ │ │ +0015faf0: 2073 6f61 703a 3a6d 7573 7455 6e64 6572 soap::mustUnder │ │ │ │ +0015fb00: 7374 616e 6420 666c 6167 2069 7320 7365 stand flag is se │ │ │ │ +0015fb10: 7420 7768 656e 2061 2053 4f41 5020 4865 t when a SOAP He │ │ │ │ +0015fb20: 6164 6572 2065 6c65 6d65 6e74 2063 6172 ader element car │ │ │ │ +0015fb30: 7269 6573 2061 2053 4f41 502d 454e 563a ries a SOAP-ENV: │ │ │ │ +0015fb40: 6d75 7374 556e 6465 7273 7461 6e64 2061 mustUnderstand a │ │ │ │ +0015fb50: 7474 2e2e 2e22 3e73 6f61 703a 3a6d 7573 tt...">soap::mus │ │ │ │ +0015fb60: 7455 6e64 6572 7374 616e 643c 2f61 3e3c tUnderstand< │ │ │ │ +0015fb70: 2f63 6f64 653e 2021 3d20 3c63 6f64 653e /code> != │ │ │ │ +0015fb80: 303c 2f63 6f64 653e 2e20 5265 7475 726e 0. Return │ │ │ │ +0015fb90: 7320 3c63 6f64 653e 2353 4f41 505f 4f4b s #SOAP_OK │ │ │ │ +0015fba0: 3c2f 636f 6465 3e20 6f72 2061 203c 636f or a soap_status< │ │ │ │ +0015fc70: 2f61 3e3c 2f63 6f64 653e 2028 696e 7429 /a> (int) │ │ │ │ +0015fc80: 2065 7272 6f72 2063 6f64 652e 204e 6f20 error code. No │ │ │ │ +0015fc90: 6275 696c 742d 696e 2066 756e 6374 696f built-in functio │ │ │ │ +0015fca0: 6e20 6973 2061 7373 6967 6e65 6420 746f n is assigned to │ │ │ │ +0015fcb0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa │ │ │ │ +0015fd80: 703a 3a66 6967 6e6f 7265 3c2f 613e 3c2f p::fignore.

    .

    < │ │ │ │ +0015fda0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +0015fdb0: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id="autotoc_md4 │ │ │ │ +0015fdc0: 3222 3e3c 2f61 3e0a 6673 7661 6c69 6461 2">.fsvalida │ │ │ │ +0015fdd0: 7465 3c2f 6833 3e0a 3c70 3e3c 636f 6465 te

    .

    int (soap │ │ │ │ +0015fe80: 3a3a 6673 7661 6c69 6461 7465 3c2f 613e ::fsvalidate │ │ │ │ +0015fe90: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s │ │ │ │ +0015fea0: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char │ │ │ │ +0015feb0: 2a70 6174 7465 726e 2c20 636f 6e73 7420 *pattern, const │ │ │ │ +0015fec0: 6368 6172 202a 7374 7269 6e67 293c 2f63 char *string)

    .

    This │ │ │ │ +0015fee0: 2063 616c 6c62 6163 6b20 6973 2063 616c callback is cal │ │ │ │ +0015fef0: 6c65 6420 746f 2076 616c 6964 6174 6520 led to validate │ │ │ │ +0015ff00: 6120 7374 7269 6e67 2061 6761 696e 7374 a string against │ │ │ │ +0015ff10: 2061 6e20 584d 4c20 7265 6765 7820 7061 an XML regex pa │ │ │ │ +0015ff20: 7474 6572 6e2e 2050 6174 7465 726e 7320 ttern. Patterns │ │ │ │ +0015ff30: 7573 6520 584d 4c20 7363 6865 6d61 2072 use XML schema r │ │ │ │ +0015ff40: 6567 6578 2073 796e 7461 782e 2054 6869 egex syntax. Thi │ │ │ │ +0015ff50: 7320 6361 6c6c 6261 636b 2061 6c6c 6f77 s callback allow │ │ │ │ +0015ff60: 7320 7573 6572 2d64 6566 696e 6564 2070 s user-defined p │ │ │ │ +0015ff70: 6174 7465 726e 2076 616c 6964 6174 696f attern validatio │ │ │ │ +0015ff80: 6e20 7468 6174 2069 7320 6e6f 726d 616c n that is normal │ │ │ │ +0015ff90: 6c79 2064 6973 6162 6c65 642e 2052 6574 ly disabled. Ret │ │ │ │ +0015ffa0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ +0015ffb0: 5f4f 4b3c 2f63 6f64 653e 2077 6865 6e20 _OK when │ │ │ │ +0015ffc0: 7468 6520 7374 7269 6e67 206d 6174 6368 the string match │ │ │ │ +0015ffd0: 6573 2074 6865 2070 6174 7465 726e 206f es the pattern o │ │ │ │ +0015ffe0: 7220 3c63 6f64 653e 2353 4f41 505f 5459 r #SOAP_TY │ │ │ │ +0015fff0: 5045 3c2f 636f 6465 3e20 7768 656e 2074 PE when t │ │ │ │ +00160000: 6865 2073 7472 696e 6720 646f 6573 206e he string does n │ │ │ │ +00160010: 6f74 206d 6174 6368 2e20 4e6f 2062 7569 ot match. No bui │ │ │ │ +00160020: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2069 lt-in function i │ │ │ │ +00160030: 7320 6173 7369 676e 6564 2074 6f20 3c63 s assigned to soap:: │ │ │ │ +001600e0: 6673 7661 6c69 6461 7465 3c2f 613e 3c2f fsvalidate.

    .

    < │ │ │ │ +00160100: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +00160110: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id="autotoc_md4 │ │ │ │ +00160120: 3322 3e3c 2f61 3e0a 6677 7661 6c69 6461 3">.fwvalida │ │ │ │ +00160130: 7465 3c2f 6833 3e0a 3c70 3e3c 636f 6465 te

    .

    int (soap::fwvalidat │ │ │ │ +001601f0: 653c 2f61 3e29 2873 7472 7563 7420 736f e)(struct so │ │ │ │ +00160200: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const │ │ │ │ +00160210: 6368 6172 202a 7061 7474 6572 6e2c 2063 char *pattern, c │ │ │ │ +00160220: 6f6e 7374 2077 6368 6172 5f74 202a 7374 onst wchar_t *st │ │ │ │ +00160230: 7269 6e67 293c 2f63 6f64 653e 2054 6869 ring) Thi │ │ │ │ +00160240: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca │ │ │ │ +00160250: 6c6c 6564 2074 6f20 7661 6c69 6461 7465 lled to validate │ │ │ │ +00160260: 2061 2077 6964 6520 7374 7269 6e67 2061 a wide string a │ │ │ │ +00160270: 6761 696e 7374 2061 6e20 584d 4c20 7265 gainst an XML re │ │ │ │ +00160280: 6765 7820 7061 7474 6572 6e2e 2050 6174 gex pattern. Pat │ │ │ │ +00160290: 7465 726e 7320 7573 6520 584d 4c20 7363 terns use XML sc │ │ │ │ +001602a0: 6865 6d61 2072 6567 6578 2073 796e 7461 hema regex synta │ │ │ │ +001602b0: 782e 2054 6869 7320 6361 6c6c 6261 636b x. This callback │ │ │ │ +001602c0: 2061 6c6c 6f77 7320 7573 6572 2d64 6566 allows user-def │ │ │ │ +001602d0: 696e 6564 2070 6174 7465 726e 2076 616c ined pattern val │ │ │ │ +001602e0: 6964 6174 696f 6e20 7468 6174 2069 7320 idation that is │ │ │ │ +001602f0: 6e6f 726d 616c 6c79 2064 6973 6162 6c65 normally disable │ │ │ │ +00160300: 642e 2052 6574 7572 6e73 203c 636f 6465 d. Returns #SOAP_OK │ │ │ │ +00160320: 2077 6865 6e20 7468 6520 7374 7269 6e67 when the string │ │ │ │ +00160330: 206d 6174 6368 6573 2074 6865 2070 6174 matches the pat │ │ │ │ +00160340: 7465 726e 206f 7220 3c63 6f64 653e 2353 tern or #S │ │ │ │ +00160350: 4f41 505f 5459 5045 3c2f 636f 6465 3e20 OAP_TYPE │ │ │ │ +00160360: 7768 656e 2074 6865 2073 7472 696e 6720 when the string │ │ │ │ +00160370: 646f 6573 206e 6f74 206d 6174 6368 2e20 does not match. │ │ │ │ +00160380: 4e6f 2062 7569 6c74 2d69 6e20 6675 6e63 No built-in func │ │ │ │ +00160390: 7469 6f6e 2069 7320 6173 7369 676e 6564 tion is assigned │ │ │ │ +001603a0: 2074 6f20 3c63 6f64 653e 3c61 2063 6c61 to soap::fwval │ │ │ │ +00160450: 6964 6174 653c 2f61 3e3c 2f63 6f64 653e idate │ │ │ │ +00160460: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fseterror

    .

    void │ │ │ │ +001604b0: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fseterr │ │ │ │ +00160560: 6f72 3c2f 613e 2928 7374 7275 6374 2073 or)(struct s │ │ │ │ +00160570: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const │ │ │ │ +00160580: 2063 6861 7220 2a2a 636f 6465 2c20 636f char **code, co │ │ │ │ +00160590: 6e73 7420 6368 6172 202a 2a73 7472 696e nst char **strin │ │ │ │ +001605a0: 6729 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 g)

    .

    This callback i │ │ │ │ +001605c0: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the │ │ │ │ +001605d0: 656e 6769 6e65 2077 6865 6e20 616e 2065 engine when an e │ │ │ │ +001605e0: 7272 6f72 2069 7320 7261 6973 6564 2074 rror is raised t │ │ │ │ +001605f0: 6f20 616c 6c6f 7720 696e 7370 6563 7469 o allow inspecti │ │ │ │ +00160600: 6f6e 206f 7220 6f76 6572 7269 6469 6e67 on or overriding │ │ │ │ +00160610: 206f 6620 7468 6520 6661 756c 7420 636f of the fault co │ │ │ │ +00160620: 6465 206f 7220 6661 756c 7420 7374 7269 de or fault stri │ │ │ │ +00160630: 6e67 206d 6573 7361 6765 7320 6265 666f ng messages befo │ │ │ │ +00160640: 7265 2074 6865 2065 7272 6f72 2069 7320 re the error is │ │ │ │ +00160650: 7265 706f 7274 6564 206f 7220 7472 616e reported or tran │ │ │ │ +00160660: 736d 6974 7465 642e 204e 6f20 6275 696c smitted. No buil │ │ │ │ +00160670: 742d 696e 2066 756e 6374 696f 6e20 6973 t-in function is │ │ │ │ +00160680: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap::fsete │ │ │ │ +00160740: 7272 6f72 3c2f 613e 3c2f 636f 6465 3e2e rror. │ │ │ │ +00160750: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .fopen

    .

    │ │ │ │ +00160790: 3c63 6f64 653e 534f 4150 5f53 4f43 4b45 SOAP_SOCKE │ │ │ │ +001607a0: 5420 283c 6120 636c 6173 733d 2265 6c22 T (so │ │ │ │ +00160840: 6170 3a3a 666f 7065 6e3c 2f61 3e29 2873 ap::fopen)(s │ │ │ │ +00160850: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +00160860: 2c20 636f 6e73 7420 6368 6172 202a 656e , const char *en │ │ │ │ +00160870: 6470 6f69 6e74 2c20 636f 6e73 7420 6368 dpoint, const ch │ │ │ │ +00160880: 6172 202a 686f 7374 2c20 696e 7420 706f ar *host, int po │ │ │ │ +00160890: 7274 293c 2f63 6f64 653e 3c2f 703e 0a3c rt)

    .< │ │ │ │ +001608a0: 703e 5468 6973 2063 616c 6c62 6163 6b20 p>This callback │ │ │ │ +001608b0: 6973 2063 616c 6c65 6420 6279 2074 6865 is called by the │ │ │ │ +001608c0: 2065 6e67 696e 6520 6174 2074 6865 2063 engine at the c │ │ │ │ +001608d0: 6c69 656e 742d 7369 6465 2062 7920 3c63 lient-side by s │ │ │ │ +00160960: 6f61 705f 636f 6e6e 6563 743c 2f61 3e3c oap_connect< │ │ │ │ +00160970: 2f63 6f64 653e 206f 7220 3c63 6f64 653e /code> or │ │ │ │ +00160980: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ │ │ │ │ +001609f0: 636f 6e6e 6563 745f 636f 6d6d 616e 643c connect_command< │ │ │ │ +00160a00: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6f70 /a> to op │ │ │ │ +00160a10: 656e 2061 2054 4350 206f 7220 5544 5020 en a TCP or UDP │ │ │ │ +00160a20: 636f 6e6e 6563 7469 6f6e 2074 6f20 6120 connection to a │ │ │ │ +00160a30: 7365 7276 6572 2073 7065 6369 6669 6564 server specified │ │ │ │ +00160a40: 2061 7420 616e 2065 6e64 706f 696e 742e at an endpoint. │ │ │ │ +00160a50: 2050 6172 616d 6574 6572 7320 3c63 6f64 Parameters host
    an │ │ │ │ +00160a70: 6420 3c63 6f64 653e 706f 7274 3c2f 636f d port are micro-pa │ │ │ │ +00160a90: 7273 6564 2066 726f 6d20 3c63 6f64 653e rsed from │ │ │ │ +00160aa0: 656e 6470 6f69 6e74 3c2f 636f 6465 3e20 endpoint │ │ │ │ +00160ab0: 6265 666f 7265 2062 6569 6e67 2070 6173 before being pas │ │ │ │ +00160ac0: 7365 6420 746f 203c 636f 6465 3e3c 6120 sed to soap::fo │ │ │ │ +00160b70: 7065 6e3c 2f61 3e3c 2f63 6f64 653e 2e20 pen. │ │ │ │ +00160b80: 5265 7475 726e 7320 6120 7661 6c69 6420 Returns a valid │ │ │ │ +00160b90: 736f 636b 6574 206f 7220 3c63 6f64 653e socket or │ │ │ │ +00160ba0: 2353 4f41 505f 494e 5641 4c49 445f 534f #SOAP_INVALID_SO │ │ │ │ +00160bb0: 434b 4554 3c2f 636f 6465 3e20 7769 7468 CKET with │ │ │ │ +00160bc0: 2061 203c 636f 6465 3e3c 6120 636c 6173 a s │ │ │ │ +00160c70: 6f61 703a 3a65 7272 6f72 3c2f 613e 3c2f oap::error set to a < │ │ │ │ +00160c90: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_statu │ │ │ │ +00160d50: 733c 2f61 3e3c 2f63 6f64 653e 2028 696e s (in │ │ │ │ +00160d60: 7429 2065 7272 6f72 2063 6f64 6520 616e t) error code an │ │ │ │ +00160d70: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d soap::er │ │ │ │ +00160e00: 726e 756d 3c2f 613e 3c2f 636f 6465 3e20 rnum │ │ │ │ +00160e10: 7365 7420 746f 203c 636f 6465 3e65 7272 set to err │ │ │ │ +00160e20: 6e6f 3c2f 636f 6465 3e20 6f66 2074 6865 no of the │ │ │ │ +00160e30: 2063 6f6e 6e65 6374 696f 6e20 6661 696c connection fail │ │ │ │ +00160e40: 7572 652e 2054 6865 2062 7569 6c74 2d69 ure. The built-i │ │ │ │ +00160e50: 6e20 6675 6e63 7469 6f6e 2061 7373 6967 n function assig │ │ │ │ +00160e60: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::fo │ │ │ │ +00160f10: 7065 6e3c 2f61 3e3c 2f63 6f64 653e 2069 pen i │ │ │ │ +00160f20: 7320 3c63 6f64 653e 7463 705f 636f 6e6e s tcp_conn │ │ │ │ +00160f30: 6563 743c 2f63 6f64 653e 2e3c 2f70 3e0a ect.

    . │ │ │ │ +00160f40: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .fac │ │ │ │ +00160f70: 6365 7074 3c2f 6833 3e0a 3c70 3e3c 636f cept

    .

    SOAP_SOCKET ( │ │ │ │ +00160f90: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ +00161040: 3a3a 6661 6363 6570 743c 2f61 3e29 2873 ::faccept)(s │ │ │ │ +00161050: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +00161060: 2c20 534f 4150 5f53 4f43 4b45 5420 732c , SOAP_SOCKET s, │ │ │ │ +00161070: 2073 7472 7563 7420 736f 636b 6164 6472 struct sockaddr │ │ │ │ +00161080: 202a 612c 2069 6e74 202a 6e29 3c2f 636f *a, int *n)

    .

    This │ │ │ │ +001610a0: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ +001610b0: 6564 2062 7920 3c63 6f64 653e 3c61 2063 ed by soap_accept │ │ │ │ +00161140: 3c2f 613e 3c2f 636f 6465 3e20 286f 7220 (or │ │ │ │ +00161150: 7468 6520 432b 2b20 7365 7276 6963 6520 the C++ service │ │ │ │ +00161160: 636c 6173 7320 3c63 6f64 653e 6163 6365 class acce │ │ │ │ +00161170: 7074 3c2f 636f 6465 3e20 6d65 7468 6f64 pt method │ │ │ │ +00161180: 2920 746f 2077 6169 7420 666f 7220 616e ) to wait for an │ │ │ │ +00161190: 6420 6163 6365 7074 2061 2073 6f63 6b65 d accept a socke │ │ │ │ +001611a0: 7420 636f 6e6e 6563 7469 6f6e 2072 6571 t connection req │ │ │ │ +001611b0: 7565 7374 6564 2062 7920 6120 636c 6965 uested by a clie │ │ │ │ +001611c0: 6e74 2e20 5265 7475 726e 7320 6120 7661 nt. Returns a va │ │ │ │ +001611d0: 6c69 6420 736f 636b 6574 206f 7220 3c63 lid socket or #SOAP_INVALI │ │ │ │ +001611f0: 445f 534f 434b 4554 3c2f 636f 6465 3e20 D_SOCKET │ │ │ │ +00161200: 7768 656e 2061 6e20 6572 726f 7220 6f63 when an error oc │ │ │ │ +00161210: 6375 7272 6564 2061 6e64 2073 6574 7320 curred and sets │ │ │ │ +00161220: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap │ │ │ │ +001612d0: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error to a s │ │ │ │ +001613a0: 6f61 705f 7374 6174 7573 3c2f 613e 3c2f oap_status value. The │ │ │ │ +001613c0: 2062 7569 6c74 2d69 6e20 6675 6e63 7469 built-in functi │ │ │ │ +001613d0: 6f6e 2061 7373 6967 6e65 6420 746f 203c on assigned to < │ │ │ │ +001613e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::faccept is tcp_accept.

    .

    .fclose.

    int │ │ │ │ +00161510: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap::fclose)(struct soap │ │ │ │ +001615c0: 2a73 6f61 7029 3c2f 636f 6465 3e3c 2f70 *soap)

    .

    This callba │ │ │ │ +001615e0: 636b 2069 7320 6361 6c6c 6564 2062 7920 ck is called by │ │ │ │ +001615f0: 7468 6520 656e 6769 6e65 2061 7420 7468 the engine at th │ │ │ │ +00161600: 6520 636c 6965 6e74 2d73 6964 6520 746f e client-side to │ │ │ │ +00161610: 2063 6c6f 7365 2074 6865 2063 7572 7265 close the curre │ │ │ │ +00161620: 6e74 2073 6f63 6b65 7420 636f 6e6e 6563 nt socket connec │ │ │ │ +00161630: 7469 6f6e 2062 6566 6f72 6520 6120 6e65 tion before a ne │ │ │ │ +00161640: 7720 736f 636b 6574 2063 6f6e 6e65 6374 w socket connect │ │ │ │ +00161650: 696f 6e20 6973 2065 7374 6162 6c69 7368 ion is establish │ │ │ │ +00161660: 6564 2e20 5468 6973 2063 616c 6c62 6163 ed. This callbac │ │ │ │ +00161670: 6b20 6d61 7920 6265 2063 616c 6c65 6420 k may be called │ │ │ │ +00161680: 6d75 6c74 6970 6c65 2074 696d 6573 2028 multiple times ( │ │ │ │ +00161690: 652e 672e 2062 7920 7468 6520 656e 6769 e.g. by the engi │ │ │ │ +001616a0: 6e65 2061 6e64 2062 7920 706c 7567 696e ne and by plugin │ │ │ │ +001616b0: 7329 2074 6f20 636c 6f73 6520 7468 6520 s) to close the │ │ │ │ +001616c0: 7361 6d65 2073 6f63 6b65 7420 3c63 6f64 same socket soap:: │ │ │ │ +00161790: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket. Checks intern │ │ │ │ +001617b0: 616c 6c79 2069 6620 3c63 6f64 653e 3c61 ally if soap::sock │ │ │ │ +00161880: 6574 3c2f 613e 3c2f 636f 6465 3e20 3d3d et == │ │ │ │ +00161890: 203c 636f 6465 3e23 534f 4150 5f49 4e56 #SOAP_INV │ │ │ │ +001618a0: 414c 4944 5f53 4f43 4b45 543c 2f63 6f64 ALID_SOCKET before closin │ │ │ │ +001618c0: 672c 2077 6869 6368 206d 6561 6e73 2074 g, which means t │ │ │ │ +001618d0: 6861 7420 7468 6520 736f 636b 6574 2077 hat the socket w │ │ │ │ +001618e0: 6173 2061 6c72 6561 6479 2063 6c6f 7365 as already close │ │ │ │ +001618f0: 642e 2052 6574 7572 6e73 203c 636f 6465 d. Returns #SOAP_OK │ │ │ │ +00161910: 206f 7220 6120 3c63 6f64 653e 3c61 2063 or a soa │ │ │ │ +001619d0: 705f 7374 6174 7573 3c2f 613e 3c2f 636f p_status (int) error │ │ │ │ +001619f0: 636f 6465 2e20 5468 6520 6275 696c 742d code. The built- │ │ │ │ +00161a00: 696e 2066 756e 6374 696f 6e20 6173 7369 in function assi │ │ │ │ +00161a10: 676e 6564 2074 6f20 3c63 6f64 653e 3c61 gned to s │ │ │ │ +00161ab0: 6f61 703a 3a66 636c 6f73 653c 2f61 3e3c oap::fclose< │ │ │ │ +00161ac0: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is │ │ │ │ +00161ad0: 7463 705f 6469 7363 6f6e 6e65 6374 3c2f tcp_disconnect.

    .

    < │ │ │ │ +00161af0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +00161b00: 2069 643d 2261 7574 6f74 6f63 5f6d 6434 id="autotoc_md4 │ │ │ │ +00161b10: 3822 3e3c 2f61 3e0a 6672 6573 6f6c 7665 8">.fresolve │ │ │ │ +00161b20: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i │ │ │ │ +00161b30: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap │ │ │ │ +00161bd0: 3a3a 6672 6573 6f6c 7665 3c2f 613e 2928 ::fresolve)( │ │ │ │ +00161be0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00161bf0: 702c 2063 6f6e 7374 2063 6861 7220 2a61 p, const char *a │ │ │ │ +00161c00: 6464 722c 2073 7472 7563 7420 696e 5f61 ddr, struct in_a │ │ │ │ +00161c10: 6464 7220 2a69 6e61 6464 7229 3c2f 636f ddr *inaddr)

    .

    This │ │ │ │ +00161c30: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ +00161c40: 6564 2062 7920 3c63 6f64 653e 3c61 2063 ed by soa │ │ │ │ +00161cc0: 705f 6269 6e64 3c2f 613e 3c2f 636f 6465 p_bind (or the C++ se │ │ │ │ +00161ce0: 7276 6963 6520 636c 6173 7320 3c63 6f64 rvice class bind me │ │ │ │ +00161d00: 7468 6f64 2920 6174 2074 6865 2073 6572 thod) at the ser │ │ │ │ +00161d10: 7665 722d 7369 6465 2061 6e64 2062 7920 ver-side and by │ │ │ │ +00161d20: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_connect or soa │ │ │ │ +00161e30: 705f 636f 6e6e 6563 745f 636f 6d6d 616e p_connect_comman │ │ │ │ +00161e40: 643c 2f61 3e3c 2f63 6f64 653e 2061 7420 d at │ │ │ │ +00161e50: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side │ │ │ │ +00161e60: 7769 7468 2061 2068 6f73 7420 3c63 6f64 with a host name pa │ │ │ │ +00161e80: 7261 6d65 7465 7220 746f 2072 6573 6f6c rameter to resol │ │ │ │ +00161e90: 7665 2074 6f20 6164 6472 6573 7320 3c63 ve to address inaddr by address tra │ │ │ │ +00161ec0: 6e73 6c61 7469 6f6e 2e20 5768 656e 2073 nslation. When s │ │ │ │ +00161ed0: 7563 6365 7373 6675 6c20 7365 7473 2070 uccessful sets p │ │ │ │ +00161ee0: 6172 616d 6574 6572 203c 636f 6465 3e69 arameter i │ │ │ │ +00161ef0: 6e61 6464 723c 2f63 6f64 653e 2061 6e64 naddr and │ │ │ │ +00161f00: 2072 6574 7572 6e73 203c 636f 6465 3e23 returns # │ │ │ │ +00161f10: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o │ │ │ │ +00161f20: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_ │ │ │ │ +00161fe0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status (int) error co │ │ │ │ +00162000: 6465 2e20 5468 6520 6275 696c 742d 696e de. The built-in │ │ │ │ +00162010: 2066 756e 6374 696f 6e20 6173 7369 676e function assign │ │ │ │ +00162020: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fresol │ │ │ │ +001620d0: 7665 3c2f 613e 3c2f 636f 6465 3e20 6973 ve is │ │ │ │ +001620e0: 203c 636f 6465 3e74 6370 5f67 6574 686f tcp_getho │ │ │ │ +001620f0: 7374 3c2f 636f 6465 3e2e 3c2f 703e 0a3c st.

    .< │ │ │ │ +00162100: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.fcon │ │ │ │ +00162130: 6e65 6374 3c2f 6833 3e0a 3c70 3e3c 636f nect

    .

    int (soap::fconne │ │ │ │ +001621f0: 6374 3c2f 613e 2928 7374 7275 6374 2073 ct)(struct s │ │ │ │ +00162200: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const │ │ │ │ +00162210: 2063 6861 7220 2a65 6e64 706f 696e 742c char *endpoint, │ │ │ │ +00162220: 2063 6f6e 7374 2063 6861 7220 2a68 6f73 const char *hos │ │ │ │ +00162230: 742c 2069 6e74 2070 6f72 7429 3c2f 636f t, int port)

    .

    This │ │ │ │ +00162250: 6361 6c6c 6261 636b 2069 7320 6361 6c6c callback is call │ │ │ │ +00162260: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine │ │ │ │ +00162270: 2074 6f20 6f70 7469 6f6e 616c 6c79 206f to optionally o │ │ │ │ +00162280: 7665 7272 6964 6520 636c 6965 6e74 2d73 verride client-s │ │ │ │ +00162290: 6964 6520 636f 6e6e 6563 7469 6e67 2e20 ide connecting. │ │ │ │ +001622a0: 5468 6520 7061 7261 6d65 7465 7273 203c The parameters < │ │ │ │ +001622b0: 636f 6465 3e68 6f73 743c 2f63 6f64 653e code>host │ │ │ │ +001622c0: 2061 6e64 203c 636f 6465 3e70 6f72 743c and port< │ │ │ │ +001622d0: 2f63 6f64 653e 2077 6572 6520 6d69 6372 /code> were micr │ │ │ │ +001622e0: 6f2d 7061 7273 6564 2066 726f 6d20 7468 o-parsed from th │ │ │ │ +001622f0: 6520 3c63 6f64 653e 656e 6470 6f69 6e74 e endpoint │ │ │ │ +00162300: 3c2f 636f 6465 3e20 7072 696f 7220 746f prior to │ │ │ │ +00162310: 2070 6173 7369 6e67 2074 6865 6d20 746f passing them to │ │ │ │ +00162320: 2074 6869 7320 6361 6c6c 6261 636b 2e20 this callback. │ │ │ │ +00162330: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S │ │ │ │ +00162340: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or │ │ │ │ +00162350: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s │ │ │ │ +00162410: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus │ │ │ │ +00162420: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod │ │ │ │ +00162430: 652e 204e 6f20 6275 696c 742d 696e 2066 e. No built-in f │ │ │ │ +00162440: 756e 6374 696f 6e20 6973 2061 7373 6967 unction is assig │ │ │ │ +00162450: 6e65 6420 746f 203c 636f 6465 3e3c 6120 ned to soap::f │ │ │ │ +00162500: 636f 6e6e 6563 743c 2f61 3e3c 2f63 6f64 connect.

    .

    │ │ │ │ +00162540: 3c2f 613e 0a66 6469 7363 6f6e 6e65 6374 .fdisconnect │ │ │ │ +00162550: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i │ │ │ │ +00162560: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (soap::f │ │ │ │ +00162600: 6469 7363 6f6e 6e65 6374 3c2f 613e 2928 disconnect)( │ │ │ │ +00162610: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00162620: 7029 3c2f 636f 6465 3e3c 2f70 3e0a 3c70 p)

    .

    This callback i │ │ │ │ +00162640: 7320 6361 6c6c 6564 2062 7920 7468 6520 s called by the │ │ │ │ +00162650: 656e 6769 6e65 203c 636f 6465 3e3c 6120 engine │ │ │ │ +001626d0: 736f 6170 5f63 6c6f 7365 736f 636b 3c2f soap_closesock before │ │ │ │ +001626f0: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap │ │ │ │ +00162790: 3a3a 6663 6c6f 7365 3c2f 613e 3c2f 636f ::fclose callback is │ │ │ │ +001627b0: 6361 6c6c 6564 2074 6f20 7368 7574 646f called to shutdo │ │ │ │ +001627c0: 776e 2f64 6973 636f 6e6e 6563 742e 2052 wn/disconnect. R │ │ │ │ +001627d0: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO │ │ │ │ +001627e0: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or │ │ │ │ +001627f0: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st │ │ │ │ +001628b0: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus │ │ │ │ +001628c0: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code │ │ │ │ +001628d0: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu │ │ │ │ +001628e0: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign │ │ │ │ +001628f0: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fdisconne │ │ │ │ +001629a0: 6374 3c2f 613e 3c2f 636f 6465 3e2e 3c2f ct..

    . │ │ │ │ +001629e0: 6663 6c6f 7365 736f 636b 6574 3c2f 6833 fclosesocket

    .

    int ( │ │ │ │ +00162a00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fcloseso │ │ │ │ +00162a90: 636b 6574 3c2f 613e 2928 7374 7275 6374 cket)(struct │ │ │ │ +00162aa0: 2073 6f61 7020 2a73 6f61 702c 2053 4f41 soap *soap, SOA │ │ │ │ +00162ab0: 505f 534f 434b 4554 2073 6f63 6b29 3c2f P_SOCKET sock)

    .

    Thi │ │ │ │ +00162ad0: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca │ │ │ │ +00162ae0: 6c6c 6564 2074 6f20 636c 6f73 6520 6120 lled to close a │ │ │ │ +00162af0: 736f 636b 6574 2062 7920 7468 6520 656e socket by the en │ │ │ │ +00162b00: 6769 6e65 2e20 5265 7475 726e 7320 3c63 gine. Returns #SOAP_OK or a < │ │ │ │ +00162b30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00162b40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +00162b50: 5f65 7272 6f72 732e 6874 6d6c 2367 6163 _errors.html#gac │ │ │ │ +00162b60: 3065 6164 6638 6637 3262 6163 6235 6234 0eadf8f72bacb5b4 │ │ │ │ +00162b70: 3162 3735 3062 6561 6563 6130 3434 3422 1b750beaeca0444" │ │ │ │ +00162b80: 2074 6974 6c65 3d22 5374 6174 7573 2061 title="Status a │ │ │ │ +00162b90: 6e64 2065 7272 6f72 2063 6f64 6573 2061 nd error codes a │ │ │ │ +00162ba0: 7265 2069 6e74 2076 616c 7565 732c 2061 re int values, a │ │ │ │ +00162bb0: 207a 6572 6f20 7661 6c75 6520 6f72 2023 zero value or # │ │ │ │ +00162bc0: 534f 4150 5f4f 4b20 2830 2920 6d65 616e SOAP_OK (0) mean │ │ │ │ +00162bd0: 7320 6e6f 2065 7272 6f72 2c2e 2e2e 223e s no error,..."> │ │ │ │ +00162be0: 736f 6170 5f73 7461 7475 733c 2f61 3e3c soap_status< │ │ │ │ +00162bf0: 2f63 6f64 653e 2028 696e 7429 2065 7272 /code> (int) err │ │ │ │ +00162c00: 6f72 2063 6f64 652e 2054 6865 2062 7569 or code. The bui │ │ │ │ +00162c10: 6c74 2d69 6e20 6675 6e63 7469 6f6e 2061 lt-in function a │ │ │ │ +00162c20: 7373 6967 6e65 6420 746f 203c 636f 6465 ssigned to soap::fcloses │ │ │ │ +00162cc0: 6f63 6b65 743c 2f61 3e3c 2f63 6f64 653e ocket │ │ │ │ +00162cd0: 2069 7320 3c63 6f64 653e 7463 705f 636c is tcp_cl │ │ │ │ +00162ce0: 6f73 6573 6f63 6b65 743c 2f63 6f64 653e osesocket │ │ │ │ +00162cf0: 2e3c 2f70 3e0a 3c68 333e 3c61 2063 6c61 .

    .

    .fshutdownsock │ │ │ │ +00162d30: 6574 3c2f 6833 3e0a 3c70 3e3c 636f 6465 et

    .

    int (soap │ │ │ │ +00162dd0: 3a3a 6673 6875 7464 6f77 6e73 6f63 6b65 ::fshutdownsocke │ │ │ │ +00162de0: 743c 2f61 3e29 2873 7472 7563 7420 736f t)(struct so │ │ │ │ +00162df0: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S │ │ │ │ +00162e00: 4f43 4b45 5420 736f 636b 2c20 696e 7420 OCKET sock, int │ │ │ │ +00162e10: 686f 7729 3c2f 636f 6465 3e3c 2f70 3e0a how)

    . │ │ │ │ +00162e20: 3c70 3e54 6869 7320 6361 6c6c 6261 636b

    This callback │ │ │ │ +00162e30: 2069 7320 6361 6c6c 6564 2074 6f20 7368 is called to sh │ │ │ │ +00162e40: 7574 2064 6f77 6e20 6120 736f 636b 6574 ut down a socket │ │ │ │ +00162e50: 2062 7920 7468 6520 656e 6769 6e65 2e20 by the engine. │ │ │ │ +00162e60: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S │ │ │ │ +00162e70: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or │ │ │ │ +00162e80: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s │ │ │ │ +00162f40: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus │ │ │ │ +00162f50: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod │ │ │ │ +00162f60: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in │ │ │ │ +00162f70: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne │ │ │ │ +00162f80: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fshutdown │ │ │ │ +00163020: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket is tcp_s │ │ │ │ +00163040: 6875 7464 6f77 6e73 6f63 6b65 743c 2f63 hutdownsocket.

    .

    .fpoll

    .

    int ( │ │ │ │ +001630a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ +00163160: 3a3a 6670 6f6c 6c3c 2f61 3e29 2873 7472 ::fpoll)(str │ │ │ │ +00163170: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)< │ │ │ │ +00163180: 2f63 6f64 653e 3c2f 703e 0a3c 703e 5468 /code>

    .

    Th │ │ │ │ +00163190: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c │ │ │ │ +001631a0: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng │ │ │ │ +001631b0: 696e 6520 746f 2077 6169 7420 666f 7220 ine to wait for │ │ │ │ +001631c0: 6163 7469 7669 7479 206f 6e20 7468 6520 activity on the │ │ │ │ +001631d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +00163290: 6170 3a3a 736f 636b 6574 3c2f 613e 3c2f ap::socket or < │ │ │ │ +001632b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +001632c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +001632d0: 6d6c 2361 6236 3439 6238 6633 6237 3130 ml#ab649b8f3b710 │ │ │ │ +001632e0: 3831 6431 3465 6336 3335 3061 6234 6230 81d14ec6350ab4b0 │ │ │ │ +001632f0: 3637 3934 2220 7469 746c 653d 2254 6865 6794" title="The │ │ │ │ +00163300: 2073 6f63 6b65 7420 7365 7420 6279 2073 socket set by s │ │ │ │ +00163310: 6f61 705f 6269 6e64 2028 6f72 2074 6865 oap_bind (or the │ │ │ │ +00163320: 2043 2b2b 2073 6572 7669 6365 2063 6c61 C++ service cla │ │ │ │ +00163330: 7373 2062 696e 6420 6d65 7468 6f64 2920 ss bind method) │ │ │ │ +00163340: 746f 2073 6572 7665 2061 7320 7468 6520 to serve as the │ │ │ │ +00163350: 6d61 7374 6572 2073 6f63 6b65 7420 626f master socket bo │ │ │ │ +00163360: 756e 2e2e 2e22 3e73 6f61 703a 3a6d 6173 un...">soap::mas │ │ │ │ +00163370: 7465 723c 2f61 3e3c 2f63 6f64 653e 2073 ter s │ │ │ │ +00163380: 6f63 6b65 7420 7573 696e 6720 3c63 6f64 ocket using poll or │ │ │ │ +001633a0: 203c 636f 6465 3e73 656c 6563 743c 2f63 select. Times out │ │ │ │ +001633c0: 7768 656e 203c 636f 6465 3e3c 6120 636c when soap::send_ti │ │ │ │ +00163480: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout │ │ │ │ +00163490: 206f 7220 3c63 6f64 653e 3c61 2063 6c61 or soap::recv_ │ │ │ │ +00163550: 7469 6d65 6f75 743c 2f61 3e3c 2f63 6f64 timeout are nonzero. │ │ │ │ +00163570: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S │ │ │ │ +00163580: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or │ │ │ │ +00163590: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s │ │ │ │ +00163650: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus │ │ │ │ +00163660: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod │ │ │ │ +00163670: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in │ │ │ │ +00163680: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne │ │ │ │ +00163690: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fpo │ │ │ │ +00163760: 6c6c 3c2f 613e 3c2f 636f 6465 3e20 6973 ll is │ │ │ │ +00163770: 203c 636f 6465 3e73 6f61 705f 706f 6c6c soap_poll │ │ │ │ +00163780: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 6833 .

    .

    .frecv< │ │ │ │ +001637c0: 2f68 333e 0a3c 703e 3c63 6f64 653e 7369 /h3>.

    si │ │ │ │ +001637d0: 7a65 5f74 2028 3c61 2063 6c61 7373 3d22 ze_t (s │ │ │ │ +00163870: 6f61 703a 3a66 7265 6376 3c2f 613e 2928 oap::frecv)( │ │ │ │ +00163880: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00163890: 702c 2063 6861 7220 2a62 7566 2c20 7369 p, char *buf, si │ │ │ │ +001638a0: 7a65 5f74 206c 656e 293c 2f63 6f64 653e ze_t len) │ │ │ │ +001638b0: 3c2f 703e 0a3c 703e 5468 6973 2063 616c

    .

    This cal │ │ │ │ +001638c0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ +001638d0: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to │ │ │ │ +001638e0: 2072 6563 6569 7665 2028 6f72 2072 6561 receive (or rea │ │ │ │ +001638f0: 6429 2064 6174 6120 696e 746f 2061 2073 d) data into a s │ │ │ │ +00163900: 7065 6369 6669 6564 2062 7566 6665 7220 pecified buffer │ │ │ │ +00163910: 3c63 6f64 653e 6275 663c 2f63 6f64 653e buf │ │ │ │ +00163920: 2061 6e64 203c 636f 6465 3e6c 656e 3c2f and len. The sourc │ │ │ │ +00163940: 6520 666f 7220 7468 6520 6461 7461 2074 e for the data t │ │ │ │ +00163950: 6f20 7265 6164 2062 7920 7468 6973 2063 o read by this c │ │ │ │ +00163960: 616c 6c62 6163 6b20 6973 203c 636f 6465 allback is soap::i │ │ │ │ +00163a30: 733c 2f61 3e3c 2f63 6f64 653e 2077 6865 s whe │ │ │ │ +00163a40: 6e20 6e6f 6e2d 4e55 4c4c 2c20 3c63 6f64 n non-NULL, soap:: │ │ │ │ +00163b10: 736f 636b 6574 3c2f 613e 3c2f 636f 6465 socket when valid, or │ │ │ │ +00163b30: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +00163bf0: 6f61 703a 3a72 6563 7666 643c 2f61 3e3c oap::recvfd< │ │ │ │ +00163c00: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns │ │ │ │ +00163c10: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e │ │ │ │ +00163d00: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b │ │ │ │ +00163d10: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function │ │ │ │ +00163d20: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap │ │ │ │ +00163dd0: 3a3a 6672 6563 763c 2f61 3e3c 2f63 6f64 ::frecv is frec │ │ │ │ +00163df0: 763c 2f63 6f64 653e 2e3c 2f70 3e0a 3c68 v.

    ..fsend │ │ │ │ +00163e30: 3c2f 6833 3e0a 3c70 3e3c 636f 6465 3e69

    .

    i │ │ │ │ +00163e40: 6e74 2028 3c61 2063 6c61 7373 3d22 656c nt (so │ │ │ │ +00163ed0: 6170 3a3a 6673 656e 643c 2f61 3e29 2873 ap::fsend)(s │ │ │ │ +00163ee0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +00163ef0: 2c20 636f 6e73 7420 6368 6172 202a 6275 , const char *bu │ │ │ │ +00163f00: 662c 2073 697a 655f 7420 6c65 6e29 3c2f f, size_t len)

    .

    Thi │ │ │ │ +00163f20: 7320 6361 6c6c 6261 636b 2069 7320 6361 s callback is ca │ │ │ │ +00163f30: 6c6c 6564 2062 7920 7468 6520 656e 6769 lled by the engi │ │ │ │ +00163f40: 6e65 2074 6f20 7365 6e64 2028 6f72 2077 ne to send (or w │ │ │ │ +00163f50: 7269 7465 2920 6461 7461 2073 7065 6369 rite) data speci │ │ │ │ +00163f60: 6669 6564 2062 7920 3c63 6f64 653e 6461 fied by da │ │ │ │ +00163f70: 7461 3c2f 636f 6465 3e20 6279 7465 7320 ta bytes │ │ │ │ +00163f80: 6f66 206c 656e 6774 6820 3c63 6f64 653e of length │ │ │ │ +00163f90: 6c65 6e3c 2f63 6f64 653e 2e20 5468 6520 len. The │ │ │ │ +00163fa0: 7369 6e6b 2066 6f72 2074 6865 2064 6174 sink for the dat │ │ │ │ +00163fb0: 6120 746f 2062 6520 7365 6e74 2074 6f20 a to be sent to │ │ │ │ +00163fc0: 6973 2074 7970 6963 616c 6c79 203c 636f is typically soap: │ │ │ │ +00164090: 3a73 6f63 6b65 743c 2f61 3e3c 2f63 6f64 :socket, soap::sendfd or soap: │ │ │ │ +00164240: 3a6f 733c 2f61 3e3c 2f63 6f64 653e 2e20 :os. │ │ │ │ +00164250: 5265 7475 726e 7320 3c63 6f64 653e 2353 Returns #S │ │ │ │ +00164260: 4f41 505f 4f4b 3c2f 636f 6465 3e20 6f72 OAP_OK or │ │ │ │ +00164270: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap_s │ │ │ │ +00164330: 7461 7475 733c 2f61 3e3c 2f63 6f64 653e tatus │ │ │ │ +00164340: 2028 696e 7429 2065 7272 6f72 2063 6f64 (int) error cod │ │ │ │ +00164350: 652e 2054 6865 2062 7569 6c74 2d69 6e20 e. The built-in │ │ │ │ +00164360: 6675 6e63 7469 6f6e 2061 7373 6967 6e65 function assigne │ │ │ │ +00164370: 6420 746f 203c 636f 6465 3e3c 6120 636c d to soap::fsend │ │ │ │ +00164410: 3c2f 613e 3c2f 636f 6465 3e20 6973 203c is < │ │ │ │ +00164420: 636f 6465 3e66 7365 6e64 3c2f 636f 6465 code>fsend.

    .

    < │ │ │ │ +00164460: 2f61 3e0a 6673 6572 7665 726c 6f6f 703c /a>.fserverloop< │ │ │ │ +00164470: 2f68 333e 0a3c 703e 3c63 6f64 653e 696e /h3>.

    in │ │ │ │ +00164480: 7420 283c 6120 636c 6173 733d 2265 6c22 t (soap::f │ │ │ │ +00164550: 7365 7276 656c 6f6f 703c 2f61 3e29 2873 serveloop)(s │ │ │ │ +00164560: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +00164570: 293c 2f63 6f64 653e 3c2f 703e 0a3c 703e )

    .

    │ │ │ │ +00164580: 5468 6973 2063 616c 6c62 6163 6b20 6973 This callback is │ │ │ │ +00164590: 2063 616c 6c65 6420 6166 7465 7220 6561 called after ea │ │ │ │ +001645a0: 6368 2073 7563 6365 7373 6675 6c20 636f ch successful co │ │ │ │ +001645b0: 6d70 6c65 7469 6f6e 206f 6620 6120 7365 mpletion of a se │ │ │ │ +001645c0: 7276 6572 206f 7065 7261 7469 6f6e 2069 rver operation i │ │ │ │ +001645d0: 6e20 7468 6520 7365 7276 6572 206c 6f6f n the server loo │ │ │ │ +001645e0: 702e 2045 7865 6375 7465 7320 696d 6d65 p. Executes imme │ │ │ │ +001645f0: 6469 6174 656c 7920 6166 7465 7220 7365 diately after se │ │ │ │ +00164600: 6e64 696e 6720 7468 6520 7265 7370 6f6e nding the respon │ │ │ │ +00164610: 7365 2074 6f20 6120 636c 6965 6e74 2061 se to a client a │ │ │ │ +00164620: 6e64 2062 6566 6f72 6520 7468 6520 6e65 nd before the ne │ │ │ │ +00164630: 7874 206b 6565 702d 616c 6976 6520 7365 xt keep-alive se │ │ │ │ +00164640: 7276 6572 206c 6f6f 7020 6974 6572 6174 rver loop iterat │ │ │ │ +00164650: 696f 6e20 7768 656e 2065 6e61 626c 6564 ion when enabled │ │ │ │ +00164660: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA │ │ │ │ +00164670: 505f 494f 5f4b 4545 5041 4c49 5645 3c2f P_IO_KEEPALIVE. This call │ │ │ │ +00164690: 6261 636b 2063 616e 2062 6520 7573 6564 back can be used │ │ │ │ +001646a0: 2074 6f20 7265 636c 6169 6d20 7265 736f to reclaim reso │ │ │ │ +001646b0: 7572 6365 7320 696e 2074 6865 206b 6565 urces in the kee │ │ │ │ +001646c0: 702d 616c 6976 6520 7365 7276 6572 206c p-alive server l │ │ │ │ +001646d0: 6f6f 702c 2066 6f72 2065 7861 6d70 6c65 oop, for example │ │ │ │ +001646e0: 206d 616e 6167 6564 206d 656d 6f72 7920 managed memory │ │ │ │ +001646f0: 6361 6e20 6265 2072 6563 6c61 696d 6564 can be reclaimed │ │ │ │ +00164700: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling soap_destroy and soap_end< │ │ │ │ +001648b0: 2f61 3e3c 2f63 6f64 653e 2069 6e20 7468 /a> in th │ │ │ │ +001648c0: 6174 206f 7264 6572 2061 6e64 2061 6c6c at order and all │ │ │ │ +001648d0: 2064 6573 6572 6961 6c69 7a65 6420 616e deserialized an │ │ │ │ +001648e0: 6420 6f74 6865 7220 6479 6e61 6d69 6361 d other dynamica │ │ │ │ +001648f0: 6c6c 792d 616c 6c6f 6361 7465 6420 6461 lly-allocated da │ │ │ │ +00164900: 7461 206d 616e 6167 6564 2062 7920 7468 ta managed by th │ │ │ │ +00164910: 6520 636f 6e74 6578 7420 7769 6c6c 2062 e context will b │ │ │ │ +00164920: 6520 6465 616c 6c6f 6361 7465 642e 2052 e deallocated. R │ │ │ │ +00164930: 6574 7572 6e73 203c 636f 6465 3e23 534f eturns #SO │ │ │ │ +00164940: 4150 5f4f 4b3c 2f63 6f64 653e 206f 7220 AP_OK or │ │ │ │ +00164950: 6120 3c63 6f64 653e 3c61 2063 6c61 7373 a soap_st │ │ │ │ +00164a10: 6174 7573 3c2f 613e 3c2f 636f 6465 3e20 atus │ │ │ │ +00164a20: 2869 6e74 2920 6572 726f 7220 636f 6465 (int) error code │ │ │ │ +00164a30: 2e20 4e6f 2062 7569 6c74 2d69 6e20 6675 . No built-in fu │ │ │ │ +00164a40: 6e63 7469 6f6e 2069 7320 6173 7369 676e nction is assign │ │ │ │ +00164a50: 6564 2074 6f20 3c63 6f64 653e 3c61 2063 ed to soap::fservelo │ │ │ │ +00164b30: 6f70 3c2f 613e 3c2f 636f 6465 3e2e 3c2f op..

    . │ │ │ │ +00164b70: 666d 616c 6c6f 633c 2f68 333e 0a3c 703e fmalloc

    .

    │ │ │ │ +00164b80: 3c63 6f64 653e 766f 6964 2028 3c61 2063 void (soap::fm │ │ │ │ +00164c30: 616c 6c6f 633c 2f61 3e29 2873 7472 7563 alloc)(struc │ │ │ │ +00164c40: 7420 736f 6170 202a 736f 6170 2c20 7369 t soap *soap, si │ │ │ │ +00164c50: 7a65 5f74 2073 697a 6529 3c2f 636f 6465 ze_t size)

    .

    This ca │ │ │ │ +00164c70: 6c6c 6261 636b 2063 616e 2062 6520 7573 llback can be us │ │ │ │ +00164c80: 6564 2074 6f20 6f76 6572 7269 6465 206d ed to override m │ │ │ │ +00164c90: 656d 6f72 7920 616c 6c6f 6361 7469 6f6e emory allocation │ │ │ │ +00164ca0: 2061 6e64 206d 616e 6167 656d 656e 7420 and management │ │ │ │ +00164cb0: 646f 6e65 2062 7920 3c63 6f64 653e 3c61 done by │ │ │ │ +00164d60: 736f 6170 5f6d 616c 6c6f 633c 2f61 3e3c soap_malloc< │ │ │ │ +00164d70: 2f63 6f64 653e 2069 6e20 432e 204d 656d /code> in C. Mem │ │ │ │ +00164d80: 6f72 7920 616c 6c6f 6361 7465 6420 7669 ory allocated vi │ │ │ │ +00164d90: 6120 7468 6973 2063 616c 6c62 6163 6b20 a this callback │ │ │ │ +00164da0: 7769 6c6c 206e 6f74 2062 6520 6d61 6e61 will not be mana │ │ │ │ +00164db0: 6765 6420 616e 6420 6e6f 7420 6265 2061 ged and not be a │ │ │ │ +00164dc0: 7574 6f6d 6174 6963 616c 6c79 2072 656c utomatically rel │ │ │ │ +00164dd0: 6561 7365 6420 6279 2074 6865 2065 6e67 eased by the eng │ │ │ │ +00164de0: 696e 652e 2049 6e73 7465 6164 2c20 7468 ine. Instead, th │ │ │ │ +00164df0: 6520 6170 706c 6963 6174 696f 6e20 7573 e application us │ │ │ │ +00164e00: 696e 6720 7468 6973 2063 616c 6c62 6163 ing this callbac │ │ │ │ +00164e10: 6b20 7368 6f75 6c64 2072 656c 6561 7365 k should release │ │ │ │ +00164e20: 2061 6c6c 6f63 6174 6564 206d 656d 6f72 allocated memor │ │ │ │ +00164e30: 792e 2041 6c6c 2061 6c6c 6f63 6174 696f y. All allocatio │ │ │ │ +00164e40: 6e73 2064 6f6e 6520 6279 203c 636f 6465 ns done by soap_malloc are re │ │ │ │ +00164f10: 706c 6163 6564 2077 6974 6820 6120 6361 placed with a ca │ │ │ │ +00164f20: 6c6c 2074 6f20 3c63 6f64 653e 3c61 2063 ll to soap::fm │ │ │ │ +00164fd0: 616c 6c6f 633c 2f61 3e3c 2f63 6f64 653e alloc │ │ │ │ +00164fe0: 2e20 486f 7765 7665 722c 206e 6f20 6f74 . However, no ot │ │ │ │ +00164ff0: 6865 7220 616c 6c6f 6361 7469 6f6e 732c her allocations, │ │ │ │ +00165000: 2073 7563 6820 6173 203c 636f 6465 3e3c such as < │ │ │ │ +00165010: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00165020: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +00165030: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga │ │ │ │ +00165040: 3837 6332 3034 3838 6232 6463 3638 3061 87c20488b2dc680a │ │ │ │ +00165050: 6161 3736 3839 6231 6430 3234 3938 3963 aa7689b1d024989c │ │ │ │ +00165060: 2220 7469 746c 653d 2241 6c6c 6f63 6174 " title="Allocat │ │ │ │ +00165070: 6520 616e 6420 696e 6974 6961 6c69 7a65 e and initialize │ │ │ │ +00165080: 2061 206e 6577 2073 6f61 7020 636f 6e74 a new soap cont │ │ │ │ +00165090: 6578 742e 223e 736f 6170 5f6e 6577 3c2f ext.">soap_new and soap_new_T for C++ cl │ │ │ │ +001650d0: 6173 7365 7320 3c63 6f64 653e 543c 2f63 asses T are affecte │ │ │ │ +001650f0: 642c 2062 6563 6175 7365 206f 626a 6563 d, because objec │ │ │ │ +00165100: 7473 2061 7265 2061 6c6c 6f63 6174 6564 ts are allocated │ │ │ │ +00165110: 2064 6966 6665 7265 6e74 6c79 2e20 5468 differently. Th │ │ │ │ +00165120: 6973 2063 616c 6c62 6163 6b20 6973 2074 is callback is t │ │ │ │ +00165130: 6865 7265 666f 7265 206e 6f74 2075 7365 herefore not use │ │ │ │ +00165140: 6675 6c20 666f 7220 432b 2b20 6170 706c ful for C++ appl │ │ │ │ +00165150: 6963 6174 696f 6e73 2e20 5265 7475 726e ications. Return │ │ │ │ +00165160: 7320 6120 706f 696e 7465 7220 746f 2064 s a pointer to d │ │ │ │ +00165170: 796e 616d 6963 616c 6c79 2061 6c6c 6f63 ynamically alloc │ │ │ │ +00165180: 6174 6564 206d 656d 6f72 7920 6f72 204e ated memory or N │ │ │ │ +00165190: 554c 4c20 6f6e 2066 6169 6c75 7265 2074 ULL on failure t │ │ │ │ +001651a0: 6f20 616c 6c6f 6361 7465 2e20 4e6f 2062 o allocate. No b │ │ │ │ +001651b0: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function │ │ │ │ +001651c0: 2069 7320 6173 7369 676e 6564 2074 6f20 is assigned to │ │ │ │ +001651d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::fmalloc< │ │ │ │ +00165280: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    . │ │ │ │ +00165290: 3c64 6c20 636c 6173 733d 2273 6563 7469
    │ │ │ │ +001652b0: 5761 726e 696e 673c 2f64 743e 3c64 643e Warning
    │ │ │ │ +001652c0: 4465 7072 6563 6174 6564 2073 696e 6365 Deprecated since │ │ │ │ +001652d0: 2032 2e38 2e37 322e 2044 6566 696e 6520 2.8.72. Define │ │ │ │ +001652e0: 3c63 6f64 653e 2353 4f41 505f 4d41 4c4c #SOAP_MALL │ │ │ │ +001652f0: 4f43 3c2f 636f 6465 3e20 616e 6420 3c63 OC and #SOAP_FREE instead.
    .

    .user varia │ │ │ │ +00165360: 626c 653c 2f68 333e 0a3c 703e 4120 3c63 ble

    .

    A void* soap::user │ │ │ │ +00165440: 3c2f 636f 6465 3e20 7661 7269 6162 6c65 variable │ │ │ │ +00165450: 2069 7320 6176 6169 6c61 626c 6520 746f is available to │ │ │ │ +00165460: 2070 6173 7320 7573 6572 2d64 6566 696e pass user-defin │ │ │ │ +00165470: 6564 2064 6174 6120 746f 2074 6865 2063 ed data to the c │ │ │ │ +00165480: 616c 6c62 6163 6b73 2e3c 2f70 3e0a 3c68 allbacks.

    ..Examp │ │ │ │ +001654c0: 6c65 733c 2f68 333e 0a3c 703e 5468 6520 les.

    The │ │ │ │ +001654d0: 666f 6c6c 6f77 696e 6720 6578 616d 706c following exampl │ │ │ │ +001654e0: 6520 7573 6573 2049 2f4f 2063 616c 6c62 e uses I/O callb │ │ │ │ +001654f0: 6163 6b73 2066 6f72 2063 7573 746f 6d69 acks for customi │ │ │ │ +00165500: 7a65 6420 7365 7269 616c 697a 6174 696f zed serializatio │ │ │ │ +00165510: 6e20 6f66 2064 6174 6120 696e 746f 2061 n of data into a │ │ │ │ +00165520: 2066 6978 6564 2d73 697a 6520 6275 6666 fixed-size buff │ │ │ │ +00165530: 6572 2061 6e64 2064 6573 6572 6961 6c69 er and deseriali │ │ │ │ +00165540: 7a61 7469 6f6e 2062 6163 6b20 696e 746f zation back into │ │ │ │ +00165550: 2061 2064 6174 6120 7374 7275 6374 7572 a data structur │ │ │ │ +00165560: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +00165590: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001655a0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char buf[10000]; │ │ │ │ +001655c0: 203c 7370 616e 2063 6c61 7373 3d22 636f // XML bu │ │ │ │ +001655e0: 6666 6572 203c 2f73 7061 6e3e 3c2f 6469 ffer .
    i │ │ │ │ +00165620: 6e74 3c2f 7370 616e 3e20 6c65 6e31 203d nt len1 = │ │ │ │ +00165630: 2030 3b20 2020 203c 7370 616e 2063 6c61 0; // │ │ │ │ +00165650: 2363 6861 7273 2077 7269 7474 656e 203c #chars written < │ │ │ │ +00165660: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +00165680: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00165690: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int len2 = 0; │ │ │ │ +001656b0: 203c 7370 616e 2063 6c61 7373 3d22 636f // #chars │ │ │ │ +001656d0: 2072 6561 6420 3c2f 7370 616e 3e3c 2f64 read .
    . │ │ │ │ -00165710: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -00165740: 2f2f 206d 7973 656e 643a 2070 7574 2058 // mysend: put X │ │ │ │ -00165750: 4d4c 2069 6e20 6275 665b 5d20 3c2f 7370 ML in buf[]
    .
    int │ │ │ │ -001657a0: 206d 7973 656e 6428 3c73 7061 6e20 636c mysend(st │ │ │ │ -001657c0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const │ │ │ │ -00165850: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -00165870: 2f73 7061 6e3e 202a 732c 203c 7370 616e /span> *s, size_t n)
    .{ │ │ │ │ -001658c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ -00165900: 6c65 6e31 202b 206e 2026 6774 3b20 3c73 len1 + n > sizeof(buf))
    .< │ │ │ │ -00165940: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00165950: 3e20 2020 203c 7370 616e 2063 6c61 7373 > r │ │ │ │ -00165970: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_EOF; < │ │ │ │ -001659e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    strcpy │ │ │ │ -00165a00: 2862 7566 202b 206c 656e 312c 2073 293b (buf + len1, s); │ │ │ │ -00165a10: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    len1 │ │ │ │ -00165a30: 202b 3d20 6e3b 203c 2f64 6976 3e0a 3c64 += n;
    . │ │ │ │ -00165a50: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ -00165a70: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO │ │ │ │ -00165ad0: 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 AP_OK;
    .
    }
    . │ │ │ │ -00165b10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -00165b40: 2f20 6d79 7265 6376 3a20 6765 7420 584d / myrecv: get XM │ │ │ │ -00165b50: 4c20 6672 6f6d 2062 7566 5b5d 203c 2f73 L from buf[]
    .
    size_t myrecv(struct │ │ │ │ -00165bd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -00165c00: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -00165c30: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char │ │ │ │ -00165c50: 3c2f 7370 616e 3e20 2a73 2c20 3c73 7061 *s, size_t n)
    .// mysend: │ │ │ │ +00165730: 2070 7574 2058 4d4c 2069 6e20 6275 665b put XML in buf[ │ │ │ │ +00165740: 5d20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ]
    . │ │ │ │ +00165750: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ +00165780: 2f73 7061 6e3e 206d 7973 656e 6428 3c73 /span> mysend(struct soap *soap, const< │ │ │ │ +00165830: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *s, │ │ │ │ +00165860: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ │ +00165880: 743c 2f73 7061 6e3e 206e 2920 3c2f 6469 t n) .
    {
    . │ │ │ │ +001658c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if
    (len1 + n & │ │ │ │ +001658f0: 6774 3b20 3c73 7061 6e20 636c 6173 733d gt; sizeof │ │ │ │ +00165910: 3c2f 7370 616e 3e28 6275 6629 2920 3c2f (buf)) ..
    │ │ │ │ +001659e0: 7374 7263 7079 2862 7566 202b 206c 656e strcpy(buf + len │ │ │ │ +001659f0: 312c 2073 293b 203c 2f64 6976 3e0a 3c64 1, s);
    . │ │ │ │ +00165a10: 2020 6c65 6e31 202b 3d20 6e3b 203c 2f64 len1 += n; .
    return │ │ │ │ +00165a60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK; │ │ │ │ +00165ac0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .< │ │ │ │ +00165b10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00165b20: 656e 7422 3e2f 2f20 6d79 7265 6376 3a20 ent">// myrecv: │ │ │ │ +00165b30: 6765 7420 584d 4c20 6672 6f6d 2062 7566 get XML from buf │ │ │ │ +00165b40: 5b5d 203c 2f73 7061 6e3e 3c2f 6469 763e []
    │ │ │ │ +00165b50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    siz │ │ │ │ +00165b80: 655f 743c 2f73 7061 6e3e 206d 7972 6563 e_t myrec │ │ │ │ +00165b90: 7628 3c73 7061 6e20 636c 6173 733d 226b v(struct soa │ │ │ │ +00165be0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +00165c10: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, char *s │ │ │ │ +00165c40: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size │ │ │ │ +00165c60: 5f74 3c2f 7370 616e 3e20 6e29 203c 2f64 _t n) .
    {
    . │ │ │ │ -00165ca0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if │ │ │ │ -00165ce0: 286c 656e 3220 2b20 6e20 2667 743b 206c (len2 + n > l │ │ │ │ -00165cf0: 656e 3129 203c 2f64 6976 3e0a 3c64 6976 en1)
    .
    │ │ │ │ -00165d10: 2020 6e20 3d20 6c65 6e31 202d 206c 656e n = len1 - len │ │ │ │ -00165d20: 323b 203c 2f64 6976 3e0a 3c64 6976 2063 2;
    .
    st │ │ │ │ -00165d40: 726e 6370 7928 732c 2062 7566 202b 206c rncpy(s, buf + l │ │ │ │ -00165d50: 656e 322c 206e 293b 203c 2f64 6976 3e0a en2, n);
    . │ │ │ │ -00165d60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    len2 += n; < │ │ │ │ -00165d80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return n;
    .
    } │ │ │ │ +00165ca0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (len2 + n │ │ │ │ +00165cd0: 2667 743b 206c 656e 3129 203c 2f64 6976 > len1)
    .
    n = len1 │ │ │ │ +00165d00: 202d 206c 656e 323b 203c 2f64 6976 3e0a - len2;
    . │ │ │ │ +00165d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    strncpy(s, b │ │ │ │ +00165d30: 7566 202b 206c 656e 322c 206e 293b 203c uf + len2, n); < │ │ │ │ +00165d40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    len2 + │ │ │ │ +00165d60: 3d20 6e3b 203c 2f64 6976 3e0a 3c64 6976 = n;
    .
    │ │ │ │ +00165d80: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +00165da0: 3c2f 7370 616e 3e20 6e3b 203c 2f64 6976 n;
    .
    }
    . │ │ │ │ 00165de0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00165e00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int │ │ │ │ -00165e30: 3c2f 7370 616e 3e20 6d61 696e 2829 203c main() < │ │ │ │ +00165df0: 733d 226c 696e 6522 3e3c 7370 616e 2063 s="line">int ma │ │ │ │ +00165e20: 696e 2829 203c 2f64 6976 3e0a 3c64 6976 in()
    .
    {< │ │ │ │ 00165e40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -00165e60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ -00165f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct │ │ │ │ -00165f30: 203c 2f73 7061 6e3e 6e73 5f5f 7065 7273 ns__pers │ │ │ │ -00165f40: 6f6e 2070 3b20 3c2f 6469 763e 0a3c 6469 on p;
    . │ │ │ │ -00165f60: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init1 │ │ │ │ -00165fc0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap, SO │ │ │ │ -00166050: 4150 5f58 4d4c 5f54 5245 453c 2f61 3e29 AP_XML_TREE) │ │ │ │ -00166060: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    len │ │ │ │ -00166080: 3120 3d20 6c65 6e32 203d 2030 3b20 2020 1 = len2 = 0; │ │ │ │ -00166090: 2020 3c73 7061 6e20 636c 6173 733d 2263 // reset │ │ │ │ -001660b0: 2062 7566 6665 7220 706f 696e 7465 7273 buffer pointers │ │ │ │ -001660c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -001660d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001660e0: 3e20 2070 2e6e 616d 6520 3d20 3c73 7061 > p.name = "Jo │ │ │ │ -00166110: 686e 2044 6f65 2671 756f 743b 3c2f 7370 hn Doe";
    .
    │ │ │ │ -00166140: 702e 6167 6520 3d20 3235 3b20 3c2f 6469 p.age = 25; .
    so │ │ │ │ -00166190: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fs │ │ │ │ -001661f0: 656e 643c 2f61 3e20 3d20 6d79 7365 6e64 end = mysend │ │ │ │ -00166200: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // assig │ │ │ │ -00166220: 6e20 6361 6c6c 6261 636b 203c 2f73 7061 n callback
    .
    soap.frecv = │ │ │ │ -001662e0: 6d79 7265 6376 3b20 3c73 7061 6e20 636c myrecv; // │ │ │ │ -00166300: 2061 7373 6967 6e20 6361 6c6c 6261 636b assign callback │ │ │ │ -00166310: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -00166320: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00166330: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ -00166350: 2f73 7061 6e3e 2028 736f 6170 5f77 7269 /span> (soap_wri │ │ │ │ -00166360: 7465 5f6e 735f 5f70 6572 736f 6e28 2661 te_ns__person(&a │ │ │ │ -00166370: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, &p)).
    {
    .< │ │ │ │ -001663d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001663e0: 3e20 2020 203c 6120 636c 6173 733d 2263 >
    soap_pri │ │ │ │ -00166440: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am │ │ │ │ -00166450: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stdout); .
    exit(EX │ │ │ │ -001664b0: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    │ │ │ │ -001664e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ -00166510: 663c 2f73 7061 6e3e 2028 736f 6170 5f72 f (soap_r │ │ │ │ -00166520: 6561 645f 6e73 5f5f 5065 7273 6f6e 2826 ead_ns__Person(& │ │ │ │ -00166530: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ -00166560: 2f61 3e2c 2026 616d 703b 7029 293c 2f64 /a>, &p)).
    {
    . │ │ │ │ -00166590: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr │ │ │ │ -00166600: 696e 745f 6661 756c 743c 2f61 3e28 2661 int_fault(&a │ │ │ │ -00166610: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, stdout); .
    exit(E │ │ │ │ -00166670: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    }
    .
    soap_ │ │ │ │ -00166710: 6465 7374 726f 793c 2f61 3e28 2661 6d70 destroy(& │ │ │ │ -00166720: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -00166750: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_end( │ │ │ │ -001667d0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ -00166800: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    . │ │ │ │ -00166820: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_done │ │ │ │ -00166880: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap);
    .
    }
    .
    soap::frecv │ │ │ │ -001669a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    size_t │ │ │ │ -001669c0: 282a 2066 7265 6376 2928 7374 7275 6374 (* frecv)(struct │ │ │ │ -001669d0: 2073 6f61 7020 2a73 6f61 702c 2063 6861 soap *soap, cha │ │ │ │ -001669e0: 7220 2a62 7566 2c20 7369 7a65 5f74 206c r *buf, size_t l │ │ │ │ -001669f0: 656e 293c 2f64 6976 3e3c 6469 7620 636c en)
    Call │ │ │ │ -00166a10: 6261 636b 2074 6861 7420 7265 6365 6976 back that receiv │ │ │ │ -00166a20: 6573 2062 7974 6573 206f 6620 6461 7461 es bytes of data │ │ │ │ -00166a30: 2069 6e74 6f20 7468 6520 6769 7665 6e20 into the given │ │ │ │ -00166a40: 6275 6666 6572 2e3c 2f64 6976 3e3c 6469 buffer.
    │ │ │ │ -00166a60: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:46 │ │ │ │ -00166a80: 3037 3c2f 6469 763e 3c2f 6469 763e 0a3c 07
    .< │ │ │ │ -00166a90: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -00166aa0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ -00166ab0: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm │ │ │ │ -00166ac0: 6c5f 6761 6664 3532 6238 3036 3535 6534 l_gafd52b80655e4 │ │ │ │ -00166ad0: 6631 3032 3165 6464 3663 3535 6238 6466 f1021edd6c55b8df │ │ │ │ -00166ae0: 6564 6666 223e 3c64 6976 2063 6c61 7373 edff"> │ │ │ │ -00166bb0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback that │ │ │ │ -00166bd0: 2073 656e 6473 2074 6865 2067 6976 656e sends the given │ │ │ │ -00166be0: 2062 7974 6573 206f 6620 6461 7461 2e3c bytes of data.< │ │ │ │ -00166bf0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -00166c10: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -00166c20: 6170 322e 683a 3436 3230 3c2f 6469 763e ap2.h:4620
    │ │ │ │ -00166c30: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    A fixed-size bu │ │ │ │ -00166c60: 6666 6572 2074 6f20 7374 6f72 6520 7468 ffer to store th │ │ │ │ -00166c70: 6520 6f75 7462 6f75 6e64 206d 6573 7361 e outbound messa │ │ │ │ -00166c80: 6765 2073 656e 7420 6973 206e 6f74 2066 ge sent is not f │ │ │ │ -00166c90: 6c65 7869 626c 6520 746f 2068 616e 646c lexible to handl │ │ │ │ -00166ca0: 6520 6c61 7267 6520 636f 6e74 656e 742e e large content. │ │ │ │ -00166cb0: 2054 6f20 7374 6f72 6520 7468 6520 6d65 To store the me │ │ │ │ -00166cc0: 7373 6167 6520 696e 2061 6e20 6578 7061 ssage in an expa │ │ │ │ -00166cd0: 6e64 696e 6720 6275 6666 6572 3a3c 2f70 nding buffer:

    .
    │ │ │ │ -00166d20: 7374 7275 6374 203c 2f73 7061 6e3e 6275 struct bu │ │ │ │ -00166d30: 6666 6572 203c 2f64 6976 3e0a 3c64 6976 ffer
    .
    {< │ │ │ │ -00166d50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t len;
    . │ │ │ │ -00166db0: 2020 3c73 7061 6e20 636c 6173 733d 226b size │ │ │ │ -00166dd0: 5f74 3c2f 7370 616e 3e20 6d61 783b 203c _t max; < │ │ │ │ -00166de0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char │ │ │ │ -00166e20: 2a62 7566 3b20 3c2f 6469 763e 0a3c 6469 *buf;
    .} │ │ │ │ -00166e40: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    i │ │ │ │ -00166e90: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main() │ │ │ │ -00166ea0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    .
    stru │ │ │ │ -00166f90: 6374 203c 2f73 7061 6e3e 6e73 5f5f 7065 ct ns__pe │ │ │ │ -00166fa0: 7273 6f6e 2070 3b20 3c2f 6469 763e 0a3c rson p;
    .< │ │ │ │ -00166fb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00166fc0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct │ │ │ │ -00166fe0: 3c2f 7370 616e 3e62 7566 6665 7220 2a68 buffer *h │ │ │ │ -00166ff0: 203d 206d 616c 6c6f 6328 3c73 7061 6e20 = malloc( │ │ │ │ -00167010: 7369 7a65 6f66 3c2f 7370 616e 3e28 3c73 sizeof(struct buffer)); .
    h->len │ │ │ │ -00167070: 203d 2030 3b20 3c2f 6469 763e 0a3c 6469 = 0;
    . │ │ │ │ -00167090: 2068 2d26 6774 3b6d 6178 203d 2030 3b20 h->max = 0; │ │ │ │ -001670a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    h-> │ │ │ │ -001670c0: 3b62 7566 203d 204e 554c 4c3b 203c 2f64 ;buf = NULL; .
    soa │ │ │ │ -00167140: 705f 696e 6974 313c 2f61 3e28 2661 6d70 p_init1(& │ │ │ │ -00167150: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -00167180: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , SOAP_XML_TR │ │ │ │ -001671e0: 4545 3c2f 613e 293b 203c 2f64 6976 3e0a EE);
    . │ │ │ │ -001671f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap< │ │ │ │ -00167230: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.use │ │ │ │ -00167280: 723c 2f61 3e20 3d20 283c 7370 616e 2063 r = (void*) │ │ │ │ -001672b0: 683b 203c 7370 616e 2063 6c61 7373 3d22 h; // pass │ │ │ │ -001672d0: 2062 7566 6665 7220 6173 2061 2068 616e buffer as a han │ │ │ │ -001672e0: 646c 6520 746f 2074 6865 2063 616c 6c62 dle to the callb │ │ │ │ -001672f0: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack
    .
    soa │ │ │ │ -00167340: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.fse │ │ │ │ -001673a0: 6e64 3c2f 613e 203d 206d 7973 656e 643b nd = mysend; │ │ │ │ -001673b0: 2020 3c73 7061 6e20 636c 6173 733d 2263 // assig │ │ │ │ -001673d0: 6e20 6361 6c6c 6261 636b 203c 2f73 7061 n callback
    .
    if │ │ │ │ -00167420: 2028 736f 6170 5f77 7269 7465 5f6e 735f (soap_write_ns_ │ │ │ │ -00167430: 5f70 6572 736f 6e28 2661 6d70 3b3c 6120 _person(&soap, &a │ │ │ │ -00167470: 6d70 3b70 2929 3c2f 6469 763e 0a3c 6469 mp;p))
    . │ │ │ │ -00167490: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    < │ │ │ │ -001674b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001674c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001674d0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga │ │ │ │ -001674e0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4 │ │ │ │ -001674f0: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af │ │ │ │ -00167500: 223e 736f 6170 5f70 7269 6e74 5f66 6175 ">soap_print_fau │ │ │ │ -00167510: 6c74 3c2f 613e 2826 616d 703b 3c61 2063 lt(&soap, std │ │ │ │ -00167550: 6f75 7429 3b20 3c2f 6469 763e 0a3c 6469 out);
    . │ │ │ │ -00167570: 2020 2065 7869 7428 4558 4954 5f46 4149 exit(EXIT_FAI │ │ │ │ -00167580: 4c55 5245 293b 203c 2f64 6976 3e0a 3c64 LURE);
    . │ │ │ │ -001675a0: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    < │ │ │ │ -001675c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001675d0: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (h->len) < │ │ │ │ -001675f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .
    ... // use h->b │ │ │ │ -00167650: 7566 5b30 2e2e 682d 2667 743b 6c65 6e2d uf[0..h->len- │ │ │ │ -00167660: 315d 2063 6f6e 7465 6e74 203c 2f73 7061 1] content
    .
    < │ │ │ │ -00167690: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001676a0: 656e 7422 3e2f 2f20 7468 656e 2063 6c65 ent">// then cle │ │ │ │ -001676b0: 616e 7570 3a20 3c2f 7370 616e 3e3c 2f64 anup: .
    h-> │ │ │ │ -001676e0: 6c65 6e20 3d20 303b 203c 2f64 6976 3e0a len = 0;
    . │ │ │ │ -001676f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    h->max │ │ │ │ -00167710: 3d20 303b 203c 2f64 6976 3e0a 3c64 6976 = 0;
    .
    │ │ │ │ -00167730: 2020 6672 6565 2868 2d26 6774 3b62 7566 free(h->buf │ │ │ │ -00167740: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ -00167760: 682d 2667 743b 6275 6620 3d20 4e55 4c4c h->buf = NULL │ │ │ │ -00167770: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } < │ │ │ │ -00167790: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ │ -00167860: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end< │ │ │ │ -001678c0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ -001678f0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap);
    .
    soap_ │ │ │ │ -00167970: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);< │ │ │ │ -001679b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    │ │ │ │ +00165e50: 3d22 6c69 6e65 223e 2020 3c73 7061 6e20 ="line"> │ │ │ │ +00165e70: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap soap; < │ │ │ │ +00165ee0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00165f10: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns │ │ │ │ +00165f20: 5f5f 7065 7273 6f6e 2070 3b20 3c2f 6469 __person p; .
    soap │ │ │ │ +00165fa0: 5f69 6e69 7431 3c2f 613e 2826 616d 703b _init1(& │ │ │ │ +00165fb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00165fe0: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_XML_TRE │ │ │ │ +00166040: 453c 2f61 3e29 3b20 3c2f 6469 763e 0a3c E);
    .< │ │ │ │ +00166050: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00166060: 3e20 206c 656e 3120 3d20 6c65 6e32 203d > len1 = len2 = │ │ │ │ +00166070: 2030 3b20 2020 2020 3c73 7061 6e20 636c 0; // │ │ │ │ +00166090: 2072 6573 6574 2062 7566 6665 7220 706f reset buffer po │ │ │ │ +001660a0: 696e 7465 7273 203c 2f73 7061 6e3e 3c2f inters .
    p.name │ │ │ │ +001660d0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q │ │ │ │ +001660f0: 756f 743b 4a6f 686e 2044 6f65 2671 756f uot;John Doe&quo │ │ │ │ +00166100: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;;
    .
    p.age = 25 │ │ │ │ +00166130: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap.fsend = │ │ │ │ +001661e0: 6d79 7365 6e64 3b20 3c73 7061 6e20 636c mysend; // │ │ │ │ +00166200: 2061 7373 6967 6e20 6361 6c6c 6261 636b assign callback │ │ │ │ +00166210: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00166220: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00166230: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap.frecv< │ │ │ │ +001662c0: 2f61 3e20 3d20 6d79 7265 6376 3b20 3c73 /a> = myrecv; // assign ca │ │ │ │ +001662f0: 6c6c 6261 636b 203c 2f73 7061 6e3e 3c2f llback ..
    {..
    e │ │ │ │ +00166490: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE │ │ │ │ +001664a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    } │ │ │ │ +001664c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ +00166500: 736f 6170 5f72 6561 645f 6e73 5f5f 5065 soap_read_ns__Pe │ │ │ │ +00166510: 7273 6f6e 2826 616d 703b 3c61 2063 6c61 rson(&soap, & │ │ │ │ +00166550: 7029 293c 2f64 6976 3e0a 3c64 6976 2063 p))
    .
    {< │ │ │ │ +00166570: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    │ │ │ │ +00166650: 6578 6974 2845 5849 545f 4641 494c 5552 exit(EXIT_FAILUR │ │ │ │ +00166660: 4529 3b20 3c2f 6469 763e 0a3c 6469 7620 E);
    .
    } │ │ │ │ +00166680: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .. │ │ │ │ +00166740: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_en │ │ │ │ +001667b0: 643c 2f61 3e28 2661 6d70 3b3c 6120 636c d(&soap); .
    soa │ │ │ │ +00166860: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(& │ │ │ │ +00166870: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +001668a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }
    .
    │ │ │ │ +001669a0: 7369 7a65 5f74 282a 2066 7265 6376 2928 size_t(* frecv)( │ │ │ │ +001669b0: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +001669c0: 702c 2063 6861 7220 2a62 7566 2c20 7369 p, char *buf, si │ │ │ │ +001669d0: 7a65 5f74 206c 656e 293c 2f64 6976 3e3c ze_t len)
    < │ │ │ │ +001669e0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +001669f0: 223e 4361 6c6c 6261 636b 2074 6861 7420 ">Callback that │ │ │ │ +00166a00: 7265 6365 6976 6573 2062 7974 6573 206f receives bytes o │ │ │ │ +00166a10: 6620 6461 7461 2069 6e74 6f20 7468 6520 f data into the │ │ │ │ +00166a20: 6769 7665 6e20 6275 6666 6572 2e3c 2f64 given buffer.
    Definit │ │ │ │ +00166a50: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +00166a60: 322e 683a 3436 3037 3c2f 6469 763e 3c2f 2.h:4607
    .
    │ │ │ │ +00166ae0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap:: │ │ │ │ +00166b30: 6673 656e 643c 2f61 3e3c 2f64 6976 3e3c fsend
    < │ │ │ │ +00166b40: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +00166b50: 6922 3e69 6e74 282a 2066 7365 6e64 2928 i">int(* fsend)( │ │ │ │ +00166b60: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00166b70: 702c 2063 6f6e 7374 2063 6861 7220 2a64 p, const char *d │ │ │ │ +00166b80: 6174 612c 2073 697a 655f 7420 6c65 6e29 ata, size_t len) │ │ │ │ +00166b90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac │ │ │ │ +00166bb0: 6b20 7468 6174 2073 656e 6473 2074 6865 k that sends the │ │ │ │ +00166bc0: 2067 6976 656e 2062 7974 6573 206f 6620 given bytes of │ │ │ │ +00166bd0: 6461 7461 2e3c 2f64 6976 3e3c 6469 7620 data.
    Definition: │ │ │ │ +00166c00: 2073 7464 736f 6170 322e 683a 3436 3230 stdsoap2.h:4620 │ │ │ │ +00166c10: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    A fixed-s │ │ │ │ +00166c40: 697a 6520 6275 6666 6572 2074 6f20 7374 ize buffer to st │ │ │ │ +00166c50: 6f72 6520 7468 6520 6f75 7462 6f75 6e64 ore the outbound │ │ │ │ +00166c60: 206d 6573 7361 6765 2073 656e 7420 6973 message sent is │ │ │ │ +00166c70: 206e 6f74 2066 6c65 7869 626c 6520 746f not flexible to │ │ │ │ +00166c80: 2068 616e 646c 6520 6c61 7267 6520 636f handle large co │ │ │ │ +00166c90: 6e74 656e 742e 2054 6f20 7374 6f72 6520 ntent. To store │ │ │ │ +00166ca0: 7468 6520 6d65 7373 6167 6520 696e 2061 the message in a │ │ │ │ +00166cb0: 6e20 6578 7061 6e64 696e 6720 6275 6666 n expanding buff │ │ │ │ +00166cc0: 6572 3a3c 2f70 3e0a 3c64 6976 2063 6c61 er:

    .
    │ │ │ │ +00166cf0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct buffer
    .
    {
    .
    │ │ │ │ +00166d50: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +00166d70: 3c2f 7370 616e 3e20 6c65 6e3b 203c 2f64 len; .
    size_t │ │ │ │ +00166dc0: 6d61 783b 203c 2f64 6976 3e0a 3c64 6976 max;
    .
    │ │ │ │ +00166de0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *buf; .
    };
    .< │ │ │ │ +00166e30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00166e40: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int │ │ │ │ +00166e80: 6d61 696e 2829 203c 2f64 6976 3e0a 3c64 main()
    . │ │ │ │ +00166ea0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct │ │ │ │ +00166ee0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +00166f10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap; │ │ │ │ +00166f40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct │ │ │ │ +00166f80: 6e73 5f5f 7065 7273 6f6e 2070 3b20 3c2f ns__person p; .
    s │ │ │ │ +00166fc0: 7472 7563 7420 3c2f 7370 616e 3e62 7566 truct buf │ │ │ │ +00166fd0: 6665 7220 2a68 203d 206d 616c 6c6f 6328 fer *h = malloc( │ │ │ │ +00166fe0: 3c73 7061 6e20 636c 6173 733d 226b 6579 sizeof(struct │ │ │ │ +00167020: 3c2f 7370 616e 3e20 6275 6666 6572 2929 buffer)) │ │ │ │ +00167030: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    h-& │ │ │ │ +00167050: 6774 3b6c 656e 203d 2030 3b20 3c2f 6469 gt;len = 0; .
    h->max │ │ │ │ +00167080: 203d 2030 3b20 3c2f 6469 763e 0a3c 6469 = 0;
    . │ │ │ │ +001670a0: 2068 2d26 6774 3b62 7566 203d 204e 554c h->buf = NUL │ │ │ │ +001670b0: 4c3b 203c 2f64 6976 3e0a 3c64 6976 2063 L;
    .
    soap_init1(&so │ │ │ │ +00167160: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_ │ │ │ │ +001671c0: 584d 4c5f 5452 4545 3c2f 613e 293b 203c XML_TREE); < │ │ │ │ +001671d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap.user = (< │ │ │ │ +00167270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00167280: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void*)h; / │ │ │ │ +001672b0: 2f20 7061 7373 2062 7566 6665 7220 6173 / pass buffer as │ │ │ │ +001672c0: 2061 2068 616e 646c 6520 746f 2074 6865 a handle to the │ │ │ │ +001672d0: 2063 616c 6c62 6163 6b20 3c2f 7370 616e callback
    .
    soap.fsend = m │ │ │ │ +00167390: 7973 656e 643b 2020 3c73 7061 6e20 636c ysend; // │ │ │ │ +001673b0: 2061 7373 6967 6e20 6361 6c6c 6261 636b assign callback │ │ │ │ +001673c0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001673d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001673e0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00167400: 2f73 7061 6e3e 2028 736f 6170 5f77 7269 /span> (soap_wri │ │ │ │ +00167410: 7465 5f6e 735f 5f70 6572 736f 6e28 2661 te_ns__person(&a │ │ │ │ +00167420: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, &p)).
    {
    .< │ │ │ │ +00167480: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00167490: 3e20 2020 203c 6120 636c 6173 733d 2263 >
    soap_pri │ │ │ │ +001674f0: 6e74 5f66 6175 6c74 3c2f 613e 2826 616d nt_fault(&am │ │ │ │ +00167500: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, stdout); .
    exit(EX │ │ │ │ +00167560: 4954 5f46 4149 4c55 5245 293b 203c 2f64 IT_FAILURE); .
    }
    │ │ │ │ +00167590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ +001675c0: 663c 2f73 7061 6e3e 2028 682d 2667 743b f (h-> │ │ │ │ +001675d0: 6c65 6e29 203c 2f64 6976 3e0a 3c64 6976 len)
    .
    │ │ │ │ +001675f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    .. │ │ │ │ +00167610: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // use h │ │ │ │ +00167630: 2d26 6774 3b62 7566 5b30 2e2e 682d 2667 ->buf[0..h-&g │ │ │ │ +00167640: 743b 6c65 6e2d 315d 2063 6f6e 7465 6e74 t;len-1] content │ │ │ │ +00167650: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00167660: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00167670: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // th │ │ │ │ +00167690: 656e 2063 6c65 616e 7570 3a20 3c2f 7370 en cleanup:
    .
    │ │ │ │ +001676c0: 682d 2667 743b 6c65 6e20 3d20 303b 203c h->len = 0; < │ │ │ │ +001676d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    h-&g │ │ │ │ +001676f0: 743b 6d61 7820 3d20 303b 203c 2f64 6976 t;max = 0;
    .
    free(h-& │ │ │ │ +00167720: 6774 3b62 7566 293b 203c 2f64 6976 3e0a gt;buf);
    . │ │ │ │ +00167730: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    h->buf │ │ │ │ +00167750: 3d20 4e55 4c4c 3b20 3c2f 6469 763e 0a3c = NULL;
    .< │ │ │ │ +00167760: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00167770: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ +00167790: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_destro │ │ │ │ +001677f0: 793c 2f61 3e28 2661 6d70 3b3c 6120 636c y(&soap); .
    soa │ │ │ │ +001678a0: 705f 656e 643c 2f61 3e28 2661 6d70 3b3c p_end(&< │ │ │ │ +001678b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001678c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001678d0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ +001678e0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap_done(& │ │ │ │ +00167960: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +00167990: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    .
    } │ │ │ │ +001679b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ 001679d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int mysend(s │ │ │ │ -00167a40: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ -00167ab0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00167ac0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ -00167af0: 3c2f 7370 616e 3e20 2a73 2c20 3c73 7061 *s, size_t n)
    .int │ │ │ │ +00167a00: 3c2f 7370 616e 3e20 6d79 7365 6e64 283c mysend(< │ │ │ │ +00167a10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00167a20: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ +00167a90: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, const │ │ │ │ +00167ab0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *s │ │ │ │ +00167ae0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size │ │ │ │ +00167b00: 5f74 3c2f 7370 616e 3e20 6e29 203c 2f64 _t n) .
    {
    . │ │ │ │ -00167b40: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    struct │ │ │ │ -00167b80: 6275 6666 6572 202a 6820 3d20 283c 7370 buffer *h = (struct buffer*) │ │ │ │ -00167be0: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->user; │ │ │ │ -00167c40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // get buf │ │ │ │ -00167c60: 6665 7220 7468 726f 7567 6820 6861 6e64 fer through hand │ │ │ │ -00167c70: 6c65 203c 2f73 7061 6e3e 3c2f 6469 763e le
    │ │ │ │ -00167c80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ -00167cb0: 6e74 3c2f 7370 616e 3e20 6d20 3d20 682d nt m = h- │ │ │ │ -00167cc0: 2667 743b 6d61 782c 206b 203d 2068 2d26 >max, k = h-& │ │ │ │ -00167cd0: 6774 3b6c 656e 202b 206e 3b20 3c2f 6469 gt;len + n; .
    // │ │ │ │ -00167d10: 6e65 6564 2074 6f20 696e 6372 6561 7365 need to increase │ │ │ │ -00167d20: 2073 7061 6365 3f20 3c2f 7370 616e 3e3c space? < │ │ │ │ -00167d30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (m │ │ │ │ -00167d50: 3d3d 2030 2920 3c2f 6469 763e 0a3c 6469 == 0)
    . │ │ │ │ -00167d70: 2020 206d 203d 2031 3032 343b 203c 2f64 m = 1024; .
    else .
    while (k >= m) .
    m * │ │ │ │ -00167e30: 3d20 323b 203c 2f64 6976 3e0a 3c64 6976 = 2;
    .
    │ │ │ │ -00167e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (m != h-> │ │ │ │ -00167e80: 6d61 7829 203c 2f64 6976 3e0a 3c64 6976 max)
    .
    │ │ │ │ -00167ea0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    char *buf = mallo │ │ │ │ -00167ef0: 6328 6d29 3b20 3c2f 6469 763e 0a3c 6469 c(m);
    . │ │ │ │ -00167f10: 2020 206d 656d 6370 7928 6275 662c 2068 memcpy(buf, h │ │ │ │ -00167f20: 2d26 6774 3b62 7566 2c20 682d 2667 743b ->buf, h-> │ │ │ │ -00167f30: 6c65 6e29 3b20 3c2f 6469 763e 0a3c 6469 len);
    . │ │ │ │ -00167f50: 2020 2068 2d26 6774 3b6d 6178 203d 206d h->max = m │ │ │ │ -00167f60: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    < │ │ │ │ -00167f80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00167f90: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (h->buf) < │ │ │ │ -00167fb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fr │ │ │ │ -00167fd0: 6565 2868 2d26 6774 3b62 7566 293b 203c ee(h->buf); < │ │ │ │ -00167fe0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    h-&g │ │ │ │ -00168000: 743b 6275 6620 3d20 6275 663b 203c 2f64 t;buf = buf; .
    }
    │ │ │ │ -00168030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    memcpy(h-&g │ │ │ │ -00168050: 743b 6275 6620 2b20 682d 2667 743b 6c65 t;buf + h->le │ │ │ │ -00168060: 6e2c 2073 2c20 6e29 3b20 3c2f 6469 763e n, s, n);
    │ │ │ │ -00168070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    h->len + │ │ │ │ -00168090: 3d20 6e3b 203c 2f64 6976 3e0a 3c64 6976 = n;
    .
    │ │ │ │ -001680b0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -001680d0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP │ │ │ │ -00168130: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    . │ │ │ │ -00168140: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    │ │ │ │ -00168160: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The c │ │ │ │ -001686a0: 6c69 656e 7420 7072 6f67 7261 6d20 6973 lient program is │ │ │ │ -001686b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ │ │ │ │ -00168700: 6520 2671 756f 743b 736f 6170 482e 6826 e "soapH.h& │ │ │ │ -00168710: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #include " │ │ │ │ -00168760: 6e73 2e6e 736d 6170 2671 756f 743b 3c2f ns.nsmap"
    . │ │ │ │ -00168790: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    SOAP_ │ │ │ │ -00168800: 534f 434b 4554 3c2f 613e 206d 796f 7065 SOCKET myope │ │ │ │ -00168810: 6e28 3c73 7061 6e20 636c 6173 733d 226b n(struct soa │ │ │ │ -00168860: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -00168890: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co │ │ │ │ -001688b0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -001688e0: 202a 656e 6470 6f69 6e74 2c20 3c73 7061 *endpoint, const < │ │ │ │ -00168910: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00168920: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *host, int │ │ │ │ -00168960: 2070 6f72 7429 203c 2f64 6976 3e0a 3c64 port)
    .struct < │ │ │ │ +00167b60: 2f73 7061 6e3e 6275 6666 6572 202a 6820 /span>buffer *h │ │ │ │ +00167b70: 3d20 283c 7370 616e 2063 6c61 7373 3d22 = (struct │ │ │ │ +00167b90: 3c2f 7370 616e 3e62 7566 6665 722a 293c buffer*)< │ │ │ │ +00167ba0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00167bb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00167bc0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ +00167bd0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;user │ │ │ │ +00167c20: 3c2f 613e 3b20 3c73 7061 6e20 636c 6173 ; // g │ │ │ │ +00167c40: 6574 2062 7566 6665 7220 7468 726f 7567 et buffer throug │ │ │ │ +00167c50: 6820 6861 6e64 6c65 203c 2f73 7061 6e3e h handle │ │ │ │ +00167c60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int │ │ │ │ +00167ca0: 6d20 3d20 682d 2667 743b 6d61 782c 206b m = h->max, k │ │ │ │ +00167cb0: 203d 2068 2d26 6774 3b6c 656e 202b 206e = h->len + n │ │ │ │ +00167cc0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    // need to in │ │ │ │ +00167d00: 6372 6561 7365 2073 7061 6365 3f20 3c2f crease space?
    .
    │ │ │ │ +00167d30: 6966 2028 6d20 3d3d 2030 2920 3c2f 6469 if (m == 0) .
    m = 102 │ │ │ │ +00167d60: 343b 203c 2f64 6976 3e0a 3c64 6976 2063 4;
    .
    else
    .
    │ │ │ │ +00167dc0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while │ │ │ │ +00167de0: 3c2f 7370 616e 3e20 286b 2026 6774 3b3d (k >= │ │ │ │ +00167df0: 206d 2920 3c2f 6469 763e 0a3c 6469 7620 m)
    .
    │ │ │ │ +00167e10: 2020 206d 202a 3d20 323b 203c 2f64 6976 m *= 2;
    .
    │ │ │ │ +00167e50: 6966 3c2f 7370 616e 3e20 286d 2021 3d20 if (m != │ │ │ │ +00167e60: 682d 2667 743b 6d61 7829 203c 2f64 6976 h->max)
    .
    {
    . │ │ │ │ +00167ea0: 2020 2020 3c73 7061 6e20 636c 6173 733d ch │ │ │ │ +00167ec0: 6172 3c2f 7370 616e 3e20 2a62 7566 203d ar *buf = │ │ │ │ +00167ed0: 206d 616c 6c6f 6328 6d29 3b20 3c2f 6469 malloc(m); .
    memcpy( │ │ │ │ +00167f00: 6275 662c 2068 2d26 6774 3b62 7566 2c20 buf, h->buf, │ │ │ │ +00167f10: 682d 2667 743b 6c65 6e29 3b20 3c2f 6469 h->len); .
    h->m │ │ │ │ +00167f40: 6178 203d 206d 3b20 3c2f 6469 763e 0a3c ax = m;
    .< │ │ │ │ +00167f50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00167f60: 3e20 2020 203c 7370 616e 2063 6c61 7373 > i │ │ │ │ +00167f80: 663c 2f73 7061 6e3e 2028 682d 2667 743b f (h-> │ │ │ │ +00167f90: 6275 6629 203c 2f64 6976 3e0a 3c64 6976 buf)
    .
    │ │ │ │ +00167fb0: 2020 2020 6672 6565 2868 2d26 6774 3b62 free(h->b │ │ │ │ +00167fc0: 7566 293b 203c 2f64 6976 3e0a 3c64 6976 uf);
    .
    │ │ │ │ +00167fe0: 2020 682d 2667 743b 6275 6620 3d20 6275 h->buf = bu │ │ │ │ +00167ff0: 663b 203c 2f64 6976 3e0a 3c64 6976 2063 f;
    .
    } │ │ │ │ +00168010: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    memcp │ │ │ │ +00168030: 7928 682d 2667 743b 6275 6620 2b20 682d y(h->buf + h- │ │ │ │ +00168040: 2667 743b 6c65 6e2c 2073 2c20 6e29 3b20 >len, s, n); │ │ │ │ +00168050: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    h-> │ │ │ │ +00168070: 3b6c 656e 202b 3d20 6e3b 203c 2f64 6976 ;len += n;
    .
    │ │ │ │ +001680b0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; < │ │ │ │ +00168120: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ +00168140: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The fo │ │ │ │ +00168160: 6c6c 6f77 696e 6720 6578 616d 706c 6520 llowing example │ │ │ │ +00168170: 696c 6c75 7374 7261 7465 7320 6375 7374 illustrates cust │ │ │ │ +00168180: 6f6d 697a 6564 2049 2f4f 2061 6e64 2048 omized I/O and H │ │ │ │ +00168190: 5454 5020 6865 6164 6572 2068 616e 646c TTP header handl │ │ │ │ +001681a0: 696e 672e 2054 6865 2058 4d4c 206d 6573 ing. The XML mes │ │ │ │ +001681b0: 7361 6765 2069 7320 7361 7665 6420 746f sage is saved to │ │ │ │ +001681c0: 2061 2066 696c 6520 746f 2064 656d 6f6e a file to demon │ │ │ │ +001681d0: 7374 7261 7465 2049 2f4f 2061 6e64 2048 strate I/O and H │ │ │ │ +001681e0: 5454 5020 6361 6c6c 6261 636b 732e 2054 TTP callbacks. T │ │ │ │ +001681f0: 6865 2063 6c69 656e 7420 7072 6f78 7920 he client proxy │ │ │ │ +00168200: 7468 656e 2072 6561 6473 2074 6865 2066 then reads the f │ │ │ │ +00168210: 696c 6520 636f 6e74 656e 7473 2061 7320 ile contents as │ │ │ │ +00168220: 7468 6520 7365 7276 6963 6520 7265 7370 the service resp │ │ │ │ +00168230: 6f6e 7365 2e20 546f 2070 6572 666f 726d onse. To perform │ │ │ │ +00168240: 2074 6869 7320 7472 6963 6b2c 2074 6865 this trick, the │ │ │ │ +00168250: 2073 6572 7669 6365 2072 6573 706f 6e73 service respons │ │ │ │ +00168260: 6520 6861 7320 6578 6163 746c 7920 7468 e has exactly th │ │ │ │ +00168270: 6520 7361 6d65 2073 7472 7563 7475 7265 e same structure │ │ │ │ +00168280: 2061 7320 7468 6520 7265 7175 6573 742e as the request. │ │ │ │ +00168290: 2054 6869 7320 6973 2064 6563 6c61 7265 This is declare │ │ │ │ +001682a0: 6420 6279 2074 6865 203c 636f 6465 3e73 d by the s │ │ │ │ +001682b0: 7472 7563 7420 6e73 5f5f 7465 7374 3c2f truct ns__test output par │ │ │ │ +001682d0: 616d 6574 6572 2070 6172 7420 6f66 2074 ameter part of t │ │ │ │ +001682e0: 6865 2073 6572 7669 6365 206f 7065 7261 he service opera │ │ │ │ +001682f0: 7469 6f6e 2064 6563 6c61 7261 7469 6f6e tion declaration │ │ │ │ +00168300: 2e20 5468 6973 2073 7472 7563 7420 7265 . This struct re │ │ │ │ +00168310: 7365 6d62 6c65 7320 7468 6520 7365 7276 sembles the serv │ │ │ │ +00168320: 6963 6520 7265 7175 6573 7420 2873 6565 ice request (see │ │ │ │ +00168330: 2074 6865 2067 656e 6572 6174 6564 203c the generated < │ │ │ │ +00168340: 656d 3e3c 636f 6465 3e73 6f61 7053 7475 em>soapStu │ │ │ │ +00168350: 622e 683c 2f63 6f64 653e 3c2f 656d 3e20 b.h │ │ │ │ +00168360: 6669 6c65 2067 656e 6572 6174 6564 2062 file generated b │ │ │ │ +00168370: 7920 736f 6170 6370 7032 2066 726f 6d20 y soapcpp2 from │ │ │ │ +00168380: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he │ │ │ │ +00168390: 6164 6572 2066 696c 6520 696e 7075 7429 ader file input) │ │ │ │ +001683a0: 2e3c 2f70 3e0a 3c70 3e54 6865 2069 6e74 .

    .

    The int │ │ │ │ +001683b0: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ +001683c0: 6c65 2066 6f72 2073 6f61 7063 7070 3220 le for soapcpp2 │ │ │ │ +001683d0: 6973 3a3c 2f70 3e0a 3c64 6976 2063 6c61 is:

    .
    │ │ │ │ +00168400: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ +00168420: 2073 6572 7669 6365 206e 616d 653a 2063 service name: c │ │ │ │ +00168430: 616c 6c62 6163 6b20 3c2f 7370 616e 3e3c allback < │ │ │ │ +00168440: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ +00168470: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ +00168480: 206e 616d 6573 7061 6365 3a20 7572 6e3a namespace: urn: │ │ │ │ +00168490: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback │ │ │ │ +001684a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ +001684d0: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ +001684e0: 5f70 6572 736f 6e20 3c2f 6469 763e 0a3c _person
    .< │ │ │ │ +001684f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00168500: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    < │ │ │ │ +00168520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00168530: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *name; .
    int ag │ │ │ │ +00168590: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    }; < │ │ │ │ +001685b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_ │ │ │ │ +001685f0: 5f74 6573 7428 3c73 7061 6e20 636c 6173 _test(stru │ │ │ │ +00168610: 6374 3c2f 7370 616e 3e20 6e73 5f5f 7065 ct ns__pe │ │ │ │ +00168620: 7273 6f6e 2069 6e2c 203c 7370 616e 2063 rson in, s │ │ │ │ +00168640: 7472 7563 743c 2f73 7061 6e3e 206e 735f truct ns_ │ │ │ │ +00168650: 5f74 6573 7420 2661 6d70 3b6f 7574 293b _test &out); │ │ │ │ +00168660: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The client prog │ │ │ │ +00168690: 7261 6d20 6973 3a3c 2f70 3e0a 3c64 6976 ram is:

    .
    # │ │ │ │ +001686e0: 696e 636c 7564 6520 2671 756f 743b 736f include "so │ │ │ │ +001686f0: 6170 482e 6826 7175 6f74 3b3c 2f73 7061 apH.h"
    .
    #include │ │ │ │ +00168740: 2671 756f 743b 6e73 2e6e 736d 6170 2671 "ns.nsmap&q │ │ │ │ +00168750: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot; .
    .< │ │ │ │ +00168790: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001687a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001687b0: 705f 5f73 6f61 702e 6874 6d6c 2367 6136 p__soap.html#ga6 │ │ │ │ +001687c0: 6562 3162 6465 3763 6563 6332 6662 6164 eb1bde7cecc2fbad │ │ │ │ +001687d0: 6263 6262 6336 3339 3532 3237 3433 3922 bcbbc6395227439" │ │ │ │ +001687e0: 3e53 4f41 505f 534f 434b 4554 3c2f 613e >SOAP_SOCKET │ │ │ │ +001687f0: 206d 796f 7065 6e28 3c73 7061 6e20 636c myopen(st │ │ │ │ +00168810: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const │ │ │ │ +001688a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001688c0: 2f73 7061 6e3e 202a 656e 6470 6f69 6e74 /span> *endpoint │ │ │ │ +001688d0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , const c │ │ │ │ +00168910: 6861 723c 2f73 7061 6e3e 202a 686f 7374 har *host │ │ │ │ +00168920: 2c20 3c73 7061 6e20 636c 6173 733d 226b , int< │ │ │ │ +00168940: 2f73 7061 6e3e 2070 6f72 7429 203c 2f64 /span> port) .
    {
    . │ │ │ │ -00168980: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    if │ │ │ │ -001689c0: 2873 7472 6e63 6d70 2865 6e64 706f 696e (strncmp(endpoin │ │ │ │ -001689d0: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, & │ │ │ │ -001689f0: 7175 6f74 3b66 696c 653a 2671 756f 743b quot;file:" │ │ │ │ -00168a00: 3c2f 7370 616e 3e2c 2035 2929 203c 2f64 , 5)) .
    {
    . │ │ │ │ -00168a30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    printf("F │ │ │ │ -00168a70: 696c 6520 6e61 6d65 2065 7870 6563 7465 ile name expecte │ │ │ │ -00168a80: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\n" │ │ │ │ -00168a90: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ -00168ab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -00168ad0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP_I │ │ │ │ -00168b30: 4e56 414c 4944 5f53 4f43 4b45 543c 2f61 NVALID_SOCKET;
    .
    } │ │ │ │ -00168b60: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ -00168ba0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -00168bd0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->se │ │ │ │ -00168c20: 6e64 6664 3c2f 613e 203d 203c 6120 636c ndfd = soap->< │ │ │ │ -00168c60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00168c70: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00168c80: 6874 6d6c 2361 3139 3263 3235 6363 3230 html#a192c25cc20 │ │ │ │ -00168c90: 3636 3638 3630 3032 3132 6664 3334 6636 6668600212fd34f6 │ │ │ │ -00168ca0: 3534 3166 3334 223e 7265 6376 6664 3c2f 541f34">recvfd = open(host, │ │ │ │ -00168cc0: 4f5f 5244 5752 7c4f 5f43 5245 4154 2c20 O_RDWR|O_CREAT, │ │ │ │ -00168cd0: 535f 4957 5553 527c 535f 4952 5553 5229 S_IWUSR|S_IRUSR) │ │ │ │ -00168ce0: 2920 266c 743b 2030 2920 3c2f 6469 763e ) < 0)
    │ │ │ │ -00168cf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return < │ │ │ │ -00168d30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00168d40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00168d50: 705f 5f73 6f61 702e 6874 6d6c 2367 6162 p__soap.html#gab │ │ │ │ -00168d60: 3965 3737 6231 3535 3737 3830 3239 3365 9e77b1557780293e │ │ │ │ -00168d70: 6563 3062 3236 3965 6631 3931 3437 3222 ec0b269ef191472" │ │ │ │ -00168d80: 3e53 4f41 505f 494e 5641 4c49 445f 534f >SOAP_INVALID_SO │ │ │ │ -00168d90: 434b 4554 3c2f 613e 3b20 3c2f 6469 763e CKET;
    │ │ │ │ -00168da0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r │ │ │ │ -00168dd0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn soap-> │ │ │ │ -00168e10: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;sendfd │ │ │ │ -00168e60: 3c2f 613e 3b20 3c2f 6469 763e 0a3c 6469 ;
    .} │ │ │ │ +00168980: 2020 3c73 7061 6e20 636c 6173 733d 226b if (strncmp(e │ │ │ │ +001689b0: 6e64 706f 696e 742c 203c 7370 616e 2063 ndpoint, "file: │ │ │ │ +001689e0: 2671 756f 743b 3c2f 7370 616e 3e2c 2035 ", 5 │ │ │ │ +001689f0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    {< │ │ │ │ +00168a10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    prin │ │ │ │ +00168a30: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(& │ │ │ │ +00168a50: 7175 6f74 3b46 696c 6520 6e61 6d65 2065 quot;File name e │ │ │ │ +00168a60: 7870 6563 7465 645c 6e26 7175 6f74 3b3c xpected\n"< │ │ │ │ +00168a70: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    . │ │ │ │ +00168a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +00168b30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . │ │ │ │ +00168b60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if
    ((so │ │ │ │ +00168bb0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->sendfd = │ │ │ │ +00168c10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +00168c40: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->re │ │ │ │ +00168c90: 6376 6664 3c2f 613e 203d 206f 7065 6e28 cvfd = open( │ │ │ │ +00168ca0: 686f 7374 2c20 4f5f 5244 5752 7c4f 5f43 host, O_RDWR|O_C │ │ │ │ +00168cb0: 5245 4154 2c20 535f 4957 5553 527c 535f REAT, S_IWUSR|S_ │ │ │ │ +00168cc0: 4952 5553 5229 2920 266c 743b 2030 2920 IRUSR)) < 0) │ │ │ │ +00168cd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return SOAP_INVA │ │ │ │ +00168d70: 4c49 445f 534f 434b 4554 3c2f 613e 3b20 LID_SOCKET; │ │ │ │ +00168d80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return soap-> │ │ │ │ +00168e40: 7365 6e64 6664 3c2f 613e 3b20 3c2f 6469 sendfd; .
    }
    . │ │ │ │ 00168e80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    vo │ │ │ │ -00168ed0: 6964 3c2f 7370 616e 3e20 6d79 636c 6f73 id myclos │ │ │ │ -00168ee0: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa │ │ │ │ -00168f30: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -00168f60: 6170 3c2f 613e 2920 3c2f 6469 763e 0a3c ap)
    .< │ │ │ │ +00168e90: 7373 3d22 6c69 6e65 223e 3c73 7061 6e20 ss="line">void │ │ │ │ +00168ec0: 6d79 636c 6f73 6528 3c73 7061 6e20 636c myclose(st │ │ │ │ +00168ee0: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap) .
    {
    .< │ │ │ │ 00168f70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00168f80: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if │ │ │ │ -00168fc0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->s │ │ │ │ -00169040: 656e 6466 643c 2f61 3e20 2667 743b 2032 endfd > 2 │ │ │ │ -00169050: 2920 203c 7370 616e 2063 6c61 7373 3d22 ) // stil │ │ │ │ -00169070: 6c20 6f70 656e 3f20 3c2f 7370 616e 3e3c l open? < │ │ │ │ -00169080: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    clos │ │ │ │ -001690a0: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap->s │ │ │ │ -00169120: 656e 6466 643c 2f61 3e29 3b20 3c73 7061 endfd); // then close │ │ │ │ -00169150: 6974 203c 2f73 7061 6e3e 3c2f 6469 763e it
    │ │ │ │ -00169160: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap │ │ │ │ -001691a0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->recvfd = 0 │ │ │ │ -00169200: 3b20 2020 2020 203c 7370 616e 2063 6c61 ; // │ │ │ │ -00169220: 7365 7420 6261 636b 2074 6f20 7374 6469 set back to stdi │ │ │ │ -00169230: 6e20 3c2f 7370 616e 3e3c 2f64 6976 3e0a n
    . │ │ │ │ -00169240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap< │ │ │ │ -00169280: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->sendfd = 1; │ │ │ │ -001692e0: 2020 2020 2020 3c73 7061 6e20 636c 6173 // s │ │ │ │ -00169300: 6574 2062 6163 6b20 746f 2073 7464 6f75 et back to stdou │ │ │ │ -00169310: 7420 3c2f 7370 616e 3e3c 2f64 6976 3e0a t
    . │ │ │ │ -00169320: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    int mypo │ │ │ │ -00169390: 7374 283c 7370 616e 2063 6c61 7373 3d22 st(struct< │ │ │ │ -001693b0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ -001693e0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ -00169410: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c │ │ │ │ -00169430: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *endpoint, const │ │ │ │ -00169490: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *host, const │ │ │ │ -001694e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *path, const │ │ │ │ -00169530: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *action, < │ │ │ │ -00169560: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00169570: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00169580: 705f 5f73 6f61 702e 6874 6d6c 2367 6137 p__soap.html#ga7 │ │ │ │ -00169590: 6336 6533 3864 3230 3966 3630 6131 3865 c6e38d209f60a18e │ │ │ │ -001695a0: 3336 3231 3732 6463 6131 6133 6236 6522 362172dca1a3b6e" │ │ │ │ -001695b0: 3e55 4c4f 4e47 3634 3c2f 613e 2063 6f75 >ULONG64 cou │ │ │ │ -001695c0: 6e74 2920 3c2f 6469 763e 0a3c 6469 7620 nt)
    .
    {.
    return │ │ │ │ -00169620: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send(< │ │ │ │ -00169680: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00169690: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001696a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001696b0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -001696d0: 743b 4375 7374 6f6d 2d67 656e 6572 6174 t;Custom-generat │ │ │ │ -001696e0: 6564 2066 696c 655c 6e26 7175 6f74 3b3c ed file\n"< │ │ │ │ -001696f0: 2f73 7061 6e3e 293b 203c 7370 616e 2063 /span>); / │ │ │ │ -00169710: 2f20 7772 6974 6573 2074 6f20 736f 6170 / writes to soap │ │ │ │ -00169720: 2d26 6774 3b73 656e 6466 6420 3c2f 7370 ->sendfd
    .
    } if< │ │ │ │ +00168fa0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (s │ │ │ │ +00168fd0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->sendfd │ │ │ │ +00169030: 2667 743b 2032 2920 203c 7370 616e 2063 > 2) / │ │ │ │ +00169050: 2f20 7374 696c 6c20 6f70 656e 3f20 3c2f / still open?
    .
    │ │ │ │ +00169080: 2020 636c 6f73 6528 3c61 2063 6c61 7373 close(s │ │ │ │ +001690b0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->sendfd) │ │ │ │ +00169110: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // then │ │ │ │ +00169130: 636c 6f73 6520 6974 203c 2f73 7061 6e3e close it │ │ │ │ +00169140: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap->< │ │ │ │ +00169190: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001691a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001691b0: 6874 6d6c 2361 3139 3263 3235 6363 3230 html#a192c25cc20 │ │ │ │ +001691c0: 3636 3638 3630 3032 3132 6664 3334 6636 6668600212fd34f6 │ │ │ │ +001691d0: 3534 3166 3334 223e 7265 6376 6664 3c2f 541f34">recvfd = 0; // set back t │ │ │ │ +00169210: 6f20 7374 6469 6e20 3c2f 7370 616e 3e3c o stdin < │ │ │ │ +00169220: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->sendfd = 1; // set back to │ │ │ │ +001692f0: 2073 7464 6f75 7420 3c2f 7370 616e 3e3c stdout < │ │ │ │ +00169300: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    │ │ │ │ +00169320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    int mypost(s │ │ │ │ +00169390: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ +00169400: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00169410: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ +00169440: 3c2f 7370 616e 3e20 2a65 6e64 706f 696e *endpoin │ │ │ │ +00169450: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, const │ │ │ │ +00169490: 6368 6172 3c2f 7370 616e 3e20 2a68 6f73 char *hos │ │ │ │ +001694a0: 742c 203c 7370 616e 2063 6c61 7373 3d22 t, const │ │ │ │ +001694e0: 6368 6172 3c2f 7370 616e 3e20 2a70 6174 char *pat │ │ │ │ +001694f0: 682c 203c 7370 616e 2063 6c61 7373 3d22 h, const │ │ │ │ +00169530: 6368 6172 3c2f 7370 616e 3e20 2a61 6374 char *act │ │ │ │ +00169540: 696f 6e2c 203c 6120 636c 6173 733d 2263 ion, ULONG64 count)
    │ │ │ │ +001695b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +001695e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001695f0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +00169600: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_send │ │ │ │ +00169660: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ +00169690: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "Custom-g │ │ │ │ +001696c0: 656e 6572 6174 6564 2066 696c 655c 6e26 enerated file\n& │ │ │ │ +001696d0: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); < │ │ │ │ +001696e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001696f0: 656e 7422 3e2f 2f20 7772 6974 6573 2074 ent">// writes t │ │ │ │ +00169700: 6f20 736f 6170 2d26 6774 3b73 656e 6466 o soap->sendf │ │ │ │ +00169710: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    . │ │ │ │ +00169720: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .< │ │ │ │ -00169770: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00169780: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int myparse(struct soap *soap)
    .
    {.
    char b │ │ │ │ -00169890: 7566 5b32 3536 5d3b 203c 2f64 6976 3e0a uf[256];
    . │ │ │ │ -001698a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if │ │ │ │ -001698d0: 3c2f 7370 616e 3e20 286c 7365 656b 283c (lseek(< │ │ │ │ -001698e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001698f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00169900: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -00169910: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;recv │ │ │ │ -00169960: 6664 3c2f 613e 2c20 302c 2053 4545 4b5f fd, 0, SEEK_ │ │ │ │ -00169970: 5345 5429 2026 6c74 3b20 3020 7c7c 203c SET) < 0 || < │ │ │ │ -00169980: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00169990: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001699a0: 705f 5f69 6f2e 6874 6d6c 2367 6133 6635 p__io.html#ga3f5 │ │ │ │ -001699b0: 3463 3539 3136 6336 6636 6464 6666 6563 4c5916c6f6ddffec │ │ │ │ -001699c0: 3564 3731 3230 6132 3330 6634 3622 3e73 5d7120a230f46">s │ │ │ │ -001699d0: 6f61 705f 6765 746c 696e 653c 2f61 3e28 oap_getline( │ │ │ │ -001699e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -00169a10: 2062 7566 2c20 3235 3629 2920 3c73 7061 buf, 256)) // go to begin │ │ │ │ -00169a40: 2061 6e64 2073 6b69 7020 6375 7374 6f6d and skip custom │ │ │ │ -00169a50: 2068 6561 6465 7220 3c2f 7370 616e 3e3c header < │ │ │ │ -00169a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ │ -00169b20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ -00169b40: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA │ │ │ │ -00169ba0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    │ │ │ │ -00169bb0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    < │ │ │ │ -00169be0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int mai │ │ │ │ -00169c20: 6e28 2920 3c2f 6469 763e 0a3c 6469 7620 n()
    .
    {.
    s │ │ │ │ -00169c70: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap soap; .
    s │ │ │ │ -00169d10: 7472 7563 7420 3c2f 7370 616e 3e6e 735f truct ns_ │ │ │ │ -00169d20: 5f74 6573 7420 723b 203c 2f64 6976 3e0a _test r;
    . │ │ │ │ -00169d30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct │ │ │ │ -00169d60: 203c 2f73 7061 6e3e 6e73 5f5f 7065 7273 ns__pers │ │ │ │ -00169d70: 6f6e 2070 3b20 3c2f 6469 763e 0a3c 6469 on p;
    . │ │ │ │ -00169d90: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init< │ │ │ │ -00169df0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ -00169e20: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    │ │ │ │ -00169e30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    p.name = " │ │ │ │ -00169e70: 4a6f 686e 2044 6f65 2671 756f 743b 3c2f John Doe";
    . │ │ │ │ -00169ea0: 2020 702e 6167 6520 3d20 3939 3b20 3c2f p.age = 99; .
    │ │ │ │ -00169ef0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap. │ │ │ │ -00169f50: 666f 7065 6e3c 2f61 3e20 3d20 6d79 6f70 fopen = myop │ │ │ │ -00169f60: 656e 3b20 2020 3c73 7061 6e20 636c 6173 en; // u │ │ │ │ -00169f80: 7365 2063 7573 746f 6d20 6f70 656e 203c se custom open < │ │ │ │ -00169f90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -00169fb0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -00169fe0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fpost = mypost; // use custo │ │ │ │ -0016a070: 6d20 706f 7374 203c 2f73 7061 6e3e 3c2f m post .
    │ │ │ │ -0016a0c0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap. │ │ │ │ -0016a120: 6670 6172 7365 3c2f 613e 203d 206d 7970 fparse = myp │ │ │ │ -0016a130: 6172 7365 3b20 3c73 7061 6e20 636c 6173 arse; // u │ │ │ │ -0016a150: 7365 2063 7573 746f 6d20 7265 7370 6f6e se custom respon │ │ │ │ -0016a160: 7365 2070 6172 7365 7220 3c2f 7370 616e se parser
    .
    soap.fclose = │ │ │ │ -0016a220: 6d79 636c 6f73 653b 203c 7370 616e 2063 myclose; / │ │ │ │ -0016a240: 2f20 7573 6520 6375 7374 6f6d 2063 6c6f / use custom clo │ │ │ │ -0016a250: 7365 203c 2f73 7061 6e3e 3c2f 6469 763e se
    │ │ │ │ -0016a260: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_call_n │ │ │ │ -0016a280: 735f 5f74 6573 7428 2661 6d70 3b3c 6120 s__test(&soap, " │ │ │ │ -0016a2e0: 6669 6c65 3a2f 2f74 6573 742e 786d 6c26 file://test.xml& │ │ │ │ -0016a2f0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 3c73 quot;, " │ │ │ │ -0016a320: 2671 756f 743b 3c2f 7370 616e 3e2c 2070 ", p │ │ │ │ -0016a330: 2c20 7229 3b20 3c2f 6469 763e 0a3c 6469 , r);
    . │ │ │ │ -0016a350: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa │ │ │ │ -0016a3a0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.e │ │ │ │ -0016a3f0: 7272 6f72 3c2f 613e 2920 3c2f 6469 763e rror)
    │ │ │ │ -0016a400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . │ │ │ │ -0016a430: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print │ │ │ │ -0016a490: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(& │ │ │ │ -0016a4a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -0016a4d0: 2073 7464 6f75 7429 3b20 3c2f 6469 763e stdout);
    │ │ │ │ -0016a4e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT │ │ │ │ -0016a500: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE);
    .
    }
    .< │ │ │ │ -0016a530: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016a540: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des │ │ │ │ -0016a5a0: 7472 6f79 3c2f 613e 2826 616d 703b 3c61 troy(&soap);< │ │ │ │ -0016a5e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ -0016a650: 6f61 705f 656e 643c 2f61 3e28 2661 6d70 oap_end(& │ │ │ │ -0016a660: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -0016a690: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    soap_done │ │ │ │ -0016a710: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -0016a740: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    . │ │ │ │ -0016a760: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    < │ │ │ │ -0016a7c0: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -0016a7d0: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">soa │ │ │ │ -0016a820: 703a 3a66 706f 7374 3c2f 613e 3c2f 6469 p::fpost
    int(* fpos │ │ │ │ -0016a850: 7429 2873 7472 7563 7420 736f 6170 202a t)(struct soap * │ │ │ │ -0016a860: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char │ │ │ │ -0016a870: 202a 656e 6470 6f69 6e74 2c20 636f 6e73 *endpoint, cons │ │ │ │ -0016a880: 7420 6368 6172 202a 686f 7374 2c20 696e t char *host, in │ │ │ │ -0016a890: 7420 706f 7274 2c20 636f 6e73 7420 6368 t port, const ch │ │ │ │ -0016a8a0: 6172 202a 7061 7468 2c20 636f 6e73 7420 ar *path, const │ │ │ │ -0016a8b0: 6368 6172 202a 6163 7469 6f6e 2c20 554c char *action, UL │ │ │ │ -0016a8c0: 4f4e 4736 3420 636f 756e 7429 3c2f 6469 ONG64 count)
    Callback th │ │ │ │ -0016a8f0: 6174 2070 6f70 756c 6174 6573 2061 6e64 at populates and │ │ │ │ -0016a900: 2074 6865 6e20 7365 6e64 7320 4854 5450 then sends HTTP │ │ │ │ -0016a910: 2068 6561 6465 7273 2066 726f 6d20 7468 headers from th │ │ │ │ -0016a920: 6520 636c 6965 6e74 2d73 6964 6520 746f e client-side to │ │ │ │ -0016a930: 2061 2063 6f6e 6e65 6374 6564 2048 5454 a connected HTT │ │ │ │ -0016a940: 5020 7365 7276 6572 2e3c 2f64 6976 3e3c P server.
    < │ │ │ │ -0016a950: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ -0016a960: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ -0016a970: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ -0016a980: 3432 3230 3c2f 6469 763e 3c2f 6469 763e 4220
    │ │ │ │ -0016a990: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    │ │ │ │ -0016aa70: 696e 7428 2a20 6670 6172 7365 2928 7374 int(* fparse)(st │ │ │ │ -0016aa80: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap) │ │ │ │ -0016aa90: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Callbac │ │ │ │ -0016aab0: 6b20 7468 6174 2072 6561 6473 2061 6e64 k that reads and │ │ │ │ -0016aac0: 2070 6172 7365 7320 4854 5450 2061 6e64 parses HTTP and │ │ │ │ -0016aad0: 204d 494d 4520 6865 6164 6572 732e 3c2f MIME headers.
    Defini │ │ │ │ -0016ab00: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ -0016ab10: 7032 2e68 3a34 3235 303c 2f64 6976 3e3c p2.h:4250
    < │ │ │ │ -0016ab20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ -0016abd0: 705f 6765 746c 696e 653c 2f61 3e3c 2f64 p_getline
    int soap_ │ │ │ │ -0016ac00: 6765 746c 696e 6528 7374 7275 6374 2073 getline(struct s │ │ │ │ -0016ac10: 6f61 7020 2a73 6f61 702c 2063 6861 7220 oap *soap, char │ │ │ │ -0016ac20: 2a62 7566 2c20 696e 7420 6c65 6e29 3c2f *buf, int len)
    Get a hea │ │ │ │ -0016ac50: 6465 7220 6c69 6e65 2e3c 2f64 6976 3e3c der line.
    < │ │ │ │ -0016ac60: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -0016ac80: 534f 4150 2031 2e31 2f31 2e32 2052 5043 SOAP 1.1/1.2 RPC │ │ │ │ -0016ac90: 2065 6e63 6f64 696e 6720 7370 6563 6966 encoding specif │ │ │ │ -0016aca0: 6965 7320 7468 6174 2053 4f41 502f 584d ies that SOAP/XM │ │ │ │ -0016acb0: 4c20 656c 656d 656e 7473 206d 6179 2062 L elements may b │ │ │ │ -0016acc0: 6520 6967 6e6f 7265 6420 7768 656e 2070 e ignored when p │ │ │ │ -0016acd0: 7265 7365 6e74 2069 6e20 6120 534f 4150 resent in a SOAP │ │ │ │ -0016ace0: 2070 6179 6c6f 6164 206f 6e20 7468 6520 payload on the │ │ │ │ -0016acf0: 7265 6365 6976 696e 6720 7369 6465 2e20 receiving side. │ │ │ │ -0016ad00: 486f 7765 7665 722c 2064 6f63 756d 656e However, documen │ │ │ │ -0016ad10: 742f 6c69 7465 7261 6c20 7374 796c 6520 t/literal style │ │ │ │ -0016ad20: 6d65 7373 6167 696e 6720 7661 6c69 6461 messaging valida │ │ │ │ -0016ad30: 7465 7320 584d 4c20 6d65 7373 6167 6573 tes XML messages │ │ │ │ -0016ad40: 2061 6e64 2065 7874 7261 2065 6c65 6d65 and extra eleme │ │ │ │ -0016ad50: 6e74 7320 6361 6e6e 6f74 206a 7573 7420 nts cannot just │ │ │ │ -0016ad60: 6265 2069 676e 6f72 6564 2061 7320 7375 be ignored as su │ │ │ │ -0016ad70: 6368 2e20 5769 7468 2053 4f41 5020 646f ch. With SOAP do │ │ │ │ -0016ad80: 6375 6d65 6e74 2f6c 6974 6572 616c 2073 cument/literal s │ │ │ │ -0016ad90: 7479 6c65 2069 7420 6973 2072 6563 6f6d tyle it is recom │ │ │ │ -0016ada0: 6d65 6e64 6564 2074 6f20 656e 6162 6c65 mended to enable │ │ │ │ -0016adb0: 2074 6865 203c 636f 6465 3e23 534f 4150 the #SOAP │ │ │ │ -0016adc0: 5f58 4d4c 5f53 5452 4943 543c 2f63 6f64 _XML_STRICT mode flag. Wi │ │ │ │ -0016ade0: 7468 2053 4f41 5020 5250 4320 656e 636f th SOAP RPC enco │ │ │ │ -0016adf0: 6469 6e67 2c20 7468 6520 656e 6769 6e65 ding, the engine │ │ │ │ -0016ae00: 2069 676e 6f72 6573 2058 4d4c 2065 6c65 ignores XML ele │ │ │ │ -0016ae10: 6d65 6e74 7320 7468 6174 2061 7265 2075 ments that are u │ │ │ │ -0016ae20: 6e6b 6e6f 776e 2062 7920 6465 6661 756c nknown by defaul │ │ │ │ -0016ae30: 742c 2075 6e6c 6573 7320 7468 6520 584d t, unless the XM │ │ │ │ -0016ae40: 4c20 6174 7472 6962 7574 6520 3c65 6d3e L attribute │ │ │ │ -0016ae50: 3c63 6f64 653e 6d75 7374 556e 6465 7273 mustUnders │ │ │ │ -0016ae60: 7461 6e64 3d22 7472 7565 223c 2f63 6f64 tand="true" is prese │ │ │ │ -0016ae80: 6e74 2069 6e20 7468 6520 584d 4c20 656c nt in the XML el │ │ │ │ -0016ae90: 656d 656e 742e 2049 7420 6d61 7920 6265 ement. It may be │ │ │ │ -0016aea0: 2075 6e64 6573 6972 6162 6c65 2066 6f72 undesirable for │ │ │ │ -0016aeb0: 2065 6c65 6d65 6e74 7320 746f 2062 6520 elements to be │ │ │ │ -0016aec0: 6967 6e6f 7265 6420 7768 656e 2074 6865 ignored when the │ │ │ │ -0016aed0: 206f 7574 636f 6d65 206f 6620 7468 6520 outcome of the │ │ │ │ -0016aee0: 6f6d 6973 7369 6f6e 2069 7320 756e 6365 omission is unce │ │ │ │ -0016aef0: 7274 6169 6e2e 2054 6865 203c 636f 6465 rtain. The soap::fig │ │ │ │ -0016afd0: 6e6f 7265 3c2f 613e 3c2f 636f 6465 3e20 nore │ │ │ │ -0016afe0: 6361 6c6c 6261 636b 2063 616e 2062 6520 callback can be │ │ │ │ -0016aff0: 7365 7420 746f 2061 2066 756e 6374 696f set to a functio │ │ │ │ -0016b000: 6e20 7468 6174 2072 6574 7572 6e73 203c n that returns < │ │ │ │ -0016b010: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK in case the │ │ │ │ -0016b030: 2065 6c65 6d65 6e74 2063 616e 2062 6520 element can be │ │ │ │ -0016b040: 7361 6665 6c79 2069 676e 6f72 6564 2c20 safely ignored, │ │ │ │ -0016b050: 6f72 203c 636f 6465 3e23 534f 4150 5f4d or #SOAP_M │ │ │ │ -0016b060: 5553 5455 4e44 4552 5354 414e 443c 2f63 USTUNDERSTAND to throw an │ │ │ │ -0016b080: 2065 7863 6570 7469 6f6e 2c20 6f72 2074 exception, or t │ │ │ │ -0016b090: 6f20 7065 7266 6f72 6d20 736f 6d65 2061 o perform some a │ │ │ │ -0016b0a0: 7070 6c69 6361 7469 6f6e 2d73 7065 6369 pplication-speci │ │ │ │ -0016b0b0: 6669 6320 6163 7469 6f6e 2e20 466f 7220 fic action. For │ │ │ │ -0016b0c0: 6578 616d 706c 652c 2074 6f20 7468 726f example, to thro │ │ │ │ -0016b0d0: 7720 616e 2065 7863 6570 7469 6f6e 2061 w an exception a │ │ │ │ -0016b0e0: 7320 736f 6f6e 2061 7320 616e 2075 6e6b s soon as an unk │ │ │ │ -0016b0f0: 6e6f 776e 2065 6c65 6d65 6e74 2069 7320 nown element is │ │ │ │ -0016b100: 656e 636f 756e 7465 7265 6420 6f6e 2074 encountered on t │ │ │ │ -0016b110: 6865 2069 6e70 7574 2c20 7573 653a 3c2f he input, use:.

    int │ │ │ │ -0016b170: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{ │ │ │ │ -0016b190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct < │ │ │ │ -0016b1d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0016b1e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0016b1f0: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -0016b200: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -0016b230: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new< │ │ │ │ -0016b290: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . │ │ │ │ -0016b2b0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -0016b2e0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fign │ │ │ │ -0016b340: 6f72 653c 2f61 3e20 3d20 6d79 6967 6e6f ore = myigno │ │ │ │ -0016b350: 7265 3b20 3c2f 6469 763e 0a3c 6469 7620 re;
    .
    . │ │ │ │ -0016b370: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // soap │ │ │ │ -0016b390: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet │ │ │ │ -0016b3a0: 686f 6428 736f 6170 2c20 2e2e 2e29 206f hod(soap, ...) o │ │ │ │ -0016b3b0: 7220 736f 6170 5f73 6572 7665 2873 6f61 r soap_serve(soa │ │ │ │ -0016b3c0: 7029 203c 2f73 7061 6e3e 3c2f 6469 763e p)
    │ │ │ │ +00169760: 226c 696e 6522 3e3c 7370 616e 2063 6c61 "line">int mypa │ │ │ │ +00169790: 7273 6528 3c73 7061 6e20 636c 6173 733d rse(struct │ │ │ │ +001697b0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ +001697e0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ +00169810: 736f 6170 3c2f 613e 2920 3c2f 6469 763e soap)
    │ │ │ │ +00169820: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +00169850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00169860: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char buf[256]; < │ │ │ │ +00169880: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (l │ │ │ │ +001698c0: 7365 656b 283c 6120 636c 6173 733d 2263 seek(soap │ │ │ │ +001698f0: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->recvfd, 0, │ │ │ │ +00169950: 2053 4545 4b5f 5345 5429 2026 6c74 3b20 SEEK_SET) < │ │ │ │ +00169960: 3020 7c7c 203c 6120 636c 6173 733d 2263 0 || soap_getlin │ │ │ │ +001699c0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa │ │ │ │ +001699f0: 703c 2f61 3e2c 2062 7566 2c20 3235 3629 p, buf, 256) │ │ │ │ +00169a00: 2920 3c73 7061 6e20 636c 6173 733d 2263 ) // go to │ │ │ │ +00169a20: 2062 6567 696e 2061 6e64 2073 6b69 7020 begin and skip │ │ │ │ +00169a30: 6375 7374 6f6d 2068 6561 6465 7220 3c2f custom header
    .
    │ │ │ │ +00169a60: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ +00169a80: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO │ │ │ │ +00169ae0: 4150 5f45 4f46 3c2f 613e 3b20 3c2f 6469 AP_EOF; .
    return < │ │ │ │ +00169b30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00169b40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00169b50: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ +00169b60: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c │ │ │ │ +00169b70: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c │ │ │ │ +00169b80: 3022 3e53 4f41 505f 4f4b 3c2f 613e 3b20 0">SOAP_OK; │ │ │ │ +00169b90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    .
    .
    int main()
    │ │ │ │ +00169c10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +00169c40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00169c50: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap soap;
    .
    < │ │ │ │ +00169ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00169cf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct ns__test r; < │ │ │ │ +00169d10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +00169d40: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns │ │ │ │ +00169d50: 5f5f 7065 7273 6f6e 2070 3b20 3c2f 6469 __person p; .
    soap │ │ │ │ +00169dd0: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&< │ │ │ │ +00169de0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00169df0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00169e00: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ +00169e10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    p.nam │ │ │ │ +00169e30: 6520 3d20 3c73 7061 6e20 636c 6173 733d e = │ │ │ │ +00169e50: 2671 756f 743b 4a6f 686e 2044 6f65 2671 "John Doe&q │ │ │ │ +00169e60: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    p.age = │ │ │ │ +00169e90: 3939 3b20 3c2f 6469 763e 0a3c 6469 7620 99;
    .
    < │ │ │ │ +00169eb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00169ec0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00169ed0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ +00169ee0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00169ef0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00169f00: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm │ │ │ │ +00169f10: 6c23 6761 3962 3439 3835 6562 3561 3538 l#ga9b4985eb5a58 │ │ │ │ +00169f20: 3866 3463 3136 6164 3838 6566 3763 6133 8f4c16ad88ef7ca3 │ │ │ │ +00169f30: 3239 6463 223e 666f 7065 6e3c 2f61 3e20 29dc">fopen │ │ │ │ +00169f40: 3d20 6d79 6f70 656e 3b20 2020 3c73 7061 = myopen; // use custom │ │ │ │ +00169f70: 6f70 656e 203c 2f73 7061 6e3e 3c2f 6469 open .
    so │ │ │ │ +00169fc0: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap.fp │ │ │ │ +0016a020: 6f73 743c 2f61 3e20 3d20 6d79 706f 7374 ost = mypost │ │ │ │ +0016a030: 3b20 2020 3c73 7061 6e20 636c 6173 733d ; // use │ │ │ │ +0016a050: 2063 7573 746f 6d20 706f 7374 203c 2f73 custom post
    .
    < │ │ │ │ +0016a080: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0016a090: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0016a0a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ +0016a0b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0016a0c0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +0016a0d0: 705f 5f63 616c 6c62 6163 6b73 2e68 746d p__callbacks.htm │ │ │ │ +0016a0e0: 6c23 6761 3963 6230 3563 6539 3866 3834 l#ga9cb05ce98f84 │ │ │ │ +0016a0f0: 3566 3136 6339 3230 6334 3434 3236 6163 5f16c920c44426ac │ │ │ │ +0016a100: 3335 6135 223e 6670 6172 7365 3c2f 613e 35a5">fparse │ │ │ │ +0016a110: 203d 206d 7970 6172 7365 3b20 3c73 7061 = myparse; // use custom │ │ │ │ +0016a140: 7265 7370 6f6e 7365 2070 6172 7365 7220 response parser │ │ │ │ +0016a150: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0016a170: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.fclose< │ │ │ │ +0016a200: 2f61 3e20 3d20 6d79 636c 6f73 653b 203c /a> = myclose; < │ │ │ │ +0016a210: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0016a220: 656e 7422 3e2f 2f20 7573 6520 6375 7374 ent">// use cust │ │ │ │ +0016a230: 6f6d 2063 6c6f 7365 203c 2f73 7061 6e3e om close │ │ │ │ +0016a240: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap_ │ │ │ │ +0016a260: 6361 6c6c 5f6e 735f 5f74 6573 7428 2661 call_ns__test(&a │ │ │ │ +0016a270: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap, │ │ │ │ +0016a2c0: 2671 756f 743b 6669 6c65 3a2f 2f74 6573 "file://tes │ │ │ │ +0016a2d0: 742e 786d 6c26 7175 6f74 3b3c 2f73 7061 t.xml", │ │ │ │ +0016a300: 2671 756f 743b 2671 756f 743b 3c2f 7370 "", p, r); .
    if (soap.error) │ │ │ │ +0016a3e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    soap │ │ │ │ +0016a470: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault │ │ │ │ +0016a480: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +0016a4b0: 703c 2f61 3e2c 2073 7464 6f75 7429 3b20 p, stdout); │ │ │ │ +0016a4c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exi │ │ │ │ +0016a4e0: 7428 4558 4954 5f46 4149 4c55 5245 293b t(EXIT_FAILURE); │ │ │ │ +0016a4f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } ... │ │ │ │ +0016a680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_do │ │ │ │ +0016a6f0: 6e65 3c2f 613e 2826 616d 703b 3c61 2063 ne(&soap);.
    }
    .
    Callb │ │ │ │ +0016a8d0: 6163 6b20 7468 6174 2070 6f70 756c 6174 ack that populat │ │ │ │ +0016a8e0: 6573 2061 6e64 2074 6865 6e20 7365 6e64 es and then send │ │ │ │ +0016a8f0: 7320 4854 5450 2068 6561 6465 7273 2066 s HTTP headers f │ │ │ │ +0016a900: 726f 6d20 7468 6520 636c 6965 6e74 2d73 rom the client-s │ │ │ │ +0016a910: 6964 6520 746f 2061 2063 6f6e 6e65 6374 ide to a connect │ │ │ │ +0016a920: 6564 2048 5454 5020 7365 7276 6572 2e3c ed HTTP server.< │ │ │ │ +0016a930: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +0016a950: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +0016a960: 6170 322e 683a 3432 3230 3c2f 6469 763e ap2.h:4220
    │ │ │ │ +0016a970: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap │ │ │ │ +0016aa30: 3a3a 6670 6172 7365 3c2f 613e 3c2f 6469 ::fparse
    int(* fpar │ │ │ │ +0016aa60: 7365 2928 7374 7275 6374 2073 6f61 7020 se)(struct soap │ │ │ │ +0016aa70: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    C │ │ │ │ +0016aa90: 616c 6c62 6163 6b20 7468 6174 2072 6561 allback that rea │ │ │ │ +0016aaa0: 6473 2061 6e64 2070 6172 7365 7320 4854 ds and parses HT │ │ │ │ +0016aab0: 5450 2061 6e64 204d 494d 4520 6865 6164 TP and MIME head │ │ │ │ +0016aac0: 6572 732e 3c2f 6469 763e 3c64 6976 2063 ers.
    │ │ │ │ +0016aae0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ +0016aaf0: 7374 6473 6f61 7032 2e68 3a34 3235 303c stdsoap2.h:4250< │ │ │ │ +0016ab00: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    │ │ │ │ +0016ab70: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_getline< │ │ │ │ +0016abc0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    .

    SOAP 1.1/1 │ │ │ │ +0016ac70: 2e32 2052 5043 2065 6e63 6f64 696e 6720 .2 RPC encoding │ │ │ │ +0016ac80: 7370 6563 6966 6965 7320 7468 6174 2053 specifies that S │ │ │ │ +0016ac90: 4f41 502f 584d 4c20 656c 656d 656e 7473 OAP/XML elements │ │ │ │ +0016aca0: 206d 6179 2062 6520 6967 6e6f 7265 6420 may be ignored │ │ │ │ +0016acb0: 7768 656e 2070 7265 7365 6e74 2069 6e20 when present in │ │ │ │ +0016acc0: 6120 534f 4150 2070 6179 6c6f 6164 206f a SOAP payload o │ │ │ │ +0016acd0: 6e20 7468 6520 7265 6365 6976 696e 6720 n the receiving │ │ │ │ +0016ace0: 7369 6465 2e20 486f 7765 7665 722c 2064 side. However, d │ │ │ │ +0016acf0: 6f63 756d 656e 742f 6c69 7465 7261 6c20 ocument/literal │ │ │ │ +0016ad00: 7374 796c 6520 6d65 7373 6167 696e 6720 style messaging │ │ │ │ +0016ad10: 7661 6c69 6461 7465 7320 584d 4c20 6d65 validates XML me │ │ │ │ +0016ad20: 7373 6167 6573 2061 6e64 2065 7874 7261 ssages and extra │ │ │ │ +0016ad30: 2065 6c65 6d65 6e74 7320 6361 6e6e 6f74 elements cannot │ │ │ │ +0016ad40: 206a 7573 7420 6265 2069 676e 6f72 6564 just be ignored │ │ │ │ +0016ad50: 2061 7320 7375 6368 2e20 5769 7468 2053 as such. With S │ │ │ │ +0016ad60: 4f41 5020 646f 6375 6d65 6e74 2f6c 6974 OAP document/lit │ │ │ │ +0016ad70: 6572 616c 2073 7479 6c65 2069 7420 6973 eral style it is │ │ │ │ +0016ad80: 2072 6563 6f6d 6d65 6e64 6564 2074 6f20 recommended to │ │ │ │ +0016ad90: 656e 6162 6c65 2074 6865 203c 636f 6465 enable the #SOAP_XML_STRIC │ │ │ │ +0016adb0: 543c 2f63 6f64 653e 206d 6f64 6520 666c T mode fl │ │ │ │ +0016adc0: 6167 2e20 5769 7468 2053 4f41 5020 5250 ag. With SOAP RP │ │ │ │ +0016add0: 4320 656e 636f 6469 6e67 2c20 7468 6520 C encoding, the │ │ │ │ +0016ade0: 656e 6769 6e65 2069 676e 6f72 6573 2058 engine ignores X │ │ │ │ +0016adf0: 4d4c 2065 6c65 6d65 6e74 7320 7468 6174 ML elements that │ │ │ │ +0016ae00: 2061 7265 2075 6e6b 6e6f 776e 2062 7920 are unknown by │ │ │ │ +0016ae10: 6465 6661 756c 742c 2075 6e6c 6573 7320 default, unless │ │ │ │ +0016ae20: 7468 6520 584d 4c20 6174 7472 6962 7574 the XML attribut │ │ │ │ +0016ae30: 6520 3c65 6d3e 3c63 6f64 653e 6d75 7374 e must │ │ │ │ +0016ae40: 556e 6465 7273 7461 6e64 3d22 7472 7565 Understand="true │ │ │ │ +0016ae50: 223c 2f63 6f64 653e 3c2f 656d 3e20 6973 " is │ │ │ │ +0016ae60: 2070 7265 7365 6e74 2069 6e20 7468 6520 present in the │ │ │ │ +0016ae70: 584d 4c20 656c 656d 656e 742e 2049 7420 XML element. It │ │ │ │ +0016ae80: 6d61 7920 6265 2075 6e64 6573 6972 6162 may be undesirab │ │ │ │ +0016ae90: 6c65 2066 6f72 2065 6c65 6d65 6e74 7320 le for elements │ │ │ │ +0016aea0: 746f 2062 6520 6967 6e6f 7265 6420 7768 to be ignored wh │ │ │ │ +0016aeb0: 656e 2074 6865 206f 7574 636f 6d65 206f en the outcome o │ │ │ │ +0016aec0: 6620 7468 6520 6f6d 6973 7369 6f6e 2069 f the omission i │ │ │ │ +0016aed0: 7320 756e 6365 7274 6169 6e2e 2054 6865 s uncertain. The │ │ │ │ +0016aee0: 203c 636f 6465 3e3c 6120 636c 6173 733d soa │ │ │ │ +0016afb0: 703a 3a66 6967 6e6f 7265 3c2f 613e 3c2f p::fignore callback c │ │ │ │ +0016afd0: 616e 2062 6520 7365 7420 746f 2061 2066 an be set to a f │ │ │ │ +0016afe0: 756e 6374 696f 6e20 7468 6174 2072 6574 unction that ret │ │ │ │ +0016aff0: 7572 6e73 203c 636f 6465 3e23 534f 4150 urns #SOAP │ │ │ │ +0016b000: 5f4f 4b3c 2f63 6f64 653e 2069 6e20 6361 _OK in ca │ │ │ │ +0016b010: 7365 2074 6865 2065 6c65 6d65 6e74 2063 se the element c │ │ │ │ +0016b020: 616e 2062 6520 7361 6665 6c79 2069 676e an be safely ign │ │ │ │ +0016b030: 6f72 6564 2c20 6f72 203c 636f 6465 3e23 ored, or # │ │ │ │ +0016b040: 534f 4150 5f4d 5553 5455 4e44 4552 5354 SOAP_MUSTUNDERST │ │ │ │ +0016b050: 414e 443c 2f63 6f64 653e 2074 6f20 7468 AND to th │ │ │ │ +0016b060: 726f 7720 616e 2065 7863 6570 7469 6f6e row an exception │ │ │ │ +0016b070: 2c20 6f72 2074 6f20 7065 7266 6f72 6d20 , or to perform │ │ │ │ +0016b080: 736f 6d65 2061 7070 6c69 6361 7469 6f6e some application │ │ │ │ +0016b090: 2d73 7065 6369 6669 6320 6163 7469 6f6e -specific action │ │ │ │ +0016b0a0: 2e20 466f 7220 6578 616d 706c 652c 2074 . For example, t │ │ │ │ +0016b0b0: 6f20 7468 726f 7720 616e 2065 7863 6570 o throw an excep │ │ │ │ +0016b0c0: 7469 6f6e 2061 7320 736f 6f6e 2061 7320 tion as soon as │ │ │ │ +0016b0d0: 616e 2075 6e6b 6e6f 776e 2065 6c65 6d65 an unknown eleme │ │ │ │ +0016b0e0: 6e74 2069 7320 656e 636f 756e 7465 7265 nt is encountere │ │ │ │ +0016b0f0: 6420 6f6e 2074 6865 2069 6e70 7574 2c20 d on the input, │ │ │ │ +0016b100: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    .
    < │ │ │ │ +0016b120: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0016b130: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >int main().
    {
    . │ │ │ │ +0016b190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap │ │ │ │ +0016b1e0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +0016b210: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa │ │ │ │ +0016b270: 705f 6e65 773c 2f61 3e28 293b 3c2f 6469 p_new();.
    so │ │ │ │ +0016b2c0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->fignore = │ │ │ │ +0016b330: 6d79 6967 6e6f 7265 3b20 3c2f 6469 763e myignore;
    │ │ │ │ +0016b340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ +0016b370: 2f20 736f 6170 5f63 616c 6c5f 6e73 5f5f / soap_call_ns__ │ │ │ │ +0016b380: 7765 626d 6574 686f 6428 736f 6170 2c20 webmethod(soap, │ │ │ │ +0016b390: 2e2e 2e29 206f 7220 736f 6170 5f73 6572 ...) or soap_ser │ │ │ │ +0016b3a0: 7665 2873 6f61 7029 203c 2f73 7061 6e3e ve(soap) │ │ │ │ +0016b3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ 0016b3d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    .
    int myig │ │ │ │ -0016b440: 6e6f 7265 283c 7370 616e 2063 6c61 7373 nore(struc │ │ │ │ -0016b460: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -0016b490: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, const char *tag)
    │ │ │ │ +0016b3e0: 6522 3e20 3c2f 6469 763e 0a3c 6469 7620 e">
    .
    int myignore(struct < │ │ │ │ +0016b450: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0016b460: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0016b470: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +0016b480: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +0016b4b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ +0016b4f0: 6172 3c2f 7370 616e 3e20 2a74 6167 2920 ar *tag) │ │ │ │ +0016b500: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 0016b520: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ -0016b550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0016b560: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ -0016b570: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> SOAP_ │ │ │ │ -0016b5d0: 4d55 5354 554e 4445 5253 5441 4e44 3c2f MUSTUNDERSTAND; // nev │ │ │ │ -0016b600: 6572 2073 6b69 7020 656c 656d 656e 7473 er skip elements │ │ │ │ -0016b610: 2028 7365 6375 7265 2920 3c2f 7370 616e (secure)
    .
    } .
    < │ │ │ │ -0016b710: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -0016b720: 6922 3e69 6e74 282a 2066 6967 6e6f 7265 i">int(* fignore │ │ │ │ -0016b730: 2928 7374 7275 6374 2073 6f61 7020 2a73 )(struct soap *s │ │ │ │ -0016b740: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char │ │ │ │ -0016b750: 2a74 6167 293c 2f64 6976 3e3c 6469 7620 *tag)
    Ca │ │ │ │ -0016b770: 6c6c 6261 636b 2074 6f20 6361 7463 6820 llback to catch │ │ │ │ -0016b780: 756e 7265 636f 676e 697a 6564 2058 4d4c unrecognized XML │ │ │ │ -0016b790: 2065 6c65 6d65 6e74 7320 616e 6420 6f76 elements and ov │ │ │ │ -0016b7a0: 6572 7269 6465 7320 2353 4f41 505f 584d errides #SOAP_XM │ │ │ │ -0016b7b0: 4c5f 5354 5249 4354 2076 616c 6964 6174 L_STRICT validat │ │ │ │ -0016b7c0: 696f 6e20 6572 726f 7273 2066 6f72 2074 ion errors for t │ │ │ │ -0016b7d0: 6865 732e 2e2e 3c2f 6469 763e 3c64 6976 hes...
    < │ │ │ │ -0016b7f0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:444 │ │ │ │ -0016b810: 333c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 3
    .
    #d │ │ │ │ -0016b900: 6566 696e 6520 534f 4150 5f4d 5553 5455 efine SOAP_MUSTU │ │ │ │ -0016b910: 4e44 4552 5354 414e 443c 2f64 6976 3e3c NDERSTAND
    < │ │ │ │ -0016b920: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -0016b930: 223e 4120 736f 6170 5f73 7461 7475 7320 ">A soap_status │ │ │ │ -0016b940: 6572 726f 7220 636f 6465 3a20 616e 2058 error code: an X │ │ │ │ -0016b950: 4d4c 2065 6c65 6d65 6e74 2069 7320 7072 ML element is pr │ │ │ │ -0016b960: 6573 656e 7420 7769 7468 2061 206d 7573 esent with a mus │ │ │ │ -0016b970: 7455 6e64 6572 7374 616e 6420 6174 7472 tUnderstand attr │ │ │ │ -0016b980: 6962 7574 6520 7768 6963 6820 6d75 7374 ibute which must │ │ │ │ -0016b990: 2062 6520 756e 642e 2e2e 3c2f 6469 763e be und...
    │ │ │ │ -0016b9a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -0016b9c0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -0016b9d0: 3a32 3439 303c 2f64 6976 3e3c 2f64 6976 :2490
    .

    To s │ │ │ │ -0016ba00: 656c 6563 7469 7665 6c79 2074 6872 6f77 electively throw │ │ │ │ -0016ba10: 2061 6e20 6578 6365 7074 696f 6e20 7768 an exception wh │ │ │ │ -0016ba20: 656e 203c 656d 3e3c 636f 6465 3e6d 7573 en mus │ │ │ │ -0016ba30: 7455 6e64 6572 7374 616e 643d 2274 7275 tUnderstand="tru │ │ │ │ -0016ba40: 6522 3c2f 636f 6465 3e3c 2f65 6d3e 2053 e" S │ │ │ │ -0016ba50: 4f41 5020 4865 6164 6572 2065 6c65 6d65 OAP Header eleme │ │ │ │ -0016ba60: 6e74 2069 7320 656e 636f 756e 7465 7265 nt is encountere │ │ │ │ -0016ba70: 6420 6f72 2077 6865 6e20 616e 2075 6e6b d or when an unk │ │ │ │ -0016ba80: 6e6f 776e 2065 6c65 6d65 6e74 2069 7320 nown element is │ │ │ │ -0016ba90: 656e 636f 756e 7465 7265 6420 6578 6365 encountered exce │ │ │ │ -0016baa0: 7074 2066 6f72 2065 6c65 6d65 6e74 203c pt for element < │ │ │ │ -0016bab0: 656d 3e3c 636f 6465 3e6e 733a 7879 7a3c em>ns:xyz< │ │ │ │ -0016bac0: 2f63 6f64 653e 3c2f 656d 3e2c 2075 7365 /code>, use │ │ │ │ -0016bad0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int main()
    . │ │ │ │ +0016b530: 6522 3e20 203c 7370 616e 2063 6c61 7373 e"> r │ │ │ │ +0016b550: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_MUSTUNDERS │ │ │ │ +0016b5c0: 5441 4e44 3c2f 613e 3b20 3c73 7061 6e20 TAND; │ │ │ │ +0016b5e0: 2f2f 206e 6576 6572 2073 6b69 7020 656c // never skip el │ │ │ │ +0016b5f0: 656d 656e 7473 2028 7365 6375 7265 2920 ements (secure) │ │ │ │ +0016b600: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +0016b620: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    │ │ │ │ +0016b680: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    so │ │ │ │ +0016b6e0: 6170 3a3a 6669 676e 6f72 653c 2f61 3e3c ap::fignore< │ │ │ │ +0016b6f0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int(* f │ │ │ │ +0016b710: 6967 6e6f 7265 2928 7374 7275 6374 2073 ignore)(struct s │ │ │ │ +0016b720: 6f61 7020 2a73 6f61 702c 2063 6f6e 7374 oap *soap, const │ │ │ │ +0016b730: 2063 6861 7220 2a74 6167 293c 2f64 6976 char *tag)
    Callback to │ │ │ │ +0016b760: 6361 7463 6820 756e 7265 636f 676e 697a catch unrecogniz │ │ │ │ +0016b770: 6564 2058 4d4c 2065 6c65 6d65 6e74 7320 ed XML elements │ │ │ │ +0016b780: 616e 6420 6f76 6572 7269 6465 7320 2353 and overrides #S │ │ │ │ +0016b790: 4f41 505f 584d 4c5f 5354 5249 4354 2076 OAP_XML_STRICT v │ │ │ │ +0016b7a0: 616c 6964 6174 696f 6e20 6572 726f 7273 alidation errors │ │ │ │ +0016b7b0: 2066 6f72 2074 6865 732e 2e2e 3c2f 6469 for thes...
    Definiti │ │ │ │ +0016b7e0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ +0016b7f0: 2e68 3a34 3434 333c 2f64 6976 3e3c 2f64 .h:4443
    .
    │ │ │ │ +0016b8d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP │ │ │ │ +0016b8f0: 5f4d 5553 5455 4e44 4552 5354 414e 443c _MUSTUNDERSTAND< │ │ │ │ +0016b900: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A soap_s │ │ │ │ +0016b920: 7461 7475 7320 6572 726f 7220 636f 6465 tatus error code │ │ │ │ +0016b930: 3a20 616e 2058 4d4c 2065 6c65 6d65 6e74 : an XML element │ │ │ │ +0016b940: 2069 7320 7072 6573 656e 7420 7769 7468 is present with │ │ │ │ +0016b950: 2061 206d 7573 7455 6e64 6572 7374 616e a mustUnderstan │ │ │ │ +0016b960: 6420 6174 7472 6962 7574 6520 7768 6963 d attribute whic │ │ │ │ +0016b970: 6820 6d75 7374 2062 6520 756e 642e 2e2e h must be und... │ │ │ │ +0016b980: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +0016b9a0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +0016b9b0: 6f61 7032 2e68 3a32 3439 303c 2f64 6976 oap2.h:2490
    .
    < │ │ │ │ +0016b9e0: 703e 546f 2073 656c 6563 7469 7665 6c79 p>To selectively │ │ │ │ +0016b9f0: 2074 6872 6f77 2061 6e20 6578 6365 7074 throw an except │ │ │ │ +0016ba00: 696f 6e20 7768 656e 203c 656d 3e3c 636f ion when mustUnderstan │ │ │ │ +0016ba20: 643d 2274 7275 6522 3c2f 636f 6465 3e3c d="true"
    < │ │ │ │ +0016ba30: 2f65 6d3e 2053 4f41 5020 4865 6164 6572 /em> SOAP Header │ │ │ │ +0016ba40: 2065 6c65 6d65 6e74 2069 7320 656e 636f element is enco │ │ │ │ +0016ba50: 756e 7465 7265 6420 6f72 2077 6865 6e20 untered or when │ │ │ │ +0016ba60: 616e 2075 6e6b 6e6f 776e 2065 6c65 6d65 an unknown eleme │ │ │ │ +0016ba70: 6e74 2069 7320 656e 636f 756e 7465 7265 nt is encountere │ │ │ │ +0016ba80: 6420 6578 6365 7074 2066 6f72 2065 6c65 d except for ele │ │ │ │ +0016ba90: 6d65 6e74 203c 656d 3e3c 636f 6465 3e6e ment n │ │ │ │ +0016baa0: 733a 7879 7a3c 2f63 6f64 653e 3c2f 656d s:xyz, use:

    .
    in │ │ │ │ +0016bb00: 743c 2f73 7061 6e3e 206d 6169 6e28 293c t main()< │ │ │ │ +0016bb10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 0016bb30: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .. │ │ │ │ -0016bc50: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ -0016bd20: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // soa │ │ │ │ -0016bd40: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme │ │ │ │ -0016bd50: 7468 6f64 2873 6f61 702c 202e 2e2e 2920 thod(soap, ...) │ │ │ │ -0016bd60: 6f72 2073 6f61 705f 7365 7276 6528 736f or soap_serve(so │ │ │ │ -0016bd70: 6170 2920 3c2f 7370 616e 3e3c 2f64 6976 ap)
    struct │ │ │ │ +0016bb60: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s │ │ │ │ +0016bb90: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ +0016bbc0: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = │ │ │ │ +0016bc20: 736f 6170 5f6e 6577 3c2f 613e 2829 3b3c soap_new();< │ │ │ │ +0016bc30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap->fignore │ │ │ │ +0016bce0: 203d 2069 676e 6f72 653b 203c 2f64 6976 = ignore;
    .
    ... │ │ │ │ +0016bd20: 2f2f 2073 6f61 705f 6361 6c6c 5f6e 735f // soap_call_ns_ │ │ │ │ +0016bd30: 5f77 6562 6d65 7468 6f64 2873 6f61 702c _webmethod(soap, │ │ │ │ +0016bd40: 202e 2e2e 2920 6f72 2073 6f61 705f 7365 ...) or soap_se │ │ │ │ +0016bd50: 7276 6528 736f 6170 2920 3c2f 7370 616e rve(soap)
    .
    }
    .
    }
    .
    < │ │ │ │ -0016bdb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ign │ │ │ │ -0016bdf0: 6f72 6528 3c73 7061 6e20 636c 6173 733d ore(struct │ │ │ │ -0016be10: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ -0016be40: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ -0016be70: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, │ │ │ │ -0016be90: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *tag)
    . │ │ │ │ +0016bd90: 6e65 223e 203c 2f64 6976 3e0a 3c64 6976 ne">
    .
    int ignore( │ │ │ │ +0016bdf0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +0016be30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0016be40: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0016be50: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +0016be60: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ +0016bea0: 723c 2f73 7061 6e3e 202a 7461 6729 203c r *tag) < │ │ │ │ +0016beb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ 0016bed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    // do not ig │ │ │ │ -0016bf20: 6e6f 7265 206d 7573 7455 6e64 6572 7374 nore mustUnderst │ │ │ │ -0016bf30: 616e 643d 2671 756f 743b 7472 7565 2671 and="true&q │ │ │ │ -0016bf40: 756f 743b 203c 2f73 7061 6e3e 3c2f 6469 uot; .
    if (!soap-> │ │ │ │ -0016bfc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;mustUn │ │ │ │ -0016c010: 6465 7273 7461 6e64 3c2f 613e 293c 2f64 derstand).
    {
    . │ │ │ │ -0016c040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // t │ │ │ │ -0016c070: 6167 7320 266c 743b 6e73 3a73 6f6d 6545 ags <ns:someE │ │ │ │ -0016c080: 6c65 6d65 6e74 2667 743b 2063 616e 2062 lement> can b │ │ │ │ -0016c090: 6520 7361 6665 6c79 2069 676e 6f72 6564 e safely ignored │ │ │ │ -0016c0a0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0016c0c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ -0016c0e0: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_ │ │ │ │ -0016c140: 6d61 7463 685f 7461 673c 2f61 3e28 3c61 match_tag(soap, t │ │ │ │ -0016c180: 6167 2c20 3c73 7061 6e20 636c 6173 733d ag, │ │ │ │ -0016c1a0: 2671 756f 743b 6e73 3a73 6f6d 6545 6c65 "ns:someEle │ │ │ │ -0016c1b0: 6d65 6e74 2671 756f 743b 3c2f 7370 616e ment") == SOAP_O │ │ │ │ -0016c220: 4b3c 2f61 3e29 3c2f 6469 763e 0a3c 6469 K)
    . │ │ │ │ -0016c240: 2020 2020 203c 7370 616e 2063 6c61 7373 r │ │ │ │ -0016c260: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.
    }
    . │ │ │ │ -0016c2f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +0016bee0: 223e 2020 3c73 7061 6e20 636c 6173 733d "> // do │ │ │ │ +0016bf00: 6e6f 7420 6967 6e6f 7265 206d 7573 7455 not ignore mustU │ │ │ │ +0016bf10: 6e64 6572 7374 616e 643d 2671 756f 743b nderstand=" │ │ │ │ +0016bf20: 7472 7565 2671 756f 743b 203c 2f73 7061 true"
    .
    if │ │ │ │ +0016bf70: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap-> │ │ │ │ +0016bff0: 6d75 7374 556e 6465 7273 7461 6e64 3c2f mustUnderstand)
    .
    {< │ │ │ │ +0016c020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // tags <ns │ │ │ │ +0016c060: 3a73 6f6d 6545 6c65 6d65 6e74 2667 743b :someElement> │ │ │ │ +0016c070: 2063 616e 2062 6520 7361 6665 6c79 2069 can be safely i │ │ │ │ +0016c080: 676e 6f72 6564 3c2f 7370 616e 3e3c 2f64 gnored.
    if (< │ │ │ │ +0016c0d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0016c0e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +0016c0f0: 705f 5f6d 6973 632e 6874 6d6c 2367 6139 p__misc.html#ga9 │ │ │ │ +0016c100: 3161 3335 6432 6636 3765 6565 6138 6463 1a35d2f67eeea8dc │ │ │ │ +0016c110: 3331 6664 3233 6133 6365 6136 3564 3422 31fd23a3cea65d4" │ │ │ │ +0016c120: 3e73 6f61 705f 6d61 7463 685f 7461 673c >soap_match_tag< │ │ │ │ +0016c130: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ +0016c160: 2f61 3e2c 2074 6167 2c20 3c73 7061 6e20 /a>, tag, "ns:s │ │ │ │ +0016c190: 6f6d 6545 6c65 6d65 6e74 2671 756f 743b omeElement" │ │ │ │ +0016c1a0: 3c2f 7370 616e 3e29 203d 3d20 3c61 2063 ) == │ │ │ │ +0016c200: 534f 4150 5f4f 4b3c 2f61 3e29 3c2f 6469 SOAP_OK).
    return SOAP_OK;
    .
    }< │ │ │ │ +0016c2d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_MUSTU │ │ │ │ +0016c370: 4e44 4552 5354 414e 443c 2f61 3e3b 203c NDERSTAND; < │ │ │ │ +0016c380: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ 0016c3a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    stru │ │ │ │ -0016c400: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct Namespace │ │ │ │ -0016c440: 3c2f 613e 203c 6120 636c 6173 733d 2263 name │ │ │ │ -0016c4a0: 7370 6163 6573 3c2f 613e 5b5d 203d 203c spaces[] = < │ │ │ │ +0016c3b0: 223e 203c 2f64 6976 3e0a 3c64 6976 2063 ">
    .
    struct │ │ │ │ +0016c3f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 Nam │ │ │ │ +0016c420: 6573 7061 6365 3c2f 613e 203c 6120 636c espace namespaces │ │ │ │ +0016c490: 5b5d 203d 203c 2f64 6976 3e0a 3c64 6976 [] =
    .
    {< │ │ │ │ 0016c4b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -0016c4d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    { "SOAP-ENV │ │ │ │ -0016c510: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", < │ │ │ │ -0016c520: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -0016c530: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -0016c540: 3b68 7474 703a 2f2f 7363 6865 6d61 732e ;http://schemas. │ │ │ │ -0016c550: 786d 6c73 6f61 702e 6f72 672f 736f 6170 xmlsoap.org/soap │ │ │ │ -0016c560: 2f65 6e76 656c 6f70 652f 2671 756f 743b /envelope/" │ │ │ │ -0016c570: 3c2f 7370 616e 3e20 7d2c 203c 2f64 6976 },
    .
    { "SOAP-E │ │ │ │ -0016c5c0: 4e43 2671 756f 743b 3c2f 7370 616e 3e2c NC", │ │ │ │ -0016c5d0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -0016c5f0: 6f74 3b68 7474 703a 2f2f 7363 6865 6d61 ot;http://schema │ │ │ │ -0016c600: 732e 786d 6c73 6f61 702e 6f72 672f 736f s.xmlsoap.org/so │ │ │ │ -0016c610: 6170 2f65 6e63 6f64 696e 672f 2671 756f ap/encoding/&quo │ │ │ │ -0016c620: 743b 3c2f 7370 616e 3e20 7d2c 203c 2f64 t; }, .
    { "xsi& │ │ │ │ -0016c670: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -0016c680: 2020 203c 7370 616e 2063 6c61 7373 3d22 & │ │ │ │ -0016c6a0: 7175 6f74 3b68 7474 703a 2f2f 7777 772e quot;http://www. │ │ │ │ -0016c6b0: 7733 2e6f 7267 2f32 3030 312f 584d 4c53 w3.org/2001/XMLS │ │ │ │ -0016c6c0: 6368 656d 612d 696e 7374 616e 6365 2671 chema-instance&q │ │ │ │ -0016c6d0: 756f 743b 3c2f 7370 616e 3e20 7d2c 203c uot; }, < │ │ │ │ -0016c6e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    { "xs │ │ │ │ -0016c720: 6426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 d", │ │ │ │ -0016c730: 2020 2020 203c 7370 616e 2063 6c61 7373 "http://ww │ │ │ │ -0016c760: 772e 7733 2e6f 7267 2f32 3030 312f 584d w.w3.org/2001/XM │ │ │ │ -0016c770: 4c53 6368 656d 6126 7175 6f74 3b3c 2f73 LSchema" },
    .< │ │ │ │ -0016c790: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016c7a0: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "ns"< │ │ │ │ -0016c7d0: 2f73 7061 6e3e 2c20 2020 2020 2020 3c73 /span>, " │ │ │ │ -0016c800: 736f 6d65 2d55 5249 2671 756f 743b 3c2f some-URI"}, // │ │ │ │ -0016c830: 2062 696e 6473 2026 7175 6f74 3b6e 7326 binds "ns& │ │ │ │ -0016c840: 7175 6f74 3b20 6e61 6d65 7370 6163 6520 quot; namespace │ │ │ │ -0016c850: 7072 6566 6978 2074 6f20 7363 6865 6d61 prefix to schema │ │ │ │ -0016c860: 2055 5249 3c2f 7370 616e 3e3c 2f64 6976 URI
    .
    { NULL, NU │ │ │ │ -0016c890: 4c4c 7d20 3c2f 6469 763e 0a3c 6469 7620 LL}
    .
    ];< │ │ │ │ -0016c8b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -0016c900: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -0016c910: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ -0016c950: 6f61 703a 3a6d 7573 7455 6e64 6572 7374 oap::mustUnderst │ │ │ │ -0016c960: 616e 643c 2f61 3e3c 2f64 6976 3e3c 6469 and
    short mustUnder │ │ │ │ -0016c990: 7374 616e 643c 2f64 6976 3e3c 6469 7620 stand
    Th │ │ │ │ -0016c9b0: 6520 736f 6170 3a3a 6d75 7374 556e 6465 e soap::mustUnde │ │ │ │ -0016c9c0: 7273 7461 6e64 2066 6c61 6720 6973 2073 rstand flag is s │ │ │ │ -0016c9d0: 6574 2077 6865 6e20 6120 534f 4150 2048 et when a SOAP H │ │ │ │ -0016c9e0: 6561 6465 7220 656c 656d 656e 7420 6361 eader element ca │ │ │ │ -0016c9f0: 7272 6965 7320 6120 534f 4150 2d45 4e56 rries a SOAP-ENV │ │ │ │ -0016ca00: 3a6d 7573 7455 6e64 6572 7374 616e 6420 :mustUnderstand │ │ │ │ -0016ca10: 6174 742e 2e2e 3c2f 6469 763e 3c64 6976 att...
    < │ │ │ │ -0016ca30: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:296 │ │ │ │ -0016ca50: 313c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 1
    .

    Function │ │ │ │ -0016ca80: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_match │ │ │ │ -0016cb00: 5f74 6167 3c2f 613e 3c2f 636f 6465 3e20 _tag │ │ │ │ -0016cb10: 636f 6d70 6172 6573 2074 776f 2074 6167 compares two tag │ │ │ │ -0016cb20: 732e 2054 6865 2074 6869 7264 2070 6172 s. The third par │ │ │ │ -0016cb30: 616d 6574 6572 206d 6179 2062 6520 6120 ameter may be a │ │ │ │ -0016cb40: 7061 7474 6572 6e20 7768 6572 6520 3c63 pattern where * is │ │ │ │ -0016cb60: 6120 7769 6c64 6361 7264 2061 6e64 203c a wildcard and < │ │ │ │ -0016cb70: 636f 6465 3e2d 3c2f 636f 6465 3e20 6973 code>- is │ │ │ │ -0016cb80: 2061 2073 696e 676c 6520 6368 6172 6163 a single charac │ │ │ │ -0016cb90: 7465 7220 7769 6c64 6361 7264 2e20 536f ter wildcard. So │ │ │ │ -0016cba0: 2066 6f72 2065 7861 6d70 6c65 203c 636f for example soap_match_ta │ │ │ │ -0016cbc0: 6728 736f 6170 2c20 7461 672c 2022 6e73 g(soap, tag, "ns │ │ │ │ -0016cbd0: 3a2a 2229 3c2f 636f 6465 3e20 7769 6c6c :*") will │ │ │ │ -0016cbe0: 206d 6174 6368 2061 6e79 2065 6c65 6d65 match any eleme │ │ │ │ -0016cbf0: 6e74 2069 6e20 6e61 6d65 7370 6163 6520 nt in namespace │ │ │ │ -0016cc00: 3c63 6f64 653e 6e73 3c2f 636f 6465 3e20 ns │ │ │ │ -0016cc10: 6f72 2077 6865 6e20 6e6f 206e 616d 6573 or when no names │ │ │ │ -0016cc20: 7061 6365 2070 7265 6669 7820 6973 2070 pace prefix is p │ │ │ │ -0016cc30: 7265 7365 6e74 2069 6e20 7468 6520 584d resent in the XM │ │ │ │ -0016cc40: 4c20 6d65 7373 6167 652e 3c2f 703e 0a3c L message.

    .< │ │ │ │ -0016cc50: 703e 5468 6520 6361 6c6c 6261 636b 2063 p>The callback c │ │ │ │ -0016cc60: 616e 2061 6c73 6f20 6265 2075 7365 6420 an also be used │ │ │ │ -0016cc70: 746f 206b 6565 7020 7472 6163 6b20 6f66 to keep track of │ │ │ │ -0016cc80: 2075 6e6b 6e6f 776e 2065 6c65 6d65 6e74 unknown element │ │ │ │ -0016cc90: 7320 696e 2061 6e20 696e 7465 726e 616c s in an internal │ │ │ │ -0016cca0: 2064 6174 6120 7374 7275 6374 7572 6520 data structure │ │ │ │ -0016ccb0: 7375 6368 2061 7320 6120 6c69 7374 3a3c such as a list:< │ │ │ │ -0016ccc0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    struct │ │ │ │ -0016cd10: 556e 6b6e 6f77 6e20 3c2f 6469 763e 0a3c Unknown
    .< │ │ │ │ +0016c4c0: 3d22 6c69 6e65 223e 2020 7b20 3c73 7061 ="line"> { "SO │ │ │ │ +0016c4f0: 4150 2d45 4e56 2671 756f 743b 3c2f 7370 AP-ENV", "http://sc │ │ │ │ +0016c530: 6865 6d61 732e 786d 6c73 6f61 702e 6f72 hemas.xmlsoap.or │ │ │ │ +0016c540: 672f 736f 6170 2f65 6e76 656c 6f70 652f g/soap/envelope/ │ │ │ │ +0016c550: 2671 756f 743b 3c2f 7370 616e 3e20 7d2c " }, │ │ │ │ +0016c560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { " │ │ │ │ +0016c5a0: 534f 4150 2d45 4e43 2671 756f 743b 3c2f SOAP-ENC", "http:// │ │ │ │ +0016c5e0: 7363 6865 6d61 732e 786d 6c73 6f61 702e schemas.xmlsoap. │ │ │ │ +0016c5f0: 6f72 672f 736f 6170 2f65 6e63 6f64 696e org/soap/encodin │ │ │ │ +0016c600: 672f 2671 756f 743b 3c2f 7370 616e 3e20 g/" │ │ │ │ +0016c610: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
    .
    { │ │ │ │ +0016c630: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +0016c650: 743b 7873 6926 7175 6f74 3b3c 2f73 7061 t;xsi", "http: │ │ │ │ +0016c690: 2f2f 7777 772e 7733 2e6f 7267 2f32 3030 //www.w3.org/200 │ │ │ │ +0016c6a0: 312f 584d 4c53 6368 656d 612d 696e 7374 1/XMLSchema-inst │ │ │ │ +0016c6b0: 616e 6365 2671 756f 743b 3c2f 7370 616e ance" },
    .
    │ │ │ │ +0016c6e0: 7b20 3c73 7061 6e20 636c 6173 733d 2273 { &q │ │ │ │ +0016c700: 756f 743b 7873 6426 7175 6f74 3b3c 2f73 uot;xsd", "htt │ │ │ │ +0016c740: 703a 2f2f 7777 772e 7733 2e6f 7267 2f32 p://www.w3.org/2 │ │ │ │ +0016c750: 3030 312f 584d 4c53 6368 656d 6126 7175 001/XMLSchema&qu │ │ │ │ +0016c760: 6f74 3b3c 2f73 7061 6e3e 207d 2c20 3c2f ot; }, .
    { "ns& │ │ │ │ +0016c7b0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ +0016c7c0: 2020 2020 3c73 7061 6e20 636c 6173 733d │ │ │ │ +0016c7e0: 2671 756f 743b 736f 6d65 2d55 5249 2671 "some-URI&q │ │ │ │ +0016c7f0: 756f 743b 3c2f 7370 616e 3e7d 2c20 3c73 uot;}, // binds &qu │ │ │ │ +0016c820: 6f74 3b6e 7326 7175 6f74 3b20 6e61 6d65 ot;ns" name │ │ │ │ +0016c830: 7370 6163 6520 7072 6566 6978 2074 6f20 space prefix to │ │ │ │ +0016c840: 7363 6865 6d61 2055 5249 3c2f 7370 616e schema URI
    .
    { NU │ │ │ │ +0016c870: 4c4c 2c20 4e55 4c4c 7d20 3c2f 6469 763e LL, NULL}
    │ │ │ │ +0016c880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ];
    .
    soap::mustU │ │ │ │ +0016c940: 6e64 6572 7374 616e 643c 2f61 3e3c 2f64 nderstand
    short mus │ │ │ │ +0016c970: 7455 6e64 6572 7374 616e 643c 2f64 6976 tUnderstand
    The soap::mu │ │ │ │ +0016c9a0: 7374 556e 6465 7273 7461 6e64 2066 6c61 stUnderstand fla │ │ │ │ +0016c9b0: 6720 6973 2073 6574 2077 6865 6e20 6120 g is set when a │ │ │ │ +0016c9c0: 534f 4150 2048 6561 6465 7220 656c 656d SOAP Header elem │ │ │ │ +0016c9d0: 656e 7420 6361 7272 6965 7320 6120 534f ent carries a SO │ │ │ │ +0016c9e0: 4150 2d45 4e56 3a6d 7573 7455 6e64 6572 AP-ENV:mustUnder │ │ │ │ +0016c9f0: 7374 616e 6420 6174 742e 2e2e 3c2f 6469 stand att...
    Definiti │ │ │ │ +0016ca20: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ +0016ca30: 2e68 3a32 3936 313c 2f64 6976 3e3c 2f64 .h:2961
    .

    Fu │ │ │ │ +0016ca60: 6e63 7469 6f6e 203c 636f 6465 3e3c 6120 nction soap │ │ │ │ +0016cae0: 5f6d 6174 6368 5f74 6167 3c2f 613e 3c2f _match_tag compares t │ │ │ │ +0016cb00: 776f 2074 6167 732e 2054 6865 2074 6869 wo tags. The thi │ │ │ │ +0016cb10: 7264 2070 6172 616d 6574 6572 206d 6179 rd parameter may │ │ │ │ +0016cb20: 2062 6520 6120 7061 7474 6572 6e20 7768 be a pattern wh │ │ │ │ +0016cb30: 6572 6520 3c63 6f64 653e 2a3c 2f63 6f64 ere * is a wildcard │ │ │ │ +0016cb50: 2061 6e64 203c 636f 6465 3e2d 3c2f 636f and - is a single │ │ │ │ +0016cb70: 6368 6172 6163 7465 7220 7769 6c64 6361 character wildca │ │ │ │ +0016cb80: 7264 2e20 536f 2066 6f72 2065 7861 6d70 rd. So for examp │ │ │ │ +0016cb90: 6c65 203c 636f 6465 3e73 6f61 705f 6d61 le soap_ma │ │ │ │ +0016cba0: 7463 685f 7461 6728 736f 6170 2c20 7461 tch_tag(soap, ta │ │ │ │ +0016cbb0: 672c 2022 6e73 3a2a 2229 3c2f 636f 6465 g, "ns:*") will match any │ │ │ │ +0016cbd0: 2065 6c65 6d65 6e74 2069 6e20 6e61 6d65 element in name │ │ │ │ +0016cbe0: 7370 6163 6520 3c63 6f64 653e 6e73 3c2f space ns or when no │ │ │ │ +0016cc00: 206e 616d 6573 7061 6365 2070 7265 6669 namespace prefi │ │ │ │ +0016cc10: 7820 6973 2070 7265 7365 6e74 2069 6e20 x is present in │ │ │ │ +0016cc20: 7468 6520 584d 4c20 6d65 7373 6167 652e the XML message. │ │ │ │ +0016cc30: 3c2f 703e 0a3c 703e 5468 6520 6361 6c6c

    .

    The call │ │ │ │ +0016cc40: 6261 636b 2063 616e 2061 6c73 6f20 6265 back can also be │ │ │ │ +0016cc50: 2075 7365 6420 746f 206b 6565 7020 7472 used to keep tr │ │ │ │ +0016cc60: 6163 6b20 6f66 2075 6e6b 6e6f 776e 2065 ack of unknown e │ │ │ │ +0016cc70: 6c65 6d65 6e74 7320 696e 2061 6e20 696e lements in an in │ │ │ │ +0016cc80: 7465 726e 616c 2064 6174 6120 7374 7275 ternal data stru │ │ │ │ +0016cc90: 6374 7572 6520 7375 6368 2061 7320 6120 cture such as a │ │ │ │ +0016cca0: 6c69 7374 3a3c 2f70 3e0a 3c64 6976 2063 list:

    .
    │ │ │ │ +0016ccc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ +0016ccf0: 2f73 7061 6e3e 556e 6b6e 6f77 6e20 3c2f /span>Unknown .
    {
    .< │ │ │ │ 0016cd20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016cd30: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    char *tag;
    . │ │ │ │ -0016cd80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct │ │ │ │ -0016cdb0: 203c 2f73 7061 6e3e 556e 6b6e 6f77 6e20 Unknown │ │ │ │ -0016cdc0: 2a6e 6578 743b 203c 2f64 6976 3e0a 3c64 *next;
    . │ │ │ │ -0016cde0: 7d3b 203c 2f64 6976 3e0a 3c64 6976 2063 };
    .
    int │ │ │ │ -0016ce20: 206d 7969 676e 6f72 6528 3c73 7061 6e20 myignore( │ │ │ │ -0016ce40: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ -0016ce80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0016ce90: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0016cea0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -0016ceb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ -0016cef0: 723c 2f73 7061 6e3e 202a 7461 6729 203c r *tag) < │ │ │ │ +0016cd30: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > cha │ │ │ │ +0016cd50: 723c 2f73 7061 6e3e 202a 7461 673b 203c r *tag; < │ │ │ │ +0016cd60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0016cd90: 7374 7275 6374 203c 2f73 7061 6e3e 556e struct Un │ │ │ │ +0016cda0: 6b6e 6f77 6e20 2a6e 6578 743b 203c 2f64 known *next; .
    };
    . │ │ │ │ +0016cdd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ +0016ce00: 2f73 7061 6e3e 206d 7969 676e 6f72 6528 /span> myignore( │ │ │ │ +0016ce10: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ +0016ce60: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap │ │ │ │ +0016ce90: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , cons │ │ │ │ +0016ceb0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ +0016cee0: 7461 6729 203c 2f64 6976 3e0a 3c64 6976 tag)
    .
    {< │ │ │ │ 0016cf00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -0016cf20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ch │ │ │ │ -0016cf50: 6172 3c2f 7370 616e 3e20 2a73 203d 2028 ar *s = ( │ │ │ │ -0016cf60: 3c73 7061 6e20 636c 6173 733d 226b 6579 char*)soap │ │ │ │ -0016cfe0: 5f6d 616c 6c6f 633c 2f61 3e28 3c61 2063 _malloc(soap, str │ │ │ │ -0016d020: 6c65 6e28 7461 6729 2b31 293b 203c 2f64 len(tag)+1); .
    st │ │ │ │ -0016d060: 7275 6374 203c 2f73 7061 6e3e 556e 6b6e ruct Unkn │ │ │ │ -0016d070: 6f77 6e20 2a75 203d 2028 3c73 7061 6e20 own *u = ( │ │ │ │ -0016d090: 7374 7275 6374 203c 2f73 7061 6e3e 556e struct Un │ │ │ │ -0016d0a0: 6b6e 6f77 6e2a 293c 6120 636c 6173 733d known*)soap │ │ │ │ -0016d100: 5f6d 616c 6c6f 633c 2f61 3e28 3c61 2063 _malloc(soap, sizeof │ │ │ │ -0016d160: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct Unknown)); │ │ │ │ -0016d190: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ -0016d1d0: 7320 2661 6d70 3b26 616d 703b 2075 2920 s && u) │ │ │ │ -0016d1e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    strcpy( │ │ │ │ -0016d220: 732c 2074 6167 293b 203c 2f64 6976 3e0a s, tag);
    . │ │ │ │ -0016d230: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    u->tag │ │ │ │ -0016d250: 3d20 733b 203c 2f64 6976 3e0a 3c64 6976 = s;
    .
    │ │ │ │ -0016d270: 2020 752d 2667 743b 6e65 7874 203d 2075 u->next = u │ │ │ │ -0016d280: 6c69 7374 3b20 3c2f 6469 763e 0a3c 6469 list;
    . │ │ │ │ -0016d2a0: 2020 2075 6c69 7374 203d 2075 3b20 3c2f ulist = u; .
    }
    .
    }
    . │ │ │ │ -0016d300: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ma │ │ │ │ -0016d340: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
    .
    {.
    s │ │ │ │ -0016d390: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap; │ │ │ │ -0016d420: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    struct │ │ │ │ -0016d460: 556e 6b6e 6f77 6e20 2a75 6c69 7374 203d Unknown *ulist = │ │ │ │ -0016d470: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    . │ │ │ │ -0016d490: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_init │ │ │ │ -0016d4f0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); .. │ │ │ │ -0016d600: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // so │ │ │ │ -0016d620: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm │ │ │ │ -0016d630: 6574 686f 6428 736f 6170 2c20 2e2e 2e29 ethod(soap, ...) │ │ │ │ -0016d640: 206f 7220 736f 6170 5f73 6572 7665 2873 or soap_serve(s │ │ │ │ -0016d650: 6f61 7029 203c 2f73 7061 6e3e 3c2f 6469 oap) ..
    }
    .

    .... Back to t │ │ │ │ -0016d940: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -0016d950: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    │ │ │ │ -0016d980: 0a48 6f77 2074 6f20 6861 6e64 6c65 2048 .How to handle H │ │ │ │ -0016d990: 5454 5020 3330 3720 7465 6d70 6f72 6172 TTP 307 temporar │ │ │ │ -0016d9a0: 7920 7265 6469 7265 6374 3c2f 6832 3e0a y redirect

    . │ │ │ │ -0016d9b0: 3c70 3e54 6865 2063 6c69 656e 742d 7369

    The client-si │ │ │ │ -0016d9c0: 6465 2068 616e 646c 696e 6720 6f66 2048 de handling of H │ │ │ │ -0016d9d0: 5454 5020 3330 3720 636f 6465 2022 5465 TTP 307 code "Te │ │ │ │ -0016d9e0: 6d70 6f72 6172 7920 5265 6469 7265 6374 mporary Redirect │ │ │ │ -0016d9f0: 2220 616e 6420 616e 7920 6f66 2074 6865 " and any of the │ │ │ │ -0016da00: 2072 6564 6972 6563 7420 636f 6465 7320 redirect codes │ │ │ │ -0016da10: 3330 312c 2033 3032 2c20 616e 6420 3330 301, 302, and 30 │ │ │ │ -0016da20: 3320 6172 6520 6e6f 7420 6175 746f 6d61 3 are not automa │ │ │ │ -0016da30: 7465 642e 2043 6c69 656e 7420 6170 706c ted. Client appl │ │ │ │ -0016da40: 6963 6174 696f 6e20 6465 7665 6c6f 7065 ication develope │ │ │ │ -0016da50: 7273 206d 6179 2077 616e 7420 746f 2063 rs may want to c │ │ │ │ -0016da60: 6f6e 7369 6465 7220 6164 6469 6e67 2061 onsider adding a │ │ │ │ -0016da70: 2066 6577 206c 696e 6573 206f 6620 636f few lines of co │ │ │ │ -0016da80: 6465 2074 6f20 7375 7070 6f72 7420 7265 de to support re │ │ │ │ -0016da90: 6469 7265 6374 732e 2049 7420 7761 7320 directs. It was │ │ │ │ -0016daa0: 6465 6369 6465 6420 6e6f 7420 746f 2061 decided not to a │ │ │ │ -0016dab0: 7574 6f6d 6174 6963 616c 6c79 2073 7570 utomatically sup │ │ │ │ -0016dac0: 706f 7274 2072 6564 6972 6563 7473 2066 port redirects f │ │ │ │ -0016dad0: 6f72 2074 6865 2066 6f6c 6c6f 7769 6e67 or the following │ │ │ │ -0016dae0: 2072 6561 736f 6e73 3a3c 2f70 3e0a 3c75 reasons:

    ..
  • Redirecti │ │ │ │ -0016db00: 6e67 2061 2073 6563 7572 6520 4854 5450 ng a secure HTTP │ │ │ │ -0016db10: 5320 6164 6472 6573 7320 746f 2061 206e S address to a n │ │ │ │ -0016db20: 6f6e 2d73 6563 7572 6520 4854 5450 2061 on-secure HTTP a │ │ │ │ -0016db30: 6464 7265 7373 2076 6961 2033 3037 2063 ddress via 307 c │ │ │ │ -0016db40: 7265 6174 6573 2061 2073 6563 7572 6974 reates a securit │ │ │ │ -0016db50: 7920 7675 6c6e 6572 6162 696c 6974 792e y vulnerability. │ │ │ │ -0016db60: 3c2f 6c69 3e0a 3c6c 693e 4379 636c 6963
  • .
  • Cyclic │ │ │ │ -0016db70: 2072 6564 6972 6563 7473 206d 7573 7420 redirects must │ │ │ │ -0016db80: 6265 2064 6574 6563 7465 6420 2865 2e67 be detected (e.g │ │ │ │ -0016db90: 2e20 616c 6c6f 7769 6e67 206f 6e6c 7920 . allowing only │ │ │ │ -0016dba0: 6120 6c69 6d69 7465 6420 6e75 6d62 6572 a limited number │ │ │ │ -0016dbb0: 206f 6620 7265 6469 7265 6374 206c 6576 of redirect lev │ │ │ │ -0016dbc0: 656c 7329 2e3c 2f6c 693e 0a3c 6c69 3e52 els).
  • .
  • R │ │ │ │ -0016dbd0: 6564 6972 6563 7469 6e67 2048 5454 5020 edirecting HTTP │ │ │ │ -0016dbe0: 504f 5354 2077 696c 6c20 7265 7375 6c74 POST will result │ │ │ │ -0016dbf0: 2069 6e20 7265 2d73 6572 6961 6c69 7a61 in re-serializa │ │ │ │ -0016dc00: 7469 6f6e 2061 6e64 2072 652d 706f 7374 tion and re-post │ │ │ │ -0016dc10: 206f 6620 7468 6520 656e 7469 7265 2053 of the entire S │ │ │ │ -0016dc20: 4f41 5020 7265 7175 6573 742e 2054 6865 OAP request. The │ │ │ │ -0016dc30: 2053 4f41 5020 7265 7175 6573 7420 6d65 SOAP request me │ │ │ │ -0016dc40: 7373 6167 6520 6d75 7374 2062 6520 7265 ssage must be re │ │ │ │ -0016dc50: 2d70 6f73 7465 6420 696e 2069 7473 2065 -posted in its e │ │ │ │ -0016dc60: 6e74 6972 6574 7920 7768 656e 2072 652d ntirety when re- │ │ │ │ -0016dc70: 6973 7375 696e 6720 7468 6520 534f 4150 issuing the SOAP │ │ │ │ -0016dc80: 206f 7065 7261 7469 6f6e 2074 6f20 6120 operation to a │ │ │ │ -0016dc90: 6e65 7720 6164 6472 6573 732e 3c2f 6c69 new address.
  • ..

    To im │ │ │ │ -0016dcb0: 706c 656d 656e 7420 636c 6965 6e74 2d73 plement client-s │ │ │ │ -0016dcc0: 6964 6520 3330 3720 7265 6469 7265 6374 ide 307 redirect │ │ │ │ -0016dcd0: 2c20 6164 6420 7468 6520 666f 6c6c 6f77 , add the follow │ │ │ │ -0016dce0: 696e 6720 6c69 6e65 7320 6f66 2063 6f64 ing lines of cod │ │ │ │ -0016dcf0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ -0016dd20: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -0016dd30: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ -0016dd60: 3c2f 7370 616e 3e20 2a65 6e64 706f 696e *endpoin │ │ │ │ -0016dd70: 7420 3d20 4e55 4c4c 3b20 3c73 7061 6e20 t = NULL; │ │ │ │ -0016dd90: 2f2f 2075 7365 2064 6566 6175 6c74 2065 // use default e │ │ │ │ -0016dda0: 6e64 706f 696e 7420 6769 7665 6e20 696e ndpoint given in │ │ │ │ -0016ddb0: 2057 5344 4c20 6f72 2073 7065 6369 6679 WSDL or specify │ │ │ │ -0016ddc0: 206f 6e65 2068 6572 653c 2f73 7061 6e3e one here │ │ │ │ -0016ddd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int re │ │ │ │ -0016de10: 6469 7265 6374 7320 3d20 3130 3b20 2020 directs = 10; │ │ │ │ -0016de20: 2020 2020 2020 203c 7370 616e 2063 6c61 // │ │ │ │ -0016de40: 6d61 7820 7265 6469 7265 6374 2063 6f75 max redirect cou │ │ │ │ -0016de50: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    │ │ │ │ -0016de60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    whi │ │ │ │ -0016de90: 6c65 3c2f 7370 616e 3e20 2872 6564 6972 le (redir │ │ │ │ -0016dea0: 6563 7473 2d2d 2920 3c2f 6469 763e 0a3c ects--)
    .< │ │ │ │ +0016cf10: 3d22 6c69 6e65 223e 2020 3c73 7061 6e20 ="line"> char │ │ │ │ +0016cf40: 2a73 203d 2028 3c73 7061 6e20 636c 6173 *s = ( │ │ │ │ +0016cf60: 6368 6172 3c2f 7370 616e 3e2a 293c 6120 char*)soap_malloc(soap, strlen(tag)+1 │ │ │ │ +0016d010: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    struct Unknown *u = ( │ │ │ │ +0016d060: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct Unknown*)soap_malloc(soap, sizeof< │ │ │ │ +0016d140: 2f73 7061 6e3e 283c 7370 616e 2063 6c61 /span>(str │ │ │ │ +0016d160: 7563 743c 2f73 7061 6e3e 2055 6e6b 6e6f uct Unkno │ │ │ │ +0016d170: 776e 2929 3b20 3c2f 6469 763e 0a3c 6469 wn));
    . │ │ │ │ +0016d190: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if
    (s &&am │ │ │ │ +0016d1c0: 703b 2075 2920 3c2f 6469 763e 0a3c 6469 p; u)
    . │ │ │ │ +0016d1e0: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    s │ │ │ │ +0016d200: 7472 6370 7928 732c 2074 6167 293b 203c trcpy(s, tag); < │ │ │ │ +0016d210: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    u-&g │ │ │ │ +0016d230: 743b 7461 6720 3d20 733b 203c 2f64 6976 t;tag = s;
    .
    u->ne │ │ │ │ +0016d260: 7874 203d 2075 6c69 7374 3b20 3c2f 6469 xt = ulist; .
    ulist = │ │ │ │ +0016d290: 2075 3b20 3c2f 6469 763e 0a3c 6469 7620 u;
    .
    } │ │ │ │ +0016d2b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .
    .< │ │ │ │ +0016d300: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0016d310: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int main()
    │ │ │ │ +0016d330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +0016d360: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0016d370: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soa │ │ │ │ +0016d400: 703c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 p;
    . │ │ │ │ +0016d420: 2020 3c73 7061 6e20 636c 6173 733d 226b struct < │ │ │ │ +0016d440: 2f73 7061 6e3e 556e 6b6e 6f77 6e20 2a75 /span>Unknown *u │ │ │ │ +0016d450: 6c69 7374 203d 204e 554c 4c3b 203c 2f64 list = NULL; .
    soa │ │ │ │ +0016d4d0: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(& │ │ │ │ +0016d4e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +0016d510: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap.fignore │ │ │ │ +0016d5c0: 3d20 6d79 6967 6e6f 7265 3b20 3c2f 6469 = myignore; .
    ... // soap_call_ns │ │ │ │ +0016d610: 5f5f 7765 626d 6574 686f 6428 736f 6170 __webmethod(soap │ │ │ │ +0016d620: 2c20 2e2e 2e29 206f 7220 736f 6170 5f73 , ...) or soap_s │ │ │ │ +0016d630: 6572 7665 2873 6f61 7029 203c 2f73 7061 erve(soap)
    .
    ... │ │ │ │ +0016d660: 203c 7370 616e 2063 6c61 7373 3d22 636f // print │ │ │ │ +0016d680: 7468 6520 6c69 7374 206f 6620 756e 6b6e the list of unkn │ │ │ │ +0016d690: 6f77 6e20 656c 656d 656e 7473 2073 746f own elements sto │ │ │ │ +0016d6a0: 7265 6420 696e 2075 6c69 7374 3c2f 7370 red in ulist
    . │ │ │ │ +0016d770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_e │ │ │ │ +0016d7e0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap);.
    soa │ │ │ │ +0016d890: 705f 646f 6e65 3c2f 613e 2826 616d 703b p_done(& │ │ │ │ +0016d8a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +0016d8d0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }
    .

    .... │ │ │ │ +0016d910: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +0016d920: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +0016d930: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +0016d940: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.How to ha │ │ │ │ +0016d970: 6e64 6c65 2048 5454 5020 3330 3720 7465 ndle HTTP 307 te │ │ │ │ +0016d980: 6d70 6f72 6172 7920 7265 6469 7265 6374 mporary redirect │ │ │ │ +0016d990: 3c2f 6832 3e0a 3c70 3e54 6865 2063 6c69 .

    The cli │ │ │ │ +0016d9a0: 656e 742d 7369 6465 2068 616e 646c 696e ent-side handlin │ │ │ │ +0016d9b0: 6720 6f66 2048 5454 5020 3330 3720 636f g of HTTP 307 co │ │ │ │ +0016d9c0: 6465 2022 5465 6d70 6f72 6172 7920 5265 de "Temporary Re │ │ │ │ +0016d9d0: 6469 7265 6374 2220 616e 6420 616e 7920 direct" and any │ │ │ │ +0016d9e0: 6f66 2074 6865 2072 6564 6972 6563 7420 of the redirect │ │ │ │ +0016d9f0: 636f 6465 7320 3330 312c 2033 3032 2c20 codes 301, 302, │ │ │ │ +0016da00: 616e 6420 3330 3320 6172 6520 6e6f 7420 and 303 are not │ │ │ │ +0016da10: 6175 746f 6d61 7465 642e 2043 6c69 656e automated. Clien │ │ │ │ +0016da20: 7420 6170 706c 6963 6174 696f 6e20 6465 t application de │ │ │ │ +0016da30: 7665 6c6f 7065 7273 206d 6179 2077 616e velopers may wan │ │ │ │ +0016da40: 7420 746f 2063 6f6e 7369 6465 7220 6164 t to consider ad │ │ │ │ +0016da50: 6469 6e67 2061 2066 6577 206c 696e 6573 ding a few lines │ │ │ │ +0016da60: 206f 6620 636f 6465 2074 6f20 7375 7070 of code to supp │ │ │ │ +0016da70: 6f72 7420 7265 6469 7265 6374 732e 2049 ort redirects. I │ │ │ │ +0016da80: 7420 7761 7320 6465 6369 6465 6420 6e6f t was decided no │ │ │ │ +0016da90: 7420 746f 2061 7574 6f6d 6174 6963 616c t to automatical │ │ │ │ +0016daa0: 6c79 2073 7570 706f 7274 2072 6564 6972 ly support redir │ │ │ │ +0016dab0: 6563 7473 2066 6f72 2074 6865 2066 6f6c ects for the fol │ │ │ │ +0016dac0: 6c6f 7769 6e67 2072 6561 736f 6e73 3a3c lowing reasons:< │ │ │ │ +0016dad0: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e52 6564 /p>.

      .
    • Red │ │ │ │ +0016dae0: 6972 6563 7469 6e67 2061 2073 6563 7572 irecting a secur │ │ │ │ +0016daf0: 6520 4854 5450 5320 6164 6472 6573 7320 e HTTPS address │ │ │ │ +0016db00: 746f 2061 206e 6f6e 2d73 6563 7572 6520 to a non-secure │ │ │ │ +0016db10: 4854 5450 2061 6464 7265 7373 2076 6961 HTTP address via │ │ │ │ +0016db20: 2033 3037 2063 7265 6174 6573 2061 2073 307 creates a s │ │ │ │ +0016db30: 6563 7572 6974 7920 7675 6c6e 6572 6162 ecurity vulnerab │ │ │ │ +0016db40: 696c 6974 792e 3c2f 6c69 3e0a 3c6c 693e ility.
    • .
    • │ │ │ │ +0016db50: 4379 636c 6963 2072 6564 6972 6563 7473 Cyclic redirects │ │ │ │ +0016db60: 206d 7573 7420 6265 2064 6574 6563 7465 must be detecte │ │ │ │ +0016db70: 6420 2865 2e67 2e20 616c 6c6f 7769 6e67 d (e.g. allowing │ │ │ │ +0016db80: 206f 6e6c 7920 6120 6c69 6d69 7465 6420 only a limited │ │ │ │ +0016db90: 6e75 6d62 6572 206f 6620 7265 6469 7265 number of redire │ │ │ │ +0016dba0: 6374 206c 6576 656c 7329 2e3c 2f6c 693e ct levels).
    • │ │ │ │ +0016dbb0: 0a3c 6c69 3e52 6564 6972 6563 7469 6e67 .
    • Redirecting │ │ │ │ +0016dbc0: 2048 5454 5020 504f 5354 2077 696c 6c20 HTTP POST will │ │ │ │ +0016dbd0: 7265 7375 6c74 2069 6e20 7265 2d73 6572 result in re-ser │ │ │ │ +0016dbe0: 6961 6c69 7a61 7469 6f6e 2061 6e64 2072 ialization and r │ │ │ │ +0016dbf0: 652d 706f 7374 206f 6620 7468 6520 656e e-post of the en │ │ │ │ +0016dc00: 7469 7265 2053 4f41 5020 7265 7175 6573 tire SOAP reques │ │ │ │ +0016dc10: 742e 2054 6865 2053 4f41 5020 7265 7175 t. The SOAP requ │ │ │ │ +0016dc20: 6573 7420 6d65 7373 6167 6520 6d75 7374 est message must │ │ │ │ +0016dc30: 2062 6520 7265 2d70 6f73 7465 6420 696e be re-posted in │ │ │ │ +0016dc40: 2069 7473 2065 6e74 6972 6574 7920 7768 its entirety wh │ │ │ │ +0016dc50: 656e 2072 652d 6973 7375 696e 6720 7468 en re-issuing th │ │ │ │ +0016dc60: 6520 534f 4150 206f 7065 7261 7469 6f6e e SOAP operation │ │ │ │ +0016dc70: 2074 6f20 6120 6e65 7720 6164 6472 6573 to a new addres │ │ │ │ +0016dc80: 732e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 s.
    • .
    .

    To implement cl │ │ │ │ +0016dca0: 6965 6e74 2d73 6964 6520 3330 3720 7265 ient-side 307 re │ │ │ │ +0016dcb0: 6469 7265 6374 2c20 6164 6420 7468 6520 direct, add the │ │ │ │ +0016dcc0: 666f 6c6c 6f77 696e 6720 6c69 6e65 7320 following lines │ │ │ │ +0016dcd0: 6f66 2063 6f64 653a 3c2f 703e 0a3c 6469 of code:

    .
    const │ │ │ │ +0016dd20: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *e │ │ │ │ +0016dd50: 6e64 706f 696e 7420 3d20 4e55 4c4c 3b20 ndpoint = NULL; │ │ │ │ +0016dd60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // use def │ │ │ │ +0016dd80: 6175 6c74 2065 6e64 706f 696e 7420 6769 ault endpoint gi │ │ │ │ +0016dd90: 7665 6e20 696e 2057 5344 4c20 6f72 2073 ven in WSDL or s │ │ │ │ +0016dda0: 7065 6369 6679 206f 6e65 2068 6572 653c pecify one here< │ │ │ │ +0016ddb0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +0016ddd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0016dde0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int redirects = │ │ │ │ +0016de00: 3130 3b20 2020 2020 2020 2020 203c 7370 10; // max redire │ │ │ │ +0016de30: 6374 2063 6f75 6e74 203c 2f73 7061 6e3e ct count │ │ │ │ +0016de40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    while │ │ │ │ +0016de80: 2872 6564 6972 6563 7473 2d2d 2920 3c2f (redirects--) .
    {
    .< │ │ │ │ 0016deb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016dec0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if │ │ │ │ -0016df00: 2028 736f 6170 5f63 616c 6c5f 6e73 315f (soap_call_ns1_ │ │ │ │ -0016df10: 5f6d 794d 6574 686f 6428 3c61 2063 6c61 _myMethod(soap, endpo │ │ │ │ -0016df50: 696e 742c 202e 2e2e 2929 203c 2f64 6976 int, ...))
    .
    {
    . │ │ │ │ -0016df90: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ -0016dfb0: 3c2f 7370 616e 3e20 2828 3c61 2063 6c61 ((soap->error │ │ │ │ -0016e040: 2026 6774 3b3d 2033 3031 2026 616d 703b >= 301 & │ │ │ │ -0016e050: 2661 6d70 3b20 3c61 2063 6c61 7373 3d22 & soa │ │ │ │ -0016e080: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error < │ │ │ │ -0016e0e0: 3b3d 2033 3033 2920 7c7c 203c 6120 636c ;= 303) || soap->< │ │ │ │ -0016e120: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0016e130: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0016e140: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270 │ │ │ │ -0016e150: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98 │ │ │ │ -0016e160: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2">error == 307)
    │ │ │ │ -0016e180: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .< │ │ │ │ -0016e1a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016e1b0: 3e20 2020 2020 2065 6e64 706f 696e 7420 > endpoint │ │ │ │ -0016e1c0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_strd │ │ │ │ -0016e220: 7570 3c2f 613e 283c 6120 636c 6173 733d up(so │ │ │ │ -0016e250: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, s │ │ │ │ -0016e280: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->endpoint); // end │ │ │ │ -0016e300: 706f 696e 7420 6672 6f6d 2048 5454 5020 point from HTTP │ │ │ │ -0016e310: 3330 312c 2033 3032 2c20 3330 332c 2033 301, 302, 303, 3 │ │ │ │ -0016e320: 3037 204c 6f63 6174 696f 6e20 6865 6164 07 Location head │ │ │ │ -0016e330: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
    │ │ │ │ -0016e340: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .< │ │ │ │ -0016e360: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016e370: 3e20 2020 203c 7370 616e 2063 6c61 7373 > e │ │ │ │ -0016e390: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse
    .
    {
    . │ │ │ │ -0016e3c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // handle erro │ │ │ │ -0016e400: 7220 3c2f 7370 616e 3e3c 2f64 6976 3e0a r
    . │ │ │ │ -0016e410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; │ │ │ │ -0016e450: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } < │ │ │ │ -0016e470: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    } .
    else .
    {
    . │ │ │ │ -0016e4f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -0016e520: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c73 break; // all OK no │ │ │ │ -0016e550: 773c 2f73 7061 6e3e 3c2f 6469 763e 0a3c w
    .< │ │ │ │ -0016e560: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0016e570: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    }.

    . │ │ │ │ -0016e5b0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -0016e5c0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -0016e5d0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .How to imp │ │ │ │ -0016e610: 6c65 6d65 6e74 2048 5454 5020 4745 542c lement HTTP GET, │ │ │ │ -0016e620: 2050 5554 2c20 616e 6420 5041 5443 4820 PUT, and PATCH │ │ │ │ -0016e630: 7365 7276 6963 6573 3c2f 6832 3e0a 3c70 services

    .

    To implement HT │ │ │ │ -0016e650: 5450 2047 4554 2072 6571 7565 7374 2072 TP GET request r │ │ │ │ -0016e660: 6573 706f 6e73 6573 2c20 6465 6669 6e65 esponses, define │ │ │ │ -0016e670: 2074 6865 203c 636f 6465 3e3c 6120 636c the soa │ │ │ │ -0016e740: 703a 3a66 6765 743c 2f61 3e3c 2f63 6f64 p::fget callback func │ │ │ │ -0016e760: 7469 6f6e 2e20 5468 6520 6361 6c6c 6261 tion. The callba │ │ │ │ -0016e770: 636b 2069 7320 7265 7175 6972 6564 2074 ck is required t │ │ │ │ -0016e780: 6f20 7072 6f64 7563 6520 6120 7265 7370 o produce a resp │ │ │ │ -0016e790: 6f6e 7365 2074 6f20 7468 6520 7265 7175 onse to the requ │ │ │ │ -0016e7a0: 6573 7420 696e 2074 6578 7475 616c 2066 est in textual f │ │ │ │ -0016e7b0: 6f72 6d2c 2073 7563 6820 6173 2061 2057 orm, such as a W │ │ │ │ -0016e7c0: 6562 2070 6167 6520 6f72 2061 6e20 584d eb page or an XM │ │ │ │ -0016e7d0: 4c20 6f72 204a 534f 4e20 7265 7370 6f6e L or JSON respon │ │ │ │ -0016e7e0: 7365 2e3c 2f70 3e0a 3c70 3e59 6f75 2063 se.

    .

    You c │ │ │ │ -0016e7f0: 616e 2061 6c73 6f20 7573 6520 7468 6520 an also use the │ │ │ │ -0016e800: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_get< │ │ │ │ -0016e890: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi │ │ │ │ -0016e8a0: 6e20 7768 6963 6820 6573 7365 6e74 6961 n which essentia │ │ │ │ -0016e8b0: 6c6c 7920 7365 7473 2074 6865 203c 636f lly sets the soap::fget< │ │ │ │ -0016e990: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb │ │ │ │ -0016e9a0: 6163 6b20 616e 6420 616c 736f 206b 6565 ack and also kee │ │ │ │ -0016e9b0: 7073 2074 7261 636b 206f 6620 7468 6520 ps track of the │ │ │ │ -0016e9c0: 6e75 6d62 6572 206f 6620 4854 5450 2047 number of HTTP G │ │ │ │ -0016e9d0: 4554 2061 6e64 2050 4f53 5420 7265 7175 ET and POST requ │ │ │ │ -0016e9e0: 6573 7473 206d 6164 6520 6174 2074 6865 ests made at the │ │ │ │ -0016e9f0: 2073 6572 7665 7220 7369 6465 2e3c 2f70 server side.

    .

    The followi │ │ │ │ -0016ea10: 6e67 2065 7861 6d70 6c65 2070 726f 6475 ng example produ │ │ │ │ -0016ea20: 6365 7320 6120 5765 6220 7061 6765 2075 ces a Web page u │ │ │ │ -0016ea30: 706f 6e20 6120 4854 5450 2047 4554 2072 pon a HTTP GET r │ │ │ │ -0016ea40: 6571 7565 7374 2028 652e 672e 2066 726f equest (e.g. fro │ │ │ │ -0016ea50: 6d20 6120 6272 6f77 7365 7229 3a3c 2f70 m a browser):

    .
    int m │ │ │ │ -0016eab0: 6169 6e28 293c 2f64 6976 3e0a 3c64 6976 ain()
    .
    {< │ │ │ │ -0016ead0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -0016eb00: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap *< │ │ │ │ -0016eb40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0016eb50: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0016eb60: 6874 6d6c 223e 736f 6170 3c2f 613e 203d html">soap = │ │ │ │ -0016eb70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_new();
    . │ │ │ │ -0016ebf0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ -0016ec20: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->fget │ │ │ │ -0016ec80: 3c2f 613e 203d 203c 6120 636c 6173 733d = http_get< │ │ │ │ -0016ece0: 2f61 3e3b 203c 2f64 6976 3e0a 3c64 6976 /a>;
    .
    │ │ │ │ -0016ed00: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    so │ │ │ │ -0016ed90: 6170 5f73 6572 7665 3c2f 613e 283c 6120 ap_serve(soap); < │ │ │ │ -0016edd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... // if< │ │ │ │ +0016dee0: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal │ │ │ │ +0016def0: 6c5f 6e73 315f 5f6d 794d 6574 686f 6428 l_ns1__myMethod( │ │ │ │ +0016df00: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +0016df30: 2065 6e64 706f 696e 742c 202e 2e2e 2929 endpoint, ...)) │ │ │ │ +0016df40: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    if (( │ │ │ │ +0016dfa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +0016dfd0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err │ │ │ │ +0016e020: 6f72 3c2f 613e 2026 6774 3b3d 2033 3031 or >= 301 │ │ │ │ +0016e030: 2026 616d 703b 2661 6d70 3b20 3c61 2063 && soap-> │ │ │ │ +0016e070: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error <= 303) || │ │ │ │ +0016e0d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +0016e100: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er │ │ │ │ +0016e150: 726f 723c 2f61 3e20 3d3d 2033 3037 2920 ror == 307) │ │ │ │ +0016e160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    end │ │ │ │ +0016e1a0: 706f 696e 7420 3d20 3c61 2063 6c61 7373 point = soa │ │ │ │ +0016e200: 705f 7374 7264 7570 3c2f 613e 283c 6120 p_strdup(soap, soap-&g │ │ │ │ +0016e270: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;endpo │ │ │ │ +0016e2c0: 696e 743c 2f61 3e29 3b20 3c73 7061 6e20 int); │ │ │ │ +0016e2e0: 2f2f 2065 6e64 706f 696e 7420 6672 6f6d // endpoint from │ │ │ │ +0016e2f0: 2048 5454 5020 3330 312c 2033 3032 2c20 HTTP 301, 302, │ │ │ │ +0016e300: 3330 332c 2033 3037 204c 6f63 6174 696f 303, 307 Locatio │ │ │ │ +0016e310: 6e20 6865 6164 6572 203c 2f73 7061 6e3e n header │ │ │ │ +0016e320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    else │ │ │ │ +0016e380: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {< │ │ │ │ +0016e3a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    .. │ │ │ │ +0016e3c0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // handl │ │ │ │ +0016e3e0: 6520 6572 726f 7220 3c2f 7370 616e 3e3c e error < │ │ │ │ +0016e3f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break;
    . │ │ │ │ +0016e450: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    .
    │ │ │ │ +0016e470: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    else
    .
    {< │ │ │ │ +0016e4d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break; // all │ │ │ │ +0016e530: 204f 4b20 6e6f 773c 2f73 7061 6e3e 3c2f OK now.
    }
    │ │ │ │ +0016e560: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .

    The example bel │ │ │ │ -0016fd60: 6f77 2070 726f 6475 6365 7320 6120 5753 ow produces a WS │ │ │ │ -0016fd70: 444c 2066 696c 6520 7570 6f6e 2061 2048 DL file upon a H │ │ │ │ -0016fd80: 5454 5020 4745 5420 7769 7468 2070 6174 TTP GET with pat │ │ │ │ -0016fd90: 6820 3c63 6f64 653e 3f77 7364 6c3c 2f63 h ?wsdl:

    .
    .< │ │ │ │ +0016ef50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0016ef60: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    ..< │ │ │ │ +0016f0e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0016f0f0: 3e20 2020 7c7c 203c 6120 636c 6173 733d > || soap_send │ │ │ │ +0016f150: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ +0016f180: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , "<HTML │ │ │ │ +0016f1b0: 2667 743b 4d79 2057 6562 2073 6572 7665 >My Web serve │ │ │ │ +0016f1c0: 7220 6973 206f 7065 7261 7469 6f6e 616c r is operational │ │ │ │ +0016f1d0: 2e26 6c74 3b2f 4854 4d4c 2667 743b 2671 .</HTML>&q │ │ │ │ +0016f1e0: 756f 743b 3c2f 7370 616e 3e29 3c2f 6469 uot;).
    || soap_ │ │ │ │ +0016f260: 656e 645f 7365 6e64 3c2f 613e 283c 6120 end_send(soap)).. │ │ │ │ +0016f390: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ +0016f3b0: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap_c │ │ │ │ +0016f410: 6c6f 7365 736f 636b 3c2f 613e 283c 6120 losesock(soap);.
    }
    .< │ │ │ │ +0016f470: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0016f480: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +0016f490: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm │ │ │ │ +0016f4a0: 6c5f 6761 6530 3232 3230 3466 6637 3030 l_gae022204ff700 │ │ │ │ +0016f4b0: 3464 6632 6435 6163 3965 3038 3363 6262 4df2d5ac9e083cbb │ │ │ │ +0016f4c0: 3562 3136 223e 3c64 6976 2063 6c61 7373 5b16"> │ │ │ │ +0016f570: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Callback to i │ │ │ │ +0016f590: 6d70 6c65 6d65 6e74 206c 6f67 6963 2061 mplement logic a │ │ │ │ +0016f5a0: 7420 7468 6520 7365 7276 6572 2d73 6964 t the server-sid │ │ │ │ +0016f5b0: 6520 746f 2073 6572 7665 2072 6573 706f e to serve respo │ │ │ │ +0016f5c0: 6e73 6573 2074 6f20 4854 5450 2047 4554 nses to HTTP GET │ │ │ │ +0016f5d0: 2072 6571 7565 7374 7320 6672 6f6d 2063 requests from c │ │ │ │ +0016f5e0: 6c69 656e 7473 2e3c 2f64 6976 3e3c 6469 lients.
    │ │ │ │ +0016f600: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:43 │ │ │ │ +0016f620: 3330 3c2f 6469 763e 3c2f 6469 763e 0a3c 30
    .< │ │ │ │ +0016f630: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +0016f640: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +0016f650: 705f 5f69 6f5f 6874 6d6c 5f67 6130 3339 p__io_html_ga039 │ │ │ │ +0016f660: 3065 3538 6264 3261 3365 6265 3666 6533 0e58bd2a3ebe6fe3 │ │ │ │ +0016f670: 6134 3664 6530 3533 3461 3631 3422 3e3c a46de0534a614">< │ │ │ │ +0016f680: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +0016f690: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">soap_respo │ │ │ │ +0016f6e0: 6e73 653c 2f61 3e3c 2f64 6976 3e3c 6469 nse
    int soap_respon │ │ │ │ +0016f710: 7365 2873 7472 7563 7420 736f 6170 202a se(struct soap * │ │ │ │ +0016f720: 736f 6170 2c20 696e 7420 7374 6174 7573 soap, int status │ │ │ │ +0016f730: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Initia │ │ │ │ +0016f750: 6c69 7a65 2074 6865 2063 6f6e 7465 7874 lize the context │ │ │ │ +0016f760: 2066 6f72 2073 6572 7665 722d 7369 6465 for server-side │ │ │ │ +0016f770: 2073 656e 6469 6e67 2061 6e64 2073 656e sending and sen │ │ │ │ +0016f780: 6420 6120 4854 5450 2072 6573 706f 6e73 d a HTTP respons │ │ │ │ +0016f790: 6520 6865 6164 6572 2e3c 2f64 6976 3e3c e header.
    < │ │ │ │ +0016f7a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ +0016f850: 705f 636c 6f73 6573 6f63 6b3c 2f61 3e3c p_closesock< │ │ │ │ +0016f860: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soa │ │ │ │ +0016f880: 705f 636c 6f73 6573 6f63 6b28 7374 7275 p_closesock(stru │ │ │ │ +0016f890: 6374 2073 6f61 7020 2a73 6f61 7029 3c2f ct soap *soap)
    Close the │ │ │ │ +0016f8c0: 2073 6f63 6b65 7420 636f 6e6e 6563 7469 socket connecti │ │ │ │ +0016f8d0: 6f6e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a on.
    . │ │ │ │ +0016f8e0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ +0016f930: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 < │ │ │ │ +0016fa30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +0016faf0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    #define SOAP │ │ │ │ +0016fb10: 5f48 544d 4c3c 2f64 6976 3e3c 6469 7620 _HTML
    A │ │ │ │ +0016fb30: 7370 6563 6961 6c20 736f 6170 5f73 7461 special soap_sta │ │ │ │ +0016fb40: 7475 7320 6572 726f 7220 636f 6465 2074 tus error code t │ │ │ │ +0016fb50: 6f20 7369 676e 616c 2074 6861 7420 6120 o signal that a │ │ │ │ +0016fb60: 6375 7374 6f6d 2048 5454 5020 7265 7370 custom HTTP resp │ │ │ │ +0016fb70: 6f6e 7365 2069 7320 7072 6573 656e 7420 onse is present │ │ │ │ +0016fb80: 616e 6420 6e6f 2048 5454 5020 7265 7370 and no HTTP resp │ │ │ │ +0016fb90: 6f6e 732e 2e2e 3c2f 6469 763e 3c64 6976 ons...
    < │ │ │ │ +0016fbb0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:271 │ │ │ │ +0016fbd0: 323c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 2
    .soap_end_se │ │ │ │ +0016fc90: 6e64 3c2f 613e 3c2f 6469 763e 3c64 6976 nd
    │ │ │ │ +0016fcb0: 696e 7420 736f 6170 5f65 6e64 5f73 656e int soap_end_sen │ │ │ │ +0016fcc0: 6428 7374 7275 6374 2073 6f61 7020 2a73 d(struct soap *s │ │ │ │ +0016fcd0: 6f61 7029 3c2f 6469 763e 3c64 6976 2063 oap)
    Fin │ │ │ │ +0016fcf0: 616c 697a 6520 7468 6520 636f 6e74 6578 alize the contex │ │ │ │ +0016fd00: 7420 6166 7465 7220 7365 6e64 696e 672e t after sending. │ │ │ │ +0016fd10: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    The examp │ │ │ │ +0016fd40: 6c65 2062 656c 6f77 2070 726f 6475 6365 le below produce │ │ │ │ +0016fd50: 7320 6120 5753 444c 2066 696c 6520 7570 s a WSDL file up │ │ │ │ +0016fd60: 6f6e 2061 2048 5454 5020 4745 5420 7769 on a HTTP GET wi │ │ │ │ +0016fd70: 7468 2070 6174 6820 3c63 6f64 653e 3f77 th path ?w │ │ │ │ +0016fd80: 7364 6c3c 2f63 6f64 653e 3a3c 2f70 3e0a sdl:

    . │ │ │ │ +0016fd90: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    int htt │ │ │ │ +0016fe30: 705f 6765 743c 2f61 3e28 3c73 7061 6e20 p_get( │ │ │ │ +0016fe50: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +0016fe90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0016fea0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0016feb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html">soap) │ │ │ │ +0016fec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 0016fee0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    F │ │ │ │ -0016ff10: 494c 4520 2a66 6420 3d20 4e55 4c4c 3b3c ILE *fd = NULL;< │ │ │ │ -0016ff20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    char │ │ │ │ -0016ff60: 2a73 203d 2073 7472 6368 7228 3c61 2063 *s = strchr(soap-> │ │ │ │ -0016ffa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 path,  │ │ │ │ -00170010: 393b 3f26 2333 393b 3c2f 7370 616e 3e29 9;?') │ │ │ │ -00170020: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if │ │ │ │ -00170060: 2028 2173 207c 7c20 7374 7263 6d70 2873 (!s || strcmp(s │ │ │ │ -00170070: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -00170090: 756f 743b 3f77 7364 6c26 7175 6f74 3b3c uot;?wsdl"< │ │ │ │ -001700a0: 2f73 7061 6e3e 2929 203c 2f64 6976 3e0a /span>))
    . │ │ │ │ -001700b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -001700e0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_GET_METHO │ │ │ │ -00170150: 443c 2f61 3e3b 203c 2f64 6976 3e0a 3c64 D;
    . │ │ │ │ -00170170: 2020 6664 203d 203c 6120 636c 6173 733d fd = fo │ │ │ │ -001701d0: 7065 6e3c 2f61 3e28 3c73 7061 6e20 636c pen("myserv │ │ │ │ -00170200: 6963 652e 7773 646c 2671 756f 743b 3c2f ice.wsdl", "rb" │ │ │ │ -00170240: 3b3c 2f73 7061 6e3e 293b 203c 7370 616e ;); // open WSDL fi │ │ │ │ -00170270: 6c65 2074 6f20 636f 7079 203c 2f73 7061 le to copy
    .
    if │ │ │ │ -001702c0: 2028 2166 6429 203c 2f64 6976 3e0a 3c64 (!fd)
    . │ │ │ │ -001702e0: 2020 2020 3c73 7061 6e20 636c 6173 733d re │ │ │ │ -00170300: 7475 726e 3c2f 7370 616e 3e20 3430 343b turn 404; │ │ │ │ -00170310: 203c 7370 616e 2063 6c61 7373 3d22 636f // return │ │ │ │ -00170330: 2048 5454 5020 6e6f 7420 666f 756e 6420 HTTP not found │ │ │ │ -00170340: 6572 726f 7220 3c2f 7370 616e 3e3c 2f64 error .
    s │ │ │ │ -00170390: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->http_conten │ │ │ │ -001703f0: 743c 2f61 3e20 3d20 3c73 7061 6e20 636c t = "text/x │ │ │ │ -00170420: 6d6c 2671 756f 743b 3c2f 7370 616e 3e3b ml"; │ │ │ │ -00170430: 203c 7370 616e 2063 6c61 7373 3d22 636f // HTTP h │ │ │ │ -00170450: 6561 6465 7220 7769 7468 2074 6578 742f eader with text/ │ │ │ │ -00170460: 786d 6c20 636f 6e74 656e 7420 3c2f 7370 xml content
    ..< │ │ │ │ -00170610: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00170620: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    │ │ │ │ -00170640: 203c 7370 616e 2063 6c61 7373 3d22 6b65 while │ │ │ │ -00170660: 3c2f 7370 616e 3e20 2831 293c 2f64 6976 (1)
    .
    {
    . │ │ │ │ -00170690: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    size_t │ │ │ │ -001706d0: 7220 3d20 6672 6561 6428 3c61 2063 6c61 r = fread(soap->tmpbuf, 1, size │ │ │ │ -00170780: 6f66 3c2f 7370 616e 3e28 3c61 2063 6c61 of(soap->tmpbuf), fd);
    . │ │ │ │ -00170820: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (!r │ │ │ │ -00170860: 7c7c 203c 6120 636c 6173 733d 2263 6f64 || soap_send_raw │ │ │ │ -001708c0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -001708f0: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , soa │ │ │ │ -00170920: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->tmpbuf, r │ │ │ │ -00170980: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    │ │ │ │ -001709a0: 2020 2020 3c73 7061 6e20 636c 6173 733d br │ │ │ │ -001709c0: 6561 6b3c 2f73 7061 6e3e 3b3c 2f64 6976 eak;
    .
    }
    │ │ │ │ -001709f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ -00170a20: 203c 6120 636c 6173 733d 2263 6f64 6522 fclose(fd);
    .< │ │ │ │ -00170a90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00170aa0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_end_send │ │ │ │ -00170b00: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -00170b30: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . │ │ │ │ -00170b50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ -00170b70: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n soap_cl │ │ │ │ -00170bd0: 6f73 6573 6f63 6b3c 2f61 3e28 3c61 2063 osesock(soap); FILE *fd = │ │ │ │ +0016ff00: 4e55 4c4c 3b3c 2f64 6976 3e0a 3c64 6976 NULL;
    .
    │ │ │ │ +0016ff20: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *s = strch │ │ │ │ +0016ff50: 7228 3c61 2063 6c61 7373 3d22 636f 6465 r(soap->p │ │ │ │ +0016ffd0: 6174 683c 2f61 3e2c 203c 7370 616e 2063 ath, '?');
    .< │ │ │ │ +00170010: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00170020: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00170040: 2f73 7061 6e3e 2028 2173 207c 7c20 7374 /span> (!s || st │ │ │ │ +00170050: 7263 6d70 2873 2c20 3c73 7061 6e20 636c rcmp(s, "?wsdl& │ │ │ │ +00170080: 7175 6f74 3b3c 2f73 7061 6e3e 2929 203c quot;)) < │ │ │ │ +00170090: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_GET │ │ │ │ +00170130: 5f4d 4554 484f 443c 2f61 3e3b 203c 2f64 _METHOD; .
    fd = fopen(" │ │ │ │ +001701e0: 6d79 7365 7276 6963 652e 7773 646c 2671 myservice.wsdl&q │ │ │ │ +001701f0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "r │ │ │ │ +00170220: 6226 7175 6f74 3b3c 2f73 7061 6e3e 293b b"); │ │ │ │ +00170230: 203c 7370 616e 2063 6c61 7373 3d22 636f // open W │ │ │ │ +00170250: 5344 4c20 6669 6c65 2074 6f20 636f 7079 SDL file to copy │ │ │ │ +00170260: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00170270: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00170280: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +001702a0: 2f73 7061 6e3e 2028 2166 6429 203c 2f64 /span> (!fd) .
    return 404; // │ │ │ │ +00170310: 7265 7475 726e 2048 5454 5020 6e6f 7420 return HTTP not │ │ │ │ +00170320: 666f 756e 6420 6572 726f 7220 3c2f 7370 found error
    .
    soap-&g │ │ │ │ +00170380: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;http_ │ │ │ │ +001703d0: 636f 6e74 656e 743c 2f61 3e20 3d20 3c73 content = " │ │ │ │ +00170400: 7465 7874 2f78 6d6c 2671 756f 743b 3c2f text/xml"; // │ │ │ │ +00170430: 4854 5450 2068 6561 6465 7220 7769 7468 HTTP header with │ │ │ │ +00170440: 2074 6578 742f 786d 6c20 636f 6e74 656e text/xml conten │ │ │ │ +00170450: 7420 3c2f 7370 616e 3e3c 2f64 6976 3e0a t
    . │ │ │ │ +00170460: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if │ │ │ │ +00170490: 3c2f 7370 616e 3e20 283c 6120 636c 6173 (soap_re │ │ │ │ +001704f0: 7370 6f6e 7365 3c2f 613e 283c 6120 636c sponse(soap, SOAP │ │ │ │ +00170580: 5f46 494c 453c 2f61 3e29 203d 3d20 3c61 _FILE) == SOAP_OK).
    {
    │ │ │ │ +00170610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    while (1 │ │ │ │ +00170650: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {< │ │ │ │ +00170670: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t r = fread( │ │ │ │ +001706c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +001706f0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tmp │ │ │ │ +00170740: 6275 663c 2f61 3e2c 2031 2c20 3c73 7061 buf, 1, sizeof( │ │ │ │ +00170770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +001707a0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >tmp │ │ │ │ +001707f0: 6275 663c 2f61 3e29 2c20 6664 293b 203c buf), fd); < │ │ │ │ +00170800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ │ +00170970: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break │ │ │ │ +001709b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    } │ │ │ │ +001709d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    fc │ │ │ │ +00170a60: 6c6f 7365 3c2f 613e 2866 6429 3b20 3c2f lose(fd); .
    soap_en │ │ │ │ +00170ae0: 645f 7365 6e64 3c2f 613e 283c 6120 636c d_send(soap);.
    return < │ │ │ │ +00170b60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00170b70: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00170b80: 705f 5f69 6f2e 6874 6d6c 2367 6130 3664 p__io.html#ga06d │ │ │ │ +00170b90: 3539 3039 3461 6661 3364 6636 6231 6239 59094afa3df6b1b9 │ │ │ │ +00170ba0: 6636 6232 6262 3438 3432 3037 6322 3e73 f6b2bb484207c">s │ │ │ │ +00170bb0: 6f61 705f 636c 6f73 6573 6f63 6b3c 2f61 oap_closesock(soap);
    .
    }.
    }
    .
    SOA │ │ │ │ -00170ce0: 505f 4745 545f 4d45 5448 4f44 3c2f 613e P_GET_METHOD │ │ │ │ -00170cf0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    #defin │ │ │ │ -00170d10: 6520 534f 4150 5f47 4554 5f4d 4554 484f e SOAP_GET_METHO │ │ │ │ -00170d20: 443c 2f64 6976 3e3c 6469 7620 636c 6173 D
    A soap │ │ │ │ -00170d40: 5f73 7461 7475 7320 6572 726f 7220 636f _status error co │ │ │ │ -00170d50: 6465 3a20 616e 2048 5454 5020 4745 5420 de: an HTTP GET │ │ │ │ -00170d60: 7265 7175 6573 7420 7761 7320 7265 6365 request was rece │ │ │ │ -00170d70: 6976 6564 2062 7920 7468 6520 7365 7276 ived by the serv │ │ │ │ -00170d80: 6963 6520 6275 7420 7468 6520 4745 5420 ice but the GET │ │ │ │ -00170d90: 7265 7175 6573 7420 6361 6c6c 6261 632e request callbac. │ │ │ │ -00170da0: 2e2e 3c2f 6469 763e 3c64 6976 2063 6c61 ..
    De │ │ │ │ -00170dc0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ -00170dd0: 6473 6f61 7032 2e68 3a32 3339 373c 2f64 dsoap2.h:2397
    .
    SOAP_FILE
    #define │ │ │ │ -00170ec0: 534f 4150 5f46 494c 453c 2f64 6976 3e3c SOAP_FILE
    < │ │ │ │ -00170ed0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -00170ee0: 223e 4120 7370 6563 6961 6c20 736f 6170 ">A special soap │ │ │ │ -00170ef0: 5f73 7461 7475 7320 6572 726f 7220 636f _status error co │ │ │ │ -00170f00: 6465 2074 6f20 7369 676e 616c 2074 6861 de to signal tha │ │ │ │ -00170f10: 7420 6120 6375 7374 6f6d 2066 696c 652d t a custom file- │ │ │ │ -00170f20: 6261 7365 6420 4854 5450 2072 6573 706f based HTTP respo │ │ │ │ -00170f30: 6e73 6520 6973 2070 7265 7365 6e74 2061 nse is present a │ │ │ │ -00170f40: 6e64 206e 6f20 482e 2e2e 3c2f 6469 763e nd no H...
    │ │ │ │ -00170f50: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -00170f70: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -00170f80: 3a32 3731 393c 2f64 6976 3e3c 2f64 6976 :2719
    .
    │ │ │ │ -00171050: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_sen │ │ │ │ -00171070: 645f 7261 7728 7374 7275 6374 2073 6f61 d_raw(struct soa │ │ │ │ -00171080: 7020 2a73 6f61 702c 2063 6f6e 7374 2063 p *soap, const c │ │ │ │ -00171090: 6861 7220 2a73 2c20 7369 7a65 5f74 206e har *s, size_t n │ │ │ │ -001710a0: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Send r │ │ │ │ -001710c0: 6177 2062 7974 6573 2e3c 2f64 6976 3e3c aw bytes.
    < │ │ │ │ -001710d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -00171120: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -00171130: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ -00171170: 6f61 703a 3a74 6d70 6275 663c 2f61 3e3c oap::tmpbuf< │ │ │ │ -00171180: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    char tm │ │ │ │ -001711a0: 7062 7566 5b53 4f41 505f 544d 504c 454e pbuf[SOAP_TMPLEN │ │ │ │ -001711b0: 5d3c 2f64 6976 3e3c 6469 7620 636c 6173 ]
    Intern │ │ │ │ -001711d0: 616c 2062 7566 6665 7220 746f 2068 6f6c al buffer to hol │ │ │ │ -001711e0: 6420 7465 6d70 6f72 6172 7920 7374 7269 d temporary stri │ │ │ │ -001711f0: 6e67 7320 7375 6368 2061 7320 7374 7269 ngs such as stri │ │ │ │ -00171200: 6e67 2072 6570 7265 7365 6e74 6174 696f ng representatio │ │ │ │ -00171210: 6e73 206f 6620 7072 696d 6974 6976 6520 ns of primitive │ │ │ │ -00171220: 7661 6c75 6573 2c2e 2e2e 3c2f 6469 763e values,...
    │ │ │ │ -00171230: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -00171250: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -00171260: 3a34 3139 393c 2f64 6976 3e3c 2f64 6976 :4199
    .
    < │ │ │ │ -001712d0: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ -001712e0: 6170 2e68 746d 6c23 6165 3565 3938 3733 ap.html#ae5e9873 │ │ │ │ -001712f0: 3361 3433 3439 6235 6531 3436 3661 3965 3a4349b5e1466a9e │ │ │ │ -00171300: 3063 6363 3232 6331 3122 3e73 6f61 703a 0ccc22c11">soap: │ │ │ │ -00171310: 3a68 7474 705f 636f 6e74 656e 743c 2f61 :http_content
    const │ │ │ │ -00171340: 2063 6861 7220 2a20 6874 7470 5f63 6f6e char * http_con │ │ │ │ -00171350: 7465 6e74 3c2f 6469 763e 3c64 6976 2063 tent
    Str │ │ │ │ -00171370: 696e 6720 7769 7468 2048 5454 5020 636f ing with HTTP co │ │ │ │ -00171380: 6e74 656e 7420 7479 7065 2068 6561 6465 ntent type heade │ │ │ │ -00171390: 7220 7661 6c75 6520 7265 6365 6976 6564 r value received │ │ │ │ -001713a0: 2c20 6361 6e20 616c 736f 2062 6520 6173 , can also be as │ │ │ │ -001713b0: 7369 676e 6564 2074 6f20 7370 6563 6966 signed to specif │ │ │ │ -001713c0: 7920 6120 636f 6e74 656e 7420 7479 7065 y a content type │ │ │ │ -001713d0: 2068 2e2e 2e3c 2f64 6976 3e3c 6469 7620 h...
    Definition: │ │ │ │ -00171400: 2073 7464 736f 6170 322e 683a 3239 3830 stdsoap2.h:2980 │ │ │ │ -00171410: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This exam │ │ │ │ -00171440: 706c 6520 7368 6f77 7320 686f 7720 6f6e ple shows how on │ │ │ │ -00171450: 6520 7072 6564 6574 6572 6d69 6e65 6420 e predetermined │ │ │ │ -00171460: 6669 6c65 2069 7320 7365 7276 6564 2e20 file is served. │ │ │ │ -00171470: 5468 6520 3c65 6d3e 3c63 6f64 653e 6773 The gs │ │ │ │ -00171480: 6f61 702f 7361 6d70 6c65 732f 7765 6273 oap/samples/webs │ │ │ │ -00171490: 6572 7665 723c 2f63 6f64 653e 3c2f 656d erver demonstrates h │ │ │ │ -001714b0: 6f77 2066 696c 6573 2073 686f 756c 6420 ow files should │ │ │ │ -001714c0: 6265 2073 6572 7665 6420 696e 2067 656e be served in gen │ │ │ │ -001714d0: 6572 616c 2c20 6279 2061 6464 696e 6720 eral, by adding │ │ │ │ -001714e0: 7468 6520 6e65 6365 7373 6172 7920 6c6f the necessary lo │ │ │ │ -001714f0: 6769 6320 746f 2061 6464 206d 6564 6961 gic to add media │ │ │ │ -00171500: 2074 7970 6573 2074 6f20 4854 5450 2068 types to HTTP h │ │ │ │ -00171510: 6561 6465 7273 2061 6e64 2074 6f20 7265 eaders and to re │ │ │ │ -00171520: 7374 7269 6374 2074 6865 2073 656c 6563 strict the selec │ │ │ │ -00171530: 7469 6f6e 206f 6620 6669 6c65 7320 7468 tion of files th │ │ │ │ -00171540: 6174 2073 686f 756c 6420 6265 2073 6572 at should be ser │ │ │ │ -00171550: 7665 642e 3c2f 703e 0a3c 646c 2063 6c61 ved.

    .
    Warning │ │ │ │ -00171580: 3c2f 6474 3e3c 6464 3e57 6865 6e20 7365
    When se │ │ │ │ -00171590: 7276 696e 6720 6669 6c65 7320 6173 2072 rving files as r │ │ │ │ -001715a0: 6573 706f 6e73 6573 2074 6f20 7265 7175 esponses to requ │ │ │ │ -001715b0: 6573 7473 2c20 7765 206e 6565 6420 746f ests, we need to │ │ │ │ -001715c0: 2062 6520 7661 7279 2063 6172 6566 756c be vary careful │ │ │ │ -001715d0: 2c20 6265 6361 7573 6520 7765 2064 6f6e , because we don │ │ │ │ -001715e0: 2774 2077 616e 7420 7265 7175 6573 7473 't want requests │ │ │ │ -001715f0: 2074 6f20 736e 6f6f 7020 6172 6f75 6e64 to snoop around │ │ │ │ -00171600: 2069 6e20 6469 7265 6374 6f72 6965 7320 in directories │ │ │ │ -00171610: 616e 6420 7365 7276 6520 6669 6c65 7320 and serve files │ │ │ │ -00171620: 7468 6174 2073 686f 756c 6420 6265 2070 that should be p │ │ │ │ -00171630: 726f 7465 6374 6564 2066 726f 6d20 7075 rotected from pu │ │ │ │ -00171640: 626c 6963 2076 6965 772e 2054 6865 7265 blic view. There │ │ │ │ -00171650: 666f 7265 2c20 7768 656e 2061 6464 696e fore, when addin │ │ │ │ -00171660: 6720 6c6f 6769 6320 746f 2073 6572 7665 g logic to serve │ │ │ │ -00171670: 2066 696c 6573 2c20 7765 206d 7573 7420 files, we must │ │ │ │ -00171680: 7265 6a65 6374 2072 6571 7565 7374 2074 reject request t │ │ │ │ -00171690: 6861 7420 6861 7665 203c 636f 6465 3e3c hat have < │ │ │ │ -001716a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001716b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -001716c0: 6d6c 2361 3363 3262 6432 3832 3231 3436 ml#a3c2bd2822146 │ │ │ │ -001716d0: 6138 6363 6361 3230 6638 6632 3137 6332 a8ccca20f8f217c2 │ │ │ │ -001716e0: 6633 3039 2220 7469 746c 653d 2254 6865 f309" title="The │ │ │ │ -001716f0: 2063 6c69 656e 7420 7265 7175 6573 7420 client request │ │ │ │ -00171700: 7061 7468 2061 7320 7265 6365 6976 6564 path as received │ │ │ │ -00171710: 206f 6e20 7468 6520 7365 7276 6572 2073 on the server s │ │ │ │ -00171720: 6964 652e 223e 736f 6170 3a3a 7061 7468 ide.">soap::path │ │ │ │ -00171730: 3c2f 613e 3c2f 636f 6465 3e20 7661 6c75 valu │ │ │ │ -00171740: 6573 2077 6974 6820 6120 3c63 6f64 653e es with a │ │ │ │ -00171750: 2f3c 2f63 6f64 653e 206f 7220 6120 3c63 / or a \ (soap: │ │ │ │ -00171800: 3a70 6174 683c 2f61 3e3c 2f63 6f64 653e :path │ │ │ │ -00171810: 2069 7320 6120 7374 7269 6e67 2077 6974 is a string wit │ │ │ │ -00171820: 6820 7468 6520 7061 7468 2070 6172 7420 h the path part │ │ │ │ -00171830: 6f66 2074 6865 2055 524c 2c20 7374 6172 of the URL, star │ │ │ │ -00171840: 7469 6e67 2077 6974 6820 6120 3c63 6f64 ting with a /). If │ │ │ │ -00171860: 7468 6573 6520 6172 6520 616c 6c6f 7765 these are allowe │ │ │ │ -00171870: 642c 2074 6865 6e20 7765 206d 7573 7420 d, then we must │ │ │ │ -00171880: 6174 206c 6561 7374 2063 6865 636b 2066 at least check f │ │ │ │ -00171890: 6f72 203c 636f 6465 3e2e 2e3c 2f63 6f64 or .. in the path t │ │ │ │ -001718b0: 6f20 6176 6f69 6420 7265 7175 6573 7420 o avoid request │ │ │ │ -001718c0: 6672 6f6d 2073 6e6f 6f70 696e 6720 6172 from snooping ar │ │ │ │ -001718d0: 6f75 6e64 2069 6e20 6869 6768 6572 2064 ound in higher d │ │ │ │ -001718e0: 6972 6563 746f 7269 6573 2061 6c6c 2074 irectories all t │ │ │ │ -001718f0: 6865 2077 6179 2075 7020 746f 2074 6865 he way up to the │ │ │ │ -00171900: 2072 6f6f 742e 3c2f 6464 3e3c 2f64 6c3e root.
    │ │ │ │ -00171910: 0a3c 703e 466f 7220 6120 6f6e 652d 7761 .

    For a one-wa │ │ │ │ -00171920: 7920 534f 4150 2f58 4d4c 206d 6573 7361 y SOAP/XML messa │ │ │ │ -00171930: 6765 2c20 796f 7520 6361 6e20 616c 736f ge, you can also │ │ │ │ -00171940: 2072 6574 7572 6e20 6120 534f 4150 2f58 return a SOAP/X │ │ │ │ -00171950: 4d4c 2072 6573 706f 6e73 653a 3c2f 703e ML response:

    │ │ │ │ -00171960: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int ht │ │ │ │ -00171a00: 7470 5f67 6574 3c2f 613e 283c 7370 616e tp_get(struct < │ │ │ │ -00171a30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00171a40: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00171a50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ -00171a60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -00171a90: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    ..
    │ │ │ │ -00171bf0: 7265 7475 726e 3c2f 7370 616e 3e20 736f return so │ │ │ │ -00171c00: 6170 5f73 656e 645f 6e73 315f 5f6d 7953 ap_send_ns1__myS │ │ │ │ -00171c10: 656e 644d 6574 686f 6452 6573 706f 6e73 endMethodRespons │ │ │ │ -00171c20: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap, & │ │ │ │ -00171c70: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;", NULL, ... pa │ │ │ │ -00171c90: 7261 6d73 202e 2e2e 293b 203c 2f64 6976 rams ...);
    .
    }
    .

    where ns1__mySendMe │ │ │ │ -00171cf0: 7468 6f64 5265 7370 6f6e 7365 3c2f 636f thodResponse is a one-way │ │ │ │ -00171d10: 206d 6573 7361 6765 2064 6563 6c61 7265 message declare │ │ │ │ -00171d20: 6420 696e 2061 2069 6e74 6572 6661 6365 d in a interface │ │ │ │ -00171d30: 2068 6561 6465 7220 6669 6c65 2061 733a header file as: │ │ │ │ -00171d40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int ns1__mySendMet │ │ │ │ -00171da0: 686f 6452 6573 706f 6e73 6528 2e2e 2e20 hodResponse(... │ │ │ │ -00171db0: 7061 7261 6d73 202e 2e2e 2c20 3c73 7061 params ..., void);
    .
    │ │ │ │ -00171df0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d < │ │ │ │ -001727a0: 703e 7768 6572 652c 2066 6f72 2065 7861 p>where, for exa │ │ │ │ -001727b0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    │ │ │ │ -001727d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    void │ │ │ │ -00172800: 3c2f 7370 616e 3e20 7369 6770 6970 655f sigpipe_ │ │ │ │ -00172810: 6861 6e64 6c65 283c 7370 616e 2063 6c61 handle(int x) { │ │ │ │ -00172840: 207d 3c2f 6469 763e 0a3c 2f64 6976 3e3c }
    .
    < │ │ │ │ -00172850: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -00172860: 3c70 3e41 6c74 6572 6e61 7469 7665 6c79

    Alternatively │ │ │ │ -00172870: 2c20 6272 6f6b 656e 2070 6970 6573 2063 , broken pipes c │ │ │ │ -00172880: 616e 2062 6520 6b65 7074 2073 696c 656e an be kept silen │ │ │ │ -00172890: 7420 6279 2073 6574 7469 6e67 3a3c 2f70 t by setting:

    .
    .
    < │ │ │ │ -00172a20: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00172a30: 6922 3e69 6e74 2073 6f63 6b65 745f 666c i">int socket_fl │ │ │ │ -00172a40: 6167 733c 2f64 6976 3e3c 6469 7620 636c ags
    User │ │ │ │ -00172a60: 2d64 6566 696e 6162 6c65 2073 6f63 6b65 -definable socke │ │ │ │ -00172a70: 7420 7365 6e64 2061 6e64 2072 6563 7620 t send and recv │ │ │ │ -00172a80: 666c 6167 732c 2066 6f72 2065 7861 6d70 flags, for examp │ │ │ │ -00172a90: 6c65 2061 7373 6967 6e20 4d53 475f 4e4f le assign MSG_NO │ │ │ │ -00172aa0: 5349 474e 414c 2074 6f20 6469 7361 626c SIGNAL to disabl │ │ │ │ -00172ab0: 6520 7369 6770 6970 6520 2874 6865 2076 e sigpipe (the v │ │ │ │ -00172ac0: 612e 2e2e 3c2f 6469 763e 3c64 6976 2063 a...
    │ │ │ │ -00172ae0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00172af0: 7374 6473 6f61 7032 2e68 3a33 3335 393c stdsoap2.h:3359< │ │ │ │ -00172b00: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    This setti │ │ │ │ -00172b30: 6e67 2077 696c 6c20 6e6f 7420 6765 6e65 ng will not gene │ │ │ │ -00172b40: 7261 7465 2061 2053 4947 5049 5045 2062 rate a SIGPIPE b │ │ │ │ -00172b50: 7574 2072 6561 642f 7772 6974 6520 6f70 ut read/write op │ │ │ │ -00172b60: 6572 6174 696f 6e73 2072 6574 7572 6e20 erations return │ │ │ │ -00172b70: 3c63 6f64 653e 2353 4f41 505f 454f 463c #SOAP_EOF< │ │ │ │ -00172b80: 2f63 6f64 653e 2069 6e73 7465 6164 2e20 /code> instead. │ │ │ │ -00172b90: 4e6f 7465 2074 6861 7420 5769 6e64 6f77 Note that Window │ │ │ │ -00172ba0: 7320 646f 6573 206e 6f74 2073 7570 706f s does not suppo │ │ │ │ -00172bb0: 7274 2073 6967 6e61 6c73 2061 6e64 206c rt signals and l │ │ │ │ -00172bc0: 6163 6b20 7468 6520 3c63 6f64 653e 4d53 ack the MS │ │ │ │ -00172bd0: 475f 4e4f 5349 474e 414c 3c2f 636f 6465 G_NOSIGNAL flag.

    .

    I │ │ │ │ -00172bf0: 6620 7468 6520 636c 6965 6e74 2064 6f65 f the client doe │ │ │ │ -00172c00: 7320 6e6f 7420 636c 6f73 6520 7468 6520 s not close the │ │ │ │ -00172c10: 636f 6e6e 6563 7469 6f6e 2c20 7468 6520 connection, the │ │ │ │ -00172c20: 7365 7276 6572 2077 696c 6c20 7761 6974 server will wait │ │ │ │ -00172c30: 2066 6f72 6576 6572 2077 6865 6e20 6e6f forever when no │ │ │ │ -00172c40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim │ │ │ │ -00172d00: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout │ │ │ │ -00172d10: 6973 2073 7065 6369 6669 6564 2c20 736f is specified, so │ │ │ │ -00172d20: 2062 6520 6361 7265 6675 6c20 746f 2073 be careful to s │ │ │ │ -00172d30: 6574 2074 696d 656f 7574 732c 2053 6565 et timeouts, See │ │ │ │ -00172d40: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Timeout managem │ │ │ │ -00172d80: 656e 7420 666f 7220 6e6f 6e2d 626c 6f63 ent for non-bloc │ │ │ │ -00172d90: 6b69 6e67 206f 7065 7261 7469 6f6e 733c king operations< │ │ │ │ -00172da0: 2f61 3e2e 2049 6e20 6164 6469 7469 6f6e /a>. In addition │ │ │ │ -00172db0: 2c20 6f74 6865 7220 636c 6965 6e74 7320 , other clients │ │ │ │ -00172dc0: 7769 6c6c 2062 6520 6465 6e69 6564 2073 will be denied s │ │ │ │ -00172dd0: 6572 7669 6365 2061 7320 6c6f 6e67 2061 ervice as long a │ │ │ │ -00172de0: 7320 6120 636c 6965 6e74 206b 6565 7073 s a client keeps │ │ │ │ -00172df0: 2074 6865 2063 6f6e 6e65 6374 696f 6e20 the connection │ │ │ │ -00172e00: 746f 2074 6865 2073 6572 7665 7220 6f70 to the server op │ │ │ │ -00172e10: 656e 2e20 546f 2070 7265 7665 6e74 2074 en. To prevent t │ │ │ │ -00172e20: 6869 7320 6672 6f6d 2068 6170 7065 6e69 his from happeni │ │ │ │ -00172e30: 6e67 2c20 7468 6520 7365 7276 6963 6520 ng, the service │ │ │ │ -00172e40: 7368 6f75 6c64 2062 6520 6d75 6c74 692d should be multi- │ │ │ │ -00172e50: 7468 7265 6164 6564 2073 7563 6820 7468 threaded such th │ │ │ │ -00172e60: 6174 2065 6163 6820 7468 7265 6164 2068 at each thread h │ │ │ │ -00172e70: 616e 646c 6573 2074 6865 2063 6c69 656e andles the clien │ │ │ │ -00172e80: 7420 636f 6e6e 6563 7469 6f6e 3a3c 2f70 t connection:

    .
    int m │ │ │ │ -00172ee0: 6169 6e28 3c73 7061 6e20 636c 6173 733d ain(in │ │ │ │ -00172f00: 743c 2f73 7061 6e3e 2061 7267 632c 203c t argc, < │ │ │ │ -00172f10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00172f20: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char **argv)
    │ │ │ │ +00170cf0: 2364 6566 696e 6520 534f 4150 5f47 4554 #define SOAP_GET │ │ │ │ +00170d00: 5f4d 4554 484f 443c 2f64 6976 3e3c 6469 _METHOD
    │ │ │ │ +00170d20: 4120 736f 6170 5f73 7461 7475 7320 6572 A soap_status er │ │ │ │ +00170d30: 726f 7220 636f 6465 3a20 616e 2048 5454 ror code: an HTT │ │ │ │ +00170d40: 5020 4745 5420 7265 7175 6573 7420 7761 P GET request wa │ │ │ │ +00170d50: 7320 7265 6365 6976 6564 2062 7920 7468 s received by th │ │ │ │ +00170d60: 6520 7365 7276 6963 6520 6275 7420 7468 e service but th │ │ │ │ +00170d70: 6520 4745 5420 7265 7175 6573 7420 6361 e GET request ca │ │ │ │ +00170d80: 6c6c 6261 632e 2e2e 3c2f 6469 763e 3c64 llbac...
    Definition:< │ │ │ │ +00170db0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a32 /b> stdsoap2.h:2 │ │ │ │ +00170dc0: 3339 373c 2f64 6976 3e3c 2f64 6976 3e0a 397
    . │ │ │ │ +00170dd0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ +00170e20: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    #d │ │ │ │ +00170ea0: 6566 696e 6520 534f 4150 5f46 494c 453c efine SOAP_FILE< │ │ │ │ +00170eb0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    A specia │ │ │ │ +00170ed0: 6c20 736f 6170 5f73 7461 7475 7320 6572 l soap_status er │ │ │ │ +00170ee0: 726f 7220 636f 6465 2074 6f20 7369 676e ror code to sign │ │ │ │ +00170ef0: 616c 2074 6861 7420 6120 6375 7374 6f6d al that a custom │ │ │ │ +00170f00: 2066 696c 652d 6261 7365 6420 4854 5450 file-based HTTP │ │ │ │ +00170f10: 2072 6573 706f 6e73 6520 6973 2070 7265 response is pre │ │ │ │ +00170f20: 7365 6e74 2061 6e64 206e 6f20 482e 2e2e sent and no H... │ │ │ │ +00170f30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +00170f50: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +00170f60: 6f61 7032 2e68 3a32 3731 393c 2f64 6976 oap2.h:2719
    .
    s │ │ │ │ +00171020: 6f61 705f 7365 6e64 5f72 6177 3c2f 613e oap_send_raw │ │ │ │ +00171030: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so │ │ │ │ +00171050: 6170 5f73 656e 645f 7261 7728 7374 7275 ap_send_raw(stru │ │ │ │ +00171060: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c │ │ │ │ +00171070: 6f6e 7374 2063 6861 7220 2a73 2c20 7369 onst char *s, si │ │ │ │ +00171080: 7a65 5f74 206e 293c 2f64 6976 3e3c 6469 ze_t n)
    │ │ │ │ +001710a0: 5365 6e64 2072 6177 2062 7974 6573 2e3c Send raw bytes.< │ │ │ │ +001710b0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    c │ │ │ │ +00171180: 6861 7220 746d 7062 7566 5b53 4f41 505f har tmpbuf[SOAP_ │ │ │ │ +00171190: 544d 504c 454e 5d3c 2f64 6976 3e3c 6469 TMPLEN]
    │ │ │ │ +001711b0: 496e 7465 726e 616c 2062 7566 6665 7220 Internal buffer │ │ │ │ +001711c0: 746f 2068 6f6c 6420 7465 6d70 6f72 6172 to hold temporar │ │ │ │ +001711d0: 7920 7374 7269 6e67 7320 7375 6368 2061 y strings such a │ │ │ │ +001711e0: 7320 7374 7269 6e67 2072 6570 7265 7365 s string represe │ │ │ │ +001711f0: 6e74 6174 696f 6e73 206f 6620 7072 696d ntations of prim │ │ │ │ +00171200: 6974 6976 6520 7661 6c75 6573 2c2e 2e2e itive values,... │ │ │ │ +00171210: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +00171230: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +00171240: 6f61 7032 2e68 3a34 3139 393c 2f64 6976 oap2.h:4199
    .
    const char * ht │ │ │ │ +00171330: 7470 5f63 6f6e 7465 6e74 3c2f 6469 763e tp_content
    │ │ │ │ +00171340: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    String with H │ │ │ │ +00171360: 5454 5020 636f 6e74 656e 7420 7479 7065 TTP content type │ │ │ │ +00171370: 2068 6561 6465 7220 7661 6c75 6520 7265 header value re │ │ │ │ +00171380: 6365 6976 6564 2c20 6361 6e20 616c 736f ceived, can also │ │ │ │ +00171390: 2062 6520 6173 7369 676e 6564 2074 6f20 be assigned to │ │ │ │ +001713a0: 7370 6563 6966 7920 6120 636f 6e74 656e specify a conten │ │ │ │ +001713b0: 7420 7479 7065 2068 2e2e 2e3c 2f64 6976 t type h...
    Definitio │ │ │ │ +001713e0: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +001713f0: 683a 3239 3830 3c2f 6469 763e 3c2f 6469 h:2980
    .

    Thi │ │ │ │ +00171420: 7320 6578 616d 706c 6520 7368 6f77 7320 s example shows │ │ │ │ +00171430: 686f 7720 6f6e 6520 7072 6564 6574 6572 how one predeter │ │ │ │ +00171440: 6d69 6e65 6420 6669 6c65 2069 7320 7365 mined file is se │ │ │ │ +00171450: 7276 6564 2e20 5468 6520 3c65 6d3e 3c63 rved. The gsoap/sample │ │ │ │ +00171470: 732f 7765 6273 6572 7665 723c 2f63 6f64 s/webserver demonstr │ │ │ │ +00171490: 6174 6573 2068 6f77 2066 696c 6573 2073 ates how files s │ │ │ │ +001714a0: 686f 756c 6420 6265 2073 6572 7665 6420 hould be served │ │ │ │ +001714b0: 696e 2067 656e 6572 616c 2c20 6279 2061 in general, by a │ │ │ │ +001714c0: 6464 696e 6720 7468 6520 6e65 6365 7373 dding the necess │ │ │ │ +001714d0: 6172 7920 6c6f 6769 6320 746f 2061 6464 ary logic to add │ │ │ │ +001714e0: 206d 6564 6961 2074 7970 6573 2074 6f20 media types to │ │ │ │ +001714f0: 4854 5450 2068 6561 6465 7273 2061 6e64 HTTP headers and │ │ │ │ +00171500: 2074 6f20 7265 7374 7269 6374 2074 6865 to restrict the │ │ │ │ +00171510: 2073 656c 6563 7469 6f6e 206f 6620 6669 selection of fi │ │ │ │ +00171520: 6c65 7320 7468 6174 2073 686f 756c 6420 les that should │ │ │ │ +00171530: 6265 2073 6572 7665 642e 3c2f 703e 0a3c be served.

    .< │ │ │ │ +00171540: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class="sectio │ │ │ │ +00171550: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning">
    W │ │ │ │ +00171560: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e57 arning
    W │ │ │ │ +00171570: 6865 6e20 7365 7276 696e 6720 6669 6c65 hen serving file │ │ │ │ +00171580: 7320 6173 2072 6573 706f 6e73 6573 2074 s as responses t │ │ │ │ +00171590: 6f20 7265 7175 6573 7473 2c20 7765 206e o requests, we n │ │ │ │ +001715a0: 6565 6420 746f 2062 6520 7661 7279 2063 eed to be vary c │ │ │ │ +001715b0: 6172 6566 756c 2c20 6265 6361 7573 6520 areful, because │ │ │ │ +001715c0: 7765 2064 6f6e 2774 2077 616e 7420 7265 we don't want re │ │ │ │ +001715d0: 7175 6573 7473 2074 6f20 736e 6f6f 7020 quests to snoop │ │ │ │ +001715e0: 6172 6f75 6e64 2069 6e20 6469 7265 6374 around in direct │ │ │ │ +001715f0: 6f72 6965 7320 616e 6420 7365 7276 6520 ories and serve │ │ │ │ +00171600: 6669 6c65 7320 7468 6174 2073 686f 756c files that shoul │ │ │ │ +00171610: 6420 6265 2070 726f 7465 6374 6564 2066 d be protected f │ │ │ │ +00171620: 726f 6d20 7075 626c 6963 2076 6965 772e rom public view. │ │ │ │ +00171630: 2054 6865 7265 666f 7265 2c20 7768 656e Therefore, when │ │ │ │ +00171640: 2061 6464 696e 6720 6c6f 6769 6320 746f adding logic to │ │ │ │ +00171650: 2073 6572 7665 2066 696c 6573 2c20 7765 serve files, we │ │ │ │ +00171660: 206d 7573 7420 7265 6a65 6374 2072 6571 must reject req │ │ │ │ +00171670: 7565 7374 2074 6861 7420 6861 7665 203c uest that have < │ │ │ │ +00171680: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap │ │ │ │ +00171710: 3a3a 7061 7468 3c2f 613e 3c2f 636f 6465 ::path values with a │ │ │ │ +00171730: 3c63 6f64 653e 2f3c 2f63 6f64 653e 206f / o │ │ │ │ +00171740: 7220 6120 3c63 6f64 653e 5c3c 2f63 6f64 r a \ (soap::path< │ │ │ │ +001717f0: 2f63 6f64 653e 2069 7320 6120 7374 7269 /code> is a stri │ │ │ │ +00171800: 6e67 2077 6974 6820 7468 6520 7061 7468 ng with the path │ │ │ │ +00171810: 2070 6172 7420 6f66 2074 6865 2055 524c part of the URL │ │ │ │ +00171820: 2c20 7374 6172 7469 6e67 2077 6974 6820 , starting with │ │ │ │ +00171830: 6120 3c63 6f64 653e 2f3c 2f63 6f64 653e a / │ │ │ │ +00171840: 292e 2049 6620 7468 6573 6520 6172 6520 ). If these are │ │ │ │ +00171850: 616c 6c6f 7765 642c 2074 6865 6e20 7765 allowed, then we │ │ │ │ +00171860: 206d 7573 7420 6174 206c 6561 7374 2063 must at least c │ │ │ │ +00171870: 6865 636b 2066 6f72 203c 636f 6465 3e2e heck for . │ │ │ │ +00171880: 2e3c 2f63 6f64 653e 2069 6e20 7468 6520 . in the │ │ │ │ +00171890: 7061 7468 2074 6f20 6176 6f69 6420 7265 path to avoid re │ │ │ │ +001718a0: 7175 6573 7420 6672 6f6d 2073 6e6f 6f70 quest from snoop │ │ │ │ +001718b0: 696e 6720 6172 6f75 6e64 2069 6e20 6869 ing around in hi │ │ │ │ +001718c0: 6768 6572 2064 6972 6563 746f 7269 6573 gher directories │ │ │ │ +001718d0: 2061 6c6c 2074 6865 2077 6179 2075 7020 all the way up │ │ │ │ +001718e0: 746f 2074 6865 2072 6f6f 742e 3c2f 6464 to the root.
    .

    For a │ │ │ │ +00171900: 6f6e 652d 7761 7920 534f 4150 2f58 4d4c one-way SOAP/XML │ │ │ │ +00171910: 206d 6573 7361 6765 2c20 796f 7520 6361 message, you ca │ │ │ │ +00171920: 6e20 616c 736f 2072 6574 7572 6e20 6120 n also return a │ │ │ │ +00171930: 534f 4150 2f58 4d4c 2072 6573 706f 6e73 SOAP/XML respons │ │ │ │ +00171940: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +00171970: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00171980: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int http_get │ │ │ │ +001719f0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ +00171a40: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ +00171a70: 703c 2f61 3e29 203c 2f64 6976 3e0a 3c64 p)
    . │ │ │ │ +00171a90: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap │ │ │ │ +00171b00: 5f72 6573 706f 6e73 653c 2f61 3e28 3c61 _response(soap, < │ │ │ │ +00171b40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00171b50: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00171b60: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ +00171b70: 6133 6231 3061 3638 6633 3534 6633 3963 a3b10a68f354f39c │ │ │ │ +00171b80: 6262 3066 6530 6430 3433 6164 3463 3763 bb0fe0d043ad4c7c │ │ │ │ +00171b90: 3022 3e53 4f41 505f 4f4b 3c2f 613e 293b 0">SOAP_OK); │ │ │ │ +00171ba0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    return soap_send_ns │ │ │ │ +00171bf0: 315f 5f6d 7953 656e 644d 6574 686f 6452 1__mySendMethodR │ │ │ │ +00171c00: 6573 706f 6e73 6528 3c61 2063 6c61 7373 esponse(s │ │ │ │ +00171c30: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "" │ │ │ │ +00171c60: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 2c20 ;, NULL, │ │ │ │ +00171c70: 2e2e 2e20 7061 7261 6d73 202e 2e2e 293b ... params ...); │ │ │ │ +00171c80: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    } .

    whe │ │ │ │ +00171cc0: 7265 203c 636f 6465 3e6e 7331 5f5f 6d79 re ns1__my │ │ │ │ +00171cd0: 5365 6e64 4d65 7468 6f64 5265 7370 6f6e SendMethodRespon │ │ │ │ +00171ce0: 7365 3c2f 636f 6465 3e20 6973 2061 206f se is a o │ │ │ │ +00171cf0: 6e65 2d77 6179 206d 6573 7361 6765 2064 ne-way message d │ │ │ │ +00171d00: 6563 6c61 7265 6420 696e 2061 2069 6e74 eclared in a int │ │ │ │ +00171d10: 6572 6661 6365 2068 6561 6465 7220 6669 erface header fi │ │ │ │ +00171d20: 6c65 2061 733a 3c2f 703e 0a3c 6469 7620 le as:

    .
    int │ │ │ │ +00171d70: 3c2f 7370 616e 3e20 6e73 315f 5f6d 7953 ns1__myS │ │ │ │ +00171d80: 656e 644d 6574 686f 6452 6573 706f 6e73 endMethodRespons │ │ │ │ +00171d90: 6528 2e2e 2e20 7061 7261 6d73 202e 2e2e e(... params ... │ │ │ │ +00171da0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , void │ │ │ │ +00171dc0: 3c2f 7370 616e 3e29 3b3c 2f64 6976 3e0a );
    . │ │ │ │ +00171dd0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    The ge │ │ │ │ +00171df0: 6e65 7261 7465 6420 3c65 6d3e 3c63 6f64 nerated soapClient.cpp │ │ │ │ +00171e10: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 6e63 inc │ │ │ │ +00171e20: 6c75 6465 7320 7468 6520 7365 6e64 696e ludes the sendin │ │ │ │ +00171e30: 672d 7369 6465 2073 7475 6220 6675 6e63 g-side stub func │ │ │ │ +00171e40: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 6865 tion.

    .

    The │ │ │ │ +00171e50: 2065 7861 6d70 6c65 7320 6162 6f76 6520 examples above │ │ │ │ +00171e60: 6172 6520 666f 7220 4854 5450 2047 4554 are for HTTP GET │ │ │ │ +00171e70: 2e20 546f 2069 6d70 6c65 6d65 6e74 2048 . To implement H │ │ │ │ +00171e80: 5454 5020 5055 5420 616e 6420 5041 5443 TTP PUT and PATC │ │ │ │ +00171e90: 4820 7365 7420 7468 6520 3c63 6f64 653e H set the │ │ │ │ +00171ea0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::fput │ │ │ │ +00171f70: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap::fp │ │ │ │ +00172050: 6174 6368 3c2f 613e 3c2f 636f 6465 3e20 atch │ │ │ │ +00172060: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio │ │ │ │ +00172070: 6e73 206f 7220 7573 6520 7468 6520 3c63 ns or use the http_post< │ │ │ │ +00172110: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi │ │ │ │ +00172120: 6e20 7768 6963 6820 6973 206d 6f72 6520 n which is more │ │ │ │ +00172130: 6361 7061 626c 652e 3c2f 703e 0a3c 703e capable.

    .

    │ │ │ │ +00172140: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +00172160: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .TCP │ │ │ │ +001721a0: 2061 6e64 2048 5454 5020 6b65 6570 2d61 and HTTP keep-a │ │ │ │ +001721b0: 6c69 7665 3c2f 6832 3e0a 3c70 3e54 6f20 live

    .

    To │ │ │ │ +001721c0: 6163 7469 7661 7465 2048 5454 5020 6b65 activate HTTP ke │ │ │ │ +001721d0: 6570 2d61 6c69 7665 2c20 7365 7420 7468 ep-alive, set th │ │ │ │ +001721e0: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO │ │ │ │ +001721f0: 5f4b 4545 5041 4c49 5645 3c2f 636f 6465 _KEEPALIVE flag for both │ │ │ │ +00172210: 696e 7075 7420 616e 6420 6f75 7470 7574 input and output │ │ │ │ +00172220: 206d 6f64 6573 2c20 7365 6520 5365 6374 modes, see Sect │ │ │ │ +00172230: 696f 6e20 3c61 2063 6c61 7373 3d22 656c ion Run-ti │ │ │ │ +00172260: 6d65 2066 6c61 6773 3c2f 613e 202e 2046 me flags . F │ │ │ │ +00172270: 6f72 2065 7861 6d70 6c65 3c2f 703e 0a3c or example

    .< │ │ │ │ +00172280: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +00172290: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    str │ │ │ │ +001722c0: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap soap; .
    soap_i │ │ │ │ +001723a0: 6e69 7431 3c2f 613e 2826 616d 703b 3c61 nit1(&soap, < │ │ │ │ +001723e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001723f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00172400: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga │ │ │ │ +00172410: 3061 3436 3335 3733 3737 3332 6339 3132 0a4635737732c912 │ │ │ │ +00172420: 3035 3866 6634 6462 6136 3638 6331 6232 058ff4dba668c1b2 │ │ │ │ +00172430: 223e 534f 4150 5f49 4f5f 4b45 4550 414c ">SOAP_IO_KEEPAL │ │ │ │ +00172440: 4956 453c 2f61 3e29 3b20 3c2f 6469 763e IVE);
    │ │ │ │ +00172450: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    When │ │ │ │ +00172470: 6120 636c 6965 6e74 206f 7220 6120 7365 a client or a se │ │ │ │ +00172480: 7276 6963 6520 636f 6d6d 756e 6963 6174 rvice communicat │ │ │ │ +00172490: 6573 2077 6974 6820 616e 6f74 6865 7220 es with another │ │ │ │ +001724a0: 636c 6965 6e74 206f 7220 7365 7276 6963 client or servic │ │ │ │ +001724b0: 6520 7468 6174 2073 7570 706f 7274 7320 e that supports │ │ │ │ +001724c0: 6b65 6570 2061 6c69 7665 2c20 7468 6520 keep alive, the │ │ │ │ +001724d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::keep_a │ │ │ │ +00172590: 6c69 7665 3c2f 613e 3c2f 636f 6465 3e20 live │ │ │ │ +001725a0: 7661 7269 6162 6c65 2077 696c 6c20 6265 variable will be │ │ │ │ +001725b0: 2073 6574 2074 6f20 312c 206f 7468 6572 set to 1, other │ │ │ │ +001725c0: 7769 7365 2069 7420 6973 2072 6573 6574 wise it is reset │ │ │ │ +001725d0: 2074 6f20 3020 696e 6469 6361 7469 6e67 to 0 indicating │ │ │ │ +001725e0: 2074 6861 7420 7468 6520 6f74 6865 7220 that the other │ │ │ │ +001725f0: 7061 7274 7920 7761 6e74 7320 746f 2063 party wants to c │ │ │ │ +00172600: 6c6f 7365 2074 6865 2063 6f6e 6e65 6374 lose the connect │ │ │ │ +00172610: 696f 6e2e 2054 6865 2063 6f6e 6e65 6374 ion. The connect │ │ │ │ +00172620: 696f 6e20 6d61 7962 6520 7465 726d 696e ion maybe termin │ │ │ │ +00172630: 6174 6564 206f 6e20 6569 7468 6572 2065 ated on either e │ │ │ │ +00172640: 6e64 2062 6566 6f72 6520 7468 6520 636f nd before the co │ │ │ │ +00172650: 6d6d 756e 6963 6174 696f 6e20 636f 6d70 mmunication comp │ │ │ │ +00172660: 6c65 7465 642c 2066 6f72 2065 7861 6d70 leted, for examp │ │ │ │ +00172670: 6c65 2077 6865 6e20 7468 6520 7365 7276 le when the serv │ │ │ │ +00172680: 6572 206b 6565 702d 616c 6976 6520 636f er keep-alive co │ │ │ │ +00172690: 6e6e 6563 7469 6f6e 2068 6173 2074 696d nnection has tim │ │ │ │ +001726a0: 6564 206f 7574 2e20 5468 6973 206d 6179 ed out. This may │ │ │ │ +001726b0: 2067 656e 6572 6174 6520 6120 2242 726f generate a "Bro │ │ │ │ +001726c0: 6b65 6e20 5069 7065 2220 7369 676e 616c ken Pipe" signal │ │ │ │ +001726d0: 206f 6e20 556e 6978 2f4c 696e 7578 2070 on Unix/Linux p │ │ │ │ +001726e0: 6c61 7466 6f72 6d73 2e20 5468 6973 2073 latforms. This s │ │ │ │ +001726f0: 6967 6e61 6c20 6361 6e20 6265 2063 6175 ignal can be cau │ │ │ │ +00172700: 6768 7420 7769 7468 2061 2073 6967 6e61 ght with a signa │ │ │ │ +00172710: 6c20 6861 6e64 6c65 723a 3c2f 703e 0a3c l handler:

    .< │ │ │ │ +00172720: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +00172730: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    signal(SI │ │ │ │ +00172750: 4750 4950 452c 2073 6967 7069 7065 5f68 GPIPE, sigpipe_h │ │ │ │ +00172760: 616e 646c 6529 3b3c 2f64 6976 3e0a 3c2f andle);
    .

    where, f │ │ │ │ +00172790: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ +001727a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    void si │ │ │ │ +001727f0: 6770 6970 655f 6861 6e64 6c65 283c 7370 gpipe_handle(int x) { }
    .< │ │ │ │ +00172830: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Alterna │ │ │ │ +00172850: 7469 7665 6c79 2c20 6272 6f6b 656e 2070 tively, broken p │ │ │ │ +00172860: 6970 6573 2063 616e 2062 6520 6b65 7074 ipes can be kept │ │ │ │ +00172870: 2073 696c 656e 7420 6279 2073 6574 7469 silent by setti │ │ │ │ +00172880: 6e67 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ng:

    .
    │ │ │ │ +001728b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap. │ │ │ │ +001728e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 socket_ │ │ │ │ +00172930: 666c 6167 733c 2f61 3e20 3d20 4d53 475f flags = MSG_ │ │ │ │ +00172940: 4e4f 5349 474e 414c 3b3c 2f64 6976 3e0a NOSIGNAL;
    . │ │ │ │ +00172950: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::s │ │ │ │ +001729f0: 6f63 6b65 745f 666c 6167 733c 2f61 3e3c ocket_flags< │ │ │ │ +00172a00: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int soc │ │ │ │ +00172a20: 6b65 745f 666c 6167 733c 2f64 6976 3e3c ket_flags
    < │ │ │ │ +00172a30: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +00172a40: 223e 5573 6572 2d64 6566 696e 6162 6c65 ">User-definable │ │ │ │ +00172a50: 2073 6f63 6b65 7420 7365 6e64 2061 6e64 socket send and │ │ │ │ +00172a60: 2072 6563 7620 666c 6167 732c 2066 6f72 recv flags, for │ │ │ │ +00172a70: 2065 7861 6d70 6c65 2061 7373 6967 6e20 example assign │ │ │ │ +00172a80: 4d53 475f 4e4f 5349 474e 414c 2074 6f20 MSG_NOSIGNAL to │ │ │ │ +00172a90: 6469 7361 626c 6520 7369 6770 6970 6520 disable sigpipe │ │ │ │ +00172aa0: 2874 6865 2076 612e 2e2e 3c2f 6469 763e (the va...
    │ │ │ │ +00172ab0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +00172ad0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +00172ae0: 3a33 3335 393c 2f64 6976 3e3c 2f64 6976 :3359
    .

    This │ │ │ │ +00172b10: 2073 6574 7469 6e67 2077 696c 6c20 6e6f setting will no │ │ │ │ +00172b20: 7420 6765 6e65 7261 7465 2061 2053 4947 t generate a SIG │ │ │ │ +00172b30: 5049 5045 2062 7574 2072 6561 642f 7772 PIPE but read/wr │ │ │ │ +00172b40: 6974 6520 6f70 6572 6174 696f 6e73 2072 ite operations r │ │ │ │ +00172b50: 6574 7572 6e20 3c63 6f64 653e 2353 4f41 eturn #SOA │ │ │ │ +00172b60: 505f 454f 463c 2f63 6f64 653e 2069 6e73 P_EOF ins │ │ │ │ +00172b70: 7465 6164 2e20 4e6f 7465 2074 6861 7420 tead. Note that │ │ │ │ +00172b80: 5769 6e64 6f77 7320 646f 6573 206e 6f74 Windows does not │ │ │ │ +00172b90: 2073 7570 706f 7274 2073 6967 6e61 6c73 support signals │ │ │ │ +00172ba0: 2061 6e64 206c 6163 6b20 7468 6520 3c63 and lack the MSG_NOSIGNAL │ │ │ │ +00172bc0: 3c2f 636f 6465 3e20 666c 6167 2e3c 2f70 flag.

    .

    If the clie │ │ │ │ +00172be0: 6e74 2064 6f65 7320 6e6f 7420 636c 6f73 nt does not clos │ │ │ │ +00172bf0: 6520 7468 6520 636f 6e6e 6563 7469 6f6e e the connection │ │ │ │ +00172c00: 2c20 7468 6520 7365 7276 6572 2077 696c , the server wil │ │ │ │ +00172c10: 6c20 7761 6974 2066 6f72 6576 6572 2077 l wait forever w │ │ │ │ +00172c20: 6865 6e20 6e6f 203c 636f 6465 3e3c 6120 hen no soap::re │ │ │ │ +00172ce0: 6376 5f74 696d 656f 7574 3c2f 613e 3c2f cv_timeout is specifi │ │ │ │ +00172d00: 6564 2c20 736f 2062 6520 6361 7265 6675 ed, so be carefu │ │ │ │ +00172d10: 6c20 746f 2073 6574 2074 696d 656f 7574 l to set timeout │ │ │ │ +00172d20: 732c 2053 6565 2053 6563 7469 6f6e 203c s, See Section < │ │ │ │ +00172d30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00172d40: 663d 2269 6e64 6578 2e68 746d 6c23 7469 f="index.html#ti │ │ │ │ +00172d50: 6d65 6f75 7422 3e54 696d 656f 7574 206d meout">Timeout m │ │ │ │ +00172d60: 616e 6167 656d 656e 7420 666f 7220 6e6f anagement for no │ │ │ │ +00172d70: 6e2d 626c 6f63 6b69 6e67 206f 7065 7261 n-blocking opera │ │ │ │ +00172d80: 7469 6f6e 733c 2f61 3e2e 2049 6e20 6164 tions. In ad │ │ │ │ +00172d90: 6469 7469 6f6e 2c20 6f74 6865 7220 636c dition, other cl │ │ │ │ +00172da0: 6965 6e74 7320 7769 6c6c 2062 6520 6465 ients will be de │ │ │ │ +00172db0: 6e69 6564 2073 6572 7669 6365 2061 7320 nied service as │ │ │ │ +00172dc0: 6c6f 6e67 2061 7320 6120 636c 6965 6e74 long as a client │ │ │ │ +00172dd0: 206b 6565 7073 2074 6865 2063 6f6e 6e65 keeps the conne │ │ │ │ +00172de0: 6374 696f 6e20 746f 2074 6865 2073 6572 ction to the ser │ │ │ │ +00172df0: 7665 7220 6f70 656e 2e20 546f 2070 7265 ver open. To pre │ │ │ │ +00172e00: 7665 6e74 2074 6869 7320 6672 6f6d 2068 vent this from h │ │ │ │ +00172e10: 6170 7065 6e69 6e67 2c20 7468 6520 7365 appening, the se │ │ │ │ +00172e20: 7276 6963 6520 7368 6f75 6c64 2062 6520 rvice should be │ │ │ │ +00172e30: 6d75 6c74 692d 7468 7265 6164 6564 2073 multi-threaded s │ │ │ │ +00172e40: 7563 6820 7468 6174 2065 6163 6820 7468 uch that each th │ │ │ │ +00172e50: 7265 6164 2068 616e 646c 6573 2074 6865 read handles the │ │ │ │ +00172e60: 2063 6c69 656e 7420 636f 6e6e 6563 7469 client connecti │ │ │ │ +00172e70: 6f6e 3a3c 2f70 3e0a 3c64 6976 2063 6c61 on:

    .
    │ │ │ │ +00172ea0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main(int a │ │ │ │ +00172ef0: 7267 632c 203c 7370 616e 2063 6c61 7373 rgc, c │ │ │ │ +00172f10: 6861 723c 2f73 7061 6e3e 202a 2a61 7267 har **arg │ │ │ │ +00172f20: 7629 203c 2f64 6976 3e0a 3c64 6976 2063 v)
    .
    {.
    {
    . │ │ │ │ -00172f70: 2020 3c73 7061 6e20 636c 6173 733d 226b struct < │ │ │ │ -00172f90: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -00172fc0: 703c 2f61 3e20 3c61 2063 6c61 7373 3d22 p soa │ │ │ │ -00172ff0: 703c 2f61 3e2c 202a 7473 6f61 703b 203c p, *tsoap; < │ │ │ │ -00173000: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    T │ │ │ │ -00173070: 4852 4541 445f 5459 5045 3c2f 613e 2074 HREAD_TYPE t │ │ │ │ -00173080: 6964 3b20 3c2f 6469 763e 0a3c 6469 7620 id;
    .
    < │ │ │ │ -001730a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001730b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int m, s;
    │ │ │ │ -001730d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_i │ │ │ │ -00173140: 6e69 7432 3c2f 613e 2826 616d 703b 3c61 nit2(&soap, < │ │ │ │ -00173180: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00173190: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001731a0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga │ │ │ │ -001731b0: 3061 3436 3335 3733 3737 3332 6339 3132 0a4635737732c912 │ │ │ │ -001731c0: 3035 3866 6634 6462 6136 3638 6331 6232 058ff4dba668c1b2 │ │ │ │ -001731d0: 223e 534f 4150 5f49 4f5f 4b45 4550 414c ">SOAP_IO_KEEPAL │ │ │ │ -001731e0: 4956 453c 2f61 3e2c 203c 6120 636c 6173 IVE, SOAP │ │ │ │ -00173240: 5f49 4f5f 4b45 4550 414c 4956 453c 2f61 _IO_KEEPALIVE);
    .
    < │ │ │ │ -00173270: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00173280: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00173290: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ -001732a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001732b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001732c0: 6874 6d6c 2361 3164 3761 6361 3661 6331 html#a1d7aca6ac1 │ │ │ │ -001732d0: 6436 3233 3032 3130 3263 3137 3530 3861 d62302102c17508a │ │ │ │ -001732e0: 3862 3065 6330 223e 6d61 785f 6b65 6570 8b0ec0">max_keep │ │ │ │ -001732f0: 5f61 6c69 7665 3c2f 613e 203d 2031 3030 _alive = 100 │ │ │ │ -00173300: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // at mo │ │ │ │ -00173320: 7374 2031 3030 2063 616c 6c73 2070 6572 st 100 calls per │ │ │ │ -00173330: 206b 6565 702d 616c 6976 6520 7365 7373 keep-alive sess │ │ │ │ -00173340: 696f 6e20 3c2f 7370 616e 3e3c 2f64 6976 ion
    .
    soa │ │ │ │ -00173390: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.a │ │ │ │ -001733e0: 6363 6570 745f 7469 6d65 6f75 743c 2f61 ccept_timeout = 600; / │ │ │ │ -00173410: 2f20 6f70 7469 6f6e 616c 3a20 6c65 7420 / optional: let │ │ │ │ -00173420: 7365 7276 6572 2074 696d 6520 6f75 7420 server time out │ │ │ │ -00173430: 6166 7465 7220 7465 6e20 6d69 6e75 7465 after ten minute │ │ │ │ -00173440: 7320 6f66 2069 6e61 6374 6976 6974 7920 s of inactivity │ │ │ │ -00173450: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00173470: 2020 6d20 3d20 3c61 2063 6c61 7373 3d22 m = soap_bind< │ │ │ │ -001734d0: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ -00173500: 736f 6170 3c2f 613e 2c20 4e55 4c4c 2c20 soap, NULL, │ │ │ │ -00173510: 3138 3030 302c 2042 4143 4b4c 4f47 293b 18000, BACKLOG); │ │ │ │ -00173520: 203c 7370 616e 2063 6c61 7373 3d22 636f // use po │ │ │ │ -00173540: 7274 2031 3830 3030 206f 6e20 7468 6520 rt 18000 on the │ │ │ │ -00173550: 6375 7272 656e 7420 6d61 6368 696e 6520 current machine │ │ │ │ -00173560: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -00173580: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_v │ │ │ │ -00173600: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket( │ │ │ │ -00173610: 6d29 2920 3c2f 6469 763e 0a3c 6469 7620 m))
    .
    { │ │ │ │ -00173630: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    │ │ │ │ -00173710: 2065 7869 7428 4558 4954 5f46 4149 4c55 exit(EXIT_FAILU │ │ │ │ -00173720: 5245 293b 203c 2f64 6976 3e0a 3c64 6976 RE);
    .
    │ │ │ │ -00173740: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    fpr │ │ │ │ -00173760: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "S │ │ │ │ -00173790: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection │ │ │ │ -001737a0: 2073 7563 6365 7373 6675 6c20 2564 5c6e successful %d\n │ │ │ │ -001737b0: 2671 756f 743b 3c2f 7370 616e 3e2c 206d ", m │ │ │ │ -001737c0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    for (cou │ │ │ │ -00173850: 6e74 3c2f 613e 203d 2030 3b20 3c61 2063 nt = 0; count & │ │ │ │ -001738b0: 6774 3b3d 2030 3b20 3c61 2063 6c61 7373 gt;= 0; count++) .
    {
    │ │ │ │ -00173930: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so │ │ │ │ -00173970: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap. │ │ │ │ -001739c0: 736f 636b 6574 5f66 6c61 6773 3c2f 613e socket_flags │ │ │ │ -001739d0: 203d 204d 5347 5f4e 4f53 4947 4e41 4c3b = MSG_NOSIGNAL; │ │ │ │ -001739e0: 203c 7370 616e 2063 6c61 7373 3d22 636f // use th │ │ │ │ -00173a00: 6973 203c 2f73 7061 6e3e 3c2f 6469 763e is
    │ │ │ │ -00173a10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so │ │ │ │ -00173a50: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap. │ │ │ │ -00173aa0: 6163 6365 7074 5f66 6c61 6773 3c2f 613e accept_flags │ │ │ │ -00173ab0: 203d 2053 4f5f 4e4f 5349 4750 4950 453b = SO_NOSIGPIPE; │ │ │ │ -00173ac0: 203c 7370 616e 2063 6c61 7373 3d22 636f // or thi │ │ │ │ -00173ae0: 7320 746f 2070 7265 7665 6e74 2053 4947 s to prevent SIG │ │ │ │ -00173af0: 5049 5045 203c 2f73 7061 6e3e 3c2f 6469 PIPE .
    s = soa │ │ │ │ -00173b70: 705f 6163 6365 7074 3c2f 613e 2826 616d p_accept(&am │ │ │ │ -00173b80: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    │ │ │ │ -00173bd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_val │ │ │ │ -00173c50: 6964 5f73 6f63 6b65 743c 2f61 3e28 7329 id_socket(s) │ │ │ │ -00173c60: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    { │ │ │ │ -00173c80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    f │ │ │ │ -00173ca0: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, < │ │ │ │ -00173cb0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -00173cc0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -00173cd0: 3b41 6363 6570 7420 736f 636b 6574 2025 ;Accept socket % │ │ │ │ -00173ce0: 6420 636f 6e6e 6563 7469 6f6e 2066 726f d connection fro │ │ │ │ -00173cf0: 6d20 4950 2025 642e 2564 2e25 642e 2564 m IP %d.%d.%d.%d │ │ │ │ -00173d00: 5c6e 2671 756f 743b 3c2f 7370 616e 3e2c \n", │ │ │ │ -00173d10: 2073 2c20 283c 7370 616e 2063 6c61 7373 s, (i │ │ │ │ -00173d30: 6e74 3c2f 7370 616e 3e29 283c 6120 636c nt)(soap.ip>&g │ │ │ │ -00173dc0: 743b 3234 2926 616d 703b 3078 4646 2c20 t;24)&0xFF, │ │ │ │ -00173dd0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int)(so │ │ │ │ -00173e20: 6170 3c2f 613e 2e3c 6120 636c 6173 733d ap. │ │ │ │ -00173e70: 6970 3c2f 613e 2667 743b 2667 743b 3136 ip>>16 │ │ │ │ -00173e80: 2926 616d 703b 3078 4646 2c20 283c 7370 )&0xFF, (int)(soap.ip>>8)& │ │ │ │ -00173f40: 3b30 7846 462c 2028 3c73 7061 6e20 636c ;0xFF, (int)soap.ip& │ │ │ │ -00173ff0: 3b30 7846 4629 3b20 3c2f 6469 763e 0a3c ;0xFF);
    .< │ │ │ │ -00174000: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00174010: 3e20 2020 2020 2074 736f 6170 203d 203c > tsoap = < │ │ │ │ -00174020: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00174030: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00174040: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ -00174050: 6761 6234 6333 6638 6365 3830 6261 6630 gab4c3f8ce80baf0 │ │ │ │ -00174060: 6631 6665 6338 6338 3666 3062 6235 3738 f1fec8c86f0bb578 │ │ │ │ -00174070: 3861 223e 736f 6170 5f63 6f70 793c 2f61 8a">soap_copy(&so │ │ │ │ -001740b0: 6170 3c2f 613e 293b 203c 2f64 6976 3e0a ap);
    . │ │ │ │ -001740c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (!ts │ │ │ │ -00174100: 6f61 7029 3c2f 6469 763e 0a3c 6469 7620 oap)
    .
    │ │ │ │ -00174120: 2020 2020 203c 6120 636c 6173 733d 2263 soap_force_ │ │ │ │ -00174180: 636c 6f73 6573 6f63 6b3c 2f61 3e28 2661 closesock(&a │ │ │ │ -00174190: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    │ │ │ │ -001741e0: 2020 203c 7370 616e 2063 6c61 7373 3d22 els │ │ │ │ -00174200: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ -00174210: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00174220: 3e20 2020 2020 2020 203c 7370 616e 2063 > while │ │ │ │ -00174250: 283c 6120 636c 6173 733d 2263 6f64 6522 (
    THREAD_CRE │ │ │ │ -001742b0: 4154 453c 2f61 3e28 2661 6d70 3b74 6964 ATE(&tid │ │ │ │ -001742c0: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (voi │ │ │ │ -001742e0: 643c 2f73 7061 6e3e 2a28 2a29 283c 7370 d*(*)(void*))process_req │ │ │ │ -00174320: 7565 7374 2c20 283c 7370 616e 2063 6c61 uest, (void*)ts │ │ │ │ -00174350: 6f61 7029 293c 2f64 6976 3e0a 3c64 6976 oap))
    .
    │ │ │ │ -00174370: 2020 2020 2020 2020 736c 6565 7028 3129 sleep(1) │ │ │ │ -00174380: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // faile │ │ │ │ -001743a0: 642c 2074 7279 2061 6761 696e 3c2f 7370 d, try again
    .
    │ │ │ │ -001743d0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    else if │ │ │ │ -00174430: 3c2f 7370 616e 3e20 283c 6120 636c 6173 ( │ │ │ │ -00174460: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.errnum) // accept fa │ │ │ │ -001744e0: 696c 6564 2c20 7472 7920 6167 6169 6e20 iled, try again │ │ │ │ -001744f0: 6166 7465 7220 3120 7365 636f 6e64 3c2f after 1 second
    .
    │ │ │ │ -00174520: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ -00174540: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_print_ │ │ │ │ -001745a0: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&< │ │ │ │ -001745b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001745c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001745d0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001745e0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    . │ │ │ │ -001745f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    sleep(1) │ │ │ │ -00174610: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }< │ │ │ │ -00174630: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else
    .
    {< │ │ │ │ -00174690: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fp │ │ │ │ -001746b0: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, " │ │ │ │ -001746e0: 5365 7276 6572 2074 696d 6564 206f 7574 Server timed out │ │ │ │ -001746f0: 5c6e 2671 756f 743b 3c2f 7370 616e 3e29 \n") │ │ │ │ -00174700: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00174720: 3c73 7061 6e20 636c 6173 733d 226b 6579 break< │ │ │ │ -00174740: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .< │ │ │ │ -00174750: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00174760: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    . │ │ │ │ -00174780: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    < │ │ │ │ -001747a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001747b0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ -001747c0: 2f73 7061 6e3e 2030 3b20 3c2f 6469 763e /span> 0;
    │ │ │ │ -001747d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    < │ │ │ │ -00174800: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    void *p │ │ │ │ -00174840: 726f 6365 7373 5f72 6571 7565 7374 283c rocess_request(< │ │ │ │ -00174850: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00174860: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void *tsoap) st │ │ │ │ +00172f70: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap, *ts │ │ │ │ +00172fe0: 6f61 703b 203c 2f64 6976 3e0a 3c64 6976 oap;
    .
    │ │ │ │ +00173000: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_TYPE │ │ │ │ +00173060: 3c2f 613e 2074 6964 3b20 3c2f 6469 763e tid;
    │ │ │ │ +00173070: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ +001730a0: 6e74 3c2f 7370 616e 3e20 6d2c 2073 3b20 nt m, s; │ │ │ │ +001730b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00173120: 736f 6170 5f69 6e69 7432 3c2f 613e 2826 soap_init2(& │ │ │ │ +00173130: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +00173160: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, SOAP_IO_ │ │ │ │ +001731c0: 4b45 4550 414c 4956 453c 2f61 3e2c 203c KEEPALIVE, < │ │ │ │ +001731d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001731e0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001731f0: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga │ │ │ │ +00173200: 3061 3436 3335 3733 3737 3332 6339 3132 0a4635737732c912 │ │ │ │ +00173210: 3035 3866 6634 6462 6136 3638 6331 6232 058ff4dba668c1b2 │ │ │ │ +00173220: 223e 534f 4150 5f49 4f5f 4b45 4550 414c ">SOAP_IO_KEEPAL │ │ │ │ +00173230: 4956 453c 2f61 3e29 3b20 3c2f 6469 763e IVE);
    │ │ │ │ +00173240: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap │ │ │ │ +00173280: 3c2f 613e 2e3c 6120 636c 6173 733d 2263 .ma │ │ │ │ +001732d0: 785f 6b65 6570 5f61 6c69 7665 3c2f 613e x_keep_alive │ │ │ │ +001732e0: 203d 2031 3030 3b20 3c73 7061 6e20 636c = 100; // │ │ │ │ +00173300: 2061 7420 6d6f 7374 2031 3030 2063 616c at most 100 cal │ │ │ │ +00173310: 6c73 2070 6572 206b 6565 702d 616c 6976 ls per keep-aliv │ │ │ │ +00173320: 6520 7365 7373 696f 6e20 3c2f 7370 616e e session
    .
    soap.accept_time │ │ │ │ +001733d0: 6f75 743c 2f61 3e20 3d20 3630 303b 203c out = 600; < │ │ │ │ +001733e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001733f0: 656e 7422 3e2f 2f20 6f70 7469 6f6e 616c ent">// optional │ │ │ │ +00173400: 3a20 6c65 7420 7365 7276 6572 2074 696d : let server tim │ │ │ │ +00173410: 6520 6f75 7420 6166 7465 7220 7465 6e20 e out after ten │ │ │ │ +00173420: 6d69 6e75 7465 7320 6f66 2069 6e61 6374 minutes of inact │ │ │ │ +00173430: 6976 6974 7920 3c2f 7370 616e 3e3c 2f64 ivity .
    m = soap │ │ │ │ +001734b0: 5f62 696e 643c 2f61 3e28 2661 6d70 3b3c _bind(&< │ │ │ │ +001734c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001734d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001734e0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001734f0: 4e55 4c4c 2c20 3138 3030 302c 2042 4143 NULL, 18000, BAC │ │ │ │ +00173500: 4b4c 4f47 293b 203c 7370 616e 2063 6c61 KLOG); // │ │ │ │ +00173520: 7573 6520 706f 7274 2031 3830 3030 206f use port 18000 o │ │ │ │ +00173530: 6e20 7468 6520 6375 7272 656e 7420 6d61 n the current ma │ │ │ │ +00173540: 6368 696e 6520 3c2f 7370 616e 3e3c 2f64 chine . │ │ │ │ +00173600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . │ │ │ │ +00173630: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print │ │ │ │ +00173690: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(& │ │ │ │ +001736a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001736d0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    │ │ │ │ +001736e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT │ │ │ │ +00173700: 5f46 4149 4c55 5245 293b 203c 2f64 6976 _FAILURE);
    .
    }
    .< │ │ │ │ +00173730: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00173740: 3e20 2066 7072 696e 7466 2873 7464 6572 > fprintf(stder │ │ │ │ +00173750: 722c 203c 7370 616e 2063 6c61 7373 3d22 r, & │ │ │ │ +00173770: 7175 6f74 3b53 6f63 6b65 7420 636f 6e6e quot;Socket conn │ │ │ │ +00173780: 6563 7469 6f6e 2073 7563 6365 7373 6675 ection successfu │ │ │ │ +00173790: 6c20 2564 5c6e 2671 756f 743b 3c2f 7370 l %d\n", m);
    . │ │ │ │ +001737b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fo │ │ │ │ +001737e0: 723c 2f73 7061 6e3e 2028 3c61 2063 6c61 r (count = 0 │ │ │ │ +00173840: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; count │ │ │ │ +00173890: 3c2f 613e 2026 6774 3b3d 2030 3b20 3c61 >= 0; count │ │ │ │ +001738f0: 2b2b 2920 3c2f 6469 763e 0a3c 6469 7620 ++)
    .
    { │ │ │ │ +00173910: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.socket_fla │ │ │ │ +001739b0: 6773 3c2f 613e 203d 204d 5347 5f4e 4f53 gs = MSG_NOS │ │ │ │ +001739c0: 4947 4e41 4c3b 203c 7370 616e 2063 6c61 IGNAL; // │ │ │ │ +001739e0: 7573 6520 7468 6973 203c 2f73 7061 6e3e use this │ │ │ │ +001739f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap.accept_fla │ │ │ │ +00173a90: 6773 3c2f 613e 203d 2053 4f5f 4e4f 5349 gs = SO_NOSI │ │ │ │ +00173aa0: 4750 4950 453b 203c 7370 616e 2063 6c61 GPIPE; // │ │ │ │ +00173ac0: 6f72 2074 6869 7320 746f 2070 7265 7665 or this to preve │ │ │ │ +00173ad0: 6e74 2053 4947 5049 5045 203c 2f73 7061 nt SIGPIPE
    .
    s │ │ │ │ +00173b00: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_accept(&s │ │ │ │ +00173b90: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    │ │ │ │ +00173ba0: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ +00173c50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00173c60: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . │ │ │ │ +00173c80: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std │ │ │ │ +00173c90: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "Accept so │ │ │ │ +00173cc0: 636b 6574 2025 6420 636f 6e6e 6563 7469 cket %d connecti │ │ │ │ +00173cd0: 6f6e 2066 726f 6d20 4950 2025 642e 2564 on from IP %d.%d │ │ │ │ +00173ce0: 2e25 642e 2564 5c6e 2671 756f 743b 3c2f .%d.%d\n", s, (int) │ │ │ │ +00173d20: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +00173d50: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .ip │ │ │ │ +00173da0: 2667 743b 2667 743b 3234 2926 616d 703b >>24)& │ │ │ │ +00173db0: 3078 4646 2c20 283c 7370 616e 2063 6c61 0xFF, (int)(soap.ip> │ │ │ │ +00173e60: 2667 743b 3136 2926 616d 703b 3078 4646 >16)&0xFF │ │ │ │ +00173e70: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (int │ │ │ │ +00173e90: 3c2f 7370 616e 3e29 283c 6120 636c 6173 )( │ │ │ │ +00173ec0: 736f 6170 3c2f 613e 2e3c 6120 636c 6173 soap.ip>> │ │ │ │ +00173f20: 3829 2661 6d70 3b30 7846 462c 2028 3c73 8)&0xFF, (int)soap.ip&0xFF); .
    tso │ │ │ │ +00174000: 6170 203d 203c 6120 636c 6173 733d 2263 ap = soap_c │ │ │ │ +00174060: 6f70 793c 2f61 3e28 2661 6d70 3b3c 6120 opy(&soap); < │ │ │ │ +001740a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (!tsoap)
    │ │ │ │ +001740f0: 0a3c 6469 7620 636c 6173 733d 226c 696e . │ │ │ │ +001741b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else.
    < │ │ │ │ +00174210: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00174220: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow">while (THRE │ │ │ │ +00174290: 4144 5f43 5245 4154 453c 2f61 3e28 2661 AD_CREATE(&a │ │ │ │ +001742a0: 6d70 3b74 6964 2c20 283c 7370 616e 2063 mp;tid, (void*( │ │ │ │ +001742d0: 2a29 283c 7370 616e 2063 6c61 7373 3d22 *)(voi │ │ │ │ +001742f0: 643c 2f73 7061 6e3e 2a29 2970 726f 6365 d*))proce │ │ │ │ +00174300: 7373 5f72 6571 7565 7374 2c20 283c 7370 ss_request, (void*)tsoap))
    .
    sl │ │ │ │ +00174360: 6565 7028 3129 3b20 3c73 7061 6e20 636c eep(1); // │ │ │ │ +00174380: 2066 6169 6c65 642c 2074 7279 2061 6761 failed, try aga │ │ │ │ +00174390: 696e 3c2f 7370 616e 3e3c 2f64 6976 3e0a in
    . │ │ │ │ +001743a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . │ │ │ │ +001743d0: 2020 2020 3c73 7061 6e20 636c 6173 733d el │ │ │ │ +001743f0: 7365 3c2f 7370 616e 3e20 3c73 7061 6e20 se if (< │ │ │ │ +00174420: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00174430: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00174440: 6874 6d6c 223e 736f 6170 3c2f 613e 2e3c html">soap.< │ │ │ │ +00174450: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00174460: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00174470: 6874 6d6c 2361 3130 6236 3664 3664 3438 html#a10b66d6d48 │ │ │ │ +00174480: 3936 3930 6237 6430 6635 3931 6165 3236 9690b7d0f591ae26 │ │ │ │ +00174490: 3333 6464 3133 223e 6572 726e 756d 3c2f 33dd13">errnum) // acc │ │ │ │ +001744c0: 6570 7420 6661 696c 6564 2c20 7472 7920 ept failed, try │ │ │ │ +001744d0: 6167 6169 6e20 6166 7465 7220 3120 7365 again after 1 se │ │ │ │ +001744e0: 636f 6e64 3c2f 7370 616e 3e3c 2f64 6976 cond
    .
    {
    . │ │ │ │ +00174510: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_ │ │ │ │ +00174580: 7072 696e 745f 6661 756c 743c 2f61 3e28 print_fault( │ │ │ │ +00174590: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +001745c0: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); < │ │ │ │ +001745d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    sl │ │ │ │ +001745f0: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    . │ │ │ │ +00174610: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    .
    │ │ │ │ +00174630: 2020 3c73 7061 6e20 636c 6173 733d 226b else │ │ │ │ +00174650: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00174670: 2020 2020 7b3c 2f64 6976 3e0a 3c64 6976 {
    .
    │ │ │ │ +00174690: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde │ │ │ │ +001746a0: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, │ │ │ │ +001746c0: 2671 756f 743b 5365 7276 6572 2074 696d "Server tim │ │ │ │ +001746d0: 6564 206f 7574 5c6e 2671 756f 743b 3c2f ed out\n");
    . │ │ │ │ +00174700: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +00174720: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c2f break; .
    } .
    }
    │ │ │ │ +00174770: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    r │ │ │ │ +001747a0: 6574 7572 6e3c 2f73 7061 6e3e 2030 3b20 eturn 0; │ │ │ │ +001747b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    .
    .
    void *process_req │ │ │ │ +00174830: 7565 7374 283c 7370 616e 2063 6c61 7373 uest(v │ │ │ │ +00174850: 6f69 643c 2f73 7061 6e3e 202a 7473 6f61 oid *tsoa │ │ │ │ +00174860: 7029 203c 2f64 6976 3e0a 3c64 6976 2063 p)
    .
    {.
    {
    . │ │ │ │ -001748b0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct < │ │ │ │ -001748d0: 2f73 7061 6e3e 2a3c 6120 636c 6173 733d /span>*so │ │ │ │ -00174900: 6170 3c2f 613e 203d 2028 3c73 7061 6e20 ap = ( │ │ │ │ -00174920: 7374 7275 6374 203c 2f73 7061 6e3e 3c61 struct soap*)t │ │ │ │ -00174960: 736f 6170 3b3c 2f64 6976 3e0a 3c64 6976 soap;
    .
    │ │ │ │ -00174980: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_DETA │ │ │ │ -001749e0: 4348 3c2f 613e 283c 6120 636c 6173 733d CH(THRE │ │ │ │ -00174a40: 4144 5f49 443c 2f61 3e29 3b20 3c2f 6469 AD_ID); .
    ((s │ │ │ │ -00174a80: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap*)soap)-& │ │ │ │ -00174af0: 6774 3b72 6563 765f 7469 6d65 6f75 7420 gt;recv_timeout │ │ │ │ -00174b00: 3d20 3630 3b20 3c73 7061 6e20 636c 6173 = 60; // T │ │ │ │ -00174b20: 696d 656f 7574 2061 6674 6572 2031 206d imeout after 1 m │ │ │ │ -00174b30: 696e 7574 6520 7374 616c 6c20 6f6e 2072 inute stall on r │ │ │ │ -00174b40: 6563 7620 3c2f 7370 616e 3e3c 2f64 6976 ecv
    .
    ((st │ │ │ │ -00174b80: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap*)soap)-&g │ │ │ │ -00174bf0: 743b 7365 6e64 5f74 696d 656f 7574 203d t;send_timeout = │ │ │ │ -00174c00: 2031 303b 203c 7370 616e 2063 6c61 7373 10; // Ti │ │ │ │ -00174c20: 6d65 6f75 7420 6166 7465 7220 3130 2073 meout after 10 s │ │ │ │ -00174c30: 6563 6f6e 6420 7374 616c 6c20 6f6e 2073 econd stall on s │ │ │ │ -00174c40: 656e 6420 3c2f 7370 616e 3e3c 2f64 6976 end
    .. │ │ │ │ -00174d10: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest │ │ │ │ -00174d70: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s │ │ │ │ -00174da0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    │ │ │ │ -00174db0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ -00174e60: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ -00174f10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ -00174f40: 7475 726e 3c2f 7370 616e 3e20 4e55 4c4c turn NULL │ │ │ │ -00174f50: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.
    │ │ │ │ -00174fd0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap │ │ │ │ -00175010: 3a3a 636f 756e 743c 2f61 3e3c 2f64 6976 ::count
    ULONG64 cou │ │ │ │ -00175040: 6e74 3c2f 6469 763e 3c64 6976 2063 6c61 nt
    Messa │ │ │ │ -00175060: 6765 206c 656e 6774 6820 636f 756e 7465 ge length counte │ │ │ │ -00175070: 7220 7661 6c75 6520 6f66 2074 6865 206d r value of the m │ │ │ │ -00175080: 6573 7361 6765 2072 6563 6569 7665 6420 essage received │ │ │ │ -00175090: 616e 6420 636f 756e 7465 7220 7661 6c75 and counter valu │ │ │ │ -001750a0: 6520 6f66 2074 6865 2048 5454 5020 636f e of the HTTP co │ │ │ │ -001750b0: 6e74 656e 7420 6c65 6e67 7468 2068 6561 ntent length hea │ │ │ │ -001750c0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ │ -001750e0: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ -001750f0: 7464 736f 6170 322e 683a 3432 3034 3c2f tdsoap2.h:4204
    .
    │ │ │ │ -001751c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int accept_f │ │ │ │ -001751e0: 6c61 6773 3c2f 6469 763e 3c64 6976 2063 lags
    Use │ │ │ │ -00175200: 722d 6465 6669 6e61 626c 6520 7365 7473 r-definable sets │ │ │ │ -00175210: 6f63 6b6f 7074 206c 6576 656c 2053 4f4c ockopt level SOL │ │ │ │ -00175220: 5f53 4f43 4b45 5420 666c 6167 7320 2830 _SOCKET flags (0 │ │ │ │ -00175230: 2062 7920 6465 6661 756c 7429 2c20 7768 by default), wh │ │ │ │ -00175240: 656e 206e 6f6e 7a65 726f 2073 6574 7320 en nonzero sets │ │ │ │ -00175250: 7468 6520 736f 6170 3a3a 736f 636b 6574 the soap::socket │ │ │ │ -00175260: 2066 2e2e 2e3c 2f64 6976 3e3c 6469 7620 f...
    Definition: │ │ │ │ -00175290: 2073 7464 736f 6170 322e 683a 3334 3533 stdsoap2.h:3453 │ │ │ │ -001752a0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    A client │ │ │ │ -001752d0: 6361 6c6c 2077 696c 6c20 6175 746f 6d61 call will automa │ │ │ │ -001752e0: 7469 6361 6c6c 7920 6174 7465 6d70 7420 tically attempt │ │ │ │ -001752f0: 746f 2072 652d 6573 7461 626c 6973 6820 to re-establish │ │ │ │ -00175300: 6120 636f 6e6e 6563 7469 6f6e 2074 6f20 a connection to │ │ │ │ -00175310: 6120 7365 7276 6572 2077 6865 6e20 7468 a server when th │ │ │ │ -00175320: 6520 7365 7276 6572 2068 6173 2074 6572 e server has ter │ │ │ │ -00175330: 6d69 6e61 7465 6420 7468 6520 636f 6e6e minated the conn │ │ │ │ -00175340: 6563 7469 6f6e 2066 6f72 2061 6e79 2072 ection for any r │ │ │ │ -00175350: 6561 736f 6e2e 2054 6869 7320 7761 792c eason. This way, │ │ │ │ -00175360: 2061 2073 6571 7565 6e63 6520 6f66 2063 a sequence of c │ │ │ │ -00175370: 616c 6c73 2063 616e 2062 6520 6d61 6465 alls can be made │ │ │ │ -00175380: 2074 6f20 7468 6520 7365 7276 6572 2077 to the server w │ │ │ │ -00175390: 6869 6c65 206b 6565 7069 6e67 2074 6865 hile keeping the │ │ │ │ -001753a0: 2063 6f6e 6e65 6374 696f 6e20 6f70 656e connection open │ │ │ │ -001753b0: 2e20 436c 6965 6e74 2073 7475 6220 6675 . Client stub fu │ │ │ │ -001753c0: 6e63 7469 6f6e 7320 706f 6c6c 2074 6865 nctions poll the │ │ │ │ -001753d0: 2073 6572 7665 7220 746f 2063 6865 636b server to check │ │ │ │ -001753e0: 2069 6620 7468 6520 636f 6e6e 6563 7469 if the connecti │ │ │ │ -001753f0: 6f6e 2069 7320 7374 696c 6c20 6f70 656e on is still open │ │ │ │ -00175400: 2e20 5768 656e 2074 6865 2063 6f6e 6e65 . When the conne │ │ │ │ -00175410: 6374 696f 6e20 7761 7320 7465 726d 696e ction was termin │ │ │ │ -00175420: 6174 6564 2062 7920 7468 6520 7365 7276 ated by the serv │ │ │ │ -00175430: 6572 2c20 7468 6520 636c 6965 6e74 2077 er, the client w │ │ │ │ -00175440: 696c 6c20 6175 746f 6d61 7469 6361 6c6c ill automaticall │ │ │ │ -00175450: 7920 7265 636f 6e6e 6563 742e 203c 6272 y reconnect.
    .

    .

    A c │ │ │ │ -00175470: 6c69 656e 7420 6d61 7920 636c 6561 7220 lient may clear │ │ │ │ -00175480: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_ │ │ │ │ -00175490: 494f 5f4b 4545 5041 4c49 5645 3c2f 636f IO_KEEPALIVE flag just be │ │ │ │ -001754b0: 666f 7265 2074 6865 206c 6173 7420 6361 fore the last ca │ │ │ │ -001754c0: 6c6c 2074 6f20 6120 7365 7276 6572 2074 ll to a server t │ │ │ │ -001754d0: 6f20 6c65 7420 7468 6520 7365 7276 6572 o let the server │ │ │ │ -001754e0: 206b 6e6f 7720 6974 2077 616e 7473 2074 know it wants t │ │ │ │ -001754f0: 6f20 636c 6f73 6520 7468 6520 636f 6e6e o close the conn │ │ │ │ -00175500: 6563 7469 6f6e 2061 6674 6572 2074 6869 ection after thi │ │ │ │ -00175510: 7320 6c61 7374 2063 616c 6c2e 2054 6869 s last call. Thi │ │ │ │ -00175520: 7320 7769 6c6c 2063 6c6f 7365 2074 6865 s will close the │ │ │ │ -00175530: 2073 6f63 6b65 7420 6166 7465 7220 7468 socket after th │ │ │ │ -00175540: 6520 6361 6c6c 2061 6e64 2061 6c73 6f20 e call and also │ │ │ │ -00175550: 696e 666f 726d 7320 7468 6520 7365 7276 informs the serv │ │ │ │ -00175560: 6572 2074 6f20 6772 6163 6566 756c 6c79 er to gracefully │ │ │ │ -00175570: 2063 6c6f 7365 2074 6865 2063 6f6e 6e65 close the conne │ │ │ │ -00175580: 6374 696f 6e2e 3c2f 703e 0a3c 703e 5468 ction.

    .

    Th │ │ │ │ -00175590: 6520 636c 6965 6e74 2d73 6964 6520 6361 e client-side ca │ │ │ │ -001755a0: 6e20 616c 736f 2073 6574 2074 6865 2054 n also set the T │ │ │ │ -001755b0: 4350 206b 6565 702d 616c 6976 6520 736f CP keep-alive so │ │ │ │ -001755c0: 636b 6574 2070 726f 7065 7274 6965 732c cket properties, │ │ │ │ -001755d0: 2075 7369 6e67 2074 6865 203c 636f 6465 using the soap::t │ │ │ │ -001756a0: 6370 5f6b 6565 705f 616c 6976 653c 2f61 cp_keep_alive flag (s │ │ │ │ -001756c0: 6574 2074 6f20 3120 746f 2065 6e61 626c et to 1 to enabl │ │ │ │ -001756d0: 6529 2c20 3c63 6f64 653e 3c61 2063 6c61 e), soap::t │ │ │ │ -00175780: 6370 5f6b 6565 705f 6964 6c65 3c2f 613e cp_keep_idle │ │ │ │ -00175790: 3c2f 636f 6465 3e20 746f 2073 6574 2074 to set t │ │ │ │ -001757a0: 6865 203c 636f 6465 3e54 4350 5f4b 4545 he TCP_KEE │ │ │ │ -001757b0: 5049 444c 453c 2f63 6f64 653e 2076 616c PIDLE val │ │ │ │ -001757c0: 7565 2c20 3c63 6f64 653e 3c61 2063 6c61 ue, soap:: │ │ │ │ -00175870: 7463 705f 6b65 6570 5f69 6e74 766c 3c2f tcp_keep_intvl to set │ │ │ │ -00175890: 2074 6865 203c 636f 6465 3e54 4350 5f4b the TCP_K │ │ │ │ -001758a0: 4545 5049 4e54 564c 3c2f 636f 6465 3e20 EEPINTVL │ │ │ │ -001758b0: 7661 6c75 652c 2061 6e64 203c 636f 6465 value, and s │ │ │ │ -00175960: 6f61 703a 3a74 6370 5f6b 6565 705f 636e oap::tcp_keep_cn │ │ │ │ -00175970: 743c 2f61 3e3c 2f63 6f64 653e 2074 6f20 t to │ │ │ │ -00175980: 7365 7420 7468 6520 3c63 6f64 653e 5443 set the TC │ │ │ │ -00175990: 505f 4b45 4550 434e 543c 2f63 6f64 653e P_KEEPCNT │ │ │ │ -001759a0: 2076 616c 7565 2e3c 2f70 3e0a 3c70 3e49 value.

    .

    I │ │ │ │ -001759b0: 6620 6120 636c 6965 6e74 2069 7320 696e f a client is in │ │ │ │ -001759c0: 2074 6865 206d 6964 646c 6520 6f66 2073 the middle of s │ │ │ │ -001759d0: 6f61 7020 6361 6c6c 2074 6861 7420 6d69 oap call that mi │ │ │ │ -001759e0: 6768 7420 7461 6b65 2061 206c 6f6e 6720 ght take a long │ │ │ │ -001759f0: 7469 6d65 2061 6e64 2074 6865 2073 6572 time and the ser │ │ │ │ -00175a00: 7665 7220 676f 6573 2061 7761 792f 646f ver goes away/do │ │ │ │ -00175a10: 776e 2074 6865 2063 616c 6c65 7220 646f wn the caller do │ │ │ │ -00175a20: 6573 206e 6f74 2067 6574 2061 6e79 2066 es not get any f │ │ │ │ -00175a30: 6565 6462 6163 6b20 756e 7469 6c20 7468 eedback until th │ │ │ │ -00175a40: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap::recv_ti │ │ │ │ -00175b00: 6d65 6f75 743c 2f61 3e3c 2f63 6f64 653e meout │ │ │ │ -00175b10: 2069 7320 7265 6163 6865 642e 2045 6e61 is reached. Ena │ │ │ │ -00175b20: 626c 696e 6720 5443 5020 6b65 6570 2061 bling TCP keep a │ │ │ │ -00175b30: 6c69 7665 206f 6e20 7379 7374 656d 7320 live on systems │ │ │ │ -00175b40: 7468 6174 2073 7570 706f 7274 2069 7420 that support it │ │ │ │ -00175b50: 616c 6c6f 7773 2066 6f72 2061 2066 6173 allows for a fas │ │ │ │ -00175b60: 7465 7220 636f 6e6e 6563 7469 6f6e 2074 ter connection t │ │ │ │ -00175b70: 6561 7264 6f77 6e20 6465 7465 6374 696f eardown detectio │ │ │ │ -00175b80: 6e20 666f 7220 6170 706c 6963 6174 696f n for applicatio │ │ │ │ -00175b90: 6e73 2074 6861 7420 6e65 6564 2069 742e ns that need it. │ │ │ │ -00175ba0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ -00175bc0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ -00175bd0: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    < │ │ │ │ -00175be0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ -00175bf0: 2069 643d 2263 6875 6e6b 6564 223e 3c2f id="chunked">.HTTP chunked │ │ │ │ -00175c10: 7472 616e 7366 6572 2065 6e63 6f64 696e transfer encodin │ │ │ │ -00175c20: 673c 2f68 323e 0a3c 703e 4f75 7462 6f75 g

    .

    Outbou │ │ │ │ -00175c30: 6e64 2048 5454 5020 6d65 7373 6167 6573 nd HTTP messages │ │ │ │ -00175c40: 2061 7265 206e 6f74 2063 6875 6e6b 6564 are not chunked │ │ │ │ -00175c50: 2075 6e6c 6573 7320 7468 6520 3c63 6f64 unless the #SOAP_IO_CHUNK │ │ │ │ -00175c70: 3c2f 636f 6465 3e20 666c 6167 2069 7320 flag is │ │ │ │ -00175c80: 656e 6162 6c65 642e 2043 6875 6e6b 696e enabled. Chunkin │ │ │ │ -00175c90: 6720 6d61 7920 696d 7072 6f76 6520 7468 g may improve th │ │ │ │ -00175ca0: 6520 7370 6565 6420 6f66 206d 6573 7361 e speed of messa │ │ │ │ -00175cb0: 6765 2073 656e 6469 6e67 2077 6974 6820 ge sending with │ │ │ │ -00175cc0: 4854 5450 2c20 6265 6361 7573 6520 7468 HTTP, because th │ │ │ │ -00175cd0: 6520 6d65 7373 6167 6520 6c65 6e67 7468 e message length │ │ │ │ -00175ce0: 2064 6f65 7320 6e6f 7420 6e65 6564 2074 does not need t │ │ │ │ -00175cf0: 6f20 6265 2064 6574 6572 6d69 6e65 6420 o be determined │ │ │ │ -00175d00: 696e 2061 6476 616e 6365 2066 6f72 2074 in advance for t │ │ │ │ -00175d10: 6865 2048 5454 5020 636f 6e74 656e 7420 he HTTP content │ │ │ │ -00175d20: 6c65 6e67 7468 2068 6561 6465 722e 3c2f length header..

    .... Back to t │ │ │ │ -00175d50: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -00175d60: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .HTTP buffered │ │ │ │ -00175da0: 7365 6e64 733c 2f68 323e 0a3c 703e 5468 sends

    .

    Th │ │ │ │ -00175db0: 6520 656e 7469 7265 206f 7574 626f 756e e entire outboun │ │ │ │ -00175dc0: 6420 6d65 7373 6167 6520 6361 6e20 6265 d message can be │ │ │ │ -00175dd0: 2073 746f 7265 6420 696e 2061 2062 7566 stored in a buf │ │ │ │ -00175de0: 6665 7220 746f 2064 6574 6572 6d69 6e65 fer to determine │ │ │ │ -00175df0: 2074 6865 2048 5454 5020 636f 6e74 656e the HTTP conten │ │ │ │ -00175e00: 7420 6c65 6e67 7468 2072 6174 6865 7220 t length rather │ │ │ │ -00175e10: 7468 616e 2074 6865 2074 776f 2d70 6861 than the two-pha │ │ │ │ -00175e20: 7365 2065 6e63 6f64 696e 6720 7573 6564 se encoding used │ │ │ │ -00175e30: 2062 7920 6753 4f41 5020 636c 6965 6e74 by gSOAP client │ │ │ │ -00175e40: 2d73 6964 6520 7374 7562 2066 756e 6374 -side stub funct │ │ │ │ -00175e50: 696f 6e73 2061 6e64 2073 6572 7665 722d ions and server- │ │ │ │ -00175e60: 7369 6465 2073 6b65 6c65 746f 6e20 6675 side skeleton fu │ │ │ │ -00175e70: 6e63 7469 6f6e 7320 6765 6e65 7261 7465 nctions generate │ │ │ │ -00175e80: 6420 6279 2073 6f61 7063 7070 322c 2077 d by soapcpp2, w │ │ │ │ -00175e90: 6869 6368 2070 6572 666f 726d 2061 2073 hich perform a s │ │ │ │ -00175ea0: 6570 6172 6174 6520 7061 7373 206f 7665 eparate pass ove │ │ │ │ -00175eb0: 7220 7468 6520 6461 7461 2074 6f20 6465 r the data to de │ │ │ │ -00175ec0: 7465 726d 696e 6520 7468 6520 6c65 6e67 termine the leng │ │ │ │ -00175ed0: 7468 206f 6620 7468 6520 6f75 7462 6f75 th of the outbou │ │ │ │ -00175ee0: 6e64 206d 6573 7361 6765 2e20 5365 7474 nd message. Sett │ │ │ │ -00175ef0: 696e 6720 7468 6520 666c 6167 203c 636f ing the flag #SOAP_IO_STOR │ │ │ │ -00175f10: 453c 2f63 6f64 653e 2066 6f72 2074 6865 E for the │ │ │ │ -00175f20: 206f 7574 7075 7420 6d6f 6465 2077 696c output mode wil │ │ │ │ -00175f30: 6c20 6275 6666 6572 2074 6865 2065 6e74 l buffer the ent │ │ │ │ -00175f40: 6972 6520 6d65 7373 6167 652e 2054 6869 ire message. Thi │ │ │ │ -00175f50: 7320 6d61 7920 6f72 206d 6179 206e 6f74 s may or may not │ │ │ │ -00175f60: 2073 7065 6564 2075 7020 7468 6520 7472 speed up the tr │ │ │ │ -00175f70: 616e 736d 6973 7369 6f6e 206f 6620 6d65 ansmission of me │ │ │ │ -00175f80: 7373 6167 6573 2c20 6465 7065 6e64 696e ssages, dependin │ │ │ │ -00175f90: 6720 6f6e 2074 6865 2063 6f6e 7465 6e74 g on the content │ │ │ │ -00175fa0: 2c20 6275 7420 6d61 7920 7265 7175 6972 , but may requir │ │ │ │ -00175fb0: 6520 7369 676e 6966 6963 616e 7420 7374 e significant st │ │ │ │ -00175fc0: 6f72 6167 6520 7370 6163 6520 746f 2068 orage space to h │ │ │ │ -00175fd0: 6f6c 6420 6c61 7267 6520 6d65 7373 6167 old large messag │ │ │ │ -00175fe0: 6573 2074 656d 706f 7261 7269 6c79 2e3c es temporarily.< │ │ │ │ -00175ff0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to │ │ │ │ -00176010: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ -00176020: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

    .

    .HTTP au │ │ │ │ -00176060: 7468 656e 7469 6361 7469 6f6e 3c2f 6832 thentication

    .

    The followi │ │ │ │ -00176080: 6e67 2073 6563 7469 6f6e 7320 6578 706c ng sections expl │ │ │ │ -00176090: 6169 6e20 686f 7720 746f 2061 7574 6865 ain how to authe │ │ │ │ -001760a0: 6e74 6963 6174 6520 7769 7468 2048 5454 nticate with HTT │ │ │ │ -001760b0: 5020 6265 6172 6572 2c20 6261 7369 632c P bearer, basic, │ │ │ │ -001760c0: 2064 6967 6573 742c 2061 6e64 204e 544c digest, and NTL │ │ │ │ -001760d0: 4d2e 2050 726f 7879 2061 7574 6865 6e74 M. Proxy authent │ │ │ │ -001760e0: 6963 6174 696f 6e20 6973 2061 6c73 6f20 ication is also │ │ │ │ -001760f0: 636f 7665 7265 642e 3c2f 703e 0a3c 703e covered.

    .

    │ │ │ │ -00176100: 596f 7520 636f 756c 6420 616c 736f 2075 You could also u │ │ │ │ -00176110: 7365 2074 6865 2057 696e 496e 6574 2070 se the WinInet p │ │ │ │ -00176120: 6c75 6769 6e20 6176 6169 6c61 626c 6520 lugin available │ │ │ │ -00176130: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/mod_gsoap │ │ │ │ -00176150: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir │ │ │ │ -00176160: 6563 746f 7279 206f 6620 7468 6520 6753 ectory of the gS │ │ │ │ -00176170: 4f41 5020 736f 7572 6365 2063 6f64 6520 OAP source code │ │ │ │ -00176180: 7061 636b 6167 6520 746f 2073 696d 706c package to simpl │ │ │ │ -00176190: 6966 7920 496e 7465 726e 6574 2061 6363 ify Internet acc │ │ │ │ -001761a0: 6573 7320 666f 7220 6753 4f41 5020 636c ess for gSOAP cl │ │ │ │ -001761b0: 6965 6e74 2061 7070 6c69 6361 7469 6f6e ient application │ │ │ │ -001761c0: 7320 616e 6420 6465 616c 2077 6974 6820 s and deal with │ │ │ │ -001761d0: 656e 6372 7970 7469 6f6e 2c20 7072 6f78 encryption, prox │ │ │ │ -001761e0: 6965 732c 2061 6e64 2061 7574 6865 6e74 ies, and authent │ │ │ │ -001761f0: 6963 6174 696f 6e2c 2073 6565 2074 6865 ication, see the │ │ │ │ -00176200: 2067 534f 4150 203c 6120 6872 6566 3d22 gSOAP W │ │ │ │ -00176230: 696e 496e 6574 2070 6c75 6769 6e3c 2f61 inInet plugin documentation. │ │ │ │ -00176250: 3c2f 703e 0a3c 703e 5468 6520 6753 4f41

    .

    The gSOA │ │ │ │ -00176260: 5020 4355 524c 2070 6c75 6769 6e20 6361 P CURL plugin ca │ │ │ │ -00176270: 6e20 616c 736f 2062 6520 7573 6564 2074 n also be used t │ │ │ │ -00176280: 6f20 6465 7665 6c6f 7020 6753 4f41 5020 o develop gSOAP │ │ │ │ -00176290: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati │ │ │ │ -001762a0: 6f6e 7320 616e 6420 4355 524c 2069 6d70 ons and CURL imp │ │ │ │ -001762b0: 6c65 6d65 6e74 7320 7661 7269 6f75 7320 lements various │ │ │ │ -001762c0: 4854 5450 2061 7574 6865 6e74 6963 6174 HTTP authenticat │ │ │ │ -001762d0: 696f 6e20 6d65 7468 6f64 732c 2073 6565 ion methods, see │ │ │ │ -001762e0: 2074 6865 2067 534f 4150 203c 6120 6872 the gSOAP │ │ │ │ -00176310: 4355 524c 2070 6c75 6769 6e3c 2f61 3e20 CURL plugin │ │ │ │ -00176320: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

    .... Back to t │ │ │ │ -00176350: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -00176360: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

    .

    .HT │ │ │ │ -001763a0: 5450 2062 6561 7265 7220 6175 7468 656e TP bearer authen │ │ │ │ -001763b0: 7469 6361 7469 6f6e 3c2f 6833 3e0a 3c70 tication

    .

    HTTP bearer aut │ │ │ │ -001763d0: 6865 6e74 6963 6174 696f 6e20 6973 2065 hentication is e │ │ │ │ -001763e0: 6e61 626c 6564 2061 7420 7468 6520 636c nabled at the cl │ │ │ │ -001763f0: 6965 6e74 2d73 6964 6520 6279 2073 6574 ient-side by set │ │ │ │ -00176400: 7469 6e67 2074 6865 203c 636f 6465 3e3c ting the < │ │ │ │ -00176410: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00176420: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -00176430: 6d6c 2361 3532 3133 6135 3332 3862 3434 ml#a5213a5328b44 │ │ │ │ -00176440: 3234 3436 3839 6664 3363 3239 3337 6363 244689fd3c2937cc │ │ │ │ -00176450: 3862 3932 2220 7469 746c 653d 2255 7365 8b92" title="Use │ │ │ │ -00176460: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP │ │ │ │ -00176470: 2061 7574 686f 7269 7a61 7469 6f6e 2062 authorization b │ │ │ │ -00176480: 6561 7265 7220 746f 6b65 6e20 7661 6c75 earer token valu │ │ │ │ -00176490: 6520 746f 2062 6520 7365 6e74 2062 7920 e to be sent by │ │ │ │ -001764a0: 7468 6520 636c 6965 6e74 2c20 7365 7276 the client, serv │ │ │ │ -001764b0: 6572 2073 6964 6520 7265 6365 6976 6573 er side receives │ │ │ │ -001764c0: 2074 2e2e 2e22 3e73 6f61 703a 3a62 6561 t...">soap::bea │ │ │ │ -001764d0: 7265 723c 2f61 3e3c 2f63 6f64 653e 2073 rer s │ │ │ │ -001764e0: 7472 696e 6720 746f 2074 6865 2062 6561 tring to the bea │ │ │ │ -001764f0: 7265 7220 746f 6b65 6e3a 3c2f 703e 0a3c rer token:

    .< │ │ │ │ -00176500: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -00176510: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    str │ │ │ │ -00176540: 7563 7420 3c2f 7370 616e 3e3c 6120 636c uct soap *soap = soap_new( │ │ │ │ -00176610: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    . │ │ │ │ -001766f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ -00176790: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er │ │ │ │ -001767b0: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    │ │ │ │ -001767c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    els │ │ │ │ -001767f0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ -00176800: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00176810: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // │ │ │ │ -00176830: 4f4b 3c2f 7370 616e 3e3c 2f64 6976 3e0a OK
    . │ │ │ │ -00176840: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    < │ │ │ │ -001768f0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00176900: 6922 3e63 6f6e 7374 2063 6861 7220 2a20 i">const char * │ │ │ │ -00176910: 6265 6172 6572 3c2f 6469 763e 3c64 6976 bearer
    U │ │ │ │ -00176930: 7365 722d 6465 6669 6e61 626c 6520 4854 ser-definable HT │ │ │ │ -00176940: 5450 2061 7574 686f 7269 7a61 7469 6f6e TP authorization │ │ │ │ -00176950: 2062 6561 7265 7220 746f 6b65 6e20 7661 bearer token va │ │ │ │ -00176960: 6c75 6520 746f 2062 6520 7365 6e74 2062 lue to be sent b │ │ │ │ -00176970: 7920 7468 6520 636c 6965 6e74 2c20 7365 y the client, se │ │ │ │ -00176980: 7276 6572 2073 6964 6520 7265 6365 6976 rver side receiv │ │ │ │ -00176990: 6573 2074 2e2e 2e3c 2f64 6976 3e3c 6469 es t...
    │ │ │ │ -001769b0: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:37 │ │ │ │ -001769d0: 3532 3c2f 6469 763e 3c2f 6469 763e 0a3c 52
    .< │ │ │ │ -001769e0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    .... Back t │ │ │ │ -00176a10: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ -00176a20: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    │ │ │ │ -00176a30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 . │ │ │ │ -00176a60: 4854 5450 2062 6173 6963 2061 7574 6865 HTTP basic authe │ │ │ │ -00176a70: 6e74 6963 6174 696f 6e3c 2f68 333e 0a3c ntication

    .< │ │ │ │ -00176a80: 703e 4854 5450 2062 6173 6963 2061 7574 p>HTTP basic aut │ │ │ │ -00176a90: 6865 6e74 6963 6174 696f 6e20 6973 2065 hentication is e │ │ │ │ -00176aa0: 6e61 626c 6564 2061 7420 7468 6520 636c nabled at the cl │ │ │ │ -00176ab0: 6965 6e74 2d73 6964 6520 6279 2073 6574 ient-side by set │ │ │ │ -00176ac0: 7469 6e67 2074 6865 203c 636f 6465 3e63 ting the c │ │ │ │ -00176ad0: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid< │ │ │ │ -00176ba0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and < │ │ │ │ -00176bb0: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char* │ │ │ │ -00176bc0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p │ │ │ │ -00176c80: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd │ │ │ │ -00176c90: 2073 7472 696e 6773 2074 6f20 6120 7573 strings to a us │ │ │ │ -00176ca0: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw │ │ │ │ -00176cb0: 6f72 642c 2072 6573 7065 6374 6976 656c ord, respectivel │ │ │ │ -00176cc0: 792e 2041 2073 6572 7665 7220 6d61 7920 y. A server may │ │ │ │ -00176cd0: 7265 7175 6573 7420 7573 6572 2061 7574 request user aut │ │ │ │ -00176ce0: 6865 6e74 6963 6174 696f 6e20 616e 6420 hentication and │ │ │ │ -00176cf0: 6465 6e69 6573 2061 6363 6573 7320 2848 denies access (H │ │ │ │ -00176d00: 5454 5020 3430 3120 6572 726f 7229 2077 TTP 401 error) w │ │ │ │ -00176d10: 6865 6e20 7468 6520 636c 6965 6e74 2074 hen the client t │ │ │ │ -00176d20: 7269 6573 2074 6f20 636f 6e6e 6563 7420 ries to connect │ │ │ │ -00176d30: 7769 7468 6f75 7420 4854 5450 2061 7574 without HTTP aut │ │ │ │ -00176d40: 6865 6e74 6963 6174 696f 6e20 286f 7220 hentication (or │ │ │ │ -00176d50: 7769 7468 2074 6865 2077 726f 6e67 2061 with the wrong a │ │ │ │ -00176d60: 7574 6865 6e74 6963 6174 696f 6e20 696e uthentication in │ │ │ │ -00176d70: 666f 726d 6174 696f 6e29 2e3c 2f70 3e0a formation).

    . │ │ │ │ -00176d80: 3c70 3e42 6173 6963 2061 7574 6865 6e74

    Basic authent │ │ │ │ -00176d90: 6963 6174 696f 6e20 7368 6f75 6c64 206f ication should o │ │ │ │ -00176da0: 6e6c 7920 6265 2075 7365 6420 6f76 6572 nly be used over │ │ │ │ -00176db0: 2048 5454 5053 2c20 6265 6361 7573 6520 HTTPS, because │ │ │ │ -00176dc0: 7468 6520 6372 6564 656e 7469 616c 7320 the credentials │ │ │ │ -00176dd0: 6172 6520 7365 6e74 2069 6e20 7468 6520 are sent in the │ │ │ │ -00176de0: 636c 6561 7220 7769 7468 2048 5454 502e clear with HTTP. │ │ │ │ -00176df0: 2053 6565 2053 6563 7469 6f6e 203c 6120 See Section The HT │ │ │ │ -00176e30: 5450 2064 6967 6573 7420 6175 7468 656e TP digest authen │ │ │ │ -00176e40: 7469 6361 7469 6f6e 2070 6c75 6769 6e3c tication plugin< │ │ │ │ -00176e50: 2f61 3e20 746f 2075 7365 2074 6865 2048 /a> to use the H │ │ │ │ -00176e60: 5454 5020 6469 6765 7374 2070 6c75 6769 TTP digest plugi │ │ │ │ -00176e70: 6e20 7468 6174 2069 7320 7361 6665 2066 n that is safe f │ │ │ │ -00176e80: 6f72 2061 7574 6865 6e74 6963 6174 696f or authenticatio │ │ │ │ -00176e90: 6e20 6f76 6572 2048 5454 502e 3c2f 703e n over HTTP.

    │ │ │ │ -00176ea0: 0a3c 703e 4865 7265 2069 7320 616e 2065 .

    Here is an e │ │ │ │ -00176eb0: 7861 6d70 6c65 2063 6c69 656e 7420 636f xample client co │ │ │ │ -00176ec0: 6465 2066 7261 676d 656e 7420 746f 2073 de fragment to s │ │ │ │ -00176ed0: 6574 2074 6865 2048 5454 5020 6175 7468 et the HTTP auth │ │ │ │ -00176ee0: 656e 7469 6361 7469 6f6e 2075 7365 726e entication usern │ │ │ │ -00176ef0: 616d 6520 616e 6420 7061 7373 776f 7264 ame and password │ │ │ │ -00176f00: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    │ │ │ │ -00177020: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap-> │ │ │ │ -001770b0: 7573 6572 6964 3c2f 613e 203d 203c 7370 userid = "g │ │ │ │ -001770e0: 7565 7374 2671 756f 743b 3c2f 7370 616e uest";
    .
    soap-> │ │ │ │ -00177140: 3c61 2063 6c61 7373 3d22 636f 6465 2220 passwd< │ │ │ │ -00177190: 2f61 3e20 3d20 3c73 7061 6e20 636c 6173 /a> = "visit&qu │ │ │ │ -001771c0: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..< │ │ │ │ -00177260: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00177270: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // │ │ │ │ -00177290: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    e │ │ │ │ -001772d0: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    │ │ │ │ -001772e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ -00177310: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success │ │ │ │ -00177320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -00177370: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    │ │ │ │ -001773c0: 736f 6170 3a3a 7061 7373 7764 3c2f 613e soap::passwd │ │ │ │ -001773d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const │ │ │ │ -001773f0: 6368 6172 202a 2070 6173 7377 643c 2f64 char * passwd
    User-defin │ │ │ │ -00177420: 6162 6c65 2048 5454 5020 616e 6420 4e54 able HTTP and NT │ │ │ │ -00177430: 4c4d 2061 7574 686f 7269 7a61 7469 6f6e LM authorization │ │ │ │ -00177440: 2070 6173 7377 6f72 6420 7374 7269 6e67 password string │ │ │ │ -00177450: 2072 6571 7569 7265 6420 666f 7220 4854 required for HT │ │ │ │ -00177460: 5450 2062 6173 6963 2061 6e64 204e 544c TP basic and NTL │ │ │ │ -00177470: 4d20 6175 7468 656e 7469 632e 2e2e 3c2f M authentic...
    Defini │ │ │ │ -001774a0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ -001774b0: 7032 2e68 3a33 3832 373c 2f64 6976 3e3c p2.h:3827
    < │ │ │ │ -001774c0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ -00177510: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -00177520: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ -00177560: 6f61 703a 3a75 7365 7269 643c 2f61 3e3c oap::userid< │ │ │ │ -00177570: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c │ │ │ │ -00177590: 6861 7220 2a20 7573 6572 6964 3c2f 6469 har * userid
    User-defina │ │ │ │ -001775c0: 626c 6520 4854 5450 2061 6e64 204e 544c ble HTTP and NTL │ │ │ │ -001775d0: 4d20 6175 7468 6f72 697a 6174 696f 6e20 M authorization │ │ │ │ -001775e0: 7573 6572 2069 6420 7374 7269 6e67 2066 user id string f │ │ │ │ -001775f0: 6f72 2048 5454 5020 6261 7369 6320 616e or HTTP basic an │ │ │ │ -00177600: 6420 4e54 4c4d 2061 7574 6865 6e74 6963 d NTLM authentic │ │ │ │ -00177610: 6174 696f 6e20 6279 2074 2e2e 2e3c 2f64 ation by t...
    Definit │ │ │ │ -00177640: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ -00177650: 322e 683a 3338 3232 3c2f 6469 763e 3c2f 2.h:3822
    .

    A │ │ │ │ -00177680: 2063 6c69 656e 7420 534f 4150 2072 6571 client SOAP req │ │ │ │ -00177690: 7565 7374 2077 696c 6c20 6861 7665 2074 uest will have t │ │ │ │ -001776a0: 6865 2066 6f6c 6c6f 7769 6e67 2048 5454 he following HTT │ │ │ │ -001776b0: 5020 6865 6164 6572 3a20 3c2f 703e 3c70 P header:

    POST /XXX HT │ │ │ │ -001776e0: 5450 2f31 2e31 200a 486f 7374 3a20 5959 TP/1.1 .Host: YY │ │ │ │ -001776f0: 5920 0a55 7365 722d 4167 656e 743a 2067 Y .User-Agent: g │ │ │ │ -00177700: 534f 4150 2f32 2e38 200a 436f 6e74 656e SOAP/2.8 .Conten │ │ │ │ -00177710: 742d 5479 7065 3a20 7465 7874 2f78 6d6c t-Type: text/xml │ │ │ │ -00177720: 3b20 6368 6172 7365 743d 7574 662d 3820 ; charset=utf-8 │ │ │ │ -00177730: 0a43 6f6e 7465 6e74 2d4c 656e 6774 683a .Content-Length: │ │ │ │ -00177740: 205a 5a5a 200a 4175 7468 6f72 697a 6174 ZZZ .Authorizat │ │ │ │ -00177750: 696f 6e3a 2042 6173 6963 205a 3356 6c63 ion: Basic Z3Vlc │ │ │ │ -00177760: 3351 365a 3356 6c63 3351 3d20 0a3c 2f70 3Q6Z3Vlc3Q= .

    A client │ │ │ │ -00177780: 6d75 7374 2073 6574 2074 6865 203c 636f must set the const char* < │ │ │ │ -001777a0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001777b0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -001777c0: 6d6c 2361 3265 6465 3032 3039 3564 3938 ml#a2ede02095d98 │ │ │ │ -001777d0: 3934 3266 3463 3232 3066 6431 3762 3439 942f4c220fd17b49 │ │ │ │ -001777e0: 3537 3033 2220 7469 746c 653d 2255 7365 5703" title="Use │ │ │ │ -001777f0: 722d 6465 6669 6e61 626c 6520 4854 5450 r-definable HTTP │ │ │ │ -00177800: 2061 6e64 204e 544c 4d20 6175 7468 6f72 and NTLM author │ │ │ │ -00177810: 697a 6174 696f 6e20 7573 6572 2069 6420 ization user id │ │ │ │ -00177820: 7374 7269 6e67 2066 6f72 2048 5454 5020 string for HTTP │ │ │ │ -00177830: 6261 7369 6320 616e 6420 4e54 4c4d 2061 basic and NTLM a │ │ │ │ -00177840: 7574 6865 6e74 6963 6174 696f 6e20 6279 uthentication by │ │ │ │ -00177850: 2074 2e2e 2e22 3e73 6f61 703a 3a75 7365 t...">soap::use │ │ │ │ -00177860: 7269 643c 2f61 3e3c 2f63 6f64 653e 2061 rid a │ │ │ │ -00177870: 6e64 203c 636f 6465 3e63 6f6e 7374 2063 nd const c │ │ │ │ -00177880: 6861 722a 203c 6120 636c 6173 733d 2265 har* soa │ │ │ │ -00177940: 703a 3a70 6173 7377 643c 2f61 3e3c 2f63 p::passwd strings for │ │ │ │ -00177960: 2065 6163 6820 6361 6c6c 2074 6861 7420 each call that │ │ │ │ -00177970: 7265 7175 6972 6573 2063 6c69 656e 7420 requires client │ │ │ │ -00177980: 6175 7468 656e 7469 6361 7469 6f6e 2e20 authentication. │ │ │ │ -00177990: 5468 6520 7374 7269 6e67 7320 6172 6520 The strings are │ │ │ │ -001779a0: 7265 7365 7420 6166 7465 7220 6561 6368 reset after each │ │ │ │ -001779b0: 2073 7563 6365 7373 6675 6c20 6f72 2075 successful or u │ │ │ │ -001779c0: 6e73 7563 6365 7373 6675 6c20 6361 6c6c nsuccessful call │ │ │ │ -001779d0: 2e3c 2f70 3e0a 3c70 3e57 6865 6e20 7072 .

    .

    When pr │ │ │ │ -001779e0: 6573 656e 742c 2074 6865 203c 636f 6465 esent, the WWW-Authenticat │ │ │ │ -00177a00: 653c 2f63 6f64 653e 2048 5454 5020 6865 e HTTP he │ │ │ │ -00177a10: 6164 6572 2072 6574 7572 6e65 6420 6279 ader returned by │ │ │ │ -00177a20: 2074 6865 2073 6572 7665 7220 7769 7468 the server with │ │ │ │ -00177a30: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat │ │ │ │ -00177a40: 696f 6e20 7265 616c 6d20 6973 2073 746f ion realm is sto │ │ │ │ -00177a50: 7265 6420 696e 2074 6865 2074 6865 203c red in the the < │ │ │ │ -00177a60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -00177b20: 703a 3a61 7574 6872 6561 6c6d 3c2f 613e p::authrealm │ │ │ │ -00177b30: 3c2f 636f 6465 3e20 7374 7269 6e67 2e20 string. │ │ │ │ -00177b40: 5468 6973 2069 7320 7573 6566 756c 2066 This is useful f │ │ │ │ -00177b50: 6f72 2063 6c69 656e 7473 2074 6f20 7573 or clients to us │ │ │ │ -00177b60: 6520 7468 6973 2064 6f6d 6169 6e20 696e e this domain in │ │ │ │ -00177b70: 666f 726d 6174 696f 6e20 746f 2072 6573 formation to res │ │ │ │ -00177b80: 706f 6e64 2074 6f20 6175 7468 656e 7469 pond to authenti │ │ │ │ -00177b90: 6361 7469 6f6e 2072 6571 7565 7374 732e cation requests. │ │ │ │ -00177ba0: 3c2f 703e 0a3c 703e 4120 7374 616e 642d

    .

    A stand- │ │ │ │ -00177bb0: 616c 6f6e 6520 6753 4f41 5020 5765 6220 alone gSOAP Web │ │ │ │ -00177bc0: 5365 7276 6963 6520 6170 706c 6963 6174 Service applicat │ │ │ │ -00177bd0: 696f 6e20 6361 6e20 656e 666f 7263 6520 ion can enforce │ │ │ │ -00177be0: 4854 5450 2061 7574 6865 6e74 6963 6174 HTTP authenticat │ │ │ │ -00177bf0: 696f 6e20 6f6e 2063 6c69 656e 7473 2062 ion on clients b │ │ │ │ -00177c00: 7920 6368 6563 6b69 6e67 2074 6865 203c y checking the < │ │ │ │ -00177c10: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char* │ │ │ │ -00177c20: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::u │ │ │ │ -00177ce0: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid │ │ │ │ -00177cf0: 2061 6e64 203c 636f 6465 3e63 6f6e 7374 and const │ │ │ │ -00177d00: 2063 6861 722a 203c 6120 636c 6173 733d char* s │ │ │ │ -00177dc0: 6f61 703a 3a70 6173 7377 643c 2f61 3e3c oap::passwd< │ │ │ │ -00177dd0: 2f63 6f64 653e 2073 7472 696e 6773 2e20 /code> strings. │ │ │ │ -00177de0: 5468 6573 6520 7374 7269 6e67 7320 6172 These strings ar │ │ │ │ -00177df0: 6520 7365 7420 7768 656e 2061 2063 6c69 e set when a cli │ │ │ │ -00177e00: 656e 7420 7265 7175 6573 7420 636f 6e74 ent request cont │ │ │ │ -00177e10: 6169 6e73 2048 5454 5020 6175 7468 656e ains HTTP authen │ │ │ │ -00177e20: 7469 6361 7469 6f6e 2068 6561 6465 7273 tication headers │ │ │ │ -00177e30: 2e20 5468 6520 7374 7269 6e67 7320 7368 . The strings sh │ │ │ │ -00177e40: 6f75 6c64 2062 6520 6368 6563 6b65 6420 ould be checked │ │ │ │ -00177e50: 696e 2065 6163 6820 7365 7276 6963 6520 in each service │ │ │ │ -00177e60: 6d65 7468 6f64 2028 7468 6174 2072 6571 method (that req │ │ │ │ -00177e70: 7569 7265 7320 6175 7468 656e 7469 6361 uires authentica │ │ │ │ -00177e80: 7469 6f6e 2074 6f20 6578 6563 7574 6529 tion to execute) │ │ │ │ -00177e90: 2e3c 2f70 3e0a 3c70 3e48 6572 6520 6973 .

    .

    Here is │ │ │ │ -00177ea0: 2061 6e20 6578 616d 706c 6520 7365 7276 an example serv │ │ │ │ -00177eb0: 6963 6520 6d65 7468 6f64 2069 6d70 6c65 ice method imple │ │ │ │ -00177ec0: 6d65 6e74 6174 696f 6e20 7468 6174 2065 mentation that e │ │ │ │ -00177ed0: 6e66 6f72 6365 6420 636c 6965 6e74 2061 nforced client a │ │ │ │ -00177ee0: 7574 6865 6e74 6963 6174 696f 6e3a 3c2f uthentication:.

    int │ │ │ │ -00177f40: 6e73 5f5f 7765 626d 6574 686f 6428 3c73 ns__webmethod(struct soap *soap, ...)
    . │ │ │ │ +00174890: 6c69 6e65 223e 2020 3c73 7061 6e20 636c line"> st │ │ │ │ +001748b0: 7275 6374 203c 2f73 7061 6e3e 2a3c 6120 ruct *soap = ( │ │ │ │ +001748f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ +00174940: 2f61 3e2a 2974 736f 6170 3b3c 2f64 6976 /a>*)tsoap;
    .
    THREA │ │ │ │ +001749c0: 445f 4445 5441 4348 3c2f 613e 283c 6120 D_DETACH(THREAD_ID) │ │ │ │ +00174a30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ...
    soap │ │ │ │ +00174ca0: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap); .
    soa │ │ │ │ +00174d50: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); │ │ │ │ +00174d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00174e00: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); < │ │ │ │ +00174e40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ +00174eb0: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap); < │ │ │ │ +00174ef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return NULL;
    .< │ │ │ │ +00174f40: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00174f50: 3e7d 3c2f 6469 763e 0a3c 6469 7620 636c >}
    .
    ULONG │ │ │ │ +00175020: 3634 2063 6f75 6e74 3c2f 6469 763e 3c64 64 count
    Message length │ │ │ │ +00175050: 636f 756e 7465 7220 7661 6c75 6520 6f66 counter value of │ │ │ │ +00175060: 2074 6865 206d 6573 7361 6765 2072 6563 the message rec │ │ │ │ +00175070: 6569 7665 6420 616e 6420 636f 756e 7465 eived and counte │ │ │ │ +00175080: 7220 7661 6c75 6520 6f66 2074 6865 2048 r value of the H │ │ │ │ +00175090: 5454 5020 636f 6e74 656e 7420 6c65 6e67 TTP content leng │ │ │ │ +001750a0: 7468 2068 6561 2e2e 2e3c 2f64 6976 3e3c th hea...
    < │ │ │ │ +001750b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ +001750c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ +001750d0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ +001750e0: 3432 3034 3c2f 6469 763e 3c2f 6469 763e 4204
    │ │ │ │ +001750f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap:: │ │ │ │ +00175190: 6163 6365 7074 5f66 6c61 6773 3c2f 613e accept_flags │ │ │ │ +001751a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int ac │ │ │ │ +001751c0: 6365 7074 5f66 6c61 6773 3c2f 6469 763e cept_flags
    │ │ │ │ +001751d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl │ │ │ │ +001751f0: 6520 7365 7473 6f63 6b6f 7074 206c 6576 e setsockopt lev │ │ │ │ +00175200: 656c 2053 4f4c 5f53 4f43 4b45 5420 666c el SOL_SOCKET fl │ │ │ │ +00175210: 6167 7320 2830 2062 7920 6465 6661 756c ags (0 by defaul │ │ │ │ +00175220: 7429 2c20 7768 656e 206e 6f6e 7a65 726f t), when nonzero │ │ │ │ +00175230: 2073 6574 7320 7468 6520 736f 6170 3a3a sets the soap:: │ │ │ │ +00175240: 736f 636b 6574 2066 2e2e 2e3c 2f64 6976 socket f...
    Definitio │ │ │ │ +00175270: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ +00175280: 683a 3334 3533 3c2f 6469 763e 3c2f 6469 h:3453
    .

    A c │ │ │ │ +001752b0: 6c69 656e 7420 6361 6c6c 2077 696c 6c20 lient call will │ │ │ │ +001752c0: 6175 746f 6d61 7469 6361 6c6c 7920 6174 automatically at │ │ │ │ +001752d0: 7465 6d70 7420 746f 2072 652d 6573 7461 tempt to re-esta │ │ │ │ +001752e0: 626c 6973 6820 6120 636f 6e6e 6563 7469 blish a connecti │ │ │ │ +001752f0: 6f6e 2074 6f20 6120 7365 7276 6572 2077 on to a server w │ │ │ │ +00175300: 6865 6e20 7468 6520 7365 7276 6572 2068 hen the server h │ │ │ │ +00175310: 6173 2074 6572 6d69 6e61 7465 6420 7468 as terminated th │ │ │ │ +00175320: 6520 636f 6e6e 6563 7469 6f6e 2066 6f72 e connection for │ │ │ │ +00175330: 2061 6e79 2072 6561 736f 6e2e 2054 6869 any reason. Thi │ │ │ │ +00175340: 7320 7761 792c 2061 2073 6571 7565 6e63 s way, a sequenc │ │ │ │ +00175350: 6520 6f66 2063 616c 6c73 2063 616e 2062 e of calls can b │ │ │ │ +00175360: 6520 6d61 6465 2074 6f20 7468 6520 7365 e made to the se │ │ │ │ +00175370: 7276 6572 2077 6869 6c65 206b 6565 7069 rver while keepi │ │ │ │ +00175380: 6e67 2074 6865 2063 6f6e 6e65 6374 696f ng the connectio │ │ │ │ +00175390: 6e20 6f70 656e 2e20 436c 6965 6e74 2073 n open. Client s │ │ │ │ +001753a0: 7475 6220 6675 6e63 7469 6f6e 7320 706f tub functions po │ │ │ │ +001753b0: 6c6c 2074 6865 2073 6572 7665 7220 746f ll the server to │ │ │ │ +001753c0: 2063 6865 636b 2069 6620 7468 6520 636f check if the co │ │ │ │ +001753d0: 6e6e 6563 7469 6f6e 2069 7320 7374 696c nnection is stil │ │ │ │ +001753e0: 6c20 6f70 656e 2e20 5768 656e 2074 6865 l open. When the │ │ │ │ +001753f0: 2063 6f6e 6e65 6374 696f 6e20 7761 7320 connection was │ │ │ │ +00175400: 7465 726d 696e 6174 6564 2062 7920 7468 terminated by th │ │ │ │ +00175410: 6520 7365 7276 6572 2c20 7468 6520 636c e server, the cl │ │ │ │ +00175420: 6965 6e74 2077 696c 6c20 6175 746f 6d61 ient will automa │ │ │ │ +00175430: 7469 6361 6c6c 7920 7265 636f 6e6e 6563 tically reconnec │ │ │ │ +00175440: 742e 203c 6272 2020 2f3e 0a3c 2f70 3e0a t.
    .

    . │ │ │ │ +00175450: 3c70 3e41 2063 6c69 656e 7420 6d61 7920

    A client may │ │ │ │ +00175460: 636c 6561 7220 7468 6520 3c63 6f64 653e clear the │ │ │ │ +00175470: 2353 4f41 505f 494f 5f4b 4545 5041 4c49 #SOAP_IO_KEEPALI │ │ │ │ +00175480: 5645 3c2f 636f 6465 3e20 666c 6167 206a VE flag j │ │ │ │ +00175490: 7573 7420 6265 666f 7265 2074 6865 206c ust before the l │ │ │ │ +001754a0: 6173 7420 6361 6c6c 2074 6f20 6120 7365 ast call to a se │ │ │ │ +001754b0: 7276 6572 2074 6f20 6c65 7420 7468 6520 rver to let the │ │ │ │ +001754c0: 7365 7276 6572 206b 6e6f 7720 6974 2077 server know it w │ │ │ │ +001754d0: 616e 7473 2074 6f20 636c 6f73 6520 7468 ants to close th │ │ │ │ +001754e0: 6520 636f 6e6e 6563 7469 6f6e 2061 6674 e connection aft │ │ │ │ +001754f0: 6572 2074 6869 7320 6c61 7374 2063 616c er this last cal │ │ │ │ +00175500: 6c2e 2054 6869 7320 7769 6c6c 2063 6c6f l. This will clo │ │ │ │ +00175510: 7365 2074 6865 2073 6f63 6b65 7420 6166 se the socket af │ │ │ │ +00175520: 7465 7220 7468 6520 6361 6c6c 2061 6e64 ter the call and │ │ │ │ +00175530: 2061 6c73 6f20 696e 666f 726d 7320 7468 also informs th │ │ │ │ +00175540: 6520 7365 7276 6572 2074 6f20 6772 6163 e server to grac │ │ │ │ +00175550: 6566 756c 6c79 2063 6c6f 7365 2074 6865 efully close the │ │ │ │ +00175560: 2063 6f6e 6e65 6374 696f 6e2e 3c2f 703e connection.

    │ │ │ │ +00175570: 0a3c 703e 5468 6520 636c 6965 6e74 2d73 .

    The client-s │ │ │ │ +00175580: 6964 6520 6361 6e20 616c 736f 2073 6574 ide can also set │ │ │ │ +00175590: 2074 6865 2054 4350 206b 6565 702d 616c the TCP keep-al │ │ │ │ +001755a0: 6976 6520 736f 636b 6574 2070 726f 7065 ive socket prope │ │ │ │ +001755b0: 7274 6965 732c 2075 7369 6e67 2074 6865 rties, using the │ │ │ │ +001755c0: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +00175680: 6f61 703a 3a74 6370 5f6b 6565 705f 616c oap::tcp_keep_al │ │ │ │ +00175690: 6976 653c 2f61 3e3c 2f63 6f64 653e 2066 ive f │ │ │ │ +001756a0: 6c61 6720 2873 6574 2074 6f20 3120 746f lag (set to 1 to │ │ │ │ +001756b0: 2065 6e61 626c 6529 2c20 3c63 6f64 653e enable), │ │ │ │ +001756c0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s │ │ │ │ +00175760: 6f61 703a 3a74 6370 5f6b 6565 705f 6964 oap::tcp_keep_id │ │ │ │ +00175770: 6c65 3c2f 613e 3c2f 636f 6465 3e20 746f le to │ │ │ │ +00175780: 2073 6574 2074 6865 203c 636f 6465 3e54 set the T │ │ │ │ +00175790: 4350 5f4b 4545 5049 444c 453c 2f63 6f64 CP_KEEPIDLE value, │ │ │ │ +001757b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 │ │ │ │ +00175850: 736f 6170 3a3a 7463 705f 6b65 6570 5f69 soap::tcp_keep_i │ │ │ │ +00175860: 6e74 766c 3c2f 613e 3c2f 636f 6465 3e20 ntvl │ │ │ │ +00175870: 746f 2073 6574 2074 6865 203c 636f 6465 to set the TCP_KEEPINTVL value, and │ │ │ │ +001758a0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::tcp_k │ │ │ │ +00175950: 6565 705f 636e 743c 2f61 3e3c 2f63 6f64 eep_cnt to set the TCP_KEEPCNT< │ │ │ │ +00175980: 2f63 6f64 653e 2076 616c 7565 2e3c 2f70 /code> value.

    .

    If a client │ │ │ │ +001759a0: 2069 7320 696e 2074 6865 206d 6964 646c is in the middl │ │ │ │ +001759b0: 6520 6f66 2073 6f61 7020 6361 6c6c 2074 e of soap call t │ │ │ │ +001759c0: 6861 7420 6d69 6768 7420 7461 6b65 2061 hat might take a │ │ │ │ +001759d0: 206c 6f6e 6720 7469 6d65 2061 6e64 2074 long time and t │ │ │ │ +001759e0: 6865 2073 6572 7665 7220 676f 6573 2061 he server goes a │ │ │ │ +001759f0: 7761 792f 646f 776e 2074 6865 2063 616c way/down the cal │ │ │ │ +00175a00: 6c65 7220 646f 6573 206e 6f74 2067 6574 ler does not get │ │ │ │ +00175a10: 2061 6e79 2066 6565 6462 6163 6b20 756e any feedback un │ │ │ │ +00175a20: 7469 6c20 7468 6520 3c63 6f64 653e 3c61 til the soap::r │ │ │ │ +00175ae0: 6563 765f 7469 6d65 6f75 743c 2f61 3e3c ecv_timeout< │ │ │ │ +00175af0: 2f63 6f64 653e 2069 7320 7265 6163 6865 /code> is reache │ │ │ │ +00175b00: 642e 2045 6e61 626c 696e 6720 5443 5020 d. Enabling TCP │ │ │ │ +00175b10: 6b65 6570 2061 6c69 7665 206f 6e20 7379 keep alive on sy │ │ │ │ +00175b20: 7374 656d 7320 7468 6174 2073 7570 706f stems that suppo │ │ │ │ +00175b30: 7274 2069 7420 616c 6c6f 7773 2066 6f72 rt it allows for │ │ │ │ +00175b40: 2061 2066 6173 7465 7220 636f 6e6e 6563 a faster connec │ │ │ │ +00175b50: 7469 6f6e 2074 6561 7264 6f77 6e20 6465 tion teardown de │ │ │ │ +00175b60: 7465 6374 696f 6e20 666f 7220 6170 706c tection for appl │ │ │ │ +00175b70: 6963 6174 696f 6e73 2074 6861 7420 6e65 ications that ne │ │ │ │ +00175b80: 6564 2069 742e 3c2f 703e 0a3c 703e f09f ed it.

    .

    .. │ │ │ │ +00175b90: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ +00175ba0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ +00175bb0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ +00175bc0: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .HTTP ch │ │ │ │ +00175bf0: 756e 6b65 6420 7472 616e 7366 6572 2065 unked transfer e │ │ │ │ +00175c00: 6e63 6f64 696e 673c 2f68 323e 0a3c 703e ncoding

    .

    │ │ │ │ +00175c10: 4f75 7462 6f75 6e64 2048 5454 5020 6d65 Outbound HTTP me │ │ │ │ +00175c20: 7373 6167 6573 2061 7265 206e 6f74 2063 ssages are not c │ │ │ │ +00175c30: 6875 6e6b 6564 2075 6e6c 6573 7320 7468 hunked unless th │ │ │ │ +00175c40: 6520 3c63 6f64 653e 2353 4f41 505f 494f e #SOAP_IO │ │ │ │ +00175c50: 5f43 4855 4e4b 3c2f 636f 6465 3e20 666c _CHUNK fl │ │ │ │ +00175c60: 6167 2069 7320 656e 6162 6c65 642e 2043 ag is enabled. C │ │ │ │ +00175c70: 6875 6e6b 696e 6720 6d61 7920 696d 7072 hunking may impr │ │ │ │ +00175c80: 6f76 6520 7468 6520 7370 6565 6420 6f66 ove the speed of │ │ │ │ +00175c90: 206d 6573 7361 6765 2073 656e 6469 6e67 message sending │ │ │ │ +00175ca0: 2077 6974 6820 4854 5450 2c20 6265 6361 with HTTP, beca │ │ │ │ +00175cb0: 7573 6520 7468 6520 6d65 7373 6167 6520 use the message │ │ │ │ +00175cc0: 6c65 6e67 7468 2064 6f65 7320 6e6f 7420 length does not │ │ │ │ +00175cd0: 6e65 6564 2074 6f20 6265 2064 6574 6572 need to be deter │ │ │ │ +00175ce0: 6d69 6e65 6420 696e 2061 6476 616e 6365 mined in advance │ │ │ │ +00175cf0: 2066 6f72 2074 6865 2048 5454 5020 636f for the HTTP co │ │ │ │ +00175d00: 6e74 656e 7420 6c65 6e67 7468 2068 6561 ntent length hea │ │ │ │ +00175d10: 6465 722e 3c2f 703e 0a3c 703e f09f 949d der.

    .

    .... │ │ │ │ +00175d20: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +00175d30: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +00175d40: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +00175d50: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.HTTP buf │ │ │ │ +00175d80: 6665 7265 6420 7365 6e64 733c 2f68 323e fered sends │ │ │ │ +00175d90: 0a3c 703e 5468 6520 656e 7469 7265 206f .

    The entire o │ │ │ │ +00175da0: 7574 626f 756e 6420 6d65 7373 6167 6520 utbound message │ │ │ │ +00175db0: 6361 6e20 6265 2073 746f 7265 6420 696e can be stored in │ │ │ │ +00175dc0: 2061 2062 7566 6665 7220 746f 2064 6574 a buffer to det │ │ │ │ +00175dd0: 6572 6d69 6e65 2074 6865 2048 5454 5020 ermine the HTTP │ │ │ │ +00175de0: 636f 6e74 656e 7420 6c65 6e67 7468 2072 content length r │ │ │ │ +00175df0: 6174 6865 7220 7468 616e 2074 6865 2074 ather than the t │ │ │ │ +00175e00: 776f 2d70 6861 7365 2065 6e63 6f64 696e wo-phase encodin │ │ │ │ +00175e10: 6720 7573 6564 2062 7920 6753 4f41 5020 g used by gSOAP │ │ │ │ +00175e20: 636c 6965 6e74 2d73 6964 6520 7374 7562 client-side stub │ │ │ │ +00175e30: 2066 756e 6374 696f 6e73 2061 6e64 2073 functions and s │ │ │ │ +00175e40: 6572 7665 722d 7369 6465 2073 6b65 6c65 erver-side skele │ │ │ │ +00175e50: 746f 6e20 6675 6e63 7469 6f6e 7320 6765 ton functions ge │ │ │ │ +00175e60: 6e65 7261 7465 6420 6279 2073 6f61 7063 nerated by soapc │ │ │ │ +00175e70: 7070 322c 2077 6869 6368 2070 6572 666f pp2, which perfo │ │ │ │ +00175e80: 726d 2061 2073 6570 6172 6174 6520 7061 rm a separate pa │ │ │ │ +00175e90: 7373 206f 7665 7220 7468 6520 6461 7461 ss over the data │ │ │ │ +00175ea0: 2074 6f20 6465 7465 726d 696e 6520 7468 to determine th │ │ │ │ +00175eb0: 6520 6c65 6e67 7468 206f 6620 7468 6520 e length of the │ │ │ │ +00175ec0: 6f75 7462 6f75 6e64 206d 6573 7361 6765 outbound message │ │ │ │ +00175ed0: 2e20 5365 7474 696e 6720 7468 6520 666c . Setting the fl │ │ │ │ +00175ee0: 6167 203c 636f 6465 3e23 534f 4150 5f49 ag #SOAP_I │ │ │ │ +00175ef0: 4f5f 5354 4f52 453c 2f63 6f64 653e 2066 O_STORE f │ │ │ │ +00175f00: 6f72 2074 6865 206f 7574 7075 7420 6d6f or the output mo │ │ │ │ +00175f10: 6465 2077 696c 6c20 6275 6666 6572 2074 de will buffer t │ │ │ │ +00175f20: 6865 2065 6e74 6972 6520 6d65 7373 6167 he entire messag │ │ │ │ +00175f30: 652e 2054 6869 7320 6d61 7920 6f72 206d e. This may or m │ │ │ │ +00175f40: 6179 206e 6f74 2073 7065 6564 2075 7020 ay not speed up │ │ │ │ +00175f50: 7468 6520 7472 616e 736d 6973 7369 6f6e the transmission │ │ │ │ +00175f60: 206f 6620 6d65 7373 6167 6573 2c20 6465 of messages, de │ │ │ │ +00175f70: 7065 6e64 696e 6720 6f6e 2074 6865 2063 pending on the c │ │ │ │ +00175f80: 6f6e 7465 6e74 2c20 6275 7420 6d61 7920 ontent, but may │ │ │ │ +00175f90: 7265 7175 6972 6520 7369 676e 6966 6963 require signific │ │ │ │ +00175fa0: 616e 7420 7374 6f72 6167 6520 7370 6163 ant storage spac │ │ │ │ +00175fb0: 6520 746f 2068 6f6c 6420 6c61 7267 6520 e to hold large │ │ │ │ +00175fc0: 6d65 7373 6167 6573 2074 656d 706f 7261 messages tempora │ │ │ │ +00175fd0: 7269 6c79 2e3c 2f70 3e0a 3c70 3ef0 9f94 rily.

    .

    ... │ │ │ │ +00175fe0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ +00175ff0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ +00176000: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ +00176010: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .H │ │ │ │ +00176040: 5454 5020 6175 7468 656e 7469 6361 7469 TTP authenticati │ │ │ │ +00176050: 6f6e 3c2f 6832 3e0a 3c70 3e54 6865 2066 on

    .

    The f │ │ │ │ +00176060: 6f6c 6c6f 7769 6e67 2073 6563 7469 6f6e ollowing section │ │ │ │ +00176070: 7320 6578 706c 6169 6e20 686f 7720 746f s explain how to │ │ │ │ +00176080: 2061 7574 6865 6e74 6963 6174 6520 7769 authenticate wi │ │ │ │ +00176090: 7468 2048 5454 5020 6265 6172 6572 2c20 th HTTP bearer, │ │ │ │ +001760a0: 6261 7369 632c 2064 6967 6573 742c 2061 basic, digest, a │ │ │ │ +001760b0: 6e64 204e 544c 4d2e 2050 726f 7879 2061 nd NTLM. Proxy a │ │ │ │ +001760c0: 7574 6865 6e74 6963 6174 696f 6e20 6973 uthentication is │ │ │ │ +001760d0: 2061 6c73 6f20 636f 7665 7265 642e 3c2f also covered..

    You could │ │ │ │ +001760f0: 616c 736f 2075 7365 2074 6865 2057 696e also use the Win │ │ │ │ +00176100: 496e 6574 2070 6c75 6769 6e20 6176 6169 Inet plugin avai │ │ │ │ +00176110: 6c61 626c 6520 696e 2074 6865 203c 656d lable in the gsoap/mod │ │ │ │ +00176130: 5f67 736f 6170 3c2f 636f 6465 3e3c 2f65 _gsoap directory of │ │ │ │ +00176150: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source │ │ │ │ +00176160: 2063 6f64 6520 7061 636b 6167 6520 746f code package to │ │ │ │ +00176170: 2073 696d 706c 6966 7920 496e 7465 726e simplify Intern │ │ │ │ +00176180: 6574 2061 6363 6573 7320 666f 7220 6753 et access for gS │ │ │ │ +00176190: 4f41 5020 636c 6965 6e74 2061 7070 6c69 OAP client appli │ │ │ │ +001761a0: 6361 7469 6f6e 7320 616e 6420 6465 616c cations and deal │ │ │ │ +001761b0: 2077 6974 6820 656e 6372 7970 7469 6f6e with encryption │ │ │ │ +001761c0: 2c20 7072 6f78 6965 732c 2061 6e64 2061 , proxies, and a │ │ │ │ +001761d0: 7574 6865 6e74 6963 6174 696f 6e2c 2073 uthentication, s │ │ │ │ +001761e0: 6565 2074 6865 2067 534f 4150 203c 6120 ee the gSOAP WinInet plu │ │ │ │ +00176220: 6769 6e3c 2f61 3e20 646f 6375 6d65 6e74 gin document │ │ │ │ +00176230: 6174 696f 6e2e 3c2f 703e 0a3c 703e 5468 ation.

    .

    Th │ │ │ │ +00176240: 6520 6753 4f41 5020 4355 524c 2070 6c75 e gSOAP CURL plu │ │ │ │ +00176250: 6769 6e20 6361 6e20 616c 736f 2062 6520 gin can also be │ │ │ │ +00176260: 7573 6564 2074 6f20 6465 7665 6c6f 7020 used to develop │ │ │ │ +00176270: 6753 4f41 5020 636c 6965 6e74 2061 7070 gSOAP client app │ │ │ │ +00176280: 6c69 6361 7469 6f6e 7320 616e 6420 4355 lications and CU │ │ │ │ +00176290: 524c 2069 6d70 6c65 6d65 6e74 7320 7661 RL implements va │ │ │ │ +001762a0: 7269 6f75 7320 4854 5450 2061 7574 6865 rious HTTP authe │ │ │ │ +001762b0: 6e74 6963 6174 696f 6e20 6d65 7468 6f64 ntication method │ │ │ │ +001762c0: 732c 2073 6565 2074 6865 2067 534f 4150 s, see the gSOAP │ │ │ │ +001762d0: 203c 6120 6872 6566 3d22 2e2e 2f2e 2e2f CURL plugi │ │ │ │ +00176300: 6e3c 2f61 3e20 646f 6375 6d65 6e74 6174 n documentat │ │ │ │ +00176310: 696f 6e2e 3c2f 703e 0a3c 703e f09f 949d ion.

    .

    .... │ │ │ │ +00176320: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +00176330: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +00176340: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +00176350: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>< │ │ │ │ +00176380: 2f61 3e0a 4854 5450 2062 6561 7265 7220 /a>.HTTP bearer │ │ │ │ +00176390: 6175 7468 656e 7469 6361 7469 6f6e 3c2f authentication.

    HTTP bear │ │ │ │ +001763b0: 6572 2061 7574 6865 6e74 6963 6174 696f er authenticatio │ │ │ │ +001763c0: 6e20 6973 2065 6e61 626c 6564 2061 7420 n is enabled at │ │ │ │ +001763d0: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side │ │ │ │ +001763e0: 6279 2073 6574 7469 6e67 2074 6865 203c by setting the < │ │ │ │ +001763f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ +001764b0: 703a 3a62 6561 7265 723c 2f61 3e3c 2f63 p::bearer string to t │ │ │ │ +001764d0: 6865 2062 6561 7265 7220 746f 6b65 6e3a he bearer token: │ │ │ │ +001764e0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap │ │ │ │ +00176560: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne │ │ │ │ +001765f0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    . │ │ │ │ +00176600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->b │ │ │ │ +00176690: 6561 7265 723c 2f61 3e20 3d20 3c73 7061 earer = ".. │ │ │ │ +001766c0: 2e26 7175 6f74 3b3c 2f73 7061 6e3e 3b20 ."; │ │ │ │ +001766d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so │ │ │ │ +00176710: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm │ │ │ │ +00176720: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa │ │ │ │ +00176750: 703c 2f61 3e2c 202e 2e2e 2929 3c2f 6469 p, ...)).
    ... // error │ │ │ │ +001767a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else.
    ... // OK< │ │ │ │ +00176820: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    < │ │ │ │ +00176870: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ +00176880: 6522 3e3c 6120 6872 6566 3d22 7374 7275 e">s │ │ │ │ +001768c0: 6f61 703a 3a62 6561 7265 723c 2f61 3e3c oap::bearer< │ │ │ │ +001768d0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c │ │ │ │ +001768f0: 6861 7220 2a20 6265 6172 6572 3c2f 6469 har * bearer
    User-defina │ │ │ │ +00176920: 626c 6520 4854 5450 2061 7574 686f 7269 ble HTTP authori │ │ │ │ +00176930: 7a61 7469 6f6e 2062 6561 7265 7220 746f zation bearer to │ │ │ │ +00176940: 6b65 6e20 7661 6c75 6520 746f 2062 6520 ken value to be │ │ │ │ +00176950: 7365 6e74 2062 7920 7468 6520 636c 6965 sent by the clie │ │ │ │ +00176960: 6e74 2c20 7365 7276 6572 2073 6964 6520 nt, server side │ │ │ │ +00176970: 7265 6365 6976 6573 2074 2e2e 2e3c 2f64 receives t...
    Definit │ │ │ │ +001769a0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +001769b0: 322e 683a 3337 3532 3c2f 6469 763e 3c2f 2.h:3752
    .

    . │ │ │ │ +001769e0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ +001769f0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ +00176a00: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .HTTP basic │ │ │ │ +00176a50: 2061 7574 6865 6e74 6963 6174 696f 6e3c authentication< │ │ │ │ +00176a60: 2f68 333e 0a3c 703e 4854 5450 2062 6173 /h3>.

    HTTP bas │ │ │ │ +00176a70: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio │ │ │ │ +00176a80: 6e20 6973 2065 6e61 626c 6564 2061 7420 n is enabled at │ │ │ │ +00176a90: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side │ │ │ │ +00176aa0: 6279 2073 6574 7469 6e67 2074 6865 203c by setting the < │ │ │ │ +00176ab0: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char* │ │ │ │ +00176ac0: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::u │ │ │ │ +00176b80: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid │ │ │ │ +00176b90: 2061 6e64 203c 636f 6465 3e63 6f6e 7374 and const │ │ │ │ +00176ba0: 2063 6861 722a 203c 6120 636c 6173 733d char* s │ │ │ │ +00176c60: 6f61 703a 3a70 6173 7377 643c 2f61 3e3c oap::passwd< │ │ │ │ +00176c70: 2f63 6f64 653e 2073 7472 696e 6773 2074 /code> strings t │ │ │ │ +00176c80: 6f20 6120 7573 6572 6e61 6d65 2061 6e64 o a username and │ │ │ │ +00176c90: 2070 6173 7377 6f72 642c 2072 6573 7065 password, respe │ │ │ │ +00176ca0: 6374 6976 656c 792e 2041 2073 6572 7665 ctively. A serve │ │ │ │ +00176cb0: 7220 6d61 7920 7265 7175 6573 7420 7573 r may request us │ │ │ │ +00176cc0: 6572 2061 7574 6865 6e74 6963 6174 696f er authenticatio │ │ │ │ +00176cd0: 6e20 616e 6420 6465 6e69 6573 2061 6363 n and denies acc │ │ │ │ +00176ce0: 6573 7320 2848 5454 5020 3430 3120 6572 ess (HTTP 401 er │ │ │ │ +00176cf0: 726f 7229 2077 6865 6e20 7468 6520 636c ror) when the cl │ │ │ │ +00176d00: 6965 6e74 2074 7269 6573 2074 6f20 636f ient tries to co │ │ │ │ +00176d10: 6e6e 6563 7420 7769 7468 6f75 7420 4854 nnect without HT │ │ │ │ +00176d20: 5450 2061 7574 6865 6e74 6963 6174 696f TP authenticatio │ │ │ │ +00176d30: 6e20 286f 7220 7769 7468 2074 6865 2077 n (or with the w │ │ │ │ +00176d40: 726f 6e67 2061 7574 6865 6e74 6963 6174 rong authenticat │ │ │ │ +00176d50: 696f 6e20 696e 666f 726d 6174 696f 6e29 ion information) │ │ │ │ +00176d60: 2e3c 2f70 3e0a 3c70 3e42 6173 6963 2061 .

    .

    Basic a │ │ │ │ +00176d70: 7574 6865 6e74 6963 6174 696f 6e20 7368 uthentication sh │ │ │ │ +00176d80: 6f75 6c64 206f 6e6c 7920 6265 2075 7365 ould only be use │ │ │ │ +00176d90: 6420 6f76 6572 2048 5454 5053 2c20 6265 d over HTTPS, be │ │ │ │ +00176da0: 6361 7573 6520 7468 6520 6372 6564 656e cause the creden │ │ │ │ +00176db0: 7469 616c 7320 6172 6520 7365 6e74 2069 tials are sent i │ │ │ │ +00176dc0: 6e20 7468 6520 636c 6561 7220 7769 7468 n the clear with │ │ │ │ +00176dd0: 2048 5454 502e 2053 6565 2053 6563 7469 HTTP. See Secti │ │ │ │ +00176de0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on │ │ │ │ +00176e10: 5468 6520 4854 5450 2064 6967 6573 7420 The HTTP digest │ │ │ │ +00176e20: 6175 7468 656e 7469 6361 7469 6f6e 2070 authentication p │ │ │ │ +00176e30: 6c75 6769 6e3c 2f61 3e20 746f 2075 7365 lugin to use │ │ │ │ +00176e40: 2074 6865 2048 5454 5020 6469 6765 7374 the HTTP digest │ │ │ │ +00176e50: 2070 6c75 6769 6e20 7468 6174 2069 7320 plugin that is │ │ │ │ +00176e60: 7361 6665 2066 6f72 2061 7574 6865 6e74 safe for authent │ │ │ │ +00176e70: 6963 6174 696f 6e20 6f76 6572 2048 5454 ication over HTT │ │ │ │ +00176e80: 502e 3c2f 703e 0a3c 703e 4865 7265 2069 P.

    .

    Here i │ │ │ │ +00176e90: 7320 616e 2065 7861 6d70 6c65 2063 6c69 s an example cli │ │ │ │ +00176ea0: 656e 7420 636f 6465 2066 7261 676d 656e ent code fragmen │ │ │ │ +00176eb0: 7420 746f 2073 6574 2074 6865 2048 5454 t to set the HTT │ │ │ │ +00176ec0: 5020 6175 7468 656e 7469 6361 7469 6f6e P authentication │ │ │ │ +00176ed0: 2075 7365 726e 616d 6520 616e 6420 7061 username and pa │ │ │ │ +00176ee0: 7373 776f 7264 3a3c 2f70 3e0a 3c64 6976 ssword:

    .
    struct │ │ │ │ +00176f30: 203c 2f73 7061 6e3e 3c61 2063 6c61 7373 s │ │ │ │ +00176f60: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ +00176f90: 736f 6170 3c2f 613e 203d 203c 6120 636c soap = │ │ │ │ +00176ff0: 736f 6170 5f6e 6577 3c2f 613e 2829 3b20 soap_new(); │ │ │ │ +00177000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00177040: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->userid │ │ │ │ +001770a0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ +001770c0: 7175 6f74 3b67 7565 7374 2671 756f 743b quot;guest" │ │ │ │ +001770d0: 3c2f 7370 616e 3e3b 203c 2f64 6976 3e0a ;
    . │ │ │ │ +001770e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->p │ │ │ │ +00177170: 6173 7377 643c 2f61 3e20 3d20 3c73 7061 asswd = "vi │ │ │ │ +001771a0: 7369 7426 7175 6f74 3b3c 2f73 7061 6e3e sit" │ │ │ │ +001771b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if ( │ │ │ │ +001771f0: 736f 6170 5f63 616c 6c5f 6e73 5f5f 7765 soap_call_ns__we │ │ │ │ +00177200: 626d 6574 686f 6428 3c61 2063 6c61 7373 bmethod(s │ │ │ │ +00177230: 6f61 703c 2f61 3e2c 202e 2e2e 2929 3c2f oap, ...)).
    ... // error
    .
    else │ │ │ │ +001772c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ +001772e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001772f0: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent">// success< │ │ │ │ +00177300: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .
    │ │ │ │ +001773d0: 636f 6e73 7420 6368 6172 202a 2070 6173 const char * pas │ │ │ │ +001773e0: 7377 643c 2f64 6976 3e3c 6469 7620 636c swd
    User │ │ │ │ +00177400: 2d64 6566 696e 6162 6c65 2048 5454 5020 -definable HTTP │ │ │ │ +00177410: 616e 6420 4e54 4c4d 2061 7574 686f 7269 and NTLM authori │ │ │ │ +00177420: 7a61 7469 6f6e 2070 6173 7377 6f72 6420 zation password │ │ │ │ +00177430: 7374 7269 6e67 2072 6571 7569 7265 6420 string required │ │ │ │ +00177440: 666f 7220 4854 5450 2062 6173 6963 2061 for HTTP basic a │ │ │ │ +00177450: 6e64 204e 544c 4d20 6175 7468 656e 7469 nd NTLM authenti │ │ │ │ +00177460: 632e 2e2e 3c2f 6469 763e 3c64 6976 2063 c...
    │ │ │ │ +00177480: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ +00177490: 7374 6473 6f61 7032 2e68 3a33 3832 373c stdsoap2.h:3827< │ │ │ │ +001774a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    c │ │ │ │ +00177570: 6f6e 7374 2063 6861 7220 2a20 7573 6572 onst char * user │ │ │ │ +00177580: 6964 3c2f 6469 763e 3c64 6976 2063 6c61 id
    User- │ │ │ │ +001775a0: 6465 6669 6e61 626c 6520 4854 5450 2061 definable HTTP a │ │ │ │ +001775b0: 6e64 204e 544c 4d20 6175 7468 6f72 697a nd NTLM authoriz │ │ │ │ +001775c0: 6174 696f 6e20 7573 6572 2069 6420 7374 ation user id st │ │ │ │ +001775d0: 7269 6e67 2066 6f72 2048 5454 5020 6261 ring for HTTP ba │ │ │ │ +001775e0: 7369 6320 616e 6420 4e54 4c4d 2061 7574 sic and NTLM aut │ │ │ │ +001775f0: 6865 6e74 6963 6174 696f 6e20 6279 2074 hentication by t │ │ │ │ +00177600: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ │ +00177620: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +00177630: 7464 736f 6170 322e 683a 3338 3232 3c2f tdsoap2.h:3822
    .

    When │ │ │ │ -001787b0: 7468 6520 6175 7468 656e 7469 6361 7469 the authenticati │ │ │ │ -001787c0: 6f6e 2066 6169 6c73 2c20 7468 6520 7365 on fails, the se │ │ │ │ -001787d0: 7276 6963 6520 7265 7370 6f6e 7365 2077 rvice response w │ │ │ │ -001787e0: 6974 6820 6120 534f 4150 2046 6175 6c74 ith a SOAP Fault │ │ │ │ -001787f0: 206d 6573 7361 6765 2061 6e64 2061 2048 message and a H │ │ │ │ -00178800: 5454 5020 6572 726f 7220 636f 6465 2022 TTP error code " │ │ │ │ -00178810: 3430 3120 556e 6175 7468 6f72 697a 6564 401 Unauthorized │ │ │ │ -00178820: 222e 2054 6865 2048 5454 5020 6572 726f ". The HTTP erro │ │ │ │ -00178830: 7220 636f 6465 7320 6172 6520 6465 7363 r codes are desc │ │ │ │ -00178840: 7269 6265 6420 696e 2053 6563 7469 6f6e ribed in Section │ │ │ │ -00178850: 203c 6120 636c 6173 733d 2265 6c22 2068 Run-ti │ │ │ │ -00178880: 6d65 2065 7272 6f72 2063 6f64 6573 3c2f me error codes .

    .

    To r │ │ │ │ -001788a0: 6574 7572 6e20 6120 6e6f 6e2d 534f 4150 eturn a non-SOAP │ │ │ │ -001788b0: 2065 7272 6f72 2c20 7573 653a 3c2f 703e error, use:

    │ │ │ │ -001788c0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    .

    .... Back to t │ │ │ │ -001789f0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -00178a00: 3c2f 613e 3c2f 703e 0a3c 6833 3e3c 6120

    .

    .HTTP │ │ │ │ -00178a40: 204e 544c 4d20 6175 7468 656e 7469 6361 NTLM authentica │ │ │ │ -00178a50: 7469 6f6e 3c2f 6833 3e0a 3c70 3e48 5454 tion

    .

    HTT │ │ │ │ -00178a60: 5020 4e54 4c4d 2061 7574 6865 6e74 6963 P NTLM authentic │ │ │ │ -00178a70: 6174 696f 6e20 6973 2065 6e61 626c 6564 ation is enabled │ │ │ │ -00178a80: 2061 7420 7468 6520 636c 6965 6e74 2d73 at the client-s │ │ │ │ -00178a90: 6964 6520 6279 2069 6e73 7461 6c6c 696e ide by installin │ │ │ │ -00178aa0: 6720 3c63 6f64 653e 6c69 626e 746c 6d3c g libntlm< │ │ │ │ -00178ab0: 2f63 6f64 653e 2066 726f 6d20 3c61 2068 /code> from http://www.n │ │ │ │ -00178af0: 6f6e 676e 752e 6f72 672f 6c69 626e 746c ongnu.org/libntl │ │ │ │ -00178b00: 6d3c 2f61 3e20 616e 6420 636f 6d70 696c m and compil │ │ │ │ -00178b10: 696e 6720 616c 6c20 7072 6f6a 6563 7420 ing all project │ │ │ │ -00178b20: 736f 7572 6365 2063 6f64 6573 2077 6974 source codes wit │ │ │ │ -00178b30: 6820 7468 6520 636f 6d70 696c 652d 7469 h the compile-ti │ │ │ │ -00178b40: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W │ │ │ │ -00178b50: 4954 485f 4e54 4c4d 3c2f 636f 6465 3e2e ITH_NTLM. │ │ │ │ -00178b60: 3c2f 703e 0a3c 703e 496e 2079 6f75 7220

    .

    In your │ │ │ │ -00178b70: 6170 706c 6963 6174 696f 6e20 636f 6465 application code │ │ │ │ -00178b80: 2073 6574 2074 6865 203c 636f 6465 3e63 set the c │ │ │ │ -00178b90: 6f6e 7374 2063 6861 722a 203c 6120 636c onst char* soap::userid< │ │ │ │ -00178c60: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and < │ │ │ │ -00178c70: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char* │ │ │ │ -00178c80: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::p │ │ │ │ -00178d40: 6173 7377 643c 2f61 3e3c 2f63 6f64 653e asswd │ │ │ │ -00178d50: 2073 7472 696e 6773 2074 6f20 6120 7573 strings to a us │ │ │ │ -00178d60: 6572 6e61 6d65 2061 6e64 2070 6173 7377 ername and passw │ │ │ │ -00178d70: 6f72 642e 2041 2073 6572 7665 7220 6d61 ord. A server ma │ │ │ │ -00178d80: 7920 7265 7175 6573 7420 4e54 4c4d 2061 y request NTLM a │ │ │ │ -00178d90: 7574 6865 6e74 6963 6174 696f 6e20 616e uthentication an │ │ │ │ -00178da0: 6420 6465 6e69 6573 2061 6363 6573 7320 d denies access │ │ │ │ -00178db0: 2848 5454 5020 3430 3120 6175 7468 656e (HTTP 401 authen │ │ │ │ -00178dc0: 7469 6361 7469 6f6e 2072 6571 7569 7265 tication require │ │ │ │ -00178dd0: 6420 6f72 2048 5454 5020 3430 3720 4854 d or HTTP 407 HT │ │ │ │ -00178de0: 5450 2070 726f 7879 2061 7574 6865 6e74 TP proxy authent │ │ │ │ -00178df0: 6963 6174 696f 6e20 7265 7175 6972 6564 ication required │ │ │ │ -00178e00: 2920 7768 656e 2074 6865 2063 6c69 656e ) when the clien │ │ │ │ -00178e10: 7420 7472 6965 7320 746f 2063 6f6e 6e65 t tries to conne │ │ │ │ -00178e20: 6374 2077 6974 686f 7574 2048 5454 5020 ct without HTTP │ │ │ │ -00178e30: 6175 7468 656e 7469 6361 7469 6f6e 2028 authentication ( │ │ │ │ -00178e40: 6f72 2077 6974 6820 7468 6520 7772 6f6e or with the wron │ │ │ │ -00178e50: 6720 6175 7468 656e 7469 6361 7469 6f6e g authentication │ │ │ │ -00178e60: 2069 6e66 6f72 6d61 7469 6f6e 292e 3c2f information)..

    Here is an │ │ │ │ -00178e80: 2065 7861 6d70 6c65 2063 6c69 656e 7420 example client │ │ │ │ -00178e90: 636f 6465 2066 7261 676d 656e 7420 746f code fragment to │ │ │ │ -00178ea0: 2073 6574 2074 6865 204e 544c 4d20 6175 set the NTLM au │ │ │ │ -00178eb0: 7468 656e 7469 6361 7469 6f6e 2075 7365 thentication use │ │ │ │ -00178ec0: 726e 616d 6520 616e 6420 7061 7373 776f rname and passwo │ │ │ │ -00178ed0: 7264 3a3c 2f70 3e0a 3c64 6976 2063 6c61 rd:

    ..
    if (soap_call_ns_ │ │ │ │ -001790a0: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, ...) │ │ │ │ -001790e0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    if (soap-> │ │ │ │ -00179170: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error == 401)
    .
    {
    . │ │ │ │ -00179200: 2020 2020 3c61 2063 6c61 7373 3d22 636f
    soap< │ │ │ │ -00179230: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->userid = " │ │ │ │ -001792b0: 5a61 7068 6f64 2671 756f 743b 3c2f 7370 Zaphod";
    .
    │ │ │ │ -001792e0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->p │ │ │ │ -00179360: 6173 7377 643c 2f61 3e20 3d20 3c73 7061 asswd = "Be │ │ │ │ -00179390: 6562 6c65 6272 6f78 2671 756f 743b 3c2f eblebrox";
    . │ │ │ │ -001793c0: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ -001793e0: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca │ │ │ │ -001793f0: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod │ │ │ │ -00179400: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -00179430: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .< │ │ │ │ -00179440: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00179450: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // error │ │ │ │ -00179480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else
    .
    │ │ │ │ -001794e0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su │ │ │ │ -00179500: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    }
    .< │ │ │ │ -00179530: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00179540: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    < │ │ │ │ -00179550: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -00179560: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following │ │ │ │ -00179570: 204e 544c 4d20 6861 6e64 7368 616b 6520 NTLM handshake │ │ │ │ -00179580: 6265 7477 6565 6e20 7468 6520 636c 6965 between the clie │ │ │ │ -00179590: 6e74 2043 2061 6e64 2073 6572 7665 7220 nt C and server │ │ │ │ -001795a0: 5320 6973 2070 6572 666f 726d 6564 3a20 S is performed: │ │ │ │ -001795b0: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    1: C  
    │ │ │ │ -001795d0: 2d2d 2667 743b 2053 2026 616d 703b 2050  --> S & P
    │ │ │ │ -001795e0: 4f53 5420 2e2e 2e20 0a20 2020 2020 2020  OST ... .       
    │ │ │ │ -001795f0: 2020 2020 2026 616d 703b 2043 6f6e 7465       & Conte
    │ │ │ │ -00179600: 6e74 2d54 7970 653a 2074 6578 742f 786d  nt-Type: text/xm
    │ │ │ │ -00179610: 6c3b 2063 6861 7273 6574 3d75 7466 2d38  l; charset=utf-8
    │ │ │ │ -00179620: 200a 0a32 3a20 4320 266c 743b 2d2d 2020   ..2: C <--  
    │ │ │ │ -00179630: 5320 2661 6d70 3b20 3430 3120 556e 6175  S & 401 Unau
    │ │ │ │ -00179640: 7468 6f72 697a 6564 200a 2020 2020 2020  thorized .      
    │ │ │ │ -00179650: 2020 2020 2020 2661 6d70 3b20 5757 572d        & WWW-
    │ │ │ │ -00179660: 4175 7468 656e 7469 6361 7465 3a20 4e54  Authenticate: NT
    │ │ │ │ -00179670: 4c4d 200a 0a33 3a20 4320 202d 2d26 6774  LM ..3: C  -->
    │ │ │ │ -00179680: 3b20 5320 2661 6d70 3b20 4745 5420 2e2e  ; S & GET ..
    │ │ │ │ -00179690: 2e20 0a20 2020 2020 2020 2020 2020 2026  . .            &
    │ │ │ │ -001796a0: 616d 703b 2041 7574 686f 7269 7a61 7469  amp; Authorizati
    │ │ │ │ -001796b0: 6f6e 3a20 4e54 4c4d 2026 6c74 3b62 6173  on: NTLM <bas
    │ │ │ │ -001796c0: 6536 342d 656e 636f 6465 6420 7479 7065  e64-encoded type
    │ │ │ │ -001796d0: 2d31 2d6d 6573 7361 6765 2667 743b 200a  -1-message> .
    │ │ │ │ -001796e0: 0a34 3a20 4320 266c 743b 2d2d 2020 5320  .4: C <--  S 
    │ │ │ │ -001796f0: 2661 6d70 3b20 3430 3120 556e 6175 7468  & 401 Unauth
    │ │ │ │ -00179700: 6f72 697a 6564 200a 2020 2020 2020 2020  orized .        
    │ │ │ │ -00179710: 2020 2020 2661 6d70 3b20 5757 572d 4175      & WWW-Au
    │ │ │ │ -00179720: 7468 656e 7469 6361 7465 3a20 4e54 4c4d  thenticate: NTLM
    │ │ │ │ -00179730: 2026 6c74 3b62 6173 6536 342d 656e 636f   <base64-enco
    │ │ │ │ -00179740: 6465 6420 7479 7065 2d32 2d6d 6573 7361  ded type-2-messa
    │ │ │ │ -00179750: 6765 2667 743b 200a 0a35 3a20 4320 202d  ge> ..5: C  -
    │ │ │ │ -00179760: 2d26 6774 3b20 5320 2661 6d70 3b20 504f  -> S & PO
    │ │ │ │ -00179770: 5354 202e 2e2e 200a 2020 2020 2020 2020  ST ... .        
    │ │ │ │ -00179780: 2020 2020 2661 6d70 3b20 436f 6e74 656e      & Conten
    │ │ │ │ -00179790: 742d 5479 7065 3a20 7465 7874 2f78 6d6c  t-Type: text/xml
    │ │ │ │ -001797a0: 3b20 6368 6172 7365 743d 7574 662d 3820  ; charset=utf-8 
    │ │ │ │ -001797b0: 0a20 2020 2020 2020 2020 2020 2026 616d  .            &am
    │ │ │ │ -001797c0: 703b 2041 7574 686f 7269 7a61 7469 6f6e  p; Authorization
    │ │ │ │ -001797d0: 3a20 4e54 4c4d 2026 6c74 3b62 6173 6536  : NTLM <base6
    │ │ │ │ -001797e0: 342d 656e 636f 6465 6420 7479 7065 2d33  4-encoded type-3
    │ │ │ │ -001797f0: 2d6d 6573 7361 6765 2667 743b 200a 0a36  -message> ..6
    │ │ │ │ -00179800: 3a20 4320 266c 743b 2d2d 2020 5320 2661  : C <--  S &a
    │ │ │ │ -00179810: 6d70 3b20 3230 3020 4f4b 0a3c 2f70 7265  mp; 200 OK.

    where stage │ │ │ │ -00179830: 7320 3120 616e 6420 3220 696e 6469 6361 s 1 and 2 indica │ │ │ │ -00179840: 7465 7320 6120 636c 6965 6e74 2061 7474 tes a client att │ │ │ │ -00179850: 656d 7074 696e 6720 746f 2063 6f6e 6e65 empting to conne │ │ │ │ -00179860: 6374 2077 6974 686f 7574 2061 7574 686f ct without autho │ │ │ │ -00179870: 7269 7a61 7469 6f6e 2069 6e66 6f72 6d61 rization informa │ │ │ │ -00179880: 7469 6f6e 2c20 7768 6963 6820 6973 2074 tion, which is t │ │ │ │ -00179890: 6865 2066 6972 7374 206d 6574 686f 6420 he first method │ │ │ │ -001798a0: 6361 6c6c 2069 6e20 7468 6520 636f 6465 call in the code │ │ │ │ -001798b0: 2061 626f 7665 2e20 5374 6167 6520 3320 above. Stage 3 │ │ │ │ -001798c0: 746f 2036 2068 6170 7065 6e20 7769 7468 to 6 happen with │ │ │ │ -001798d0: 2074 6865 2070 726f 7065 7220 636c 6965 the proper clie │ │ │ │ -001798e0: 6e74 2061 7574 6865 6e74 6963 6174 696f nt authenticatio │ │ │ │ -001798f0: 6e20 7365 7420 7769 7468 203c 636f 6465 n set with const char* soap::useri │ │ │ │ -001799d0: 643c 2f61 3e3c 2f63 6f64 653e 2061 6e64 d and │ │ │ │ -001799e0: 203c 636f 6465 3e63 6f6e 7374 2063 6861 const cha │ │ │ │ -001799f0: 722a 203c 6120 636c 6173 733d 2265 6c22 r* soap: │ │ │ │ -00179ab0: 3a70 6173 7377 643c 2f61 3e3c 2f63 6f64 :passwd. Optionally, │ │ │ │ -00179ad0: 7468 6520 3c63 6f64 653e 636f 6e73 7420 the const │ │ │ │ -00179ae0: 6368 6172 2a20 3c61 2063 6c61 7373 3d22 char* so │ │ │ │ -00179ba0: 6170 3a3a 6175 7468 7265 616c 6d3c 2f61 ap::authrealm string │ │ │ │ -00179bc0: 7368 6f75 6c64 2062 6520 7365 7420 6173 should be set as │ │ │ │ -00179bd0: 2077 656c 6c20 746f 2069 6e64 6963 6174 well to indicat │ │ │ │ -00179be0: 6520 7468 6520 646f 6d61 696e 2061 6363 e the domain acc │ │ │ │ -00179bf0: 6573 7365 6420 2874 6869 7320 7374 7269 essed (this stri │ │ │ │ -00179c00: 6e67 2069 7320 6e6f 726d 616c 6c79 2073 ng is normally s │ │ │ │ -00179c10: 6574 2077 6865 6e20 7468 6520 7365 7276 et when the serv │ │ │ │ -00179c20: 6572 2072 6573 706f 6e64 7320 7769 7468 er responds with │ │ │ │ -00179c30: 2048 5454 5020 3430 3120 736f 2074 6865 HTTP 401 so the │ │ │ │ -00179c40: 2063 6c69 656e 7420 7265 6365 6976 6573 client receives │ │ │ │ -00179c50: 2074 6869 7320 7365 7276 6572 2064 6f6d this server dom │ │ │ │ -00179c60: 6169 6e20 696e 666f 726d 6174 696f 6e29 ain information) │ │ │ │ -00179c70: 2e20 4e54 4c4d 2061 7574 6865 6e74 6963 . NTLM authentic │ │ │ │ -00179c80: 6174 6573 2063 6f6e 6e65 6374 696f 6e73 ates connections │ │ │ │ -00179c90: 2c20 6e6f 7420 7265 7175 6573 7473 2e20 , not requests. │ │ │ │ -00179ca0: 5768 656e 2074 6865 2063 6f6e 6e65 6374 When the connect │ │ │ │ -00179cb0: 696f 6e20 6973 206b 6570 7420 616c 6976 ion is kept aliv │ │ │ │ -00179cc0: 652c 2073 7562 7365 7175 656e 7420 6d65 e, subsequent me │ │ │ │ -00179cd0: 7373 6167 6573 2063 616e 2062 6520 6578 ssages can be ex │ │ │ │ -00179ce0: 6368 616e 6765 6420 7769 7468 6f75 7420 changed without │ │ │ │ -00179cf0: 7265 2d61 7574 6865 6e74 6963 6174 696f re-authenticatio │ │ │ │ -00179d00: 6e2e 3c2f 703e 0a3c 703e 546f 2061 766f n.

    .

    To avo │ │ │ │ -00179d10: 6964 2074 6865 206f 7665 7268 6561 6420 id the overhead │ │ │ │ -00179d20: 6f66 2074 6865 2066 6972 7374 2072 656a of the first rej │ │ │ │ -00179d30: 6563 7465 6420 6361 6c6c 2c20 7573 653a ected call, use: │ │ │ │ -00179d40: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap │ │ │ │ -00179dc0: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne │ │ │ │ -00179e50: 7731 3c2f 613e 283c 6120 636c 6173 733d w1(SOAP_I │ │ │ │ -00179eb0: 4f5f 4b45 4550 414c 4956 453c 2f61 3e29 O_KEEPALIVE) │ │ │ │ -00179ec0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap->< │ │ │ │ -00179f10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00179f20: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00179f30: 6874 6d6c 2361 6632 6339 6537 3736 3136 html#af2c9e77616 │ │ │ │ -00179f40: 6331 3332 3833 3165 6266 3034 3164 3965 c132831ebf041d9e │ │ │ │ -00179f50: 3464 3138 6231 223e 6e74 6c6d 5f63 6861 4d18b1">ntlm_cha │ │ │ │ -00179f60: 6c6c 656e 6765 3c2f 613e 203d 203c 7370 llenge = "& │ │ │ │ -00179f90: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    so │ │ │ │ -00179fe0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->userid = │ │ │ │ -0017a040: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -0017a060: 6f74 3b5a 6170 686f 6426 7175 6f74 3b3c ot;Zaphod"< │ │ │ │ -0017a070: 2f73 7061 6e3e 3b20 3c2f 6469 763e 0a3c /span>;
    .< │ │ │ │ -0017a080: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0017a090: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ -0017a0c0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pa │ │ │ │ -0017a110: 7373 7764 3c2f 613e 203d 203c 7370 616e sswd = "Bee │ │ │ │ -0017a140: 626c 6562 726f 7826 7175 6f74 3b3c 2f73 blebrox"
    ;
    .< │ │ │ │ -0017a170: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0017a180: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0017a190: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -0017a1a0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth │ │ │ │ -0017a1f0: 7265 616c 6d3c 2f61 3e20 3d20 3c73 7061 realm = "Ur │ │ │ │ -0017a220: 7361 2d4d 696e 6f72 2671 756f 743b 3c2f sa-Minor";
    . │ │ │ │ -0017a250: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n │ │ │ │ -0017a280: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(soap, .. │ │ │ │ -0017a2c0: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))

    .
    . │ │ │ │ -0017a2e0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro │ │ │ │ -0017a300: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .< │ │ │ │ -0017a310: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0017a320: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else< │ │ │ │ -0017a340: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -0017a360: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su │ │ │ │ -0017a380: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    co │ │ │ │ -0017a460: 6e73 7420 6368 6172 202a 206e 746c 6d5f nst char * ntlm_ │ │ │ │ -0017a470: 6368 616c 6c65 6e67 653c 2f64 6976 3e3c challenge
    < │ │ │ │ -0017a480: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -0017a490: 223e 5573 6572 2d64 6566 696e 6162 6c65 ">User-definable │ │ │ │ -0017a4a0: 204e 544c 4d20 6175 7468 656e 7469 6361 NTLM authentica │ │ │ │ -0017a4b0: 7469 6f6e 2063 6861 6c6c 656e 6765 206b tion challenge k │ │ │ │ -0017a4c0: 6579 2073 7472 696e 672e 3c2f 6469 763e ey string.
    │ │ │ │ -0017a4d0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -0017a4f0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -0017a500: 3a33 3837 383c 2f64 6976 3e3c 2f64 6976 :3878
    .

    When │ │ │ │ -0017a530: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat │ │ │ │ -0017a540: 696f 6e20 6661 696c 7320 2873 7461 6765 ion fails (stage │ │ │ │ -0017a550: 2031 2061 6e64 2032 292c 2074 6865 2073 1 and 2), the s │ │ │ │ -0017a560: 6572 7669 6365 2072 6573 706f 6e73 6520 ervice response │ │ │ │ -0017a570: 7769 7468 2048 5454 5020 6572 726f 7220 with HTTP error │ │ │ │ -0017a580: 636f 6465 2022 3430 3120 556e 6175 7468 code "401 Unauth │ │ │ │ -0017a590: 6f72 697a 6564 2220 616e 6420 3c63 6f64 orized" and soap::er │ │ │ │ -0017a650: 726f 723c 2f61 3e3c 2f63 6f64 653e 2069 ror i │ │ │ │ -0017a660: 7320 7365 7420 746f 2048 5454 5020 636f s set to HTTP co │ │ │ │ -0017a670: 6465 2034 3031 2e3c 2f70 3e0a 3c70 3ef0 de 401.

    .

    . │ │ │ │ -0017a680: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -0017a690: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -0017a6a0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .HTTP p │ │ │ │ -0017a6f0: 726f 7879 204e 544c 4d20 6175 7468 656e roxy NTLM authen │ │ │ │ -0017a700: 7469 6361 7469 6f6e 3c2f 6833 3e0a 3c70 tication

    .

    For HTTP 407 Pr │ │ │ │ -0017a720: 6f78 7920 4175 7468 656e 7469 6361 7469 oxy Authenticati │ │ │ │ -0017a730: 6f6e 2052 6571 7569 7265 6420 7365 7420 on Required set │ │ │ │ -0017a740: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::p │ │ │ │ -0017a800: 726f 7879 5f75 7365 7269 643c 2f61 3e3c roxy_userid< │ │ │ │ -0017a810: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap::proxy_pas │ │ │ │ -0017a8e0: 7377 643c 2f61 3e3c 2f63 6f64 653e 3a3c swd:< │ │ │ │ -0017a8f0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct │ │ │ │ -0017a940: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -0017a970: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -0017a9a0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new │ │ │ │ -0017aa00: 313c 2f61 3e28 3c61 2063 6c61 7373 3d22 1(SOAP_IO │ │ │ │ -0017aa60: 5f4b 4545 5041 4c49 5645 3c2f 613e 293b _KEEPALIVE); │ │ │ │ -0017aa70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->proxy_hos │ │ │ │ -0017ab10: 743c 2f61 3e20 3d20 3c73 7061 6e20 636c t = "...&qu │ │ │ │ -0017ab40: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    soap │ │ │ │ -0017ab90: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->proxy_port │ │ │ │ -0017abf0: 203d 202e 2e2e 3b20 3c2f 6469 763e 0a3c = ...;
    .< │ │ │ │ -0017ac00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0017ac10: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >if
    (soap_call_ │ │ │ │ -0017ac40: 6e73 5f5f 7765 626d 6574 686f 6428 3c61 ns__webmethod(soap, . │ │ │ │ -0017ac80: 2e2e 2929 203c 2f64 6976 3e0a 3c64 6976 ..))
    .
    {< │ │ │ │ -0017aca0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (< │ │ │ │ -0017ace0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0017acf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0017ad00: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -0017ad10: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;erro │ │ │ │ -0017ad60: 723c 2f61 3e20 3d3d 2034 3037 2920 3c2f r == 407) .
    {
    │ │ │ │ -0017ad90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    so │ │ │ │ -0017add0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->proxy_userid │ │ │ │ -0017ae30: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Zaphod& │ │ │ │ -0017ae60: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    soap->< │ │ │ │ -0017aec0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0017aed0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0017aee0: 6874 6d6c 2361 6437 3561 3461 6265 3131 html#ad75a4abe11 │ │ │ │ -0017aef0: 3961 3161 3734 6132 3664 3036 3430 3166 9a1a74a26d06401f │ │ │ │ -0017af00: 6131 3163 3361 223e 7072 6f78 795f 7061 a11c3a">proxy_pa │ │ │ │ -0017af10: 7373 7764 3c2f 613e 203d 203c 7370 616e sswd = "Bee │ │ │ │ -0017af40: 626c 6562 726f 7826 7175 6f74 3b3c 2f73 blebrox";
    . │ │ │ │ -0017af70: 2020 203c 6120 636c 6173 733d 2263 6f64 soap-> │ │ │ │ -0017aff0: 6175 7468 7265 616c 6d3c 2f61 3e20 3d20 authrealm = │ │ │ │ -0017b000: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -0017b020: 743b 5572 7361 2d4d 696e 6f72 2671 756f t;Ursa-Minor&quo │ │ │ │ -0017b030: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;;
    .
    if (soa │ │ │ │ -0017b080: 705f 6361 6c6c 5f6e 735f 5f77 6562 6d65 p_call_ns__webme │ │ │ │ -0017b090: 7468 6f64 283c 6120 636c 6173 733d 2263 thod(soap │ │ │ │ -0017b0c0: 3c2f 613e 2c20 2e2e 2e29 2920 3c2f 6469 , ...)) .
    ... < │ │ │ │ -0017b0f0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0017b100: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent">// error
    .
    │ │ │ │ -0017b130: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ -0017b150: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -0017b170: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... / │ │ │ │ -0017b190: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success │ │ │ │ -0017b1a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0017b1f0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    in │ │ │ │ -0017b270: 7420 7072 6f78 795f 706f 7274 3c2f 6469 t proxy_port
    User-defina │ │ │ │ -0017b2a0: 626c 6520 7072 6f78 7920 706f 7274 2077 ble proxy port w │ │ │ │ -0017b2b0: 6869 6368 2073 686f 756c 6420 6265 2073 hich should be s │ │ │ │ -0017b2c0: 6574 2074 6f20 636f 6e6e 6563 7420 7468 et to connect th │ │ │ │ -0017b2d0: 726f 7567 6820 616e 2048 5454 5020 7072 rough an HTTP pr │ │ │ │ -0017b2e0: 6f78 7920 2874 6865 2076 616c 7565 2069 oxy (the value i │ │ │ │ -0017b2f0: 7320 3830 3830 2062 7920 2e2e 2e3c 2f64 s 8080 by ...
    Definit │ │ │ │ -0017b320: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ -0017b330: 322e 683a 3339 3036 3c2f 6469 763e 3c2f 2.h:3906
    .
    co │ │ │ │ -0017b410: 6e73 7420 6368 6172 202a 2070 726f 7879 nst char * proxy │ │ │ │ -0017b420: 5f75 7365 7269 643c 2f64 6976 3e3c 6469 _userid
    │ │ │ │ -0017b440: 5573 6572 2d64 6566 696e 6162 6c65 2070 User-definable p │ │ │ │ -0017b450: 726f 7879 2061 7574 686f 7269 7a61 7469 roxy authorizati │ │ │ │ -0017b460: 6f6e 2075 7365 7220 6964 2073 7472 696e on user id strin │ │ │ │ -0017b470: 6720 746f 2061 7574 6865 6e74 6963 6174 g to authenticat │ │ │ │ -0017b480: 6520 616e 6420 636f 6e6e 6563 7420 746f e and connect to │ │ │ │ -0017b490: 2061 6e20 4854 5450 2070 726f 7879 2e3c an HTTP proxy.< │ │ │ │ -0017b4a0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -0017b4c0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -0017b4d0: 6170 322e 683a 3339 3131 3c2f 6469 763e ap2.h:3911
    │ │ │ │ -0017b4e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -0017b530: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    co │ │ │ │ -0017b5b0: 6e73 7420 6368 6172 202a 2070 726f 7879 nst char * proxy │ │ │ │ -0017b5c0: 5f68 6f73 743c 2f64 6976 3e3c 6469 7620 _host
    Us │ │ │ │ -0017b5e0: 6572 2d64 6566 696e 6162 6c65 2070 726f er-definable pro │ │ │ │ -0017b5f0: 7879 2068 6f73 7420 6e61 6d65 2073 7472 xy host name str │ │ │ │ -0017b600: 696e 6720 7768 6963 6820 7368 6f75 6c64 ing which should │ │ │ │ -0017b610: 2062 6520 7365 7420 746f 2063 6f6e 6e65 be set to conne │ │ │ │ -0017b620: 6374 2074 6872 6f75 6768 2061 6e20 4854 ct through an HT │ │ │ │ -0017b630: 5450 2070 726f 7879 2e3c 2f64 6976 3e3c TP proxy.
    < │ │ │ │ -0017b640: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ -0017b650: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ -0017b660: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ -0017b670: 3339 3031 3c2f 6469 763e 3c2f 6469 763e 3901
    │ │ │ │ -0017b680: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap:: │ │ │ │ -0017b720: 7072 6f78 795f 7061 7373 7764 3c2f 613e proxy_passwd │ │ │ │ -0017b730: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const │ │ │ │ -0017b750: 6368 6172 202a 2070 726f 7879 5f70 6173 char * proxy_pas │ │ │ │ -0017b760: 7377 643c 2f64 6976 3e3c 6469 7620 636c swd
    User │ │ │ │ -0017b780: 2d64 6566 696e 6162 6c65 2070 726f 7879 -definable proxy │ │ │ │ -0017b790: 2061 7574 686f 7269 7a61 7469 6f6e 2070 authorization p │ │ │ │ -0017b7a0: 6173 7377 6f72 6420 7374 7269 6e67 2074 assword string t │ │ │ │ -0017b7b0: 6f20 6175 7468 656e 7469 6361 7465 2061 o authenticate a │ │ │ │ -0017b7c0: 6e64 2063 6f6e 6e65 6374 2074 6f20 616e nd connect to an │ │ │ │ -0017b7d0: 2048 5454 5020 7072 6f78 792e 3c2f 6469 HTTP proxy.
    Definiti │ │ │ │ -0017b800: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ -0017b810: 2e68 3a33 3931 363c 2f64 6976 3e3c 2f64 .h:3916
    .

    To │ │ │ │ -0017b840: 2061 766f 6964 2074 6865 206f 7665 7268 avoid the overh │ │ │ │ -0017b850: 6561 6420 6f66 2074 6865 2066 6972 7374 ead of the first │ │ │ │ -0017b860: 2072 656a 6563 7465 6420 6361 6c6c 2c20 rejected call, │ │ │ │ -0017b870: 7573 653a 3c2f 703e 0a3c 6469 7620 636c use:

    ..< │ │ │ │ -0017ba10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0017ba20: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0017ba30: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ -0017ba40: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;prox │ │ │ │ -0017ba90: 795f 686f 7374 3c2f 613e 203d 203c 7370 y_host = ". │ │ │ │ -0017bac0: 2e2e 2671 756f 743b 3c2f 7370 616e 3e3b .."; │ │ │ │ -0017bad0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->proxy_por │ │ │ │ -0017bb70: 743c 2f61 3e20 3d20 2e2e 2e3b 203c 2f64 t = ...; .
    soa │ │ │ │ -0017bbc0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->proxy_userid< │ │ │ │ -0017bc20: 2f61 3e20 3d20 3c73 7061 6e20 636c 6173 /a> = "Zaphod&q │ │ │ │ -0017bc50: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; ..
    soap->authrealm │ │ │ │ -0017bde0: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Ursa-Mi │ │ │ │ -0017be10: 6e6f 7226 7175 6f74 3b3c 2f73 7061 6e3e nor" │ │ │ │ -0017be20: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap->< │ │ │ │ -0017be70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0017be80: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0017be90: 6874 6d6c 2361 6632 6339 6537 3736 3136 html#af2c9e77616 │ │ │ │ -0017bea0: 6331 3332 3833 3165 6266 3034 3164 3965 c132831ebf041d9e │ │ │ │ -0017beb0: 3464 3138 6231 223e 6e74 6c6d 5f63 6861 4d18b1">ntlm_cha │ │ │ │ -0017bec0: 6c6c 656e 6765 3c2f 613e 203d 203c 7370 llenge = "& │ │ │ │ -0017bef0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    if (soap │ │ │ │ -0017bf40: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet │ │ │ │ -0017bf50: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap< │ │ │ │ -0017bf80: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...))
    .
    ... │ │ │ │ -0017bfc0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error< │ │ │ │ -0017bfd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else.
    ... // success
    .
    │ │ │ │ -0017c060: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This will │ │ │ │ -0017f6e0: 2072 6573 756c 7420 696e 2061 2074 696d result in a tim │ │ │ │ -0017f6f0: 656f 7574 2069 6620 6e6f 2064 6174 6120 eout if no data │ │ │ │ -0017f700: 6361 6e20 6265 2073 656e 6420 696e 2031 can be send in 1 │ │ │ │ -0017f710: 3020 7365 636f 6e64 7320 616e 6420 6e6f 0 seconds and no │ │ │ │ -0017f720: 2064 6174 6120 6973 2072 6563 6569 7665 data is receive │ │ │ │ -0017f730: 6420 7769 7468 696e 2031 3020 7365 636f d within 10 seco │ │ │ │ -0017f740: 6e64 7320 6166 7465 7220 696e 6974 6961 nds after initia │ │ │ │ -0017f750: 7469 6e67 2061 2073 656e 6420 6f72 2072 ting a send or r │ │ │ │ -0017f760: 6563 6569 7665 206f 7065 7261 7469 6f6e eceive operation │ │ │ │ -0017f770: 206f 7665 7220 7468 6520 736f 636b 6574 over the socket │ │ │ │ -0017f780: 2e20 4120 7661 6c75 6520 6f66 207a 6572 . A value of zer │ │ │ │ -0017f790: 6f20 6469 7361 626c 6573 2074 696d 656f o disables timeo │ │ │ │ -0017f7a0: 7574 2c20 666f 7220 6578 616d 706c 653a ut, for example: │ │ │ │ -0017f7b0: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    struct soap │ │ │ │ -0017f830: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap = soap_ne │ │ │ │ -0017f8c0: 773c 2f61 3e28 293b 203c 2f64 6976 3e0a w();
    . │ │ │ │ -0017f8d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->s │ │ │ │ -0017f960: 656e 645f 7469 6d65 6f75 743c 2f61 3e20 end_timeout │ │ │ │ -0017f970: 3d20 303b 203c 2f64 6976 3e0a 3c64 6976 = 0;
    .
    soap-&g │ │ │ │ -0017f9c0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;recv_ │ │ │ │ -0017fa10: 7469 6d65 6f75 743c 2f61 3e20 3d20 303b timeout = 0; │ │ │ │ -0017fa20: 2020 3c2f 6469 763e 0a3c 6469 7620 636c
    .
    soap->< │ │ │ │ -0017fa70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -0017fa80: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -0017fa90: 6874 6d6c 2361 6335 6435 6662 3932 6666 html#ac5d5fb92ff │ │ │ │ -0017faa0: 6664 6137 3234 6363 6233 6230 3338 6432 fda724ccb3b038d2 │ │ │ │ -0017fab0: 6262 3233 3838 223e 7265 6376 5f74 696d bb2388">recv_tim │ │ │ │ -0017fac0: 656f 7574 3c2f 613e 203d 2030 3b20 3c2f eout = 0; .

    W │ │ │ │ -0017faf0: 6865 6e20 6120 7469 6d65 6f75 7420 6f63 hen a timeout oc │ │ │ │ -0017fb00: 6375 7273 2069 6e20 7468 6520 7365 6e64 curs in the send │ │ │ │ -0017fb10: 206f 7220 7265 6365 6976 6520 6f70 6572 or receive oper │ │ │ │ -0017fb20: 6174 696f 6e73 2c20 6120 3c63 6f64 653e ations, a │ │ │ │ -0017fb30: 2353 4f41 505f 454f 463c 2f63 6f64 653e #SOAP_EOF │ │ │ │ -0017fb40: 2065 7863 6570 7469 6f6e 2077 696c 6c20 exception will │ │ │ │ -0017fb50: 6265 2072 6169 7365 6420 2822 656e 6420 be raised ("end │ │ │ │ -0017fb60: 6f66 2066 696c 6520 6f72 206e 6f20 696e of file or no in │ │ │ │ -0017fb70: 7075 7422 292e 204e 6567 6174 6976 6520 put"). Negative │ │ │ │ -0017fb80: 7469 6d65 6f75 7420 7661 6c75 6573 206d timeout values m │ │ │ │ -0017fb90: 6561 7375 7265 2074 696d 656f 7574 7320 easure timeouts │ │ │ │ -0017fba0: 696e 206d 6963 726f 7365 636f 6e64 732c in microseconds, │ │ │ │ -0017fbb0: 2066 6f72 2065 7861 6d70 6c65 3a3c 2f70 for example:

    .
    #define uSe │ │ │ │ -0017fc10: 6320 2a2d 3120 3c2f 7370 616e 3e3c 2f64 c *-1 .
    #define mSec *- │ │ │ │ -0017fc60: 3130 3030 203c 2f73 7061 6e3e 3c2f 6469 1000 if │ │ │ │ +00178010: 3c2f 7370 616e 3e20 2821 3c61 2063 6c61 (!soap->userid
    .
    || │ │ │ │ +001780c0: 213c 6120 636c 6173 733d 2263 6f64 6522 !soap │ │ │ │ +001780f0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pa │ │ │ │ +00178140: 7373 7764 3c2f 613e 3c2f 6469 763e 0a3c sswd
    .< │ │ │ │ +00178150: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00178160: 3e20 2020 7c7c 2073 7472 636d 7028 3c61 > || strcmp(soap-&g │ │ │ │ +001781a0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;useri │ │ │ │ +001781f0: 643c 2f61 3e2c 203c 7370 616e 2063 6c61 d, "guest&q │ │ │ │ +00178220: 756f 743b 3c2f 7370 616e 3e29 3c2f 6469 uot;).
    || strcm │ │ │ │ +00178250: 7028 3c61 2063 6c61 7373 3d22 636f 6465 p(soap->p │ │ │ │ +001782d0: 6173 7377 643c 2f61 3e2c 203c 7370 616e asswd, "vis │ │ │ │ +00178300: 6974 2671 756f 743b 3c2f 7370 616e 3e29 it") │ │ │ │ +00178310: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    soap->< │ │ │ │ +00178380: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00178390: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001783a0: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f │ │ │ │ +001783b0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7 │ │ │ │ +001783c0: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd">authreal │ │ │ │ +001783d0: 6d3c 2f61 3e20 3d20 3c73 7061 6e20 636c m = "...&qu │ │ │ │ +00178400: 6f74 3b3c 2f73 7061 6e3e 3b20 3c73 7061 ot;; // domain real │ │ │ │ +00178430: 6d20 6163 6365 7373 6564 2028 6f70 7469 m accessed (opti │ │ │ │ +00178440: 6f6e 616c 2c20 4e55 4c4c 2074 6f20 6f6d onal, NULL to om │ │ │ │ +00178450: 6974 293c 2f73 7061 6e3e 3c2f 6469 763e it)
    │ │ │ │ +00178460: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return 4 │ │ │ │ +001784a0: 3031 3b20 3c2f 6469 763e 0a3c 6469 7620 01;
    .
    } │ │ │ │ +001784c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ +001784e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001784f0: 656e 7422 3e2f 2f20 7765 626d 6574 686f ent">// webmetho │ │ │ │ +00178500: 6420 6c6f 6769 633c 2f73 7061 6e3e 3c2f d logic.
    return │ │ │ │ +00178550: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_OK │ │ │ │ +001785b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    }
    .
    < │ │ │ │ +00178630: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ +00178640: 6170 2e68 746d 6c23 6138 6462 6535 3764 ap.html#a8dbe57d │ │ │ │ +00178650: 3539 6636 3833 6439 3933 3035 6134 3462 59f683d99305a44b │ │ │ │ +00178660: 3464 3739 3339 6266 6422 3e73 6f61 703a 4d7939bfd">soap: │ │ │ │ +00178670: 3a61 7574 6872 6561 6c6d 3c2f 613e 3c2f :authrealm
    const ch │ │ │ │ +001786a0: 6172 202a 2061 7574 6872 6561 6c6d 3c2f ar * authrealm
    The HTTP │ │ │ │ +001786d0: 616e 6420 4e54 4c4d 2061 7574 686f 7269 and NTLM authori │ │ │ │ +001786e0: 7a61 7469 6f6e 2072 6561 6c6d 2f64 6f6d zation realm/dom │ │ │ │ +001786f0: 6169 6e20 7374 7269 6e67 2072 6563 6569 ain string recei │ │ │ │ +00178700: 7665 6420 6279 2074 6865 2063 6c69 656e ved by the clien │ │ │ │ +00178710: 7420 7769 7468 2074 6865 2057 5757 2d41 t with the WWW-A │ │ │ │ +00178720: 7574 6865 6e74 6963 6174 6520 2e2e 2e3c uthenticate ...< │ │ │ │ +00178730: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +00178750: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +00178760: 6170 322e 683a 3338 3332 3c2f 6469 763e ap2.h:3832
    │ │ │ │ +00178770: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    When the authen │ │ │ │ +001787a0: 7469 6361 7469 6f6e 2066 6169 6c73 2c20 tication fails, │ │ │ │ +001787b0: 7468 6520 7365 7276 6963 6520 7265 7370 the service resp │ │ │ │ +001787c0: 6f6e 7365 2077 6974 6820 6120 534f 4150 onse with a SOAP │ │ │ │ +001787d0: 2046 6175 6c74 206d 6573 7361 6765 2061 Fault message a │ │ │ │ +001787e0: 6e64 2061 2048 5454 5020 6572 726f 7220 nd a HTTP error │ │ │ │ +001787f0: 636f 6465 2022 3430 3120 556e 6175 7468 code "401 Unauth │ │ │ │ +00178800: 6f72 697a 6564 222e 2054 6865 2048 5454 orized". The HTT │ │ │ │ +00178810: 5020 6572 726f 7220 636f 6465 7320 6172 P error codes ar │ │ │ │ +00178820: 6520 6465 7363 7269 6265 6420 696e 2053 e described in S │ │ │ │ +00178830: 6563 7469 6f6e 203c 6120 636c 6173 733d ection │ │ │ │ +00178860: 5275 6e2d 7469 6d65 2065 7272 6f72 2063 Run-time error c │ │ │ │ +00178870: 6f64 6573 3c2f 613e 202e 3c2f 703e 0a3c odes .

    .< │ │ │ │ +00178880: 703e 546f 2072 6574 7572 6e20 6120 6e6f p>To return a no │ │ │ │ +00178890: 6e2d 534f 4150 2065 7272 6f72 2c20 7573 n-SOAP error, us │ │ │ │ +001788a0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +001788d0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001788e0: 6f72 6466 6c6f 7722 3e72 6574 7572 6e3c ordflow">return< │ │ │ │ +001788f0: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> soap_send │ │ │ │ +00178950: 5f65 6d70 7479 5f72 6573 706f 6e73 653c _empty_response< │ │ │ │ +00178960: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ +00178990: 2f61 3e2c 2034 3031 293b 203c 2f64 6976 /a>, 401);
    .

    .... │ │ │ │ +001789c0: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +001789d0: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +001789e0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +001789f0: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.HTTP NTLM auth │ │ │ │ +00178a30: 656e 7469 6361 7469 6f6e 3c2f 6833 3e0a entication. │ │ │ │ +00178a40: 3c70 3e48 5454 5020 4e54 4c4d 2061 7574

    HTTP NTLM aut │ │ │ │ +00178a50: 6865 6e74 6963 6174 696f 6e20 6973 2065 hentication is e │ │ │ │ +00178a60: 6e61 626c 6564 2061 7420 7468 6520 636c nabled at the cl │ │ │ │ +00178a70: 6965 6e74 2d73 6964 6520 6279 2069 6e73 ient-side by ins │ │ │ │ +00178a80: 7461 6c6c 696e 6720 3c63 6f64 653e 6c69 talling li │ │ │ │ +00178a90: 626e 746c 6d3c 2f63 6f64 653e 2066 726f bntlm fro │ │ │ │ +00178aa0: 6d20 3c61 2068 7265 663d 2268 7474 703a m http:/ │ │ │ │ +00178ad0: 2f77 7777 2e6e 6f6e 676e 752e 6f72 672f /www.nongnu.org/ │ │ │ │ +00178ae0: 6c69 626e 746c 6d3c 2f61 3e20 616e 6420 libntlm and │ │ │ │ +00178af0: 636f 6d70 696c 696e 6720 616c 6c20 7072 compiling all pr │ │ │ │ +00178b00: 6f6a 6563 7420 736f 7572 6365 2063 6f64 oject source cod │ │ │ │ +00178b10: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp │ │ │ │ +00178b20: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_NTLM.

    .

    In │ │ │ │ +00178b50: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio │ │ │ │ +00178b60: 6e20 636f 6465 2073 6574 2074 6865 203c n code set the < │ │ │ │ +00178b70: 636f 6465 3e63 6f6e 7374 2063 6861 722a code>const char* │ │ │ │ +00178b80: 203c 6120 636c 6173 733d 2265 6c22 2068 soap::u │ │ │ │ +00178c40: 7365 7269 643c 2f61 3e3c 2f63 6f64 653e serid │ │ │ │ +00178c50: 2061 6e64 203c 636f 6465 3e63 6f6e 7374 and const │ │ │ │ +00178c60: 2063 6861 722a 203c 6120 636c 6173 733d char* s │ │ │ │ +00178d20: 6f61 703a 3a70 6173 7377 643c 2f61 3e3c oap::passwd< │ │ │ │ +00178d30: 2f63 6f64 653e 2073 7472 696e 6773 2074 /code> strings t │ │ │ │ +00178d40: 6f20 6120 7573 6572 6e61 6d65 2061 6e64 o a username and │ │ │ │ +00178d50: 2070 6173 7377 6f72 642e 2041 2073 6572 password. A ser │ │ │ │ +00178d60: 7665 7220 6d61 7920 7265 7175 6573 7420 ver may request │ │ │ │ +00178d70: 4e54 4c4d 2061 7574 6865 6e74 6963 6174 NTLM authenticat │ │ │ │ +00178d80: 696f 6e20 616e 6420 6465 6e69 6573 2061 ion and denies a │ │ │ │ +00178d90: 6363 6573 7320 2848 5454 5020 3430 3120 ccess (HTTP 401 │ │ │ │ +00178da0: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r │ │ │ │ +00178db0: 6571 7569 7265 6420 6f72 2048 5454 5020 equired or HTTP │ │ │ │ +00178dc0: 3430 3720 4854 5450 2070 726f 7879 2061 407 HTTP proxy a │ │ │ │ +00178dd0: 7574 6865 6e74 6963 6174 696f 6e20 7265 uthentication re │ │ │ │ +00178de0: 7175 6972 6564 2920 7768 656e 2074 6865 quired) when the │ │ │ │ +00178df0: 2063 6c69 656e 7420 7472 6965 7320 746f client tries to │ │ │ │ +00178e00: 2063 6f6e 6e65 6374 2077 6974 686f 7574 connect without │ │ │ │ +00178e10: 2048 5454 5020 6175 7468 656e 7469 6361 HTTP authentica │ │ │ │ +00178e20: 7469 6f6e 2028 6f72 2077 6974 6820 7468 tion (or with th │ │ │ │ +00178e30: 6520 7772 6f6e 6720 6175 7468 656e 7469 e wrong authenti │ │ │ │ +00178e40: 6361 7469 6f6e 2069 6e66 6f72 6d61 7469 cation informati │ │ │ │ +00178e50: 6f6e 292e 3c2f 703e 0a3c 703e 4865 7265 on).

    .

    Here │ │ │ │ +00178e60: 2069 7320 616e 2065 7861 6d70 6c65 2063 is an example c │ │ │ │ +00178e70: 6c69 656e 7420 636f 6465 2066 7261 676d lient code fragm │ │ │ │ +00178e80: 656e 7420 746f 2073 6574 2074 6865 204e ent to set the N │ │ │ │ +00178e90: 544c 4d20 6175 7468 656e 7469 6361 7469 TLM authenticati │ │ │ │ +00178ea0: 6f6e 2075 7365 726e 616d 6520 616e 6420 on username and │ │ │ │ +00178eb0: 7061 7373 776f 7264 3a3c 2f70 3e0a 3c64 password:

    .
    stru │ │ │ │ +00178f00: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new1( │ │ │ │ +00178fd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_IO_KEEPA │ │ │ │ +00179030: 4c49 5645 3c2f 613e 293b 203c 2f64 6976 LIVE);
    .
    if │ │ │ │ +00179070: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca │ │ │ │ +00179080: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod │ │ │ │ +00179090: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +001790c0: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .< │ │ │ │ +001790d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001790e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    if │ │ │ │ +00179120: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e │ │ │ │ +001791a0: 7272 6f72 3c2f 613e 203d 3d20 3430 3129 rror == 401) │ │ │ │ +001791b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {.
    soap->userid = │ │ │ │ +00179290: 2671 756f 743b 5a61 7068 6f64 2671 756f "Zaphod&quo │ │ │ │ +001792a0: 743b 3c2f 7370 616e 3e3b 203c 2f64 6976 t;;
    .
    s │ │ │ │ +001792f0: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->passwd │ │ │ │ +00179350: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q │ │ │ │ +00179370: 756f 743b 4265 6562 6c65 6272 6f78 2671 uot;Beeblebrox&q │ │ │ │ +00179380: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    if (s │ │ │ │ +001793d0: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web │ │ │ │ +001793e0: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so │ │ │ │ +00179410: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    ... │ │ │ │ +00179440: 203c 7370 616e 2063 6c61 7373 3d22 636f // error< │ │ │ │ +00179460: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +00179480: 2020 203c 7370 616e 2063 6c61 7373 3d22 els │ │ │ │ +001794a0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ +001794b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001794c0: 3e20 2020 2020 202e 2e2e 203c 7370 616e > ... // success
    .
    }.
    }
    .< │ │ │ │ +00179530: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The fol │ │ │ │ +00179550: 6c6f 7769 6e67 204e 544c 4d20 6861 6e64 lowing NTLM hand │ │ │ │ +00179560: 7368 616b 6520 6265 7477 6565 6e20 7468 shake between th │ │ │ │ +00179570: 6520 636c 6965 6e74 2043 2061 6e64 2073 e client C and s │ │ │ │ +00179580: 6572 7665 7220 5320 6973 2070 6572 666f erver S is perfo │ │ │ │ +00179590: 726d 6564 3a20 3c2f 703e 3c70 7265 2063 rmed:

    │ │ │ │ +001795b0: 313a 2043 2020 2d2d 2667 743b 2053 2026  1: C  --> S &
    │ │ │ │ +001795c0: 616d 703b 2050 4f53 5420 2e2e 2e20 0a20  amp; POST ... . 
    │ │ │ │ +001795d0: 2020 2020 2020 2020 2020 2026 616d 703b             &
    │ │ │ │ +001795e0: 2043 6f6e 7465 6e74 2d54 7970 653a 2074   Content-Type: t
    │ │ │ │ +001795f0: 6578 742f 786d 6c3b 2063 6861 7273 6574  ext/xml; charset
    │ │ │ │ +00179600: 3d75 7466 2d38 200a 0a32 3a20 4320 266c  =utf-8 ..2: C &l
    │ │ │ │ +00179610: 743b 2d2d 2020 5320 2661 6d70 3b20 3430  t;--  S & 40
    │ │ │ │ +00179620: 3120 556e 6175 7468 6f72 697a 6564 200a  1 Unauthorized .
    │ │ │ │ +00179630: 2020 2020 2020 2020 2020 2020 2661 6d70              &
    │ │ │ │ +00179640: 3b20 5757 572d 4175 7468 656e 7469 6361  ; WWW-Authentica
    │ │ │ │ +00179650: 7465 3a20 4e54 4c4d 200a 0a33 3a20 4320  te: NTLM ..3: C 
    │ │ │ │ +00179660: 202d 2d26 6774 3b20 5320 2661 6d70 3b20   --> S & 
    │ │ │ │ +00179670: 4745 5420 2e2e 2e20 0a20 2020 2020 2020  GET ... .       
    │ │ │ │ +00179680: 2020 2020 2026 616d 703b 2041 7574 686f       & Autho
    │ │ │ │ +00179690: 7269 7a61 7469 6f6e 3a20 4e54 4c4d 2026  rization: NTLM &
    │ │ │ │ +001796a0: 6c74 3b62 6173 6536 342d 656e 636f 6465  lt;base64-encode
    │ │ │ │ +001796b0: 6420 7479 7065 2d31 2d6d 6573 7361 6765  d type-1-message
    │ │ │ │ +001796c0: 2667 743b 200a 0a34 3a20 4320 266c 743b  > ..4: C <
    │ │ │ │ +001796d0: 2d2d 2020 5320 2661 6d70 3b20 3430 3120  --  S & 401 
    │ │ │ │ +001796e0: 556e 6175 7468 6f72 697a 6564 200a 2020  Unauthorized .  
    │ │ │ │ +001796f0: 2020 2020 2020 2020 2020 2661 6d70 3b20            & 
    │ │ │ │ +00179700: 5757 572d 4175 7468 656e 7469 6361 7465  WWW-Authenticate
    │ │ │ │ +00179710: 3a20 4e54 4c4d 2026 6c74 3b62 6173 6536  : NTLM <base6
    │ │ │ │ +00179720: 342d 656e 636f 6465 6420 7479 7065 2d32  4-encoded type-2
    │ │ │ │ +00179730: 2d6d 6573 7361 6765 2667 743b 200a 0a35  -message> ..5
    │ │ │ │ +00179740: 3a20 4320 202d 2d26 6774 3b20 5320 2661  : C  --> S &a
    │ │ │ │ +00179750: 6d70 3b20 504f 5354 202e 2e2e 200a 2020  mp; POST ... .  
    │ │ │ │ +00179760: 2020 2020 2020 2020 2020 2661 6d70 3b20            & 
    │ │ │ │ +00179770: 436f 6e74 656e 742d 5479 7065 3a20 7465  Content-Type: te
    │ │ │ │ +00179780: 7874 2f78 6d6c 3b20 6368 6172 7365 743d  xt/xml; charset=
    │ │ │ │ +00179790: 7574 662d 3820 0a20 2020 2020 2020 2020  utf-8 .         
    │ │ │ │ +001797a0: 2020 2026 616d 703b 2041 7574 686f 7269     & Authori
    │ │ │ │ +001797b0: 7a61 7469 6f6e 3a20 4e54 4c4d 2026 6c74  zation: NTLM <
    │ │ │ │ +001797c0: 3b62 6173 6536 342d 656e 636f 6465 6420  ;base64-encoded 
    │ │ │ │ +001797d0: 7479 7065 2d33 2d6d 6573 7361 6765 2667  type-3-message&g
    │ │ │ │ +001797e0: 743b 200a 0a36 3a20 4320 266c 743b 2d2d  t; ..6: C <--
    │ │ │ │ +001797f0: 2020 5320 2661 6d70 3b20 3230 3020 4f4b    S & 200 OK
    │ │ │ │ +00179800: 0a3c 2f70 7265 3e3c 703e 2077 6865 7265  .

    where │ │ │ │ +00179810: 2073 7461 6765 7320 3120 616e 6420 3220 stages 1 and 2 │ │ │ │ +00179820: 696e 6469 6361 7465 7320 6120 636c 6965 indicates a clie │ │ │ │ +00179830: 6e74 2061 7474 656d 7074 696e 6720 746f nt attempting to │ │ │ │ +00179840: 2063 6f6e 6e65 6374 2077 6974 686f 7574 connect without │ │ │ │ +00179850: 2061 7574 686f 7269 7a61 7469 6f6e 2069 authorization i │ │ │ │ +00179860: 6e66 6f72 6d61 7469 6f6e 2c20 7768 6963 nformation, whic │ │ │ │ +00179870: 6820 6973 2074 6865 2066 6972 7374 206d h is the first m │ │ │ │ +00179880: 6574 686f 6420 6361 6c6c 2069 6e20 7468 ethod call in th │ │ │ │ +00179890: 6520 636f 6465 2061 626f 7665 2e20 5374 e code above. St │ │ │ │ +001798a0: 6167 6520 3320 746f 2036 2068 6170 7065 age 3 to 6 happe │ │ │ │ +001798b0: 6e20 7769 7468 2074 6865 2070 726f 7065 n with the prope │ │ │ │ +001798c0: 7220 636c 6965 6e74 2061 7574 6865 6e74 r client authent │ │ │ │ +001798d0: 6963 6174 696f 6e20 7365 7420 7769 7468 ication set with │ │ │ │ +001798e0: 203c 636f 6465 3e63 6f6e 7374 2063 6861 const cha │ │ │ │ +001798f0: 722a 203c 6120 636c 6173 733d 2265 6c22 r* soap: │ │ │ │ +001799b0: 3a75 7365 7269 643c 2f61 3e3c 2f63 6f64 :userid and con │ │ │ │ +001799d0: 7374 2063 6861 722a 203c 6120 636c 6173 st char* soap::passwd. Option │ │ │ │ +00179ab0: 616c 6c79 2c20 7468 6520 3c63 6f64 653e ally, the │ │ │ │ +00179ac0: 636f 6e73 7420 6368 6172 2a20 3c61 2063 const char* soap::authre │ │ │ │ +00179b90: 616c 6d3c 2f61 3e3c 2f63 6f64 653e 2073 alm s │ │ │ │ +00179ba0: 7472 696e 6720 7368 6f75 6c64 2062 6520 tring should be │ │ │ │ +00179bb0: 7365 7420 6173 2077 656c 6c20 746f 2069 set as well to i │ │ │ │ +00179bc0: 6e64 6963 6174 6520 7468 6520 646f 6d61 ndicate the doma │ │ │ │ +00179bd0: 696e 2061 6363 6573 7365 6420 2874 6869 in accessed (thi │ │ │ │ +00179be0: 7320 7374 7269 6e67 2069 7320 6e6f 726d s string is norm │ │ │ │ +00179bf0: 616c 6c79 2073 6574 2077 6865 6e20 7468 ally set when th │ │ │ │ +00179c00: 6520 7365 7276 6572 2072 6573 706f 6e64 e server respond │ │ │ │ +00179c10: 7320 7769 7468 2048 5454 5020 3430 3120 s with HTTP 401 │ │ │ │ +00179c20: 736f 2074 6865 2063 6c69 656e 7420 7265 so the client re │ │ │ │ +00179c30: 6365 6976 6573 2074 6869 7320 7365 7276 ceives this serv │ │ │ │ +00179c40: 6572 2064 6f6d 6169 6e20 696e 666f 726d er domain inform │ │ │ │ +00179c50: 6174 696f 6e29 2e20 4e54 4c4d 2061 7574 ation). NTLM aut │ │ │ │ +00179c60: 6865 6e74 6963 6174 6573 2063 6f6e 6e65 henticates conne │ │ │ │ +00179c70: 6374 696f 6e73 2c20 6e6f 7420 7265 7175 ctions, not requ │ │ │ │ +00179c80: 6573 7473 2e20 5768 656e 2074 6865 2063 ests. When the c │ │ │ │ +00179c90: 6f6e 6e65 6374 696f 6e20 6973 206b 6570 onnection is kep │ │ │ │ +00179ca0: 7420 616c 6976 652c 2073 7562 7365 7175 t alive, subsequ │ │ │ │ +00179cb0: 656e 7420 6d65 7373 6167 6573 2063 616e ent messages can │ │ │ │ +00179cc0: 2062 6520 6578 6368 616e 6765 6420 7769 be exchanged wi │ │ │ │ +00179cd0: 7468 6f75 7420 7265 2d61 7574 6865 6e74 thout re-authent │ │ │ │ +00179ce0: 6963 6174 696f 6e2e 3c2f 703e 0a3c 703e ication.

    .

    │ │ │ │ +00179cf0: 546f 2061 766f 6964 2074 6865 206f 7665 To avoid the ove │ │ │ │ +00179d00: 7268 6561 6420 6f66 2074 6865 2066 6972 rhead of the fir │ │ │ │ +00179d10: 7374 2072 656a 6563 7465 6420 6361 6c6c st rejected call │ │ │ │ +00179d20: 2c20 7573 653a 3c2f 703e 0a3c 6469 7620 , use:

    .
    .< │ │ │ │ +00179eb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00179ec0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ +00179ef0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->nt │ │ │ │ +00179f40: 6c6d 5f63 6861 6c6c 656e 6765 3c2f 613e lm_challenge │ │ │ │ +00179f50: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ +00179f70: 7175 6f74 3b26 7175 6f74 3b3c 2f73 7061 quot;";
    .
    soap-> │ │ │ │ +00179fd0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;userid │ │ │ │ +0017a020: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "Zaphod& │ │ │ │ +0017a050: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .
    so │ │ │ │ +0017a0a0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->passwd = │ │ │ │ +0017a100: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +0017a120: 6f74 3b42 6565 626c 6562 726f 7826 7175 ot;Beeblebrox&qu │ │ │ │ +0017a130: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; .
    soap │ │ │ │ +0017a180: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->authrealm │ │ │ │ +0017a1e0: 3d20 3c73 7061 6e20 636c 6173 733d 2273 = &q │ │ │ │ +0017a200: 756f 743b 5572 7361 2d4d 696e 6f72 2671 uot;Ursa-Minor&q │ │ │ │ +0017a210: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    │ │ │ │ +0017a250: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_ │ │ │ │ +0017a260: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth │ │ │ │ +0017a270: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    │ │ │ │ +0017a2b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ +0017a2e0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else.
    ... // success
    .
    │ │ │ │ +0017a430: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char * │ │ │ │ +0017a450: 206e 746c 6d5f 6368 616c 6c65 6e67 653c ntlm_challenge< │ │ │ │ +0017a460: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    User-def │ │ │ │ +0017a480: 696e 6162 6c65 204e 544c 4d20 6175 7468 inable NTLM auth │ │ │ │ +0017a490: 656e 7469 6361 7469 6f6e 2063 6861 6c6c entication chall │ │ │ │ +0017a4a0: 656e 6765 206b 6579 2073 7472 696e 672e enge key string. │ │ │ │ +0017a4b0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +0017a4d0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +0017a4e0: 6f61 7032 2e68 3a33 3837 383c 2f64 6976 oap2.h:3878
    .
    < │ │ │ │ +0017a510: 703e 5768 656e 2074 6865 2061 7574 6865 p>When the authe │ │ │ │ +0017a520: 6e74 6963 6174 696f 6e20 6661 696c 7320 ntication fails │ │ │ │ +0017a530: 2873 7461 6765 2031 2061 6e64 2032 292c (stage 1 and 2), │ │ │ │ +0017a540: 2074 6865 2073 6572 7669 6365 2072 6573 the service res │ │ │ │ +0017a550: 706f 6e73 6520 7769 7468 2048 5454 5020 ponse with HTTP │ │ │ │ +0017a560: 6572 726f 7220 636f 6465 2022 3430 3120 error code "401 │ │ │ │ +0017a570: 556e 6175 7468 6f72 697a 6564 2220 616e Unauthorized" an │ │ │ │ +0017a580: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d so │ │ │ │ +0017a630: 6170 3a3a 6572 726f 723c 2f61 3e3c 2f63 ap::error is set to H │ │ │ │ +0017a650: 5454 5020 636f 6465 2034 3031 2e3c 2f70 TTP code 401.

    .

    .... Back to ta │ │ │ │ +0017a680: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +0017a690: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    . │ │ │ │ +0017a6d0: 4854 5450 2070 726f 7879 204e 544c 4d20 HTTP proxy NTLM │ │ │ │ +0017a6e0: 6175 7468 656e 7469 6361 7469 6f6e 3c2f authentication.

    For HTTP │ │ │ │ +0017a700: 3430 3720 5072 6f78 7920 4175 7468 656e 407 Proxy Authen │ │ │ │ +0017a710: 7469 6361 7469 6f6e 2052 6571 7569 7265 tication Require │ │ │ │ +0017a720: 6420 7365 7420 7468 6520 3c63 6f64 653e d set the │ │ │ │ +0017a730: 3c61 2063 6c61 7373 3d22 656c 2220 6872 s │ │ │ │ +0017a7e0: 6f61 703a 3a70 726f 7879 5f75 7365 7269 oap::proxy_useri │ │ │ │ +0017a7f0: 643c 2f61 3e3c 2f63 6f64 653e 2061 6e64 d and │ │ │ │ +0017a800: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::pro │ │ │ │ +0017a8c0: 7879 5f70 6173 7377 643c 2f61 3e3c 2f63 xy_passwd:

    .
    │ │ │ │ +0017a8f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ +0017aa70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +0017aaa0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >pro │ │ │ │ +0017aaf0: 7879 5f68 6f73 743c 2f61 3e20 3d20 3c73 xy_host = " │ │ │ │ +0017ab20: 2e2e 2e26 7175 6f74 3b3c 2f73 7061 6e3e ..." │ │ │ │ +0017ab30: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap->< │ │ │ │ +0017ab80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0017ab90: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0017aba0: 6874 6d6c 2361 3033 3735 3534 6664 3263 html#a037554fd2c │ │ │ │ +0017abb0: 6635 3466 6239 6136 6435 3332 3662 3131 f54fb9a6d5326b11 │ │ │ │ +0017abc0: 6338 6666 6130 223e 7072 6f78 795f 706f c8ffa0">proxy_po │ │ │ │ +0017abd0: 7274 3c2f 613e 203d 202e 2e2e 3b20 3c2f rt = ...; .
    if (soap │ │ │ │ +0017ac20: 5f63 616c 6c5f 6e73 5f5f 7765 626d 6574 _call_ns__webmet │ │ │ │ +0017ac30: 686f 6428 3c61 2063 6c61 7373 3d22 636f hod(soap< │ │ │ │ +0017ac60: 2f61 3e2c 202e 2e2e 2929 203c 2f64 6976 /a>, ...))
    .
    {
    .
    .
    { │ │ │ │ +0017ad70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    soap-> │ │ │ │ +0017adc0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;proxy_ │ │ │ │ +0017ae10: 7573 6572 6964 3c2f 613e 203d 203c 7370 userid = "Z │ │ │ │ +0017ae40: 6170 686f 6426 7175 6f74 3b3c 2f73 7061 aphod";
    .
    │ │ │ │ +0017ae70: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +0017aea0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->pr │ │ │ │ +0017aef0: 6f78 795f 7061 7373 7764 3c2f 613e 203d oxy_passwd = │ │ │ │ +0017af00: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +0017af20: 6f74 3b42 6565 626c 6562 726f 7826 7175 ot;Beeblebrox&qu │ │ │ │ +0017af30: 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f 6469 ot;; ..
    if (soap_call_ns_ │ │ │ │ +0017b070: 5f77 6562 6d65 7468 6f64 283c 6120 636c _webmethod(soap, ...) │ │ │ │ +0017b0b0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    │ │ │ │ +0017b0d0: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // er │ │ │ │ +0017b0f0: 726f 723c 2f73 7061 6e3e 3c2f 6469 763e ror
    │ │ │ │ +0017b100: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else.
    ... < │ │ │ │ +0017b160: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0017b170: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent">// success< │ │ │ │ +0017b180: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +0017b240: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int proxy_po │ │ │ │ +0017b260: 7274 3c2f 6469 763e 3c64 6976 2063 6c61 rt
    User- │ │ │ │ +0017b280: 6465 6669 6e61 626c 6520 7072 6f78 7920 definable proxy │ │ │ │ +0017b290: 706f 7274 2077 6869 6368 2073 686f 756c port which shoul │ │ │ │ +0017b2a0: 6420 6265 2073 6574 2074 6f20 636f 6e6e d be set to conn │ │ │ │ +0017b2b0: 6563 7420 7468 726f 7567 6820 616e 2048 ect through an H │ │ │ │ +0017b2c0: 5454 5020 7072 6f78 7920 2874 6865 2076 TTP proxy (the v │ │ │ │ +0017b2d0: 616c 7565 2069 7320 3830 3830 2062 7920 alue is 8080 by │ │ │ │ +0017b2e0: 2e2e 2e3c 2f64 6976 3e3c 6469 7620 636c ...
    D │ │ │ │ +0017b300: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +0017b310: 7464 736f 6170 322e 683a 3339 3036 3c2f tdsoap2.h:3906
    .
    │ │ │ │ +0017b3e0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char * │ │ │ │ +0017b400: 2070 726f 7879 5f75 7365 7269 643c 2f64 proxy_userid
    User-defin │ │ │ │ +0017b430: 6162 6c65 2070 726f 7879 2061 7574 686f able proxy autho │ │ │ │ +0017b440: 7269 7a61 7469 6f6e 2075 7365 7220 6964 rization user id │ │ │ │ +0017b450: 2073 7472 696e 6720 746f 2061 7574 6865 string to authe │ │ │ │ +0017b460: 6e74 6963 6174 6520 616e 6420 636f 6e6e nticate and conn │ │ │ │ +0017b470: 6563 7420 746f 2061 6e20 4854 5450 2070 ect to an HTTP p │ │ │ │ +0017b480: 726f 7879 2e3c 2f64 6976 3e3c 6469 7620 roxy.
    Definition: │ │ │ │ +0017b4b0: 2073 7464 736f 6170 322e 683a 3339 3131 stdsoap2.h:3911 │ │ │ │ +0017b4c0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    . │ │ │ │ +0017b580: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char * │ │ │ │ +0017b5a0: 2070 726f 7879 5f68 6f73 743c 2f64 6976 proxy_host
    User-definab │ │ │ │ +0017b5d0: 6c65 2070 726f 7879 2068 6f73 7420 6e61 le proxy host na │ │ │ │ +0017b5e0: 6d65 2073 7472 696e 6720 7768 6963 6820 me string which │ │ │ │ +0017b5f0: 7368 6f75 6c64 2062 6520 7365 7420 746f should be set to │ │ │ │ +0017b600: 2063 6f6e 6e65 6374 2074 6872 6f75 6768 connect through │ │ │ │ +0017b610: 2061 6e20 4854 5450 2070 726f 7879 2e3c an HTTP proxy.< │ │ │ │ +0017b620: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +0017b640: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +0017b650: 6170 322e 683a 3339 3031 3c2f 6469 763e ap2.h:3901
    │ │ │ │ +0017b660: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +0017b6b0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    │ │ │ │ +0017b730: 636f 6e73 7420 6368 6172 202a 2070 726f const char * pro │ │ │ │ +0017b740: 7879 5f70 6173 7377 643c 2f64 6976 3e3c xy_passwd
    < │ │ │ │ +0017b750: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +0017b760: 223e 5573 6572 2d64 6566 696e 6162 6c65 ">User-definable │ │ │ │ +0017b770: 2070 726f 7879 2061 7574 686f 7269 7a61 proxy authoriza │ │ │ │ +0017b780: 7469 6f6e 2070 6173 7377 6f72 6420 7374 tion password st │ │ │ │ +0017b790: 7269 6e67 2074 6f20 6175 7468 656e 7469 ring to authenti │ │ │ │ +0017b7a0: 6361 7465 2061 6e64 2063 6f6e 6e65 6374 cate and connect │ │ │ │ +0017b7b0: 2074 6f20 616e 2048 5454 5020 7072 6f78 to an HTTP prox │ │ │ │ +0017b7c0: 792e 3c2f 6469 763e 3c64 6976 2063 6c61 y.
    De │ │ │ │ +0017b7e0: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ +0017b7f0: 6473 6f61 7032 2e68 3a33 3931 363c 2f64 dsoap2.h:3916
    .
    │ │ │ │ +0017b810: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    .... < │ │ │ │ +0017c060: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +0017c070: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +0017c080: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    │ │ │ │ +0017c0c0: 0a48 5454 5020 7072 6f78 7920 6261 7369 .HTTP proxy basi │ │ │ │ +0017c0d0: 6320 6175 7468 656e 7469 6361 7469 6f6e c authentication │ │ │ │ +0017c0e0: 3c2f 6833 3e0a 3c70 3e48 5454 5020 7072

    .

    HTTP pr │ │ │ │ +0017c0f0: 6f78 7920 6175 7468 656e 7469 6361 7469 oxy authenticati │ │ │ │ +0017c100: 6f6e 2028 6261 7369 6329 2069 7320 656e on (basic) is en │ │ │ │ +0017c110: 6162 6c65 6420 6174 2074 6865 2063 6c69 abled at the cli │ │ │ │ +0017c120: 656e 742d 7369 6465 2062 7920 7365 7474 ent-side by sett │ │ │ │ +0017c130: 696e 6720 7468 6520 3c63 6f64 653e 3c61 ing the soa │ │ │ │ +0017c1f0: 703a 3a70 726f 7879 5f75 7365 7269 643c p::proxy_userid< │ │ │ │ +0017c200: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and < │ │ │ │ +0017c210: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::proxy │ │ │ │ +0017c2d0: 5f70 6173 7377 643c 2f61 3e3c 2f63 6f64 _passwd strings to a │ │ │ │ +0017c2f0: 7573 6572 6e61 6d65 2061 6e64 2070 6173 username and pas │ │ │ │ +0017c300: 7377 6f72 642c 2072 6573 7065 6374 6976 sword, respectiv │ │ │ │ +0017c310: 656c 792e 2046 6f72 2065 7861 6d70 6c65 ely. For example │ │ │ │ +0017c320: 2c20 6120 7072 6f78 7920 7365 7276 6572 , a proxy server │ │ │ │ +0017c330: 206d 6179 2072 6571 7565 7374 2075 7365 may request use │ │ │ │ +0017c340: 7220 6175 7468 656e 7469 6361 7469 6f6e r authentication │ │ │ │ +0017c350: 2e20 4f74 6865 7277 6973 652c 2061 6363 . Otherwise, acc │ │ │ │ +0017c360: 6573 7320 6973 2064 656e 6965 6420 6279 ess is denied by │ │ │ │ +0017c370: 2074 6865 2070 726f 7879 2028 4854 5450 the proxy (HTTP │ │ │ │ +0017c380: 2034 3037 2065 7272 6f72 292e 2045 7861 407 error). Exa │ │ │ │ +0017c390: 6d70 6c65 2063 6c69 656e 7420 636f 6465 mple client code │ │ │ │ +0017c3a0: 2066 7261 676d 656e 7420 746f 2073 6574 fragment to set │ │ │ │ +0017c3b0: 2070 726f 7879 2073 6572 7665 722c 2075 proxy server, u │ │ │ │ +0017c3c0: 7365 726e 616d 652c 2061 6e64 2070 6173 sername, and pas │ │ │ │ +0017c3d0: 7377 6f72 643a 3c2f 703e 0a3c 6469 7620 sword:

    .
    struct │ │ │ │ +0017c420: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so │ │ │ │ +0017c450: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ +0017c480: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s │ │ │ │ +0017c4e0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); < │ │ │ │ +0017c4f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ +0017c530: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->proxy_host< │ │ │ │ +0017c590: 2f61 3e20 3d20 3c73 7061 6e20 636c 6173 /a> = "xx.xx.xx │ │ │ │ +0017c5c0: 2e78 7826 7175 6f74 3b3c 2f73 7061 6e3e .xx" │ │ │ │ +0017c5d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // IP or │ │ │ │ +0017c5f0: 2064 6f6d 6169 6e20 3c2f 7370 616e 3e3c domain < │ │ │ │ +0017c600: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

    A cli │ │ │ │ +0017c890: 656e 7420 534f 4150 2072 6571 7565 7374 ent SOAP request │ │ │ │ +0017c8a0: 2077 696c 6c20 6861 7665 2074 6865 2066 will have the f │ │ │ │ +0017c8b0: 6f6c 6c6f 7769 6e67 2048 5454 5020 6865 ollowing HTTP he │ │ │ │ +0017c8c0: 6164 6572 3a20 3c2f 703e 3c70 7265 2063 ader:

    │ │ │ │ +0017c8e0: 504f 5354 202f 5858 5820 4854 5450 2f31  POST /XXX HTTP/1
    │ │ │ │ +0017c8f0: 2e31 200a 486f 7374 3a20 5959 5920 0a55  .1 .Host: YYY .U
    │ │ │ │ +0017c900: 7365 722d 4167 656e 743a 2067 534f 4150  ser-Agent: gSOAP
    │ │ │ │ +0017c910: 2f32 2e38 200a 436f 6e74 656e 742d 5479  /2.8 .Content-Ty
    │ │ │ │ +0017c920: 7065 3a20 7465 7874 2f78 6d6c 3b20 6368  pe: text/xml; ch
    │ │ │ │ +0017c930: 6172 7365 743d 7574 662d 3820 0a43 6f6e  arset=utf-8 .Con
    │ │ │ │ +0017c940: 7465 6e74 2d4c 656e 6774 683a 205a 5a5a  tent-Length: ZZZ
    │ │ │ │ +0017c950: 200a 5072 6f78 792d 4175 7468 6f72 697a   .Proxy-Authoriz
    │ │ │ │ +0017c960: 6174 696f 6e3a 2042 6173 6963 205a 3356  ation: Basic Z3V
    │ │ │ │ +0017c970: 6c63 3351 365a 3356 6c63 3351 3d20 0a3c  lc3Q6Z3Vlc3Q= .<
    │ │ │ │ +0017c980: 2f70 7265 3e3c 703e 2057 6865 6e20 582d  /pre>

    When X- │ │ │ │ +0017c990: 466f 7277 6172 6465 642d 466f 7220 6865 Forwarded-For he │ │ │ │ +0017c9a0: 6164 6572 7320 6172 6520 7265 7475 726e aders are return │ │ │ │ +0017c9b0: 6564 2062 7920 7468 6520 7072 6f78 792c ed by the proxy, │ │ │ │ +0017c9c0: 2074 6865 2068 6561 6465 7220 6361 6e20 the header can │ │ │ │ +0017c9d0: 6265 2061 6363 6573 7365 6420 696e 2074 be accessed in t │ │ │ │ +0017c9e0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he │ │ │ │ +0017ca70: 736f 6170 3a3a 7072 6f78 795f 6672 6f6d soap::proxy_from │ │ │ │ +0017ca80: 3c2f 613e 3c2f 636f 6465 3e20 7374 7269 stri │ │ │ │ +0017ca90: 6e67 2e3c 2f70 3e0a 3c70 3e54 6865 2043 ng.

    .

    The C │ │ │ │ +0017caa0: 4f4e 4e45 4354 206d 6574 686f 6420 6973 ONNECT method is │ │ │ │ +0017cab0: 2075 7365 6420 666f 7220 4854 5450 2070 used for HTTP p │ │ │ │ +0017cac0: 726f 7879 2061 7574 6865 6e74 6963 6174 roxy authenticat │ │ │ │ +0017cad0: 696f 6e3a 203c 2f70 3e3c 7072 6520 636c ion:

    C
    │ │ │ │ +0017caf0: 4f4e 4e45 4354 2073 6572 7665 722e 6578  ONNECT server.ex
    │ │ │ │ +0017cb00: 616d 706c 652e 636f 6d3a 3830 2048 5454  ample.com:80 HTT
    │ │ │ │ +0017cb10: 502f 312e 310a 3c2f 7072 653e 3c70 3e20  P/1.1.

    │ │ │ │ +0017cb20: 496e 2073 6f6d 6520 6361 7365 732c 2079 In some cases, y │ │ │ │ +0017cb30: 6f75 2077 696c 6c20 6e6f 7469 6365 2074 ou will notice t │ │ │ │ +0017cb40: 6861 7420 7468 6520 486f 7374 2048 5454 hat the Host HTT │ │ │ │ +0017cb50: 5020 6865 6164 6572 2075 7365 7320 7468 P header uses th │ │ │ │ +0017cb60: 6520 434f 4e4e 4543 5420 7072 6f74 6f63 e CONNECT protoc │ │ │ │ +0017cb70: 6f6c 3a20 3c2f 703e 3c70 7265 2063 6c61 ol:

    CO
    │ │ │ │ +0017cb90: 4e4e 4543 5420 7365 7276 6572 2e65 7861  NNECT server.exa
    │ │ │ │ +0017cba0: 6d70 6c65 2e63 6f6d 3a38 3020 4854 5450  mple.com:80 HTTP
    │ │ │ │ +0017cbb0: 2f31 2e31 200a 486f 7374 3a20 7365 7276  /1.1 .Host: serv
    │ │ │ │ +0017cbc0: 6572 2e65 7861 6d70 6c65 2e63 6f6d 3a38  er.example.com:8
    │ │ │ │ +0017cbd0: 300a 3c2f 7072 653e 3c70 3e20 f09f 949d  0.

    .... │ │ │ │ +0017cbe0: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +0017cbf0: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +0017cc00: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +0017cc10: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>< │ │ │ │ +0017cc30: 2f61 3e0a 5065 7266 6f72 6d61 6e63 6520 /a>.Performance │ │ │ │ +0017cc40: 696d 7072 6f76 656d 656e 7420 7469 7073 improvement tips │ │ │ │ +0017cc50: 3c2f 6832 3e0a 3c70 3e48 6572 6520 6172

    .

    Here ar │ │ │ │ +0017cc60: 6520 736f 6d65 2074 6970 7320 796f 7520 e some tips you │ │ │ │ +0017cc70: 6361 6e20 7573 6520 746f 2073 7065 6564 can use to speed │ │ │ │ +0017cc80: 2075 7020 6753 4f41 502e 2054 6865 2064 up gSOAP. The d │ │ │ │ +0017cc90: 6566 6175 6c74 2073 6574 7469 6e67 7320 efault settings │ │ │ │ +0017cca0: 6172 6520 6368 6f73 656e 2074 6f20 6d61 are chosen to ma │ │ │ │ +0017ccb0: 7869 6d69 7a65 2070 6f72 7461 6269 6c69 ximize portabili │ │ │ │ +0017ccc0: 7479 2061 6e64 2063 6f6d 7061 7469 6269 ty and compatibi │ │ │ │ +0017ccd0: 6c69 7479 2e20 5468 6520 7365 7474 696e lity. The settin │ │ │ │ +0017cce0: 6773 2063 616e 2062 6520 7477 6561 6b65 gs can be tweake │ │ │ │ +0017ccf0: 6420 746f 206f 7074 696d 697a 6520 7468 d to optimize th │ │ │ │ +0017cd00: 6520 7065 7266 6f72 6d61 6e63 6520 6173 e performance as │ │ │ │ +0017cd10: 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a 3c75 follows:

    ..
  • Increase │ │ │ │ +0017cd30: 7468 6520 6275 6666 6572 2073 697a 6520 the buffer size │ │ │ │ +0017cd40: 3c63 6f64 653e 2353 4f41 505f 4255 464c #SOAP_BUFL │ │ │ │ +0017cd50: 454e 3c2f 636f 6465 3e20 6279 2063 6861 EN by cha │ │ │ │ +0017cd60: 6e67 696e 6720 7468 6520 3c63 6f64 653e nging the │ │ │ │ +0017cd70: 2353 4f41 505f 4255 464c 454e 3c2f 636f #SOAP_BUFLEN macro in gsoap/std │ │ │ │ +0017cda0: 736f 6170 322e 683c 2f63 6f64 653e 3c2f soap2.h. Use buffer │ │ │ │ +0017cdc0: 7369 7a65 2032 5e31 383d 3236 3231 3434 size 2^18=262144 │ │ │ │ +0017cdd0: 2066 6f72 2065 7861 6d70 6c65 2e3c 2f6c for example..
  • Use HTTP │ │ │ │ +0017cdf0: 6b65 6570 2d61 6c69 7665 2061 7420 7468 keep-alive at th │ │ │ │ +0017ce00: 6520 636c 6965 6e74 2d73 6964 652c 2073 e client-side, s │ │ │ │ +0017ce10: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section TCP and HTT │ │ │ │ +0017ce50: 5020 6b65 6570 2d61 6c69 7665 3c2f 613e P keep-alive │ │ │ │ +0017ce60: 202c 2077 6865 6e20 7468 6520 636c 6965 , when the clie │ │ │ │ +0017ce70: 6e74 206e 6565 6473 2074 6f20 6d61 6b65 nt needs to make │ │ │ │ +0017ce80: 2061 2073 6572 6965 7320 6f66 2063 616c a series of cal │ │ │ │ +0017ce90: 6c73 2074 6f20 7468 6520 7361 6d65 2073 ls to the same s │ │ │ │ +0017cea0: 6572 7665 722e 2053 6572 7665 722d 7369 erver. Server-si │ │ │ │ +0017ceb0: 6465 206b 6565 702d 616c 6976 6520 7375 de keep-alive su │ │ │ │ +0017cec0: 7070 6f72 7420 6361 6e20 6772 6561 746c pport can greatl │ │ │ │ +0017ced0: 7920 696d 7072 6f76 6520 7065 7266 6f72 y improve perfor │ │ │ │ +0017cee0: 6d61 6e63 6520 6f66 2062 6f74 6820 636c mance of both cl │ │ │ │ +0017cef0: 6965 6e74 2061 6e64 2073 6572 7665 722e ient and server. │ │ │ │ +0017cf00: 2042 7574 2062 6520 6177 6172 6520 7468 But be aware th │ │ │ │ +0017cf10: 6174 2063 6c69 656e 7473 2061 6e64 2073 at clients and s │ │ │ │ +0017cf20: 6572 7669 6365 7320 756e 6465 7220 556e ervices under Un │ │ │ │ +0017cf30: 6978 2f4c 696e 7578 2072 6571 7569 7265 ix/Linux require │ │ │ │ +0017cf40: 2073 6967 6e61 6c20 6861 6e64 6c65 7273 signal handlers │ │ │ │ +0017cf50: 2074 6f20 6361 7463 6820 6472 6f70 7065 to catch droppe │ │ │ │ +0017cf60: 6420 636f 6e6e 6563 7469 6f6e 732e 3c2f d connections..
  • Use HTTP │ │ │ │ +0017cf80: 2063 6875 6e6b 6564 2074 7261 6e73 6665 chunked transfe │ │ │ │ +0017cf90: 7273 2c20 7365 6520 5365 6374 696f 6e20 rs, see Section │ │ │ │ +0017cfa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 HTTP chu │ │ │ │ +0017cfd0: 6e6b 6564 2074 7261 6e73 6665 7220 656e nked transfer en │ │ │ │ +0017cfe0: 636f 6469 6e67 3c2f 613e 202e 3c2f 6c69 coding .
  • .
  • Do not use │ │ │ │ +0017d000: 2067 7a69 7020 636f 6d70 7265 7373 696f gzip compressio │ │ │ │ +0017d010: 6e2c 2073 696e 6365 2074 6865 206f 7665 n, since the ove │ │ │ │ +0017d020: 7268 6561 6420 6f66 2063 6f6d 7072 6573 rhead of compres │ │ │ │ +0017d030: 7369 6f6e 2069 7320 7479 7069 6361 6c6c sion is typicall │ │ │ │ +0017d040: 7920 6869 6768 6572 2074 6861 6e20 7468 y higher than th │ │ │ │ +0017d050: 6520 6261 6e64 7769 6474 6820 6761 696e e bandwidth gain │ │ │ │ +0017d060: 732e 3c2f 6c69 3e0a 3c6c 693e 5365 7420 s.
  • .
  • Set │ │ │ │ +0017d070: 7468 6520 3c63 6f64 653e 2353 4f41 505f the #SOAP_ │ │ │ │ +0017d080: 584d 4c5f 5452 4545 3c2f 636f 6465 3e20 XML_TREE │ │ │ │ +0017d090: 666c 6167 2074 6f20 6469 7361 626c 6520 flag to disable │ │ │ │ +0017d0a0: 6964 2d72 6566 206d 756c 7469 2d72 6566 id-ref multi-ref │ │ │ │ +0017d0b0: 206f 626a 6563 7420 7365 7269 616c 697a object serializ │ │ │ │ +0017d0c0: 6174 696f 6e2e 2054 6869 7320 626f 6f73 ation. This boos │ │ │ │ +0017d0d0: 7473 2070 6572 666f 726d 616e 6365 2073 ts performance s │ │ │ │ +0017d0e0: 6967 6e69 6669 6361 6e74 6c79 2061 6e64 ignificantly and │ │ │ │ +0017d0f0: 2077 6f72 6b73 2077 6974 6820 534f 4150 works with SOAP │ │ │ │ +0017d100: 2064 6f63 756d 656e 742f 6c69 7465 7261 document/litera │ │ │ │ +0017d110: 6c20 7374 796c 6520 2869 2e65 2e20 6e6f l style (i.e. no │ │ │ │ +0017d120: 2069 642d 7265 6620 6772 6170 6820 7365 id-ref graph se │ │ │ │ +0017d130: 7269 616c 697a 6174 696f 6e20 6173 2072 rialization as r │ │ │ │ +0017d140: 6571 7569 7265 6420 7769 7468 2053 4f41 equired with SOA │ │ │ │ +0017d150: 5020 656e 636f 6469 6e67 2073 7479 6c65 P encoding style │ │ │ │ +0017d160: 292e 2044 6f20 6e6f 7420 7573 6520 7468 ). Do not use th │ │ │ │ +0017d170: 6973 2066 6f72 2053 4f41 5020 5250 4320 is for SOAP RPC │ │ │ │ +0017d180: 656e 636f 6465 6420 6d65 7373 6167 696e encoded messagin │ │ │ │ +0017d190: 672e 3c2f 6c69 3e0a 3c6c 693e 436f 6d70 g.
  • .
  • Comp │ │ │ │ +0017d1a0: 696c 6520 3c65 6d3e 3c63 6f64 653e 6773 ile gs │ │ │ │ +0017d1b0: 6f61 702f 7374 6473 6f61 7032 2e63 3c2f oap/stdsoap2.c and < │ │ │ │ +0017d1d0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s │ │ │ │ +0017d1e0: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp and all │ │ │ │ +0017d200: 6f74 6865 7220 736f 7572 6365 2063 6f64 other source cod │ │ │ │ +0017d210: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp │ │ │ │ +0017d220: 696c 6520 7469 6d65 2066 6c61 6720 3c63 ile time flag #WITH_NOIDRE │ │ │ │ +0017d240: 463c 2f63 6f64 653e 2074 6f20 696d 7072 F to impr │ │ │ │ +0017d250: 6f76 6520 7065 7266 6f72 6d61 6e63 6520 ove performance │ │ │ │ +0017d260: 6576 656e 2062 6574 7465 7220 6279 2070 even better by p │ │ │ │ +0017d270: 6572 6d61 6e65 6e74 6c79 2064 6973 6162 ermanently disab │ │ │ │ +0017d280: 6c69 6e67 2069 642d 7265 6620 6d75 6c74 ling id-ref mult │ │ │ │ +0017d290: 692d 7265 6620 6f62 6a65 6374 2073 6572 i-ref object ser │ │ │ │ +0017d2a0: 6961 6c69 7a61 7469 6f6e 2e20 446f 206e ialization. Do n │ │ │ │ +0017d2b0: 6f74 2075 7365 2074 6869 7320 666f 7220 ot use this for │ │ │ │ +0017d2c0: 534f 4150 2052 5043 2065 6e63 6f64 6564 SOAP RPC encoded │ │ │ │ +0017d2d0: 206d 6573 7361 6769 6e67 2e3c 2f6c 693e messaging.
  • │ │ │ │ +0017d2e0: 0a3c 6c69 3e44 6f20 6e6f 7420 7573 6520 .
  • Do not use │ │ │ │ +0017d2f0: 4445 4255 4720 6d6f 6465 2c20 7369 6e63 DEBUG mode, sinc │ │ │ │ +0017d300: 6520 7468 6520 6f76 6572 6865 6164 206f e the overhead o │ │ │ │ +0017d310: 6620 6c6f 6767 696e 6720 6973 2073 6967 f logging is sig │ │ │ │ +0017d320: 6e69 6669 6361 6e74 2e3c 2f6c 693e 0a3c nificant.
  • .< │ │ │ │ +0017d330: 2f75 6c3e 0a3c 703e f09f 949d 203c 6120 /ul>.

    .... Back to │ │ │ │ +0017d350: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +0017d360: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    < │ │ │ │ +0017d370: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +0017d380: 2069 643d 2273 6166 6574 7922 3e3c 2f61 id="safety">.Safety guards< │ │ │ │ +0017d3a0: 2f68 323e 0a3c 703e 5468 6520 666f 6c6c /h2>.

    The foll │ │ │ │ +0017d3b0: 6f77 696e 6720 7365 7474 696e 6773 2061 owing settings a │ │ │ │ +0017d3c0: 7265 2069 6d70 6f72 7461 6e74 2074 6f20 re important to │ │ │ │ +0017d3d0: 656e 7375 7265 2074 6861 7420 584d 4c20 ensure that XML │ │ │ │ +0017d3e0: 6d65 7373 6167 696e 6720 6973 2073 6166 messaging is saf │ │ │ │ +0017d3f0: 6520 6279 2064 6566 696e 696e 6720 7265 e by defining re │ │ │ │ +0017d400: 6173 6f6e 6162 6c65 2058 4d4c 206d 6573 asonable XML mes │ │ │ │ +0017d410: 7361 6765 2072 6573 7472 6963 7469 6f6e sage restriction │ │ │ │ +0017d420: 732e 2041 6c73 6f20 6d65 7373 6167 696e s. Also messagin │ │ │ │ +0017d430: 6720 7469 6d65 6f75 7473 2073 686f 756c g timeouts shoul │ │ │ │ +0017d440: 6420 6265 2073 6574 2061 7320 6578 706c d be set as expl │ │ │ │ +0017d450: 6169 6e65 6420 696e 2053 6563 7469 6f6e ained in Section │ │ │ │ +0017d460: 203c 6120 636c 6173 733d 2265 6c22 2068 Timeout │ │ │ │ +0017d490: 206d 616e 6167 656d 656e 7420 666f 7220 management for │ │ │ │ +0017d4a0: 6e6f 6e2d 626c 6f63 6b69 6e67 206f 7065 non-blocking ope │ │ │ │ +0017d4b0: 7261 7469 6f6e 733c 2f61 3e2e 3c2f 703e rations.

    │ │ │ │ +0017d4c0: 0a3c 703e 5468 6520 584d 4c20 7061 7273 .

    The XML pars │ │ │ │ +0017d4d0: 6572 2069 7320 636f 6e66 6967 7572 6564 er is configured │ │ │ │ +0017d4e0: 2074 6f20 7265 7374 7269 6374 2074 6865 to restrict the │ │ │ │ +0017d4f0: 2058 4d4c 206e 6573 7469 6e67 2064 6570 XML nesting dep │ │ │ │ +0017d500: 7468 206c 6576 656c 2074 6f20 3c63 6f64 th level to #SOAP_MAXLEVEL │ │ │ │ +0017d520: 3c2f 636f 6465 3e20 616e 6420 7265 7374 and rest │ │ │ │ +0017d530: 7269 6374 7320 7468 6520 7265 7065 6174 ricts the repeat │ │ │ │ +0017d540: 6564 206f 6363 7572 7265 6e63 6520 6f66 ed occurrence of │ │ │ │ +0017d550: 2065 6c65 6d65 6e74 7320 7468 6174 2061 elements that a │ │ │ │ +0017d560: 7265 2064 6573 6572 6961 6c69 7a65 6420 re deserialized │ │ │ │ +0017d570: 696e 746f 2061 7272 6179 7320 616e 6420 into arrays and │ │ │ │ +0017d580: 636f 6e74 6169 6e65 7273 2062 7920 3c63 containers by #SOAP_MAXOCC │ │ │ │ +0017d5a0: 5552 533c 2f63 6f64 653e 2e20 5468 6573 URS. Thes │ │ │ │ +0017d5b0: 6520 6d61 6372 6f73 2063 616e 2062 6520 e macros can be │ │ │ │ +0017d5c0: 6368 616e 6765 642c 2062 7574 2079 6f75 changed, but you │ │ │ │ +0017d5d0: 2063 616e 2061 6c73 6f20 6368 616e 6765 can also change │ │ │ │ +0017d5e0: 2074 6865 2066 6f6c 6c6f 7769 6e67 2063 the following c │ │ │ │ +0017d5f0: 6f6e 7465 7874 2061 7474 7269 6275 7465 ontext attribute │ │ │ │ +0017d600: 7320 6174 2072 756e 2d74 696d 652c 2065 s at run-time, e │ │ │ │ +0017d610: 2e67 2e20 746f 2065 6e68 616e 6365 2074 .g. to enhance t │ │ │ │ +0017d620: 6865 2073 6166 6574 7920 666f 7220 7370 he safety for sp │ │ │ │ +0017d630: 6563 6966 6963 2073 6572 7669 6365 2061 ecific service a │ │ │ │ +0017d640: 6e64 2f6f 7220 636c 6965 6e74 206f 7065 nd/or client ope │ │ │ │ +0017d650: 7261 7469 6f6e 733a 3c2f 703e 0a3c 756c rations:

    .
      .
    • soap::maxlev │ │ │ │ +0017d730: 656c 3c2f 613e 3c2f 636f 6465 3e20 7265 el re │ │ │ │ +0017d740: 7374 7269 6374 7320 7468 6520 584d 4c20 stricts the XML │ │ │ │ +0017d750: 6e65 7374 696e 6720 6465 7074 6820 6c65 nesting depth le │ │ │ │ +0017d760: 7665 6c2c 2077 6865 7265 2074 6865 2064 vel, where the d │ │ │ │ +0017d770: 6566 6175 6c74 2076 616c 7565 2069 7320 efault value is │ │ │ │ +0017d780: 3c63 6f64 653e 2353 4f41 505f 4d41 584c #SOAP_MAXL │ │ │ │ +0017d790: 4556 454c 3c2f 636f 6465 3e20 3d20 3130 EVEL = 10 │ │ │ │ +0017d7a0: 3030 302e 3c2f 6c69 3e0a 3c6c 693e 3c63 000.
    • .
    • soap │ │ │ │ +0017d870: 3a3a 6d61 786f 6363 7572 733c 2f61 3e3c ::maxoccurs< │ │ │ │ +0017d880: 2f63 6f64 653e 2072 6573 7472 6963 7473 /code> restricts │ │ │ │ +0017d890: 2074 6865 206e 756d 6265 7220 6f66 2072 the number of r │ │ │ │ +0017d8a0: 6570 6561 7465 6420 6f63 6375 7272 656e epeated occurren │ │ │ │ +0017d8b0: 6365 7320 6f66 2065 6c65 6d65 6e74 7320 ces of elements │ │ │ │ +0017d8c0: 7468 6174 2061 7265 2064 6573 6572 6961 that are deseria │ │ │ │ +0017d8d0: 6c69 7a65 6420 696e 746f 2061 7272 6179 lized into array │ │ │ │ +0017d8e0: 7320 616e 6420 7374 7275 6374 732c 2077 s and structs, w │ │ │ │ +0017d8f0: 6865 7265 2074 6865 2064 6566 6175 6c74 here the default │ │ │ │ +0017d900: 2076 616c 7565 2069 7320 3c63 6f64 653e value is │ │ │ │ +0017d910: 2353 4f41 505f 4d41 584f 4343 5552 533c #SOAP_MAXOCCURS< │ │ │ │ +0017d920: 2f63 6f64 653e 203d 2031 3030 3030 302e /code> = 100000. │ │ │ │ +0017d930: 3c2f 6c69 3e0a 3c6c 693e 3c63 6f64 653e
    • .
    • │ │ │ │ +0017d940: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::maxleng │ │ │ │ +0017da00: 7468 3c2f 613e 3c2f 636f 6465 3e20 7265 th re │ │ │ │ +0017da10: 7374 7269 6374 7320 7468 6520 6c65 6e67 stricts the leng │ │ │ │ +0017da20: 7468 206f 6620 7374 7269 6e67 7320 6465 th of strings de │ │ │ │ +0017da30: 7365 7269 616c 697a 6564 2066 726f 6d20 serialized from │ │ │ │ +0017da40: 584d 4c2e 2041 207a 6572 6f20 6f72 206e XML. A zero or n │ │ │ │ +0017da50: 6567 6174 6976 6520 7661 6c75 6520 6973 egative value is │ │ │ │ +0017da60: 2075 6e72 6573 7472 6963 7465 6420 6c65 unrestricted le │ │ │ │ +0017da70: 6e67 7468 2e20 5768 656e 2072 6573 7472 ngth. When restr │ │ │ │ +0017da80: 6963 7465 642c 2074 6865 2058 4d4c 2073 icted, the XML s │ │ │ │ +0017da90: 6368 656d 6120 7661 6c69 6461 7469 6f6e chema validation │ │ │ │ +0017daa0: 206d 6178 4c65 6e67 7468 2074 616b 6573 maxLength takes │ │ │ │ +0017dab0: 2070 7265 6365 6465 6e63 6520 6f76 6572 precedence over │ │ │ │ +0017dac0: 2074 6869 7320 6c65 6e67 7468 2072 6573 this length res │ │ │ │ +0017dad0: 7472 6963 7469 6f6e 2e20 536f 2073 6574 triction. So set │ │ │ │ +0017dae0: 7469 6e67 2061 2073 6d61 6c6c 6572 2076 ting a smaller v │ │ │ │ +0017daf0: 616c 7565 2077 696c 6c20 6e6f 7420 696e alue will not in │ │ │ │ +0017db00: 7465 7266 6572 6520 7769 7468 2074 6865 terfere with the │ │ │ │ +0017db10: 2058 4d4c 2076 616c 6964 6174 696f 6e20 XML validation │ │ │ │ +0017db20: 7275 6c65 732e 2054 6865 2064 6566 6175 rules. The defau │ │ │ │ +0017db30: 6c74 2076 616c 7565 2069 7320 3c63 6f64 lt value is #SOAP_MAXLENGT │ │ │ │ +0017db50: 483c 2f63 6f64 653e 203d 2030 2e20 4e6f H = 0. No │ │ │ │ +0017db60: 7465 2074 6861 7420 7374 7269 6e67 206c te that string l │ │ │ │ +0017db70: 656e 6774 6820 6973 2065 7870 7265 7373 ength is express │ │ │ │ +0017db80: 6564 2069 6e20 6e75 6d62 6572 206f 6620 ed in number of │ │ │ │ +0017db90: 6368 6172 6163 7465 7273 2c20 6e6f 7420 characters, not │ │ │ │ +0017dba0: 6279 7465 732e 2053 6f20 5554 462d 3820 bytes. So UTF-8 │ │ │ │ +0017dbb0: 656e 636f 6469 6e67 7320 6172 6520 6e6f encodings are no │ │ │ │ +0017dbc0: 7420 7472 756e 6361 7465 642e 3c2f 6c69 t truncated.
    • .
    • soap::recv_m │ │ │ │ +0017dca0: 6178 6c65 6e67 7468 3c2f 613e 3c2f 636f axlength the maximum │ │ │ │ +0017dcc0: 6c65 6e67 7468 206f 6620 6d65 7373 6167 length of messag │ │ │ │ +0017dcd0: 6573 2072 6563 6569 7665 642c 2032 4742 es received, 2GB │ │ │ │ +0017dce0: 2062 7920 6465 6661 756c 742e 3c2f 6c69 by default.
    • .
    .

    XML s │ │ │ │ +0017dd00: 6368 656d 6120 7661 6c69 6461 7469 6f6e chema validation │ │ │ │ +0017dd10: 2063 6f6e 7374 7261 696e 7473 2061 7265 constraints are │ │ │ │ +0017dd20: 2065 6e66 6f72 6365 6420 7769 7468 2074 enforced with t │ │ │ │ +0017dd30: 6865 203c 636f 6465 3e23 534f 4150 5f58 he #SOAP_X │ │ │ │ +0017dd40: 4d4c 5f53 5452 4943 543c 2f63 6f64 653e ML_STRICT │ │ │ │ +0017dd50: 2063 6f6e 7465 7874 2066 6c61 672e 2054 context flag. T │ │ │ │ +0017dd60: 6865 2073 6368 656d 6120 6d61 784c 656e he schema maxLen │ │ │ │ +0017dd70: 6774 6820 7661 6c69 6461 7469 6f6e 2063 gth validation c │ │ │ │ +0017dd80: 6f6e 7374 7261 696e 7420 6f76 6572 7275 onstraint overru │ │ │ │ +0017dd90: 6c65 7320 7468 6520 3c63 6f64 653e 3c61 les the soap::maxlength │ │ │ │ +0017de60: 3c2f 613e 3c2f 636f 6465 3e20 6775 6172 guar │ │ │ │ +0017de70: 642e 2054 6865 2073 6368 656d 6120 6d61 d. The schema ma │ │ │ │ +0017de80: 784f 6363 7572 7320 7661 6c69 6461 7469 xOccurs validati │ │ │ │ +0017de90: 6f6e 2063 6f6e 7374 7261 696e 7420 646f on constraint do │ │ │ │ +0017dea0: 6573 206e 6f74 206f 7665 7272 756c 6520 es not overrule │ │ │ │ +0017deb0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::maxoccur │ │ │ │ +0017df80: 733c 2f61 3e3c 2f63 6f64 653e 2067 7561 s gua │ │ │ │ +0017df90: 7264 2c20 736f 2061 7272 6179 7320 616e rd, so arrays an │ │ │ │ +0017dfa0: 6420 636f 6e74 6169 6e65 7273 2061 7265 d containers are │ │ │ │ +0017dfb0: 2061 6c77 6179 7320 7265 7374 7269 6374 always restrict │ │ │ │ +0017dfc0: 6564 2069 6e20 6c65 6e67 7468 2062 7920 ed in length by │ │ │ │ +0017dfd0: 7468 6973 2067 7561 7264 2e3c 2f70 3e0a this guard.

    . │ │ │ │ +0017dfe0: 3c70 3e4f 7468 6572 2063 6f6d 7069 6c65

    Other compile │ │ │ │ +0017dff0: 2d74 696d 6520 636f 6e66 6967 7572 6174 -time configurat │ │ │ │ +0017e000: 696f 6e20 7365 7474 696e 6773 2061 7265 ion settings are │ │ │ │ +0017e010: 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c :

    .
      .
    • < │ │ │ │ +0017e020: 636f 6465 3e23 534f 4150 5f4d 4158 414c code>#SOAP_MAXAL │ │ │ │ +0017e030: 4c4f 4353 495a 453c 2f63 6f64 653e 2074 LOCSIZE t │ │ │ │ +0017e040: 6865 206d 6178 696d 756d 2073 697a 6520 he maximum size │ │ │ │ +0017e050: 6f66 2061 2062 6c6f 636b 206f 6620 6d65 of a block of me │ │ │ │ +0017e060: 6d6f 7279 2074 6861 7420 3c63 6f64 653e mory that │ │ │ │ +0017e070: 6d61 6c6c 6f63 3c2f 636f 6465 3e20 6361 malloc ca │ │ │ │ +0017e080: 6e20 616c 6c6f 6361 7465 2e3c 2f6c 693e n allocate.
    • │ │ │ │ +0017e090: 0a3c 6c69 3e3c 636f 6465 3e23 534f 4150 .
    • #SOAP │ │ │ │ +0017e0a0: 5f4d 4158 4152 5241 5953 495a 453c 2f63 _MAXARRAYSIZE the maximum │ │ │ │ +0017e0c0: 2061 6c6c 6f63 6174 696f 6e20 7468 7265 allocation thre │ │ │ │ +0017e0d0: 7368 6f6c 6420 746f 2070 7265 2d61 6c6c shold to pre-all │ │ │ │ +0017e0e0: 6f63 6174 6520 534f 4150 2061 7272 6179 ocate SOAP array │ │ │ │ +0017e0f0: 7320 696e 206d 656d 6f72 792e 3c2f 6c69 s in memory.
    • .
    • #SOA │ │ │ │ +0017e110: 505f 4d41 5844 494d 4553 495a 453c 2f63 P_MAXDIMESIZE the maximum │ │ │ │ +0017e130: 2044 494d 4520 6174 7461 6368 6d65 6e74 DIME attachment │ │ │ │ +0017e140: 2073 697a 6520 616c 6c6f 7765 6420 746f size allowed to │ │ │ │ +0017e150: 2072 6563 6569 7665 2e3c 2f6c 693e 0a3c receive.
    • .< │ │ │ │ +0017e160: 6c69 3e3c 636f 6465 3e23 534f 4150 5f4d li>#SOAP_M │ │ │ │ +0017e170: 4158 4549 4e54 523c 2f63 6f64 653e 206d AXEINTR m │ │ │ │ +0017e180: 6178 696d 756d 206e 756d 6265 7220 6f66 aximum number of │ │ │ │ +0017e190: 2045 494e 5452 2069 6e74 6572 7275 7074 EINTR interrupt │ │ │ │ +0017e1a0: 7320 746f 2069 676e 6f72 6520 7768 696c s to ignore whil │ │ │ │ +0017e1b0: 6520 706f 6c6c 696e 6720 6120 736f 636b e polling a sock │ │ │ │ +0017e1c0: 6574 2066 6f72 2070 656e 6469 6e67 2061 et for pending a │ │ │ │ +0017e1d0: 6374 6976 6974 792e 3c2f 6c69 3e0a 3c2f ctivity...

      .... Back to │ │ │ │ +0017e200: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ +0017e210: 733c 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 s

      .

      .Timeout manage │ │ │ │ +0017e250: 6d65 6e74 2066 6f72 206e 6f6e 2d62 6c6f ment for non-blo │ │ │ │ +0017e260: 636b 696e 6720 6f70 6572 6174 696f 6e73 cking operations │ │ │ │ +0017e270: 3c2f 6832 3e0a 3c70 3e53 6f63 6b65 7420

      .

      Socket │ │ │ │ +0017e280: 636f 6e6e 6563 742c 2061 6363 6570 742c connect, accept, │ │ │ │ +0017e290: 2073 656e 642c 2061 6e64 2072 6563 6569 send, and recei │ │ │ │ +0017e2a0: 7665 2074 696d 656f 7574 2076 616c 7565 ve timeout value │ │ │ │ +0017e2b0: 7320 6361 6e20 6265 2073 6574 2074 6f20 s can be set to │ │ │ │ +0017e2c0: 6d61 6e61 6765 2073 6f63 6b65 7420 636f manage socket co │ │ │ │ +0017e2d0: 6d6d 756e 6963 6174 696f 6e20 7469 6d65 mmunication time │ │ │ │ +0017e2e0: 6f75 7473 2e20 5468 6520 3c63 6f64 653e outs. The │ │ │ │ +0017e2f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co │ │ │ │ +0017e3b0: 6e6e 6563 745f 7469 6d65 6f75 743c 2f61 nnect_timeout, │ │ │ │ +0017e3d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::ac │ │ │ │ +0017e490: 6365 7074 5f74 696d 656f 7574 3c2f 613e cept_timeout │ │ │ │ +0017e4a0: 3c2f 636f 6465 3e2c 203c 636f 6465 3e3c , < │ │ │ │ +0017e4b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0017e4c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +0017e4d0: 6d6c 2361 3731 3162 6233 6135 3364 6537 ml#a711bb3a53de7 │ │ │ │ +0017e4e0: 6363 3632 3432 3965 3464 3361 3265 3062 cc62429e4d3a2e0b │ │ │ │ +0017e4f0: 3534 3734 2220 7469 746c 653d 2255 7365 5474" title="Use │ │ │ │ +0017e500: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time │ │ │ │ +0017e510: 6f75 7420 746f 2073 656e 6420 6120 7061 out to send a pa │ │ │ │ +0017e520: 636b 6574 206f 6620 6461 7461 2c20 706f cket of data, po │ │ │ │ +0017e530: 7369 7469 7665 2074 696d 656f 7574 2076 sitive timeout v │ │ │ │ +0017e540: 616c 7565 7320 6172 6520 7365 636f 6e64 alues are second │ │ │ │ +0017e550: 732c 2e2e 2e22 3e73 6f61 703a 3a73 656e s,...">soap::sen │ │ │ │ +0017e560: 645f 7469 6d65 6f75 743c 2f61 3e3c 2f63 d_timeout, soap::rec │ │ │ │ +0017e630: 765f 7469 6d65 6f75 743c 2f61 3e3c 2f63 v_timeout and < │ │ │ │ +0017e650: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0017e660: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +0017e670: 6d6c 2361 6663 6631 6432 3336 6430 3532 ml#afcf1d236d052 │ │ │ │ +0017e680: 3537 3931 3232 6637 3835 6437 3633 3963 579122f785d7639c │ │ │ │ +0017e690: 3433 6337 2220 7469 746c 653d 2255 7365 43c7" title="Use │ │ │ │ +0017e6a0: 722d 6465 6669 6e61 626c 6520 7469 6d65 r-definable time │ │ │ │ +0017e6b0: 6f75 7420 746f 2073 656e 6420 6f72 2072 out to send or r │ │ │ │ +0017e6c0: 6563 6569 7665 2061 6e20 656e 7469 7265 eceive an entire │ │ │ │ +0017e6d0: 206d 6573 7361 6765 2c20 706f 7369 7469 message, positi │ │ │ │ +0017e6e0: 7665 2074 696d 656f 7574 2076 616c 7565 ve timeout value │ │ │ │ +0017e6f0: 7320 6172 6520 7365 636f 6e64 732c 2e2e s are seconds,.. │ │ │ │ +0017e700: 2e22 3e73 6f61 703a 3a74 7261 6e73 6665 .">soap::transfe │ │ │ │ +0017e710: 725f 7469 6d65 6f75 743c 2f61 3e3c 2f63 r_timeout context att │ │ │ │ +0017e730: 7269 6275 7465 7320 6f66 2074 6865 2063 ributes of the c │ │ │ │ +0017e740: 7572 7265 6e74 2063 6f6e 7465 7874 203c urrent context < │ │ │ │ +0017e750: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap │ │ │ │ +0017e7b0: 2063 616e 2062 6520 7365 7420 746f 2074 can be set to t │ │ │ │ +0017e7c0: 6865 2061 7070 726f 7072 6961 7465 2075 he appropriate u │ │ │ │ +0017e7d0: 7365 722d 6465 6669 6e65 6420 736f 636b ser-defined sock │ │ │ │ +0017e7e0: 6574 2073 656e 642c 2072 6563 6569 7665 et send, receive │ │ │ │ +0017e7f0: 2c20 616e 6420 6163 6365 7074 2074 696d , and accept tim │ │ │ │ +0017e800: 656f 7574 2076 616c 7565 732e 2041 2070 eout values. A p │ │ │ │ +0017e810: 6f73 6974 6976 6520 7661 6c75 6520 6d65 ositive value me │ │ │ │ +0017e820: 6173 7572 6573 2074 6865 2074 696d 656f asures the timeo │ │ │ │ +0017e830: 7574 2069 6e20 7365 636f 6e64 732e 2041 ut in seconds. A │ │ │ │ +0017e840: 206e 6567 6174 6976 6520 7469 6d65 6f75 negative timeou │ │ │ │ +0017e850: 7420 7661 6c75 6520 6d65 6173 7572 6573 t value measures │ │ │ │ +0017e860: 2074 6865 2074 696d 656f 7574 2069 6e20 the timeout in │ │ │ │ +0017e870: 6d69 6372 6f73 6563 6f6e 6473 2028 3130 microseconds (10 │ │ │ │ +0017e880: 5e2d 3620 7365 6329 2e3c 2f70 3e0a 3c70 ^-6 sec).

      .

      The soap::connect │ │ │ │ +0017e960: 5f74 696d 656f 7574 3c2f 613e 3c2f 636f _timeout specifies th │ │ │ │ +0017e980: 6520 7469 6d65 6f75 7420 666f 7220 3c63 e timeout for soap_call_ns │ │ │ │ +0017e9a0: 5f5f 7765 626d 6574 686f 643c 2f63 6f64 __webmethod stub function │ │ │ │ +0017e9c0: 2063 616c 6c73 2061 6e64 2066 6f72 2043 calls and for C │ │ │ │ +0017e9d0: 2b2b 2070 726f 7879 2063 6c61 7373 2063 ++ proxy class c │ │ │ │ +0017e9e0: 616c 6c73 2e3c 2f70 3e0a 3c70 3e54 6865 alls.

      .

      The │ │ │ │ +0017e9f0: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +0017eab0: 6f61 703a 3a61 6363 6570 745f 7469 6d65 oap::accept_time │ │ │ │ +0017eac0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2073 out s │ │ │ │ +0017ead0: 7065 6369 6669 6573 2074 6865 2074 696d pecifies the tim │ │ │ │ +0017eae0: 656f 7574 2066 6f72 203c 636f 6465 3e3c eout for < │ │ │ │ +0017eaf0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0017eb00: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0017eb10: 5f69 6f2e 6874 6d6c 2367 6165 6330 6531 _io.html#gaec0e1 │ │ │ │ +0017eb20: 6165 6363 3264 3534 3739 6438 3039 3937 aecc2d5479d80997 │ │ │ │ +0017eb30: 3632 6665 6234 3731 3363 3622 2074 6974 62feb4713c6" tit │ │ │ │ +0017eb40: 6c65 3d22 4163 6365 7074 2061 2063 6f6e le="Accept a con │ │ │ │ +0017eb50: 6e65 6374 696f 6e20 7769 7468 2061 2063 nection with a c │ │ │ │ +0017eb60: 6c69 656e 742e 223e 736f 6170 5f61 6363 lient.">soap_acc │ │ │ │ +0017eb70: 6570 743c 2f61 3e3c 2f63 6f64 653e 2063 ept c │ │ │ │ +0017eb80: 616c 6c73 2e3c 2f70 3e0a 3c70 3e54 6865 alls.

      .

      The │ │ │ │ +0017eb90: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +0017ec40: 6f61 703a 3a73 656e 645f 7469 6d65 6f75 oap::send_timeou │ │ │ │ +0017ec50: 743c 2f61 3e3c 2f63 6f64 653e 2061 6e64 t and │ │ │ │ +0017ec60: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::recv_tim │ │ │ │ +0017ed20: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout │ │ │ │ +0017ed30: 7370 6563 6966 7920 7468 6520 7469 6d65 specify the time │ │ │ │ +0017ed40: 6f75 7420 666f 7220 6e6f 6e2d 626c 6f63 out for non-bloc │ │ │ │ +0017ed50: 6b69 6e67 2073 6f63 6b65 7420 492f 4f20 king socket I/O │ │ │ │ +0017ed60: 6f70 6572 6174 696f 6e73 2e20 5468 6973 operations. This │ │ │ │ +0017ed70: 2069 7320 7468 6520 6d61 7869 6d75 6d20 is the maximum │ │ │ │ +0017ed80: 6465 6c61 7920 6f6e 2074 6865 2073 6f63 delay on the soc │ │ │ │ +0017ed90: 6b65 7420 6f70 6572 6174 696f 6e20 7065 ket operation pe │ │ │ │ +0017eda0: 726d 6974 7465 642e 3c2f 703e 0a3c 703e rmitted.

      .

      │ │ │ │ +0017edb0: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The so │ │ │ │ +0017ee70: 6170 3a3a 7472 616e 7366 6572 5f74 696d ap::transfer_tim │ │ │ │ +0017ee80: 656f 7574 3c2f 613e 3c2f 636f 6465 3e20 eout │ │ │ │ +0017ee90: 6973 206e 6577 2073 696e 6365 2032 2e38 is new since 2.8 │ │ │ │ +0017eea0: 2e34 3820 616e 6420 6c69 6d69 7473 2074 .48 and limits t │ │ │ │ +0017eeb0: 6865 2074 696d 6520 6120 6d65 7373 6167 he time a messag │ │ │ │ +0017eec0: 6520 7365 6e64 2061 6e64 2061 206d 6573 e send and a mes │ │ │ │ +0017eed0: 7361 6765 2072 6563 6569 7665 206f 7065 sage receive ope │ │ │ │ +0017eee0: 7261 7469 6f6e 2063 616e 2074 616b 652e ration can take. │ │ │ │ +0017eef0: 2054 6869 7320 7661 6c75 6520 7368 6f75 This value shou │ │ │ │ +0017ef00: 6c64 2062 6520 7573 6564 2069 6e20 636f ld be used in co │ │ │ │ +0017ef10: 6d62 696e 6174 696f 6e20 7769 7468 203c mbination with < │ │ │ │ +0017ef20: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ +0017efd0: 703a 3a73 656e 645f 7469 6d65 6f75 743c p::send_timeout< │ │ │ │ +0017efe0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and < │ │ │ │ +0017eff0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code> │ │ │ │ +0017f0a0: 736f 6170 3a3a 7265 6376 5f74 696d 656f soap::recv_timeo │ │ │ │ +0017f0b0: 7574 3c2f 613e 3c2f 636f 6465 3e20 666f ut fo │ │ │ │ +0017f0c0: 7220 6163 6375 7261 7465 2074 696d 656f r accurate timeo │ │ │ │ +0017f0d0: 7574 2063 6f6e 7472 6f6c 2e20 5468 6520 ut control. The │ │ │ │ +0017f0e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +0017f1a0: 6170 3a3a 7265 6376 5f6d 6178 6c65 6e67 ap::recv_maxleng │ │ │ │ +0017f1b0: 7468 3c2f 613e 3c2f 636f 6465 3e20 7661 th va │ │ │ │ +0017f1c0: 6c75 6520 7768 656e 206e 6f6e 2d7a 6572 lue when non-zer │ │ │ │ +0017f1d0: 6f20 6c69 6d69 7473 2074 6865 206c 656e o limits the len │ │ │ │ +0017f1e0: 6774 6820 6f66 206d 6573 7361 6765 7320 gth of messages │ │ │ │ +0017f1f0: 7468 6174 2063 616e 2062 6520 7265 6365 that can be rece │ │ │ │ +0017f200: 6976 6564 2069 6e20 6279 7465 7320 696e ived in bytes in │ │ │ │ +0017f210: 2074 6f74 616c 2069 6e20 6465 636f 6d70 total in decomp │ │ │ │ +0017f220: 7265 7373 6564 2066 6f72 6d20 286d 6573 ressed form (mes │ │ │ │ +0017f230: 7361 6765 206c 656e 6774 6820 696e 636c sage length incl │ │ │ │ +0017f240: 7564 6573 2048 5454 5020 6865 6164 6572 udes HTTP header │ │ │ │ +0017f250: 7320 616e 6420 4854 5450 2063 6875 6e6b s and HTTP chunk │ │ │ │ +0017f260: 2073 697a 6520 6669 656c 6473 292e 2054 size fields). T │ │ │ │ +0017f270: 6865 2076 616c 7565 206f 6620 3c63 6f64 he value of soap:: │ │ │ │ +0017f340: 7265 6376 5f6d 6178 6c65 6e67 7468 3c2f recv_maxlength is 2GB │ │ │ │ +0017f360: 2062 7920 6465 6661 756c 742e 3c2f 703e by default.

      │ │ │ │ +0017f370: 0a3c 703e 4578 616d 706c 653a 3c2f 703e .

      Example:

      │ │ │ │ +0017f380: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
      s │ │ │ │ +0017f3c0: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = │ │ │ │ +0017f430: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
      .
      soap-&g │ │ │ │ +0017f4e0: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;send_ │ │ │ │ +0017f530: 7469 6d65 6f75 743c 2f61 3e20 3d20 3130 timeout = 10 │ │ │ │ +0017f540: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
      .
      soap->< │ │ │ │ +0017f590: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0017f5a0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0017f5b0: 6874 6d6c 2361 6335 6435 6662 3932 6666 html#ac5d5fb92ff │ │ │ │ +0017f5c0: 6664 6137 3234 6363 6233 6230 3338 6432 fda724ccb3b038d2 │ │ │ │ +0017f5d0: 6262 3233 3838 223e 7265 6376 5f74 696d bb2388">recv_tim │ │ │ │ +0017f5e0: 656f 7574 3c2f 613e 203d 2031 303b 203c eout = 10; < │ │ │ │ +0017f5f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.

      Thi │ │ │ │ +0017f6c0: 7320 7769 6c6c 2072 6573 756c 7420 696e s will result in │ │ │ │ +0017f6d0: 2061 2074 696d 656f 7574 2069 6620 6e6f a timeout if no │ │ │ │ +0017f6e0: 2064 6174 6120 6361 6e20 6265 2073 656e data can be sen │ │ │ │ +0017f6f0: 6420 696e 2031 3020 7365 636f 6e64 7320 d in 10 seconds │ │ │ │ +0017f700: 616e 6420 6e6f 2064 6174 6120 6973 2072 and no data is r │ │ │ │ +0017f710: 6563 6569 7665 6420 7769 7468 696e 2031 eceived within 1 │ │ │ │ +0017f720: 3020 7365 636f 6e64 7320 6166 7465 7220 0 seconds after │ │ │ │ +0017f730: 696e 6974 6961 7469 6e67 2061 2073 656e initiating a sen │ │ │ │ +0017f740: 6420 6f72 2072 6563 6569 7665 206f 7065 d or receive ope │ │ │ │ +0017f750: 7261 7469 6f6e 206f 7665 7220 7468 6520 ration over the │ │ │ │ +0017f760: 736f 636b 6574 2e20 4120 7661 6c75 6520 socket. A value │ │ │ │ +0017f770: 6f66 207a 6572 6f20 6469 7361 626c 6573 of zero disables │ │ │ │ +0017f780: 2074 696d 656f 7574 2c20 666f 7220 6578 timeout, for ex │ │ │ │ +0017f790: 616d 706c 653a 3c2f 703e 0a3c 6469 7620 ample:

      .
      struct │ │ │ │ +0017f7e0: 3c2f 7370 616e 3e3c 6120 636c 6173 733d so │ │ │ │ +0017f810: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ +0017f840: 6f61 703c 2f61 3e20 3d20 3c61 2063 6c61 oap = s │ │ │ │ +0017f8a0: 6f61 705f 6e65 773c 2f61 3e28 293b 203c oap_new(); < │ │ │ │ +0017f8b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>...< │ │ │ │ +0017fa10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0017fa20: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ +0017fa50: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->re │ │ │ │ +0017faa0: 6376 5f74 696d 656f 7574 3c2f 613e 203d cv_timeout = │ │ │ │ +0017fab0: 2030 3b20 3c2f 6469 763e 0a3c 2f64 6976 0;
      .
      War │ │ │ │ -00180090: 6e69 6e67 3c2f 6474 3e3c 6464 3e4d 616e ning
      Man │ │ │ │ -001800a0: 7920 4c69 6e75 7820 7665 7273 696f 6e73 y Linux versions │ │ │ │ -001800b0: 2064 6f20 6e6f 7420 7375 7070 6f72 7420 do not support │ │ │ │ -001800c0: 6e6f 6e2d 626c 6f63 6b69 6e67 203c 636f non-blocking connect(). Therefore, │ │ │ │ -001800f0: 7365 7474 696e 6720 3c63 6f64 653e 3c61 setting soap::conn │ │ │ │ -001801c0: 6563 745f 7469 6d65 6f75 743c 2f61 3e3c ect_timeout< │ │ │ │ -001801d0: 2f63 6f64 653e 2066 6f72 206e 6f6e 2d62 /code> for non-b │ │ │ │ -001801e0: 6c6f 636b 696e 6720 3c63 6f64 653e 736f locking so │ │ │ │ -001801f0: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm │ │ │ │ -00180200: 6574 686f 643c 2f63 6f64 653e 2063 616c ethod cal │ │ │ │ -00180210: 6c73 206d 6179 206e 6f74 2077 6f72 6b20 ls may not work │ │ │ │ -00180220: 756e 6465 7220 4c69 6e75 782e 3c2f 6464 under Linux.
      .
      .Interrupt │ │ │ │ -00180240: 7320 2845 494e 5452 2920 6361 6e20 6166 s (EINTR) can af │ │ │ │ -00180250: 6665 6374 2074 6865 2062 6c6f 636b 696e fect the blockin │ │ │ │ -00180260: 6720 7469 6d65 2069 6e20 492f 4f20 6f70 g time in I/O op │ │ │ │ -00180270: 6572 6174 696f 6e73 2e20 5468 6520 6d61 erations. The ma │ │ │ │ -00180280: 7869 6d75 6d20 6e75 6d62 6572 206f 6620 ximum number of │ │ │ │ -00180290: 4549 4e54 5220 7468 6174 2077 696c 6c20 EINTR that will │ │ │ │ -001802a0: 6e6f 7420 7472 6967 6765 7220 616e 2065 not trigger an e │ │ │ │ -001802b0: 7272 6f72 2069 7320 7365 7420 6279 203c rror is set by < │ │ │ │ -001802c0: 636f 6465 3e23 534f 4150 5f4d 4158 4549 code>#SOAP_MAXEI │ │ │ │ -001802d0: 4e54 523c 2f63 6f64 653e 2069 6e20 3c65 NTR in gsoap/st │ │ │ │ -001802f0: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h< │ │ │ │ -00180300: 2f65 6d3e 2c20 7768 6963 6820 6973 2031 /em>, which is 1 │ │ │ │ -00180310: 3020 6279 2064 6566 6175 6c74 2e20 4561 0 by default. Ea │ │ │ │ -00180320: 6368 2045 494e 5452 206d 6179 2069 6e63 ch EINTR may inc │ │ │ │ -00180330: 7265 6173 6520 7468 6520 626c 6f63 6b69 rease the blocki │ │ │ │ -00180340: 6e67 2074 696d 6520 6279 2075 7020 746f ng time by up to │ │ │ │ -00180350: 206f 6e65 2073 6563 6f6e 642c 2075 7020 one second, up │ │ │ │ -00180360: 746f 203c 636f 6465 3e23 534f 4150 5f4d to #SOAP_M │ │ │ │ -00180370: 4158 4549 4e54 523c 2f63 6f64 653e 2073 AXEINTR s │ │ │ │ -00180380: 6563 6f6e 6473 2074 6f74 616c 2e3c 2f64 econds total.
      .

      .... │ │ │ │ -001803a0: 3c61 2068 7265 663d 2223 223e 4261 636b Back │ │ │ │ -001803b0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con │ │ │ │ -001803c0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

      ..Closing │ │ │ │ -00180400: 2063 6f6e 6e65 6374 696f 6e73 2062 7920 connections by │ │ │ │ -00180410: 666f 7263 653c 2f68 323e 0a3c 703e 546f force

    .

    To │ │ │ │ -00180420: 2063 6c6f 7365 2061 2073 6f63 6b65 7420 close a socket │ │ │ │ -00180430: 636f 6e6e 6563 7469 6f6e 2062 7920 666f connection by fo │ │ │ │ -00180440: 7263 652c 2079 6f75 2063 616e 2075 7365 rce, you can use │ │ │ │ -00180450: 203c 636f 6465 3e73 6f61 705f 666f 7263 soap_forc │ │ │ │ -00180460: 655f 636c 6f73 6573 6f63 6b28 736f 6170 e_closesock(soap │ │ │ │ -00180470: 293c 2f63 6f64 653e 2c20 7768 6963 6820 ), which │ │ │ │ -00180480: 636c 6f73 6573 2074 6865 2063 6f6e 6e65 closes the conne │ │ │ │ -00180490: 6374 696f 6e20 7265 6761 7264 6c65 7373 ction regardless │ │ │ │ -001804a0: 2069 6620 6b65 6570 2d61 6c69 7665 2069 if keep-alive i │ │ │ │ -001804b0: 7320 6163 7469 7665 2e20 4279 2063 6f6e s active. By con │ │ │ │ -001804c0: 7472 6173 742c 203c 636f 6465 3e73 6f61 trast, soa │ │ │ │ -001804d0: 705f 636c 6f73 6573 6f63 6b28 736f 6170 p_closesock(soap │ │ │ │ -001804e0: 293c 2f63 6f64 653e 206f 6e6c 7920 636c ) only cl │ │ │ │ -001804f0: 6f73 6573 2074 6865 2063 6f6e 6e65 6374 oses the connect │ │ │ │ -00180500: 696f 6e20 7768 656e 206b 6565 702d 616c ion when keep-al │ │ │ │ -00180510: 6976 6520 6973 206e 6f74 2061 6374 6976 ive is not activ │ │ │ │ -00180520: 652e 3c2f 703e 0a3c 703e 546f 2066 6f72 e.

    .

    To for │ │ │ │ -00180530: 6365 2d63 6c6f 7365 2061 2063 6f6e 6e65 ce-close a conne │ │ │ │ -00180540: 6374 696f 6e20 6672 6f6d 2061 6e6f 7468 ction from anoth │ │ │ │ -00180550: 6572 2074 6872 6561 642c 2063 6f6d 7069 er thread, compi │ │ │ │ -00180560: 6c65 2073 7464 736f 6170 322e 6320 6f72 le stdsoap2.c or │ │ │ │ -00180570: 2073 7464 736f 6170 322e 6370 7020 616e stdsoap2.cpp an │ │ │ │ -00180580: 6420 796f 7572 2070 726f 6a65 6374 2073 d your project s │ │ │ │ -00180590: 6f75 7263 6520 636f 6465 2077 6974 6820 ource code with │ │ │ │ -001805a0: 3c63 6f64 653e 2357 4954 485f 5345 4c46 #WITH_SELF │ │ │ │ -001805b0: 5f50 4950 453c 2f63 6f64 653e 2074 6f20 _PIPE to │ │ │ │ -001805c0: 656e 6162 6c65 2074 6869 7320 6665 6174 enable this feat │ │ │ │ -001805d0: 7572 652e 2055 7365 203c 636f 6465 3e73 ure. Use s │ │ │ │ -001805e0: 6f61 705f 636c 6f73 655f 636f 6e6e 6563 oap_close_connec │ │ │ │ -001805f0: 7469 6f6e 2873 6f61 7029 3c2f 636f 6465 tion(soap) on the < │ │ │ │ -00180610: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00180620: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -00180630: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml" title="Conte │ │ │ │ -00180640: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi │ │ │ │ -00180650: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.">soap< │ │ │ │ -00180660: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte │ │ │ │ -00180670: 7874 2074 6861 7420 6d75 7374 2063 6c6f xt that must clo │ │ │ │ -00180680: 7365 2e20 596f 7520 6361 6e20 6d61 6b65 se. You can make │ │ │ │ -00180690: 2074 6869 7320 6361 6c6c 2066 726f 6d20 this call from │ │ │ │ -001806a0: 616e 6f74 6865 7220 7468 7265 6164 2061 another thread a │ │ │ │ -001806b0: 6e64 2070 6173 7320 7468 6520 3c63 6f64 nd pass the so │ │ │ │ -00180710: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co │ │ │ │ -00180720: 6e74 6578 7420 746f 2074 6869 7320 6675 ntext to this fu │ │ │ │ -00180730: 6e63 7469 6f6e 206f 6620 7468 6520 7468 nction of the th │ │ │ │ -00180740: 7265 6164 2074 6861 7420 6d75 7374 2063 read that must c │ │ │ │ -00180750: 6c6f 7365 2063 6f6e 6e65 6374 696f 6e73 lose connections │ │ │ │ -00180760: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ -00180780: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ -00180790: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 323e nts

    .

    │ │ │ │ -001807a0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .Socket opt │ │ │ │ -001807d0: 696f 6e73 2061 6e64 2066 6c61 6773 3c2f ions and flags.

    Socket co │ │ │ │ -001807f0: 6d6d 756e 6963 6174 696f 6e73 2063 616e mmunications can │ │ │ │ -00180800: 2062 6520 636f 6e74 726f 6c6c 6564 2077 be controlled w │ │ │ │ -00180810: 6974 6820 736f 636b 6574 206f 7074 696f ith socket optio │ │ │ │ -00180820: 6e73 2061 6e64 2066 6c61 6773 2e20 5468 ns and flags. Th │ │ │ │ -00180830: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context flag │ │ │ │ -001808a0: 7320 6172 653a 3c2f 703e 0a3c 756c 3e0a s are:

    ..

    See the │ │ │ │ -00181010: 206f 7065 7261 7469 6e67 2073 7973 7465 operating syste │ │ │ │ -00181020: 6d20 6d61 6e75 616c 2070 6167 6573 206f m manual pages o │ │ │ │ -00181030: 6620 3c63 6f64 653e 7365 6e64 3c2f 636f f send and re │ │ │ │ -00181050: 6376 3c2f 636f 6465 3e20 666f 7220 3c63 cv for soap │ │ │ │ -00181120: 3a3a 736f 636b 6574 5f66 6c61 6773 3c2f ::socket_flags values │ │ │ │ -00181140: 2061 6e64 2073 6565 2074 6865 206f 7065 and see the ope │ │ │ │ -00181150: 7261 7469 6e67 2073 7973 7465 6d20 6d61 rating system ma │ │ │ │ -00181160: 6e75 616c 2070 6167 6573 206f 6620 3c63 nual pages of setsockopt for │ │ │ │ -00181190: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::co │ │ │ │ -00181250: 6e6e 6563 745f 666c 6167 733c 2f61 3e3c nnect_flags< │ │ │ │ -00181260: 2f63 6f64 653e 2c20 3c63 6f64 653e 3c61 /code>, soap::bind │ │ │ │ -00181330: 5f66 6c61 6773 3c2f 613e 3c2f 636f 6465 _flags, and soap::accep │ │ │ │ -00181410: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags (level │ │ │ │ -00181430: 534f 4c5f 534f 434b 4554 3c2f 636f 6465 SOL_SOCKET) values. These │ │ │ │ -00181450: 203c 636f 6465 3e53 4f5f 3c2f 636f 6465 SO_ socket option │ │ │ │ -00181470: 666c 6167 7320 2873 6565 203c 636f 6465 flags (see setsockopt manual pages) │ │ │ │ -001814a0: 2063 616e 2062 6520 6269 742d 7769 7365 can be bit-wise │ │ │ │ -001814b0: 206f 722d 6564 2074 6f20 7365 7420 6d75 or-ed to set mu │ │ │ │ -001814c0: 6c74 6970 6c65 2073 6f63 6b65 7420 6f70 ltiple socket op │ │ │ │ -001814d0: 7469 6f6e 7320 6174 206f 6e63 652e 3c2f tions at once..

    The client │ │ │ │ -001814f0: 2d73 6964 6520 666c 6167 203c 636f 6465 -side flag soap::c │ │ │ │ -001815c0: 6f6e 6e65 6374 5f66 6c61 6773 3c2f 613e onnect_flags │ │ │ │ -001815d0: 3c2f 636f 6465 3e20 3d20 3c63 6f64 653e = │ │ │ │ -001815e0: 534f 5f4c 494e 4745 523c 2f63 6f64 653e SO_LINGER │ │ │ │ -001815f0: 2069 7320 7375 7070 6f72 7465 6420 7769 is supported wi │ │ │ │ -00181600: 7468 2076 616c 7565 7320 3c63 6f64 653e th values │ │ │ │ -00181610: 6c5f 6f6e 6f66 663c 2f63 6f64 653e 203d l_onoff = │ │ │ │ -00181620: 2031 2061 6e64 203c 636f 6465 3e6c 5f6c 1 and l_l │ │ │ │ -00181630: 696e 6765 723c 2f63 6f64 653e 203d 203c inger = < │ │ │ │ -00181640: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -00181700: 703a 3a6c 696e 6765 725f 7469 6d65 3c2f p::linger_time. The < │ │ │ │ -00181720: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ -001817e0: 703a 3a6c 696e 6765 725f 7469 6d65 3c2f p::linger_time determ │ │ │ │ -00181800: 696e 6573 2074 6865 2077 6169 7420 7469 ines the wait ti │ │ │ │ -00181810: 6d65 2028 7468 6520 7469 6d65 2072 6573 me (the time res │ │ │ │ -00181820: 6f6c 7574 696f 6e20 6973 2073 7973 7465 olution is syste │ │ │ │ -00181830: 6d20 6465 7065 6e64 656e 742c 2074 686f m dependent, tho │ │ │ │ -00181840: 7567 6820 6163 636f 7264 696e 6720 746f ugh according to │ │ │ │ -00181850: 2073 6f6d 6520 6578 7065 7274 7320 6f6e some experts on │ │ │ │ -00181860: 6c79 207a 6572 6f20 616e 6420 6e6f 6e7a ly zero and nonz │ │ │ │ -00181870: 6572 6f20 7661 6c75 6573 206d 6174 7465 ero values matte │ │ │ │ -00181880: 7229 2e20 5468 6520 6c69 6e67 6572 206f r). The linger o │ │ │ │ -00181890: 7074 696f 6e20 6361 6e20 6265 2075 7365 ption can be use │ │ │ │ -001818a0: 6420 746f 206d 616e 6167 6520 7468 6520 d to manage the │ │ │ │ -001818b0: 6e75 6d62 6572 206f 6620 636f 6e6e 6563 number of connec │ │ │ │ -001818c0: 7469 6f6e 7320 7468 6174 2072 656d 6169 tions that remai │ │ │ │ -001818d0: 6e20 696e 203c 636f 6465 3e54 494d 455f n in TIME_ │ │ │ │ -001818e0: 5741 4954 3c2f 636f 6465 3e20 7374 6174 WAIT stat │ │ │ │ -001818f0: 6520 6174 2074 6865 2073 6572 7665 7220 e at the server │ │ │ │ -00181900: 7369 6465 2e3c 2f70 3e0a 3c70 3e46 6f72 side.

    .

    For │ │ │ │ -00181910: 2065 7861 6d70 6c65 2c20 746f 2064 6973 example, to dis │ │ │ │ -00181920: 6162 6c65 2053 4947 5049 5045 2073 6967 able SIGPIPE sig │ │ │ │ -00181930: 6e61 6c73 206f 6e20 556e 6978 2f4c 696e nals on Unix/Lin │ │ │ │ -00181940: 7578 2070 6c61 7466 6f72 6d73 2075 7365 ux platforms use │ │ │ │ -00181950: 3a20 3c63 6f64 653e 3c61 2063 6c61 7373 : │ │ │ │ -00181a10: 736f 6170 3a3a 736f 636b 6574 5f66 6c61 soap::socket_fla │ │ │ │ -00181a20: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = │ │ │ │ -00181a30: 3c63 6f64 653e 4d53 475f 4e4f 5349 474e MSG_NOSIGN │ │ │ │ -00181a40: 414c 3c2f 636f 6465 3e20 616e 642f 6f72 AL and/or │ │ │ │ -00181a50: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ -00181b10: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla │ │ │ │ -00181b20: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = │ │ │ │ -00181b30: 3c63 6f64 653e 534f 5f4e 4f53 4947 5049 SO_NOSIGPI │ │ │ │ -00181b40: 5045 3c2f 636f 6465 3e20 2869 2e65 2e20 PE (i.e. │ │ │ │ -00181b50: 636c 6965 6e74 2d73 6964 6520 636f 6e6e client-side conn │ │ │ │ -00181b60: 6563 7429 2064 6570 656e 6469 6e67 206f ect) depending o │ │ │ │ -00181b70: 6e20 796f 7572 2070 6c61 7466 6f72 6d2e n your platform. │ │ │ │ -00181b80: 3c2f 703e 0a3c 703e 5573 6520 3c63 6f64

    .

    Use soap:: │ │ │ │ -00181c50: 6269 6e64 5f66 6c61 6773 3c2f 613e 3c2f bind_flags = SO │ │ │ │ -00181c70: 5f52 4555 5345 4144 4452 3c2f 636f 6465 _REUSEADDR to enable serv │ │ │ │ -00181c90: 6572 2d73 6964 6520 706f 7274 2072 6575 er-side port reu │ │ │ │ -00181ca0: 7365 2061 6e64 206c 6f63 616c 2070 6f72 se and local por │ │ │ │ -00181cb0: 7420 7368 6172 696e 6720 2862 7574 2062 t sharing (but b │ │ │ │ -00181cc0: 6520 6177 6172 6520 6f66 2074 6865 2070 e aware of the p │ │ │ │ -00181cd0: 6f73 7369 626c 6520 7365 6375 7269 7479 ossible security │ │ │ │ -00181ce0: 2069 6d70 6c69 6361 7469 6f6e 7320 7375 implications su │ │ │ │ -00181cf0: 6368 2061 7320 706f 7274 2068 696a 6163 ch as port hijac │ │ │ │ -00181d00: 6b69 6e67 292e 3c2f 703e 0a3c 703e 4e6f king).

    .

    No │ │ │ │ -00181d10: 7465 2074 6861 7420 796f 7520 6861 7665 te that you have │ │ │ │ -00181d20: 2061 6363 6573 7320 746f 2074 6865 203c access to the < │ │ │ │ -00181d30: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap->ma │ │ │ │ -00181d90: 7374 6572 3c2f 636f 6465 3e20 736f 636b ster sock │ │ │ │ -00181da0: 6574 2076 616c 7565 2072 6574 7572 6e65 et value returne │ │ │ │ -00181db0: 6420 6279 203c 636f 6465 3e3c 6120 636c d by soap │ │ │ │ -00181e30: 5f62 696e 643c 2f61 3e3c 2f63 6f64 653e _bind │ │ │ │ -00181e40: 2073 6f20 796f 7520 6361 6e20 7365 7420 so you can set │ │ │ │ -00181e50: 6d75 6c74 6970 6c65 2073 6f63 6b65 7420 multiple socket │ │ │ │ -00181e60: 6f70 7469 6f6e 7320 6279 2063 616c 6c69 options by calli │ │ │ │ -00181e70: 6e67 203c 636f 6465 3e73 6574 736f 636b ng setsock │ │ │ │ -00181e80: 6f70 743c 2f63 6f64 653e 2061 7320 666f opt as fo │ │ │ │ -00181e90: 6c6c 6f77 733a 3c2f 703e 0a3c 6469 7620 llows:

    .
    int │ │ │ │ -00181ee0: 3c2f 7370 616e 3e20 736f 636b 203d 203c sock = < │ │ │ │ -00181ef0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00181f00: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00181f10: 705f 5f69 6f2e 6874 6d6c 2367 6130 6139 p__io.html#ga0a9 │ │ │ │ -00181f20: 3732 3561 3365 6462 6332 3762 3937 3435 725a3edbc27b9745 │ │ │ │ -00181f30: 3631 3930 6665 6534 3763 6331 3822 3e73 6190fee47cc18">s │ │ │ │ -00181f40: 6f61 705f 6269 6e64 3c2f 613e 283c 6120 oap_bind(soap, host, │ │ │ │ -00181fd0: 203c 6120 636c 6173 733d 2263 6f64 6522 port, backlog); .struc │ │ │ │ +0017fca0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ +0017fcd0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new(); │ │ │ │ +0017fd70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap->accept_ti │ │ │ │ +0017fe10: 6d65 6f75 743c 2f61 3e20 3d20 3130 2075 meout = 10 u │ │ │ │ +0017fe20: 5365 633b 203c 2f64 6976 3e0a 3c64 6976 Sec;
    .
    soap-&g │ │ │ │ +0017fe70: 743b 3c61 2063 6c61 7373 3d22 636f 6465 t;send_ │ │ │ │ +0017fec0: 7469 6d65 6f75 743c 2f61 3e20 3d20 3230 timeout = 20 │ │ │ │ +0017fed0: 206d 5365 633b 203c 2f64 6976 3e0a 3c64 mSec;
    . │ │ │ │ +0017fef0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +0017ff20: 2667 743b 3c61 2063 6c61 7373 3d22 636f >rec │ │ │ │ +0017ff70: 765f 7469 6d65 6f75 743c 2f61 3e20 3d20 v_timeout = │ │ │ │ +0017ff80: 3230 206d 5365 633b 203c 2f64 6976 3e0a 20 mSec;
    . │ │ │ │ +0017ff90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->r │ │ │ │ +00180020: 6563 765f 7469 6d65 6f75 743c 2f61 3e20 ecv_timeout │ │ │ │ +00180030: 3d20 3130 3b3c 2f64 6976 3e0a 3c2f 6469 = 10;
    .
    < │ │ │ │ +00180070: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning< │ │ │ │ +00180080: 6464 3e4d 616e 7920 4c69 6e75 7820 7665 dd>Many Linux ve │ │ │ │ +00180090: 7273 696f 6e73 2064 6f20 6e6f 7420 7375 rsions do not su │ │ │ │ +001800a0: 7070 6f72 7420 6e6f 6e2d 626c 6f63 6b69 pport non-blocki │ │ │ │ +001800b0: 6e67 203c 636f 6465 3e63 6f6e 6e65 6374 ng connect │ │ │ │ +001800c0: 2829 3c2f 636f 6465 3e2e 2054 6865 7265 (). There │ │ │ │ +001800d0: 666f 7265 2c20 7365 7474 696e 6720 3c63 fore, setting soap │ │ │ │ +001801a0: 3a3a 636f 6e6e 6563 745f 7469 6d65 6f75 ::connect_timeou │ │ │ │ +001801b0: 743c 2f61 3e3c 2f63 6f64 653e 2066 6f72 t for │ │ │ │ +001801c0: 206e 6f6e 2d62 6c6f 636b 696e 6720 3c63 non-blocking soap_call_ns │ │ │ │ +001801e0: 5f5f 7765 626d 6574 686f 643c 2f63 6f64 __webmethod calls may not │ │ │ │ +00180200: 2077 6f72 6b20 756e 6465 7220 4c69 6e75 work under Linu │ │ │ │ +00180210: 782e 3c2f 6464 3e0a 3c64 643e 0a49 6e74 x..
    .Int │ │ │ │ +00180220: 6572 7275 7074 7320 2845 494e 5452 2920 errupts (EINTR) │ │ │ │ +00180230: 6361 6e20 6166 6665 6374 2074 6865 2062 can affect the b │ │ │ │ +00180240: 6c6f 636b 696e 6720 7469 6d65 2069 6e20 locking time in │ │ │ │ +00180250: 492f 4f20 6f70 6572 6174 696f 6e73 2e20 I/O operations. │ │ │ │ +00180260: 5468 6520 6d61 7869 6d75 6d20 6e75 6d62 The maximum numb │ │ │ │ +00180270: 6572 206f 6620 4549 4e54 5220 7468 6174 er of EINTR that │ │ │ │ +00180280: 2077 696c 6c20 6e6f 7420 7472 6967 6765 will not trigge │ │ │ │ +00180290: 7220 616e 2065 7272 6f72 2069 7320 7365 r an error is se │ │ │ │ +001802a0: 7420 6279 203c 636f 6465 3e23 534f 4150 t by #SOAP │ │ │ │ +001802b0: 5f4d 4158 4549 4e54 523c 2f63 6f64 653e _MAXEINTR │ │ │ │ +001802c0: 2069 6e20 3c65 6d3e 3c63 6f64 653e 6773 in gs │ │ │ │ +001802d0: 6f61 702f 7374 6473 6f61 7032 2e68 3c2f oap/stdsoap2.h, whic │ │ │ │ +001802f0: 6820 6973 2031 3020 6279 2064 6566 6175 h is 10 by defau │ │ │ │ +00180300: 6c74 2e20 4561 6368 2045 494e 5452 206d lt. Each EINTR m │ │ │ │ +00180310: 6179 2069 6e63 7265 6173 6520 7468 6520 ay increase the │ │ │ │ +00180320: 626c 6f63 6b69 6e67 2074 696d 6520 6279 blocking time by │ │ │ │ +00180330: 2075 7020 746f 206f 6e65 2073 6563 6f6e up to one secon │ │ │ │ +00180340: 642c 2075 7020 746f 203c 636f 6465 3e23 d, up to # │ │ │ │ +00180350: 534f 4150 5f4d 4158 4549 4e54 523c 2f63 SOAP_MAXEINTR seconds tot │ │ │ │ +00180370: 616c 2e3c 2f64 643e 3c2f 646c 3e0a 3c70 al.
    .

    .... Back to table │ │ │ │ +001803a0: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents< │ │ │ │ +001803b0: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .C │ │ │ │ +001803e0: 6c6f 7369 6e67 2063 6f6e 6e65 6374 696f losing connectio │ │ │ │ +001803f0: 6e73 2062 7920 666f 7263 653c 2f68 323e ns by force

    │ │ │ │ +00180400: 0a3c 703e 546f 2063 6c6f 7365 2061 2073 .

    To close a s │ │ │ │ +00180410: 6f63 6b65 7420 636f 6e6e 6563 7469 6f6e ocket connection │ │ │ │ +00180420: 2062 7920 666f 7263 652c 2079 6f75 2063 by force, you c │ │ │ │ +00180430: 616e 2075 7365 203c 636f 6465 3e73 6f61 an use soa │ │ │ │ +00180440: 705f 666f 7263 655f 636c 6f73 6573 6f63 p_force_closesoc │ │ │ │ +00180450: 6b28 736f 6170 293c 2f63 6f64 653e 2c20 k(soap), │ │ │ │ +00180460: 7768 6963 6820 636c 6f73 6573 2074 6865 which closes the │ │ │ │ +00180470: 2063 6f6e 6e65 6374 696f 6e20 7265 6761 connection rega │ │ │ │ +00180480: 7264 6c65 7373 2069 6620 6b65 6570 2d61 rdless if keep-a │ │ │ │ +00180490: 6c69 7665 2069 7320 6163 7469 7665 2e20 live is active. │ │ │ │ +001804a0: 4279 2063 6f6e 7472 6173 742c 203c 636f By contrast, soap_closesoc │ │ │ │ +001804c0: 6b28 736f 6170 293c 2f63 6f64 653e 206f k(soap) o │ │ │ │ +001804d0: 6e6c 7920 636c 6f73 6573 2074 6865 2063 nly closes the c │ │ │ │ +001804e0: 6f6e 6e65 6374 696f 6e20 7768 656e 206b onnection when k │ │ │ │ +001804f0: 6565 702d 616c 6976 6520 6973 206e 6f74 eep-alive is not │ │ │ │ +00180500: 2061 6374 6976 652e 3c2f 703e 0a3c 703e active.

    .

    │ │ │ │ +00180510: 546f 2066 6f72 6365 2d63 6c6f 7365 2061 To force-close a │ │ │ │ +00180520: 2063 6f6e 6e65 6374 696f 6e20 6672 6f6d connection from │ │ │ │ +00180530: 2061 6e6f 7468 6572 2074 6872 6561 642c another thread, │ │ │ │ +00180540: 2063 6f6d 7069 6c65 2073 7464 736f 6170 compile stdsoap │ │ │ │ +00180550: 322e 6320 6f72 2073 7464 736f 6170 322e 2.c or stdsoap2. │ │ │ │ +00180560: 6370 7020 616e 6420 796f 7572 2070 726f cpp and your pro │ │ │ │ +00180570: 6a65 6374 2073 6f75 7263 6520 636f 6465 ject source code │ │ │ │ +00180580: 2077 6974 6820 3c63 6f64 653e 2357 4954 with #WIT │ │ │ │ +00180590: 485f 5345 4c46 5f50 4950 453c 2f63 6f64 H_SELF_PIPE to enable thi │ │ │ │ +001805b0: 7320 6665 6174 7572 652e 2055 7365 203c s feature. Use < │ │ │ │ +001805c0: 636f 6465 3e73 6f61 705f 636c 6f73 655f code>soap_close_ │ │ │ │ +001805d0: 636f 6e6e 6563 7469 6f6e 2873 6f61 7029 connection(soap) │ │ │ │ +001805e0: 3c2f 636f 6465 3e20 6f6e 2074 6865 203c on the < │ │ │ │ +001805f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap │ │ │ │ +00180650: 2063 6f6e 7465 7874 2074 6861 7420 6d75 context that mu │ │ │ │ +00180660: 7374 2063 6c6f 7365 2e20 596f 7520 6361 st close. You ca │ │ │ │ +00180670: 6e20 6d61 6b65 2074 6869 7320 6361 6c6c n make this call │ │ │ │ +00180680: 2066 726f 6d20 616e 6f74 6865 7220 7468 from another th │ │ │ │ +00180690: 7265 6164 2061 6e64 2070 6173 7320 7468 read and pass th │ │ │ │ +001806a0: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e soap context to t │ │ │ │ +00180710: 6869 7320 6675 6e63 7469 6f6e 206f 6620 his function of │ │ │ │ +00180720: 7468 6520 7468 7265 6164 2074 6861 7420 the thread that │ │ │ │ +00180730: 6d75 7374 2063 6c6f 7365 2063 6f6e 6e65 must close conne │ │ │ │ +00180740: 6374 696f 6e73 2e3c 2f70 3e0a 3c70 3ef0 ctions.

    .

    . │ │ │ │ +00180750: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ +00180760: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ +00180770: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .Sock │ │ │ │ +001807b0: 6574 206f 7074 696f 6e73 2061 6e64 2066 et options and f │ │ │ │ +001807c0: 6c61 6773 3c2f 6832 3e0a 3c70 3e53 6f63 lags

    .

    Soc │ │ │ │ +001807d0: 6b65 7420 636f 6d6d 756e 6963 6174 696f ket communicatio │ │ │ │ +001807e0: 6e73 2063 616e 2062 6520 636f 6e74 726f ns can be contro │ │ │ │ +001807f0: 6c6c 6564 2077 6974 6820 736f 636b 6574 lled with socket │ │ │ │ +00180800: 206f 7074 696f 6e73 2061 6e64 2066 6c61 options and fla │ │ │ │ +00180810: 6773 2e20 5468 6520 3c63 6f64 653e 3c61 gs. The soap contex │ │ │ │ +00180880: 7420 666c 6167 7320 6172 653a 3c2f 703e t flags are:

    │ │ │ │ +00180890: 0a3c 756c 3e0a 3c6c 693e 3c63 6f64 653e ..

    S │ │ │ │ +00180ff0: 6565 2074 6865 206f 7065 7261 7469 6e67 ee the operating │ │ │ │ +00181000: 2073 7973 7465 6d20 6d61 6e75 616c 2070 system manual p │ │ │ │ +00181010: 6167 6573 206f 6620 3c63 6f64 653e 7365 ages of se │ │ │ │ +00181020: 6e64 3c2f 636f 6465 3e20 616e 6420 3c63 nd and recv │ │ │ │ +00181040: 666f 7220 3c63 6f64 653e 3c61 2063 6c61 for soap::socket_f │ │ │ │ +00181110: 6c61 6773 3c2f 613e 3c2f 636f 6465 3e20 lags │ │ │ │ +00181120: 7661 6c75 6573 2061 6e64 2073 6565 2074 values and see t │ │ │ │ +00181130: 6865 206f 7065 7261 7469 6e67 2073 7973 he operating sys │ │ │ │ +00181140: 7465 6d20 6d61 6e75 616c 2070 6167 6573 tem manual pages │ │ │ │ +00181150: 206f 6620 3c63 6f64 653e 7365 7473 6f63 of setsoc │ │ │ │ +00181160: 6b6f 7074 3c2f 636f 6465 3e20 666f 7220 kopt for │ │ │ │ +00181170: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 so │ │ │ │ +00181230: 6170 3a3a 636f 6e6e 6563 745f 666c 6167 ap::connect_flag │ │ │ │ +00181240: 733c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 s, soap │ │ │ │ +00181310: 3a3a 6269 6e64 5f66 6c61 6773 3c2f 613e ::bind_flags │ │ │ │ +00181320: 3c2f 636f 6465 3e2c 2061 6e64 203c 636f , and soap: │ │ │ │ +001813f0: 3a61 6363 6570 745f 666c 6167 733c 2f61 :accept_flags (level │ │ │ │ +00181410: 3c63 6f64 653e 534f 4c5f 534f 434b 4554 SOL_SOCKET │ │ │ │ +00181420: 3c2f 636f 6465 3e29 2076 616c 7565 732e ) values. │ │ │ │ +00181430: 2054 6865 7365 203c 636f 6465 3e53 4f5f These SO_ │ │ │ │ +00181440: 3c2f 636f 6465 3e20 736f 636b 6574 206f socket o │ │ │ │ +00181450: 7074 696f 6e20 666c 6167 7320 2873 6565 ption flags (see │ │ │ │ +00181460: 203c 636f 6465 3e73 6574 736f 636b 6f70 setsockop │ │ │ │ +00181470: 743c 2f63 6f64 653e 206d 616e 7561 6c20 t manual │ │ │ │ +00181480: 7061 6765 7329 2063 616e 2062 6520 6269 pages) can be bi │ │ │ │ +00181490: 742d 7769 7365 206f 722d 6564 2074 6f20 t-wise or-ed to │ │ │ │ +001814a0: 7365 7420 6d75 6c74 6970 6c65 2073 6f63 set multiple soc │ │ │ │ +001814b0: 6b65 7420 6f70 7469 6f6e 7320 6174 206f ket options at o │ │ │ │ +001814c0: 6e63 652e 3c2f 703e 0a3c 703e 5468 6520 nce.

    .

    The │ │ │ │ +001814d0: 636c 6965 6e74 2d73 6964 6520 666c 6167 client-side flag │ │ │ │ +001814e0: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +001815a0: 6f61 703a 3a63 6f6e 6e65 6374 5f66 6c61 oap::connect_fla │ │ │ │ +001815b0: 6773 3c2f 613e 3c2f 636f 6465 3e20 3d20 gs = │ │ │ │ +001815c0: 3c63 6f64 653e 534f 5f4c 494e 4745 523c SO_LINGER< │ │ │ │ +001815d0: 2f63 6f64 653e 2069 7320 7375 7070 6f72 /code> is suppor │ │ │ │ +001815e0: 7465 6420 7769 7468 2076 616c 7565 7320 ted with values │ │ │ │ +001815f0: 3c63 6f64 653e 6c5f 6f6e 6f66 663c 2f63 l_onoff = 1 and l_linger = soap::linger_ │ │ │ │ +001816f0: 7469 6d65 3c2f 613e 3c2f 636f 6465 3e2e time. │ │ │ │ +00181700: 2054 6865 203c 636f 6465 3e3c 6120 636c The soap::linger_ │ │ │ │ +001817d0: 7469 6d65 3c2f 613e 3c2f 636f 6465 3e20 time │ │ │ │ +001817e0: 6465 7465 726d 696e 6573 2074 6865 2077 determines the w │ │ │ │ +001817f0: 6169 7420 7469 6d65 2028 7468 6520 7469 ait time (the ti │ │ │ │ +00181800: 6d65 2072 6573 6f6c 7574 696f 6e20 6973 me resolution is │ │ │ │ +00181810: 2073 7973 7465 6d20 6465 7065 6e64 656e system dependen │ │ │ │ +00181820: 742c 2074 686f 7567 6820 6163 636f 7264 t, though accord │ │ │ │ +00181830: 696e 6720 746f 2073 6f6d 6520 6578 7065 ing to some expe │ │ │ │ +00181840: 7274 7320 6f6e 6c79 207a 6572 6f20 616e rts only zero an │ │ │ │ +00181850: 6420 6e6f 6e7a 6572 6f20 7661 6c75 6573 d nonzero values │ │ │ │ +00181860: 206d 6174 7465 7229 2e20 5468 6520 6c69 matter). The li │ │ │ │ +00181870: 6e67 6572 206f 7074 696f 6e20 6361 6e20 nger option can │ │ │ │ +00181880: 6265 2075 7365 6420 746f 206d 616e 6167 be used to manag │ │ │ │ +00181890: 6520 7468 6520 6e75 6d62 6572 206f 6620 e the number of │ │ │ │ +001818a0: 636f 6e6e 6563 7469 6f6e 7320 7468 6174 connections that │ │ │ │ +001818b0: 2072 656d 6169 6e20 696e 203c 636f 6465 remain in TIME_WAIT state at the s │ │ │ │ +001818e0: 6572 7665 7220 7369 6465 2e3c 2f70 3e0a erver side.

    . │ │ │ │ +001818f0: 3c70 3e46 6f72 2065 7861 6d70 6c65 2c20

    For example, │ │ │ │ +00181900: 746f 2064 6973 6162 6c65 2053 4947 5049 to disable SIGPI │ │ │ │ +00181910: 5045 2073 6967 6e61 6c73 206f 6e20 556e PE signals on Un │ │ │ │ +00181920: 6978 2f4c 696e 7578 2070 6c61 7466 6f72 ix/Linux platfor │ │ │ │ +00181930: 6d73 2075 7365 3a20 3c63 6f64 653e 3c61 ms use: soap::sock │ │ │ │ +00181a00: 6574 5f66 6c61 6773 3c2f 613e 3c2f 636f et_flags = MSG_ │ │ │ │ +00181a20: 4e4f 5349 474e 414c 3c2f 636f 6465 3e20 NOSIGNAL │ │ │ │ +00181a30: 616e 642f 6f72 203c 636f 6465 3e3c 6120 and/or soap::conne │ │ │ │ +00181b00: 6374 5f66 6c61 6773 3c2f 613e 3c2f 636f ct_flags = SO_N │ │ │ │ +00181b20: 4f53 4947 5049 5045 3c2f 636f 6465 3e20 OSIGPIPE │ │ │ │ +00181b30: 2869 2e65 2e20 636c 6965 6e74 2d73 6964 (i.e. client-sid │ │ │ │ +00181b40: 6520 636f 6e6e 6563 7429 2064 6570 656e e connect) depen │ │ │ │ +00181b50: 6469 6e67 206f 6e20 796f 7572 2070 6c61 ding on your pla │ │ │ │ +00181b60: 7466 6f72 6d2e 3c2f 703e 0a3c 703e 5573 tform.

    .

    Us │ │ │ │ +00181b70: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e │ │ │ │ +00181c30: 736f 6170 3a3a 6269 6e64 5f66 6c61 6773 soap::bind_flags │ │ │ │ +00181c40: 3c2f 613e 3c2f 636f 6465 3e20 3d20 3c63 = SO_REUSEADDR │ │ │ │ +00181c60: 3c2f 636f 6465 3e20 746f 2065 6e61 626c to enabl │ │ │ │ +00181c70: 6520 7365 7276 6572 2d73 6964 6520 706f e server-side po │ │ │ │ +00181c80: 7274 2072 6575 7365 2061 6e64 206c 6f63 rt reuse and loc │ │ │ │ +00181c90: 616c 2070 6f72 7420 7368 6172 696e 6720 al port sharing │ │ │ │ +00181ca0: 2862 7574 2062 6520 6177 6172 6520 6f66 (but be aware of │ │ │ │ +00181cb0: 2074 6865 2070 6f73 7369 626c 6520 7365 the possible se │ │ │ │ +00181cc0: 6375 7269 7479 2069 6d70 6c69 6361 7469 curity implicati │ │ │ │ +00181cd0: 6f6e 7320 7375 6368 2061 7320 706f 7274 ons such as port │ │ │ │ +00181ce0: 2068 696a 6163 6b69 6e67 292e 3c2f 703e hijacking).

    │ │ │ │ +00181cf0: 0a3c 703e 4e6f 7465 2074 6861 7420 796f .

    Note that yo │ │ │ │ +00181d00: 7520 6861 7665 2061 6363 6573 7320 746f u have access to │ │ │ │ +00181d10: 2074 6865 203c 636f 6465 3e3c 6120 636c the soap- │ │ │ │ +00181d70: 2667 743b 6d61 7374 6572 3c2f 636f 6465 >master socket value r │ │ │ │ +00181d90: 6574 7572 6e65 6420 6279 203c 636f 6465 eturned by soap_bind< │ │ │ │ +00181e20: 2f63 6f64 653e 2073 6f20 796f 7520 6361 /code> so you ca │ │ │ │ +00181e30: 6e20 7365 7420 6d75 6c74 6970 6c65 2073 n set multiple s │ │ │ │ +00181e40: 6f63 6b65 7420 6f70 7469 6f6e 7320 6279 ocket options by │ │ │ │ +00181e50: 2063 616c 6c69 6e67 203c 636f 6465 3e73 calling s │ │ │ │ +00181e60: 6574 736f 636b 6f70 743c 2f63 6f64 653e etsockopt │ │ │ │ +00181e70: 2061 7320 666f 6c6c 6f77 733a 3c2f 703e as follows:

    │ │ │ │ +00181e80: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    int so │ │ │ │ +00181ed0: 636b 203d 203c 6120 636c 6173 733d 2263 ck = soap_bind(soap, hos │ │ │ │ +00181fb0: 743c 2f61 3e2c 203c 6120 636c 6173 733d t, │ │ │ │ +00182000: 706f 7274 3c2f 613e 2c20 6261 636b 6c6f port, backlo │ │ │ │ +00182010: 6729 3b20 3c2f 6469 763e 0a3c 6469 7620 g);
    .
    if │ │ │ │ +00182050: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s │ │ │ │ +001820b0: 6f63 6b65 743c 2f61 3e28 736f 636b 2929 ocket(sock)) │ │ │ │ +001820c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    {
    .
    {
    .
    │ │ │ │ -00182110: 7365 7473 6f63 6b6f 7074 2873 6f63 6b2c setsockopt(sock, │ │ │ │ -00182120: 202e 2e2e 2c20 2e2e 2e2c 202e 2e2e 2c20 ..., ..., ..., │ │ │ │ -00182130: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c64 6976 ...);
    .
    │ │ │ │ -00182150: 7365 7473 6f63 6b6f 7074 2873 6f63 6b2c setsockopt(sock, │ │ │ │ -00182160: 202e 2e2e 2c20 2e2e 2e2c 202e 2e2e 2c20 ..., ..., ..., │ │ │ │ -00182170: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c2f 6469 ...);
    .

    .... Back to t │ │ │ │ -001821b0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -001821c0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Overrid │ │ │ │ -00182200: 696e 6720 7468 6520 686f 7374 2061 6e64 ing the host and │ │ │ │ -00182210: 2070 6f72 7420 746f 2063 6f6e 6e65 6374 port to connect │ │ │ │ -00182220: 3c2f 6832 3e0a 3c70 3e54 6f20 6f76 6572

    .

    To over │ │ │ │ -00182230: 7269 6465 2074 6865 2068 6f73 7420 616e ride the host an │ │ │ │ -00182240: 6420 706f 7274 206f 6620 7468 6520 636c d port of the cl │ │ │ │ -00182250: 6965 6e74 2063 6f6e 6e65 6374 696e 6720 ient connecting │ │ │ │ -00182260: 746f 2061 2073 6572 7665 722c 2073 6574 to a server, set │ │ │ │ -00182270: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ -00182330: 6f61 703a 3a6f 7665 7272 6964 655f 686f oap::override_ho │ │ │ │ -00182340: 7374 3c2f 613e 3c2f 636f 6465 3e20 616e st an │ │ │ │ -00182350: 6420 3c63 6f64 653e 3c61 2063 6c61 7373 d │ │ │ │ -00182410: 736f 6170 3a3a 6f76 6572 7269 6465 5f70 soap::override_p │ │ │ │ -00182420: 6f72 743c 2f61 3e3c 2f63 6f64 653e 3a3c ort:< │ │ │ │ -00182430: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    soap-> │ │ │ │ -00182490: 3c61 2063 6c61 7373 3d22 636f 6465 2220 overrid │ │ │ │ -001824e0: 655f 686f 7374 3c2f 613e 203d 203c 7370 e_host = "e │ │ │ │ -00182510: 7861 6d70 6c65 2e63 6f6d 2671 756f 743b xample.com" │ │ │ │ -00182520: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; / │ │ │ │ -00182540: 2f20 686f 7374 206e 616d 6520 6f72 2049 / host name or I │ │ │ │ -00182550: 5020 6164 6472 6573 7320 3c2f 7370 616e P address
    .
    soap->override_ │ │ │ │ -00182600: 706f 7274 3c2f 613e 203d 2038 303b 2020 port = 80; │ │ │ │ -00182610: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ -00182630: 2f2f 2070 6f72 7420 6e75 6d62 6572 2074 // port number t │ │ │ │ -00182640: 6f20 7573 6520 7768 656e 206f 7665 7272 o use when overr │ │ │ │ -00182650: 6964 696e 6720 7468 6520 6164 6472 6573 iding the addres │ │ │ │ -00182660: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ -00182670: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -00182680: 6964 3d22 6173 7472 7563 7473 6f61 705f id="astructsoap_ │ │ │ │ -00182690: 6874 6d6c 5f61 3136 3634 3035 3336 3961 html_a166405369a │ │ │ │ -001826a0: 6431 3062 6332 3062 3930 6662 3932 3835 d10bc20b90fb9285 │ │ │ │ -001826b0: 3432 3063 6165 223e 3c64 6976 2063 6c61 420cae">
    soap::ov │ │ │ │ -00182710: 6572 7269 6465 5f68 6f73 743c 2f61 3e3c erride_host< │ │ │ │ -00182720: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c │ │ │ │ -00182740: 6861 7220 2a20 6f76 6572 7269 6465 5f68 har * override_h │ │ │ │ -00182750: 6f73 743c 2f64 6976 3e3c 6469 7620 636c ost
    User │ │ │ │ -00182770: 2d64 6566 696e 6162 6c65 2073 7472 696e -definable strin │ │ │ │ -00182780: 6720 746f 206f 7665 7272 6964 6520 7468 g to override th │ │ │ │ -00182790: 6520 686f 7374 206e 616d 6520 6f72 2049 e host name or I │ │ │ │ -001827a0: 5020 6164 6472 6573 7320 696e 2074 6865 P address in the │ │ │ │ -001827b0: 2048 5454 5020 6865 6164 6572 2077 6865 HTTP header whe │ │ │ │ -001827c0: 6e20 636f 6e6e 6563 7469 6e67 2061 7420 n connecting at │ │ │ │ -001827d0: 742e 2e2e 3c2f 6469 763e 3c64 6976 2063 t...
    │ │ │ │ -001827f0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00182800: 7374 6473 6f61 7032 2e68 3a34 3035 343c stdsoap2.h:4054< │ │ │ │ -00182810: 2f64 6976 3e3c 2f64 6976 3e0a 3c64 6976 /div>
    .
    soap::overr │ │ │ │ -001828c0: 6964 655f 706f 7274 3c2f 613e 3c2f 6469 ide_port
    int overri │ │ │ │ -001828f0: 6465 5f70 6f72 743c 2f64 6976 3e3c 6469 de_port
    │ │ │ │ -00182910: 5573 6572 2d64 6566 696e 6162 6c65 2070 User-definable p │ │ │ │ -00182920: 6f72 7420 6e75 6d62 6572 2074 6f20 6f76 ort number to ov │ │ │ │ -00182930: 6572 7269 6465 2074 6865 2070 6f72 7420 erride the port │ │ │ │ -00182940: 6164 6472 6573 7320 696e 2074 6865 2048 address in the H │ │ │ │ -00182950: 5454 5020 6865 6164 6572 2077 6865 6e20 TTP header when │ │ │ │ -00182960: 636f 6e6e 6563 7469 6e67 2061 7420 7468 connecting at th │ │ │ │ -00182970: 6520 636c 692e 2e2e 3c2f 6469 763e 3c64 e cli...
    Definition:< │ │ │ │ -001829a0: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4 │ │ │ │ -001829b0: 3035 393c 2f64 6976 3e3c 2f64 6976 3e0a 059
    . │ │ │ │ -001829c0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    .... < │ │ │ │ -001829e0: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -001829f0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -00182a00: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .Secur │ │ │ │ -00182a40: 6520 5765 6220 7365 7276 6963 6573 2077 e Web services w │ │ │ │ -00182a50: 6974 6820 4854 5450 533c 2f68 323e 0a3c ith HTTPS

    .< │ │ │ │ -00182a60: 703e 546f 2065 6e61 626c 6520 5353 4c20 p>To enable SSL │ │ │ │ -00182a70: 666f 7220 7374 616e 642d 616c 6f6e 6520 for stand-alone │ │ │ │ -00182a80: 6753 4f41 5020 5765 6220 7365 7276 6572 gSOAP Web server │ │ │ │ -00182a90: 732c 2066 6972 7374 2069 6e73 7461 6c6c s, first install │ │ │ │ -00182aa0: 204f 7065 6e53 534c 2061 6e64 2075 7365 OpenSSL and use │ │ │ │ -00182ab0: 206f 7074 696f 6e20 7468 6520 636f 6d70 option the comp │ │ │ │ -00182ac0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_OPENSS │ │ │ │ -00182ae0: 4c3c 2f63 6f64 653e 2074 6f20 636f 6d70 L
    to comp │ │ │ │ -00182af0: 696c 6520 7468 6520 736f 7572 6365 7320 ile the sources │ │ │ │ -00182b00: 7769 7468 2079 6f75 7220 4320 6f72 2043 with your C or C │ │ │ │ -00182b10: 2b2b 2063 6f6d 7069 6c65 7220 286f 7220 ++ compiler (or │ │ │ │ -00182b20: 7573 6520 7468 6520 636f 6d70 696c 652d use the compile- │ │ │ │ -00182b30: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag │ │ │ │ -00182b40: 2357 4954 485f 474e 5554 4c53 3c2f 636f #WITH_GNUTLS if you prefe │ │ │ │ -00182b60: 7220 474e 5554 4c53 292c 2066 6f72 2065 r GNUTLS), for e │ │ │ │ -00182b70: 7861 6d70 6c65 3a20 3c2f 703e 3c70 7265 xample:

     c++ -DWITH_OP
    │ │ │ │ -00182ba0: 454e 5353 4c20 2d6f 206d 7970 726f 6720  ENSSL -o myprog 
    │ │ │ │ -00182bb0: 6d79 7072 6f67 2e63 7070 2073 7464 736f  myprog.cpp stdso
    │ │ │ │ -00182bc0: 6170 322e 6370 7020 736f 6170 432e 6370  ap2.cpp soapC.cp
    │ │ │ │ -00182bd0: 7020 736f 6170 5365 7276 6572 2e63 7070  p soapServer.cpp
    │ │ │ │ -00182be0: 202d 6c73 736c 202d 6c63 7279 7074 6f0a   -lssl -lcrypto.
    │ │ │ │ -00182bf0: 3c2f 7072 653e 3c70 3e20 5769 7468 2047  

    With G │ │ │ │ -00182c00: 4e55 544c 533a 203c 2f70 3e3c 7072 6520 NUTLS:

     c++ -DWITH_GNU
    │ │ │ │ -00182c30: 544c 5320 2d6f 206d 7970 726f 6720 6d79  TLS -o myprog my
    │ │ │ │ -00182c40: 7072 6f67 2e63 7070 2073 7464 736f 6170  prog.cpp stdsoap
    │ │ │ │ -00182c50: 322e 6370 7020 736f 6170 432e 6370 7020  2.cpp soapC.cpp 
    │ │ │ │ -00182c60: 736f 6170 5365 7276 6572 2e63 7070 202d  soapServer.cpp -
    │ │ │ │ -00182c70: 6c67 6e75 746c 7320 2d6c 6763 7279 7074  lgnutls -lgcrypt
    │ │ │ │ -00182c80: 202d 6c67 7067 2d65 7272 6f72 0a3c 2f70   -lgpg-error.

    SSL suppo │ │ │ │ -00182ca0: 7274 2066 6f72 2073 7461 6e64 2d61 6c6f rt for stand-alo │ │ │ │ -00182cb0: 6e65 2067 534f 4150 2057 6562 2073 6572 ne gSOAP Web ser │ │ │ │ -00182cc0: 7669 6365 7320 6973 2065 6e61 626c 6564 vices is enabled │ │ │ │ -00182cd0: 2062 7920 6361 6c6c 696e 6720 3c63 6f64 by calling soap_ssl_acc │ │ │ │ -00182d60: 6570 743c 2f61 3e3c 2f63 6f64 653e 2074 ept t │ │ │ │ -00182d70: 6f20 7065 7266 6f72 6d20 7468 6520 5353 o perform the SS │ │ │ │ -00182d80: 4c2f 544c 5320 6861 6e64 7368 616b 6520 L/TLS handshake │ │ │ │ -00182d90: 6166 7465 7220 3c63 6f64 653e 3c61 2063 after soap_accept │ │ │ │ -00182e20: 3c2f 613e 3c2f 636f 6465 3e2e 2049 6e20 . In │ │ │ │ -00182e30: 6164 6469 7469 6f6e 2c20 6120 6b65 7920 addition, a key │ │ │ │ -00182e40: 6669 6c65 2c20 6120 4341 2066 696c 6520 file, a CA file │ │ │ │ -00182e50: 286f 7220 7061 7468 2074 6f20 6365 7274 (or path to cert │ │ │ │ -00182e60: 6966 6963 6174 6573 292c 2044 4820 6669 ificates), DH fi │ │ │ │ -00182e70: 6c65 2028 6966 2052 5341 2069 7320 6e6f le (if RSA is no │ │ │ │ -00182e80: 7420 7573 6564 292c 2061 6e64 2070 6173 t used), and pas │ │ │ │ -00182e90: 7377 6f72 6420 6e65 6564 2074 6f20 6265 sword need to be │ │ │ │ -00182ea0: 2073 7570 706c 6965 642e 2049 6e73 7472 supplied. Instr │ │ │ │ -00182eb0: 7563 7469 6f6e 7320 6f6e 2068 6f77 2074 uctions on how t │ │ │ │ -00182ec0: 6f20 646f 2074 6869 7320 6361 6e20 6265 o do this can be │ │ │ │ -00182ed0: 2066 6f75 6e64 2069 6e20 7468 6520 4f70 found in the Op │ │ │ │ -00182ee0: 656e 5353 4c20 646f 6375 6d65 6e74 6174 enSSL documentat │ │ │ │ -00182ef0: 696f 6e20 3c61 2068 7265 663d 2268 7474 ion http://www. │ │ │ │ -00182f20: 6f70 656e 7373 6c2e 6f72 673c 2f61 3e2e openssl.org. │ │ │ │ -00182f30: 2053 6565 2061 6c73 6f20 5365 6374 696f See also Sectio │ │ │ │ -00182f40: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n SSL certif │ │ │ │ -00182f70: 6963 6174 6573 2061 6e64 206b 6579 2066 icates and key f │ │ │ │ -00182f80: 696c 6573 3c2f 613e 202e 3c2f 703e 0a3c iles .

    .< │ │ │ │ -00182f90: 703e 4c65 7427 7320 7461 6b65 2061 206c p>Let's take a l │ │ │ │ -00182fa0: 6f6f 6b20 6174 2061 6e20 6578 616d 706c ook at an exampl │ │ │ │ -00182fb0: 6520 5353 4c20 7365 6375 7265 206d 756c e SSL secure mul │ │ │ │ -00182fc0: 7469 2d74 6872 6561 6465 6420 7374 616e ti-threaded stan │ │ │ │ -00182fd0: 642d 616c 6f6e 6520 534f 4150 2057 6562 d-alone SOAP Web │ │ │ │ -00182fe0: 2053 6572 7669 6365 3a3c 2f70 3e0a 3c64 Service:

    .
    │ │ │ │ -00183030: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main( │ │ │ │ -00183040: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    SOAP_SO │ │ │ │ -001830d0: 434b 4554 3c2f 613e 206d 2c20 733b 203c CKET m, s; < │ │ │ │ -001830e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    T │ │ │ │ -00183150: 4852 4541 445f 5459 5045 3c2f 613e 2074 HREAD_TYPE t │ │ │ │ -00183160: 6964 3b20 3c2f 6469 763e 0a3c 6469 7620 id;
    .
    < │ │ │ │ -00183180: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00183190: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soa │ │ │ │ -00183220: 703c 2f61 3e2c 202a 7473 6f61 703b 203c p, *tsoap; < │ │ │ │ -00183230: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_ │ │ │ │ -001832a0: 7373 6c5f 696e 6974 3c2f 613e 2829 3b20 ssl_init(); │ │ │ │ -001832b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* init Op │ │ │ │ -001832d0: 656e 5353 4c20 2873 6b69 7070 696e 6720 enSSL (skipping │ │ │ │ -001832e0: 7468 6973 206f 7220 6361 6c6c 696e 6720 this or calling │ │ │ │ -001832f0: 6d75 6c74 6970 6c65 2074 696d 6573 2069 multiple times i │ │ │ │ -00183300: 7320 4f4b 2c20 7369 6e63 6520 7468 6520 s OK, since the │ │ │ │ -00183310: 656e 6769 6e65 2077 696c 6c20 696e 6974 engine will init │ │ │ │ -00183320: 2053 534c 2061 7574 6f6d 6174 6963 616c SSL automatical │ │ │ │ -00183330: 6c79 2920 2a2f 3c2f 7370 616e 3e3c 2f64 ly) */.
    /* │ │ │ │ -00183370: 2073 6f61 705f 7373 6c5f 6e6f 696e 6974 soap_ssl_noinit │ │ │ │ -00183380: 2829 3b20 2a2f 3c2f 7370 616e 3e20 3c73 (); */ /* do not in │ │ │ │ -001833b0: 6974 204f 7065 6e53 534c 2028 6966 2053 it OpenSSL (if S │ │ │ │ -001833c0: 534c 2069 7320 616c 7265 6164 7920 696e SL is already in │ │ │ │ -001833d0: 6974 6961 6c69 7a65 6420 656c 7365 7768 itialized elsewh │ │ │ │ -001833e0: 6572 6520 696e 2074 6869 7320 6170 706c ere in this appl │ │ │ │ -001833f0: 6963 6174 696f 6e29 202a 2f3c 2f73 7061 ication) */
    .
    if │ │ │ │ -00183440: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (CRYPTO_thread │ │ │ │ -001834a0: 5f73 6574 7570 3c2f 613e 2829 2920 3c73 _setup()) /* OpenSSL t │ │ │ │ -001834d0: 6872 6561 6420 6d75 7465 7820 7365 7475 hread mutex setu │ │ │ │ -001834e0: 7020 2a2f 3c2f 7370 616e 3e3c 2f64 6976 p */
    .
    {
    . │ │ │ │ -00183520: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde │ │ │ │ -00183530: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, │ │ │ │ -00183550: 2671 756f 743b 4361 6e6e 6f74 2073 6574 "Cannot set │ │ │ │ -00183560: 7570 2074 6872 6561 6420 6d75 7465 785c up thread mutex\ │ │ │ │ -00183570: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 293b n"); │ │ │ │ -00183580: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ex │ │ │ │ -001835a0: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE) │ │ │ │ -001835b0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } < │ │ │ │ -001835d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap = soap_new(); │ │ │ │ -00183680: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if │ │ │ │ -001836c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_ssl_serve │ │ │ │ -00183720: 725f 636f 6e74 6578 743c 2f61 3e28 3c61 r_context(soap, < │ │ │ │ -00183760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    │ │ │ │ -00183800: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -00183820: 743b 7365 7276 6572 2e70 656d 2671 756f t;server.pem&quo │ │ │ │ -00183830: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, │ │ │ │ -00183840: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* keyfile │ │ │ │ -00183860: 3a20 7265 7175 6972 6564 2077 6865 6e20 : required when │ │ │ │ -00183870: 7365 7276 6572 206d 7573 7420 6175 7468 server must auth │ │ │ │ -00183880: 656e 7469 6361 7465 2074 6f20 636c 6965 enticate to clie │ │ │ │ -00183890: 6e74 7320 2873 6565 2053 534c 2064 6f63 nts (see SSL doc │ │ │ │ -001838a0: 7320 6f6e 2068 6f77 2074 6f20 6f62 7461 s on how to obta │ │ │ │ -001838b0: 696e 2074 6869 7320 6669 6c65 2920 2a2f in this file) */ │ │ │ │ -001838c0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -001838d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001838e0: 3e20 2020 203c 7370 616e 2063 6c61 7373 > "password& │ │ │ │ -00183910: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -00183920: 2020 2020 203c 7370 616e 2063 6c61 7373 /* pa │ │ │ │ -00183940: 7373 776f 7264 2074 6f20 7265 6164 2074 ssword to read t │ │ │ │ -00183950: 6865 206b 6579 2066 696c 6520 286e 6f74 he key file (not │ │ │ │ -00183960: 2075 7365 6420 7769 7468 2047 4e55 544c used with GNUTL │ │ │ │ -00183970: 5329 202a 2f3c 2f73 7061 6e3e 203c 2f64 S) */ .
    "cace │ │ │ │ -001839c0: 7274 2e70 656d 2671 756f 743b 3c2f 7370 rt.pem", │ │ │ │ -001839f0: 2f2a 206f 7074 696f 6e61 6c20 6361 6365 /* optional cace │ │ │ │ -00183a00: 7274 2066 696c 6520 746f 2073 746f 7265 rt file to store │ │ │ │ -00183a10: 2074 7275 7374 6564 2063 6572 7469 6669 trusted certifi │ │ │ │ -00183a20: 6361 7465 7320 2a2f 3c2f 7370 616e 3e20 cates */ │ │ │ │ -00183a30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    NUL │ │ │ │ -00183a50: 4c2c 2020 2020 2020 2020 2020 2020 2020 L, │ │ │ │ -00183a60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* optiona │ │ │ │ -00183a80: 6c20 6361 7061 7468 2074 6f20 6469 7265 l capath to dire │ │ │ │ -00183a90: 6374 6f72 7920 7769 7468 2074 7275 7374 ctory with trust │ │ │ │ -00183aa0: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates │ │ │ │ -00183ab0: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    │ │ │ │ -00183ac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "dh512.p │ │ │ │ -00183b00: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em", │ │ │ │ -00183b10: 2020 2020 2020 203c 7370 616e 2063 6c61 /* │ │ │ │ -00183b30: 4448 2066 696c 6520 6e61 6d65 206f 7220 DH file name or │ │ │ │ -00183b40: 4448 206b 6579 206c 656e 2062 6974 7320 DH key len bits │ │ │ │ -00183b50: 286d 696e 696d 756d 2069 7320 3531 322c (minimum is 512, │ │ │ │ -00183b60: 2065 2e67 2e20 2671 756f 743b 3531 3226 e.g. "512& │ │ │ │ -00183b70: 7175 6f74 3b29 2074 6f20 6765 6e65 7261 quot;) to genera │ │ │ │ -00183b80: 7465 2044 4820 7061 7261 6d2c 2069 6620 te DH param, if │ │ │ │ -00183b90: 4e55 4c4c 2075 7365 2052 5341 202a 2f3c NULL use RSA */< │ │ │ │ -00183ba0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -00183bc0: 2020 2020 4e55 4c4c 2c20 2020 2020 2020 NULL, │ │ │ │ -00183bd0: 2020 2020 2020 203c 7370 616e 2063 6c61 /* │ │ │ │ -00183bf0: 6966 2072 616e 6466 696c 6521 3d4e 554c if randfile!=NUL │ │ │ │ -00183c00: 4c3a 2075 7365 2061 2066 696c 6520 7769 L: use a file wi │ │ │ │ -00183c10: 7468 2072 616e 646f 6d20 6461 7461 2074 th random data t │ │ │ │ -00183c20: 6f20 7365 6564 2072 616e 646f 6d6e 6573 o seed randomnes │ │ │ │ -00183c30: 7320 2a2f 3c2f 7370 616e 3e20 203c 2f64 s */ .
    NULL │ │ │ │ -00183c60: 2020 2020 2020 2020 2020 2020 203c 7370 /* optional s │ │ │ │ -00183c90: 6572 7665 7220 6964 656e 7469 6669 6361 erver identifica │ │ │ │ -00183ca0: 7469 6f6e 2074 6f20 656e 6162 6c65 2053 tion to enable S │ │ │ │ -00183cb0: 534c 2073 6573 7369 6f6e 2063 6163 6869 SL session cachi │ │ │ │ -00183cc0: 6e67 2074 6f20 7370 6565 6420 7570 2054 ng to speed up T │ │ │ │ -00183cd0: 4c53 2028 6d75 7374 2062 6520 6120 756e LS (must be a un │ │ │ │ -00183ce0: 6971 7565 206e 616d 6529 202a 2f3c 2f73 ique name) */
    .
    ) │ │ │ │ -00183d10: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    so │ │ │ │ -00183da0: 6170 5f70 7269 6e74 5f66 6175 6c74 3c2f ap_print_fault(soap, stderr); .
    exit(E │ │ │ │ -00183e10: 5849 545f 4641 494c 5552 4529 3b20 3c2f XIT_FAILURE); .
    }
    .
    m = soap_b │ │ │ │ -00183eb0: 696e 643c 2f61 3e28 3c61 2063 6c61 7373 ind(s │ │ │ │ -00183ee0: 6f61 703c 2f61 3e2c 204e 554c 4c2c 2031 oap, NULL, 1 │ │ │ │ -00183ef0: 3830 3030 2c20 4241 434b 4c4f 4729 3b20 8000, BACKLOG); │ │ │ │ -00183f00: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* use por │ │ │ │ -00183f20: 7420 3138 3030 3020 2a2f 3c2f 7370 616e t 18000 */
    .
    if │ │ │ │ -00183f70: 2821 3c61 2063 6c61 7373 3d22 636f 6465 (!soap_valid_s │ │ │ │ -00183fd0: 6f63 6b65 743c 2f61 3e28 6d29 2920 3c2f ocket(m)) .
    {
    │ │ │ │ -00184000: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_p │ │ │ │ -00184070: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(< │ │ │ │ -00184080: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00184090: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001840a0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001840b0: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    . │ │ │ │ -001840c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_ │ │ │ │ -001840e0: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
    │ │ │ │ -001840f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ -00184120: 2020 6670 7269 6e74 6628 7374 6465 7272 fprintf(stderr │ │ │ │ -00184130: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -00184150: 756f 743b 536f 636b 6574 2063 6f6e 6e65 uot;Socket conne │ │ │ │ -00184160: 6374 696f 6e20 7375 6363 6573 7366 756c ction successful │ │ │ │ -00184170: 3a20 6d61 7374 6572 2073 6f63 6b65 7420 : master socket │ │ │ │ -00184180: 3d20 2564 5c6e 2671 756f 743b 3c2f 7370 = %d\n", m);
    . │ │ │ │ -001841a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    wh │ │ │ │ -001841d0: 696c 653c 2f73 7061 6e3e 2028 3129 3c2f ile (1).
    {
    │ │ │ │ -00184200: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s = soap_ │ │ │ │ -00184270: 6163 6365 7074 3c2f 613e 283c 6120 636c accept(soap); .
    fprint │ │ │ │ -001842d0: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Sock │ │ │ │ -00184300: 6574 2063 6f6e 6e65 6374 696f 6e20 7375 et connection su │ │ │ │ -00184310: 6363 6573 7366 756c 3a20 736c 6176 6520 ccessful: slave │ │ │ │ -00184320: 736f 636b 6574 203d 2025 645c 6e26 7175 socket = %d\n&qu │ │ │ │ -00184330: 6f74 3b3c 2f73 7061 6e3e 2c20 7329 3b20 ot;, s); │ │ │ │ -00184340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if │ │ │ │ -00184380: 2028 213c 6120 636c 6173 733d 2263 6f64 (!soap_valid_ │ │ │ │ -001843e0: 736f 636b 6574 3c2f 613e 2873 2929 203c socket(s)) < │ │ │ │ -001843f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    if │ │ │ │ -00184450: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -00184480: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->er │ │ │ │ -001844d0: 726e 756d 3c2f 613e 2920 3c73 7061 6e20 rnum) │ │ │ │ -001844f0: 2f2a 2061 6363 6570 7420 6661 696c 6564 /* accept failed │ │ │ │ -00184500: 2c20 7472 7920 6167 6169 6e20 6166 7465 , try again afte │ │ │ │ -00184510: 7220 3120 7365 636f 6e64 202a 2f3c 2f73 r 1 second */
    .
    │ │ │ │ -00184540: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    │ │ │ │ -00184560: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri │ │ │ │ -001845c0: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st │ │ │ │ -00184600: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
    . │ │ │ │ -00184620: 2020 2020 2020 2020 736c 6565 7028 3129 sleep(1) │ │ │ │ -00184630: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -00184650: 2020 3c73 7061 6e20 636c 6173 733d 226b cont │ │ │ │ -00184670: 696e 7565 3c2f 7370 616e 3e3b 203c 7370 inue; /* retry */
    .
    │ │ │ │ -001846c0: 2020 2020 7d3c 2f64 6976 3e0a 3c64 6976 }
    .
    │ │ │ │ -001846e0: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde │ │ │ │ -001846f0: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, │ │ │ │ -00184710: 2671 756f 743b 5365 7276 6572 2074 696d "Server tim │ │ │ │ -00184720: 6564 206f 7574 5c6e 2671 756f 743b 3c2f ed out\n");
    . │ │ │ │ -00184750: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -00184770: 6272 6561 6b3c 2f73 7061 6e3e 3b20 3c2f break; .
    } .. │ │ │ │ -00184870: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ -00184890: 2f73 7061 6e3e 2028 2174 736f 6170 2920 /span> (!tsoap) │ │ │ │ -001848a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -001848c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001848d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001848e0: 705f 5f69 6f2e 6874 6d6c 2367 6130 6361 p__io.html#ga0ca │ │ │ │ -001848f0: 3063 3634 6463 3736 6166 3836 3137 3935 0c64dc76af861795 │ │ │ │ -00184900: 3661 3632 6366 3131 3764 6239 3422 3e73 6a62cf117db94">s │ │ │ │ -00184910: 6f61 705f 666f 7263 655f 636c 6f73 6573 oap_force_closes │ │ │ │ -00184920: 6f63 6b3c 2f61 3e28 3c61 2063 6c61 7373 ock(s │ │ │ │ -00184950: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    . │ │ │ │ -00184960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -00184990: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else
    .
    while │ │ │ │ -001849e0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (THREAD_CR │ │ │ │ -00184a40: 4541 5445 3c2f 613e 2826 616d 703b 7469 EATE(&ti │ │ │ │ -00184a50: 642c 2028 3c73 7061 6e20 636c 6173 733d d, (vo │ │ │ │ -00184a70: 6964 3c2f 7370 616e 3e2a 282a 2928 3c73 id*(*)(void*))&proce │ │ │ │ -00184ab0: 7373 5f72 6571 7565 7374 2c20 283c 7370 ss_request, (void*)tsoap))
    .
    slee │ │ │ │ -00184b10: 7028 3129 3b20 3c73 7061 6e20 636c 6173 p(1); /* f │ │ │ │ -00184b30: 6169 6c65 642c 2074 7279 2061 6761 696e ailed, try again │ │ │ │ -00184b40: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    │ │ │ │ -00184b50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ -00184b80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_free │ │ │ │ -00184be0: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -00184c10: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); /* │ │ │ │ -00184c30: 6465 616c 6c6f 6361 7465 7320 5353 4c20 deallocates SSL │ │ │ │ -00184c40: 636f 6e74 6578 7420 2a2f 3c2f 7370 616e context */
    .
    CRY │ │ │ │ -00184cc0: 5054 4f5f 7468 7265 6164 5f63 6c65 616e PTO_thread_clean │ │ │ │ -00184cd0: 7570 3c2f 613e 2829 3b20 3c73 7061 6e20 up(); │ │ │ │ -00184cf0: 2f2a 204f 7065 6e53 534c 2074 6872 6561 /* OpenSSL threa │ │ │ │ -00184d00: 6420 6d75 7465 7820 636c 6561 6e75 7020 d mutex cleanup │ │ │ │ -00184d10: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    . │ │ │ │ -00184d20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ -00184d50: 7475 726e 3c2f 7370 616e 3e20 303b 203c turn 0; < │ │ │ │ -00184d60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    setsockopt │ │ │ │ +00182100: 2873 6f63 6b2c 202e 2e2e 2c20 2e2e 2e2c (sock, ..., ..., │ │ │ │ +00182110: 202e 2e2e 2c20 2e2e 2e29 3b3c 2f64 6976 ..., ...);
    .
    setsockopt │ │ │ │ +00182140: 2873 6f63 6b2c 202e 2e2e 2c20 2e2e 2e2c (sock, ..., ..., │ │ │ │ +00182150: 202e 2e2e 2c20 2e2e 2e29 3b3c 2f64 6976 ..., ...);
    .

    .... │ │ │ │ +00182180: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +00182190: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +001821a0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +001821b0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.O │ │ │ │ +001821e0: 7665 7272 6964 696e 6720 7468 6520 686f verriding the ho │ │ │ │ +001821f0: 7374 2061 6e64 2070 6f72 7420 746f 2063 st and port to c │ │ │ │ +00182200: 6f6e 6e65 6374 3c2f 6832 3e0a 3c70 3e54 onnect

    .

    T │ │ │ │ +00182210: 6f20 6f76 6572 7269 6465 2074 6865 2068 o override the h │ │ │ │ +00182220: 6f73 7420 616e 6420 706f 7274 206f 6620 ost and port of │ │ │ │ +00182230: 7468 6520 636c 6965 6e74 2063 6f6e 6e65 the client conne │ │ │ │ +00182240: 6374 696e 6720 746f 2061 2073 6572 7665 cting to a serve │ │ │ │ +00182250: 722c 2073 6574 203c 636f 6465 3e3c 6120 r, set soap::overr │ │ │ │ +00182320: 6964 655f 686f 7374 3c2f 613e 3c2f 636f ide_host and soap::over │ │ │ │ +00182400: 7269 6465 5f70 6f72 743c 2f61 3e3c 2f63 ride_port:

    .
    │ │ │ │ +00182430: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap->o │ │ │ │ +001824c0: 7665 7272 6964 655f 686f 7374 3c2f 613e verride_host │ │ │ │ +001824d0: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ +001824f0: 7175 6f74 3b65 7861 6d70 6c65 2e63 6f6d quot;example.com │ │ │ │ +00182500: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; < │ │ │ │ +00182510: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00182520: 656e 7422 3e2f 2f20 686f 7374 206e 616d ent">// host nam │ │ │ │ +00182530: 6520 6f72 2049 5020 6164 6472 6573 7320 e or IP address │ │ │ │ +00182540: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00182560: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +00182590: 2667 743b 3c61 2063 6c61 7373 3d22 636f >ove │ │ │ │ +001825e0: 7272 6964 655f 706f 7274 3c2f 613e 203d rride_port = │ │ │ │ +001825f0: 2038 303b 2020 2020 2020 2020 2020 2020 80; │ │ │ │ +00182600: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // port nu │ │ │ │ +00182620: 6d62 6572 2074 6f20 7573 6520 7768 656e mber to use when │ │ │ │ +00182630: 206f 7665 7272 6964 696e 6720 7468 6520 overriding the │ │ │ │ +00182640: 6164 6472 6573 733c 2f73 7061 6e3e 3c2f address.
    c │ │ │ │ +00182720: 6f6e 7374 2063 6861 7220 2a20 6f76 6572 onst char * over │ │ │ │ +00182730: 7269 6465 5f68 6f73 743c 2f64 6976 3e3c ride_host
    < │ │ │ │ +00182740: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +00182750: 223e 5573 6572 2d64 6566 696e 6162 6c65 ">User-definable │ │ │ │ +00182760: 2073 7472 696e 6720 746f 206f 7665 7272 string to overr │ │ │ │ +00182770: 6964 6520 7468 6520 686f 7374 206e 616d ide the host nam │ │ │ │ +00182780: 6520 6f72 2049 5020 6164 6472 6573 7320 e or IP address │ │ │ │ +00182790: 696e 2074 6865 2048 5454 5020 6865 6164 in the HTTP head │ │ │ │ +001827a0: 6572 2077 6865 6e20 636f 6e6e 6563 7469 er when connecti │ │ │ │ +001827b0: 6e67 2061 7420 742e 2e2e 3c2f 6469 763e ng at t...
    │ │ │ │ +001827c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ +001827e0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ +001827f0: 3a34 3035 343c 2f64 6976 3e3c 2f64 6976 :4054
    .
    < │ │ │ │ +00182860: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ +00182870: 6170 2e68 746d 6c23 6139 3134 6463 6236 ap.html#a914dcb6 │ │ │ │ +00182880: 6562 3036 3766 3266 6433 6134 3766 3932 eb067f2fd3a47f92 │ │ │ │ +00182890: 3037 3235 3762 3630 3622 3e73 6f61 703a 07257b606">soap: │ │ │ │ +001828a0: 3a6f 7665 7272 6964 655f 706f 7274 3c2f :override_port
    int │ │ │ │ +001828d0: 6f76 6572 7269 6465 5f70 6f72 743c 2f64 override_port
    User-defin │ │ │ │ +00182900: 6162 6c65 2070 6f72 7420 6e75 6d62 6572 able port number │ │ │ │ +00182910: 2074 6f20 6f76 6572 7269 6465 2074 6865 to override the │ │ │ │ +00182920: 2070 6f72 7420 6164 6472 6573 7320 696e port address in │ │ │ │ +00182930: 2074 6865 2048 5454 5020 6865 6164 6572 the HTTP header │ │ │ │ +00182940: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting │ │ │ │ +00182950: 2061 7420 7468 6520 636c 692e 2e2e 3c2f at the cli...
    Defini │ │ │ │ +00182980: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ +00182990: 7032 2e68 3a34 3035 393c 2f64 6976 3e3c p2.h:4059
    < │ │ │ │ +001829a0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +001829c0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +001829e0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    │ │ │ │ +00182a20: 0a53 6563 7572 6520 5765 6220 7365 7276 .Secure Web serv │ │ │ │ +00182a30: 6963 6573 2077 6974 6820 4854 5450 533c ices with HTTPS< │ │ │ │ +00182a40: 2f68 323e 0a3c 703e 546f 2065 6e61 626c /h2>.

    To enabl │ │ │ │ +00182a50: 6520 5353 4c20 666f 7220 7374 616e 642d e SSL for stand- │ │ │ │ +00182a60: 616c 6f6e 6520 6753 4f41 5020 5765 6220 alone gSOAP Web │ │ │ │ +00182a70: 7365 7276 6572 732c 2066 6972 7374 2069 servers, first i │ │ │ │ +00182a80: 6e73 7461 6c6c 204f 7065 6e53 534c 2061 nstall OpenSSL a │ │ │ │ +00182a90: 6e64 2075 7365 206f 7074 696f 6e20 7468 nd use option th │ │ │ │ +00182aa0: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f │ │ │ │ +00182ab0: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_ │ │ │ │ +00182ac0: 4f50 454e 5353 4c3c 2f63 6f64 653e 2074 OPENSSL t │ │ │ │ +00182ad0: 6f20 636f 6d70 696c 6520 7468 6520 736f o compile the so │ │ │ │ +00182ae0: 7572 6365 7320 7769 7468 2079 6f75 7220 urces with your │ │ │ │ +00182af0: 4320 6f72 2043 2b2b 2063 6f6d 7069 6c65 C or C++ compile │ │ │ │ +00182b00: 7220 286f 7220 7573 6520 7468 6520 636f r (or use the co │ │ │ │ +00182b10: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag │ │ │ │ +00182b20: 3c63 6f64 653e 2357 4954 485f 474e 5554 #WITH_GNUT │ │ │ │ +00182b30: 4c53 3c2f 636f 6465 3e20 6966 2079 6f75 LS if you │ │ │ │ +00182b40: 2070 7265 6665 7220 474e 5554 4c53 292c prefer GNUTLS), │ │ │ │ +00182b50: 2066 6f72 2065 7861 6d70 6c65 3a20 3c2f for example:

     c++ -DW
    │ │ │ │ +00182b80: 4954 485f 4f50 454e 5353 4c20 2d6f 206d  ITH_OPENSSL -o m
    │ │ │ │ +00182b90: 7970 726f 6720 6d79 7072 6f67 2e63 7070  yprog myprog.cpp
    │ │ │ │ +00182ba0: 2073 7464 736f 6170 322e 6370 7020 736f   stdsoap2.cpp so
    │ │ │ │ +00182bb0: 6170 432e 6370 7020 736f 6170 5365 7276  apC.cpp soapServ
    │ │ │ │ +00182bc0: 6572 2e63 7070 202d 6c73 736c 202d 6c63  er.cpp -lssl -lc
    │ │ │ │ +00182bd0: 7279 7074 6f0a 3c2f 7072 653e 3c70 3e20  rypto.

    │ │ │ │ +00182be0: 5769 7468 2047 4e55 544c 533a 203c 2f70 With GNUTLS:

     c++ -DWI
    │ │ │ │ +00182c10: 5448 5f47 4e55 544c 5320 2d6f 206d 7970  TH_GNUTLS -o myp
    │ │ │ │ +00182c20: 726f 6720 6d79 7072 6f67 2e63 7070 2073  rog myprog.cpp s
    │ │ │ │ +00182c30: 7464 736f 6170 322e 6370 7020 736f 6170  tdsoap2.cpp soap
    │ │ │ │ +00182c40: 432e 6370 7020 736f 6170 5365 7276 6572  C.cpp soapServer
    │ │ │ │ +00182c50: 2e63 7070 202d 6c67 6e75 746c 7320 2d6c  .cpp -lgnutls -l
    │ │ │ │ +00182c60: 6763 7279 7074 202d 6c67 7067 2d65 7272  gcrypt -lgpg-err
    │ │ │ │ +00182c70: 6f72 0a3c 2f70 7265 3e3c 703e 2053 534c  or.

    SSL │ │ │ │ +00182c80: 2073 7570 706f 7274 2066 6f72 2073 7461 support for sta │ │ │ │ +00182c90: 6e64 2d61 6c6f 6e65 2067 534f 4150 2057 nd-alone gSOAP W │ │ │ │ +00182ca0: 6562 2073 6572 7669 6365 7320 6973 2065 eb services is e │ │ │ │ +00182cb0: 6e61 626c 6564 2062 7920 6361 6c6c 696e nabled by callin │ │ │ │ +00182cc0: 6720 3c63 6f64 653e 3c61 2063 6c61 7373 g soap_s │ │ │ │ +00182d40: 736c 5f61 6363 6570 743c 2f61 3e3c 2f63 sl_accept to perform │ │ │ │ +00182d60: 7468 6520 5353 4c2f 544c 5320 6861 6e64 the SSL/TLS hand │ │ │ │ +00182d70: 7368 616b 6520 6166 7465 7220 3c63 6f64 shake after soap_ │ │ │ │ +00182e00: 6163 6365 7074 3c2f 613e 3c2f 636f 6465 accept. In addition, │ │ │ │ +00182e20: 6120 6b65 7920 6669 6c65 2c20 6120 4341 a key file, a CA │ │ │ │ +00182e30: 2066 696c 6520 286f 7220 7061 7468 2074 file (or path t │ │ │ │ +00182e40: 6f20 6365 7274 6966 6963 6174 6573 292c o certificates), │ │ │ │ +00182e50: 2044 4820 6669 6c65 2028 6966 2052 5341 DH file (if RSA │ │ │ │ +00182e60: 2069 7320 6e6f 7420 7573 6564 292c 2061 is not used), a │ │ │ │ +00182e70: 6e64 2070 6173 7377 6f72 6420 6e65 6564 nd password need │ │ │ │ +00182e80: 2074 6f20 6265 2073 7570 706c 6965 642e to be supplied. │ │ │ │ +00182e90: 2049 6e73 7472 7563 7469 6f6e 7320 6f6e Instructions on │ │ │ │ +00182ea0: 2068 6f77 2074 6f20 646f 2074 6869 7320 how to do this │ │ │ │ +00182eb0: 6361 6e20 6265 2066 6f75 6e64 2069 6e20 can be found in │ │ │ │ +00182ec0: 7468 6520 4f70 656e 5353 4c20 646f 6375 the OpenSSL docu │ │ │ │ +00182ed0: 6d65 6e74 6174 696f 6e20 3c61 2068 7265 mentation http: │ │ │ │ +00182f00: 2f2f 7777 772e 6f70 656e 7373 6c2e 6f72 //www.openssl.or │ │ │ │ +00182f10: 673c 2f61 3e2e 2053 6565 2061 6c73 6f20 g. See also │ │ │ │ +00182f20: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section SSL │ │ │ │ +00182f50: 6365 7274 6966 6963 6174 6573 2061 6e64 certificates and │ │ │ │ +00182f60: 206b 6579 2066 696c 6573 3c2f 613e 202e key files . │ │ │ │ +00182f70: 3c2f 703e 0a3c 703e 4c65 7427 7320 7461

    .

    Let's ta │ │ │ │ +00182f80: 6b65 2061 206c 6f6f 6b20 6174 2061 6e20 ke a look at an │ │ │ │ +00182f90: 6578 616d 706c 6520 5353 4c20 7365 6375 example SSL secu │ │ │ │ +00182fa0: 7265 206d 756c 7469 2d74 6872 6561 6465 re multi-threade │ │ │ │ +00182fb0: 6420 7374 616e 642d 616c 6f6e 6520 534f d stand-alone SO │ │ │ │ +00182fc0: 4150 2057 6562 2053 6572 7669 6365 3a3c AP Web Service:< │ │ │ │ +00182fd0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int │ │ │ │ +00183020: 206d 6169 6e28 2920 3c2f 6469 763e 0a3c main()
    .< │ │ │ │ +00183030: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00183040: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    S │ │ │ │ +001830b0: 4f41 505f 534f 434b 4554 3c2f 613e 206d OAP_SOCKET m │ │ │ │ +001830c0: 2c20 733b 203c 2f64 6976 3e0a 3c64 6976 , s;
    .
    │ │ │ │ +001830e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 THREAD_TYPE │ │ │ │ +00183140: 3c2f 613e 2074 6964 3b20 3c2f 6469 763e tid;
    │ │ │ │ +00183150: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc │ │ │ │ +00183180: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ +001831b0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, *ts │ │ │ │ +00183210: 6f61 703b 203c 2f64 6976 3e0a 3c64 6976 oap;
    ..
    /* soap_ssl_ │ │ │ │ +00183360: 6e6f 696e 6974 2829 3b20 2a2f 3c2f 7370 noinit(); */ /* do │ │ │ │ +00183390: 6e6f 7420 696e 6974 204f 7065 6e53 534c not init OpenSSL │ │ │ │ +001833a0: 2028 6966 2053 534c 2069 7320 616c 7265 (if SSL is alre │ │ │ │ +001833b0: 6164 7920 696e 6974 6961 6c69 7a65 6420 ady initialized │ │ │ │ +001833c0: 656c 7365 7768 6572 6520 696e 2074 6869 elsewhere in thi │ │ │ │ +001833d0: 7320 6170 706c 6963 6174 696f 6e29 202a s application) * │ │ │ │ +001833e0: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ +001833f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00183400: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00183420: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (
    CRYPTO_ │ │ │ │ +00183480: 7468 7265 6164 5f73 6574 7570 3c2f 613e thread_setup │ │ │ │ +00183490: 2829 2920 3c73 7061 6e20 636c 6173 733d ()) /* Ope │ │ │ │ +001834b0: 6e53 534c 2074 6872 6561 6420 6d75 7465 nSSL thread mute │ │ │ │ +001834c0: 7820 7365 7475 7020 2a2f 3c2f 7370 616e x setup */

    .
    {.
    fprint │ │ │ │ +00183510: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Cann │ │ │ │ +00183540: 6f74 2073 6574 7570 2074 6872 6561 6420 ot setup thread │ │ │ │ +00183550: 6d75 7465 785c 6e26 7175 6f74 3b3c 2f73 mutex\n");
    . │ │ │ │ +00183580: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA │ │ │ │ +00183590: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .< │ │ │ │ +001835a0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001835b0: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ +001835d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +00183600: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new< │ │ │ │ +00183660: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    . │ │ │ │ +00183680: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_ssl │ │ │ │ +00183700: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context< │ │ │ │ +00183710: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ +00183740: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    .. │ │ │ │ +001837d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    "server.p │ │ │ │ +00183810: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em", │ │ │ │ +00183820: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* k │ │ │ │ +00183840: 6579 6669 6c65 3a20 7265 7175 6972 6564 eyfile: required │ │ │ │ +00183850: 2077 6865 6e20 7365 7276 6572 206d 7573 when server mus │ │ │ │ +00183860: 7420 6175 7468 656e 7469 6361 7465 2074 t authenticate t │ │ │ │ +00183870: 6f20 636c 6965 6e74 7320 2873 6565 2053 o clients (see S │ │ │ │ +00183880: 534c 2064 6f63 7320 6f6e 2068 6f77 2074 SL docs on how t │ │ │ │ +00183890: 6f20 6f62 7461 696e 2074 6869 7320 6669 o obtain this fi │ │ │ │ +001838a0: 6c65 2920 2a2f 3c2f 7370 616e 3e20 3c2f le) */ .
    "pas │ │ │ │ +001838f0: 7377 6f72 6426 7175 6f74 3b3c 2f73 7061 sword", /* password to │ │ │ │ +00183930: 7265 6164 2074 6865 206b 6579 2066 696c read the key fil │ │ │ │ +00183940: 6520 286e 6f74 2075 7365 6420 7769 7468 e (not used with │ │ │ │ +00183950: 2047 4e55 544c 5329 202a 2f3c 2f73 7061 GNUTLS) */
    .
    │ │ │ │ +00183980: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +001839a0: 743b 6361 6365 7274 2e70 656d 2671 756f t;cacert.pem&quo │ │ │ │ +001839b0: 743b 3c2f 7370 616e 3e2c 2020 2020 2020 t;, │ │ │ │ +001839c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* optiona │ │ │ │ +001839e0: 6c20 6361 6365 7274 2066 696c 6520 746f l cacert file to │ │ │ │ +001839f0: 2073 746f 7265 2074 7275 7374 6564 2063 store trusted c │ │ │ │ +00183a00: 6572 7469 6669 6361 7465 7320 2a2f 3c2f ertificates */
    . │ │ │ │ +00183a30: 2020 204e 554c 4c2c 2020 2020 2020 2020 NULL, │ │ │ │ +00183a40: 2020 2020 2020 3c73 7061 6e20 636c 6173 /* o │ │ │ │ +00183a60: 7074 696f 6e61 6c20 6361 7061 7468 2074 ptional capath t │ │ │ │ +00183a70: 6f20 6469 7265 6374 6f72 7920 7769 7468 o directory with │ │ │ │ +00183a80: 2074 7275 7374 6564 2063 6572 7469 6669 trusted certifi │ │ │ │ +00183a90: 6361 7465 7320 2a2f 3c2f 7370 616e 3e20 cates */ │ │ │ │ +00183aa0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "d │ │ │ │ +00183ae0: 6835 3132 2e70 656d 2671 756f 743b 3c2f h512.pem", /* DH file na │ │ │ │ +00183b20: 6d65 206f 7220 4448 206b 6579 206c 656e me or DH key len │ │ │ │ +00183b30: 2062 6974 7320 286d 696e 696d 756d 2069 bits (minimum i │ │ │ │ +00183b40: 7320 3531 322c 2065 2e67 2e20 2671 756f s 512, e.g. &quo │ │ │ │ +00183b50: 743b 3531 3226 7175 6f74 3b29 2074 6f20 t;512") to │ │ │ │ +00183b60: 6765 6e65 7261 7465 2044 4820 7061 7261 generate DH para │ │ │ │ +00183b70: 6d2c 2069 6620 4e55 4c4c 2075 7365 2052 m, if NULL use R │ │ │ │ +00183b80: 5341 202a 2f3c 2f73 7061 6e3e 203c 2f64 SA */ .
    NULL, │ │ │ │ +00183bb0: 2020 2020 2020 2020 2020 2020 203c 7370 /* if randfil │ │ │ │ +00183be0: 6521 3d4e 554c 4c3a 2075 7365 2061 2066 e!=NULL: use a f │ │ │ │ +00183bf0: 696c 6520 7769 7468 2072 616e 646f 6d20 ile with random │ │ │ │ +00183c00: 6461 7461 2074 6f20 7365 6564 2072 616e data to seed ran │ │ │ │ +00183c10: 646f 6d6e 6573 7320 2a2f 3c2f 7370 616e domness */
    .
    │ │ │ │ +00183c40: 4e55 4c4c 2020 2020 2020 2020 2020 2020 NULL │ │ │ │ +00183c50: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* opti │ │ │ │ +00183c70: 6f6e 616c 2073 6572 7665 7220 6964 656e onal server iden │ │ │ │ +00183c80: 7469 6669 6361 7469 6f6e 2074 6f20 656e tification to en │ │ │ │ +00183c90: 6162 6c65 2053 534c 2073 6573 7369 6f6e able SSL session │ │ │ │ +00183ca0: 2063 6163 6869 6e67 2074 6f20 7370 6565 caching to spee │ │ │ │ +00183cb0: 6420 7570 2054 4c53 2028 6d75 7374 2062 d up TLS (must b │ │ │ │ +00183cc0: 6520 6120 756e 6971 7565 206e 616d 6529 e a unique name) │ │ │ │ +00183cd0: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    │ │ │ │ +00183ce0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ))
    .< │ │ │ │ +00183d00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00183d10: 3e20 207b 3c2f 6469 763e 0a3c 6469 7620 > {
    .
    │ │ │ │ +00183d30: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f │ │ │ │ +00183d90: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault( │ │ │ │ +00183dc0: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr │ │ │ │ +00183dd0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ +00183df0: 6578 6974 2845 5849 545f 4641 494c 5552 exit(EXIT_FAILUR │ │ │ │ +00183e00: 4529 3b20 3c2f 6469 763e 0a3c 6469 7620 E);
    .
    } │ │ │ │ +00183e20: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    m = │ │ │ │ +00183e40: 3c61 2063 6c61 7373 3d22 636f 6465 2220 │ │ │ │ +00183e90: 736f 6170 5f62 696e 643c 2f61 3e28 3c61 soap_bind(soap, N │ │ │ │ +00183ed0: 554c 4c2c 2031 3830 3030 2c20 4241 434b ULL, 18000, BACK │ │ │ │ +00183ee0: 4c4f 4729 3b20 3c73 7061 6e20 636c 6173 LOG); /* u │ │ │ │ +00183f00: 7365 2070 6f72 7420 3138 3030 3020 2a2f se port 18000 */ │ │ │ │ +00183f10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00183f30: 2020 3c73 7061 6e20 636c 6173 733d 226b if (!soap_v │ │ │ │ +00183fb0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket( │ │ │ │ +00183fc0: 6d29 2920 3c2f 6469 763e 0a3c 6469 7620 m))
    .
    { │ │ │ │ +00183fe0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +00184050: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault │ │ │ │ +00184060: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ +00184090: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); < │ │ │ │ +001840a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit │ │ │ │ +001840c0: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); │ │ │ │ +001840d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    fprintf( │ │ │ │ +00184110: 7374 6465 7272 2c20 3c73 7061 6e20 636c stderr, "Socket │ │ │ │ +00184140: 2063 6f6e 6e65 6374 696f 6e20 7375 6363 connection succ │ │ │ │ +00184150: 6573 7366 756c 3a20 6d61 7374 6572 2073 essful: master s │ │ │ │ +00184160: 6f63 6b65 7420 3d20 2564 5c6e 2671 756f ocket = %d\n&quo │ │ │ │ +00184170: 743b 3c2f 7370 616e 3e2c 206d 293b 203c t;, m); < │ │ │ │ +00184180: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    while │ │ │ │ +001841c0: 2028 3129 3c2f 6469 763e 0a3c 6469 7620 (1)
    .
    { │ │ │ │ +001841e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s = │ │ │ │ +00184200: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_accept │ │ │ │ +00184260: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +00184290: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ +001842b0: 6670 7269 6e74 6628 7374 6465 7272 2c20 fprintf(stderr, │ │ │ │ +001842c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +001842e0: 743b 536f 636b 6574 2063 6f6e 6e65 6374 t;Socket connect │ │ │ │ +001842f0: 696f 6e20 7375 6363 6573 7366 756c 3a20 ion successful: │ │ │ │ +00184300: 736c 6176 6520 736f 636b 6574 203d 2025 slave socket = % │ │ │ │ +00184310: 645c 6e26 7175 6f74 3b3c 2f73 7061 6e3e d\n" │ │ │ │ +00184320: 2c20 7329 3b20 3c2f 6469 763e 0a3c 6469 , s);
    . │ │ │ │ +00184340: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ +00184360: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!soap_ │ │ │ │ +001843c0: 7661 6c69 645f 736f 636b 6574 3c2f 613e valid_socket │ │ │ │ +001843d0: 2873 2929 203c 2f64 6976 3e0a 3c64 6976 (s))
    .
    │ │ │ │ +001843f0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ +00184410: 2020 3c73 7061 6e20 636c 6173 733d 226b if (so │ │ │ │ +00184460: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->errnum) │ │ │ │ +001844c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* accept │ │ │ │ +001844e0: 6661 696c 6564 2c20 7472 7920 6167 6169 failed, try agai │ │ │ │ +001844f0: 6e20 6166 7465 7220 3120 7365 636f 6e64 n after 1 second │ │ │ │ +00184500: 202a 2f3c 2f73 7061 6e3e 3c2f 6469 763e */
    │ │ │ │ +00184510: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    │ │ │ │ +00184530: 0a3c 6469 7620 636c 6173 733d 226c 696e ..
    }
    .
    fprint │ │ │ │ +001846d0: 6628 7374 6465 7272 2c20 3c73 7061 6e20 f(stderr, "Serv │ │ │ │ +00184700: 6572 2074 696d 6564 206f 7574 5c6e 2671 er timed out\n&q │ │ │ │ +00184710: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    break;
    .
    │ │ │ │ +00184780: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    │ │ │ │ +001847a0: 7473 6f61 7020 3d20 3c61 2063 6c61 7373 tsoap = soa │ │ │ │ +00184800: 705f 636f 7079 3c2f 613e 283c 6120 636c p_copy(soap);.
    if (!t │ │ │ │ +00184880: 736f 6170 2920 3c2f 6469 763e 0a3c 6469 soap)
    . │ │ │ │ +001848a0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_force_ │ │ │ │ +00184900: 636c 6f73 6573 6f63 6b3c 2f61 3e28 3c61 closesock(soap);< │ │ │ │ +00184940: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    else
    .
    │ │ │ │ +001849a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 while< │ │ │ │ +001849c0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (THR │ │ │ │ +00184a20: 4541 445f 4352 4541 5445 3c2f 613e 2826 EAD_CREATE(& │ │ │ │ +00184a30: 616d 703b 7469 642c 2028 3c73 7061 6e20 amp;tid, (void* │ │ │ │ +00184a60: 282a 2928 3c73 7061 6e20 636c 6173 733d (*)(vo │ │ │ │ +00184a80: 6964 3c2f 7370 616e 3e2a 2929 2661 6d70 id*))& │ │ │ │ +00184a90: 3b70 726f 6365 7373 5f72 6571 7565 7374 ;process_request │ │ │ │ +00184aa0: 2c20 283c 7370 616e 2063 6c61 7373 3d22 , (voi │ │ │ │ +00184ac0: 643c 2f73 7061 6e3e 2a29 7473 6f61 7029 d*)tsoap) │ │ │ │ +00184ad0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    │ │ │ │ +00184af0: 2020 736c 6565 7028 3129 3b20 3c73 7061 sleep(1); /* failed, try │ │ │ │ +00184b20: 2061 6761 696e 202a 2f3c 2f73 7061 6e3e again */ │ │ │ │ +00184b30: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    soa │ │ │ │ +00184bc0: 705f 6672 6565 3c2f 613e 283c 6120 636c p_free(soap); /* deallocate │ │ │ │ +00184c20: 7320 5353 4c20 636f 6e74 6578 7420 2a2f s SSL context */ │ │ │ │ +00184c30: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +00184c50: 2020 3c61 2063 6c61 7373 3d22 636f 6465 CRYPTO_thread │ │ │ │ +00184cb0: 5f63 6c65 616e 7570 3c2f 613e 2829 3b20 _cleanup(); │ │ │ │ +00184cc0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* OpenSSL │ │ │ │ +00184ce0: 2074 6872 6561 6420 6d75 7465 7820 636c thread mutex cl │ │ │ │ +00184cf0: 6561 6e75 7020 2a2f 3c2f 7370 616e 3e3c eanup */< │ │ │ │ +00184d00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return 0;
    .
    } │ │ │ │ +00184d60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    .
    void *process_req │ │ │ │ -00184de0: 7565 7374 283c 7370 616e 2063 6c61 7373 uest(v │ │ │ │ -00184e00: 6f69 643c 2f73 7061 6e3e 202a 7473 6f61 oid *tsoa │ │ │ │ -00184e10: 7029 203c 2f64 6976 3e0a 3c64 6976 2063 p)
    .
    {.
    st │ │ │ │ -00184e60: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = ( │ │ │ │ -00184ed0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ -00184f20: 2f61 3e2a 2974 736f 6170 3b3c 2f64 6976 /a>*)tsoap;
    .
    THREA │ │ │ │ -00184fa0: 445f 4445 5441 4348 3c2f 613e 283c 6120 D_DETACH(THREAD_ID) │ │ │ │ -00185010: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .. │ │ │ │ -001850f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_pr │ │ │ │ -00185160: 696e 745f 6661 756c 743c 2f61 3e28 3c61 int_fault(soap, s │ │ │ │ -001851a0: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .< │ │ │ │ -001851b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001851c0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > els │ │ │ │ -001851e0: 653c 2f73 7061 6e3e 203c 2f64 6976 3e0a e
    . │ │ │ │ -001851f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ -001852b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest │ │ │ │ -00185310: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s │ │ │ │ -00185340: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    │ │ │ │ -00185350: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ -00185400: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ -001854b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001854c0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret │ │ │ │ -001854e0: 7572 6e3c 2f73 7061 6e3e 204e 554c 4c3b urn NULL; │ │ │ │ -001854f0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    }
    .
    │ │ │ │ -001855f0: 696e 7420 736f 6170 5f73 736c 5f73 6572 int soap_ssl_ser │ │ │ │ -00185600: 7665 725f 636f 6e74 6578 7428 7374 7275 ver_context(stru │ │ │ │ -00185610: 6374 2073 6f61 7020 2a73 6f61 702c 2073 ct soap *soap, s │ │ │ │ -00185620: 6f61 705f 7373 6c5f 666c 6167 7320 666c oap_ssl_flags fl │ │ │ │ -00185630: 6167 732c 2063 6f6e 7374 2063 6861 7220 ags, const char │ │ │ │ -00185640: 2a6b 6579 6669 6c65 2c20 636f 6e73 7420 *keyfile, const │ │ │ │ -00185650: 6368 6172 202a 7061 7373 776f 7264 2c20 char *password, │ │ │ │ -00185660: 636f 6e73 7420 6368 6172 202a 6361 6669 const char *cafi │ │ │ │ -00185670: 6c65 2c20 636f 6e73 7420 6368 6172 202a le, const char * │ │ │ │ -00185680: 6361 7061 7468 2c20 636f 6e73 7420 6368 capath, const ch │ │ │ │ -00185690: 6172 202a 6468 6669 6c65 2c20 636f 6e73 ar *dhfile, cons │ │ │ │ -001856a0: 7420 6368 6172 202a 7261 6e64 6669 6c65 t char *randfile │ │ │ │ -001856b0: 2c20 636f 6e73 7420 6368 6172 202a 7369 , const char *si │ │ │ │ -001856c0: 6429 3c2f 6469 763e 3c64 6976 2063 6c61 d)
    Initi │ │ │ │ -001856e0: 616c 697a 6520 7468 6520 7365 7276 6572 alize the server │ │ │ │ -001856f0: 2d73 6964 6520 5353 4c2f 544c 5320 636f -side SSL/TLS co │ │ │ │ -00185700: 6e74 6578 742e 3c2f 6469 763e 3c2f 6469 ntext.
    .
    soap │ │ │ │ -001857c0: 5f73 736c 5f69 6e69 743c 2f61 3e3c 2f64 _ssl_init
    void soap │ │ │ │ -001857f0: 5f73 736c 5f69 6e69 7428 766f 6964 293c _ssl_init(void)< │ │ │ │ -00185800: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Initiali │ │ │ │ -00185820: 7a65 2074 6865 2053 534c 2f54 4c53 206c ze the SSL/TLS l │ │ │ │ -00185830: 6962 7261 7279 2e3c 2f64 6976 3e3c 2f64 ibrary.
    .
    #defi │ │ │ │ -00185920: 6e65 2053 4f41 505f 5353 4c5f 4445 4641 ne SOAP_SSL_DEFA │ │ │ │ -00185930: 554c 543c 2f64 6976 3e3c 6469 7620 636c ULT
    soap │ │ │ │ -00185950: 5f73 736c 5f66 6c61 6773 2066 6c61 6720 _ssl_flags flag │ │ │ │ -00185960: 7769 7468 2023 534f 4150 5f53 534c 5f52 with #SOAP_SSL_R │ │ │ │ -00185970: 4551 5549 5245 5f53 4552 5645 525f 4155 EQUIRE_SERVER_AU │ │ │ │ -00185980: 5448 454e 5449 4341 5449 4f4e 2061 6e64 THENTICATION and │ │ │ │ -00185990: 2023 534f 4150 5f54 4c53 7631 2065 6e61 #SOAP_TLSv1 ena │ │ │ │ -001859a0: 626c 6564 2062 7920 6465 6661 756c 743c bled by default< │ │ │ │ -001859b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -001859d0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -001859e0: 6170 322e 683a 3538 3236 3c2f 6469 763e ap2.h:5826
    │ │ │ │ -001859f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -00185ac0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ -00185ad0: 6922 3e69 6e74 2043 5259 5054 4f5f 7468 i">int CRYPTO_th │ │ │ │ -00185ae0: 7265 6164 5f63 6c65 616e 7570 2829 3c2f read_cleanup()
    Cleanup f │ │ │ │ -00185b10: 756e 6374 696f 6e20 666f 7220 4f70 656e unction for Open │ │ │ │ -00185b20: 5353 4c20 7665 7273 696f 6e73 2070 7269 SSL versions pri │ │ │ │ -00185b30: 6f72 2074 6f20 312e 312e 312e 3c2f 6469 or to 1.1.1.
    .
    i │ │ │ │ -00185c20: 6e74 2073 6f61 705f 7373 6c5f 6163 6365 nt soap_ssl_acce │ │ │ │ -00185c30: 7074 2873 7472 7563 7420 736f 6170 202a pt(struct soap * │ │ │ │ -00185c40: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    Ac │ │ │ │ -00185c60: 6365 7074 2053 534c 2f54 4c53 2063 6f6e cept SSL/TLS con │ │ │ │ -00185c70: 6e65 6374 696f 6e2e 3c2f 6469 763e 3c2f nection.
    .
    i │ │ │ │ -00185d60: 6e74 2043 5259 5054 4f5f 7468 7265 6164 nt CRYPTO_thread │ │ │ │ -00185d70: 5f73 6574 7570 2829 3c2f 6469 763e 3c64 _setup()
    Setup function │ │ │ │ -00185da0: 666f 7220 4f70 656e 5353 4c20 7665 7273 for OpenSSL vers │ │ │ │ -00185db0: 696f 6e73 2070 7269 6f72 2074 6f20 312e ions prior to 1. │ │ │ │ -00185dc0: 312e 3120 746f 2073 6574 206c 6f63 6b73 1.1 to set locks │ │ │ │ -00185dd0: 2066 6f72 206d 756c 7469 2d74 6872 6561 for multi-threa │ │ │ │ -00185de0: 6465 6420 5353 4c2f 544c 5320 6170 706c ded SSL/TLS appl │ │ │ │ -00185df0: 6963 6174 696f 2e2e 2e3c 2f64 6976 3e3c icatio...
    < │ │ │ │ -00185e00: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -00185e20: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soa │ │ │ │ -00185eb0: 705f 7373 6c5f 7365 7276 6572 5f63 6f6e p_ssl_server_con │ │ │ │ -00185ec0: 7465 7874 3c2f 613e 3c2f 636f 6465 3e20 text │ │ │ │ -00185ed0: 6675 6e63 7469 6f6e 2069 6e69 7469 616c function initial │ │ │ │ -00185ee0: 697a 6573 2074 6865 2073 6572 7665 722d izes the server- │ │ │ │ -00185ef0: 7369 6465 2053 534c 2063 6f6e 7465 7874 side SSL context │ │ │ │ -00185f00: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The │ │ │ │ -00185f10: 7365 7276 6572 2e70 656d 3c2f 636f 6465 server.pem key file │ │ │ │ -00185f30: 6973 2074 6865 2073 6572 7665 7227 7320 is the server's │ │ │ │ -00185f40: 7072 6976 6174 6520 6b65 7920 636f 6e63 private key conc │ │ │ │ -00185f50: 6174 656e 6174 6564 2077 6974 6820 6974 atenated with it │ │ │ │ -00185f60: 7320 6365 7274 6966 6963 6174 652e 2054 s certificate. T │ │ │ │ -00185f70: 6865 203c 656d 3e3c 636f 6465 3e63 6163 he cac │ │ │ │ -00185f80: 6572 742e 7065 6d3c 2f63 6f64 653e 3c2f ert.pem is used to a │ │ │ │ -00185fa0: 7574 6865 6e74 6963 6174 6520 636c 6965 uthenticate clie │ │ │ │ -00185fb0: 6e74 7320 616e 6420 636f 6e74 6169 6e73 nts and contains │ │ │ │ -00185fc0: 2074 6865 2063 6c69 656e 7420 6365 7274 the client cert │ │ │ │ -00185fd0: 6966 6963 6174 6573 2e20 416c 7465 726e ificates. Altern │ │ │ │ -00185fe0: 6174 6976 656c 7920 6120 6469 7265 6374 atively a direct │ │ │ │ -00185ff0: 6f72 7920 6e61 6d65 2063 616e 2062 6520 ory name can be │ │ │ │ -00186000: 7370 6563 6966 6965 642e 2054 6869 7320 specified. This │ │ │ │ -00186010: 6469 7265 6374 6f72 7920 6973 2061 7373 directory is ass │ │ │ │ -00186020: 756d 6564 2074 6f20 636f 6e74 6169 6e20 umed to contain │ │ │ │ -00186030: 7468 6520 6365 7274 6966 6963 6174 6573 the certificates │ │ │ │ -00186040: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The │ │ │ │ -00186050: 6468 3531 322e 7065 6d3c 2f63 6f64 653e dh512.pem │ │ │ │ -00186060: 3c2f 656d 3e20 6669 6c65 2073 7065 6369 file speci │ │ │ │ -00186070: 6669 6573 2074 6861 7420 4448 2077 696c fies that DH wil │ │ │ │ -00186080: 6c20 6265 2075 7365 6420 666f 7220 6b65 l be used for ke │ │ │ │ -00186090: 7920 6167 7265 656d 656e 7420 696e 7374 y agreement inst │ │ │ │ -001860a0: 6561 6420 6f66 2052 5341 2e20 4120 6e75 ead of RSA. A nu │ │ │ │ -001860b0: 6d65 7269 6320 7661 6c75 6520 6772 6561 meric value grea │ │ │ │ -001860c0: 7465 7220 7468 616e 2035 3132 2063 616e ter than 512 can │ │ │ │ -001860d0: 2062 6520 7072 6f76 6964 6564 2069 6e73 be provided ins │ │ │ │ -001860e0: 7465 6164 2061 7320 6120 7374 7269 6e67 tead as a string │ │ │ │ -001860f0: 2063 6f6e 7374 616e 7420 2865 2e67 2e20 constant (e.g. │ │ │ │ -00186100: 3c63 6f64 653e 2235 3132 223c 2f63 6f64 "512") to allow the │ │ │ │ -00186120: 2065 6e67 696e 6520 746f 2067 656e 6572 engine to gener │ │ │ │ -00186130: 6174 6520 7468 6520 4448 2070 6172 616d ate the DH param │ │ │ │ -00186140: 6574 6572 7320 6f6e 2074 6865 2066 6c79 eters on the fly │ │ │ │ -00186150: 2028 7468 6973 2063 616e 2074 616b 6520 (this can take │ │ │ │ -00186160: 6120 7768 696c 6529 2072 6174 6865 7220 a while) rather │ │ │ │ -00186170: 7468 616e 2072 6574 7269 6576 696e 6720 than retrieving │ │ │ │ -00186180: 7468 656d 2066 726f 6d20 6120 6669 6c65 them from a file │ │ │ │ -00186190: 2e20 5468 6520 7261 6e64 6669 6c65 2065 . The randfile e │ │ │ │ -001861a0: 6e74 7279 2063 616e 2062 6520 7573 6564 ntry can be used │ │ │ │ -001861b0: 2074 6f20 7365 6564 2074 6865 2050 524e to seed the PRN │ │ │ │ -001861c0: 472e 2054 6865 206c 6173 7420 656e 7472 G. The last entr │ │ │ │ -001861d0: 7920 656e 6162 6c65 2073 6572 7665 722d y enable server- │ │ │ │ -001861e0: 7369 6465 2073 6573 7369 6f6e 2063 6163 side session cac │ │ │ │ -001861f0: 6869 6e67 2074 6f20 7370 6565 6420 7570 hing to speed up │ │ │ │ -00186200: 2054 4c53 2e20 4120 756e 6971 7565 2073 TLS. A unique s │ │ │ │ -00186210: 6572 7665 7220 6e61 6d65 2069 7320 7265 erver name is re │ │ │ │ -00186220: 7175 6972 6564 2e3c 2f70 3e0a 3c70 3e59 quired.

    .

    Y │ │ │ │ -00186230: 6f75 2063 616e 2073 7065 6369 6679 2061 ou can specify a │ │ │ │ -00186240: 2063 6970 6865 7220 6c69 7374 2074 6f20 cipher list to │ │ │ │ -00186250: 7573 6520 7769 7468 2054 4c53 7631 2e32 use with TLSv1.2 │ │ │ │ -00186260: 2061 6e64 2062 656c 6f77 2077 6974 6820 and below with │ │ │ │ -00186270: 3c63 6f64 653e 5353 4c5f 4354 585f 7365 SSL_CTX_se │ │ │ │ -00186280: 745f 6369 7068 6572 5f6c 6973 7428 736f t_cipher_list(so │ │ │ │ -00186290: 6170 2d26 6774 3b63 7478 2c20 222e 2e2e ap->ctx, "... │ │ │ │ -001862a0: 2229 3c2f 636f 6465 3e20 7768 6572 6520 ") where │ │ │ │ -001862b0: 3c63 6f64 653e 736f 6170 2d26 6774 3b63 soap->c │ │ │ │ -001862c0: 7478 3c2f 636f 6465 3e20 6973 2074 6865 tx is the │ │ │ │ -001862d0: 2053 534c 2063 6f6e 7465 7874 2063 7265 SSL context cre │ │ │ │ -001862e0: 6174 6564 2062 7920 3c63 6f64 653e 3c61 ated by soap_ssl_server │ │ │ │ -00186380: 5f63 6f6e 7465 7874 2829 3c2f 613e 3c2f _context(). Likewise, │ │ │ │ -001863a0: 2075 7365 203c 636f 6465 3e53 534c 5f43 use SSL_C │ │ │ │ -001863b0: 5458 5f73 6574 5f63 6970 6865 7273 7569 TX_set_ciphersui │ │ │ │ -001863c0: 7465 7328 736f 6170 2d26 6774 3b63 7478 tes(soap->ctx │ │ │ │ -001863d0: 2c20 222e 2e2e 2229 3c2f 636f 6465 3e20 , "...") │ │ │ │ -001863e0: 746f 2063 6f6e 6669 6775 7265 2074 6865 to configure the │ │ │ │ -001863f0: 2061 7661 696c 6162 6c65 2054 4c53 7631 available TLSv1 │ │ │ │ -00186400: 2e33 2063 6970 6865 7273 7569 7465 732e .3 ciphersuites. │ │ │ │ -00186410: 3c2f 703e 0a3c 703e 5765 2072 6566 6572

    .

    We refer │ │ │ │ -00186420: 2074 6f20 7468 6520 4f70 656e 5353 4c20 to the OpenSSL │ │ │ │ -00186430: 646f 6375 6d65 6e74 6174 696f 6e20 616e documentation an │ │ │ │ -00186440: 6420 6d61 6e75 616c 2070 6167 6573 206f d manual pages o │ │ │ │ -00186450: 6620 3c63 6f64 653e 5353 4c5f 4354 585f f SSL_CTX_ │ │ │ │ -00186460: 7365 745f 6369 7068 6572 5f6c 6973 743c set_cipher_list< │ │ │ │ -00186470: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and SSL_CTX_set_cip │ │ │ │ -00186490: 6865 7273 7569 7465 733c 2f63 6f64 653e hersuites │ │ │ │ -001864a0: 2066 6f72 2064 6574 6169 6c73 206f 6e20 for details on │ │ │ │ -001864b0: 7468 6520 6c61 7465 7374 2063 6970 6865 the latest ciphe │ │ │ │ -001864c0: 7220 6c69 7374 7320 616e 6420 7375 6974 r lists and suit │ │ │ │ -001864d0: 6573 2061 7661 696c 6162 6c65 2074 6f20 es available to │ │ │ │ -001864e0: 7573 652e 3c2f 703e 0a3c 703e 5468 6520 use.

    .

    The │ │ │ │ -001864f0: 474e 5554 4c53 206d 7574 6578 206c 6f63 GNUTLS mutex loc │ │ │ │ -00186500: 6b20 7365 7475 7020 6973 2061 7574 6f6d k setup is autom │ │ │ │ -00186510: 6174 6963 616c 6c79 2070 6572 666f 726d atically perform │ │ │ │ -00186520: 6564 2069 6e20 7468 6520 656e 6769 6e65 ed in the engine │ │ │ │ -00186530: 2c20 6275 7420 6f6e 6c79 2077 6865 6e20 , but only when │ │ │ │ -00186540: 504f 5349 5820 7468 7265 6164 7320 6172 POSIX threads ar │ │ │ │ -00186550: 6520 6465 7465 6374 6564 2061 6e64 2061 e detected and a │ │ │ │ -00186560: 7661 696c 6162 6c65 2e3c 2f70 3e0a 3c70 vailable.

    .

    All OpenSSL ver │ │ │ │ -00186580: 7369 6f6e 7320 7072 696f 7220 746f 2031 sions prior to 1 │ │ │ │ -00186590: 2e31 2e30 2072 6571 7569 7265 206d 7574 .1.0 require mut │ │ │ │ -001865a0: 6578 206c 6f63 6b73 2074 6f20 6265 2065 ex locks to be e │ │ │ │ -001865b0: 7870 6c69 6369 746c 7920 7365 7420 7570 xplicitly set up │ │ │ │ -001865c0: 2069 6e20 796f 7572 2063 6f64 6520 666f in your code fo │ │ │ │ -001865d0: 7220 6d75 6c74 692d 7468 7265 6164 6564 r multi-threaded │ │ │ │ -001865e0: 2061 7070 6c69 6361 7469 6f6e 7320 6279 applications by │ │ │ │ -001865f0: 2063 616c 6c69 6e67 203c 636f 6465 3e3c calling < │ │ │ │ -00186600: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00186610: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -00186620: 5f73 736c 2e68 746d 6c23 6761 6564 6335 _ssl.html#gaedc5 │ │ │ │ -00186630: 3164 6432 6162 3935 6364 6666 3435 3035 1dd2ab95cdff4505 │ │ │ │ -00186640: 3736 3339 6661 6337 3061 3866 2220 7469 7639fac70a8f" ti │ │ │ │ -00186650: 746c 653d 2253 6574 7570 2066 756e 6374 tle="Setup funct │ │ │ │ -00186660: 696f 6e20 666f 7220 4f70 656e 5353 4c20 ion for OpenSSL │ │ │ │ -00186670: 7665 7273 696f 6e73 2070 7269 6f72 2074 versions prior t │ │ │ │ -00186680: 6f20 312e 312e 3120 746f 2073 6574 206c o 1.1.1 to set l │ │ │ │ -00186690: 6f63 6b73 2066 6f72 206d 756c 7469 2d74 ocks for multi-t │ │ │ │ -001866a0: 6872 6561 6465 6420 5353 4c2f 544c 5320 hreaded SSL/TLS │ │ │ │ -001866b0: 6170 706c 6963 6174 696f 2e2e 2e22 3e43 applicatio...">C │ │ │ │ -001866c0: 5259 5054 4f5f 7468 7265 6164 5f73 6574 RYPTO_thread_set │ │ │ │ -001866d0: 7570 2829 3c2f 613e 3c2f 636f 6465 3e20 up() │ │ │ │ -001866e0: 616e 6420 3c63 6f64 653e 3c61 2063 6c61 and CRYPTO_th │ │ │ │ -00186780: 7265 6164 5f63 6c65 616e 7570 2829 3c2f read_cleanup() as was │ │ │ │ -001867a0: 2073 686f 776e 2069 6e20 7468 6520 636f shown in the co │ │ │ │ -001867b0: 6465 2061 626f 7665 2e20 4f70 656e 5353 de above. OpenSS │ │ │ │ -001867c0: 4c20 312e 312e 3020 616e 6420 6772 6561 L 1.1.0 and grea │ │ │ │ -001867d0: 7465 7220 646f 6573 206e 6f74 2072 6571 ter does not req │ │ │ │ -001867e0: 7569 7265 2074 6865 7365 206c 6f63 6b73 uire these locks │ │ │ │ -001867f0: 2074 6f20 6265 2073 6574 2075 702e 2049 to be set up. I │ │ │ │ -00186800: 6620 796f 7520 6172 6520 6e6f 7420 7375 f you are not su │ │ │ │ -00186810: 7265 2077 6869 6368 2076 6572 7369 6f6e re which version │ │ │ │ -00186820: 206f 6620 4f70 656e 5353 4c20 796f 7520 of OpenSSL you │ │ │ │ -00186830: 6d61 7920 6265 2075 7369 6e67 2077 6974 may be using wit │ │ │ │ -00186840: 6820 796f 7572 206d 756c 7469 2d74 6872 h your multi-thr │ │ │ │ -00186850: 6561 6465 6420 6170 706c 6963 6174 696f eaded applicatio │ │ │ │ -00186860: 6e2c 2074 6865 6e20 7365 7420 7570 2074 n, then set up t │ │ │ │ -00186870: 6865 206c 6f63 6b73 2e3c 2f70 3e0a 3c70 he locks.

    .

    For Unix and Li │ │ │ │ -00186890: 6e75 782c 206d 616b 6520 7375 7265 2079 nux, make sure y │ │ │ │ -001868a0: 6f75 2068 6176 6520 7369 676e 616c 2068 ou have signal h │ │ │ │ -001868b0: 616e 646c 6572 7320 7365 7420 696e 2079 andlers set in y │ │ │ │ -001868c0: 6f75 7220 7365 7276 6963 6520 616e 642f our service and/ │ │ │ │ -001868d0: 6f72 2063 6c69 656e 7420 6170 706c 6963 or client applic │ │ │ │ -001868e0: 6174 696f 6e73 2074 6f20 6361 7463 6820 ations to catch │ │ │ │ -001868f0: 6272 6f6b 656e 2063 6f6e 6e65 6374 696f broken connectio │ │ │ │ -00186900: 6e73 2028 3c63 6f64 653e 5349 4750 4950 ns (SIGPIP │ │ │ │ -00186910: 453c 2f63 6f64 653e 293a 3c2f 703e 0a3c E):

    .< │ │ │ │ -00186920: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -00186930: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    signal(SI │ │ │ │ -00186950: 4750 4950 452c 2073 6967 7069 7065 5f68 GPIPE, sigpipe_h │ │ │ │ -00186960: 616e 646c 6529 3b3c 2f64 6976 3e0a 3c2f andle);
    .

    where, f │ │ │ │ -00186990: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ -001869a0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .
    " │ │ │ │ -00186c80: 7365 7276 6572 2e70 656d 2671 756f 743b server.pem" │ │ │ │ -00186c90: 3c2f 7370 616e 3e2c 203c 2f64 6976 3e0a ,
    . │ │ │ │ -00186ca0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    "password │ │ │ │ -00186ce0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", < │ │ │ │ -00186cf0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    "ca │ │ │ │ -00186d30: 6365 7274 2e70 656d 2671 756f 743b 3c2f cert.pem",
    . │ │ │ │ -00186d60: 2020 2020 4e55 4c4c 2c20 3c2f 6469 763e NULL,
    │ │ │ │ -00186d70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "dh512.p │ │ │ │ -00186db0: 656d 2671 756f 743b 3c2f 7370 616e 3e2c em", │ │ │ │ -00186dc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    NU │ │ │ │ -00186de0: 4c4c 2c20 3c2f 6469 763e 0a3c 6469 7620 LL,
    .
    │ │ │ │ -00186e00: 204e 554c 4c29 2920 3c2f 6469 763e 0a3c NULL))
    .< │ │ │ │ +00184d90: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne">vo │ │ │ │ +00184db0: 6964 3c2f 7370 616e 3e20 2a70 726f 6365 id *proce │ │ │ │ +00184dc0: 7373 5f72 6571 7565 7374 283c 7370 616e ss_request(void │ │ │ │ +00184df0: 202a 7473 6f61 7029 203c 2f64 6976 3e0a *tsoap)
    . │ │ │ │ +00184e00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    struct soap *soap = (stru │ │ │ │ +00184ed0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap*)tsoap │ │ │ │ +00184f10: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ..< │ │ │ │ +00185000: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00185010: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00185030: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_ss │ │ │ │ +00185090: 6c5f 6163 6365 7074 3c2f 613e 283c 6120 l_accept(soap)) < │ │ │ │ +001850d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ +00185140: 6f61 705f 7072 696e 745f 6661 756c 743c oap_print_fault< │ │ │ │ +00185150: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ +00185180: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    else < │ │ │ │ +001851d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap │ │ │ │ +00185240: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap); .
    soa │ │ │ │ +001852f0: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); │ │ │ │ +00185330: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001853a0: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap); < │ │ │ │ +001853e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ +00185450: 6f61 705f 6672 6565 3c2f 613e 283c 6120 oap_free(soap);.
    return │ │ │ │ +001854d0: 204e 554c 4c3b 203c 2f64 6976 3e0a 3c64 NULL;
    . │ │ │ │ +001854f0: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    soap_ssl_server │ │ │ │ +001855b0: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 6469 _context
    int soap_s │ │ │ │ +001855e0: 736c 5f73 6572 7665 725f 636f 6e74 6578 sl_server_contex │ │ │ │ +001855f0: 7428 7374 7275 6374 2073 6f61 7020 2a73 t(struct soap *s │ │ │ │ +00185600: 6f61 702c 2073 6f61 705f 7373 6c5f 666c oap, soap_ssl_fl │ │ │ │ +00185610: 6167 7320 666c 6167 732c 2063 6f6e 7374 ags flags, const │ │ │ │ +00185620: 2063 6861 7220 2a6b 6579 6669 6c65 2c20 char *keyfile, │ │ │ │ +00185630: 636f 6e73 7420 6368 6172 202a 7061 7373 const char *pass │ │ │ │ +00185640: 776f 7264 2c20 636f 6e73 7420 6368 6172 word, const char │ │ │ │ +00185650: 202a 6361 6669 6c65 2c20 636f 6e73 7420 *cafile, const │ │ │ │ +00185660: 6368 6172 202a 6361 7061 7468 2c20 636f char *capath, co │ │ │ │ +00185670: 6e73 7420 6368 6172 202a 6468 6669 6c65 nst char *dhfile │ │ │ │ +00185680: 2c20 636f 6e73 7420 6368 6172 202a 7261 , const char *ra │ │ │ │ +00185690: 6e64 6669 6c65 2c20 636f 6e73 7420 6368 ndfile, const ch │ │ │ │ +001856a0: 6172 202a 7369 6429 3c2f 6469 763e 3c64 ar *sid)
    Initialize the │ │ │ │ +001856d0: 7365 7276 6572 2d73 6964 6520 5353 4c2f server-side SSL/ │ │ │ │ +001856e0: 544c 5320 636f 6e74 6578 742e 3c2f 6469 TLS context.
    .
    .< │ │ │ │ +00185920: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ +00185930: 223e 736f 6170 5f73 736c 5f66 6c61 6773 ">soap_ssl_flags │ │ │ │ +00185940: 2066 6c61 6720 7769 7468 2023 534f 4150 flag with #SOAP │ │ │ │ +00185950: 5f53 534c 5f52 4551 5549 5245 5f53 4552 _SSL_REQUIRE_SER │ │ │ │ +00185960: 5645 525f 4155 5448 454e 5449 4341 5449 VER_AUTHENTICATI │ │ │ │ +00185970: 4f4e 2061 6e64 2023 534f 4150 5f54 4c53 ON and #SOAP_TLS │ │ │ │ +00185980: 7631 2065 6e61 626c 6564 2062 7920 6465 v1 enabled by de │ │ │ │ +00185990: 6661 756c 743c 2f64 6976 3e3c 6469 7620 fault
    Definition: │ │ │ │ +001859c0: 2073 7464 736f 6170 322e 683a 3538 3236 stdsoap2.h:5826 │ │ │ │ +001859d0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .CRYPTO_thr │ │ │ │ +00185a90: 6561 645f 636c 6561 6e75 703c 2f61 3e3c ead_cleanup< │ │ │ │ +00185aa0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    int CRY │ │ │ │ +00185ac0: 5054 4f5f 7468 7265 6164 5f63 6c65 616e PTO_thread_clean │ │ │ │ +00185ad0: 7570 2829 3c2f 6469 763e 3c64 6976 2063 up()
    Cle │ │ │ │ +00185af0: 616e 7570 2066 756e 6374 696f 6e20 666f anup function fo │ │ │ │ +00185b00: 7220 4f70 656e 5353 4c20 7665 7273 696f r OpenSSL versio │ │ │ │ +00185b10: 6e73 2070 7269 6f72 2074 6f20 312e 312e ns prior to 1.1. │ │ │ │ +00185b20: 312e 3c2f 6469 763e 3c2f 6469 763e 0a3c 1.
    .< │ │ │ │ +00185b30: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00185b40: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +00185b50: 705f 5f73 736c 5f68 746d 6c5f 6761 3939 p__ssl_html_ga99 │ │ │ │ +00185b60: 3030 3833 6566 6661 3564 3865 6439 3331 0083effa5d8ed931 │ │ │ │ +00185b70: 6664 3735 6463 3236 3330 6132 6363 223e fd75dc2630a2cc"> │ │ │ │ +00185b80: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    int soap_ss │ │ │ │ +00185c10: 6c5f 6163 6365 7074 2873 7472 7563 7420 l_accept(struct │ │ │ │ +00185c20: 736f 6170 202a 736f 6170 293c 2f64 6976 soap *soap)
    Accept SSL/T │ │ │ │ +00185c50: 4c53 2063 6f6e 6e65 6374 696f 6e2e 3c2f LS connection.
    .
    │ │ │ │ +00185cd0: 3c61 2068 7265 663d 2267 726f 7570 5f5f CRYPTO_threa │ │ │ │ +00185d20: 645f 7365 7475 703c 2f61 3e3c 2f64 6976 d_setup
    int CRYPTO_ │ │ │ │ +00185d50: 7468 7265 6164 5f73 6574 7570 2829 3c2f thread_setup()
    Setup fun │ │ │ │ +00185d80: 6374 696f 6e20 666f 7220 4f70 656e 5353 ction for OpenSS │ │ │ │ +00185d90: 4c20 7665 7273 696f 6e73 2070 7269 6f72 L versions prior │ │ │ │ +00185da0: 2074 6f20 312e 312e 3120 746f 2073 6574 to 1.1.1 to set │ │ │ │ +00185db0: 206c 6f63 6b73 2066 6f72 206d 756c 7469 locks for multi │ │ │ │ +00185dc0: 2d74 6872 6561 6465 6420 5353 4c2f 544c -threaded SSL/TL │ │ │ │ +00185dd0: 5320 6170 706c 6963 6174 696f 2e2e 2e3c S applicatio...< │ │ │ │ +00185de0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    The │ │ │ │ +00185e10: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ssl_serv │ │ │ │ +00185ea0: 6572 5f63 6f6e 7465 7874 3c2f 613e 3c2f er_context function i │ │ │ │ +00185ec0: 6e69 7469 616c 697a 6573 2074 6865 2073 nitializes the s │ │ │ │ +00185ed0: 6572 7665 722d 7369 6465 2053 534c 2063 erver-side SSL c │ │ │ │ +00185ee0: 6f6e 7465 7874 2e20 5468 6520 3c65 6d3e ontext. The │ │ │ │ +00185ef0: 3c63 6f64 653e 7365 7276 6572 2e70 656d server.pem │ │ │ │ +00185f00: 3c2f 636f 6465 3e3c 2f65 6d3e 206b 6579 key │ │ │ │ +00185f10: 2066 696c 6520 6973 2074 6865 2073 6572 file is the ser │ │ │ │ +00185f20: 7665 7227 7320 7072 6976 6174 6520 6b65 ver's private ke │ │ │ │ +00185f30: 7920 636f 6e63 6174 656e 6174 6564 2077 y concatenated w │ │ │ │ +00185f40: 6974 6820 6974 7320 6365 7274 6966 6963 ith its certific │ │ │ │ +00185f50: 6174 652e 2054 6865 203c 656d 3e3c 636f ate. The cacert.pem is use │ │ │ │ +00185f80: 6420 746f 2061 7574 6865 6e74 6963 6174 d to authenticat │ │ │ │ +00185f90: 6520 636c 6965 6e74 7320 616e 6420 636f e clients and co │ │ │ │ +00185fa0: 6e74 6169 6e73 2074 6865 2063 6c69 656e ntains the clien │ │ │ │ +00185fb0: 7420 6365 7274 6966 6963 6174 6573 2e20 t certificates. │ │ │ │ +00185fc0: 416c 7465 726e 6174 6976 656c 7920 6120 Alternatively a │ │ │ │ +00185fd0: 6469 7265 6374 6f72 7920 6e61 6d65 2063 directory name c │ │ │ │ +00185fe0: 616e 2062 6520 7370 6563 6966 6965 642e an be specified. │ │ │ │ +00185ff0: 2054 6869 7320 6469 7265 6374 6f72 7920 This directory │ │ │ │ +00186000: 6973 2061 7373 756d 6564 2074 6f20 636f is assumed to co │ │ │ │ +00186010: 6e74 6169 6e20 7468 6520 6365 7274 6966 ntain the certif │ │ │ │ +00186020: 6963 6174 6573 2e20 5468 6520 3c65 6d3e icates. The │ │ │ │ +00186030: 3c63 6f64 653e 6468 3531 322e 7065 6d3c dh512.pem< │ │ │ │ +00186040: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file │ │ │ │ +00186050: 2073 7065 6369 6669 6573 2074 6861 7420 specifies that │ │ │ │ +00186060: 4448 2077 696c 6c20 6265 2075 7365 6420 DH will be used │ │ │ │ +00186070: 666f 7220 6b65 7920 6167 7265 656d 656e for key agreemen │ │ │ │ +00186080: 7420 696e 7374 6561 6420 6f66 2052 5341 t instead of RSA │ │ │ │ +00186090: 2e20 4120 6e75 6d65 7269 6320 7661 6c75 . A numeric valu │ │ │ │ +001860a0: 6520 6772 6561 7465 7220 7468 616e 2035 e greater than 5 │ │ │ │ +001860b0: 3132 2063 616e 2062 6520 7072 6f76 6964 12 can be provid │ │ │ │ +001860c0: 6564 2069 6e73 7465 6164 2061 7320 6120 ed instead as a │ │ │ │ +001860d0: 7374 7269 6e67 2063 6f6e 7374 616e 7420 string constant │ │ │ │ +001860e0: 2865 2e67 2e20 3c63 6f64 653e 2235 3132 (e.g. "512 │ │ │ │ +001860f0: 223c 2f63 6f64 653e 2920 746f 2061 6c6c ") to all │ │ │ │ +00186100: 6f77 2074 6865 2065 6e67 696e 6520 746f ow the engine to │ │ │ │ +00186110: 2067 656e 6572 6174 6520 7468 6520 4448 generate the DH │ │ │ │ +00186120: 2070 6172 616d 6574 6572 7320 6f6e 2074 parameters on t │ │ │ │ +00186130: 6865 2066 6c79 2028 7468 6973 2063 616e he fly (this can │ │ │ │ +00186140: 2074 616b 6520 6120 7768 696c 6529 2072 take a while) r │ │ │ │ +00186150: 6174 6865 7220 7468 616e 2072 6574 7269 ather than retri │ │ │ │ +00186160: 6576 696e 6720 7468 656d 2066 726f 6d20 eving them from │ │ │ │ +00186170: 6120 6669 6c65 2e20 5468 6520 7261 6e64 a file. The rand │ │ │ │ +00186180: 6669 6c65 2065 6e74 7279 2063 616e 2062 file entry can b │ │ │ │ +00186190: 6520 7573 6564 2074 6f20 7365 6564 2074 e used to seed t │ │ │ │ +001861a0: 6865 2050 524e 472e 2054 6865 206c 6173 he PRNG. The las │ │ │ │ +001861b0: 7420 656e 7472 7920 656e 6162 6c65 2073 t entry enable s │ │ │ │ +001861c0: 6572 7665 722d 7369 6465 2073 6573 7369 erver-side sessi │ │ │ │ +001861d0: 6f6e 2063 6163 6869 6e67 2074 6f20 7370 on caching to sp │ │ │ │ +001861e0: 6565 6420 7570 2054 4c53 2e20 4120 756e eed up TLS. A un │ │ │ │ +001861f0: 6971 7565 2073 6572 7665 7220 6e61 6d65 ique server name │ │ │ │ +00186200: 2069 7320 7265 7175 6972 6564 2e3c 2f70 is required.

    .

    You can spe │ │ │ │ +00186220: 6369 6679 2061 2063 6970 6865 7220 6c69 cify a cipher li │ │ │ │ +00186230: 7374 2074 6f20 7573 6520 7769 7468 2054 st to use with T │ │ │ │ +00186240: 4c53 7631 2e32 2061 6e64 2062 656c 6f77 LSv1.2 and below │ │ │ │ +00186250: 2077 6974 6820 3c63 6f64 653e 5353 4c5f with SSL_ │ │ │ │ +00186260: 4354 585f 7365 745f 6369 7068 6572 5f6c CTX_set_cipher_l │ │ │ │ +00186270: 6973 7428 736f 6170 2d26 6774 3b63 7478 ist(soap->ctx │ │ │ │ +00186280: 2c20 222e 2e2e 2229 3c2f 636f 6465 3e20 , "...") │ │ │ │ +00186290: 7768 6572 6520 3c63 6f64 653e 736f 6170 where soap │ │ │ │ +001862a0: 2d26 6774 3b63 7478 3c2f 636f 6465 3e20 ->ctx │ │ │ │ +001862b0: 6973 2074 6865 2053 534c 2063 6f6e 7465 is the SSL conte │ │ │ │ +001862c0: 7874 2063 7265 6174 6564 2062 7920 3c63 xt created by soap_ssl_ │ │ │ │ +00186360: 7365 7276 6572 5f63 6f6e 7465 7874 2829 server_context() │ │ │ │ +00186370: 3c2f 613e 3c2f 636f 6465 3e2e 204c 696b . Lik │ │ │ │ +00186380: 6577 6973 652c 2075 7365 203c 636f 6465 ewise, use SSL_CTX_set_cip │ │ │ │ +001863a0: 6865 7273 7569 7465 7328 736f 6170 2d26 hersuites(soap-& │ │ │ │ +001863b0: 6774 3b63 7478 2c20 222e 2e2e 2229 3c2f gt;ctx, "...") to configu │ │ │ │ +001863d0: 7265 2074 6865 2061 7661 696c 6162 6c65 re the available │ │ │ │ +001863e0: 2054 4c53 7631 2e33 2063 6970 6865 7273 TLSv1.3 ciphers │ │ │ │ +001863f0: 7569 7465 732e 3c2f 703e 0a3c 703e 5765 uites.

    .

    We │ │ │ │ +00186400: 2072 6566 6572 2074 6f20 7468 6520 4f70 refer to the Op │ │ │ │ +00186410: 656e 5353 4c20 646f 6375 6d65 6e74 6174 enSSL documentat │ │ │ │ +00186420: 696f 6e20 616e 6420 6d61 6e75 616c 2070 ion and manual p │ │ │ │ +00186430: 6167 6573 206f 6620 3c63 6f64 653e 5353 ages of SS │ │ │ │ +00186440: 4c5f 4354 585f 7365 745f 6369 7068 6572 L_CTX_set_cipher │ │ │ │ +00186450: 5f6c 6973 743c 2f63 6f64 653e 2061 6e64 _list and │ │ │ │ +00186460: 203c 636f 6465 3e53 534c 5f43 5458 5f73 SSL_CTX_s │ │ │ │ +00186470: 6574 5f63 6970 6865 7273 7569 7465 733c et_ciphersuites< │ │ │ │ +00186480: 2f63 6f64 653e 2066 6f72 2064 6574 6169 /code> for detai │ │ │ │ +00186490: 6c73 206f 6e20 7468 6520 6c61 7465 7374 ls on the latest │ │ │ │ +001864a0: 2063 6970 6865 7220 6c69 7374 7320 616e cipher lists an │ │ │ │ +001864b0: 6420 7375 6974 6573 2061 7661 696c 6162 d suites availab │ │ │ │ +001864c0: 6c65 2074 6f20 7573 652e 3c2f 703e 0a3c le to use.

    .< │ │ │ │ +001864d0: 703e 5468 6520 474e 5554 4c53 206d 7574 p>The GNUTLS mut │ │ │ │ +001864e0: 6578 206c 6f63 6b20 7365 7475 7020 6973 ex lock setup is │ │ │ │ +001864f0: 2061 7574 6f6d 6174 6963 616c 6c79 2070 automatically p │ │ │ │ +00186500: 6572 666f 726d 6564 2069 6e20 7468 6520 erformed in the │ │ │ │ +00186510: 656e 6769 6e65 2c20 6275 7420 6f6e 6c79 engine, but only │ │ │ │ +00186520: 2077 6865 6e20 504f 5349 5820 7468 7265 when POSIX thre │ │ │ │ +00186530: 6164 7320 6172 6520 6465 7465 6374 6564 ads are detected │ │ │ │ +00186540: 2061 6e64 2061 7661 696c 6162 6c65 2e3c and available.< │ │ │ │ +00186550: 2f70 3e0a 3c70 3e41 6c6c 204f 7065 6e53 /p>.

    All OpenS │ │ │ │ +00186560: 534c 2076 6572 7369 6f6e 7320 7072 696f SL versions prio │ │ │ │ +00186570: 7220 746f 2031 2e31 2e30 2072 6571 7569 r to 1.1.0 requi │ │ │ │ +00186580: 7265 206d 7574 6578 206c 6f63 6b73 2074 re mutex locks t │ │ │ │ +00186590: 6f20 6265 2065 7870 6c69 6369 746c 7920 o be explicitly │ │ │ │ +001865a0: 7365 7420 7570 2069 6e20 796f 7572 2063 set up in your c │ │ │ │ +001865b0: 6f64 6520 666f 7220 6d75 6c74 692d 7468 ode for multi-th │ │ │ │ +001865c0: 7265 6164 6564 2061 7070 6c69 6361 7469 readed applicati │ │ │ │ +001865d0: 6f6e 7320 6279 2063 616c 6c69 6e67 203c ons by calling < │ │ │ │ +001865e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>CRYPTO_thre │ │ │ │ +001866b0: 6164 5f73 6574 7570 2829 3c2f 613e 3c2f ad_setup() and │ │ │ │ +001866d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 CRY │ │ │ │ +00186760: 5054 4f5f 7468 7265 6164 5f63 6c65 616e PTO_thread_clean │ │ │ │ +00186770: 7570 2829 3c2f 613e 3c2f 636f 6465 3e20 up() │ │ │ │ +00186780: 6173 2077 6173 2073 686f 776e 2069 6e20 as was shown in │ │ │ │ +00186790: 7468 6520 636f 6465 2061 626f 7665 2e20 the code above. │ │ │ │ +001867a0: 4f70 656e 5353 4c20 312e 312e 3020 616e OpenSSL 1.1.0 an │ │ │ │ +001867b0: 6420 6772 6561 7465 7220 646f 6573 206e d greater does n │ │ │ │ +001867c0: 6f74 2072 6571 7569 7265 2074 6865 7365 ot require these │ │ │ │ +001867d0: 206c 6f63 6b73 2074 6f20 6265 2073 6574 locks to be set │ │ │ │ +001867e0: 2075 702e 2049 6620 796f 7520 6172 6520 up. If you are │ │ │ │ +001867f0: 6e6f 7420 7375 7265 2077 6869 6368 2076 not sure which v │ │ │ │ +00186800: 6572 7369 6f6e 206f 6620 4f70 656e 5353 ersion of OpenSS │ │ │ │ +00186810: 4c20 796f 7520 6d61 7920 6265 2075 7369 L you may be usi │ │ │ │ +00186820: 6e67 2077 6974 6820 796f 7572 206d 756c ng with your mul │ │ │ │ +00186830: 7469 2d74 6872 6561 6465 6420 6170 706c ti-threaded appl │ │ │ │ +00186840: 6963 6174 696f 6e2c 2074 6865 6e20 7365 ication, then se │ │ │ │ +00186850: 7420 7570 2074 6865 206c 6f63 6b73 2e3c t up the locks.< │ │ │ │ +00186860: 2f70 3e0a 3c70 3e46 6f72 2055 6e69 7820 /p>.

    For Unix │ │ │ │ +00186870: 616e 6420 4c69 6e75 782c 206d 616b 6520 and Linux, make │ │ │ │ +00186880: 7375 7265 2079 6f75 2068 6176 6520 7369 sure you have si │ │ │ │ +00186890: 676e 616c 2068 616e 646c 6572 7320 7365 gnal handlers se │ │ │ │ +001868a0: 7420 696e 2079 6f75 7220 7365 7276 6963 t in your servic │ │ │ │ +001868b0: 6520 616e 642f 6f72 2063 6c69 656e 7420 e and/or client │ │ │ │ +001868c0: 6170 706c 6963 6174 696f 6e73 2074 6f20 applications to │ │ │ │ +001868d0: 6361 7463 6820 6272 6f6b 656e 2063 6f6e catch broken con │ │ │ │ +001868e0: 6e65 6374 696f 6e73 2028 3c63 6f64 653e nections ( │ │ │ │ +001868f0: 5349 4750 4950 453c 2f63 6f64 653e 293a SIGPIPE): │ │ │ │ +00186900: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    sig │ │ │ │ +00186930: 6e61 6c28 5349 4750 4950 452c 2073 6967 nal(SIGPIPE, sig │ │ │ │ +00186940: 7069 7065 5f68 616e 646c 6529 3b3c 2f64 pipe_handle);.

    wh │ │ │ │ +00186970: 6572 652c 2066 6f72 2065 7861 6d70 6c65 ere, for example │ │ │ │ +00186980: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void sigpipe_hand │ │ │ │ +001869e0: 6c65 283c 7370 616e 2063 6c61 7373 3d22 le(int │ │ │ │ +00186a00: 3c2f 7370 616e 3e20 7829 207b 207d 3c2f x) { }.

    B │ │ │ │ +00186a30: 7920 6465 6661 756c 742c 2063 6c69 656e y default, clien │ │ │ │ +00186a40: 7473 2061 7265 206e 6f74 2072 6571 7569 ts are not requi │ │ │ │ +00186a50: 7265 6420 746f 2061 7574 6865 6e74 6963 red to authentic │ │ │ │ +00186a60: 6174 652e 2054 6f20 7265 7175 6972 6520 ate. To require │ │ │ │ +00186a70: 636c 6965 6e74 2061 7574 6865 6e74 6963 client authentic │ │ │ │ +00186a80: 6174 696f 6e20 7573 6520 7468 6520 666f ation use the fo │ │ │ │ +00186a90: 6c6c 6f77 696e 673a 3c2f 703e 0a3c 6469 llowing:

    .
    i │ │ │ │ +00186ae0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap_ │ │ │ │ +00186b40: 7373 6c5f 7365 7276 6572 5f63 6f6e 7465 ssl_server_conte │ │ │ │ +00186b50: 7874 3c2f 613e 2826 616d 703b 3c61 2063 xt(&soap, .. │ │ │ │ +00186c40: 2020 2020 3c73 7061 6e20 636c 6173 733d │ │ │ │ +00186c60: 2671 756f 743b 7365 7276 6572 2e70 656d "server.pem │ │ │ │ +00186c70: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", < │ │ │ │ +00186c80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    "pa │ │ │ │ +00186cc0: 7373 776f 7264 2671 756f 743b 3c2f 7370 ssword",
    .
    │ │ │ │ +00186cf0: 2020 3c73 7061 6e20 636c 6173 733d 2273 &q │ │ │ │ +00186d10: 756f 743b 6361 6365 7274 2e70 656d 2671 uot;cacert.pem&q │ │ │ │ +00186d20: 756f 743b 3c2f 7370 616e 3e2c 203c 2f64 uot;, .
    NULL, │ │ │ │ +00186d50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    "d │ │ │ │ +00186d90: 6835 3132 2e70 656d 2671 756f 743b 3c2f h512.pem",
    . │ │ │ │ +00186dc0: 2020 2020 4e55 4c4c 2c20 3c2f 6469 763e NULL,
    │ │ │ │ +00186dd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL)) .
    {
    .< │ │ │ │ 00186e10: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00186e20: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    ..
    e │ │ │ │ -00186f00: 7869 7428 4558 4954 5f46 4149 4c55 5245 xit(EXIT_FAILURE │ │ │ │ -00186f10: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    }.
    #define SOAP_SS │ │ │ │ -00187030: 4c5f 5245 5155 4952 455f 434c 4945 4e54 L_REQUIRE_CLIENT │ │ │ │ -00187040: 5f41 5554 4845 4e54 4943 4154 494f 4e3c _AUTHENTICATION< │ │ │ │ -00187050: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_ssl │ │ │ │ -00187070: 5f66 6c61 6773 2066 6c61 6720 666f 7220 _flags flag for │ │ │ │ -00187080: 7365 7276 6572 7320 746f 2072 6571 7569 servers to requi │ │ │ │ -00187090: 7265 2063 6c69 656e 7473 2074 6f20 6175 re clients to au │ │ │ │ -001870a0: 7468 656e 7469 6361 7465 2074 6f20 7365 thenticate to se │ │ │ │ -001870b0: 7276 6572 7320 6475 7269 6e67 2074 6865 rvers during the │ │ │ │ -001870c0: 2048 5454 5053 2068 616e 6473 682e 2e2e HTTPS handsh... │ │ │ │ -001870d0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -001870f0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -00187100: 6f61 7032 2e68 3a35 3835 343c 2f64 6976 oap2.h:5854
    .
    < │ │ │ │ -00187130: 703e 5468 6973 2072 6571 7569 7265 7320 p>This requires │ │ │ │ -00187140: 6561 6368 2063 6c69 656e 7420 746f 2061 each client to a │ │ │ │ -00187150: 7574 6865 6e74 6963 6174 6520 7769 7468 uthenticate with │ │ │ │ -00187160: 2069 7473 2063 6572 7469 6669 6361 7465 its certificate │ │ │ │ -00187170: 2c20 696e 2061 6464 6974 696f 6e20 666f , in addition fo │ │ │ │ -00187180: 7220 7468 6520 7365 7276 6572 2074 6f20 r the server to │ │ │ │ -00187190: 6175 7468 656e 7469 6361 7465 2074 6f20 authenticate to │ │ │ │ -001871a0: 7468 6520 636c 6965 6e74 2e3c 2f70 3e0a the client.

    . │ │ │ │ -001871b0: 3c70 3e53 696e 6365 2072 656c 6561 7365

    Since release │ │ │ │ -001871c0: 2076 6572 7369 6f6e 2032 2e38 2e32 302c version 2.8.20, │ │ │ │ -001871d0: 2053 534c 2076 3320 6973 2064 6973 6162 SSL v3 is disab │ │ │ │ -001871e0: 6c65 642e 2054 6f20 656e 6162 6c65 2053 led. To enable S │ │ │ │ -001871f0: 534c 2076 3320 746f 6765 7468 6572 2077 SL v3 together w │ │ │ │ -00187200: 6974 6820 544c 5320 312e 3020 616e 6420 ith TLS 1.0 and │ │ │ │ -00187210: 6869 6768 6572 2c20 7573 6520 3c63 6f64 higher, use #SOAP_SSLv3_TL │ │ │ │ -00187230: 5376 313c 2f63 6f64 653e 2077 6974 6820 Sv1 with │ │ │ │ -00187240: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_ss │ │ │ │ -001872d0: 6c5f 7365 7276 6572 5f63 6f6e 7465 7874 l_server_context │ │ │ │ -001872e0: 3c2f 613e 3c2f 636f 6465 3e2e 2054 6f20 . To │ │ │ │ -001872f0: 7573 6520 544c 5320 312e 3120 616e 6420 use TLS 1.1 and │ │ │ │ -00187300: 312e 3220 7573 6520 3c63 6f64 653e 534f 1.2 use SO │ │ │ │ -00187310: 4150 5f54 4c53 7631 5f31 207c 2053 4f41 AP_TLSv1_1 | SOA │ │ │ │ -00187320: 505f 544c 5376 315f 323c 2f63 6f64 653e P_TLSv1_2 │ │ │ │ -00187330: 2e20 546f 2075 7365 2054 4c53 2031 2e32 . To use TLS 1.2 │ │ │ │ -00187340: 206f 6e6c 7920 7573 6520 3c63 6f64 653e only use │ │ │ │ -00187350: 2353 4f41 505f 544c 5376 315f 323c 2f63 #SOAP_TLSv1_2. To use SSL │ │ │ │ -00187370: 2076 3320 6f6e 6c79 2075 7365 203c 636f v3 only use #SOAP_SSLv3.

    .

    Th │ │ │ │ -001873a0: 6520 3c63 6f64 653e 6361 6365 7274 3c2f e cacert file and < │ │ │ │ -001873c0: 636f 6465 3e63 6170 6174 683c 2f63 6f64 code>capath are optional. │ │ │ │ -001873e0: 2045 6974 6865 7220 6f6e 6520 6361 6e20 Either one can │ │ │ │ -001873f0: 6265 2073 7065 6369 6669 6564 2077 6865 be specified whe │ │ │ │ -00187400: 6e20 636c 6965 6e74 7320 6d75 7374 2072 n clients must r │ │ │ │ -00187410: 756e 206f 6e20 6e6f 6e2d 7472 7573 7465 un on non-truste │ │ │ │ -00187420: 6420 7379 7374 656d 7320 283c 636f 6465 d systems (capath i │ │ │ │ -00187440: 7320 6e6f 7420 7573 6564 2077 6974 6820 s not used with │ │ │ │ -00187450: 474e 5554 4c53 292e 2057 6520 7761 6e74 GNUTLS). We want │ │ │ │ -00187460: 2074 6f20 6176 6f69 6420 7374 6f72 696e to avoid storin │ │ │ │ -00187470: 6720 7472 7573 7465 6420 6365 7274 6966 g trusted certif │ │ │ │ -00187480: 6963 6174 6573 2069 6e20 7468 6520 6465 icates in the de │ │ │ │ -00187490: 6661 756c 7420 6c6f 6361 7469 6f6e 206f fault location o │ │ │ │ -001874a0: 6e20 7468 6520 6669 6c65 2073 7973 7465 n the file syste │ │ │ │ -001874b0: 6d20 7768 656e 2074 6861 7420 6973 206e m when that is n │ │ │ │ -001874c0: 6f74 2073 6563 7572 652e 2054 6865 7265 ot secure. There │ │ │ │ -001874d0: 666f 7265 2c20 6120 666c 6174 203c 656d fore, a flat cacert.pe │ │ │ │ -001874f0: 6d3c 2f63 6f64 653e 3c2f 656d 3e20 6669 m fi │ │ │ │ -00187500: 6c65 206f 7220 6469 7265 6374 6f72 7920 le or directory │ │ │ │ -00187510: 6361 6e20 6265 2073 7065 6369 6669 6564 can be specified │ │ │ │ -00187520: 2074 6f20 7374 6f72 6520 7472 7573 7465 to store truste │ │ │ │ -00187530: 6420 6365 7274 6966 6963 6174 6573 2e3c d certificates.< │ │ │ │ -00187540: 2f70 3e0a 3c70 3e54 6865 2067 534f 4150 /p>.

    The gSOAP │ │ │ │ -00187550: 2070 6163 6b61 6765 2069 6e63 6c75 6465 package include │ │ │ │ -00187560: 7320 6120 3c65 6d3e 3c63 6f64 653e 6361 s a ca │ │ │ │ -00187570: 6365 7274 732e 7065 6d3c 2f63 6f64 653e certs.pem │ │ │ │ -00187580: 3c2f 656d 3e20 6669 6c65 2077 6974 6820 file with │ │ │ │ -00187590: 7468 6520 6365 7274 6966 6963 6174 6573 the certificates │ │ │ │ -001875a0: 206f 6620 616c 6c20 6365 7274 6966 6963 of all certific │ │ │ │ -001875b0: 6174 6520 6175 7468 6f72 6974 6965 732e ate authorities. │ │ │ │ -001875c0: 2059 6f75 2063 616e 2075 7365 2074 6869 You can use thi │ │ │ │ -001875d0: 7320 6669 6c65 2074 6f20 7665 7269 6679 s file to verify │ │ │ │ -001875e0: 2074 6865 2061 7574 6865 6e74 6963 6174 the authenticat │ │ │ │ -001875f0: 696f 6e20 6f66 2073 6572 7665 7273 2074 ion of servers t │ │ │ │ -00187600: 6861 7420 7072 6f76 6964 6520 6365 7274 hat provide cert │ │ │ │ -00187610: 6966 6963 6174 6573 2069 7373 7565 6420 ificates issued │ │ │ │ -00187620: 6279 2074 6865 7365 2043 4173 2e3c 2f70 by these CAs.

    .

    The cacert.pem, < │ │ │ │ -00187660: 636f 6465 3e63 6c69 656e 742e 7065 6d3c code>client.pem< │ │ │ │ -00187670: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>, and │ │ │ │ -00187680: 203c 656d 3e3c 636f 6465 3e73 6572 7665 serve │ │ │ │ -00187690: 722e 7065 6d3c 2f63 6f64 653e 3c2f 656d r.pem files in the g │ │ │ │ -001876b0: 534f 4150 2070 6163 6b61 6765 2061 7265 SOAP package are │ │ │ │ -001876c0: 2065 7861 6d70 6c65 7320 6f66 2073 656c examples of sel │ │ │ │ -001876d0: 662d 7369 676e 6564 2063 6572 7469 6669 f-signed certifi │ │ │ │ -001876e0: 6361 7465 732e 2054 6865 203c 656d 3e3c cates. The < │ │ │ │ -001876f0: 636f 6465 3e63 6c69 656e 742e 7065 6d3c code>client.pem< │ │ │ │ -00187700: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ -00187710: 3c65 6d3e 3c63 6f64 653e 7365 7276 6572 server │ │ │ │ -00187720: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem │ │ │ │ -00187730: 2063 6f6e 7461 696e 2074 6865 2063 6c69 contain the cli │ │ │ │ -00187740: 656e 742f 7365 7276 6572 2070 7269 7661 ent/server priva │ │ │ │ -00187750: 7465 206b 6579 2063 6f6e 6361 7465 6e61 te key concatena │ │ │ │ -00187760: 7465 6420 7769 7468 2074 6865 2063 6572 ted with the cer │ │ │ │ -00187770: 7469 6669 6361 7465 2e20 5468 6520 6b65 tificate. The ke │ │ │ │ -00187780: 7966 696c 6573 2028 3c65 6d3e 3c63 6f64 yfiles (client.pem and server.pe │ │ │ │ -001877c0: 6d3c 2f63 6f64 653e 3c2f 656d 3e29 2061 m) a │ │ │ │ -001877d0: 7265 2063 7265 6174 6564 2062 7920 636f re created by co │ │ │ │ -001877e0: 6e63 6174 656e 6174 696e 6720 7468 6520 ncatenating the │ │ │ │ -001877f0: 7072 6976 6174 6520 6b65 7920 5045 4d20 private key PEM │ │ │ │ -00187800: 7769 7468 2074 6865 2063 6572 7469 6669 with the certifi │ │ │ │ -00187810: 6361 7465 2050 454d 2e20 5468 6520 6b65 cate PEM. The ke │ │ │ │ -00187820: 7966 696c 6520 7368 6f75 6c64 206e 6f74 yfile should not │ │ │ │ -00187830: 2062 6520 7368 6172 6564 2077 6974 6820 be shared with │ │ │ │ -00187840: 616e 7920 7061 7274 792e 2057 6974 6820 any party. With │ │ │ │ -00187850: 4f70 656e 5353 4c2c 2079 6f75 2063 616e OpenSSL, you can │ │ │ │ -00187860: 2065 6e63 7279 7074 2074 6865 206b 6579 encrypt the key │ │ │ │ -00187870: 6669 6c65 7320 7769 7468 2061 2070 6173 files with a pas │ │ │ │ -00187880: 7377 6f72 6420 746f 206f 6666 6572 2073 sword to offer s │ │ │ │ -00187890: 6f6d 6520 7072 6f74 6563 7469 6f6e 2061 ome protection a │ │ │ │ -001878a0: 6e64 2074 6865 2070 6173 7377 6f72 6420 nd the password │ │ │ │ -001878b0: 6973 2075 7365 6420 696e 2074 6865 2063 is used in the c │ │ │ │ -001878c0: 6c69 656e 742f 7365 7276 6572 2063 6f64 lient/server cod │ │ │ │ -001878d0: 6520 746f 2072 6561 6420 7468 6520 6b65 e to read the ke │ │ │ │ -001878e0: 7966 696c 652e 2047 4e55 544c 5320 646f yfile. GNUTLS do │ │ │ │ -001878f0: 6573 206e 6f74 2073 7570 706f 7274 2074 es not support t │ │ │ │ -00187900: 6869 7320 6665 6174 7572 6520 616e 6420 his feature and │ │ │ │ -00187910: 6361 6e6e 6f74 2065 6e63 7279 7074 206f cannot encrypt o │ │ │ │ -00187920: 7220 6465 6372 7970 7420 6120 6b65 7966 r decrypt a keyf │ │ │ │ -00187930: 696c 652e 3c2f 703e 0a3c 646c 2063 6c61 ile.

    .
    Warning │ │ │ │ -00187960: 3c2f 6474 3e3c 6464 3e49 7420 6973 2069
    It is i │ │ │ │ -00187970: 6d70 6f72 7461 6e74 2074 6861 7420 7468 mportant that th │ │ │ │ -00187980: 6520 3c63 6f64 653e 2357 4954 485f 4f50 e #WITH_OP │ │ │ │ -00187990: 454e 5353 4c3c 2f63 6f64 653e 206d 6163 ENSSL mac │ │ │ │ -001879a0: 726f 206d 7573 7420 6265 2063 6f6e 7369 ro must be consi │ │ │ │ -001879b0: 7374 656e 746c 7920 6465 6669 6e65 6420 stently defined │ │ │ │ -001879c0: 746f 2063 6f6d 7069 6c65 2074 6865 2073 to compile the s │ │ │ │ -001879d0: 6f75 7263 6573 2c20 7375 6368 2061 7320 ources, such as │ │ │ │ -001879e0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ -001879f0: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp, soapC.cpp, < │ │ │ │ -00187a30: 636f 6465 3e73 6f61 7043 6c69 656e 742e code>soapClient. │ │ │ │ -00187a40: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp, │ │ │ │ -00187a50: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS │ │ │ │ -00187a60: 6572 7665 722e 6370 703c 2f63 6f64 653e erver.cpp │ │ │ │ -00187a70: 3c2f 656d 3e2c 2061 6e64 2061 6c6c 2061 , and all a │ │ │ │ -00187a80: 7070 6c69 6361 7469 6f6e 2073 6f75 7263 pplication sourc │ │ │ │ -00187a90: 6573 2074 6861 7420 696e 636c 7564 6520 es that include │ │ │ │ -00187aa0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ -00187ab0: 7374 6473 6f61 7032 2e68 3c2f 636f 6465 stdsoap2.h or soapH.h. If the │ │ │ │ -00187af0: 6d61 6372 6f73 2061 7265 206e 6f74 2063 macros are not c │ │ │ │ -00187b00: 6f6e 7369 7374 656e 746c 7920 7573 6564 onsistently used │ │ │ │ -00187b10: 2c20 7468 6520 6170 706c 6963 6174 696f , the applicatio │ │ │ │ -00187b20: 6e20 7769 6c6c 2063 7261 7368 2064 7565 n will crash due │ │ │ │ -00187b30: 2074 6f20 6120 6d69 736d 6174 6368 6573 to a mismatches │ │ │ │ -00187b40: 2069 6e20 7468 6520 6465 636c 6172 6174 in the declarat │ │ │ │ -00187b50: 696f 6e20 616e 6420 6163 6365 7373 206f ion and access o │ │ │ │ -00187b60: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap │ │ │ │ -00187bc0: 3c2f 636f 6465 3e20 636f 6e74 6578 742e context. │ │ │ │ -00187bd0: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e 5365
    .

    Se │ │ │ │ -00187be0: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum │ │ │ │ -00187bf0: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module │ │ │ │ -00187c00: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SSL/ │ │ │ │ -00187c30: 544c 5320 636f 6e74 6578 7420 616e 6420 TLS context and │ │ │ │ -00187c40: 6675 6e63 7469 6f6e 733c 2f61 3e20 666f functions fo │ │ │ │ -00187c50: 7220 6d6f 7265 2064 6574 6169 6c73 206f r more details o │ │ │ │ -00187c60: 6e20 7468 6520 5353 4c2f 544c 5320 6675 n the SSL/TLS fu │ │ │ │ -00187c70: 6e63 7469 6f6e 732e 3c2f 703e 0a3c 703e nctions.

    .

    │ │ │ │ -00187c80: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -00187ca0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    │ │ │ │ -00187ce0: 0a53 6563 7572 6520 636c 6965 6e74 7320 .Secure clients │ │ │ │ -00187cf0: 7769 7468 2048 5454 5053 3c2f 6832 3e0a with HTTPS

    . │ │ │ │ -00187d00: 3c70 3e54 6f20 7574 696c 697a 6520 4854

    To utilize HT │ │ │ │ -00187d10: 5450 532f 5353 4c2c 2079 6f75 206e 6565 TPS/SSL, you nee │ │ │ │ -00187d20: 6420 746f 2069 6e73 7461 6c6c 2074 6865 d to install the │ │ │ │ -00187d30: 204f 7065 6e53 534c 206c 6962 7261 7279 OpenSSL library │ │ │ │ -00187d40: 206f 6e20 796f 7572 2070 6c61 7466 6f72 on your platfor │ │ │ │ -00187d50: 6d20 6f72 2047 4e55 544c 5320 666f 7220 m or GNUTLS for │ │ │ │ -00187d60: 6120 6c69 6768 742d 7765 6967 6874 2053 a light-weight S │ │ │ │ -00187d70: 534c 2f54 4c53 206c 6962 7261 7279 2e20 SL/TLS library. │ │ │ │ -00187d80: 4166 7465 7220 696e 7374 616c 6c61 7469 After installati │ │ │ │ -00187d90: 6f6e 2c20 636f 6d70 696c 6520 616c 6c20 on, compile all │ │ │ │ -00187da0: 7468 6520 736f 7572 6365 7320 6f66 2079 the sources of y │ │ │ │ -00187db0: 6f75 7220 6170 706c 6963 6174 696f 6e20 our application │ │ │ │ -00187dc0: 7769 7468 2063 6f6d 7069 6c65 2d74 696d with compile-tim │ │ │ │ -00187dd0: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI │ │ │ │ -00187de0: 5448 5f4f 5045 4e53 534c 3c2f 636f 6465 TH_OPENSSL (or #WIT │ │ │ │ -00187e00: 485f 474e 5554 4c53 3c2f 636f 6465 3e20 H_GNUTLS │ │ │ │ -00187e10: 7768 656e 2075 7369 6e67 2047 4e55 544c when using GNUTL │ │ │ │ -00187e20: 5329 2e20 466f 7220 6578 616d 706c 6520 S). For example │ │ │ │ -00187e30: 6f6e 204c 696e 7578 3a20 3c2f 703e 3c70 on Linux:

    c++ -DWITH_ │ │ │ │ -00187e60: 4f50 454e 5353 4c20 6d79 636c 6965 6e74 OPENSSL myclient │ │ │ │ -00187e70: 2e63 7070 2073 7464 736f 6170 2e63 7070 .cpp stdsoap.cpp │ │ │ │ -00187e80: 2073 6f61 7043 2e63 7070 2073 6f61 7043 soapC.cpp soapC │ │ │ │ -00187e90: 6c69 656e 742e 6370 7020 2d6c 7373 6c20 lient.cpp -lssl │ │ │ │ -00187ea0: 2d6c 6372 7970 746f 0a3c 2f70 7265 3e3c -lcrypto.< │ │ │ │ -00187eb0: 703e 206f 7220 556e 6978 3a20 3c2f 703e p> or Unix:

    │ │ │ │ -00187ec0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     c++ -DWIT
    │ │ │ │ -00187ee0: 485f 4f50 454e 5353 4c20 6d79 636c 6965  H_OPENSSL myclie
    │ │ │ │ -00187ef0: 6e74 2e63 7070 2073 7464 736f 6170 2e63  nt.cpp stdsoap.c
    │ │ │ │ -00187f00: 7070 2073 6f61 7043 2e63 7070 2073 6f61  pp soapC.cpp soa
    │ │ │ │ -00187f10: 7043 6c69 656e 742e 6370 7020 2d6c 786e  pClient.cpp -lxn
    │ │ │ │ -00187f20: 6574 202d 6c73 6f63 6b65 7420 2d6c 6e73  et -lsocket -lns
    │ │ │ │ -00187f30: 6c20 2d6c 7373 6c20 2d6c 6372 7970 746f  l -lssl -lcrypto
    │ │ │ │ -00187f40: 0a3c 2f70 7265 3e3c 703e 206f 7220 796f  .

    or yo │ │ │ │ -00187f50: 7520 6361 6e20 6164 6420 7468 6520 666f u can add the fo │ │ │ │ -00187f60: 6c6c 6f77 696e 6720 6c69 6e65 2074 6f20 llowing line to │ │ │ │ -00187f70: 3c65 6d3e 3c63 6f64 653e 736f 6170 6465 soapde │ │ │ │ -00187f80: 6673 2e68 3c2f 636f 6465 3e3c 2f65 6d3e fs.h │ │ │ │ -00187f90: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #define │ │ │ │ -00187fe0: 2057 4954 485f 4f50 454e 5353 4c3c 2f73 WITH_OPENSSL
    .

    B │ │ │ │ -00188ea0: 7920 6465 6661 756c 742c 2073 6572 7665 y default, serve │ │ │ │ -00188eb0: 7220 6175 7468 656e 7469 6361 7469 6f6e r authentication │ │ │ │ -00188ec0: 2069 7320 656e 6162 6c65 6420 616e 6420 is enabled and │ │ │ │ -00188ed0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6361 the ca │ │ │ │ -00188ee0: 6365 7274 732e 7065 6d3c 2f63 6f64 653e certs.pem │ │ │ │ -00188ef0: 3c2f 656d 3e20 6f72 203c 636f 6465 3e63 or c │ │ │ │ -00188f00: 6170 6174 683c 2f63 6f64 653e 2028 6e6f apath (no │ │ │ │ -00188f10: 7420 7573 6564 2077 6974 6820 474e 5554 t used with GNUT │ │ │ │ -00188f20: 4c53 2920 6d75 7374 2062 6520 7365 7420 LS) must be set │ │ │ │ -00188f30: 736f 2074 6861 7420 7468 6520 4341 2063 so that the CA c │ │ │ │ -00188f40: 6572 7469 6669 6361 7465 7320 6f66 2074 ertificates of t │ │ │ │ -00188f50: 6865 2073 6572 7665 7228 7329 2061 7265 he server(s) are │ │ │ │ -00188f60: 2061 6363 6573 7369 626c 6520 6174 2072 accessible at r │ │ │ │ -00188f70: 756e 2074 696d 652e 2054 6865 203c 656d un time. The cacerts.p │ │ │ │ -00188f90: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2066 em f │ │ │ │ -00188fa0: 696c 6520 696e 636c 7564 6564 2069 6e20 ile included in │ │ │ │ -00188fb0: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source │ │ │ │ -00188fc0: 2063 6f64 6520 7061 636b 6167 6520 636f code package co │ │ │ │ -00188fd0: 6e74 6169 6e73 2074 6865 2063 6572 7469 ntains the certi │ │ │ │ -00188fe0: 6669 6361 7465 7320 6f66 2063 6f6d 6d6f ficates of commo │ │ │ │ -00188ff0: 6e20 4341 732e 2054 6869 7320 6669 6c65 n CAs. This file │ │ │ │ -00189000: 206d 7573 7420 6265 2073 7570 706c 6965 must be supplie │ │ │ │ -00189010: 6420 7769 7468 2074 6865 2063 6c69 656e d with the clien │ │ │ │ -00189020: 742c 2069 6620 7365 7276 6572 2061 7574 t, if server aut │ │ │ │ -00189030: 6865 6e74 6963 6174 696f 6e20 6973 2072 hentication is r │ │ │ │ -00189040: 6571 7569 7265 642e 2041 6c74 6572 6e61 equired. Alterna │ │ │ │ -00189050: 7469 7665 6c79 2c20 796f 7520 6361 6e20 tively, you can │ │ │ │ -00189060: 7573 6520 7468 6520 3c65 6d3e 3c63 6f64 use the gsoap/plugin/c │ │ │ │ -00189080: 6163 6572 7473 2e68 3c2f 636f 6465 3e3c acerts.h< │ │ │ │ -00189090: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and gsoap/plugin/ │ │ │ │ -001890b0: 6361 6365 7274 732e 633c 2f63 6f64 653e cacerts.c │ │ │ │ -001890c0: 3c2f 656d 3e20 636f 6465 2074 6f20 656d code to em │ │ │ │ -001890d0: 6265 6420 4341 2063 6572 7469 6669 6361 bed CA certifica │ │ │ │ -001890e0: 7465 7320 696e 2079 6f75 7220 636c 6965 tes in your clie │ │ │ │ -001890f0: 6e74 2063 6f64 652e 3c2f 703e 0a3c 703e nt code.

    .

    │ │ │ │ -00189100: 596f 7520 6361 6e20 7370 6563 6966 7920 You can specify │ │ │ │ -00189110: 6120 6369 7068 6572 206c 6973 7420 746f a cipher list to │ │ │ │ -00189120: 2075 7365 2077 6974 6820 544c 5376 312e use with TLSv1. │ │ │ │ -00189130: 3220 616e 6420 6265 6c6f 7720 7769 7468 2 and below with │ │ │ │ -00189140: 203c 636f 6465 3e53 534c 5f43 5458 5f73 SSL_CTX_s │ │ │ │ -00189150: 6574 5f63 6970 6865 725f 6c69 7374 2873 et_cipher_list(s │ │ │ │ -00189160: 6f61 702d 2667 743b 6374 782c 2022 2e2e oap->ctx, ".. │ │ │ │ -00189170: 2e22 293c 2f63 6f64 653e 2077 6865 7265 .") where │ │ │ │ -00189180: 203c 636f 6465 3e73 6f61 702d 2667 743b soap-> │ │ │ │ -00189190: 6374 783c 2f63 6f64 653e 2069 7320 7468 ctx is th │ │ │ │ -001891a0: 6520 5353 4c20 636f 6e74 6578 7420 6372 e SSL context cr │ │ │ │ -001891b0: 6561 7465 6420 6279 203c 636f 6465 3e3c eated by < │ │ │ │ -001891c0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001891d0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -001891e0: 5f73 736c 2e68 746d 6c23 6761 3236 3963 _ssl.html#ga269c │ │ │ │ -001891f0: 3737 3332 6231 6364 6139 6463 3739 6462 7732b1cda9dc79db │ │ │ │ -00189200: 3038 6663 6266 3164 3534 3338 2220 7469 08fcbf1d5438" ti │ │ │ │ -00189210: 746c 653d 2249 6e69 7469 616c 697a 6520 tle="Initialize │ │ │ │ -00189220: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side │ │ │ │ -00189230: 5353 4c2f 544c 5320 636f 6e74 6578 742e SSL/TLS context. │ │ │ │ -00189240: 223e 736f 6170 5f73 736c 5f63 6c69 656e ">soap_ssl_clien │ │ │ │ -00189250: 745f 636f 6e74 6578 7428 293c 2f61 3e3c t_context()< │ │ │ │ -00189260: 2f63 6f64 653e 2e20 4c69 6b65 7769 7365 /code>. Likewise │ │ │ │ -00189270: 2c20 7573 6520 3c63 6f64 653e 5353 4c5f , use SSL_ │ │ │ │ -00189280: 4354 585f 7365 745f 6369 7068 6572 7375 CTX_set_ciphersu │ │ │ │ -00189290: 6974 6573 2873 6f61 702d 2667 743b 6374 ites(soap->ct │ │ │ │ -001892a0: 782c 2022 2e2e 2e22 293c 2f63 6f64 653e x, "...") │ │ │ │ -001892b0: 2074 6f20 636f 6e66 6967 7572 6520 7468 to configure th │ │ │ │ -001892c0: 6520 6176 6169 6c61 626c 6520 544c 5376 e available TLSv │ │ │ │ -001892d0: 312e 3320 6369 7068 6572 7375 6974 6573 1.3 ciphersuites │ │ │ │ -001892e0: 2e3c 2f70 3e0a 3c70 3e57 6520 7265 6665 .

    .

    We refe │ │ │ │ -001892f0: 7220 746f 2074 6865 204f 7065 6e53 534c r to the OpenSSL │ │ │ │ -00189300: 2064 6f63 756d 656e 7461 7469 6f6e 2061 documentation a │ │ │ │ -00189310: 6e64 206d 616e 7561 6c20 7061 6765 7320 nd manual pages │ │ │ │ -00189320: 6f66 203c 636f 6465 3e53 534c 5f43 5458 of SSL_CTX │ │ │ │ -00189330: 5f73 6574 5f63 6970 6865 725f 6c69 7374 _set_cipher_list │ │ │ │ -00189340: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and SSL_CTX_set_ci │ │ │ │ -00189360: 7068 6572 7375 6974 6573 3c2f 636f 6465 phersuites for details on │ │ │ │ -00189380: 2074 6865 206c 6174 6573 7420 6369 7068 the latest ciph │ │ │ │ -00189390: 6572 206c 6973 7473 2061 6e64 2073 7569 er lists and sui │ │ │ │ -001893a0: 7465 7320 6176 6169 6c61 626c 6520 746f tes available to │ │ │ │ -001893b0: 2075 7365 2e3c 2f70 3e0a 3c70 3e4f 7468 use.

    .

    Oth │ │ │ │ -001893c0: 6572 2063 6c69 656e 742d 7369 6465 2053 er client-side S │ │ │ │ -001893d0: 534c 206f 7074 696f 6e73 2061 7265 203c SL options are < │ │ │ │ -001893e0: 636f 6465 3e23 534f 4150 5f53 534c 5f53 code>#SOAP_SSL_S │ │ │ │ -001893f0: 4b49 505f 484f 5354 5f43 4845 434b 3c2f KIP_HOST_CHECK to skip th │ │ │ │ -00189410: 6520 686f 7374 206e 616d 6520 7665 7269 e host name veri │ │ │ │ -00189420: 6669 6361 7469 6f6e 2063 6865 636b 2061 fication check a │ │ │ │ -00189430: 6e64 203c 636f 6465 3e23 534f 4150 5f53 nd #SOAP_S │ │ │ │ -00189440: 534c 5f41 4c4c 4f57 5f45 5850 4952 4544 SL_ALLOW_EXPIRED │ │ │ │ -00189450: 5f43 4552 5449 4649 4341 5445 3c2f 636f _CERTIFICATE to allow con │ │ │ │ -00189470: 6e65 6374 696e 6720 746f 2061 2068 6f73 necting to a hos │ │ │ │ -00189480: 7420 7769 7468 2061 6e20 6578 7069 7265 t with an expire │ │ │ │ -00189490: 6420 6365 7274 6966 6963 6174 652e 2046 d certificate. F │ │ │ │ -001894a0: 6f72 2065 7861 6d70 6c65 2c3c 2f70 3e0a or example,

    . │ │ │ │ -001894b0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ -001894f0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap;.
    soap_ssl_i │ │ │ │ -001895d0: 6e69 743c 2f61 3e28 293b 203c 7370 616e nit(); /* init OpenSSL │ │ │ │ -00189600: 2028 736b 6970 7069 6e67 2074 6869 7320 (skipping this │ │ │ │ -00189610: 6f72 2063 616c 6c69 6e67 206d 756c 7469 or calling multi │ │ │ │ -00189620: 706c 6520 7469 6d65 7320 6973 204f 4b2c ple times is OK, │ │ │ │ -00189630: 2073 696e 6365 2074 6865 2065 6e67 696e since the engin │ │ │ │ -00189640: 6520 7769 6c6c 2069 6e69 7420 5353 4c20 e will init SSL │ │ │ │ -00189650: 6175 746f 6d61 7469 6361 6c6c 7929 202a automatically) * │ │ │ │ -00189660: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ -00189670: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00189680: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >/* soap_s │ │ │ │ -001896a0: 736c 5f6e 6f69 6e69 7428 293b 202a 2f3c sl_noinit(); */< │ │ │ │ -001896b0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> /* │ │ │ │ -001896d0: 646f 206e 6f74 2069 6e69 7420 4f70 656e do not init Open │ │ │ │ -001896e0: 5353 4c20 2869 6620 5353 4c20 6973 2061 SSL (if SSL is a │ │ │ │ -001896f0: 6c72 6561 6479 2069 6e69 7469 616c 697a lready initializ │ │ │ │ -00189700: 6564 2065 6c73 6577 6865 7265 2069 6e20 ed elsewhere in │ │ │ │ -00189710: 7468 6973 2061 7070 6c69 6361 7469 6f6e this application │ │ │ │ -00189720: 2920 2a2f 3c2f 7370 616e 3e3c 2f64 6976 ) */
    .
    soap_in │ │ │ │ -001897a0: 6974 3c2f 613e 2826 616d 703b 3c61 2063 it(&soap);..
    | < │ │ │ │ -00189a00: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00189a10: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -00189a20: 705f 5f73 736c 2e68 746d 6c23 6761 6137 p__ssl.html#gaa7 │ │ │ │ -00189a30: 3863 3237 6330 3363 6364 3266 6234 3761 8c27c03ccd2fb47a │ │ │ │ -00189a40: 6664 6136 6238 3361 3366 6430 3163 223e fda6b83a3fd01c"> │ │ │ │ -00189a50: 534f 4150 5f53 534c 5f41 4c4c 4f57 5f45 SOAP_SSL_ALLOW_E │ │ │ │ -00189a60: 5850 4952 4544 5f43 4552 5449 4649 4341 XPIRED_CERTIFICA │ │ │ │ -00189a70: 5445 3c2f 613e 2c20 3c2f 6469 763e 0a3c TE,
    .< │ │ │ │ -00189a80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00189a90: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > & │ │ │ │ -00189ab0: 7175 6f74 3b63 6c69 656e 742e 7065 6d26 quot;client.pem& │ │ │ │ -00189ac0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -00189ad0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* ke │ │ │ │ -00189af0: 7966 696c 653a 2072 6571 7569 7265 6420 yfile: required │ │ │ │ -00189b00: 6f6e 6c79 2077 6865 6e20 636c 6965 6e74 only when client │ │ │ │ -00189b10: 206d 7573 7420 6175 7468 656e 7469 6361 must authentica │ │ │ │ -00189b20: 7465 2074 6f20 7365 7276 6572 2028 7365 te to server (se │ │ │ │ -00189b30: 6520 5353 4c20 646f 6373 206f 6e20 686f e SSL docs on ho │ │ │ │ -00189b40: 7720 746f 206f 6274 6169 6e20 7468 6973 w to obtain this │ │ │ │ -00189b50: 2066 696c 6529 202a 2f3c 2f73 7061 6e3e file) */ │ │ │ │ -00189b60: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    "pa │ │ │ │ -00189ba0: 7373 776f 7264 2671 756f 743b 3c2f 7370 ssword", /* password │ │ │ │ -00189be0: 746f 2072 6561 6420 7468 6520 6b65 7920 to read the key │ │ │ │ -00189bf0: 6669 6c65 2028 6e6f 7420 7573 6564 2077 file (not used w │ │ │ │ -00189c00: 6974 6820 474e 5554 4c53 2920 2a2f 3c2f ith GNUTLS) */
    . │ │ │ │ -00189c30: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -00189c50: 6f74 3b63 6163 6572 7473 2e70 656d 2671 ot;cacerts.pem&q │ │ │ │ -00189c60: 756f 743b 3c2f 7370 616e 3e2c 2020 2020 uot;, │ │ │ │ -00189c70: 2020 203c 7370 616e 2063 6c61 7373 3d22 /* cace │ │ │ │ -00189c90: 7274 2066 696c 6520 746f 2073 746f 7265 rt file to store │ │ │ │ -00189ca0: 2074 7275 7374 6564 2063 6572 7469 6669 trusted certifi │ │ │ │ -00189cb0: 6361 7465 7320 286e 6565 6465 6420 746f cates (needed to │ │ │ │ -00189cc0: 2076 6572 6966 7920 7365 7276 6572 2920 verify server) │ │ │ │ -00189cd0: 2a2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a */
    . │ │ │ │ -00189ce0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL, │ │ │ │ -00189d00: 2020 2020 2020 2020 203c 7370 616e 2063 / │ │ │ │ -00189d20: 2a20 6361 7061 7468 2074 6f20 6469 7265 * capath to dire │ │ │ │ -00189d30: 6374 6f72 7920 7769 7468 2074 7275 7374 ctory with trust │ │ │ │ -00189d40: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates │ │ │ │ -00189d50: 2a2f 3c2f 7370 616e 3e20 3c2f 6469 763e */
    │ │ │ │ -00189d60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL │ │ │ │ -00189d80: 2020 3c73 7061 6e20 636c 6173 733d 2263 /* if ra │ │ │ │ -00189da0: 6e64 6669 6c65 213d 4e55 4c4c 3a20 7573 ndfile!=NULL: us │ │ │ │ -00189db0: 6520 6120 6669 6c65 2077 6974 6820 7261 e a file with ra │ │ │ │ -00189dc0: 6e64 6f6d 2064 6174 6120 746f 2073 6565 ndom data to see │ │ │ │ -00189dd0: 6420 7261 6e64 6f6d 6e65 7373 202a 2f3c d randomness */< │ │ │ │ -00189de0: 2f73 7061 6e3e 2020 3c2f 6469 763e 0a3c /span>
    .< │ │ │ │ -00189df0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00189e00: 3e29 2920 3c2f 6469 763e 0a3c 6469 7620 >))
    .
    {.
    soap │ │ │ │ -00189e90: 5f70 7269 6e74 5f66 6175 6c74 3c2f 613e _print_fault │ │ │ │ -00189ea0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -00189ed0: 703c 2f61 3e2c 2073 7464 6572 7229 3b20 p, stderr); │ │ │ │ -00189ee0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    exit( │ │ │ │ -00189f00: 4558 4954 5f46 4149 4c55 5245 293b 203c EXIT_FAILURE); < │ │ │ │ -00189f10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    │ │ │ │ -00189f30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_call_ns_ │ │ │ │ -00189f50: 5f6d 796d 6574 686f 6428 2661 6d70 3b3c _mymethod(&< │ │ │ │ -00189f60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00189f70: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00189f80: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -00189f90: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -00189fb0: 743b 6874 7470 733a 2f2f 646f 6d61 696e t;https://domain │ │ │ │ -00189fc0: 2f70 6174 682f 7365 6375 7265 2e63 6769 /path/secure.cgi │ │ │ │ -00189fd0: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", < │ │ │ │ -00189fe0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -00189ff0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -0018a000: 3b26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 ;", │ │ │ │ -0018a010: 2e2e 2e29 3b3c 2f64 6976 3e0a 3c64 6976 ...);
    .
    #defi │ │ │ │ -0018a100: 6e65 2053 4f41 505f 5353 4c5f 534b 4950 ne SOAP_SSL_SKIP │ │ │ │ -0018a110: 5f48 4f53 545f 4348 4543 4b3c 2f64 6976 _HOST_CHECK
    soap_ssl_fla │ │ │ │ -0018a140: 6773 2066 6c61 6720 666f 7220 636c 6965 gs flag for clie │ │ │ │ -0018a150: 6e74 7320 746f 2061 6c6c 6f77 2063 6c69 nts to allow cli │ │ │ │ -0018a160: 656e 7473 2074 6f20 736b 6970 2063 6f6d ents to skip com │ │ │ │ -0018a170: 6d6f 6e20 6e61 6d65 2063 6865 636b 7320 mon name checks │ │ │ │ -0018a180: 6167 6169 6e73 7420 7468 6520 686f 7374 against the host │ │ │ │ -0018a190: 206e 616d 6520 6f66 202e 2e2e 3c2f 6469 name of ...
    Definiti │ │ │ │ -0018a1c0: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ -0018a1d0: 2e68 3a35 3836 383c 2f64 6976 3e3c 2f64 .h:5868
    .
    #define SOAP_SS │ │ │ │ -0018a2e0: 4c5f 5245 5155 4952 455f 5345 5256 4552 L_REQUIRE_SERVER │ │ │ │ -0018a2f0: 5f41 5554 4845 4e54 4943 4154 494f 4e3c _AUTHENTICATION< │ │ │ │ -0018a300: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    soap_ssl │ │ │ │ -0018a320: 5f66 6c61 6773 2066 6c61 6720 666f 7220 _flags flag for │ │ │ │ -0018a330: 636c 6965 6e74 7320 746f 2072 6571 7569 clients to requi │ │ │ │ -0018a340: 7265 2073 6572 7665 7273 2074 6f20 6175 re servers to au │ │ │ │ -0018a350: 7468 656e 7469 6361 7465 2074 6f20 636c thenticate to cl │ │ │ │ -0018a360: 6965 6e74 7320 6475 7269 6e67 2074 6865 ients during the │ │ │ │ -0018a370: 2048 5454 5053 2068 616e 6473 682e 2e2e HTTPS handsh... │ │ │ │ -0018a380: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -0018a3a0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -0018a3b0: 6f61 7032 2e68 3a35 3836 323c 2f64 6976 oap2.h:5862
    .
    #define SOAP_SS │ │ │ │ -0018a4c0: 4c5f 414c 4c4f 575f 4558 5049 5245 445f L_ALLOW_EXPIRED_ │ │ │ │ -0018a4d0: 4345 5254 4946 4943 4154 453c 2f64 6976 CERTIFICATE
    soap_ssl_fla │ │ │ │ -0018a500: 6773 2066 6c61 6720 7661 6c75 6520 746f gs flag value to │ │ │ │ -0018a510: 2061 6c6c 6f77 2073 656c 662d 7369 676e allow self-sign │ │ │ │ -0018a520: 6564 2061 6e64 2065 7870 6972 6564 2063 ed and expired c │ │ │ │ -0018a530: 6572 7469 6669 6361 7465 7320 616e 6420 ertificates and │ │ │ │ -0018a540: 7468 6f73 6520 7769 7468 6f75 7420 4352 those without CR │ │ │ │ -0018a550: 4c20 746f 2062 6520 752e 2e2e 3c2f 6469 L to be u...
    Definiti │ │ │ │ -0018a580: 6f6e 3a3c 2f62 3e20 7374 6473 6f61 7032 on: stdsoap2 │ │ │ │ -0018a590: 2e68 3a35 3833 323c 2f64 6976 3e3c 2f64 .h:5832
    .

    Fo │ │ │ │ -0018a5c0: 7220 7379 7374 656d 7320 6261 7365 6420 r systems based │ │ │ │ -0018a5d0: 6f6e 204d 6963 726f 736f 6674 2077 696e on Microsoft win │ │ │ │ -0018a5e0: 646f 7773 2c20 7468 6520 5769 6e49 6e65 dows, the WinIne │ │ │ │ -0018a5f0: 7420 6d6f 6475 6c65 2063 616e 2062 6520 t module can be │ │ │ │ -0018a600: 7573 6564 2069 6e73 7465 6164 2c20 7365 used instead, se │ │ │ │ -0018a610: 6520 3c63 6f64 653e 6d6f 645f 6773 6f61 e mod_gsoa │ │ │ │ -0018a620: 702f 6773 6f61 705f 7769 6e2f 7769 6e69 p/gsoap_win/wini │ │ │ │ -0018a630: 6e65 743c 2f63 6f64 653e 2e3c 2f70 3e0a net.

    . │ │ │ │ -0018a640: 3c70 3e53 696e 6365 2072 656c 6561 7365

    Since release │ │ │ │ -0018a650: 2076 6572 7369 6f6e 2032 2e38 2e32 3020 version 2.8.20 │ │ │ │ -0018a660: 5353 4c20 7633 2069 7320 6469 7361 626c SSL v3 is disabl │ │ │ │ -0018a670: 6564 2e20 546f 2065 6e61 626c 6520 5353 ed. To enable SS │ │ │ │ -0018a680: 4c20 7633 2074 6f67 6574 6865 7220 7769 L v3 together wi │ │ │ │ -0018a690: 7468 2054 4c53 2031 2e30 2061 6e64 2068 th TLS 1.0 and h │ │ │ │ -0018a6a0: 6967 6865 722c 2075 7365 203c 636f 6465 igher, use #SOAP_SSLv3_TLS │ │ │ │ -0018a6c0: 7631 3c2f 636f 6465 3e20 7769 7468 203c v1 with < │ │ │ │ -0018a6d0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl │ │ │ │ -0018a760: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context< │ │ │ │ -0018a770: 2f61 3e3c 2f63 6f64 653e 2e20 546f 2075 /a>. To u │ │ │ │ -0018a780: 7365 2054 4c53 2031 2e31 2061 6e64 2031 se TLS 1.1 and 1 │ │ │ │ -0018a790: 2e32 2075 7365 203c 636f 6465 3e53 4f41 .2 use SOA │ │ │ │ -0018a7a0: 505f 544c 5376 315f 3120 7c20 534f 4150 P_TLSv1_1 | SOAP │ │ │ │ -0018a7b0: 5f54 4c53 7631 5f32 3c2f 636f 6465 3e2e _TLSv1_2. │ │ │ │ -0018a7c0: 2054 6f20 7573 6520 544c 5320 312e 3220 To use TLS 1.2 │ │ │ │ -0018a7d0: 6f6e 6c79 2075 7365 203c 636f 6465 3e23 only use # │ │ │ │ -0018a7e0: 534f 4150 5f54 4c53 7631 5f32 3c2f 636f SOAP_TLSv1_2. To use SSL │ │ │ │ -0018a800: 7633 206f 6e6c 7920 7573 6520 3c63 6f64 v3 only use #SOAP_SSLv3.

    .

    To │ │ │ │ -0018a830: 6469 7361 626c 6520 7365 7276 6572 2061 disable server a │ │ │ │ -0018a840: 7574 6865 6e74 6963 6174 696f 6e20 666f uthentication fo │ │ │ │ -0018a850: 7220 7465 7374 696e 6720 7075 7270 6f73 r testing purpos │ │ │ │ -0018a860: 6573 2c20 7573 6520 7468 6520 666f 6c6c es, use the foll │ │ │ │ -0018a870: 6f77 696e 673a 3c2f 703e 0a3c 6469 7620 owing:

    .
    .< │ │ │ │ -0018aa20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0018aa30: 3e20 204e 554c 4c2c 203c 2f64 6976 3e0a > NULL,
    . │ │ │ │ -0018aa40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    NULL,
    │ │ │ │ -0018aa60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    NULL,
    .
    NULL
    .
    ))
    . soap_print │ │ │ │ +00186e80: 5f66 6175 6c74 3c2f 613e 2826 616d 703b _fault(& │ │ │ │ +00186e90: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +00186ec0: 2073 7464 6572 7229 3b20 3c2f 6469 763e stderr);
    │ │ │ │ +00186ed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    exit(EXIT_F │ │ │ │ +00186ef0: 4149 4c55 5245 293b 203c 2f64 6976 3e0a AILURE);
    . │ │ │ │ +00186f00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    < │ │ │ │ +00186f80: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ +00186f90: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g │ │ │ │ +00186fa0: 6134 6162 3565 3766 3366 6262 3030 6661 a4ab5e7f3fbb00fa │ │ │ │ +00186fb0: 3236 3639 6532 3965 3963 6130 3030 6431 2669e29e9ca000d1 │ │ │ │ +00186fc0: 3222 3e53 4f41 505f 5353 4c5f 5245 5155 2">SOAP_SSL_REQU │ │ │ │ +00186fd0: 4952 455f 434c 4945 4e54 5f41 5554 4845 IRE_CLIENT_AUTHE │ │ │ │ +00186fe0: 4e54 4943 4154 494f 4e3c 2f61 3e3c 2f64 NTICATION
    #define S │ │ │ │ +00187010: 4f41 505f 5353 4c5f 5245 5155 4952 455f OAP_SSL_REQUIRE_ │ │ │ │ +00187020: 434c 4945 4e54 5f41 5554 4845 4e54 4943 CLIENT_AUTHENTIC │ │ │ │ +00187030: 4154 494f 4e3c 2f64 6976 3e3c 6469 7620 ATION
    so │ │ │ │ +00187050: 6170 5f73 736c 5f66 6c61 6773 2066 6c61 ap_ssl_flags fla │ │ │ │ +00187060: 6720 666f 7220 7365 7276 6572 7320 746f g for servers to │ │ │ │ +00187070: 2072 6571 7569 7265 2063 6c69 656e 7473 require clients │ │ │ │ +00187080: 2074 6f20 6175 7468 656e 7469 6361 7465 to authenticate │ │ │ │ +00187090: 2074 6f20 7365 7276 6572 7320 6475 7269 to servers duri │ │ │ │ +001870a0: 6e67 2074 6865 2048 5454 5053 2068 616e ng the HTTPS han │ │ │ │ +001870b0: 6473 682e 2e2e 3c2f 6469 763e 3c64 6976 dsh...
    < │ │ │ │ +001870d0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:585 │ │ │ │ +001870f0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 4
    .

    This req │ │ │ │ +00187120: 7569 7265 7320 6561 6368 2063 6c69 656e uires each clien │ │ │ │ +00187130: 7420 746f 2061 7574 6865 6e74 6963 6174 t to authenticat │ │ │ │ +00187140: 6520 7769 7468 2069 7473 2063 6572 7469 e with its certi │ │ │ │ +00187150: 6669 6361 7465 2c20 696e 2061 6464 6974 ficate, in addit │ │ │ │ +00187160: 696f 6e20 666f 7220 7468 6520 7365 7276 ion for the serv │ │ │ │ +00187170: 6572 2074 6f20 6175 7468 656e 7469 6361 er to authentica │ │ │ │ +00187180: 7465 2074 6f20 7468 6520 636c 6965 6e74 te to the client │ │ │ │ +00187190: 2e3c 2f70 3e0a 3c70 3e53 696e 6365 2072 .

    .

    Since r │ │ │ │ +001871a0: 656c 6561 7365 2076 6572 7369 6f6e 2032 elease version 2 │ │ │ │ +001871b0: 2e38 2e32 302c 2053 534c 2076 3320 6973 .8.20, SSL v3 is │ │ │ │ +001871c0: 2064 6973 6162 6c65 642e 2054 6f20 656e disabled. To en │ │ │ │ +001871d0: 6162 6c65 2053 534c 2076 3320 746f 6765 able SSL v3 toge │ │ │ │ +001871e0: 7468 6572 2077 6974 6820 544c 5320 312e ther with TLS 1. │ │ │ │ +001871f0: 3020 616e 6420 6869 6768 6572 2c20 7573 0 and higher, us │ │ │ │ +00187200: 6520 3c63 6f64 653e 2353 4f41 505f 5353 e #SOAP_SS │ │ │ │ +00187210: 4c76 335f 544c 5376 313c 2f63 6f64 653e Lv3_TLSv1 │ │ │ │ +00187220: 2077 6974 6820 3c63 6f64 653e 3c61 2063 with s │ │ │ │ +001872b0: 6f61 705f 7373 6c5f 7365 7276 6572 5f63 oap_ssl_server_c │ │ │ │ +001872c0: 6f6e 7465 7874 3c2f 613e 3c2f 636f 6465 ontext. To use TLS 1. │ │ │ │ +001872e0: 3120 616e 6420 312e 3220 7573 6520 3c63 1 and 1.2 use SOAP_TLSv1_1 │ │ │ │ +00187300: 207c 2053 4f41 505f 544c 5376 315f 323c | SOAP_TLSv1_2< │ │ │ │ +00187310: 2f63 6f64 653e 2e20 546f 2075 7365 2054 /code>. To use T │ │ │ │ +00187320: 4c53 2031 2e32 206f 6e6c 7920 7573 6520 LS 1.2 only use │ │ │ │ +00187330: 3c63 6f64 653e 2353 4f41 505f 544c 5376 #SOAP_TLSv │ │ │ │ +00187340: 315f 323c 2f63 6f64 653e 2e20 546f 2075 1_2. To u │ │ │ │ +00187350: 7365 2053 534c 2076 3320 6f6e 6c79 2075 se SSL v3 only u │ │ │ │ +00187360: 7365 203c 636f 6465 3e23 534f 4150 5f53 se #SOAP_S │ │ │ │ +00187370: 534c 7633 3c2f 636f 6465 3e2e 3c2f 703e SLv3.

    │ │ │ │ +00187380: 0a3c 703e 5468 6520 3c63 6f64 653e 6361 .

    The ca │ │ │ │ +00187390: 6365 7274 3c2f 636f 6465 3e20 6669 6c65 cert file │ │ │ │ +001873a0: 2061 6e64 203c 636f 6465 3e63 6170 6174 and capat │ │ │ │ +001873b0: 683c 2f63 6f64 653e 2061 7265 206f 7074 h are opt │ │ │ │ +001873c0: 696f 6e61 6c2e 2045 6974 6865 7220 6f6e ional. Either on │ │ │ │ +001873d0: 6520 6361 6e20 6265 2073 7065 6369 6669 e can be specifi │ │ │ │ +001873e0: 6564 2077 6865 6e20 636c 6965 6e74 7320 ed when clients │ │ │ │ +001873f0: 6d75 7374 2072 756e 206f 6e20 6e6f 6e2d must run on non- │ │ │ │ +00187400: 7472 7573 7465 6420 7379 7374 656d 7320 trusted systems │ │ │ │ +00187410: 283c 636f 6465 3e63 6170 6174 683c 2f63 (capath is not used │ │ │ │ +00187430: 2077 6974 6820 474e 5554 4c53 292e 2057 with GNUTLS). W │ │ │ │ +00187440: 6520 7761 6e74 2074 6f20 6176 6f69 6420 e want to avoid │ │ │ │ +00187450: 7374 6f72 696e 6720 7472 7573 7465 6420 storing trusted │ │ │ │ +00187460: 6365 7274 6966 6963 6174 6573 2069 6e20 certificates in │ │ │ │ +00187470: 7468 6520 6465 6661 756c 7420 6c6f 6361 the default loca │ │ │ │ +00187480: 7469 6f6e 206f 6e20 7468 6520 6669 6c65 tion on the file │ │ │ │ +00187490: 2073 7973 7465 6d20 7768 656e 2074 6861 system when tha │ │ │ │ +001874a0: 7420 6973 206e 6f74 2073 6563 7572 652e t is not secure. │ │ │ │ +001874b0: 2054 6865 7265 666f 7265 2c20 6120 666c Therefore, a fl │ │ │ │ +001874c0: 6174 203c 656d 3e3c 636f 6465 3e63 6163 at cac │ │ │ │ +001874d0: 6572 742e 7065 6d3c 2f63 6f64 653e 3c2f ert.pem file or dire │ │ │ │ +001874f0: 6374 6f72 7920 6361 6e20 6265 2073 7065 ctory can be spe │ │ │ │ +00187500: 6369 6669 6564 2074 6f20 7374 6f72 6520 cified to store │ │ │ │ +00187510: 7472 7573 7465 6420 6365 7274 6966 6963 trusted certific │ │ │ │ +00187520: 6174 6573 2e3c 2f70 3e0a 3c70 3e54 6865 ates.

    .

    The │ │ │ │ +00187530: 2067 534f 4150 2070 6163 6b61 6765 2069 gSOAP package i │ │ │ │ +00187540: 6e63 6c75 6465 7320 6120 3c65 6d3e 3c63 ncludes a cacerts.pem< │ │ │ │ +00187560: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file │ │ │ │ +00187570: 2077 6974 6820 7468 6520 6365 7274 6966 with the certif │ │ │ │ +00187580: 6963 6174 6573 206f 6620 616c 6c20 6365 icates of all ce │ │ │ │ +00187590: 7274 6966 6963 6174 6520 6175 7468 6f72 rtificate author │ │ │ │ +001875a0: 6974 6965 732e 2059 6f75 2063 616e 2075 ities. You can u │ │ │ │ +001875b0: 7365 2074 6869 7320 6669 6c65 2074 6f20 se this file to │ │ │ │ +001875c0: 7665 7269 6679 2074 6865 2061 7574 6865 verify the authe │ │ │ │ +001875d0: 6e74 6963 6174 696f 6e20 6f66 2073 6572 ntication of ser │ │ │ │ +001875e0: 7665 7273 2074 6861 7420 7072 6f76 6964 vers that provid │ │ │ │ +001875f0: 6520 6365 7274 6966 6963 6174 6573 2069 e certificates i │ │ │ │ +00187600: 7373 7565 6420 6279 2074 6865 7365 2043 ssued by these C │ │ │ │ +00187610: 4173 2e3c 2f70 3e0a 3c70 3e54 6865 203c As.

    .

    The < │ │ │ │ +00187620: 656d 3e3c 636f 6465 3e63 6163 6572 742e em>cacert. │ │ │ │ +00187630: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e2c pem, │ │ │ │ +00187640: 203c 656d 3e3c 636f 6465 3e63 6c69 656e clien │ │ │ │ +00187650: 742e 7065 6d3c 2f63 6f64 653e 3c2f 656d t.pem, and server.pem files in │ │ │ │ +00187690: 2074 6865 2067 534f 4150 2070 6163 6b61 the gSOAP packa │ │ │ │ +001876a0: 6765 2061 7265 2065 7861 6d70 6c65 7320 ge are examples │ │ │ │ +001876b0: 6f66 2073 656c 662d 7369 676e 6564 2063 of self-signed c │ │ │ │ +001876c0: 6572 7469 6669 6361 7465 732e 2054 6865 ertificates. The │ │ │ │ +001876d0: 203c 656d 3e3c 636f 6465 3e63 6c69 656e clien │ │ │ │ +001876e0: 742e 7065 6d3c 2f63 6f64 653e 3c2f 656d t.pem and │ │ │ │ +00187700: 7365 7276 6572 2e70 656d 3c2f 636f 6465 server.pem contain t │ │ │ │ +00187720: 6865 2063 6c69 656e 742f 7365 7276 6572 he client/server │ │ │ │ +00187730: 2070 7269 7661 7465 206b 6579 2063 6f6e private key con │ │ │ │ +00187740: 6361 7465 6e61 7465 6420 7769 7468 2074 catenated with t │ │ │ │ +00187750: 6865 2063 6572 7469 6669 6361 7465 2e20 he certificate. │ │ │ │ +00187760: 5468 6520 6b65 7966 696c 6573 2028 3c65 The keyfiles (client.p │ │ │ │ +00187780: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2061 em a │ │ │ │ +00187790: 6e64 203c 656d 3e3c 636f 6465 3e73 6572 nd ser │ │ │ │ +001877a0: 7665 722e 7065 6d3c 2f63 6f64 653e 3c2f ver.pem) are created │ │ │ │ +001877c0: 2062 7920 636f 6e63 6174 656e 6174 696e by concatenatin │ │ │ │ +001877d0: 6720 7468 6520 7072 6976 6174 6520 6b65 g the private ke │ │ │ │ +001877e0: 7920 5045 4d20 7769 7468 2074 6865 2063 y PEM with the c │ │ │ │ +001877f0: 6572 7469 6669 6361 7465 2050 454d 2e20 ertificate PEM. │ │ │ │ +00187800: 5468 6520 6b65 7966 696c 6520 7368 6f75 The keyfile shou │ │ │ │ +00187810: 6c64 206e 6f74 2062 6520 7368 6172 6564 ld not be shared │ │ │ │ +00187820: 2077 6974 6820 616e 7920 7061 7274 792e with any party. │ │ │ │ +00187830: 2057 6974 6820 4f70 656e 5353 4c2c 2079 With OpenSSL, y │ │ │ │ +00187840: 6f75 2063 616e 2065 6e63 7279 7074 2074 ou can encrypt t │ │ │ │ +00187850: 6865 206b 6579 6669 6c65 7320 7769 7468 he keyfiles with │ │ │ │ +00187860: 2061 2070 6173 7377 6f72 6420 746f 206f a password to o │ │ │ │ +00187870: 6666 6572 2073 6f6d 6520 7072 6f74 6563 ffer some protec │ │ │ │ +00187880: 7469 6f6e 2061 6e64 2074 6865 2070 6173 tion and the pas │ │ │ │ +00187890: 7377 6f72 6420 6973 2075 7365 6420 696e sword is used in │ │ │ │ +001878a0: 2074 6865 2063 6c69 656e 742f 7365 7276 the client/serv │ │ │ │ +001878b0: 6572 2063 6f64 6520 746f 2072 6561 6420 er code to read │ │ │ │ +001878c0: 7468 6520 6b65 7966 696c 652e 2047 4e55 the keyfile. GNU │ │ │ │ +001878d0: 544c 5320 646f 6573 206e 6f74 2073 7570 TLS does not sup │ │ │ │ +001878e0: 706f 7274 2074 6869 7320 6665 6174 7572 port this featur │ │ │ │ +001878f0: 6520 616e 6420 6361 6e6e 6f74 2065 6e63 e and cannot enc │ │ │ │ +00187900: 7279 7074 206f 7220 6465 6372 7970 7420 rypt or decrypt │ │ │ │ +00187910: 6120 6b65 7966 696c 652e 3c2f 703e 0a3c a keyfile.

    .< │ │ │ │ +00187920: 646c 2063 6c61 7373 3d22 7365 6374 696f dl class="sectio │ │ │ │ +00187930: 6e20 7761 726e 696e 6722 3e3c 6474 3e57 n warning">
    W │ │ │ │ +00187940: 6172 6e69 6e67 3c2f 6474 3e3c 6464 3e49 arning
    I │ │ │ │ +00187950: 7420 6973 2069 6d70 6f72 7461 6e74 2074 t is important t │ │ │ │ +00187960: 6861 7420 7468 6520 3c63 6f64 653e 2357 hat the #W │ │ │ │ +00187970: 4954 485f 4f50 454e 5353 4c3c 2f63 6f64 ITH_OPENSSL macro must be │ │ │ │ +00187990: 2063 6f6e 7369 7374 656e 746c 7920 6465 consistently de │ │ │ │ +001879a0: 6669 6e65 6420 746f 2063 6f6d 7069 6c65 fined to compile │ │ │ │ +001879b0: 2074 6865 2073 6f75 7263 6573 2c20 7375 the sources, su │ │ │ │ +001879c0: 6368 2061 7320 3c65 6d3e 3c63 6f64 653e ch as │ │ │ │ +001879d0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c │ │ │ │ +001879e0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 pp, │ │ │ │ +001879f0: 3c65 6d3e 3c63 6f64 653e 736f 6170 432e soapC. │ │ │ │ +00187a00: 6370 703c 2f63 6f64 653e 3c2f 656d 3e2c cpp, │ │ │ │ +00187a10: 203c 656d 3e3c 636f 6465 3e73 6f61 7043 soapC │ │ │ │ +00187a20: 6c69 656e 742e 6370 703c 2f63 6f64 653e lient.cpp │ │ │ │ +00187a30: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , soapServer.cpp< │ │ │ │ +00187a50: 2f63 6f64 653e 3c2f 656d 3e2c 2061 6e64 /code>, and │ │ │ │ +00187a60: 2061 6c6c 2061 7070 6c69 6361 7469 6f6e all application │ │ │ │ +00187a70: 2073 6f75 7263 6573 2074 6861 7420 696e sources that in │ │ │ │ +00187a80: 636c 7564 6520 3c65 6d3e 3c63 6f64 653e clude │ │ │ │ +00187a90: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h │ │ │ │ +00187aa0: 3c2f 636f 6465 3e3c 2f65 6d3e 206f 7220 or │ │ │ │ +00187ab0: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH. │ │ │ │ +00187ac0: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2049 h. I │ │ │ │ +00187ad0: 6620 7468 6520 6d61 6372 6f73 2061 7265 f the macros are │ │ │ │ +00187ae0: 206e 6f74 2063 6f6e 7369 7374 656e 746c not consistentl │ │ │ │ +00187af0: 7920 7573 6564 2c20 7468 6520 6170 706c y used, the appl │ │ │ │ +00187b00: 6963 6174 696f 6e20 7769 6c6c 2063 7261 ication will cra │ │ │ │ +00187b10: 7368 2064 7565 2074 6f20 6120 6d69 736d sh due to a mism │ │ │ │ +00187b20: 6174 6368 6573 2069 6e20 7468 6520 6465 atches in the de │ │ │ │ +00187b30: 636c 6172 6174 696f 6e20 616e 6420 6163 claration and ac │ │ │ │ +00187b40: 6365 7373 206f 6620 7468 6520 3c63 6f64 cess of the so │ │ │ │ +00187ba0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co │ │ │ │ +00187bb0: 6e74 6578 742e 3c2f 6464 3e3c 2f64 6c3e ntext.
    │ │ │ │ +00187bc0: 0a3c 703e 5365 6520 616c 736f 2041 5049 .

    See also API │ │ │ │ +00187bd0: 2064 6f63 756d 656e 7461 7469 6f6e 204d documentation M │ │ │ │ +00187be0: 6f64 756c 6520 3c61 2063 6c61 7373 3d22 odule SSL/TLS contex │ │ │ │ +00187c20: 7420 616e 6420 6675 6e63 7469 6f6e 733c t and functions< │ │ │ │ +00187c30: 2f61 3e20 666f 7220 6d6f 7265 2064 6574 /a> for more det │ │ │ │ +00187c40: 6169 6c73 206f 6e20 7468 6520 5353 4c2f ails on the SSL/ │ │ │ │ +00187c50: 544c 5320 6675 6e63 7469 6f6e 732e 3c2f TLS functions..

    .... Back to t │ │ │ │ +00187c80: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +00187c90: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .Secure cl │ │ │ │ +00187cd0: 6965 6e74 7320 7769 7468 2048 5454 5053 ients with HTTPS │ │ │ │ +00187ce0: 3c2f 6832 3e0a 3c70 3e54 6f20 7574 696c

    .

    To util │ │ │ │ +00187cf0: 697a 6520 4854 5450 532f 5353 4c2c 2079 ize HTTPS/SSL, y │ │ │ │ +00187d00: 6f75 206e 6565 6420 746f 2069 6e73 7461 ou need to insta │ │ │ │ +00187d10: 6c6c 2074 6865 204f 7065 6e53 534c 206c ll the OpenSSL l │ │ │ │ +00187d20: 6962 7261 7279 206f 6e20 796f 7572 2070 ibrary on your p │ │ │ │ +00187d30: 6c61 7466 6f72 6d20 6f72 2047 4e55 544c latform or GNUTL │ │ │ │ +00187d40: 5320 666f 7220 6120 6c69 6768 742d 7765 S for a light-we │ │ │ │ +00187d50: 6967 6874 2053 534c 2f54 4c53 206c 6962 ight SSL/TLS lib │ │ │ │ +00187d60: 7261 7279 2e20 4166 7465 7220 696e 7374 rary. After inst │ │ │ │ +00187d70: 616c 6c61 7469 6f6e 2c20 636f 6d70 696c allation, compil │ │ │ │ +00187d80: 6520 616c 6c20 7468 6520 736f 7572 6365 e all the source │ │ │ │ +00187d90: 7320 6f66 2079 6f75 7220 6170 706c 6963 s of your applic │ │ │ │ +00187da0: 6174 696f 6e20 7769 7468 2063 6f6d 7069 ation with compi │ │ │ │ +00187db0: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_OPENSSL │ │ │ │ +00187dd0: 3c2f 636f 6465 3e20 286f 7220 3c63 6f64 (or #WITH_GNUTLS when using │ │ │ │ +00187e00: 2047 4e55 544c 5329 2e20 466f 7220 6578 GNUTLS). For ex │ │ │ │ +00187e10: 616d 706c 6520 6f6e 204c 696e 7578 3a20 ample on Linux: │ │ │ │ +00187e20: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     c++ -
    │ │ │ │ +00187e40: 4457 4954 485f 4f50 454e 5353 4c20 6d79  DWITH_OPENSSL my
    │ │ │ │ +00187e50: 636c 6965 6e74 2e63 7070 2073 7464 736f  client.cpp stdso
    │ │ │ │ +00187e60: 6170 2e63 7070 2073 6f61 7043 2e63 7070  ap.cpp soapC.cpp
    │ │ │ │ +00187e70: 2073 6f61 7043 6c69 656e 742e 6370 7020   soapClient.cpp 
    │ │ │ │ +00187e80: 2d6c 7373 6c20 2d6c 6372 7970 746f 0a3c  -lssl -lcrypto.<
    │ │ │ │ +00187e90: 2f70 7265 3e3c 703e 206f 7220 556e 6978  /pre>

    or Unix │ │ │ │ +00187ea0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     c++
    │ │ │ │ +00187ec0: 202d 4457 4954 485f 4f50 454e 5353 4c20   -DWITH_OPENSSL 
    │ │ │ │ +00187ed0: 6d79 636c 6965 6e74 2e63 7070 2073 7464  myclient.cpp std
    │ │ │ │ +00187ee0: 736f 6170 2e63 7070 2073 6f61 7043 2e63  soap.cpp soapC.c
    │ │ │ │ +00187ef0: 7070 2073 6f61 7043 6c69 656e 742e 6370  pp soapClient.cp
    │ │ │ │ +00187f00: 7020 2d6c 786e 6574 202d 6c73 6f63 6b65  p -lxnet -lsocke
    │ │ │ │ +00187f10: 7420 2d6c 6e73 6c20 2d6c 7373 6c20 2d6c  t -lnsl -lssl -l
    │ │ │ │ +00187f20: 6372 7970 746f 0a3c 2f70 7265 3e3c 703e  crypto.

    │ │ │ │ +00187f30: 206f 7220 796f 7520 6361 6e20 6164 6420 or you can add │ │ │ │ +00187f40: 7468 6520 666f 6c6c 6f77 696e 6720 6c69 the following li │ │ │ │ +00187f50: 6e65 2074 6f20 3c65 6d3e 3c63 6f64 653e ne to │ │ │ │ +00187f60: 736f 6170 6465 6673 2e68 3c2f 636f 6465 soapdefs.h:

    .
    # │ │ │ │ +00187fc0: 6465 6669 6e65 2057 4954 485f 4f50 454e define WITH_OPEN │ │ │ │ +00187fd0: 5353 4c3c 2f73 7061 6e3e 3c2f 6469 763e SSL
    │ │ │ │ +00187fe0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    and c │ │ │ │ +00188000: 6f6d 7069 6c65 2077 6974 6820 636f 6d70 ompile with comp │ │ │ │ +00188010: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_SOAPDE │ │ │ │ +00188030: 4653 5f48 3c2f 636f 6465 3e20 746f 2069 FS_H to i │ │ │ │ +00188040: 6e63 6c75 6465 203c 656d 3e3c 636f 6465 nclude soapdefs.h in your │ │ │ │ +00188070: 7072 6f6a 6563 742e 2041 6c74 6572 6e61 project. Alterna │ │ │ │ +00188080: 7469 7665 6c79 2c20 636f 6d70 696c 6520 tively, compile │ │ │ │ +00188090: 7769 7468 2047 4e55 544c 533a 203c 2f70 with GNUTLS:

     c++ -DWI
    │ │ │ │ +001880c0: 5448 5f47 4e55 544c 5320 6d79 636c 6965  TH_GNUTLS myclie
    │ │ │ │ +001880d0: 6e74 2e63 7070 2073 7464 736f 6170 2e63  nt.cpp stdsoap.c
    │ │ │ │ +001880e0: 7070 2073 6f61 7043 2e63 7070 2073 6f61  pp soapC.cpp soa
    │ │ │ │ +001880f0: 7043 6c69 656e 742e 6370 7020 2d6c 676e  pClient.cpp -lgn
    │ │ │ │ +00188100: 7574 6c73 202d 6c67 6372 7970 7420 2d6c  utls -lgcrypt -l
    │ │ │ │ +00188110: 6770 672d 6572 726f 720a 3c2f 7072 653e  gpg-error.
    │ │ │ │ +00188120: 3c70 3e41 2063 6c69 656e 7420 7072 6f67

    A client prog │ │ │ │ +00188130: 7261 6d20 7369 6d70 6c79 2075 7365 7320 ram simply uses │ │ │ │ +00188140: 7468 6520 7072 6566 6978 203c 656d 3e3c the prefix < │ │ │ │ +00188150: 636f 6465 3e68 7474 7073 3a3c 2f63 6f64 code>https: instead │ │ │ │ +00188170: 6f66 203c 656d 3e3c 636f 6465 3e68 7474 of htt │ │ │ │ +00188180: 703a 3c2f 636f 6465 3e3c 2f65 6d3e 2069 p: i │ │ │ │ +00188190: 6e20 7468 6520 656e 6470 6f69 6e74 2055 n the endpoint U │ │ │ │ +001881a0: 524c 206f 6620 6120 7365 7276 6963 6520 RL of a service │ │ │ │ +001881b0: 6f70 6572 6174 696f 6e20 6361 6c6c 2074 operation call t │ │ │ │ +001881c0: 6f20 6120 5765 6220 5365 7276 6963 6520 o a Web Service │ │ │ │ +001881d0: 746f 2075 7365 2065 6e63 7279 7074 6564 to use encrypted │ │ │ │ +001881e0: 2074 7261 6e73 6665 7273 2028 6966 2074 transfers (if t │ │ │ │ +001881f0: 6865 2073 6572 7669 6365 2073 7570 706f he service suppo │ │ │ │ +00188200: 7274 7320 4854 5450 5329 2e20 596f 7520 rts HTTPS). You │ │ │ │ +00188210: 6e65 6564 2074 6f20 7370 6563 6966 7920 need to specify │ │ │ │ +00188220: 7468 6520 636c 6965 6e74 2d73 6964 6520 the client-side │ │ │ │ +00188230: 6b65 7920 6669 6c65 2061 6e64 2070 6173 key file and pas │ │ │ │ +00188240: 7377 6f72 6420 6f66 2074 6865 206b 6579 sword of the key │ │ │ │ +00188250: 6669 6c65 3a3c 2f70 3e0a 3c64 6976 2063 file:

    .
    │ │ │ │ +00188270: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .< │ │ │ │ +00188320: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00188330: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00188340: 705f 5f73 736c 2e68 746d 6c23 6761 3537 p__ssl.html#ga57 │ │ │ │ +00188350: 3062 3236 3261 6339 6435 3566 6335 3039 0b262ac9d55fc509 │ │ │ │ +00188360: 6631 6635 3939 3964 6561 6131 3866 223e f1f5999deaa18f"> │ │ │ │ +00188370: 736f 6170 5f73 736c 5f69 6e69 743c 2f61 soap_ssl_init(); /* in │ │ │ │ +001883a0: 6974 204f 7065 6e53 534c 2028 736b 6970 it OpenSSL (skip │ │ │ │ +001883b0: 7069 6e67 2074 6869 7320 6f72 2063 616c ping this or cal │ │ │ │ +001883c0: 6c69 6e67 206d 756c 7469 706c 6520 7469 ling multiple ti │ │ │ │ +001883d0: 6d65 7320 6973 204f 4b2c 2073 696e 6365 mes is OK, since │ │ │ │ +001883e0: 2074 6865 2065 6e67 696e 6520 7769 6c6c the engine will │ │ │ │ +001883f0: 2069 6e69 7420 5353 4c20 6175 746f 6d61 init SSL automa │ │ │ │ +00188400: 7469 6361 6c6c 7929 202a 2f3c 2f73 7061 tically) */
    .
    /* soap_ssl_noi │ │ │ │ +00188450: 6e69 7428 293b 202a 2f3c 2f73 7061 6e3e nit(); */ │ │ │ │ +00188460: 203c 7370 616e 2063 6c61 7373 3d22 636f /* do not │ │ │ │ +00188480: 2069 6e69 7420 4f70 656e 5353 4c20 2869 init OpenSSL (i │ │ │ │ +00188490: 6620 5353 4c20 6973 2061 6c72 6561 6479 f SSL is already │ │ │ │ +001884a0: 2069 6e69 7469 616c 697a 6564 2065 6c73 initialized els │ │ │ │ +001884b0: 6577 6865 7265 2069 6e20 7468 6973 2061 ewhere in this a │ │ │ │ +001884c0: 7070 6c69 6361 7469 6f6e 2920 2a2f 3c2f pplication) */
    .
    soap_init │ │ │ │ +00188550: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +00188580: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    . │ │ │ │ +001885a0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_ssl_c │ │ │ │ +00188620: 6c69 656e 745f 636f 6e74 6578 743c 2f61 lient_context(&so │ │ │ │ +00188660: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
    .< │ │ │ │ +00188670: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00188680: 3e20 203c 6120 636c 6173 733d 2263 6f64 > SOAP_SSL_DEF │ │ │ │ +001886e0: 4155 4c54 3c2f 613e 2c20 3c2f 6469 763e AULT,
    │ │ │ │ +001886f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    "client.pe │ │ │ │ +00188730: 6d26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 m", │ │ │ │ +00188740: 2020 2020 2020 203c 7370 616e 2063 6c61 /* │ │ │ │ +00188760: 6b65 7966 696c 653a 2072 6571 7569 7265 keyfile: require │ │ │ │ +00188770: 6420 6f6e 6c79 2077 6865 6e20 636c 6965 d only when clie │ │ │ │ +00188780: 6e74 206d 7573 7420 6175 7468 656e 7469 nt must authenti │ │ │ │ +00188790: 6361 7465 2074 6f20 7365 7276 6572 2028 cate to server ( │ │ │ │ +001887a0: 7365 6520 5353 4c20 646f 6373 206f 6e20 see SSL docs on │ │ │ │ +001887b0: 686f 7720 746f 206f 6274 6169 6e20 7468 how to obtain th │ │ │ │ +001887c0: 6973 2066 696c 6529 202a 2f3c 2f73 7061 is file) */
    .
    " │ │ │ │ +00188810: 7061 7373 776f 7264 2671 756f 743b 3c2f password", │ │ │ │ +00188830: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* passwor │ │ │ │ +00188850: 6420 746f 2072 6561 6420 7468 6520 6b65 d to read the ke │ │ │ │ +00188860: 7920 6669 6c65 2028 6e6f 7420 7573 6564 y file (not used │ │ │ │ +00188870: 2077 6974 6820 474e 5554 4c53 2920 2a2f with GNUTLS) */ │ │ │ │ +00188880: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00188890: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001888a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > & │ │ │ │ +001888c0: 7175 6f74 3b63 6163 6572 7473 2e70 656d quot;cacerts.pem │ │ │ │ +001888d0: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", │ │ │ │ +001888e0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* ca │ │ │ │ +00188900: 6365 7274 2066 696c 6520 746f 2073 746f cert file to sto │ │ │ │ +00188910: 7265 2074 7275 7374 6564 2063 6572 7469 re trusted certi │ │ │ │ +00188920: 6669 6361 7465 7320 286e 6565 6465 6420 ficates (needed │ │ │ │ +00188930: 746f 2076 6572 6966 7920 7365 7276 6572 to verify server │ │ │ │ +00188940: 2920 2a2f 3c2f 7370 616e 3e20 3c2f 6469 ) */ .
    NULL, │ │ │ │ +00188970: 2020 2020 2020 2020 2020 2020 3c73 7061 /* capath to d │ │ │ │ +001889a0: 6972 6563 746f 7279 2077 6974 6820 7472 irectory with tr │ │ │ │ +001889b0: 7573 7465 6420 6365 7274 6966 6963 6174 usted certificat │ │ │ │ +001889c0: 6573 202a 2f3c 2f73 7061 6e3e 203c 2f64 es */ .
    NULL │ │ │ │ +001889f0: 2020 2020 203c 7370 616e 2063 6c61 7373 /* if │ │ │ │ +00188a10: 2072 616e 6466 696c 6521 3d4e 554c 4c3a randfile!=NULL: │ │ │ │ +00188a20: 2075 7365 2061 2066 696c 6520 7769 7468 use a file with │ │ │ │ +00188a30: 2072 616e 646f 6d20 6461 7461 2074 6f20 random data to │ │ │ │ +00188a40: 7365 6564 2072 616e 646f 6d6e 6573 7320 seed randomness │ │ │ │ +00188a50: 2a2f 3c2f 7370 616e 3e20 203c 2f64 6976 */
    .
    ))
    . │ │ │ │ +00188a90: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    ..
    ex │ │ │ │ +00188b70: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE) │ │ │ │ +00188b80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    } .
    soap_call_ │ │ │ │ +00188bc0: 6e73 5f5f 6d79 6d65 7468 6f64 2826 616d ns__mymethod(&am │ │ │ │ +00188bd0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, & │ │ │ │ +00188c20: 7175 6f74 3b68 7474 7073 3a2f 2f64 6f6d quot;https://dom │ │ │ │ +00188c30: 6169 6e2f 7061 7468 2f73 6563 7572 652e ain/path/secure. │ │ │ │ +00188c40: 6367 6926 7175 6f74 3b3c 2f73 7061 6e3e cgi" │ │ │ │ +00188c50: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ +00188c70: 756f 743b 2671 756f 743b 3c2f 7370 616e uot;", ...);
    .< │ │ │ │ +00188c90: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ +00188ca0: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ +00188cb0: 705f 5f73 736c 5f68 746d 6c5f 6761 3236 p__ssl_html_ga26 │ │ │ │ +00188cc0: 3963 3737 3332 6231 6364 6139 6463 3739 9c7732b1cda9dc79 │ │ │ │ +00188cd0: 6462 3038 6663 6266 3164 3534 3338 223e db08fcbf1d5438"> │ │ │ │ +00188ce0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    int │ │ │ │ +00188d70: 2073 6f61 705f 7373 6c5f 636c 6965 6e74 soap_ssl_client │ │ │ │ +00188d80: 5f63 6f6e 7465 7874 2873 7472 7563 7420 _context(struct │ │ │ │ +00188d90: 736f 6170 202a 736f 6170 2c20 736f 6170 soap *soap, soap │ │ │ │ +00188da0: 5f73 736c 5f66 6c61 6773 2066 6c61 6773 _ssl_flags flags │ │ │ │ +00188db0: 2c20 636f 6e73 7420 6368 6172 202a 6b65 , const char *ke │ │ │ │ +00188dc0: 7966 696c 652c 2063 6f6e 7374 2063 6861 yfile, const cha │ │ │ │ +00188dd0: 7220 2a70 6173 7377 6f72 642c 2063 6f6e r *password, con │ │ │ │ +00188de0: 7374 2063 6861 7220 2a63 6166 696c 652c st char *cafile, │ │ │ │ +00188df0: 2063 6f6e 7374 2063 6861 7220 2a63 6170 const char *cap │ │ │ │ +00188e00: 6174 682c 2063 6f6e 7374 2063 6861 7220 ath, const char │ │ │ │ +00188e10: 2a72 616e 6466 696c 6529 3c2f 6469 763e *randfile)
    │ │ │ │ +00188e20: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Initialize th │ │ │ │ +00188e40: 6520 636c 6965 6e74 2d73 6964 6520 5353 e client-side SS │ │ │ │ +00188e50: 4c2f 544c 5320 636f 6e74 6578 742e 3c2f L/TLS context.
    .

    This also assum │ │ │ │ -0018adb0: 6573 2074 6861 7420 7468 6520 7365 7276 es that the serv │ │ │ │ -0018adc0: 6572 2064 6f65 7320 6e6f 7420 7265 7175 er does not requ │ │ │ │ -0018add0: 6972 6520 636c 6965 6e74 7320 746f 2061 ire clients to a │ │ │ │ -0018ade0: 7574 6865 6e74 6963 6174 6520 2874 6865 uthenticate (the │ │ │ │ -0018adf0: 206b 6579 6669 6c65 2069 7320 6162 7365 keyfile is abse │ │ │ │ -0018ae00: 6e74 292e 3c2f 703e 0a3c 703e 4d61 6b65 nt).

    .

    Make │ │ │ │ -0018ae10: 2073 7572 6520 796f 7520 6861 7665 2073 sure you have s │ │ │ │ -0018ae20: 6967 6e61 6c20 6861 6e64 6c65 7273 2073 ignal handlers s │ │ │ │ -0018ae30: 6574 2069 6e20 796f 7572 2061 7070 6c69 et in your appli │ │ │ │ -0018ae40: 6361 7469 6f6e 2074 6f20 6361 7463 6820 cation to catch │ │ │ │ -0018ae50: 6272 6f6b 656e 2063 6f6e 6e65 6374 696f broken connectio │ │ │ │ -0018ae60: 6e73 2028 3c63 6f64 653e 5349 4750 4950 ns (SIGPIP │ │ │ │ -0018ae70: 453c 2f63 6f64 653e 293a 3c2f 703e 0a3c E):

    .< │ │ │ │ -0018ae80: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -0018ae90: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    signal(SI │ │ │ │ -0018aeb0: 4750 4950 452c 2073 6967 7069 7065 5f68 GPIPE, sigpipe_h │ │ │ │ -0018aec0: 616e 646c 6529 3b3c 2f64 6976 3e0a 3c2f andle);
    .

    where, f │ │ │ │ -0018aef0: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ -0018af00: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    void si │ │ │ │ -0018af50: 6770 6970 655f 6861 6e64 6c65 283c 7370 gpipe_handle(int x) { }
    .< │ │ │ │ -0018af90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>
    Warning
    It is impo │ │ │ │ -0018afe0: 7274 616e 7420 7468 6174 2074 6865 203c rtant that the < │ │ │ │ -0018aff0: 636f 6465 3e23 5749 5448 5f4f 5045 4e53 code>#WITH_OPENS │ │ │ │ -0018b000: 534c 3c2f 636f 6465 3e20 6d61 6372 6f20 SL macro │ │ │ │ -0018b010: 6973 2063 6f6e 7369 7374 656e 746c 7920 is consistently │ │ │ │ -0018b020: 6465 6669 6e65 6420 746f 2063 6f6d 7069 defined to compi │ │ │ │ -0018b030: 6c65 2074 6865 2073 6f75 7263 6573 2c20 le the sources, │ │ │ │ -0018b040: 7375 6368 2061 7320 3c65 6d3e 3c63 6f64 such as gsoap/stdsoap2 │ │ │ │ -0018b060: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp │ │ │ │ -0018b070: 2c20 3c65 6d3e 3c63 6f64 653e 736f 6170 , soap │ │ │ │ -0018b080: 432e 6370 703c 2f63 6f64 653e 3c2f 656d C.cpp, soa │ │ │ │ -0018b0a0: 7043 6c69 656e 742e 6370 703c 2f63 6f64 pClient.cpp, soapServer.cp │ │ │ │ -0018b0d0: 703c 2f63 6f64 653e 3c2f 656d 3e2c 2061 p, a │ │ │ │ -0018b0e0: 6e64 2061 6c6c 2061 7070 6c69 6361 7469 nd all applicati │ │ │ │ -0018b0f0: 6f6e 2073 6f75 7263 6573 2074 6861 7420 on sources that │ │ │ │ -0018b100: 696e 636c 7564 6520 3c65 6d3e 3c63 6f64 include gsoap/stdsoap2 │ │ │ │ -0018b120: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 206f .h o │ │ │ │ -0018b130: 7220 3c65 6d3e 3c63 6f64 653e 736f 6170 r soap │ │ │ │ -0018b140: 482e 683c 2f63 6f64 653e 3c2f 656d 3e2e H.h. │ │ │ │ -0018b150: 2049 6620 7468 6520 6d61 6372 6f73 2061 If the macros a │ │ │ │ -0018b160: 7265 206e 6f74 2063 6f6e 7369 7374 656e re not consisten │ │ │ │ -0018b170: 746c 7920 7573 6564 2c20 7468 6520 6170 tly used, the ap │ │ │ │ -0018b180: 706c 6963 6174 696f 6e20 7769 6c6c 2063 plication will c │ │ │ │ -0018b190: 7261 7368 2064 7565 2074 6f20 6120 6d69 rash due to a mi │ │ │ │ -0018b1a0: 736d 6174 6368 6573 2069 6e20 7468 6520 smatches in the │ │ │ │ -0018b1b0: 6465 636c 6172 6174 696f 6e20 616e 6420 declaration and │ │ │ │ -0018b1c0: 6163 6365 7373 206f 6620 7468 6520 3c63 access of the │ │ │ │ -0018b220: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap │ │ │ │ -0018b230: 636f 6e74 6578 742e 2041 6c74 6572 6e61 context. Alterna │ │ │ │ -0018b240: 7469 7665 6c79 2c20 7573 6520 6c69 6272 tively, use libr │ │ │ │ -0018b250: 6172 7920 3c62 3e3c 636f 6465 3e2d 6c67 ary -lg │ │ │ │ -0018b260: 736f 6170 7373 6c3c 2f63 6f64 653e 3c2f soapssl or - │ │ │ │ -0018b280: 6c67 736f 6170 7373 6c2b 2b3c 2f63 6f64 lgsoapssl++ and compi │ │ │ │ -0018b2a0: 6c65 2065 7665 7279 7468 696e 6720 656c le everything el │ │ │ │ -0018b2b0: 7365 2077 6974 6820 3c63 6f64 653e 2357 se with #W │ │ │ │ -0018b2c0: 4954 485f 4f50 454e 5353 4c3c 2f63 6f64 ITH_OPENSSL.
    .
    .Co │ │ │ │ -0018b2e0: 6e63 7572 7265 6e74 2063 6c69 656e 7420 ncurrent client │ │ │ │ -0018b2f0: 6361 6c6c 7320 7769 7468 2074 6872 6561 calls with threa │ │ │ │ -0018b300: 6473 2073 686f 756c 6420 7573 6520 7365 ds should use se │ │ │ │ -0018b310: 7061 7261 7465 203c 636f 6465 3e3c 6120 parate soap context │ │ │ │ -0018b380: 7320 496e 2061 6464 6974 696f 6e2c 2074 s In addition, t │ │ │ │ -0018b390: 6865 2074 6872 6561 6420 696e 6974 6961 he thread initia │ │ │ │ -0018b3a0: 6c69 7a61 7469 6f6e 2063 6f64 6520 6469 lization code di │ │ │ │ -0018b3b0: 7363 7573 7365 6420 696e 2053 6563 7469 scussed in Secti │ │ │ │ -0018b3c0: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on Secure Web serv │ │ │ │ -0018b400: 6963 6573 2077 6974 6820 4854 5450 533c ices with HTTPS< │ │ │ │ -0018b410: 2f61 3e20 6d75 7374 2062 6520 7573 6564 /a> must be used │ │ │ │ -0018b420: 2074 6f20 7072 6f70 6572 6c79 2073 6574 to properly set │ │ │ │ -0018b430: 7570 204f 7065 6e53 534c 2069 6e20 6120 up OpenSSL in a │ │ │ │ -0018b440: 6d75 6c74 692d 7468 7265 6164 6564 2063 multi-threaded c │ │ │ │ -0018b450: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio │ │ │ │ -0018b460: 6e2e 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e n.
    .

    │ │ │ │ -0018b470: 5365 6520 616c 736f 2041 5049 2064 6f63 See also API doc │ │ │ │ -0018b480: 756d 656e 7461 7469 6f6e 204d 6f64 756c umentation Modul │ │ │ │ -0018b490: 6520 3c61 2063 6c61 7373 3d22 656c 2220 e SS │ │ │ │ -0018b4c0: 4c2f 544c 5320 636f 6e74 6578 7420 616e L/TLS context an │ │ │ │ -0018b4d0: 6420 6675 6e63 7469 6f6e 733c 2f61 3e20 d functions │ │ │ │ -0018b4e0: 666f 7220 6d6f 7265 2064 6574 6169 6c73 for more details │ │ │ │ -0018b4f0: 206f 6e20 7468 6520 5353 4c2f 544c 5320 on the SSL/TLS │ │ │ │ -0018b500: 6675 6e63 7469 6f6e 732e 3c2f 703e 0a3c functions.

    .< │ │ │ │ -0018b510: 703e 596f 7520 6361 6e20 616c 736f 2075 p>You can also u │ │ │ │ -0018b520: 7365 2074 6865 2057 696e 496e 6574 2069 se the WinInet i │ │ │ │ -0018b530: 6e74 6572 6661 6365 2074 6f20 6573 7461 nterface to esta │ │ │ │ -0018b540: 626c 6973 6820 7365 6375 7265 2048 5454 blish secure HTT │ │ │ │ -0018b550: 5053 2063 6f6e 6e65 6374 696f 6e73 206f PS connections o │ │ │ │ -0018b560: 6e20 5769 6e64 6f77 7320 6d61 6368 696e n Windows machin │ │ │ │ -0018b570: 6573 2c20 6176 6169 6c61 626c 6520 696e es, available in │ │ │ │ -0018b580: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g │ │ │ │ -0018b590: 736f 6170 2f6d 6f64 5f67 736f 6170 3c2f soap/mod_gsoap direc │ │ │ │ -0018b5b0: 746f 7279 206f 6620 7468 6520 6753 4f41 tory of the gSOA │ │ │ │ -0018b5c0: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa │ │ │ │ -0018b5d0: 636b 6167 652c 2073 6565 2061 6c73 6f20 ckage, see also │ │ │ │ -0018b5e0: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section The WinIne │ │ │ │ -0018b620: 7420 706c 7567 696e 3c2f 613e 2e20 4f72 t plugin. Or │ │ │ │ -0018b630: 2079 6f75 2063 616e 2075 7365 2074 6865 you can use the │ │ │ │ -0018b640: 2043 5552 4c20 706c 7567 696e 2074 6f20 CURL plugin to │ │ │ │ -0018b650: 7573 6520 4355 524c 2074 6f20 6573 7461 use CURL to esta │ │ │ │ -0018b660: 626c 6973 6820 7365 6375 7265 2048 5454 blish secure HTT │ │ │ │ -0018b670: 5053 2063 6f6e 6e65 6374 696f 6e73 2c20 PS connections, │ │ │ │ -0018b680: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section The CURL │ │ │ │ -0018b6c0: 706c 7567 696e 3c2f 613e 2e3c 2f70 3e0a plugin.

    . │ │ │ │ -0018b6d0: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ -0018b6f0: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    │ │ │ │ -0018b740: 0a53 534c 2061 7574 6865 6e74 6963 6174 .SSL authenticat │ │ │ │ -0018b750: 696f 6e20 6361 6c6c 6261 636b 733c 2f68 ion callbacks.

    The │ │ │ │ -0018b770: 6673 736c 6175 7468 3c2f 636f 6465 3e20 fsslauth │ │ │ │ -0018b780: 6361 6c6c 6261 636b 2066 756e 6374 696f callback functio │ │ │ │ -0018b790: 6e20 636f 6e74 726f 6c73 204f 7065 6e53 n controls OpenS │ │ │ │ -0018b7a0: 534c 2f47 4e55 544c 5320 6175 7468 656e SL/GNUTLS authen │ │ │ │ -0018b7b0: 7469 6361 7469 6f6e 2069 6e69 7469 616c tication initial │ │ │ │ -0018b7c0: 697a 6174 696f 6e3a 3c2f 703e 0a3c 756c ization:

    .
      .
    • int │ │ │ │ -0018b7e0: 283c 6120 636c 6173 733d 2265 6c22 2068 (soap:: │ │ │ │ -0018b870: 6673 736c 6175 7468 3c2f 613e 2928 7374 fsslauth)(st │ │ │ │ -0018b880: 7275 6374 2073 6f61 7020 2a73 6f61 7029 ruct soap *soap) │ │ │ │ -0018b890: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal │ │ │ │ -0018b8a0: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ -0018b8b0: 746f 2069 6e69 7469 616c 697a 6520 7468 to initialize th │ │ │ │ -0018b8c0: 6520 4f70 656e 5353 4c20 6f72 2047 4e55 e OpenSSL or GNU │ │ │ │ -0018b8d0: 544c 5320 636f 6e74 6578 7420 666f 7220 TLS context for │ │ │ │ -0018b8e0: 4854 5450 5320 636f 6e6e 6563 7469 6f6e HTTPS connection │ │ │ │ -0018b8f0: 7320 636f 6e66 6967 7572 6564 2077 6974 s configured wit │ │ │ │ -0018b900: 6820 7468 6520 7061 7261 6d65 7465 7273 h the parameters │ │ │ │ -0018b910: 2070 6173 7365 6420 746f 203c 636f 6465 passed to soap_ssl_cli │ │ │ │ -0018b9b0: 656e 745f 636f 6e74 6578 743c 2f61 3e3c ent_context< │ │ │ │ -0018b9c0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap_ssl_ser │ │ │ │ -0018ba60: 7665 725f 636f 6e74 6578 743c 2f61 3e3c ver_context< │ │ │ │ -0018ba70: 2f63 6f64 653e 2e20 5265 7475 726e 7320 /code>. Returns │ │ │ │ -0018ba80: 3c63 6f64 653e 2353 4f41 505f 4f4b 3c2f #SOAP_OK or a soap_status (int) e │ │ │ │ -0018bb70: 7272 6f72 2063 6f64 652e 2054 6865 2062 rror code. The b │ │ │ │ -0018bb80: 7569 6c74 2d69 6e20 6675 6e63 7469 6f6e uilt-in function │ │ │ │ -0018bb90: 2061 7373 6967 6e65 6420 746f 203c 636f assigned to soap │ │ │ │ -0018bc30: 3a3a 6673 736c 6175 7468 3c2f 613e 3c2f ::fsslauth is s │ │ │ │ -0018bc50: 736c 5f61 7574 685f 696e 6974 3c2f 636f sl_auth_init.
    • .
    . │ │ │ │ -0018bc70: 3c70 3e54 6865 203c 636f 6465 3e66 7373

    The fss │ │ │ │ -0018bc80: 6c76 6572 6966 793c 2f63 6f64 653e 2063 lverify c │ │ │ │ -0018bc90: 616c 6c62 6163 6b20 6675 6e63 7469 6f6e allback function │ │ │ │ -0018bca0: 2063 6f6e 7472 6f6c 7320 4f70 656e 5353 controls OpenSS │ │ │ │ -0018bcb0: 4c20 7065 6572 2063 6572 7469 6669 6361 L peer certifica │ │ │ │ -0018bcc0: 7465 2076 6572 6966 6963 6174 696f 6e2c te verification, │ │ │ │ -0018bcd0: 2076 6961 2069 6e74 6572 6e61 6c6c 7920 via internally │ │ │ │ -0018bce0: 696e 766f 6b69 6e67 203c 636f 6465 3e53 invoking S │ │ │ │ -0018bcf0: 534c 5f43 5458 5f73 6574 5f76 6572 6966 SL_CTX_set_verif │ │ │ │ -0018bd00: 793c 2f63 6f64 653e 3a3c 2f70 3e0a 3c75 y:

    ..
  • int │ │ │ │ -0018bd20: 2028 736f 6170 3a3a 6673 7376 6572 6966 (soap::fssverif │ │ │ │ -0018bd30: 7929 2869 6e74 206f 6b2c 2058 3530 395f y)(int ok, X509_ │ │ │ │ -0018bd40: 5354 4f52 455f 4354 5820 2a73 746f 7265 STORE_CTX *store │ │ │ │ -0018bd50: 3c2f 636f 6465 3e20 5468 6973 2063 616c This cal │ │ │ │ -0018bd60: 6c62 6163 6b20 6973 2063 616c 6c65 6420 lback is called │ │ │ │ -0018bd70: 6279 2074 6865 2065 6e67 696e 6520 746f by the engine to │ │ │ │ -0018bd80: 206d 616e 6167 6520 7468 6520 7665 7269 manage the veri │ │ │ │ -0018bd90: 6669 6361 7469 6f6e 206f 6620 7468 6520 fication of the │ │ │ │ -0018bda0: 6365 7274 6966 6963 6174 6520 7072 6f76 certificate prov │ │ │ │ -0018bdb0: 6964 6564 2062 7920 6120 7065 6572 2c20 ided by a peer, │ │ │ │ -0018bdc0: 7375 6368 2061 7320 7468 6520 6365 7274 such as the cert │ │ │ │ -0018bdd0: 6966 6963 6174 6520 7072 6f76 6964 6564 ificate provided │ │ │ │ -0018bde0: 2062 7920 6120 7365 7276 6572 2063 6f6e by a server con │ │ │ │ -0018bdf0: 6e65 6374 6564 206f 7665 7220 4854 5450 nected over HTTP │ │ │ │ -0018be00: 5320 6f72 2074 6f20 7665 7269 6679 2074 S or to verify t │ │ │ │ -0018be10: 6865 2063 6572 7469 6669 6361 7465 2069 he certificate i │ │ │ │ -0018be20: 6e63 6c75 6465 6420 7769 7468 2061 2057 ncluded with a W │ │ │ │ -0018be30: 532d 5365 6375 7269 7479 206d 6573 7361 S-Security messa │ │ │ │ -0018be40: 6765 2e20 546f 2072 6571 7569 7265 2063 ge. To require c │ │ │ │ -0018be50: 6572 7469 6669 6361 7465 2076 6572 6966 ertificate verif │ │ │ │ -0018be60: 6963 6174 696f 6e20 6f66 2061 2073 6572 ication of a ser │ │ │ │ -0018be70: 7665 7220 636f 6e6e 6563 7465 6420 7669 ver connected vi │ │ │ │ -0018be80: 6120 4854 5450 532c 2075 7365 203c 636f a HTTPS, use soap_ssl_c │ │ │ │ -0018bf20: 6c69 656e 745f 636f 6e74 6578 743c 2f61 lient_context with #SOAP_SSL_RE │ │ │ │ -0018bf50: 5155 4952 455f 5345 5256 4552 5f41 5554 QUIRE_SERVER_AUT │ │ │ │ -0018bf60: 4845 4e54 4943 4154 494f 4e3c 2f63 6f64 HENTICATION. To require c │ │ │ │ -0018bf80: 6572 7469 6669 6361 7465 2076 6572 6966 ertificate verif │ │ │ │ -0018bf90: 6963 6174 696f 6e20 6f66 2061 2063 6c69 ication of a cli │ │ │ │ -0018bfa0: 656e 7420 636f 6e6e 6563 7465 6420 746f ent connected to │ │ │ │ -0018bfb0: 2061 2073 6572 7665 722c 2075 7365 203c a server, use < │ │ │ │ -0018bfc0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_ssl │ │ │ │ -0018c050: 5f73 6572 7665 725f 636f 6e74 6578 743c _server_context< │ │ │ │ -0018c060: 2f61 3e3c 2f63 6f64 653e 2077 6974 6820 /a> with │ │ │ │ -0018c070: 3c63 6f64 653e 2353 4f41 505f 5353 4c5f #SOAP_SSL_ │ │ │ │ -0018c080: 5245 5155 4952 455f 434c 4945 4e54 5f41 REQUIRE_CLIENT_A │ │ │ │ -0018c090: 5554 4845 4e54 4943 4154 494f 4e3c 2f63 UTHENTICATION. The │ │ │ │ -0018c0b0: 6f6b 3c2f 636f 6465 3e20 7061 7261 6d65 ok parame │ │ │ │ -0018c0c0: 7465 7220 6f66 2074 6869 7320 6361 6c6c ter of this call │ │ │ │ -0018c0d0: 6261 636b 2069 6e64 6963 6174 6573 2077 back indicates w │ │ │ │ -0018c0e0: 6865 7468 6572 2074 6865 2076 6572 6966 hether the verif │ │ │ │ -0018c0f0: 6963 6174 696f 6e20 6f66 2074 6865 2063 ication of the c │ │ │ │ -0018c100: 6572 7469 6669 6361 7465 2069 6e20 7175 ertificate in qu │ │ │ │ -0018c110: 6573 7469 6f6e 2070 6173 7365 6420 283c estion passed (< │ │ │ │ -0018c120: 636f 6465 3e6f 6b3c 2f63 6f64 653e 203d code>ok = │ │ │ │ -0018c130: 3d20 3129 206f 7220 6661 696c 6564 2028 = 1) or failed ( │ │ │ │ -0018c140: 3c63 6f64 653e 6f6b 3c2f 636f 6465 3e20 ok │ │ │ │ -0018c150: 3d3d 2030 2920 6173 2064 6574 6572 6d69 == 0) as determi │ │ │ │ -0018c160: 6e65 6420 6279 2074 6865 204f 7065 6e53 ned by the OpenS │ │ │ │ -0018c170: 534c 206c 6962 7261 7279 2062 6173 6564 SL library based │ │ │ │ -0018c180: 206f 6e20 7468 6520 3c63 6f64 653e 3c61 on the soap_ssl_client │ │ │ │ -0018c220: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 636f _context or │ │ │ │ -0018c2c0: 736f 6170 5f73 736c 5f73 6572 7665 725f soap_ssl_server_ │ │ │ │ -0018c2d0: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context configuration │ │ │ │ -0018c2f0: 2e20 4966 2074 6865 2063 616c 6c62 6163 . If the callbac │ │ │ │ -0018c300: 6b20 7265 7475 726e 7320 3120 7468 656e k returns 1 then │ │ │ │ -0018c310: 2074 6865 2068 616e 6473 6861 6b65 2069 the handshake i │ │ │ │ -0018c320: 7320 636f 6e74 696e 7565 6420 616e 6420 s continued and │ │ │ │ -0018c330: 7468 6520 636f 6e6e 6563 7469 6f6e 206d the connection m │ │ │ │ -0018c340: 6179 6265 2065 7374 6162 6c69 7368 6564 aybe established │ │ │ │ -0018c350: 2e20 546f 2072 6574 7572 6e20 3120 7768 . To return 1 wh │ │ │ │ -0018c360: 656e 203c 636f 6465 3e6f 6b3c 2f63 6f64 en ok == 0 requires │ │ │ │ -0018c380: 2072 6573 6574 7469 6e67 2074 6865 2065 resetting the e │ │ │ │ -0018c390: 7272 6f72 2073 7461 7465 2077 6974 6820 rror state with │ │ │ │ -0018c3a0: 3c63 6f64 653e 5835 3039 5f53 544f 5245 X509_STORE │ │ │ │ -0018c3b0: 5f43 5458 5f73 6574 5f65 7272 6f72 2873 _CTX_set_error(s │ │ │ │ -0018c3c0: 746f 7265 2c20 5835 3039 5f56 5f4f 4b29 tore, X509_V_OK) │ │ │ │ -0018c3d0: 3c2f 636f 6465 3e2e 2049 6620 7468 6520 . If the │ │ │ │ -0018c3e0: 6361 6c6c 6261 636b 2072 6574 7572 6e73 callback returns │ │ │ │ -0018c3f0: 2030 2074 6865 6e20 7468 6520 6861 6e64 0 then the hand │ │ │ │ -0018c400: 7368 616b 6520 6973 2069 6d6d 6564 6961 shake is immedia │ │ │ │ -0018c410: 7465 6c79 2074 6572 6d69 6e61 7465 6420 tely terminated │ │ │ │ -0018c420: 7769 7468 2022 7665 7269 6669 6361 7469 with "verificati │ │ │ │ -0018c430: 6f6e 2066 6169 6c65 6422 2061 6e64 2061 on failed" and a │ │ │ │ -0018c440: 2076 6572 6966 6963 6174 696f 6e20 6661 verification fa │ │ │ │ -0018c450: 696c 7572 6520 616c 6572 7420 6973 2073 ilure alert is s │ │ │ │ -0018c460: 656e 7420 746f 2074 6865 2070 6565 722e ent to the peer. │ │ │ │ -0018c470: 2054 6865 2062 7569 6c74 2d69 6e20 6675 The built-in fu │ │ │ │ -0018c480: 6e63 7469 6f6e 2061 7373 6967 6e65 6420 nction assigned │ │ │ │ -0018c490: 746f 203c 636f 6465 3e3c 6120 636c 6173 to soap::fsslv │ │ │ │ -0018c560: 6572 6966 793c 2f61 3e3c 2f63 6f64 653e erify │ │ │ │ -0018c570: 2069 7320 3c63 6f64 653e 7373 6c5f 7665 is ssl_ve │ │ │ │ -0018c580: 7269 6679 5f63 616c 6c62 6163 6b3c 2f63 rify_callback or when #SOAP_SSL_ALL │ │ │ │ -0018c5b0: 4f57 5f45 5850 4952 4544 5f43 4552 5449 OW_EXPIRED_CERTI │ │ │ │ -0018c5c0: 4649 4341 5445 3c2f 636f 6465 3e20 6973 FICATE is │ │ │ │ -0018c5d0: 2075 7365 6420 3c63 6f64 653e 7373 6c5f used ssl_ │ │ │ │ -0018c5e0: 7665 7269 6679 5f63 616c 6c62 6163 6b5f verify_callback_ │ │ │ │ -0018c5f0: 616c 6c6f 775f 6578 7069 7265 645f 6365 allow_expired_ce │ │ │ │ -0018c600: 7274 6966 6963 6174 653c 2f63 6f64 653e rtificate │ │ │ │ -0018c610: 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c 703e .
  • ..

    │ │ │ │ -0018c620: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -0018c640: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .SSL certi │ │ │ │ -0018c680: 6669 6361 7465 7320 616e 6420 6b65 7920 ficates and key │ │ │ │ -0018c690: 6669 6c65 733c 2f68 323e 0a3c 703e 5468 files

    .

    Th │ │ │ │ -0018c6a0: 6520 6753 4f41 5020 7061 636b 6167 6520 e gSOAP package │ │ │ │ -0018c6b0: 696e 636c 7564 6573 2061 203c 656d 3e3c includes a < │ │ │ │ -0018c6c0: 636f 6465 3e63 6163 6572 7473 2e70 656d code>cacerts.pem │ │ │ │ -0018c6d0: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil │ │ │ │ -0018c6e0: 6520 7769 7468 2074 6865 2063 6572 7469 e with the certi │ │ │ │ -0018c6f0: 6669 6361 7465 7320 6f66 2061 6c6c 2063 ficates of all c │ │ │ │ -0018c700: 6572 7469 6669 6361 7465 2061 7574 686f ertificate autho │ │ │ │ -0018c710: 7269 7469 6573 2e20 596f 7520 6361 6e20 rities. You can │ │ │ │ -0018c720: 7573 6520 7468 6973 2066 696c 6520 746f use this file to │ │ │ │ -0018c730: 2076 6572 6966 7920 7468 6520 6175 7468 verify the auth │ │ │ │ -0018c740: 656e 7469 6361 7469 6f6e 206f 6620 7365 entication of se │ │ │ │ -0018c750: 7276 6572 7320 7468 6174 2070 726f 7669 rvers that provi │ │ │ │ -0018c760: 6465 2063 6572 7469 6669 6361 7465 7320 de certificates │ │ │ │ -0018c770: 6973 7375 6564 2062 7920 7468 6573 6520 issued by these │ │ │ │ -0018c780: 4341 732e 204a 7573 7420 7365 7420 7468 CAs. Just set th │ │ │ │ -0018c790: 6520 3c63 6f64 653e 6361 6669 6c65 3c2f e cafile parameter │ │ │ │ -0018c7b0: 746f 2074 6865 206c 6f63 6174 696f 6e20 to the location │ │ │ │ -0018c7c0: 6f66 2074 6869 7320 6669 6c65 206f 6e20 of this file on │ │ │ │ -0018c7d0: 796f 7572 2066 696c 6520 7379 7374 656d your file system │ │ │ │ -0018c7e0: 2e20 5468 6572 6566 6f72 652c 2077 6865 . Therefore, whe │ │ │ │ -0018c7f0: 6e20 796f 7520 6f62 7461 696e 2061 2063 n you obtain a c │ │ │ │ -0018c800: 6572 7469 6669 6361 7465 2073 6967 6e65 ertificate signe │ │ │ │ -0018c810: 6420 6279 2061 2074 7275 7374 6564 2043 d by a trusted C │ │ │ │ -0018c820: 4120 796f 7520 6361 6e20 7369 6d70 6c79 A you can simply │ │ │ │ -0018c830: 2075 7365 2074 6865 203c 656d 3e3c 636f use the cacerts.pem file │ │ │ │ -0018c860: 746f 2064 6576 656c 6f70 2063 6c69 656e to develop clien │ │ │ │ -0018c870: 7420 6170 706c 6963 6174 696f 6e73 2074 t applications t │ │ │ │ -0018c880: 6861 7420 6361 6e20 7665 7269 6679 2074 hat can verify t │ │ │ │ -0018c890: 6865 2061 7574 6865 6e74 6963 6974 7920 he authenticity │ │ │ │ -0018c8a0: 6f66 2079 6f75 7220 7365 7276 6572 2e3c of your server.< │ │ │ │ -0018c8b0: 2f70 3e0a 3c70 3e41 6c74 6572 6e61 7469 /p>.

    Alternati │ │ │ │ -0018c8c0: 7665 6c79 2c20 796f 7520 6361 6e20 7573 vely, you can us │ │ │ │ -0018c8d0: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the │ │ │ │ -0018c8e0: 6773 6f61 702f 706c 7567 696e 2f63 6163 gsoap/plugin/cac │ │ │ │ -0018c8f0: 6572 7473 2e68 3c2f 636f 6465 3e3c 2f65 erts.h and gsoap/plugin/ca │ │ │ │ -0018c920: 6365 7274 732e 633c 2f63 6f64 653e 3c2f certs.c code to embe │ │ │ │ -0018c940: 6420 4341 2063 6572 7469 6669 6361 7465 d CA certificate │ │ │ │ -0018c950: 7320 696e 2079 6f75 7220 636c 6965 6e74 s in your client │ │ │ │ -0018c960: 2063 6f64 652e 3c2f 703e 0a3c 703e 466f code.

    .

    Fo │ │ │ │ -0018c970: 7220 7379 7374 656d 7320 6261 7365 6420 r systems based │ │ │ │ -0018c980: 6f6e 204d 6963 726f 736f 6674 2077 696e on Microsoft win │ │ │ │ -0018c990: 646f 7773 2c20 7468 6520 5769 6e49 6e65 dows, the WinIne │ │ │ │ -0018c9a0: 7420 6d6f 6475 6c65 2063 616e 2062 6520 t module can be │ │ │ │ -0018c9b0: 7573 6564 2069 6e73 7465 6164 2c20 7365 used instead, se │ │ │ │ -0018c9c0: 6520 7468 6520 3c63 6f64 653e 5245 4144 e the READ │ │ │ │ -0018c9d0: 4d45 2e74 7874 3c2f 636f 6465 3e20 6c6f ME.txt lo │ │ │ │ -0018c9e0: 6361 7465 6420 696e 2074 6865 2067 534f cated in the gSO │ │ │ │ -0018c9f0: 4150 2073 6f75 7263 6520 636f 6465 2070 AP source code p │ │ │ │ -0018ca00: 6163 6b61 6765 2075 6e64 6572 203c 636f ackage under mod_gsoap/gso │ │ │ │ -0018ca20: 6170 5f77 696e 2f77 696e 696e 6574 3c2f ap_win/wininet, see the g │ │ │ │ -0018ca40: 534f 4150 203c 6120 6872 6566 3d22 2e2e SOAP Win │ │ │ │ -0018ca70: 496e 6574 2070 6c75 6769 6e3c 2f61 3e20 Inet plugin │ │ │ │ -0018ca80: 646f 6375 6d65 6e74 6174 696f 6e2e 3c2f documentation..

    The other │ │ │ │ -0018caa0: 3c65 6d3e 3c63 6f64 653e 2e70 656d 3c2f .pem files │ │ │ │ -0018cac0: 2069 6e20 7468 6520 6753 4f41 5020 7061 in the gSOAP pa │ │ │ │ -0018cad0: 636b 6167 6520 6172 6520 6578 616d 706c ckage are exampl │ │ │ │ -0018cae0: 6573 206f 6620 7365 6c66 2d73 6967 6e65 es of self-signe │ │ │ │ -0018caf0: 6420 6365 7274 6966 6963 6174 6573 2066 d certificates f │ │ │ │ -0018cb00: 6f72 2074 6573 7469 6e67 2070 7572 706f or testing purpo │ │ │ │ -0018cb10: 7365 7320 283c 656d 3e3c 636f 6465 3e63 ses (c │ │ │ │ -0018cb20: 6163 6572 742e 7065 6d3c 2f63 6f64 653e acert.pem │ │ │ │ -0018cb30: 3c2f 656d 3e2c 203c 656d 3e3c 636f 6465 , client.pem, server.pem). The │ │ │ │ -0018cb80: 3c65 6d3e 3c63 6f64 653e 636c 6965 6e74 client │ │ │ │ -0018cb90: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem │ │ │ │ -0018cba0: 2061 6e64 203c 656d 3e3c 636f 6465 3e73 and s │ │ │ │ -0018cbb0: 6572 7665 722e 7065 6d3c 2f63 6f64 653e erver.pem │ │ │ │ -0018cbc0: 3c2f 656d 3e20 636f 6e74 6169 6e20 7468 contain th │ │ │ │ -0018cbd0: 6520 7072 6976 6174 6520 6b65 7920 616e e private key an │ │ │ │ -0018cbe0: 6420 6365 7274 6966 6963 6174 6520 6f66 d certificate of │ │ │ │ -0018cbf0: 2074 6865 2063 6c69 656e 7420 6f72 2073 the client or s │ │ │ │ -0018cc00: 6572 7665 722c 2072 6573 7065 6374 6976 erver, respectiv │ │ │ │ -0018cc10: 656c 792e 2054 6865 206b 6579 6669 6c65 ely. The keyfile │ │ │ │ -0018cc20: 7320 283c 656d 3e3c 636f 6465 3e63 6c69 s (cli │ │ │ │ -0018cc30: 656e 742e 7065 6d3c 2f63 6f64 653e 3c2f ent.pem and server.pem) are cr │ │ │ │ -0018cc70: 6561 7465 6420 6279 2063 6f6e 6361 7465 eated by concate │ │ │ │ -0018cc80: 6e61 7469 6e67 2074 6865 2070 7269 7661 nating the priva │ │ │ │ -0018cc90: 7465 206b 6579 2050 454d 2077 6974 6820 te key PEM with │ │ │ │ -0018cca0: 7468 6520 6365 7274 6966 6963 6174 6520 the certificate │ │ │ │ -0018ccb0: 5045 4d2e 2054 6865 206b 6579 6669 6c65 PEM. The keyfile │ │ │ │ -0018ccc0: 2073 686f 756c 6420 6e6f 7420 6265 2073 should not be s │ │ │ │ -0018ccd0: 6861 7265 6420 7769 7468 2061 6e79 2070 hared with any p │ │ │ │ -0018cce0: 6172 7479 2e20 5769 7468 204f 7065 6e53 arty. With OpenS │ │ │ │ -0018ccf0: 534c 2c20 796f 7520 6361 6e20 656e 6372 SL, you can encr │ │ │ │ -0018cd00: 7970 7420 7468 6520 6b65 7966 696c 6573 ypt the keyfiles │ │ │ │ -0018cd10: 2077 6974 6820 6120 7061 7373 776f 7264 with a password │ │ │ │ -0018cd20: 2074 6f20 6f66 6665 7220 736f 6d65 2070 to offer some p │ │ │ │ -0018cd30: 726f 7465 6374 696f 6e20 616e 6420 7468 rotection and th │ │ │ │ -0018cd40: 6520 7061 7373 776f 7264 2069 7320 7573 e password is us │ │ │ │ -0018cd50: 6564 2069 6e20 7468 6520 636c 6965 6e74 ed in the client │ │ │ │ -0018cd60: 2f73 6572 7665 7220 636f 6465 2074 6f20 /server code to │ │ │ │ -0018cd70: 7265 6164 2074 6865 206b 6579 6669 6c65 read the keyfile │ │ │ │ -0018cd80: 2e20 474e 5554 4c53 2064 6f65 7320 6e6f . GNUTLS does no │ │ │ │ -0018cd90: 7420 7375 7070 6f72 7420 7468 6973 2066 t support this f │ │ │ │ -0018cda0: 6561 7475 7265 2061 6e64 2063 616e 6e6f eature and canno │ │ │ │ -0018cdb0: 7420 656e 6372 7970 7420 6f72 2064 6563 t encrypt or dec │ │ │ │ -0018cdc0: 7279 7074 2061 206b 6579 6669 6c65 2e3c rypt a keyfile.< │ │ │ │ -0018cdd0: 2f70 3e0a 3c70 3e59 6f75 2063 616e 2061 /p>.

    You can a │ │ │ │ -0018cde0: 6c73 6f20 6372 6561 7465 2079 6f75 7220 lso create your │ │ │ │ -0018cdf0: 6f77 6e20 7365 6c66 2d73 6967 6e65 6420 own self-signed │ │ │ │ -0018ce00: 6365 7274 6966 6963 6174 6573 2e20 5468 certificates. Th │ │ │ │ -0018ce10: 6572 6520 6973 206d 6f72 6520 7468 616e ere is more than │ │ │ │ -0018ce20: 206f 6e65 2077 6179 2074 6f20 6765 6e65 one way to gene │ │ │ │ -0018ce30: 7261 7465 2074 6865 206e 6563 6573 7361 rate the necessa │ │ │ │ -0018ce40: 7279 2066 696c 6573 2066 6f72 2063 6c69 ry files for cli │ │ │ │ -0018ce50: 656e 7473 2061 6e64 2073 6572 7665 7273 ents and servers │ │ │ │ -0018ce60: 2e20 5365 6520 3c61 2068 7265 663d 2268 . See http://ww │ │ │ │ -0018ce90: 772e 6f70 656e 7373 6c2e 6f72 673c 2f61 w.openssl.org for informatio │ │ │ │ -0018ceb0: 6e20 6f6e 204f 7065 6e53 534c 2061 6e64 n on OpenSSL and │ │ │ │ -0018cec0: 203c 6120 6872 6566 3d22 6874 7470 3a2f htt │ │ │ │ -0018cef0: 703a 2f2f 7369 616c 2e6f 7267 2f68 6f77 p://sial.org/how │ │ │ │ -0018cf00: 746f 2f6f 7065 6e73 736c 2f63 612f 3c2f to/openssl/ca/ on how to set │ │ │ │ -0018cf20: 7570 2061 6e64 206d 616e 6167 6520 6120 up and manage a │ │ │ │ -0018cf30: 6c6f 6361 6c20 4341 2061 6e64 203c 6120 local CA and http://sial.org │ │ │ │ -0018cf80: 2f68 6f77 746f 2f6f 7065 6e73 736c 2f73 /howto/openssl/s │ │ │ │ -0018cf90: 656c 662d 7369 676e 6564 3c2f 613e 206f elf-signed o │ │ │ │ -0018cfa0: 6e20 686f 7720 746f 2073 6574 7570 2073 n how to setup s │ │ │ │ -0018cfb0: 656c 662d 7369 676e 6564 2074 6573 7420 elf-signed test │ │ │ │ -0018cfc0: 6365 7274 6966 6963 6174 6573 2e3c 2f70 certificates.

    .

    It is possi │ │ │ │ -0018cfe0: 626c 6520 746f 2063 6f6e 7665 7274 2049 ble to convert I │ │ │ │ -0018cff0: 4953 2d67 656e 6572 6174 6564 2063 6572 IS-generated cer │ │ │ │ -0018d000: 7469 6669 6361 7465 7320 746f 2050 454d tificates to PEM │ │ │ │ -0018d010: 2066 6f72 6d61 7420 7769 7468 2074 6865 format with the │ │ │ │ -0018d020: 206f 7065 6e73 736c 206c 6962 7261 7279 openssl library │ │ │ │ -0018d030: 2061 6e64 206f 7065 6e73 736c 2063 6f6d and openssl com │ │ │ │ -0018d040: 6d61 6e64 2d6c 696e 6520 746f 6f6c 3a20 mand-line tool: │ │ │ │ -0018d050: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

    openss
    │ │ │ │ -0018d070: 6c20 7835 3039 202d 696e 206d 7963 6572  l x509 -in mycer
    │ │ │ │ -0018d080: 742e 6365 7220 2d69 6e66 6f72 6d20 4445  t.cer -inform DE
    │ │ │ │ -0018d090: 5220 2d6f 7574 206d 7963 6572 742e 7065  R -out mycert.pe
    │ │ │ │ -0018d0a0: 6d20 2d6f 7574 666f 726d 2050 454d 0a3c  m -outform PEM.<
    │ │ │ │ -0018d0b0: 2f70 7265 3e3c 703e 2054 6869 7320 636f  /pre>

    This co │ │ │ │ -0018d0c0: 6e76 6572 7473 2074 6865 2043 5254 2d66 nverts the CRT-f │ │ │ │ -0018d0d0: 6f72 6d61 7474 6564 206d 7963 6572 742e ormatted mycert. │ │ │ │ -0018d0e0: 6365 7220 746f 2050 454d 2d66 6f72 6d61 cer to PEM-forma │ │ │ │ -0018d0f0: 7474 6564 206d 7963 6572 742e 7065 6d2e tted mycert.pem. │ │ │ │ -0018d100: 3c2f 703e 0a3c 703e 4865 7265 2069 7320

    .

    Here is │ │ │ │ -0018d110: 7468 6520 7369 6d70 6c65 7374 2077 6179 the simplest way │ │ │ │ -0018d120: 2074 6f20 7365 7475 7020 7365 6c66 2d73 to setup self-s │ │ │ │ -0018d130: 6967 6e65 6420 6365 7274 6966 6963 6174 igned certificat │ │ │ │ -0018d140: 6573 2e20 4669 7273 7420 796f 7520 6e65 es. First you ne │ │ │ │ -0018d150: 6564 2074 6f20 6372 6561 7465 2061 2070 ed to create a p │ │ │ │ -0018d160: 7269 7661 7465 2043 6572 7469 6669 6361 rivate Certifica │ │ │ │ -0018d170: 7465 2041 7574 686f 7269 7479 2028 4341 te Authority (CA │ │ │ │ -0018d180: 292e 2054 6865 2043 4120 6973 2075 7365 ). The CA is use │ │ │ │ -0018d190: 6420 696e 2053 534c 2074 6f20 7665 7269 d in SSL to veri │ │ │ │ -0018d1a0: 6679 2074 6865 2061 7574 6865 6e74 6963 fy the authentic │ │ │ │ -0018d1b0: 6974 7920 6f66 2061 2067 6976 656e 2063 ity of a given c │ │ │ │ -0018d1c0: 6572 7469 6669 6361 7465 2e20 5468 6520 ertificate. The │ │ │ │ -0018d1d0: 4341 2061 6374 7320 6173 2061 2074 7275 CA acts as a tru │ │ │ │ -0018d1e0: 7374 6564 2074 6869 7264 2070 6172 7479 sted third party │ │ │ │ -0018d1f0: 2077 686f 2068 6173 2061 7574 6865 6e74 who has authent │ │ │ │ -0018d200: 6963 6174 6564 2074 6865 2075 7365 7220 icated the user │ │ │ │ -0018d210: 6f66 2074 6865 2073 6967 6e65 6420 6365 of the signed ce │ │ │ │ -0018d220: 7274 6966 6963 6174 6520 6173 2062 6569 rtificate as bei │ │ │ │ -0018d230: 6e67 2077 686f 2074 6865 7920 7361 792e ng who they say. │ │ │ │ -0018d240: 2054 6865 2063 6572 7469 6669 6361 7465 The certificate │ │ │ │ -0018d250: 2069 7320 7369 676e 6564 2062 7920 7468 is signed by th │ │ │ │ -0018d260: 6520 4341 2c20 616e 6420 6966 2074 6865 e CA, and if the │ │ │ │ -0018d270: 2063 6c69 656e 7420 7472 7573 7473 2074 client trusts t │ │ │ │ -0018d280: 6865 2043 412c 2069 7420 7769 6c6c 2074 he CA, it will t │ │ │ │ -0018d290: 7275 7374 2079 6f75 7220 6365 7274 6966 rust your certif │ │ │ │ -0018d2a0: 6963 6174 652e 2046 6f72 2075 7365 2077 icate. For use w │ │ │ │ -0018d2b0: 6974 6869 6e20 796f 7572 206f 7267 616e ithin your organ │ │ │ │ -0018d2c0: 697a 6174 696f 6e2c 2061 2070 7269 7661 ization, a priva │ │ │ │ -0018d2d0: 7465 2043 4120 7769 6c6c 2070 726f 6261 te CA will proba │ │ │ │ -0018d2e0: 626c 7920 7365 7276 6520 796f 7572 206e bly serve your n │ │ │ │ -0018d2f0: 6565 6473 2e20 486f 7765 7665 722c 2069 eeds. However, i │ │ │ │ -0018d300: 6620 796f 7520 696e 7465 6e64 2075 7365 f you intend use │ │ │ │ -0018d310: 2079 6f75 7220 6365 7274 6966 6963 6174 your certificat │ │ │ │ -0018d320: 6573 2066 6f72 2061 2070 7562 6c69 6320 es for a public │ │ │ │ -0018d330: 7365 7276 6963 652c 2079 6f75 2073 686f service, you sho │ │ │ │ -0018d340: 756c 6420 7072 6f62 6162 6c79 206f 6274 uld probably obt │ │ │ │ -0018d350: 6169 6e20 6120 6365 7274 6966 6963 6174 ain a certificat │ │ │ │ -0018d360: 6520 6672 6f6d 2061 206b 6e6f 776e 2043 e from a known C │ │ │ │ -0018d370: 412e 2049 6e20 6164 6469 7469 6f6e 2074 A. In addition t │ │ │ │ -0018d380: 6f20 6964 656e 7469 6669 6361 7469 6f6e o identification │ │ │ │ -0018d390: 2c20 796f 7572 2063 6572 7469 6669 6361 , your certifica │ │ │ │ -0018d3a0: 7465 2069 7320 616c 736f 2075 7365 6420 te is also used │ │ │ │ -0018d3b0: 666f 7220 656e 6372 7970 7469 6f6e 2e3c for encryption.< │ │ │ │ -0018d3c0: 2f70 3e0a 3c70 3e43 7265 6174 696e 6720 /p>.

    Creating │ │ │ │ -0018d3d0: 6365 7274 6966 6963 6174 6573 2073 686f certificates sho │ │ │ │ -0018d3e0: 756c 6420 6265 2064 6f6e 6520 7468 726f uld be done thro │ │ │ │ -0018d3f0: 7567 6820 6120 4341 2074 6f20 6f62 7461 ugh a CA to obta │ │ │ │ -0018d400: 696e 2073 6967 6e65 6420 6365 7274 6966 in signed certif │ │ │ │ -0018d410: 6963 6174 6573 2e20 4275 7420 796f 7520 icates. But you │ │ │ │ -0018d420: 6361 6e20 6372 6561 7465 2079 6f75 7220 can create your │ │ │ │ -0018d430: 6f77 6e20 6365 7274 6966 6963 6174 6573 own certificates │ │ │ │ -0018d440: 2066 6f72 2074 6573 7469 6e67 2070 7572 for testing pur │ │ │ │ -0018d450: 706f 7365 7320 6173 2066 6f6c 6c6f 7773 poses as follows │ │ │ │ -0018d460: 2e3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e47 .

    .
      .
    • G │ │ │ │ -0018d470: 6f20 746f 2074 6865 204f 7065 6e53 534c o to the OpenSSL │ │ │ │ -0018d480: 2062 696e 2064 6972 6563 746f 7279 2028 bin directory ( │ │ │ │ -0018d490: 3c63 6f64 653e 2f75 7372 2f6c 6f63 616c /usr/local │ │ │ │ -0018d4a0: 2f73 736c 3c2f 636f 6465 3e20 6279 2064 /ssl by d │ │ │ │ -0018d4b0: 6566 6175 6c74 2061 6e64 203c 636f 6465 efault and /System/Library │ │ │ │ -0018d4d0: 2f4f 7065 6e53 534c 3c2f 636f 6465 3e20 /OpenSSL │ │ │ │ -0018d4e0: 6f6e 204d 6163 204f 5320 5829 3c2f 6c69 on Mac OS X)
    • .
    • There shou │ │ │ │ -0018d500: 6c64 2062 6520 6120 6669 6c65 2063 616c ld be a file cal │ │ │ │ -0018d510: 6c65 6420 6f70 656e 7373 6c2e 636e 663c led openssl.cnf< │ │ │ │ -0018d520: 2f6c 693e 0a3c 6c69 3e43 7265 6174 6520 /li>.
    • Create │ │ │ │ -0018d530: 6120 6e65 7720 6469 7265 6374 6f72 7920 a new directory │ │ │ │ -0018d540: 696e 2079 6f75 7220 686f 6d65 2061 6363 in your home acc │ │ │ │ -0018d550: 6f75 6e74 2c20 652e 672e 2024 484f 4d45 ount, e.g. $HOME │ │ │ │ -0018d560: 2f43 412c 2061 6e64 2063 6f70 7920 7468 /CA, and copy th │ │ │ │ -0018d570: 6520 6f70 656e 7373 6c2e 636e 6620 6669 e openssl.cnf fi │ │ │ │ -0018d580: 6c65 2074 6f20 7468 6973 2064 6972 6563 le to this direc │ │ │ │ -0018d590: 746f 7279 3c2f 6c69 3e0a 3c6c 693e 4d6f tory
    • .
    • Mo │ │ │ │ -0018d5a0: 6469 6679 206f 7065 6e73 736c 2e63 6e66 dify openssl.cnf │ │ │ │ -0018d5b0: 2062 7920 6368 616e 6769 6e67 2074 6865 by changing the │ │ │ │ -0018d5c0: 2027 6469 7227 2076 616c 7565 2074 6f20 'dir' value to │ │ │ │ -0018d5d0: 484f 4d45 2f43 413c 2f6c 693e 0a3c 6c69 HOME/CA
    • .
    • Copy the README │ │ │ │ -0018d5f0: 2e74 7874 2c20 726f 6f74 2e73 682c 2061 .txt, root.sh, a │ │ │ │ -0018d600: 6e64 2063 6572 742e 7368 2073 6372 6970 nd cert.sh scrip │ │ │ │ -0018d610: 7473 2066 726f 6d20 7468 6520 6753 4f41 ts from the gSOA │ │ │ │ -0018d620: 5020 736f 7572 6365 2063 6f64 6520 7061 P source code pa │ │ │ │ -0018d630: 636b 6167 6520 6c6f 6361 7465 6420 696e ckage located in │ │ │ │ -0018d640: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g │ │ │ │ -0018d650: 736f 6170 2f73 616d 706c 6573 2f73 736c soap/samples/ssl │ │ │ │ -0018d660: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir │ │ │ │ -0018d670: 6563 746f 7279 2074 6f20 484f 4d45 2f43 ectory to HOME/C │ │ │ │ -0018d680: 413c 2f6c 693e 0a3c 6c69 3e46 6f6c 6c6f A
    • .
    • Follo │ │ │ │ -0018d690: 7720 7468 6520 5245 4144 4d45 2e74 7874 w the README.txt │ │ │ │ -0018d6a0: 2069 6e73 7472 7563 7469 6f6e 733c 2f6c instructions.
    .

    You │ │ │ │ -0018d6c0: 6e6f 7720 6861 7665 2061 2073 656c 662d now have a self- │ │ │ │ -0018d6d0: 7369 676e 6564 2043 4120 726f 6f74 2063 signed CA root c │ │ │ │ -0018d6e0: 6572 7469 6669 6361 7465 2063 6163 6572 ertificate cacer │ │ │ │ -0018d6f0: 742e 7065 6d20 616e 6420 6120 7365 7276 t.pem and a serv │ │ │ │ -0018d700: 6572 2e70 656d 2028 6f72 2063 6c69 656e er.pem (or clien │ │ │ │ -0018d710: 742e 7065 6d29 2063 6572 7469 6669 6361 t.pem) certifica │ │ │ │ -0018d720: 7465 2069 6e20 5045 4d20 666f 726d 6174 te in PEM format │ │ │ │ -0018d730: 2e20 5468 6520 6361 6365 7274 2e70 656d . The cacert.pem │ │ │ │ -0018d740: 2063 6572 7469 6669 6361 7465 2069 7320 certificate is │ │ │ │ -0018d750: 7573 6564 2069 6e20 7468 6520 3c63 6f64 used in the cafile │ │ │ │ -0018d770: 7061 7261 6d65 7465 7220 6f66 2074 6865 parameter of the │ │ │ │ -0018d780: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_s │ │ │ │ -0018d810: 736c 5f63 6c69 656e 745f 636f 6e74 6578 sl_client_contex │ │ │ │ -0018d820: 743c 2f61 3e3c 2f63 6f64 653e 2028 6f72 t (or │ │ │ │ -0018d830: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_s │ │ │ │ -0018d8c0: 736c 5f73 6572 7665 725f 636f 6e74 6578 sl_server_contex │ │ │ │ -0018d8d0: 743c 2f61 3e3c 2f63 6f64 653e 2920 6174 t) at │ │ │ │ -0018d8e0: 2074 6865 2063 6c69 656e 7420 286f 7220 the client (or │ │ │ │ -0018d8f0: 7365 7276 6572 2920 7369 6465 2074 6f20 server) side to │ │ │ │ -0018d900: 7665 7269 6679 2074 6865 2061 7574 6865 verify the authe │ │ │ │ -0018d910: 6e74 6963 6974 7920 6f66 2074 6865 2070 nticity of the p │ │ │ │ -0018d920: 6565 722e 2059 6f75 2063 616e 2061 6c73 eer. You can als │ │ │ │ -0018d930: 6f20 7072 6f76 6964 6520 6120 6361 7061 o provide a capa │ │ │ │ -0018d940: 7468 2070 6172 616d 6574 6572 2074 6f20 th parameter to │ │ │ │ -0018d950: 7468 6573 6520 7472 7573 7465 6420 6365 these trusted ce │ │ │ │ -0018d960: 7274 6966 6963 6174 6573 2e20 5468 6520 rtificates. The │ │ │ │ -0018d970: 7365 7276 6572 2e70 656d 2028 6f72 2063 server.pem (or c │ │ │ │ -0018d980: 6c69 656e 742e 7065 6d29 206d 7573 7420 lient.pem) must │ │ │ │ -0018d990: 6265 2070 726f 7669 6465 6420 7769 7468 be provided with │ │ │ │ -0018d9a0: 2074 6865 203c 636f 6465 3e3c 6120 636c the so │ │ │ │ -0018da30: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co │ │ │ │ -0018da40: 6e74 6578 743c 2f61 3e3c 2f63 6f64 653e ntext │ │ │ │ -0018da50: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s │ │ │ │ -0018da60: 6964 6520 286f 7220 3c63 6f64 653e 3c61 ide (or soap_ssl_client │ │ │ │ -0018db00: 5f63 6f6e 7465 7874 3c2f 613e 3c2f 636f _context at the clien │ │ │ │ -0018db20: 7420 7369 6465 2920 746f 6765 7468 6572 t side) together │ │ │ │ -0018db30: 2077 6974 6820 7468 6520 7061 7373 776f with the passwo │ │ │ │ -0018db40: 7264 2079 6f75 2065 6e74 6572 6564 2077 rd you entered w │ │ │ │ -0018db50: 6865 6e20 6765 6e65 7261 7469 6e67 2074 hen generating t │ │ │ │ -0018db60: 6865 2063 6572 7469 6669 6361 7465 2075 he certificate u │ │ │ │ -0018db70: 7369 6e67 2063 6572 742e 7368 2074 6f20 sing cert.sh to │ │ │ │ -0018db80: 6163 6365 7373 2074 6865 2066 696c 652e access the file. │ │ │ │ -0018db90: 2054 6865 7365 2063 6572 7469 6669 6361 These certifica │ │ │ │ -0018dba0: 7465 7320 6d75 7374 2062 6520 7072 6573 tes must be pres │ │ │ │ -0018dbb0: 656e 7420 746f 2067 7261 6e74 2061 7574 ent to grant aut │ │ │ │ -0018dbc0: 6865 6e74 6963 6174 696f 6e20 7265 7175 hentication requ │ │ │ │ -0018dbd0: 6573 7473 2062 7920 7065 6572 732e 2049 ests by peers. I │ │ │ │ -0018dbe0: 6e20 6164 6469 7469 6f6e 2c20 7468 6520 n addition, the │ │ │ │ -0018dbf0: 7365 7276 6572 2e70 656d 2028 616e 6420 server.pem (and │ │ │ │ -0018dc00: 636c 6965 6e74 2e70 656d 2920 696e 636c client.pem) incl │ │ │ │ -0018dc10: 7564 6520 7468 6520 686f 7374 206e 616d ude the host nam │ │ │ │ -0018dc20: 6520 6f66 2074 6865 206d 6163 6869 6e65 e of the machine │ │ │ │ -0018dc30: 206f 6e20 7768 6963 6820 7468 6520 6170 on which the ap │ │ │ │ -0018dc40: 706c 6963 6174 696f 6e20 7275 6e73 2028 plication runs ( │ │ │ │ -0018dc50: 652e 672e 206c 6f63 616c 686f 7374 292c e.g. localhost), │ │ │ │ -0018dc60: 2073 6f20 796f 7520 6e65 6564 2074 6f20 so you need to │ │ │ │ -0018dc70: 6765 6e65 7261 7465 206e 6577 2063 6572 generate new cer │ │ │ │ -0018dc80: 7469 6669 6361 7465 7320 7768 656e 206d tificates when m │ │ │ │ -0018dc90: 6967 7261 7469 6e67 2061 2073 6572 7665 igrating a serve │ │ │ │ -0018dca0: 7220 286f 7220 636c 6965 6e74 292e 3c2f r (or client)..

    Finally, y │ │ │ │ -0018dcc0: 6f75 206e 6565 6420 746f 2067 656e 6572 ou need to gener │ │ │ │ -0018dcd0: 6174 6520 4469 6666 6965 2d48 656c 6d61 ate Diffie-Helma │ │ │ │ -0018dce0: 6e6e 2028 4448 2920 7061 7261 6d65 7465 nn (DH) paramete │ │ │ │ -0018dcf0: 7273 2066 6f72 2074 6865 2073 6572 7665 rs for the serve │ │ │ │ -0018dd00: 7220 6966 2079 6f75 2077 6973 6820 746f r if you wish to │ │ │ │ -0018dd10: 2075 7365 2044 4820 696e 7374 6561 6420 use DH instead │ │ │ │ -0018dd20: 6f66 2052 5341 2e20 5468 6572 6520 6172 of RSA. There ar │ │ │ │ -0018dd30: 6520 7477 6f20 6f70 7469 6f6e 733a 3c2f e two options:.

      .
    • Set │ │ │ │ -0018dd50: 7468 6520 3c63 6f64 653e 6468 6669 6c65 the dhfile │ │ │ │ -0018dd60: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ -0018dd70: 7220 746f 2074 6865 206e 756d 6572 6963 r to the numeric │ │ │ │ -0018dd80: 2044 4820 7072 696d 6520 6c65 6e67 7468 DH prime length │ │ │ │ -0018dd90: 2069 6e20 6269 7473 2072 6571 7569 7265 in bits require │ │ │ │ -0018dda0: 6420 2866 6f72 2065 7861 6d70 6c65 2022 d (for example " │ │ │ │ -0018ddb0: 3130 3234 2229 2074 6f20 6c65 7420 7468 1024") to let th │ │ │ │ -0018ddc0: 6520 656e 6769 6e65 2067 656e 6572 6174 e engine generat │ │ │ │ -0018ddd0: 6520 4448 2070 6172 616d 6574 6572 7320 e DH parameters │ │ │ │ -0018dde0: 6174 2069 6e69 7469 616c 697a 6174 696f at initializatio │ │ │ │ -0018ddf0: 6e2e 2054 6869 7320 6361 6e20 6265 2074 n. This can be t │ │ │ │ -0018de00: 696d 6520 636f 6e73 756d 696e 672e 3c2f ime consuming..
    • Provide │ │ │ │ -0018de20: 6120 6669 6c65 206e 616d 6520 666f 7220 a file name for │ │ │ │ -0018de30: 7468 6520 3c63 6f64 653e 6468 6669 6c65 the dhfile │ │ │ │ -0018de40: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ -0018de50: 7220 6f66 203c 636f 6465 3e3c 6120 636c r of so │ │ │ │ -0018dee0: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co │ │ │ │ -0018def0: 6e74 6578 743c 2f61 3e3c 2f63 6f64 653e ntext │ │ │ │ -0018df00: 2e20 5468 6520 6669 6c65 2073 686f 756c . The file shoul │ │ │ │ -0018df10: 6420 6265 2067 656e 6572 6174 6564 2062 d be generated b │ │ │ │ -0018df20: 6566 6f72 6568 616e 642e 2054 6f20 646f eforehand. To do │ │ │ │ -0018df30: 2073 6f20 7769 7468 2074 6865 204f 7065 so with the Ope │ │ │ │ -0018df40: 6e53 534c 2063 6f6d 6d61 6e64 206c 696e nSSL command lin │ │ │ │ -0018df50: 6520 746f 6f6c 2c20 7573 653a 203c 7072 e tool, use: openssl dhpa │ │ │ │ -0018df80: 7261 6d20 2d6f 7574 666f 726d 2050 454d ram -outform PEM │ │ │ │ -0018df90: 202d 6f75 7420 6468 2e70 656d 2035 3132 -out dh.pem 512 │ │ │ │ -0018dfa0: 0a3c 2f70 7265 3e20 4669 6c65 203c 656d .
    File dh512.pem │ │ │ │ -0018dfc0: 3c2f 636f 6465 3e3c 2f65 6d3e 2069 7320 is │ │ │ │ -0018dfd0: 7468 6520 6f75 7470 7574 2066 696c 6520 the output file │ │ │ │ -0018dfe0: 616e 6420 3531 3220 6973 2074 6865 206e and 512 is the n │ │ │ │ -0018dff0: 756d 6265 7220 6f66 2062 6974 7320 7573 umber of bits us │ │ │ │ -0018e000: 6564 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ed...< │ │ │ │ -0018e010: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -0018e030: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -0018e040: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .SSL h │ │ │ │ -0018e070: 6172 6477 6172 6520 6163 6365 6c65 7261 ardware accelera │ │ │ │ -0018e080: 7469 6f6e 3c2f 6832 3e0a 3c70 3e59 6f75 tion

    .

    You │ │ │ │ -0018e090: 2063 616e 2073 7065 6369 6679 2061 2068 can specify a h │ │ │ │ -0018e0a0: 6172 6477 6172 6520 656e 6769 6e65 2074 ardware engine t │ │ │ │ -0018e0b0: 6f20 656e 6162 6c65 2068 6172 6477 6172 o enable hardwar │ │ │ │ -0018e0c0: 6520 7375 7070 6f72 7420 666f 7220 6372 e support for cr │ │ │ │ -0018e0d0: 7970 746f 6772 6170 6869 6320 6163 6365 yptographic acce │ │ │ │ -0018e0e0: 6c65 7261 7469 6f6e 2e20 5468 6973 2063 leration. This c │ │ │ │ -0018e0f0: 616e 2062 6520 646f 6e65 206f 6e63 6520 an be done once │ │ │ │ -0018e100: 696e 2061 2073 6572 7665 7220 6f72 2063 in a server or c │ │ │ │ -0018e110: 6c69 656e 7420 7769 7468 2074 6865 2066 lient with the f │ │ │ │ -0018e120: 6f6c 6c6f 7769 6e67 2073 7461 7465 6d65 ollowing stateme │ │ │ │ -0018e130: 6e74 733a 3c2f 703e 0a3c 6469 7620 636c nts:

    .
    < │ │ │ │ -0018e150: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0018e160: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static const │ │ │ │ -0018e1a0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *e │ │ │ │ -0018e1d0: 6e67 696e 6520 3d20 3c73 7061 6e20 636c ngine = "cswift │ │ │ │ -0018e200: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; < │ │ │ │ -0018e210: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0018e220: 656e 7422 3e2f 2a20 656e 6769 6e65 206e ent">/* engine n │ │ │ │ -0018e230: 616d 6520 2a2f 3c2f 7370 616e 3e20 3c2f ame */ .
    int main │ │ │ │ -0018e280: 2829 203c 2f64 6976 3e0a 3c64 6976 2063 ()
    .
    {.
    ENGINE * │ │ │ │ -0018e2c0: 653b 203c 2f64 6976 3e0a 3c64 6976 2063 e;
    .
    if (!(e = ENGINE_ │ │ │ │ -0018e310: 6279 5f69 6428 656e 6769 6e65 2929 2920 by_id(engine))) │ │ │ │ -0018e320: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    fpr │ │ │ │ -0018e340: 696e 7466 2873 7464 6572 722c 203c 7370 intf(stderr, "E │ │ │ │ -0018e370: 7272 6f72 2066 696e 6469 6e67 2065 6e67 rror finding eng │ │ │ │ -0018e380: 696e 6520 2573 5c6e 2671 756f 743b 3c2f ine %s\n", engine); │ │ │ │ -0018e3a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else │ │ │ │ -0018e3e0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!ENGINE_se │ │ │ │ -0018e410: 745f 6465 6661 756c 7428 652c 2045 4e47 t_default(e, ENG │ │ │ │ -0018e420: 494e 455f 4d45 5448 4f44 5f41 4c4c 2929 INE_METHOD_ALL)) │ │ │ │ -0018e430: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    fp │ │ │ │ -0018e450: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, " │ │ │ │ -0018e480: 4572 726f 7220 7573 696e 6720 656e 6769 Error using engi │ │ │ │ -0018e490: 6e65 2025 735c 6e26 7175 6f74 3b3c 2f73 ne %s\n", engine); < │ │ │ │ -0018e4b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    }
    .

    The foll │ │ │ │ -0018e530: 6f77 696e 6720 7461 626c 6520 6c69 7374 owing table list │ │ │ │ -0018e540: 7320 7468 6520 6e61 6d65 7320 6f66 2074 s the names of t │ │ │ │ -0018e550: 6865 2068 6172 6477 6172 6520 616e 6420 he hardware and │ │ │ │ -0018e560: 736f 6674 7761 7265 2065 6e67 696e 6573 software engines │ │ │ │ -0018e570: 3a3c 2f70 3e0a 3c74 6162 6c65 2063 6c61 :

    .

    type property │ │ │ │ +00153180: 2020 203c 2f74 683e 3c74 6820 636c 6173 value │ │ │ │ +001531b0: 2020 203c 2f74 683e 3c2f 7472 3e0a 3c74
    text d │ │ │ │ +00153250: 6573 6372 6962 696e 6720 7468 6520 7363 escribing the sc │ │ │ │ +00153260: 6865 6d61 2074 7970 6520 2020 203c 2f74 hema type
    type │ │ │ │ +001532d0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 an alias │ │ │ │ +00153300: 666f 7220 7468 6520 3c63 6f64 653e 7479 for the ty │ │ │ │ +00153310: 7065 2d64 6f63 756d 656e 7461 7469 6f6e pe-documentation │ │ │ │ +00153320: 3c2f 636f 6465 3e20 7072 6f70 6572 7479 property │ │ │ │ +00153330: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c2f
    ................ │ │ │ │ -0018eb10: 3c2f 7472 3e0a 3c74 7220 636c 6173 733d ......

    .... Back to t │ │ │ │ -0018ec90: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -0018eca0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    . │ │ │ │ -0018ecd0: 5353 4c20 6f6e 2057 696e 646f 7773 3c2f SSL on Windows.

    Set the f │ │ │ │ -0018ecf0: 756c 6c20 7061 7468 2074 6f20 3c65 6d3e ull path to │ │ │ │ -0018ed00: 3c63 6f64 653e 6c69 6273 736c 2e6c 6962 libssl.lib │ │ │ │ -0018ed10: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and │ │ │ │ -0018ed20: 203c 656d 3e3c 636f 6465 3e6c 6962 6372 libcr │ │ │ │ -0018ed30: 7970 746f 2e6c 6962 3c2f 636f 6465 3e3c ypto.lib< │ │ │ │ -0018ed40: 2f65 6d3e 2075 6e64 6572 2074 6865 204d /em> under the M │ │ │ │ -0018ed50: 5356 432b 2b20 2250 726f 6a65 6374 7322 SVC++ "Projects" │ │ │ │ -0018ed60: 206d 656e 752c 2074 6865 6e20 6368 6f6f menu, then choo │ │ │ │ -0018ed70: 7365 2022 4c69 6e6b 223a 2022 4f62 6a65 se "Link": "Obje │ │ │ │ -0018ed80: 6374 2f4d 6f64 756c 6573 222e 2050 6c65 ct/Modules". Ple │ │ │ │ -0018ed90: 6173 6520 6d61 6b65 2073 7572 6520 3c65 ase make sure libssl32 │ │ │ │ -0018edb0: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll │ │ │ │ -0018edc0: 2061 6e64 203c 656d 3e3c 636f 6465 3e6c and l │ │ │ │ -0018edd0: 6962 6561 7933 322e 646c 6c3c 2f63 6f64 ibeay32.dll can be l │ │ │ │ -0018edf0: 6f61 6465 6420 6279 2079 6f75 7220 6170 oaded by your ap │ │ │ │ -0018ee00: 706c 6963 6174 696f 6e73 2c20 7468 7573 plications, thus │ │ │ │ -0018ee10: 2074 6865 7920 6d75 7374 2062 6520 696e they must be in │ │ │ │ -0018ee20: 7374 616c 6c65 6420 7072 6f70 6572 6c79 stalled properly │ │ │ │ -0018ee30: 206f 6e20 7468 6520 7461 7267 6574 206d on the target m │ │ │ │ -0018ee40: 6163 6869 6e65 2e3c 2f70 3e0a 3c70 3e49 achine.

    .

    I │ │ │ │ -0018ee50: 6620 796f 7527 7265 2075 7369 6e67 2063 f you're using c │ │ │ │ -0018ee60: 6f6d 7069 6c61 7469 6f6e 2073 6574 7469 ompilation setti │ │ │ │ -0018ee70: 6e67 7320 7375 6368 2061 7320 3c63 6f64 ngs such as /MTd th │ │ │ │ -0018ee90: 656e 206c 696e 6b20 746f 2074 6865 2063 en link to the c │ │ │ │ -0018eea0: 6f72 7265 6374 203c 656d 3e3c 636f 6465 orrect libeay32MTd.lib │ │ │ │ -0018eec0: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and │ │ │ │ -0018eed0: 203c 656d 3e3c 636f 6465 3e73 736c 6561 sslea │ │ │ │ -0018eee0: 7933 324d 5464 2e6c 6962 3c2f 636f 6465 y32MTd.lib libraries │ │ │ │ -0018ef00: 2e3c 2f70 3e0a 3c70 3e41 6c74 6572 6e61 .

    .

    Alterna │ │ │ │ -0018ef10: 7469 7665 6c79 2c20 796f 7520 6361 6e20 tively, you can │ │ │ │ -0018ef20: 7573 6520 7468 6520 5769 6e49 6e65 7420 use the WinInet │ │ │ │ -0018ef30: 696e 7465 7266 6163 6520 666f 7220 7365 interface for se │ │ │ │ -0018ef40: 6375 7265 2063 6f6e 6e65 6374 696f 6e73 cure connections │ │ │ │ -0018ef50: 2c20 6176 6169 6c61 626c 6520 696e 2074 , available in t │ │ │ │ -0018ef60: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso │ │ │ │ -0018ef70: 6170 2f6d 6f64 5f67 736f 6170 3c2f 636f ap/mod_gsoap directo │ │ │ │ -0018ef90: 7279 206f 6620 7468 6520 6753 4f41 5020 ry of the gSOAP │ │ │ │ -0018efa0: 7061 636b 6167 652c 2073 6565 2061 6c73 package, see als │ │ │ │ -0018efb0: 6f20 5365 6374 696f 6e20 3c61 2063 6c61 o Section The WinI │ │ │ │ -0018eff0: 6e65 7420 706c 7567 696e 3c2f 613e 2e20 net plugin. │ │ │ │ -0018f000: 4f72 2079 6f75 2063 616e 2075 7365 2074 Or you can use t │ │ │ │ -0018f010: 6865 2043 5552 4c20 706c 7567 696e 2074 he CURL plugin t │ │ │ │ -0018f020: 6f20 7573 6520 4355 524c 2066 6f72 2073 o use CURL for s │ │ │ │ -0018f030: 6563 7572 6520 636f 6e6e 6563 7469 6f6e ecure connection │ │ │ │ -0018f040: 732c 2073 6565 2053 6563 7469 6f6e 203c s, see Section < │ │ │ │ -0018f050: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0018f060: 663d 2269 6e64 6578 2e68 746d 6c23 6375 f="index.html#cu │ │ │ │ -0018f070: 726c 706c 7567 696e 223e 5468 6520 4355 rlplugin">The CU │ │ │ │ -0018f080: 524c 2070 6c75 6769 6e3c 2f61 3e2e 3c2f RL plugin..

    .... Back to t │ │ │ │ -0018f0b0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ -0018f0c0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    │ │ │ │ -0018f0f0: 3c2f 613e 0a5a 6c69 6220 636f 6d70 7265 .Zlib compre │ │ │ │ -0018f100: 7373 696f 6e3c 2f68 323e 0a3c 703e 546f ssion

    .

    To │ │ │ │ -0018f110: 2065 6e61 626c 6520 6465 666c 6174 6520 enable deflate │ │ │ │ -0018f120: 616e 6420 677a 6970 2063 6f6d 7072 6573 and gzip compres │ │ │ │ -0018f130: 7369 6f6e 2077 6974 6820 5a6c 6962 2c20 sion with Zlib, │ │ │ │ -0018f140: 696e 7374 616c 6c20 5a6c 6962 2066 726f install Zlib fro │ │ │ │ -0018f150: 6d20 3c61 2068 7265 663d 2268 7474 703a m │ │ │ │ -0018f170: 6874 7470 3a2f 2f77 7777 2e7a 6c69 622e http://www.zlib. │ │ │ │ -0018f180: 6f72 673c 2f61 3e20 6966 206e 6f74 2061 org if not a │ │ │ │ -0018f190: 6c72 6561 6479 2069 6e73 7461 6c6c 6564 lready installed │ │ │ │ -0018f1a0: 206f 6e20 796f 7572 2073 7973 7465 6d2e on your system. │ │ │ │ -0018f1b0: 2043 6f6d 7069 6c65 203c 656d 3e3c 636f Compile gsoap/stdsoap │ │ │ │ -0018f1d0: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp (or │ │ │ │ -0018f1f0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c │ │ │ │ -0018f200: 3c2f 636f 6465 3e3c 2f65 6d3e 2920 616e ) an │ │ │ │ -0018f210: 6420 616c 6c20 796f 7572 2073 6f75 7263 d all your sourc │ │ │ │ -0018f220: 6573 2074 6861 7420 696e 636c 7564 6520 es that include │ │ │ │ -0018f230: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ -0018f240: 7374 6473 6f61 7032 2e68 3c2f 636f 6465 stdsoap2.h or soapH.h with com │ │ │ │ -0018f280: 7069 6c65 2d74 696d 6520 666c 6167 203c pile-time flag < │ │ │ │ -0018f290: 636f 6465 3e23 5749 5448 5f47 5a49 503c code>#WITH_GZIP< │ │ │ │ -0018f2a0: 2f63 6f64 653e 2061 6e64 206c 696e 6b20 /code> and link │ │ │ │ -0018f2b0: 796f 7572 2063 6f64 6520 7769 7468 2074 your code with t │ │ │ │ -0018f2c0: 6865 205a 6c69 6220 6c69 6272 6172 792c he Zlib library, │ │ │ │ -0018f2d0: 2065 2e67 2e20 3c62 3e3c 636f 6465 3e2d e.g. - │ │ │ │ -0018f2e0: 6c7a 3c2f 636f 6465 3e3c 2f62 3e20 6f6e lz on │ │ │ │ -0018f2f0: 2055 6e69 782f 4c69 6e75 7820 706c 6174 Unix/Linux plat │ │ │ │ -0018f300: 666f 726d 732e 3c2f 703e 0a3c 703e 5468 forms.

    .

    Th │ │ │ │ -0018f310: 6520 677a 6970 2063 6f6d 7072 6573 7369 e gzip compressi │ │ │ │ -0018f320: 6f6e 2069 7320 6f72 7468 6f67 6f6e 616c on is orthogonal │ │ │ │ -0018f330: 2074 6f20 616c 6c20 7472 616e 7370 6f72 to all transpor │ │ │ │ -0018f340: 7420 656e 636f 6469 6e67 7320 7375 6368 t encodings such │ │ │ │ -0018f350: 2061 7320 4854 5450 2c20 5353 4c2c 2044 as HTTP, SSL, D │ │ │ │ -0018f360: 494d 452c 2061 6e64 2063 616e 2062 6520 IME, and can be │ │ │ │ -0018f370: 7573 6564 2077 6974 6820 6f74 6865 7220 used with other │ │ │ │ -0018f380: 7472 616e 7370 6f72 7420 6c61 7965 7273 transport layers │ │ │ │ -0018f390: 2e20 596f 7520 6361 6e20 6576 656e 2073 . You can even s │ │ │ │ -0018f3a0: 6176 6520 616e 6420 6c6f 6164 2063 6f6d ave and load com │ │ │ │ -0018f3b0: 7072 6573 7365 6420 584d 4c20 6461 7461 pressed XML data │ │ │ │ -0018f3c0: 2074 6f2f 6672 6f6d 2066 696c 6573 2e3c to/from files.< │ │ │ │ -0018f3d0: 2f70 3e0a 3c70 3e54 776f 2063 6f6d 7072 /p>.

    Two compr │ │ │ │ -0018f3e0: 6573 7369 6f6e 2066 6f72 6d61 7473 2061 ession formats a │ │ │ │ -0018f3f0: 7265 2073 7570 706f 7274 6564 2062 7920 re supported by │ │ │ │ -0018f400: 7468 6520 656e 6769 6e65 3a20 6465 666c the engine: defl │ │ │ │ -0018f410: 6174 6520 616e 6420 677a 6970 2e20 5468 ate and gzip. Th │ │ │ │ -0018f420: 6520 677a 6970 2066 6f72 6d61 7420 6973 e gzip format is │ │ │ │ -0018f430: 2075 7365 6420 6279 2064 6566 6175 6c74 used by default │ │ │ │ -0018f440: 2e20 5468 6520 677a 6970 2066 6f72 6d61 . The gzip forma │ │ │ │ -0018f450: 7420 6861 7320 7365 7665 7261 6c20 6265 t has several be │ │ │ │ -0018f460: 6e65 6669 7473 206f 7665 7220 6465 666c nefits over defl │ │ │ │ -0018f470: 6174 652e 2046 6972 7374 6c79 2c20 7468 ate. Firstly, th │ │ │ │ -0018f480: 6520 656e 6769 6e65 2061 7574 6f6d 6174 e engine automat │ │ │ │ -0018f490: 6963 616c 6c79 2064 6574 6563 7473 2067 ically detects g │ │ │ │ -0018f4a0: 7a69 7020 636f 6d70 7265 7373 6564 2069 zip compressed i │ │ │ │ -0018f4b0: 6e62 6f75 6e64 206d 6573 7361 6765 732c nbound messages, │ │ │ │ -0018f4c0: 2065 7665 6e20 7769 7468 6f75 7420 4854 even without HT │ │ │ │ -0018f4d0: 5450 2068 6561 6465 7273 2c20 6279 2063 TP headers, by c │ │ │ │ -0018f4e0: 6865 636b 696e 6720 666f 7220 7468 6520 hecking for the │ │ │ │ -0018f4f0: 7072 6573 656e 6365 206f 6620 6120 677a presence of a gz │ │ │ │ -0018f500: 6970 2068 6561 6465 7220 696e 2074 6865 ip header in the │ │ │ │ -0018f510: 206d 6573 7361 6765 2063 6f6e 7465 6e74 message content │ │ │ │ -0018f520: 2e20 5365 636f 6e64 6c79 2c20 677a 6970 . Secondly, gzip │ │ │ │ -0018f530: 2069 6e63 6c75 6465 7320 6120 4352 4333 includes a CRC3 │ │ │ │ -0018f540: 3220 6368 6563 6b73 756d 2074 6f20 656e 2 checksum to en │ │ │ │ -0018f550: 7375 7265 206d 6573 7361 6765 7320 6861 sure messages ha │ │ │ │ -0018f560: 7665 2062 6565 6e20 636f 7272 6563 746c ve been correctl │ │ │ │ -0018f570: 7920 7265 6365 6976 6564 2e20 5468 6972 y received. Thir │ │ │ │ -0018f580: 646c 792c 2067 7a69 7020 636f 6d70 7265 dly, gzip compre │ │ │ │ -0018f590: 7373 6564 2063 6f6e 7465 6e74 2063 616e ssed content can │ │ │ │ -0018f5a0: 2062 6520 6465 636f 6d70 7265 7373 6564 be decompressed │ │ │ │ -0018f5b0: 2077 6974 6820 6f74 6865 7220 636f 6d70 with other comp │ │ │ │ -0018f5c0: 7265 7373 696f 6e20 736f 6674 7761 7265 ression software │ │ │ │ -0018f5d0: 2c20 736f 2079 6f75 2063 616e 2064 6563 , so you can dec │ │ │ │ -0018f5e0: 6f6d 7072 6573 7320 584d 4c20 6461 7461 ompress XML data │ │ │ │ -0018f5f0: 2073 6176 6564 2062 7920 6120 6753 4f41 saved by a gSOA │ │ │ │ -0018f600: 5020 6170 706c 6963 6174 696f 6e20 696e P application in │ │ │ │ -0018f610: 2067 7a69 7020 666f 726d 6174 2e3c 2f70 gzip format.

    .

    Gzip compre │ │ │ │ -0018f630: 7373 696f 6e20 6973 2065 6e61 626c 6564 ssion is enabled │ │ │ │ -0018f640: 2062 7920 636f 6d70 696c 696e 6720 7468 by compiling th │ │ │ │ -0018f650: 6520 736f 7572 6365 7320 7769 7468 2063 e sources with c │ │ │ │ -0018f660: 6f6d 7069 6c65 2d74 696d 6520 666c 6167 ompile-time flag │ │ │ │ -0018f670: 203c 636f 6465 3e23 5749 5448 5f47 5a49 #WITH_GZI │ │ │ │ -0018f680: 503c 2f63 6f64 653e 2e20 546f 2074 7261 P. To tra │ │ │ │ -0018f690: 6e73 6d69 7420 677a 6970 2063 6f6d 7072 nsmit gzip compr │ │ │ │ -0018f6a0: 6573 7365 6420 534f 4150 2f58 4d4c 2064 essed SOAP/XML d │ │ │ │ -0018f6b0: 6174 612c 2073 6574 2074 6865 206f 7574 ata, set the out │ │ │ │ -0018f6c0: 7075 7420 6d6f 6465 2066 6c61 6773 2074 put mode flags t │ │ │ │ -0018f6d0: 6f20 3c63 6f64 653e 2353 4f41 505f 454e o #SOAP_EN │ │ │ │ -0018f6e0: 435f 5a4c 4942 3c2f 636f 6465 3e2e 2046 C_ZLIB. F │ │ │ │ -0018f6f0: 6f72 2065 7861 6d70 6c65 3a3c 2f70 3e0a or example:

    . │ │ │ │ -0018f700: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    soa │ │ │ │ -0018f780: 705f 696e 6974 3c2f 613e 2826 616d 703b p_init(& │ │ │ │ -0018f790: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -0018f7c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ -0018f830: 736f 6170 5f73 6574 5f6f 6d6f 6465 3c2f soap_set_omode(&s │ │ │ │ -0018f870: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, SOAP │ │ │ │ -0018f8d0: 5f45 4e43 5f5a 4c49 423c 2f61 3e29 3b20 _ENC_ZLIB); │ │ │ │ -0018f8e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // enable │ │ │ │ -0018f900: 5a6c 6962 2623 3339 3b73 2067 7a69 7020 Zlib's gzip │ │ │ │ -0018f910: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0018f930: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n │ │ │ │ -0018f960: 735f 5f6d 794d 6574 686f 6428 2661 6d70 s__myMethod(& │ │ │ │ -0018f970: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ -0018f9a0: 2c20 2e2e 2e29 2920 3c2f 6469 763e 0a3c , ...))
    .< │ │ │ │ -0018f9b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0018f9c0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // │ │ │ │ -0018f9e0: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    e │ │ │ │ -0018fa20: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    │ │ │ │ -0018fa30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ -0018fa60: 2f20 7375 6363 6573 733c 2f73 7061 6e3e / success │ │ │ │ -0018fa70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so │ │ │ │ -0018fae0: 6170 5f63 6c72 5f6f 6d6f 6465 3c2f 613e ap_clr_omode │ │ │ │ -0018faf0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -0018fb20: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_E │ │ │ │ -0018fb80: 4e43 5f5a 4c49 423c 2f61 3e29 3b20 3c73 NC_ZLIB); // disable Z │ │ │ │ -0018fbb0: 6c69 6226 2333 393b 7320 677a 6970 203c lib's gzip < │ │ │ │ -0018fbc0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -0018fc20: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    #define SOA │ │ │ │ -0018fcb0: 505f 454e 435f 5a4c 4942 3c2f 6469 763e P_ENC_ZLIB
    │ │ │ │ -0018fcc0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    soap_mode ENC │ │ │ │ -0018fce0: 206f 7574 7075 7420 666c 6167 2076 616c output flag val │ │ │ │ -0018fcf0: 7565 2074 6f20 636f 6d70 7265 7373 206d ue to compress m │ │ │ │ -0018fd00: 6573 7361 6765 7320 7365 6e74 2c20 7265 essages sent, re │ │ │ │ -0018fd10: 7175 6972 6573 207a 6c69 6220 656e 6162 quires zlib enab │ │ │ │ -0018fd20: 6c65 6420 7769 7468 2063 6f6d 7069 6c65 led with compile │ │ │ │ -0018fd30: 2d74 696d 6520 666c 2e2e 2e3c 2f64 6976 -time fl...
    Definitio │ │ │ │ -0018fd60: 6e3a 3c2f 623e 2073 7464 736f 6170 322e n: stdsoap2. │ │ │ │ -0018fd70: 683a 3137 3838 3c2f 6469 763e 3c2f 6469 h:1788
    .

    Thi │ │ │ │ -0018fda0: 7320 7769 6c6c 2073 656e 6420 6120 636f s will send a co │ │ │ │ -0018fdb0: 6d70 7265 7373 6564 2053 4f41 502f 584d mpressed SOAP/XM │ │ │ │ -0018fdc0: 4c20 7265 7175 6573 7420 746f 2061 2073 L request to a s │ │ │ │ -0018fdd0: 6572 7669 6365 2c20 7072 6f76 6964 6564 ervice, provided │ │ │ │ -0018fde0: 2074 6861 7420 5a6c 6962 2069 7320 696e that Zlib is in │ │ │ │ -0018fdf0: 7374 616c 6c65 6420 616e 6420 6c69 6e6b stalled and link │ │ │ │ -0018fe00: 6564 2077 6974 6820 7468 6520 6170 706c ed with the appl │ │ │ │ -0018fe10: 6963 6174 696f 6e20 616e 6420 7468 6520 ication and the │ │ │ │ -0018fe20: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla │ │ │ │ -0018fe30: 6720 3c63 6f64 653e 2357 4954 485f 475a g #WITH_GZ │ │ │ │ -0018fe40: 4950 3c2f 636f 6465 3e20 6f70 7469 6f6e IP option │ │ │ │ -0018fe50: 2077 6173 2075 7365 6420 746f 2063 6f6d was used to com │ │ │ │ -0018fe60: 7069 6c65 2074 6865 2073 6f75 7263 6573 pile the sources │ │ │ │ -0018fe70: 2e20 5265 6365 6976 696e 6720 636f 6d70 . Receiving comp │ │ │ │ -0018fe80: 7265 7373 6564 2053 4f41 502f 584d 4c20 ressed SOAP/XML │ │ │ │ -0018fe90: 6f76 6572 2048 5454 5020 6569 7468 6572 over HTTP either │ │ │ │ -0018fea0: 2069 6e20 677a 6970 206f 7220 6465 666c in gzip or defl │ │ │ │ -0018feb0: 6174 6520 666f 726d 6174 7320 6973 2061 ate formats is a │ │ │ │ -0018fec0: 7574 6f6d 6174 6963 2e20 5468 6520 3c63 utomatic. The #SOAP_ENC_ZL │ │ │ │ -0018fee0: 4942 3c2f 636f 6465 3e20 666c 6167 2064 IB flag d │ │ │ │ -0018fef0: 6f65 7320 6e6f 7420 6861 7665 2074 6f20 oes not have to │ │ │ │ -0018ff00: 6265 2073 6574 2061 7420 7468 6520 7365 be set at the se │ │ │ │ -0018ff10: 7276 6572 2073 6964 6520 746f 2061 6363 rver side to acc │ │ │ │ -0018ff20: 6570 7420 636f 6d70 7265 7373 6564 206d ept compressed m │ │ │ │ -0018ff30: 6573 7361 6765 732e 2052 6561 6469 6e67 essages. Reading │ │ │ │ -0018ff40: 2061 6e64 2072 6563 6569 7669 6e67 2067 and receiving g │ │ │ │ -0018ff50: 7a69 7020 636f 6d70 7265 7373 6564 2053 zip compressed S │ │ │ │ -0018ff60: 4f41 502f 584d 4c20 7769 7468 6f75 7420 OAP/XML without │ │ │ │ -0018ff70: 4854 5450 2068 6561 6465 7273 2028 652e HTTP headers (e. │ │ │ │ -0018ff80: 672e 2077 6974 6820 6f74 6865 7220 7472 g. with other tr │ │ │ │ -0018ff90: 616e 7370 6f72 7420 7072 6f74 6f63 6f6c ansport protocol │ │ │ │ -0018ffa0: 7329 2069 7320 616c 736f 2061 7574 6f6d s) is also autom │ │ │ │ -0018ffb0: 6174 6963 2e3c 2f70 3e0a 3c70 3e54 6f20 atic.

    .

    To │ │ │ │ -0018ffc0: 636f 6e74 726f 6c20 7468 6520 6c65 7665 control the leve │ │ │ │ -0018ffd0: 6c20 6f66 2063 6f6d 7072 6573 7369 6f6e l of compression │ │ │ │ -0018ffe0: 2066 6f72 206f 7574 626f 756e 6420 6d65 for outbound me │ │ │ │ -0018fff0: 7373 6167 6573 2c20 796f 7520 6361 6e20 ssages, you can │ │ │ │ -00190000: 7365 7420 7468 6520 3c63 6f64 653e 3c61 set the soap::z_level< │ │ │ │ -001900d0: 2f61 3e3c 2f63 6f64 653e 2074 6f20 6120 /a> to a │ │ │ │ -001900e0: 7661 6c75 6520 6265 7477 6565 6e20 3120 value between 1 │ │ │ │ -001900f0: 616e 6420 392c 2077 6865 7265 2031 2069 and 9, where 1 i │ │ │ │ -00190100: 7320 7468 6520 6265 7374 2073 7065 6564 s the best speed │ │ │ │ -00190110: 2061 6e64 2039 2069 7320 7468 6520 6265 and 9 is the be │ │ │ │ -00190120: 7374 2063 6f6d 7072 6573 7369 6f6e 2028 st compression ( │ │ │ │ -00190130: 6465 6661 756c 7420 6973 2036 292e 2046 default is 6). F │ │ │ │ -00190140: 6f72 2065 7861 6d70 6c65 3c2f 703e 0a3c or example

    .< │ │ │ │ -00190150: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -00190160: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    soap │ │ │ │ -001901d0: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&< │ │ │ │ -001901e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001901f0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00190200: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ -00190210: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    s │ │ │ │ -00190280: 6f61 705f 7365 745f 6f6d 6f64 653c 2f61 oap_set_omode(&so │ │ │ │ -001902c0: 6170 3c2f 613e 2c20 3c61 2063 6c61 7373 ap, SOAP_ │ │ │ │ -00190320: 454e 435f 5a4c 4942 3c2f 613e 293b 203c ENC_ZLIB); < │ │ │ │ -00190330: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ -00190370: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.z_level = 9 │ │ │ │ -001903d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // best │ │ │ │ -001903f0: 636f 6d70 7265 7373 696f 6e20 3c2f 7370 compression
    .
    un │ │ │ │ -001904d0: 7369 676e 6564 2073 686f 7274 207a 5f6c signed short z_l │ │ │ │ -001904e0: 6576 656c 3c2f 6469 763e 3c64 6976 2063 evel
    Use │ │ │ │ -00190500: 722d 6465 6669 6e61 626c 6520 636f 6d70 r-definable comp │ │ │ │ -00190510: 7265 7373 696f 6e20 6c65 7665 6c20 666f ression level fo │ │ │ │ -00190520: 7220 677a 6970 2063 6f6d 7072 6573 7369 r gzip compressi │ │ │ │ -00190530: 6f6e 2028 303d 6e6f 6e65 2c20 313d 6661 on (0=none, 1=fa │ │ │ │ -00190540: 7374 2074 6f20 393d 6265 7374 2920 6465 st to 9=best) de │ │ │ │ -00190550: 6661 756c 7420 6c65 7665 6c20 6973 2036 fault level is 6 │ │ │ │ -00190560: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ │ -00190580: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ -00190590: 736f 6170 322e 683a 3337 3034 3c2f 6469 soap2.h:3704
    .
    < │ │ │ │ -001905b0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -001905c0: 3c70 3e54 6f20 7665 7269 6679 2061 6e64

    To verify and │ │ │ │ -001905d0: 206d 6f6e 6974 6f72 2063 6f6d 7072 6573 monitor compres │ │ │ │ -001905e0: 7369 6f6e 2072 6174 6573 2c20 796f 7520 sion rates, you │ │ │ │ -001905f0: 6361 6e20 7573 6520 7468 6520 7661 6c75 can use the valu │ │ │ │ -00190600: 6573 203c 636f 6465 3e3c 6120 636c 6173 es soap::z_ra │ │ │ │ -001906c0: 7469 6f5f 696e 3c2f 613e 3c2f 636f 6465 tio_in and soap::z_rat │ │ │ │ -00190790: 696f 5f6f 7574 3c2f 613e 3c2f 636f 6465 io_out. These two flo │ │ │ │ -001907b0: 6174 2076 616c 7565 7320 6c69 6520 6265 at values lie be │ │ │ │ -001907c0: 7477 6565 6e20 302e 3020 616e 6420 312e tween 0.0 and 1. │ │ │ │ -001907d0: 3020 616e 6420 6578 7072 6573 7320 7468 0 and express th │ │ │ │ -001907e0: 6520 7261 7469 6f20 6f66 2074 6865 2063 e ratio of the c │ │ │ │ -001907f0: 6f6d 7072 6573 7365 6420 6d65 7373 6167 ompressed messag │ │ │ │ -00190800: 6520 6c65 6e67 7468 206f 7665 7220 756e e length over un │ │ │ │ -00190810: 636f 6d70 7265 7373 6564 206d 6573 7361 compressed messa │ │ │ │ -00190820: 6765 206c 656e 6774 682e 3c2f 703e 0a3c ge length.

    .< │ │ │ │ -00190830: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -00190840: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    if (soap │ │ │ │ -00190880: 5f63 616c 6c5f 6e73 5f5f 6d79 4d65 7468 _call_ns__myMeth │ │ │ │ -00190890: 6f64 2826 616d 703b 3c61 2063 6c61 7373 od(&s │ │ │ │ -001908c0: 6f61 703c 2f61 3e2c 202e 2e2e 2929 3c2f oap, ...))soap_print_ │ │ │ │ +0018ab30: 6661 756c 743c 2f61 3e28 2661 6d70 3b3c fault(&< │ │ │ │ +0018ab40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0018ab50: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +0018ab60: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +0018ab70: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    . │ │ │ │ +0018ab80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXIT_FA │ │ │ │ +0018aba0: 494c 5552 4529 3b20 3c2f 6469 763e 0a3c ILURE);
    .< │ │ │ │ +0018abb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0018abc0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    < │ │ │ │ +0018ac30: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ +0018ac40: 726f 7570 5f5f 7373 6c2e 6874 6d6c 2367 roup__ssl.html#g │ │ │ │ +0018ac50: 6135 3236 3134 3030 3764 3063 3033 3539 a52614007d0c0359 │ │ │ │ +0018ac60: 6365 6166 3836 3538 3866 3437 3636 3162 ceaf86588f47661b │ │ │ │ +0018ac70: 3922 3e53 4f41 505f 5353 4c5f 4e4f 5f41 9">SOAP_SSL_NO_A │ │ │ │ +0018ac80: 5554 4845 4e54 4943 4154 494f 4e3c 2f61 UTHENTICATION
    #defi │ │ │ │ +0018acb0: 6e65 2053 4f41 505f 5353 4c5f 4e4f 5f41 ne SOAP_SSL_NO_A │ │ │ │ +0018acc0: 5554 4845 4e54 4943 4154 494f 4e3c 2f64 UTHENTICATION
    soap_ssl_f │ │ │ │ +0018acf0: 6c61 6773 2066 6c61 6720 7661 6c75 6520 lags flag value │ │ │ │ +0018ad00: 746f 2064 6973 6162 6c65 2061 7574 6865 to disable authe │ │ │ │ +0018ad10: 6e74 6963 6174 696f 6e20 6f66 2074 6865 ntication of the │ │ │ │ +0018ad20: 2070 6565 723c 2f64 6976 3e3c 6469 7620 peer
    Definition: │ │ │ │ +0018ad50: 2073 7464 736f 6170 322e 683a 3538 3430 stdsoap2.h:5840 │ │ │ │ +0018ad60: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This also │ │ │ │ +0018ad90: 2061 7373 756d 6573 2074 6861 7420 7468 assumes that th │ │ │ │ +0018ada0: 6520 7365 7276 6572 2064 6f65 7320 6e6f e server does no │ │ │ │ +0018adb0: 7420 7265 7175 6972 6520 636c 6965 6e74 t require client │ │ │ │ +0018adc0: 7320 746f 2061 7574 6865 6e74 6963 6174 s to authenticat │ │ │ │ +0018add0: 6520 2874 6865 206b 6579 6669 6c65 2069 e (the keyfile i │ │ │ │ +0018ade0: 7320 6162 7365 6e74 292e 3c2f 703e 0a3c s absent).

    .< │ │ │ │ +0018adf0: 703e 4d61 6b65 2073 7572 6520 796f 7520 p>Make sure you │ │ │ │ +0018ae00: 6861 7665 2073 6967 6e61 6c20 6861 6e64 have signal hand │ │ │ │ +0018ae10: 6c65 7273 2073 6574 2069 6e20 796f 7572 lers set in your │ │ │ │ +0018ae20: 2061 7070 6c69 6361 7469 6f6e 2074 6f20 application to │ │ │ │ +0018ae30: 6361 7463 6820 6272 6f6b 656e 2063 6f6e catch broken con │ │ │ │ +0018ae40: 6e65 6374 696f 6e73 2028 3c63 6f64 653e nections ( │ │ │ │ +0018ae50: 5349 4750 4950 453c 2f63 6f64 653e 293a SIGPIPE): │ │ │ │ +0018ae60: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    sig │ │ │ │ +0018ae90: 6e61 6c28 5349 4750 4950 452c 2073 6967 nal(SIGPIPE, sig │ │ │ │ +0018aea0: 7069 7065 5f68 616e 646c 6529 3b3c 2f64 pipe_handle);.

    wh │ │ │ │ +0018aed0: 6572 652c 2066 6f72 2065 7861 6d70 6c65 ere, for example │ │ │ │ +0018aee0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void sigpipe_hand │ │ │ │ +0018af40: 6c65 283c 7370 616e 2063 6c61 7373 3d22 le(int │ │ │ │ +0018af60: 3c2f 7370 616e 3e20 7829 207b 207d 3c2f x) { }.
    Warn │ │ │ │ +0018afb0: 696e 673c 2f64 743e 3c64 643e 4974 2069 ing
    It i │ │ │ │ +0018afc0: 7320 696d 706f 7274 616e 7420 7468 6174 s important that │ │ │ │ +0018afd0: 2074 6865 203c 636f 6465 3e23 5749 5448 the #WITH │ │ │ │ +0018afe0: 5f4f 5045 4e53 534c 3c2f 636f 6465 3e20 _OPENSSL │ │ │ │ +0018aff0: 6d61 6372 6f20 6973 2063 6f6e 7369 7374 macro is consist │ │ │ │ +0018b000: 656e 746c 7920 6465 6669 6e65 6420 746f ently defined to │ │ │ │ +0018b010: 2063 6f6d 7069 6c65 2074 6865 2073 6f75 compile the sou │ │ │ │ +0018b020: 7263 6573 2c20 7375 6368 2061 7320 3c65 rces, such as gsoap/st │ │ │ │ +0018b040: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp, soapC.cpp, soapClient.cp │ │ │ │ +0018b090: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, < │ │ │ │ +0018b0a0: 656d 3e3c 636f 6465 3e73 6f61 7053 6572 em>soapSer │ │ │ │ +0018b0b0: 7665 722e 6370 703c 2f63 6f64 653e 3c2f ver.cpp, and all app │ │ │ │ +0018b0d0: 6c69 6361 7469 6f6e 2073 6f75 7263 6573 lication sources │ │ │ │ +0018b0e0: 2074 6861 7420 696e 636c 7564 6520 3c65 that include gsoap/st │ │ │ │ +0018b100: 6473 6f61 7032 2e68 3c2f 636f 6465 3e3c dsoap2.h< │ │ │ │ +0018b110: 2f65 6d3e 206f 7220 3c65 6d3e 3c63 6f64 /em> or soapH.h │ │ │ │ +0018b130: 3c2f 656d 3e2e 2049 6620 7468 6520 6d61 . If the ma │ │ │ │ +0018b140: 6372 6f73 2061 7265 206e 6f74 2063 6f6e cros are not con │ │ │ │ +0018b150: 7369 7374 656e 746c 7920 7573 6564 2c20 sistently used, │ │ │ │ +0018b160: 7468 6520 6170 706c 6963 6174 696f 6e20 the application │ │ │ │ +0018b170: 7769 6c6c 2063 7261 7368 2064 7565 2074 will crash due t │ │ │ │ +0018b180: 6f20 6120 6d69 736d 6174 6368 6573 2069 o a mismatches i │ │ │ │ +0018b190: 6e20 7468 6520 6465 636c 6172 6174 696f n the declaratio │ │ │ │ +0018b1a0: 6e20 616e 6420 6163 6365 7373 206f 6620 n and access of │ │ │ │ +0018b1b0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap context. A │ │ │ │ +0018b220: 6c74 6572 6e61 7469 7665 6c79 2c20 7573 lternatively, us │ │ │ │ +0018b230: 6520 6c69 6272 6172 7920 3c62 3e3c 636f e library -lgsoapssl or < │ │ │ │ +0018b260: 636f 6465 3e2d 6c67 736f 6170 7373 6c2b code>-lgsoapssl+ │ │ │ │ +0018b270: 2b3c 2f63 6f64 653e 3c2f 623e 2061 6e64 + and │ │ │ │ +0018b280: 2063 6f6d 7069 6c65 2065 7665 7279 7468 compile everyth │ │ │ │ +0018b290: 696e 6720 656c 7365 2077 6974 6820 3c63 ing else with #WITH_OPENSS │ │ │ │ +0018b2b0: 4c3c 2f63 6f64 653e 2e3c 2f64 643e 0a3c L.
    .< │ │ │ │ +0018b2c0: 6464 3e0a 436f 6e63 7572 7265 6e74 2063 dd>.Concurrent c │ │ │ │ +0018b2d0: 6c69 656e 7420 6361 6c6c 7320 7769 7468 lient calls with │ │ │ │ +0018b2e0: 2074 6872 6561 6473 2073 686f 756c 6420 threads should │ │ │ │ +0018b2f0: 7573 6520 7365 7061 7261 7465 203c 636f use separate s │ │ │ │ +0018b350: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c │ │ │ │ +0018b360: 6f6e 7465 7874 7320 496e 2061 6464 6974 ontexts In addit │ │ │ │ +0018b370: 696f 6e2c 2074 6865 2074 6872 6561 6420 ion, the thread │ │ │ │ +0018b380: 696e 6974 6961 6c69 7a61 7469 6f6e 2063 initialization c │ │ │ │ +0018b390: 6f64 6520 6469 7363 7573 7365 6420 696e ode discussed in │ │ │ │ +0018b3a0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Secure We │ │ │ │ +0018b3e0: 6220 7365 7276 6963 6573 2077 6974 6820 b services with │ │ │ │ +0018b3f0: 4854 5450 533c 2f61 3e20 6d75 7374 2062 HTTPS must b │ │ │ │ +0018b400: 6520 7573 6564 2074 6f20 7072 6f70 6572 e used to proper │ │ │ │ +0018b410: 6c79 2073 6574 7570 204f 7065 6e53 534c ly setup OpenSSL │ │ │ │ +0018b420: 2069 6e20 6120 6d75 6c74 692d 7468 7265 in a multi-thre │ │ │ │ +0018b430: 6164 6564 2063 6c69 656e 7420 6170 706c aded client appl │ │ │ │ +0018b440: 6963 6174 696f 6e2e 3c2f 6464 3e3c 2f64 ication..

    See also A │ │ │ │ +0018b460: 5049 2064 6f63 756d 656e 7461 7469 6f6e PI documentation │ │ │ │ +0018b470: 204d 6f64 756c 6520 3c61 2063 6c61 7373 Module SSL/TLS cont │ │ │ │ +0018b4b0: 6578 7420 616e 6420 6675 6e63 7469 6f6e ext and function │ │ │ │ +0018b4c0: 733c 2f61 3e20 666f 7220 6d6f 7265 2064 s for more d │ │ │ │ +0018b4d0: 6574 6169 6c73 206f 6e20 7468 6520 5353 etails on the SS │ │ │ │ +0018b4e0: 4c2f 544c 5320 6675 6e63 7469 6f6e 732e L/TLS functions. │ │ │ │ +0018b4f0: 3c2f 703e 0a3c 703e 596f 7520 6361 6e20

    .

    You can │ │ │ │ +0018b500: 616c 736f 2075 7365 2074 6865 2057 696e also use the Win │ │ │ │ +0018b510: 496e 6574 2069 6e74 6572 6661 6365 2074 Inet interface t │ │ │ │ +0018b520: 6f20 6573 7461 626c 6973 6820 7365 6375 o establish secu │ │ │ │ +0018b530: 7265 2048 5454 5053 2063 6f6e 6e65 6374 re HTTPS connect │ │ │ │ +0018b540: 696f 6e73 206f 6e20 5769 6e64 6f77 7320 ions on Windows │ │ │ │ +0018b550: 6d61 6368 696e 6573 2c20 6176 6169 6c61 machines, availa │ │ │ │ +0018b560: 626c 6520 696e 2074 6865 203c 656d 3e3c ble in the < │ │ │ │ +0018b570: 636f 6465 3e67 736f 6170 2f6d 6f64 5f67 code>gsoap/mod_g │ │ │ │ +0018b580: 736f 6170 3c2f 636f 6465 3e3c 2f65 6d3e soap │ │ │ │ +0018b590: 2064 6972 6563 746f 7279 206f 6620 7468 directory of th │ │ │ │ +0018b5a0: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c │ │ │ │ +0018b5b0: 6f64 6520 7061 636b 6167 652c 2073 6565 ode package, see │ │ │ │ +0018b5c0: 2061 6c73 6f20 5365 6374 696f 6e20 3c61 also Section The │ │ │ │ +0018b600: 5769 6e49 6e65 7420 706c 7567 696e 3c2f WinInet plugin. Or you can u │ │ │ │ +0018b620: 7365 2074 6865 2043 5552 4c20 706c 7567 se the CURL plug │ │ │ │ +0018b630: 696e 2074 6f20 7573 6520 4355 524c 2074 in to use CURL t │ │ │ │ +0018b640: 6f20 6573 7461 626c 6973 6820 7365 6375 o establish secu │ │ │ │ +0018b650: 7265 2048 5454 5053 2063 6f6e 6e65 6374 re HTTPS connect │ │ │ │ +0018b660: 696f 6e73 2c20 7365 6520 5365 6374 696f ions, see Sectio │ │ │ │ +0018b670: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n The │ │ │ │ +0018b6a0: 2043 5552 4c20 706c 7567 696e 3c2f 613e CURL plugin │ │ │ │ +0018b6b0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ +0018b6d0: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ +0018b6e0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 323e nts

    .

    │ │ │ │ +0018b6f0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .SSL authe │ │ │ │ +0018b730: 6e74 6963 6174 696f 6e20 6361 6c6c 6261 ntication callba │ │ │ │ +0018b740: 636b 733c 2f68 323e 0a3c 703e 5468 6520 cks

    .

    The │ │ │ │ +0018b750: 3c63 6f64 653e 6673 736c 6175 7468 3c2f fsslauth callback f │ │ │ │ +0018b770: 756e 6374 696f 6e20 636f 6e74 726f 6c73 unction controls │ │ │ │ +0018b780: 204f 7065 6e53 534c 2f47 4e55 544c 5320 OpenSSL/GNUTLS │ │ │ │ +0018b790: 6175 7468 656e 7469 6361 7469 6f6e 2069 authentication i │ │ │ │ +0018b7a0: 6e69 7469 616c 697a 6174 696f 6e3a 3c2f nitialization:.

    .

    The fsslverify callback fu │ │ │ │ +0018bc80: 6e63 7469 6f6e 2063 6f6e 7472 6f6c 7320 nction controls │ │ │ │ +0018bc90: 4f70 656e 5353 4c20 7065 6572 2063 6572 OpenSSL peer cer │ │ │ │ +0018bca0: 7469 6669 6361 7465 2076 6572 6966 6963 tificate verific │ │ │ │ +0018bcb0: 6174 696f 6e2c 2076 6961 2069 6e74 6572 ation, via inter │ │ │ │ +0018bcc0: 6e61 6c6c 7920 696e 766f 6b69 6e67 203c nally invoking < │ │ │ │ +0018bcd0: 636f 6465 3e53 534c 5f43 5458 5f73 6574 code>SSL_CTX_set │ │ │ │ +0018bce0: 5f76 6572 6966 793c 2f63 6f64 653e 3a3c _verify:< │ │ │ │ +0018bcf0: 2f70 3e0a 3c75 6c3e 0a3c 6c69 3e3c 636f /p>.

      .
    • int (soap::fs │ │ │ │ +0018bd10: 7376 6572 6966 7929 2869 6e74 206f 6b2c sverify)(int ok, │ │ │ │ +0018bd20: 2058 3530 395f 5354 4f52 455f 4354 5820 X509_STORE_CTX │ │ │ │ +0018bd30: 2a73 746f 7265 3c2f 636f 6465 3e20 5468 *store Th │ │ │ │ +0018bd40: 6973 2063 616c 6c62 6163 6b20 6973 2063 is callback is c │ │ │ │ +0018bd50: 616c 6c65 6420 6279 2074 6865 2065 6e67 alled by the eng │ │ │ │ +0018bd60: 696e 6520 746f 206d 616e 6167 6520 7468 ine to manage th │ │ │ │ +0018bd70: 6520 7665 7269 6669 6361 7469 6f6e 206f e verification o │ │ │ │ +0018bd80: 6620 7468 6520 6365 7274 6966 6963 6174 f the certificat │ │ │ │ +0018bd90: 6520 7072 6f76 6964 6564 2062 7920 6120 e provided by a │ │ │ │ +0018bda0: 7065 6572 2c20 7375 6368 2061 7320 7468 peer, such as th │ │ │ │ +0018bdb0: 6520 6365 7274 6966 6963 6174 6520 7072 e certificate pr │ │ │ │ +0018bdc0: 6f76 6964 6564 2062 7920 6120 7365 7276 ovided by a serv │ │ │ │ +0018bdd0: 6572 2063 6f6e 6e65 6374 6564 206f 7665 er connected ove │ │ │ │ +0018bde0: 7220 4854 5450 5320 6f72 2074 6f20 7665 r HTTPS or to ve │ │ │ │ +0018bdf0: 7269 6679 2074 6865 2063 6572 7469 6669 rify the certifi │ │ │ │ +0018be00: 6361 7465 2069 6e63 6c75 6465 6420 7769 cate included wi │ │ │ │ +0018be10: 7468 2061 2057 532d 5365 6375 7269 7479 th a WS-Security │ │ │ │ +0018be20: 206d 6573 7361 6765 2e20 546f 2072 6571 message. To req │ │ │ │ +0018be30: 7569 7265 2063 6572 7469 6669 6361 7465 uire certificate │ │ │ │ +0018be40: 2076 6572 6966 6963 6174 696f 6e20 6f66 verification of │ │ │ │ +0018be50: 2061 2073 6572 7665 7220 636f 6e6e 6563 a server connec │ │ │ │ +0018be60: 7465 6420 7669 6120 4854 5450 532c 2075 ted via HTTPS, u │ │ │ │ +0018be70: 7365 203c 636f 6465 3e3c 6120 636c 6173 se soap │ │ │ │ +0018bf00: 5f73 736c 5f63 6c69 656e 745f 636f 6e74 _ssl_client_cont │ │ │ │ +0018bf10: 6578 743c 2f61 3e3c 2f63 6f64 653e 2077 ext w │ │ │ │ +0018bf20: 6974 6820 3c63 6f64 653e 2353 4f41 505f ith #SOAP_ │ │ │ │ +0018bf30: 5353 4c5f 5245 5155 4952 455f 5345 5256 SSL_REQUIRE_SERV │ │ │ │ +0018bf40: 4552 5f41 5554 4845 4e54 4943 4154 494f ER_AUTHENTICATIO │ │ │ │ +0018bf50: 4e3c 2f63 6f64 653e 2e20 546f 2072 6571 N. To req │ │ │ │ +0018bf60: 7569 7265 2063 6572 7469 6669 6361 7465 uire certificate │ │ │ │ +0018bf70: 2076 6572 6966 6963 6174 696f 6e20 6f66 verification of │ │ │ │ +0018bf80: 2061 2063 6c69 656e 7420 636f 6e6e 6563 a client connec │ │ │ │ +0018bf90: 7465 6420 746f 2061 2073 6572 7665 722c ted to a server, │ │ │ │ +0018bfa0: 2075 7365 203c 636f 6465 3e3c 6120 636c use so │ │ │ │ +0018c030: 6170 5f73 736c 5f73 6572 7665 725f 636f ap_ssl_server_co │ │ │ │ +0018c040: 6e74 6578 743c 2f61 3e3c 2f63 6f64 653e ntext │ │ │ │ +0018c050: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA │ │ │ │ +0018c060: 505f 5353 4c5f 5245 5155 4952 455f 434c P_SSL_REQUIRE_CL │ │ │ │ +0018c070: 4945 4e54 5f41 5554 4845 4e54 4943 4154 IENT_AUTHENTICAT │ │ │ │ +0018c080: 494f 4e3c 2f63 6f64 653e 2e20 5468 6520 ION. The │ │ │ │ +0018c090: 3c63 6f64 653e 6f6b 3c2f 636f 6465 3e20 ok │ │ │ │ +0018c0a0: 7061 7261 6d65 7465 7220 6f66 2074 6869 parameter of thi │ │ │ │ +0018c0b0: 7320 6361 6c6c 6261 636b 2069 6e64 6963 s callback indic │ │ │ │ +0018c0c0: 6174 6573 2077 6865 7468 6572 2074 6865 ates whether the │ │ │ │ +0018c0d0: 2076 6572 6966 6963 6174 696f 6e20 6f66 verification of │ │ │ │ +0018c0e0: 2074 6865 2063 6572 7469 6669 6361 7465 the certificate │ │ │ │ +0018c0f0: 2069 6e20 7175 6573 7469 6f6e 2070 6173 in question pas │ │ │ │ +0018c100: 7365 6420 283c 636f 6465 3e6f 6b3c 2f63 sed (ok == 1) or fa │ │ │ │ +0018c120: 696c 6564 2028 3c63 6f64 653e 6f6b 3c2f iled (ok == 0) as d │ │ │ │ +0018c140: 6574 6572 6d69 6e65 6420 6279 2074 6865 etermined by the │ │ │ │ +0018c150: 204f 7065 6e53 534c 206c 6962 7261 7279 OpenSSL library │ │ │ │ +0018c160: 2062 6173 6564 206f 6e20 7468 6520 3c63 based on the soap_ssl_ │ │ │ │ +0018c200: 636c 6965 6e74 5f63 6f6e 7465 7874 3c2f client_context or soap_ssl_s │ │ │ │ +0018c2b0: 6572 7665 725f 636f 6e74 6578 743c 2f61 erver_context configu │ │ │ │ +0018c2d0: 7261 7469 6f6e 2e20 4966 2074 6865 2063 ration. If the c │ │ │ │ +0018c2e0: 616c 6c62 6163 6b20 7265 7475 726e 7320 allback returns │ │ │ │ +0018c2f0: 3120 7468 656e 2074 6865 2068 616e 6473 1 then the hands │ │ │ │ +0018c300: 6861 6b65 2069 7320 636f 6e74 696e 7565 hake is continue │ │ │ │ +0018c310: 6420 616e 6420 7468 6520 636f 6e6e 6563 d and the connec │ │ │ │ +0018c320: 7469 6f6e 206d 6179 6265 2065 7374 6162 tion maybe estab │ │ │ │ +0018c330: 6c69 7368 6564 2e20 546f 2072 6574 7572 lished. To retur │ │ │ │ +0018c340: 6e20 3120 7768 656e 203c 636f 6465 3e6f n 1 when o │ │ │ │ +0018c350: 6b3c 2f63 6f64 653e 203d 3d20 3020 7265 k == 0 re │ │ │ │ +0018c360: 7175 6972 6573 2072 6573 6574 7469 6e67 quires resetting │ │ │ │ +0018c370: 2074 6865 2065 7272 6f72 2073 7461 7465 the error state │ │ │ │ +0018c380: 2077 6974 6820 3c63 6f64 653e 5835 3039 with X509 │ │ │ │ +0018c390: 5f53 544f 5245 5f43 5458 5f73 6574 5f65 _STORE_CTX_set_e │ │ │ │ +0018c3a0: 7272 6f72 2873 746f 7265 2c20 5835 3039 rror(store, X509 │ │ │ │ +0018c3b0: 5f56 5f4f 4b29 3c2f 636f 6465 3e2e 2049 _V_OK). I │ │ │ │ +0018c3c0: 6620 7468 6520 6361 6c6c 6261 636b 2072 f the callback r │ │ │ │ +0018c3d0: 6574 7572 6e73 2030 2074 6865 6e20 7468 eturns 0 then th │ │ │ │ +0018c3e0: 6520 6861 6e64 7368 616b 6520 6973 2069 e handshake is i │ │ │ │ +0018c3f0: 6d6d 6564 6961 7465 6c79 2074 6572 6d69 mmediately termi │ │ │ │ +0018c400: 6e61 7465 6420 7769 7468 2022 7665 7269 nated with "veri │ │ │ │ +0018c410: 6669 6361 7469 6f6e 2066 6169 6c65 6422 fication failed" │ │ │ │ +0018c420: 2061 6e64 2061 2076 6572 6966 6963 6174 and a verificat │ │ │ │ +0018c430: 696f 6e20 6661 696c 7572 6520 616c 6572 ion failure aler │ │ │ │ +0018c440: 7420 6973 2073 656e 7420 746f 2074 6865 t is sent to the │ │ │ │ +0018c450: 2070 6565 722e 2054 6865 2062 7569 6c74 peer. The built │ │ │ │ +0018c460: 2d69 6e20 6675 6e63 7469 6f6e 2061 7373 -in function ass │ │ │ │ +0018c470: 6967 6e65 6420 746f 203c 636f 6465 3e3c igned to < │ │ │ │ +0018c480: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0018c490: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0018c4a0: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0018c4b0: 6761 3439 6665 6539 6361 3461 3738 6639 ga49fee9ca4a78f9 │ │ │ │ +0018c4c0: 6136 3831 6166 6264 6662 6330 3139 3462 a681afbdfbc0194b │ │ │ │ +0018c4d0: 6630 2220 7469 746c 653d 2243 616c 6c62 f0" title="Callb │ │ │ │ +0018c4e0: 6163 6b20 746f 206d 616e 6167 6520 7468 ack to manage th │ │ │ │ +0018c4f0: 6520 7665 7269 6669 6361 7469 6f6e 206f e verification o │ │ │ │ +0018c500: 6620 7468 6520 6365 7274 6966 6963 6174 f the certificat │ │ │ │ +0018c510: 6520 7072 6f76 6964 6564 2062 7920 6120 e provided by a │ │ │ │ +0018c520: 7065 6572 2028 7479 7069 6361 6c6c 7920 peer (typically │ │ │ │ +0018c530: 6120 7365 7276 6572 2922 3e73 6f61 703a a server)">soap: │ │ │ │ +0018c540: 3a66 7373 6c76 6572 6966 793c 2f61 3e3c :fsslverify< │ │ │ │ +0018c550: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is │ │ │ │ +0018c560: 7373 6c5f 7665 7269 6679 5f63 616c 6c62 ssl_verify_callb │ │ │ │ +0018c570: 6163 6b3c 2f63 6f64 653e 206f 7220 7768 ack or wh │ │ │ │ +0018c580: 656e 203c 636f 6465 3e23 534f 4150 5f53 en #SOAP_S │ │ │ │ +0018c590: 534c 5f41 4c4c 4f57 5f45 5850 4952 4544 SL_ALLOW_EXPIRED │ │ │ │ +0018c5a0: 5f43 4552 5449 4649 4341 5445 3c2f 636f _CERTIFICATE is used ssl_verify_cal │ │ │ │ +0018c5d0: 6c62 6163 6b5f 616c 6c6f 775f 6578 7069 lback_allow_expi │ │ │ │ +0018c5e0: 7265 645f 6365 7274 6966 6963 6174 653c red_certificate< │ │ │ │ +0018c5f0: 2f63 6f64 653e 2e3c 2f6c 693e 0a3c 2f75 /code>.
    • .
      .

      .... Back to t │ │ │ │ +0018c620: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +0018c630: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

      .

      .SSL │ │ │ │ +0018c660: 2063 6572 7469 6669 6361 7465 7320 616e certificates an │ │ │ │ +0018c670: 6420 6b65 7920 6669 6c65 733c 2f68 323e d key files

      │ │ │ │ +0018c680: 0a3c 703e 5468 6520 6753 4f41 5020 7061 .

      The gSOAP pa │ │ │ │ +0018c690: 636b 6167 6520 696e 636c 7564 6573 2061 ckage includes a │ │ │ │ +0018c6a0: 203c 656d 3e3c 636f 6465 3e63 6163 6572 cacer │ │ │ │ +0018c6b0: 7473 2e70 656d 3c2f 636f 6465 3e3c 2f65 ts.pem file with the │ │ │ │ +0018c6d0: 2063 6572 7469 6669 6361 7465 7320 6f66 certificates of │ │ │ │ +0018c6e0: 2061 6c6c 2063 6572 7469 6669 6361 7465 all certificate │ │ │ │ +0018c6f0: 2061 7574 686f 7269 7469 6573 2e20 596f authorities. Yo │ │ │ │ +0018c700: 7520 6361 6e20 7573 6520 7468 6973 2066 u can use this f │ │ │ │ +0018c710: 696c 6520 746f 2076 6572 6966 7920 7468 ile to verify th │ │ │ │ +0018c720: 6520 6175 7468 656e 7469 6361 7469 6f6e e authentication │ │ │ │ +0018c730: 206f 6620 7365 7276 6572 7320 7468 6174 of servers that │ │ │ │ +0018c740: 2070 726f 7669 6465 2063 6572 7469 6669 provide certifi │ │ │ │ +0018c750: 6361 7465 7320 6973 7375 6564 2062 7920 cates issued by │ │ │ │ +0018c760: 7468 6573 6520 4341 732e 204a 7573 7420 these CAs. Just │ │ │ │ +0018c770: 7365 7420 7468 6520 3c63 6f64 653e 6361 set the ca │ │ │ │ +0018c780: 6669 6c65 3c2f 636f 6465 3e20 7061 7261 file para │ │ │ │ +0018c790: 6d65 7465 7220 746f 2074 6865 206c 6f63 meter to the loc │ │ │ │ +0018c7a0: 6174 696f 6e20 6f66 2074 6869 7320 6669 ation of this fi │ │ │ │ +0018c7b0: 6c65 206f 6e20 796f 7572 2066 696c 6520 le on your file │ │ │ │ +0018c7c0: 7379 7374 656d 2e20 5468 6572 6566 6f72 system. Therefor │ │ │ │ +0018c7d0: 652c 2077 6865 6e20 796f 7520 6f62 7461 e, when you obta │ │ │ │ +0018c7e0: 696e 2061 2063 6572 7469 6669 6361 7465 in a certificate │ │ │ │ +0018c7f0: 2073 6967 6e65 6420 6279 2061 2074 7275 signed by a tru │ │ │ │ +0018c800: 7374 6564 2043 4120 796f 7520 6361 6e20 sted CA you can │ │ │ │ +0018c810: 7369 6d70 6c79 2075 7365 2074 6865 203c simply use the < │ │ │ │ +0018c820: 656d 3e3c 636f 6465 3e63 6163 6572 7473 em>cacerts │ │ │ │ +0018c830: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem │ │ │ │ +0018c840: 2066 696c 6520 746f 2064 6576 656c 6f70 file to develop │ │ │ │ +0018c850: 2063 6c69 656e 7420 6170 706c 6963 6174 client applicat │ │ │ │ +0018c860: 696f 6e73 2074 6861 7420 6361 6e20 7665 ions that can ve │ │ │ │ +0018c870: 7269 6679 2074 6865 2061 7574 6865 6e74 rify the authent │ │ │ │ +0018c880: 6963 6974 7920 6f66 2079 6f75 7220 7365 icity of your se │ │ │ │ +0018c890: 7276 6572 2e3c 2f70 3e0a 3c70 3e41 6c74 rver.

      .

      Alt │ │ │ │ +0018c8a0: 6572 6e61 7469 7665 6c79 2c20 796f 7520 ernatively, you │ │ │ │ +0018c8b0: 6361 6e20 7573 6520 7468 6520 3c65 6d3e can use the │ │ │ │ +0018c8c0: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug │ │ │ │ +0018c8d0: 696e 2f63 6163 6572 7473 2e68 3c2f 636f in/cacerts.h and gsoap/plu │ │ │ │ +0018c900: 6769 6e2f 6361 6365 7274 732e 633c 2f63 gin/cacerts.c code t │ │ │ │ +0018c920: 6f20 656d 6265 6420 4341 2063 6572 7469 o embed CA certi │ │ │ │ +0018c930: 6669 6361 7465 7320 696e 2079 6f75 7220 ficates in your │ │ │ │ +0018c940: 636c 6965 6e74 2063 6f64 652e 3c2f 703e client code.

      │ │ │ │ +0018c950: 0a3c 703e 466f 7220 7379 7374 656d 7320 .

      For systems │ │ │ │ +0018c960: 6261 7365 6420 6f6e 204d 6963 726f 736f based on Microso │ │ │ │ +0018c970: 6674 2077 696e 646f 7773 2c20 7468 6520 ft windows, the │ │ │ │ +0018c980: 5769 6e49 6e65 7420 6d6f 6475 6c65 2063 WinInet module c │ │ │ │ +0018c990: 616e 2062 6520 7573 6564 2069 6e73 7465 an be used inste │ │ │ │ +0018c9a0: 6164 2c20 7365 6520 7468 6520 3c63 6f64 ad, see the README.txt located in t │ │ │ │ +0018c9d0: 6865 2067 534f 4150 2073 6f75 7263 6520 he gSOAP source │ │ │ │ +0018c9e0: 636f 6465 2070 6163 6b61 6765 2075 6e64 code package und │ │ │ │ +0018c9f0: 6572 203c 636f 6465 3e6d 6f64 5f67 736f er mod_gso │ │ │ │ +0018ca00: 6170 2f67 736f 6170 5f77 696e 2f77 696e ap/gsoap_win/win │ │ │ │ +0018ca10: 696e 6574 3c2f 636f 6465 3e2c 2073 6565 inet, see │ │ │ │ +0018ca20: 2074 6865 2067 534f 4150 203c 6120 6872 the gSOAP WinInet plugi │ │ │ │ +0018ca60: 6e3c 2f61 3e20 646f 6375 6d65 6e74 6174 n documentat │ │ │ │ +0018ca70: 696f 6e2e 3c2f 703e 0a3c 703e 5468 6520 ion.

      .

      The │ │ │ │ +0018ca80: 6f74 6865 7220 3c65 6d3e 3c63 6f64 653e other │ │ │ │ +0018ca90: 2e70 656d 3c2f 636f 6465 3e3c 2f65 6d3e .pem │ │ │ │ +0018caa0: 2066 696c 6573 2069 6e20 7468 6520 6753 files in the gS │ │ │ │ +0018cab0: 4f41 5020 7061 636b 6167 6520 6172 6520 OAP package are │ │ │ │ +0018cac0: 6578 616d 706c 6573 206f 6620 7365 6c66 examples of self │ │ │ │ +0018cad0: 2d73 6967 6e65 6420 6365 7274 6966 6963 -signed certific │ │ │ │ +0018cae0: 6174 6573 2066 6f72 2074 6573 7469 6e67 ates for testing │ │ │ │ +0018caf0: 2070 7572 706f 7365 7320 283c 656d 3e3c purposes (< │ │ │ │ +0018cb00: 636f 6465 3e63 6163 6572 742e 7065 6d3c code>cacert.pem< │ │ │ │ +0018cb10: 2f63 6f64 653e 3c2f 656d 3e2c 203c 656d /code>, client.pe │ │ │ │ +0018cb30: 6d3c 2f63 6f64 653e 3c2f 656d 3e2c 203c m, < │ │ │ │ +0018cb40: 656d 3e3c 636f 6465 3e73 6572 7665 722e em>server. │ │ │ │ +0018cb50: 7065 6d3c 2f63 6f64 653e 3c2f 656d 3e29 pem) │ │ │ │ +0018cb60: 2e20 5468 6520 3c65 6d3e 3c63 6f64 653e . The │ │ │ │ +0018cb70: 636c 6965 6e74 2e70 656d 3c2f 636f 6465 client.pem and < │ │ │ │ +0018cb90: 636f 6465 3e73 6572 7665 722e 7065 6d3c code>server.pem< │ │ │ │ +0018cba0: 2f63 6f64 653e 3c2f 656d 3e20 636f 6e74 /code> cont │ │ │ │ +0018cbb0: 6169 6e20 7468 6520 7072 6976 6174 6520 ain the private │ │ │ │ +0018cbc0: 6b65 7920 616e 6420 6365 7274 6966 6963 key and certific │ │ │ │ +0018cbd0: 6174 6520 6f66 2074 6865 2063 6c69 656e ate of the clien │ │ │ │ +0018cbe0: 7420 6f72 2073 6572 7665 722c 2072 6573 t or server, res │ │ │ │ +0018cbf0: 7065 6374 6976 656c 792e 2054 6865 206b pectively. The k │ │ │ │ +0018cc00: 6579 6669 6c65 7320 283c 656d 3e3c 636f eyfiles (client.pem and server.p │ │ │ │ +0018cc40: 656d 3c2f 636f 6465 3e3c 2f65 6d3e 2920 em) │ │ │ │ +0018cc50: 6172 6520 6372 6561 7465 6420 6279 2063 are created by c │ │ │ │ +0018cc60: 6f6e 6361 7465 6e61 7469 6e67 2074 6865 oncatenating the │ │ │ │ +0018cc70: 2070 7269 7661 7465 206b 6579 2050 454d private key PEM │ │ │ │ +0018cc80: 2077 6974 6820 7468 6520 6365 7274 6966 with the certif │ │ │ │ +0018cc90: 6963 6174 6520 5045 4d2e 2054 6865 206b icate PEM. The k │ │ │ │ +0018cca0: 6579 6669 6c65 2073 686f 756c 6420 6e6f eyfile should no │ │ │ │ +0018ccb0: 7420 6265 2073 6861 7265 6420 7769 7468 t be shared with │ │ │ │ +0018ccc0: 2061 6e79 2070 6172 7479 2e20 5769 7468 any party. With │ │ │ │ +0018ccd0: 204f 7065 6e53 534c 2c20 796f 7520 6361 OpenSSL, you ca │ │ │ │ +0018cce0: 6e20 656e 6372 7970 7420 7468 6520 6b65 n encrypt the ke │ │ │ │ +0018ccf0: 7966 696c 6573 2077 6974 6820 6120 7061 yfiles with a pa │ │ │ │ +0018cd00: 7373 776f 7264 2074 6f20 6f66 6665 7220 ssword to offer │ │ │ │ +0018cd10: 736f 6d65 2070 726f 7465 6374 696f 6e20 some protection │ │ │ │ +0018cd20: 616e 6420 7468 6520 7061 7373 776f 7264 and the password │ │ │ │ +0018cd30: 2069 7320 7573 6564 2069 6e20 7468 6520 is used in the │ │ │ │ +0018cd40: 636c 6965 6e74 2f73 6572 7665 7220 636f client/server co │ │ │ │ +0018cd50: 6465 2074 6f20 7265 6164 2074 6865 206b de to read the k │ │ │ │ +0018cd60: 6579 6669 6c65 2e20 474e 5554 4c53 2064 eyfile. GNUTLS d │ │ │ │ +0018cd70: 6f65 7320 6e6f 7420 7375 7070 6f72 7420 oes not support │ │ │ │ +0018cd80: 7468 6973 2066 6561 7475 7265 2061 6e64 this feature and │ │ │ │ +0018cd90: 2063 616e 6e6f 7420 656e 6372 7970 7420 cannot encrypt │ │ │ │ +0018cda0: 6f72 2064 6563 7279 7074 2061 206b 6579 or decrypt a key │ │ │ │ +0018cdb0: 6669 6c65 2e3c 2f70 3e0a 3c70 3e59 6f75 file.

      .

      You │ │ │ │ +0018cdc0: 2063 616e 2061 6c73 6f20 6372 6561 7465 can also create │ │ │ │ +0018cdd0: 2079 6f75 7220 6f77 6e20 7365 6c66 2d73 your own self-s │ │ │ │ +0018cde0: 6967 6e65 6420 6365 7274 6966 6963 6174 igned certificat │ │ │ │ +0018cdf0: 6573 2e20 5468 6572 6520 6973 206d 6f72 es. There is mor │ │ │ │ +0018ce00: 6520 7468 616e 206f 6e65 2077 6179 2074 e than one way t │ │ │ │ +0018ce10: 6f20 6765 6e65 7261 7465 2074 6865 206e o generate the n │ │ │ │ +0018ce20: 6563 6573 7361 7279 2066 696c 6573 2066 ecessary files f │ │ │ │ +0018ce30: 6f72 2063 6c69 656e 7473 2061 6e64 2073 or clients and s │ │ │ │ +0018ce40: 6572 7665 7273 2e20 5365 6520 3c61 2068 ervers. See htt │ │ │ │ +0018ce70: 703a 2f2f 7777 772e 6f70 656e 7373 6c2e p://www.openssl. │ │ │ │ +0018ce80: 6f72 673c 2f61 3e20 666f 7220 696e 666f org for info │ │ │ │ +0018ce90: 726d 6174 696f 6e20 6f6e 204f 7065 6e53 rmation on OpenS │ │ │ │ +0018cea0: 534c 2061 6e64 203c 6120 6872 6566 3d22 SL and http://sial.o │ │ │ │ +0018cee0: 7267 2f68 6f77 746f 2f6f 7065 6e73 736c rg/howto/openssl │ │ │ │ +0018cef0: 2f63 612f 3c2f 613e 206f 6e20 686f 7720 /ca/ on how │ │ │ │ +0018cf00: 746f 2073 6574 7570 2061 6e64 206d 616e to setup and man │ │ │ │ +0018cf10: 6167 6520 6120 6c6f 6361 6c20 4341 2061 age a local CA a │ │ │ │ +0018cf20: 6e64 203c 6120 6872 6566 3d22 6874 7470 nd http://si │ │ │ │ +0018cf60: 616c 2e6f 7267 2f68 6f77 746f 2f6f 7065 al.org/howto/ope │ │ │ │ +0018cf70: 6e73 736c 2f73 656c 662d 7369 676e 6564 nssl/self-signed │ │ │ │ +0018cf80: 3c2f 613e 206f 6e20 686f 7720 746f 2073 on how to s │ │ │ │ +0018cf90: 6574 7570 2073 656c 662d 7369 676e 6564 etup self-signed │ │ │ │ +0018cfa0: 2074 6573 7420 6365 7274 6966 6963 6174 test certificat │ │ │ │ +0018cfb0: 6573 2e3c 2f70 3e0a 3c70 3e49 7420 6973 es.

      .

      It is │ │ │ │ +0018cfc0: 2070 6f73 7369 626c 6520 746f 2063 6f6e possible to con │ │ │ │ +0018cfd0: 7665 7274 2049 4953 2d67 656e 6572 6174 vert IIS-generat │ │ │ │ +0018cfe0: 6564 2063 6572 7469 6669 6361 7465 7320 ed certificates │ │ │ │ +0018cff0: 746f 2050 454d 2066 6f72 6d61 7420 7769 to PEM format wi │ │ │ │ +0018d000: 7468 2074 6865 206f 7065 6e73 736c 206c th the openssl l │ │ │ │ +0018d010: 6962 7261 7279 2061 6e64 206f 7065 6e73 ibrary and opens │ │ │ │ +0018d020: 736c 2063 6f6d 6d61 6e64 2d6c 696e 6520 sl command-line │ │ │ │ +0018d030: 746f 6f6c 3a20 3c2f 703e 3c70 7265 2063 tool:

      │ │ │ │ +0018d050: 6f70 656e 7373 6c20 7835 3039 202d 696e  openssl x509 -in
      │ │ │ │ +0018d060: 206d 7963 6572 742e 6365 7220 2d69 6e66   mycert.cer -inf
      │ │ │ │ +0018d070: 6f72 6d20 4445 5220 2d6f 7574 206d 7963  orm DER -out myc
      │ │ │ │ +0018d080: 6572 742e 7065 6d20 2d6f 7574 666f 726d  ert.pem -outform
      │ │ │ │ +0018d090: 2050 454d 0a3c 2f70 7265 3e3c 703e 2054   PEM.

      T │ │ │ │ +0018d0a0: 6869 7320 636f 6e76 6572 7473 2074 6865 his converts the │ │ │ │ +0018d0b0: 2043 5254 2d66 6f72 6d61 7474 6564 206d CRT-formatted m │ │ │ │ +0018d0c0: 7963 6572 742e 6365 7220 746f 2050 454d ycert.cer to PEM │ │ │ │ +0018d0d0: 2d66 6f72 6d61 7474 6564 206d 7963 6572 -formatted mycer │ │ │ │ +0018d0e0: 742e 7065 6d2e 3c2f 703e 0a3c 703e 4865 t.pem.

      .

      He │ │ │ │ +0018d0f0: 7265 2069 7320 7468 6520 7369 6d70 6c65 re is the simple │ │ │ │ +0018d100: 7374 2077 6179 2074 6f20 7365 7475 7020 st way to setup │ │ │ │ +0018d110: 7365 6c66 2d73 6967 6e65 6420 6365 7274 self-signed cert │ │ │ │ +0018d120: 6966 6963 6174 6573 2e20 4669 7273 7420 ificates. First │ │ │ │ +0018d130: 796f 7520 6e65 6564 2074 6f20 6372 6561 you need to crea │ │ │ │ +0018d140: 7465 2061 2070 7269 7661 7465 2043 6572 te a private Cer │ │ │ │ +0018d150: 7469 6669 6361 7465 2041 7574 686f 7269 tificate Authori │ │ │ │ +0018d160: 7479 2028 4341 292e 2054 6865 2043 4120 ty (CA). The CA │ │ │ │ +0018d170: 6973 2075 7365 6420 696e 2053 534c 2074 is used in SSL t │ │ │ │ +0018d180: 6f20 7665 7269 6679 2074 6865 2061 7574 o verify the aut │ │ │ │ +0018d190: 6865 6e74 6963 6974 7920 6f66 2061 2067 henticity of a g │ │ │ │ +0018d1a0: 6976 656e 2063 6572 7469 6669 6361 7465 iven certificate │ │ │ │ +0018d1b0: 2e20 5468 6520 4341 2061 6374 7320 6173 . The CA acts as │ │ │ │ +0018d1c0: 2061 2074 7275 7374 6564 2074 6869 7264 a trusted third │ │ │ │ +0018d1d0: 2070 6172 7479 2077 686f 2068 6173 2061 party who has a │ │ │ │ +0018d1e0: 7574 6865 6e74 6963 6174 6564 2074 6865 uthenticated the │ │ │ │ +0018d1f0: 2075 7365 7220 6f66 2074 6865 2073 6967 user of the sig │ │ │ │ +0018d200: 6e65 6420 6365 7274 6966 6963 6174 6520 ned certificate │ │ │ │ +0018d210: 6173 2062 6569 6e67 2077 686f 2074 6865 as being who the │ │ │ │ +0018d220: 7920 7361 792e 2054 6865 2063 6572 7469 y say. The certi │ │ │ │ +0018d230: 6669 6361 7465 2069 7320 7369 676e 6564 ficate is signed │ │ │ │ +0018d240: 2062 7920 7468 6520 4341 2c20 616e 6420 by the CA, and │ │ │ │ +0018d250: 6966 2074 6865 2063 6c69 656e 7420 7472 if the client tr │ │ │ │ +0018d260: 7573 7473 2074 6865 2043 412c 2069 7420 usts the CA, it │ │ │ │ +0018d270: 7769 6c6c 2074 7275 7374 2079 6f75 7220 will trust your │ │ │ │ +0018d280: 6365 7274 6966 6963 6174 652e 2046 6f72 certificate. For │ │ │ │ +0018d290: 2075 7365 2077 6974 6869 6e20 796f 7572 use within your │ │ │ │ +0018d2a0: 206f 7267 616e 697a 6174 696f 6e2c 2061 organization, a │ │ │ │ +0018d2b0: 2070 7269 7661 7465 2043 4120 7769 6c6c private CA will │ │ │ │ +0018d2c0: 2070 726f 6261 626c 7920 7365 7276 6520 probably serve │ │ │ │ +0018d2d0: 796f 7572 206e 6565 6473 2e20 486f 7765 your needs. Howe │ │ │ │ +0018d2e0: 7665 722c 2069 6620 796f 7520 696e 7465 ver, if you inte │ │ │ │ +0018d2f0: 6e64 2075 7365 2079 6f75 7220 6365 7274 nd use your cert │ │ │ │ +0018d300: 6966 6963 6174 6573 2066 6f72 2061 2070 ificates for a p │ │ │ │ +0018d310: 7562 6c69 6320 7365 7276 6963 652c 2079 ublic service, y │ │ │ │ +0018d320: 6f75 2073 686f 756c 6420 7072 6f62 6162 ou should probab │ │ │ │ +0018d330: 6c79 206f 6274 6169 6e20 6120 6365 7274 ly obtain a cert │ │ │ │ +0018d340: 6966 6963 6174 6520 6672 6f6d 2061 206b ificate from a k │ │ │ │ +0018d350: 6e6f 776e 2043 412e 2049 6e20 6164 6469 nown CA. In addi │ │ │ │ +0018d360: 7469 6f6e 2074 6f20 6964 656e 7469 6669 tion to identifi │ │ │ │ +0018d370: 6361 7469 6f6e 2c20 796f 7572 2063 6572 cation, your cer │ │ │ │ +0018d380: 7469 6669 6361 7465 2069 7320 616c 736f tificate is also │ │ │ │ +0018d390: 2075 7365 6420 666f 7220 656e 6372 7970 used for encryp │ │ │ │ +0018d3a0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3e43 7265 tion.

      .

      Cre │ │ │ │ +0018d3b0: 6174 696e 6720 6365 7274 6966 6963 6174 ating certificat │ │ │ │ +0018d3c0: 6573 2073 686f 756c 6420 6265 2064 6f6e es should be don │ │ │ │ +0018d3d0: 6520 7468 726f 7567 6820 6120 4341 2074 e through a CA t │ │ │ │ +0018d3e0: 6f20 6f62 7461 696e 2073 6967 6e65 6420 o obtain signed │ │ │ │ +0018d3f0: 6365 7274 6966 6963 6174 6573 2e20 4275 certificates. Bu │ │ │ │ +0018d400: 7420 796f 7520 6361 6e20 6372 6561 7465 t you can create │ │ │ │ +0018d410: 2079 6f75 7220 6f77 6e20 6365 7274 6966 your own certif │ │ │ │ +0018d420: 6963 6174 6573 2066 6f72 2074 6573 7469 icates for testi │ │ │ │ +0018d430: 6e67 2070 7572 706f 7365 7320 6173 2066 ng purposes as f │ │ │ │ +0018d440: 6f6c 6c6f 7773 2e3c 2f70 3e0a 3c75 6c3e ollows.

      .
        │ │ │ │ +0018d450: 0a3c 6c69 3e47 6f20 746f 2074 6865 204f .
      • Go to the O │ │ │ │ +0018d460: 7065 6e53 534c 2062 696e 2064 6972 6563 penSSL bin direc │ │ │ │ +0018d470: 746f 7279 2028 3c63 6f64 653e 2f75 7372 tory (/usr │ │ │ │ +0018d480: 2f6c 6f63 616c 2f73 736c 3c2f 636f 6465 /local/ssl by default and │ │ │ │ +0018d4a0: 203c 636f 6465 3e2f 5379 7374 656d 2f4c /System/L │ │ │ │ +0018d4b0: 6962 7261 7279 2f4f 7065 6e53 534c 3c2f ibrary/OpenSSL on Mac OS │ │ │ │ +0018d4d0: 5829 3c2f 6c69 3e0a 3c6c 693e 5468 6572 X)
      • .
      • Ther │ │ │ │ +0018d4e0: 6520 7368 6f75 6c64 2062 6520 6120 6669 e should be a fi │ │ │ │ +0018d4f0: 6c65 2063 616c 6c65 6420 6f70 656e 7373 le called openss │ │ │ │ +0018d500: 6c2e 636e 663c 2f6c 693e 0a3c 6c69 3e43 l.cnf
      • .
      • C │ │ │ │ +0018d510: 7265 6174 6520 6120 6e65 7720 6469 7265 reate a new dire │ │ │ │ +0018d520: 6374 6f72 7920 696e 2079 6f75 7220 686f ctory in your ho │ │ │ │ +0018d530: 6d65 2061 6363 6f75 6e74 2c20 652e 672e me account, e.g. │ │ │ │ +0018d540: 2024 484f 4d45 2f43 412c 2061 6e64 2063 $HOME/CA, and c │ │ │ │ +0018d550: 6f70 7920 7468 6520 6f70 656e 7373 6c2e opy the openssl. │ │ │ │ +0018d560: 636e 6620 6669 6c65 2074 6f20 7468 6973 cnf file to this │ │ │ │ +0018d570: 2064 6972 6563 746f 7279 3c2f 6c69 3e0a directory
      • . │ │ │ │ +0018d580: 3c6c 693e 4d6f 6469 6679 206f 7065 6e73
      • Modify opens │ │ │ │ +0018d590: 736c 2e63 6e66 2062 7920 6368 616e 6769 sl.cnf by changi │ │ │ │ +0018d5a0: 6e67 2074 6865 2027 6469 7227 2076 616c ng the 'dir' val │ │ │ │ +0018d5b0: 7565 2074 6f20 484f 4d45 2f43 413c 2f6c ue to HOME/CA.
      • Copy the │ │ │ │ +0018d5d0: 5245 4144 4d45 2e74 7874 2c20 726f 6f74 README.txt, root │ │ │ │ +0018d5e0: 2e73 682c 2061 6e64 2063 6572 742e 7368 .sh, and cert.sh │ │ │ │ +0018d5f0: 2073 6372 6970 7473 2066 726f 6d20 7468 scripts from th │ │ │ │ +0018d600: 6520 6753 4f41 5020 736f 7572 6365 2063 e gSOAP source c │ │ │ │ +0018d610: 6f64 6520 7061 636b 6167 6520 6c6f 6361 ode package loca │ │ │ │ +0018d620: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the < │ │ │ │ +0018d630: 636f 6465 3e67 736f 6170 2f73 616d 706c code>gsoap/sampl │ │ │ │ +0018d640: 6573 2f73 736c 3c2f 636f 6465 3e3c 2f65 es/ssl directory to │ │ │ │ +0018d660: 484f 4d45 2f43 413c 2f6c 693e 0a3c 6c69 HOME/CA
      • .
      • Follow the READ │ │ │ │ +0018d680: 4d45 2e74 7874 2069 6e73 7472 7563 7469 ME.txt instructi │ │ │ │ +0018d690: 6f6e 733c 2f6c 693e 0a3c 2f75 6c3e 0a3c ons
      • .
      .< │ │ │ │ +0018d6a0: 703e 596f 7520 6e6f 7720 6861 7665 2061 p>You now have a │ │ │ │ +0018d6b0: 2073 656c 662d 7369 676e 6564 2043 4120 self-signed CA │ │ │ │ +0018d6c0: 726f 6f74 2063 6572 7469 6669 6361 7465 root certificate │ │ │ │ +0018d6d0: 2063 6163 6572 742e 7065 6d20 616e 6420 cacert.pem and │ │ │ │ +0018d6e0: 6120 7365 7276 6572 2e70 656d 2028 6f72 a server.pem (or │ │ │ │ +0018d6f0: 2063 6c69 656e 742e 7065 6d29 2063 6572 client.pem) cer │ │ │ │ +0018d700: 7469 6669 6361 7465 2069 6e20 5045 4d20 tificate in PEM │ │ │ │ +0018d710: 666f 726d 6174 2e20 5468 6520 6361 6365 format. The cace │ │ │ │ +0018d720: 7274 2e70 656d 2063 6572 7469 6669 6361 rt.pem certifica │ │ │ │ +0018d730: 7465 2069 7320 7573 6564 2069 6e20 7468 te is used in th │ │ │ │ +0018d740: 6520 3c63 6f64 653e 6361 6669 6c65 3c2f e cafile parameter │ │ │ │ +0018d760: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the │ │ │ │ +0018d7f0: 736f 6170 5f73 736c 5f63 6c69 656e 745f soap_ssl_client_ │ │ │ │ +0018d800: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context (or │ │ │ │ +0018d8a0: 736f 6170 5f73 736c 5f73 6572 7665 725f soap_ssl_server_ │ │ │ │ +0018d8b0: 636f 6e74 6578 743c 2f61 3e3c 2f63 6f64 context) at the clien │ │ │ │ +0018d8d0: 7420 286f 7220 7365 7276 6572 2920 7369 t (or server) si │ │ │ │ +0018d8e0: 6465 2074 6f20 7665 7269 6679 2074 6865 de to verify the │ │ │ │ +0018d8f0: 2061 7574 6865 6e74 6963 6974 7920 6f66 authenticity of │ │ │ │ +0018d900: 2074 6865 2070 6565 722e 2059 6f75 2063 the peer. You c │ │ │ │ +0018d910: 616e 2061 6c73 6f20 7072 6f76 6964 6520 an also provide │ │ │ │ +0018d920: 6120 6361 7061 7468 2070 6172 616d 6574 a capath paramet │ │ │ │ +0018d930: 6572 2074 6f20 7468 6573 6520 7472 7573 er to these trus │ │ │ │ +0018d940: 7465 6420 6365 7274 6966 6963 6174 6573 ted certificates │ │ │ │ +0018d950: 2e20 5468 6520 7365 7276 6572 2e70 656d . The server.pem │ │ │ │ +0018d960: 2028 6f72 2063 6c69 656e 742e 7065 6d29 (or client.pem) │ │ │ │ +0018d970: 206d 7573 7420 6265 2070 726f 7669 6465 must be provide │ │ │ │ +0018d980: 6420 7769 7468 2074 6865 203c 636f 6465 d with the soap_ssl_ser │ │ │ │ +0018da20: 7665 725f 636f 6e74 6578 743c 2f61 3e3c ver_context< │ │ │ │ +0018da30: 2f63 6f64 653e 2061 7420 7468 6520 7365 /code> at the se │ │ │ │ +0018da40: 7276 6572 2073 6964 6520 286f 7220 3c63 rver side (or soap_ssl_ │ │ │ │ +0018dae0: 636c 6965 6e74 5f63 6f6e 7465 7874 3c2f client_context at the │ │ │ │ +0018db00: 2063 6c69 656e 7420 7369 6465 2920 746f client side) to │ │ │ │ +0018db10: 6765 7468 6572 2077 6974 6820 7468 6520 gether with the │ │ │ │ +0018db20: 7061 7373 776f 7264 2079 6f75 2065 6e74 password you ent │ │ │ │ +0018db30: 6572 6564 2077 6865 6e20 6765 6e65 7261 ered when genera │ │ │ │ +0018db40: 7469 6e67 2074 6865 2063 6572 7469 6669 ting the certifi │ │ │ │ +0018db50: 6361 7465 2075 7369 6e67 2063 6572 742e cate using cert. │ │ │ │ +0018db60: 7368 2074 6f20 6163 6365 7373 2074 6865 sh to access the │ │ │ │ +0018db70: 2066 696c 652e 2054 6865 7365 2063 6572 file. These cer │ │ │ │ +0018db80: 7469 6669 6361 7465 7320 6d75 7374 2062 tificates must b │ │ │ │ +0018db90: 6520 7072 6573 656e 7420 746f 2067 7261 e present to gra │ │ │ │ +0018dba0: 6e74 2061 7574 6865 6e74 6963 6174 696f nt authenticatio │ │ │ │ +0018dbb0: 6e20 7265 7175 6573 7473 2062 7920 7065 n requests by pe │ │ │ │ +0018dbc0: 6572 732e 2049 6e20 6164 6469 7469 6f6e ers. In addition │ │ │ │ +0018dbd0: 2c20 7468 6520 7365 7276 6572 2e70 656d , the server.pem │ │ │ │ +0018dbe0: 2028 616e 6420 636c 6965 6e74 2e70 656d (and client.pem │ │ │ │ +0018dbf0: 2920 696e 636c 7564 6520 7468 6520 686f ) include the ho │ │ │ │ +0018dc00: 7374 206e 616d 6520 6f66 2074 6865 206d st name of the m │ │ │ │ +0018dc10: 6163 6869 6e65 206f 6e20 7768 6963 6820 achine on which │ │ │ │ +0018dc20: 7468 6520 6170 706c 6963 6174 696f 6e20 the application │ │ │ │ +0018dc30: 7275 6e73 2028 652e 672e 206c 6f63 616c runs (e.g. local │ │ │ │ +0018dc40: 686f 7374 292c 2073 6f20 796f 7520 6e65 host), so you ne │ │ │ │ +0018dc50: 6564 2074 6f20 6765 6e65 7261 7465 206e ed to generate n │ │ │ │ +0018dc60: 6577 2063 6572 7469 6669 6361 7465 7320 ew certificates │ │ │ │ +0018dc70: 7768 656e 206d 6967 7261 7469 6e67 2061 when migrating a │ │ │ │ +0018dc80: 2073 6572 7665 7220 286f 7220 636c 6965 server (or clie │ │ │ │ +0018dc90: 6e74 292e 3c2f 703e 0a3c 703e 4669 6e61 nt).

      .

      Fina │ │ │ │ +0018dca0: 6c6c 792c 2079 6f75 206e 6565 6420 746f lly, you need to │ │ │ │ +0018dcb0: 2067 656e 6572 6174 6520 4469 6666 6965 generate Diffie │ │ │ │ +0018dcc0: 2d48 656c 6d61 6e6e 2028 4448 2920 7061 -Helmann (DH) pa │ │ │ │ +0018dcd0: 7261 6d65 7465 7273 2066 6f72 2074 6865 rameters for the │ │ │ │ +0018dce0: 2073 6572 7665 7220 6966 2079 6f75 2077 server if you w │ │ │ │ +0018dcf0: 6973 6820 746f 2075 7365 2044 4820 696e ish to use DH in │ │ │ │ +0018dd00: 7374 6561 6420 6f66 2052 5341 2e20 5468 stead of RSA. Th │ │ │ │ +0018dd10: 6572 6520 6172 6520 7477 6f20 6f70 7469 ere are two opti │ │ │ │ +0018dd20: 6f6e 733a 3c2f 703e 0a3c 756c 3e0a 3c6c ons:

      .
    . │ │ │ │ +0018e3a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ +0018e3c0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (!ENG │ │ │ │ +0018e3f0: 494e 455f 7365 745f 6465 6661 756c 7428 INE_set_default( │ │ │ │ +0018e400: 652c 2045 4e47 494e 455f 4d45 5448 4f44 e, ENGINE_METHOD │ │ │ │ +0018e410: 5f41 4c4c 2929 203c 2f64 6976 3e0a 3c64 _ALL))
    . │ │ │ │ +0018e430: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde │ │ │ │ +0018e440: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, │ │ │ │ +0018e460: 2671 756f 743b 4572 726f 7220 7573 696e "Error usin │ │ │ │ +0018e470: 6720 656e 6769 6e65 2025 735c 6e26 7175 g engine %s\n&qu │ │ │ │ +0018e480: 6f74 3b3c 2f73 7061 6e3e 2c20 656e 6769 ot;, engi │ │ │ │ +0018e490: 6e65 293b 203c 2f64 6976 3e0a 3c64 6976 ne);
    .
    │ │ │ │ +0018e4b0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    }.

    Th │ │ │ │ +0018e510: 6520 666f 6c6c 6f77 696e 6720 7461 626c e following tabl │ │ │ │ +0018e520: 6520 6c69 7374 7320 7468 6520 6e61 6d65 e lists the name │ │ │ │ +0018e530: 7320 6f66 2074 6865 2068 6172 6477 6172 s of the hardwar │ │ │ │ +0018e540: 6520 616e 6420 736f 6674 7761 7265 2065 e and software e │ │ │ │ +0018e550: 6e67 696e 6573 3a3c 2f70 3e0a 3c74 6162 ngines:

    ..

    .. │ │ │ │ +0018e600: 3c74 7220 636c 6173 733d 226d 6172 6b64 │ │ │ │ +0018e620: 0a3c 7464 2063 6c61 7373 3d22 6d61 726b .< │ │ │ │ +0018e660: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0018e670: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0018e680: 3e54 6865 2064 6566 6175 6c74 2073 6f66 >The default sof │ │ │ │ +0018e690: 7477 6172 6520 656e 6769 6e65 2066 6f72 tware engine for │ │ │ │ +0018e6a0: 2063 7279 7074 6f67 7261 7068 6963 206f cryptographic o │ │ │ │ +0018e6b0: 7065 7261 7469 6f6e 7320 2020 203c 2f74 perations ....< │ │ │ │ +0018e7b0: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0018e7c0: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0018e7d0: 3e3c 636f 6465 3e63 7377 6966 743c 2f63 >cswift .. │ │ │ │ +0018e860: 3c74 6420 636c 6173 733d 226d 6172 6b64 ..< │ │ │ │ +0018e910: 7464 2063 6c61 7373 3d22 6d61 726b 646f td class="markdo │ │ │ │ +0018e920: 776e 5461 626c 6542 6f64 794e 6f6e 6522 wnTableBodyNone" │ │ │ │ +0018e930: 3e3c 636f 6465 3e61 7461 6c6c 613c 2f63 >atalla . │ │ │ │ +0018e9a0: 3c74 7220 636c 6173 733d 226d 6172 6b64 . │ │ │ │ +0018ea20: 4e75 726f 6e20 6163 6365 6c65 7261 7469 Nuron accelerati │ │ │ │ +0018ea30: 6f6e 2068 6172 6477 6172 6520 2020 203c on hardware < │ │ │ │ +0018ea40: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>.... │ │ │ │ +0018eb40: 3c63 6f64 653e 6165 703c 2f63 6f64 653e aep │ │ │ │ +0018eb50: 2020 203c 2f74 643e 3c74 6420 636c 6173 ... │ │ │ │ +0018ec50: 3c2f 7461 626c 653e 0a3c 703e f09f 949d
    engine result < │ │ │ │ -0018e610: 2f74 683e 3c2f 7472 3e0a 3c74 7220 636c /th>
    openssl The d │ │ │ │ -0018e6a0: 6566 6175 6c74 2073 6f66 7477 6172 6520 efault software │ │ │ │ -0018e6b0: 656e 6769 6e65 2066 6f72 2063 7279 7074 engine for crypt │ │ │ │ -0018e6c0: 6f67 7261 7068 6963 206f 7065 7261 7469 ographic operati │ │ │ │ -0018e6d0: 6f6e 7320 2020 203c 2f74 643e 3c2f 7472 ons
    open │ │ │ │ -0018e730: 6273 645f 6465 765f 6372 7970 746f 3c2f bsd_dev_crypto O │ │ │ │ -0018e770: 7065 6e42 5344 2073 7570 706f 7274 7320 penBSD supports │ │ │ │ -0018e780: 6b65 726e 656c 206c 6576 656c 2063 7279 kernel level cry │ │ │ │ -0018e790: 7074 6f67 7261 7068 7920 2020 203c 2f74 ptography
    cswift │ │ │ │ -0018e800: 203c 2f74 643e 3c74 6420 636c 6173 733d CryptoSw │ │ │ │ -0018e830: 6966 7420 6163 6365 6c65 7261 7469 6f6e ift acceleration │ │ │ │ -0018e840: 2068 6172 6477 6172 6520 2020 203c 2f74 hardware
    chil │ │ │ │ -0018e8b0: 3c2f 7464 3e3c 7464 2063 6c61 7373 3d22 nCipher C │ │ │ │ -0018e8e0: 4849 4c20 6163 6365 6c65 7261 7469 6f6e HIL acceleration │ │ │ │ -0018e8f0: 2068 6172 6477 6172 6520 2020 203c 2f74 hardware
    atalla │ │ │ │ -0018e960: 203c 2f74 643e 3c74 6420 636c 6173 733d Compaq A │ │ │ │ -0018e990: 7461 6c6c 6120 6163 6365 6c65 7261 7469 talla accelerati │ │ │ │ -0018e9a0: 6f6e 2068 6172 6477 6172 6520 2020 203c on hardware < │ │ │ │ -0018e9b0: 2f74 643e 3c2f 7472 3e0a 3c74 7220 636c /td>
    nuron │ │ │ │ -0018ea10: 2020 203c 2f74 643e 3c74 6420 636c 6173 Nuron │ │ │ │ -0018ea40: 6163 6365 6c65 7261 7469 6f6e 2068 6172 acceleration har │ │ │ │ -0018ea50: 6477 6172 6520 2020 203c 2f74 643e 3c2f dware
    ubs │ │ │ │ -0018eab0: 6563 3c2f 636f 6465 3e20 2020 3c2f 7464 ec Broadcom uBSe │ │ │ │ -0018eaf0: 6320 6163 6365 6c65 7261 7469 6f6e 2068 c acceleration h │ │ │ │ -0018eb00: 6172 6477 6172 6520 2020 203c 2f74 643e ardware
    │ │ │ │ -0018eb60: 6165 703c 2f63 6f64 653e 2020 203c 2f74 aep Aep accelera │ │ │ │ -0018eba0: 7469 6f6e 2068 6172 6477 6172 6520 2020 tion hardware │ │ │ │ -0018ebb0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    < │ │ │ │ -0018ec00: 636f 6465 3e73 7572 6577 6172 653c 2f63 code>sureware Su │ │ │ │ -0018ec40: 7265 5761 7265 2061 6363 656c 6572 6174 reWare accelerat │ │ │ │ -0018ec50: 696f 6e20 6861 7264 7761 7265 2020 203c ion hardware < │ │ │ │ -0018ec60: 2f74 643e 3c2f 7472 3e0a 3c2f 7461 626c /td>
    engin │ │ │ │ +0018e5c0: 6520 2020 3c2f 7468 3e3c 7468 2063 6c61 e resul │ │ │ │ +0018e5f0: 7420 2020 203c 2f74 683e 3c2f 7472 3e0a t
    openssl │ │ │ │ +0018e650: 3c2f 636f 6465 3e20 2020 3c2f 7464 3e3c
    openbsd_dev_cr │ │ │ │ +0018e720: 7970 746f 3c2f 636f 6465 3e20 2020 3c2f ypto OpenBSD sup │ │ │ │ +0018e760: 706f 7274 7320 6b65 726e 656c 206c 6576 ports kernel lev │ │ │ │ +0018e770: 656c 2063 7279 7074 6f67 7261 7068 7920 el cryptography │ │ │ │ +0018e780: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    Cr │ │ │ │ +0018e810: 7970 746f 5377 6966 7420 6163 6365 6c65 yptoSwift accele │ │ │ │ +0018e820: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware │ │ │ │ +0018e830: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    chil nCi │ │ │ │ +0018e8c0: 7068 6572 2043 4849 4c20 6163 6365 6c65 pher CHIL accele │ │ │ │ +0018e8d0: 7261 7469 6f6e 2068 6172 6477 6172 6520 ration hardware │ │ │ │ +0018e8e0: 2020 203c 2f74 643e 3c2f 7472 3e0a 3c74
    Co │ │ │ │ +0018e970: 6d70 6171 2041 7461 6c6c 6120 6163 6365 mpaq Atalla acce │ │ │ │ +0018e980: 6c65 7261 7469 6f6e 2068 6172 6477 6172 leration hardwar │ │ │ │ +0018e990: 6520 2020 203c 2f74 643e 3c2f 7472 3e0a e
    nuron< │ │ │ │ +0018e9f0: 2f63 6f64 653e 2020 203c 2f74 643e 3c74 /code>
    ubsec │ │ │ │ +0018eaa0: 2020 3c2f 7464 3e3c 7464 2063 6c61 7373 Broadco │ │ │ │ +0018ead0: 6d20 7542 5365 6320 6163 6365 6c65 7261 m uBSec accelera │ │ │ │ +0018eae0: 7469 6f6e 2068 6172 6477 6172 6520 2020 tion hardware │ │ │ │ +0018eaf0: 203c 2f74 643e 3c2f 7472 3e0a 3c74 7220
    Aep ac │ │ │ │ +0018eb80: 6365 6c65 7261 7469 6f6e 2068 6172 6477 celeration hardw │ │ │ │ +0018eb90: 6172 6520 2020 203c 2f74 643e 3c2f 7472 are
    surew │ │ │ │ +0018ebf0: 6172 653c 2f63 6f64 653e 2020 203c 2f74 are SureWare acc │ │ │ │ +0018ec30: 656c 6572 6174 696f 6e20 6861 7264 7761 eleration hardwa │ │ │ │ +0018ec40: 7265 2020 203c 2f74 643e 3c2f 7472 3e0a re
    .

    .... │ │ │ │ +0018ec60: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +0018ec70: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +0018ec80: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +0018ec90: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.SSL on Win │ │ │ │ +0018ecc0: 646f 7773 3c2f 6832 3e0a 3c70 3e53 6574 dows

    .

    Set │ │ │ │ +0018ecd0: 2074 6865 2066 756c 6c20 7061 7468 2074 the full path t │ │ │ │ +0018ece0: 6f20 3c65 6d3e 3c63 6f64 653e 6c69 6273 o libs │ │ │ │ +0018ecf0: 736c 2e6c 6962 3c2f 636f 6465 3e3c 2f65 sl.lib and libcrypto.lib under │ │ │ │ +0018ed30: 2074 6865 204d 5356 432b 2b20 2250 726f the MSVC++ "Pro │ │ │ │ +0018ed40: 6a65 6374 7322 206d 656e 752c 2074 6865 jects" menu, the │ │ │ │ +0018ed50: 6e20 6368 6f6f 7365 2022 4c69 6e6b 223a n choose "Link": │ │ │ │ +0018ed60: 2022 4f62 6a65 6374 2f4d 6f64 756c 6573 "Object/Modules │ │ │ │ +0018ed70: 222e 2050 6c65 6173 6520 6d61 6b65 2073 ". Please make s │ │ │ │ +0018ed80: 7572 6520 3c65 6d3e 3c63 6f64 653e 6c69 ure li │ │ │ │ +0018ed90: 6273 736c 3332 2e64 6c6c 3c2f 636f 6465 bssl32.dll and < │ │ │ │ +0018edb0: 636f 6465 3e6c 6962 6561 7933 322e 646c code>libeay32.dl │ │ │ │ +0018edc0: 6c3c 2f63 6f64 653e 3c2f 656d 3e20 6361 l ca │ │ │ │ +0018edd0: 6e20 6265 206c 6f61 6465 6420 6279 2079 n be loaded by y │ │ │ │ +0018ede0: 6f75 7220 6170 706c 6963 6174 696f 6e73 our applications │ │ │ │ +0018edf0: 2c20 7468 7573 2074 6865 7920 6d75 7374 , thus they must │ │ │ │ +0018ee00: 2062 6520 696e 7374 616c 6c65 6420 7072 be installed pr │ │ │ │ +0018ee10: 6f70 6572 6c79 206f 6e20 7468 6520 7461 operly on the ta │ │ │ │ +0018ee20: 7267 6574 206d 6163 6869 6e65 2e3c 2f70 rget machine.

    .

    If you're u │ │ │ │ +0018ee40: 7369 6e67 2063 6f6d 7069 6c61 7469 6f6e sing compilation │ │ │ │ +0018ee50: 2073 6574 7469 6e67 7320 7375 6368 2061 settings such a │ │ │ │ +0018ee60: 7320 3c63 6f64 653e 2f4d 5464 3c2f 636f s /MTd then link to │ │ │ │ +0018ee80: 2074 6865 2063 6f72 7265 6374 203c 656d the correct libeay32M │ │ │ │ +0018eea0: 5464 2e6c 6962 3c2f 636f 6465 3e3c 2f65 Td.lib and ssleay32MTd.lib │ │ │ │ +0018eed0: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6962 lib │ │ │ │ +0018eee0: 7261 7269 6573 2e3c 2f70 3e0a 3c70 3e41 raries.

    .

    A │ │ │ │ +0018eef0: 6c74 6572 6e61 7469 7665 6c79 2c20 796f lternatively, yo │ │ │ │ +0018ef00: 7520 6361 6e20 7573 6520 7468 6520 5769 u can use the Wi │ │ │ │ +0018ef10: 6e49 6e65 7420 696e 7465 7266 6163 6520 nInet interface │ │ │ │ +0018ef20: 666f 7220 7365 6375 7265 2063 6f6e 6e65 for secure conne │ │ │ │ +0018ef30: 6374 696f 6e73 2c20 6176 6169 6c61 626c ctions, availabl │ │ │ │ +0018ef40: 6520 696e 2074 6865 203c 656d 3e3c 636f e in the gsoap/mod_gso │ │ │ │ +0018ef60: 6170 3c2f 636f 6465 3e3c 2f65 6d3e 2064 ap d │ │ │ │ +0018ef70: 6972 6563 746f 7279 206f 6620 7468 6520 irectory of the │ │ │ │ +0018ef80: 6753 4f41 5020 7061 636b 6167 652c 2073 gSOAP package, s │ │ │ │ +0018ef90: 6565 2061 6c73 6f20 5365 6374 696f 6e20 ee also Section │ │ │ │ +0018efa0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 Th │ │ │ │ +0018efd0: 6520 5769 6e49 6e65 7420 706c 7567 696e e WinInet plugin │ │ │ │ +0018efe0: 3c2f 613e 2e20 4f72 2079 6f75 2063 616e . Or you can │ │ │ │ +0018eff0: 2075 7365 2074 6865 2043 5552 4c20 706c use the CURL pl │ │ │ │ +0018f000: 7567 696e 2074 6f20 7573 6520 4355 524c ugin to use CURL │ │ │ │ +0018f010: 2066 6f72 2073 6563 7572 6520 636f 6e6e for secure conn │ │ │ │ +0018f020: 6563 7469 6f6e 732c 2073 6565 2053 6563 ections, see Sec │ │ │ │ +0018f030: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion │ │ │ │ +0018f060: 5468 6520 4355 524c 2070 6c75 6769 6e3c The CURL plugin< │ │ │ │ +0018f070: 2f61 3e2e 3c2f 703e 0a3c 703e f09f 949d /a>.

    .

    .... │ │ │ │ +0018f080: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ +0018f090: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ +0018f0a0: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ +0018f0b0: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Zlib │ │ │ │ +0018f0e0: 636f 6d70 7265 7373 696f 6e3c 2f68 323e compression

    │ │ │ │ +0018f0f0: 0a3c 703e 546f 2065 6e61 626c 6520 6465 .

    To enable de │ │ │ │ +0018f100: 666c 6174 6520 616e 6420 677a 6970 2063 flate and gzip c │ │ │ │ +0018f110: 6f6d 7072 6573 7369 6f6e 2077 6974 6820 ompression with │ │ │ │ +0018f120: 5a6c 6962 2c20 696e 7374 616c 6c20 5a6c Zlib, install Zl │ │ │ │ +0018f130: 6962 2066 726f 6d20 3c61 2068 7265 663d ib from http://www │ │ │ │ +0018f160: 2e7a 6c69 622e 6f72 673c 2f61 3e20 6966 .zlib.org if │ │ │ │ +0018f170: 206e 6f74 2061 6c72 6561 6479 2069 6e73 not already ins │ │ │ │ +0018f180: 7461 6c6c 6564 206f 6e20 796f 7572 2073 talled on your s │ │ │ │ +0018f190: 7973 7465 6d2e 2043 6f6d 7069 6c65 203c ystem. Compile < │ │ │ │ +0018f1a0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s │ │ │ │ +0018f1b0: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp (or │ │ │ │ +0018f1d0: 3c63 6f64 653e 6773 6f61 702f 7374 6473 gsoap/stds │ │ │ │ +0018f1e0: 6f61 7032 2e63 3c2f 636f 6465 3e3c 2f65 oap2.c) and all your │ │ │ │ +0018f200: 2073 6f75 7263 6573 2074 6861 7420 696e sources that in │ │ │ │ +0018f210: 636c 7564 6520 3c65 6d3e 3c63 6f64 653e clude │ │ │ │ +0018f220: 6773 6f61 702f 7374 6473 6f61 7032 2e68 gsoap/stdsoap2.h │ │ │ │ +0018f230: 3c2f 636f 6465 3e3c 2f65 6d3e 206f 7220 or │ │ │ │ +0018f240: 3c65 6d3e 3c63 6f64 653e 736f 6170 482e soapH. │ │ │ │ +0018f250: 683c 2f63 6f64 653e 3c2f 656d 3e20 7769 h wi │ │ │ │ +0018f260: 7468 2063 6f6d 7069 6c65 2d74 696d 6520 th compile-time │ │ │ │ +0018f270: 666c 6167 203c 636f 6465 3e23 5749 5448 flag #WITH │ │ │ │ +0018f280: 5f47 5a49 503c 2f63 6f64 653e 2061 6e64 _GZIP and │ │ │ │ +0018f290: 206c 696e 6b20 796f 7572 2063 6f64 6520 link your code │ │ │ │ +0018f2a0: 7769 7468 2074 6865 205a 6c69 6220 6c69 with the Zlib li │ │ │ │ +0018f2b0: 6272 6172 792c 2065 2e67 2e20 3c62 3e3c brary, e.g. < │ │ │ │ +0018f2c0: 636f 6465 3e2d 6c7a 3c2f 636f 6465 3e3c code>-lz< │ │ │ │ +0018f2d0: 2f62 3e20 6f6e 2055 6e69 782f 4c69 6e75 /b> on Unix/Linu │ │ │ │ +0018f2e0: 7820 706c 6174 666f 726d 732e 3c2f 703e x platforms.

    │ │ │ │ +0018f2f0: 0a3c 703e 5468 6520 677a 6970 2063 6f6d .

    The gzip com │ │ │ │ +0018f300: 7072 6573 7369 6f6e 2069 7320 6f72 7468 pression is orth │ │ │ │ +0018f310: 6f67 6f6e 616c 2074 6f20 616c 6c20 7472 ogonal to all tr │ │ │ │ +0018f320: 616e 7370 6f72 7420 656e 636f 6469 6e67 ansport encoding │ │ │ │ +0018f330: 7320 7375 6368 2061 7320 4854 5450 2c20 s such as HTTP, │ │ │ │ +0018f340: 5353 4c2c 2044 494d 452c 2061 6e64 2063 SSL, DIME, and c │ │ │ │ +0018f350: 616e 2062 6520 7573 6564 2077 6974 6820 an be used with │ │ │ │ +0018f360: 6f74 6865 7220 7472 616e 7370 6f72 7420 other transport │ │ │ │ +0018f370: 6c61 7965 7273 2e20 596f 7520 6361 6e20 layers. You can │ │ │ │ +0018f380: 6576 656e 2073 6176 6520 616e 6420 6c6f even save and lo │ │ │ │ +0018f390: 6164 2063 6f6d 7072 6573 7365 6420 584d ad compressed XM │ │ │ │ +0018f3a0: 4c20 6461 7461 2074 6f2f 6672 6f6d 2066 L data to/from f │ │ │ │ +0018f3b0: 696c 6573 2e3c 2f70 3e0a 3c70 3e54 776f iles.

    .

    Two │ │ │ │ +0018f3c0: 2063 6f6d 7072 6573 7369 6f6e 2066 6f72 compression for │ │ │ │ +0018f3d0: 6d61 7473 2061 7265 2073 7570 706f 7274 mats are support │ │ │ │ +0018f3e0: 6564 2062 7920 7468 6520 656e 6769 6e65 ed by the engine │ │ │ │ +0018f3f0: 3a20 6465 666c 6174 6520 616e 6420 677a : deflate and gz │ │ │ │ +0018f400: 6970 2e20 5468 6520 677a 6970 2066 6f72 ip. The gzip for │ │ │ │ +0018f410: 6d61 7420 6973 2075 7365 6420 6279 2064 mat is used by d │ │ │ │ +0018f420: 6566 6175 6c74 2e20 5468 6520 677a 6970 efault. The gzip │ │ │ │ +0018f430: 2066 6f72 6d61 7420 6861 7320 7365 7665 format has seve │ │ │ │ +0018f440: 7261 6c20 6265 6e65 6669 7473 206f 7665 ral benefits ove │ │ │ │ +0018f450: 7220 6465 666c 6174 652e 2046 6972 7374 r deflate. First │ │ │ │ +0018f460: 6c79 2c20 7468 6520 656e 6769 6e65 2061 ly, the engine a │ │ │ │ +0018f470: 7574 6f6d 6174 6963 616c 6c79 2064 6574 utomatically det │ │ │ │ +0018f480: 6563 7473 2067 7a69 7020 636f 6d70 7265 ects gzip compre │ │ │ │ +0018f490: 7373 6564 2069 6e62 6f75 6e64 206d 6573 ssed inbound mes │ │ │ │ +0018f4a0: 7361 6765 732c 2065 7665 6e20 7769 7468 sages, even with │ │ │ │ +0018f4b0: 6f75 7420 4854 5450 2068 6561 6465 7273 out HTTP headers │ │ │ │ +0018f4c0: 2c20 6279 2063 6865 636b 696e 6720 666f , by checking fo │ │ │ │ +0018f4d0: 7220 7468 6520 7072 6573 656e 6365 206f r the presence o │ │ │ │ +0018f4e0: 6620 6120 677a 6970 2068 6561 6465 7220 f a gzip header │ │ │ │ +0018f4f0: 696e 2074 6865 206d 6573 7361 6765 2063 in the message c │ │ │ │ +0018f500: 6f6e 7465 6e74 2e20 5365 636f 6e64 6c79 ontent. Secondly │ │ │ │ +0018f510: 2c20 677a 6970 2069 6e63 6c75 6465 7320 , gzip includes │ │ │ │ +0018f520: 6120 4352 4333 3220 6368 6563 6b73 756d a CRC32 checksum │ │ │ │ +0018f530: 2074 6f20 656e 7375 7265 206d 6573 7361 to ensure messa │ │ │ │ +0018f540: 6765 7320 6861 7665 2062 6565 6e20 636f ges have been co │ │ │ │ +0018f550: 7272 6563 746c 7920 7265 6365 6976 6564 rrectly received │ │ │ │ +0018f560: 2e20 5468 6972 646c 792c 2067 7a69 7020 . Thirdly, gzip │ │ │ │ +0018f570: 636f 6d70 7265 7373 6564 2063 6f6e 7465 compressed conte │ │ │ │ +0018f580: 6e74 2063 616e 2062 6520 6465 636f 6d70 nt can be decomp │ │ │ │ +0018f590: 7265 7373 6564 2077 6974 6820 6f74 6865 ressed with othe │ │ │ │ +0018f5a0: 7220 636f 6d70 7265 7373 696f 6e20 736f r compression so │ │ │ │ +0018f5b0: 6674 7761 7265 2c20 736f 2079 6f75 2063 ftware, so you c │ │ │ │ +0018f5c0: 616e 2064 6563 6f6d 7072 6573 7320 584d an decompress XM │ │ │ │ +0018f5d0: 4c20 6461 7461 2073 6176 6564 2062 7920 L data saved by │ │ │ │ +0018f5e0: 6120 6753 4f41 5020 6170 706c 6963 6174 a gSOAP applicat │ │ │ │ +0018f5f0: 696f 6e20 696e 2067 7a69 7020 666f 726d ion in gzip form │ │ │ │ +0018f600: 6174 2e3c 2f70 3e0a 3c70 3e47 7a69 7020 at.

    .

    Gzip │ │ │ │ +0018f610: 636f 6d70 7265 7373 696f 6e20 6973 2065 compression is e │ │ │ │ +0018f620: 6e61 626c 6564 2062 7920 636f 6d70 696c nabled by compil │ │ │ │ +0018f630: 696e 6720 7468 6520 736f 7572 6365 7320 ing the sources │ │ │ │ +0018f640: 7769 7468 2063 6f6d 7069 6c65 2d74 696d with compile-tim │ │ │ │ +0018f650: 6520 666c 6167 203c 636f 6465 3e23 5749 e flag #WI │ │ │ │ +0018f660: 5448 5f47 5a49 503c 2f63 6f64 653e 2e20 TH_GZIP. │ │ │ │ +0018f670: 546f 2074 7261 6e73 6d69 7420 677a 6970 To transmit gzip │ │ │ │ +0018f680: 2063 6f6d 7072 6573 7365 6420 534f 4150 compressed SOAP │ │ │ │ +0018f690: 2f58 4d4c 2064 6174 612c 2073 6574 2074 /XML data, set t │ │ │ │ +0018f6a0: 6865 206f 7574 7075 7420 6d6f 6465 2066 he output mode f │ │ │ │ +0018f6b0: 6c61 6773 2074 6f20 3c63 6f64 653e 2353 lags to #S │ │ │ │ +0018f6c0: 4f41 505f 454e 435f 5a4c 4942 3c2f 636f OAP_ENC_ZLIB. For example │ │ │ │ +0018f6e0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    soap_init │ │ │ │ +0018f770: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ +0018f7a0: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .< │ │ │ │ +0018f7b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0018f7c0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_set_o │ │ │ │ +0018f820: 6d6f 6465 3c2f 613e 2826 616d 703b 3c61 mode(&soap, < │ │ │ │ +0018f860: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0018f870: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +0018f880: 705f 5f66 6c61 6773 2e68 746d 6c23 6761 p__flags.html#ga │ │ │ │ +0018f890: 6661 3632 6265 3762 6134 3662 3530 6435 fa62be7ba46b50d5 │ │ │ │ +0018f8a0: 3836 3038 6130 3636 6634 3432 6332 6138 8608a066f442c2a8 │ │ │ │ +0018f8b0: 223e 534f 4150 5f45 4e43 5f5a 4c49 423c ">SOAP_ENC_ZLIB< │ │ │ │ +0018f8c0: 2f61 3e29 3b20 3c73 7061 6e20 636c 6173 /a>); // e │ │ │ │ +0018f8e0: 6e61 626c 6520 5a6c 6962 2623 3339 3b73 nable Zlib's │ │ │ │ +0018f8f0: 2067 7a69 7020 3c2f 7370 616e 3e3c 2f64 gzip .
    │ │ │ │ +0018f930: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_ │ │ │ │ +0018f940: 6361 6c6c 5f6e 735f 5f6d 794d 6574 686f call_ns__myMetho │ │ │ │ +0018f950: 6428 2661 6d70 3b3c 6120 636c 6173 733d d(&so │ │ │ │ +0018f980: 6170 3c2f 613e 2c20 2e2e 2e29 2920 3c2f ap, ...)) .
    ... // error
    .
    else │ │ │ │ +0018fa10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ +0018fa30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +0018fa40: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent">// success< │ │ │ │ +0018fa50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +0018fa70: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +0018fa80: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +0018fa90: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ +0018faa0: 6761 3863 3238 6432 3934 3362 6565 3761 ga8c28d2943bee7a │ │ │ │ +0018fab0: 6135 6333 6666 6166 3332 3830 3362 3331 a5c3ffaf32803b31 │ │ │ │ +0018fac0: 6264 223e 736f 6170 5f63 6c72 5f6f 6d6f bd">soap_clr_omo │ │ │ │ +0018fad0: 6465 3c2f 613e 2826 616d 703b 3c61 2063 de(&soap, │ │ │ │ +0018fb60: 534f 4150 5f45 4e43 5f5a 4c49 423c 2f61 SOAP_ENC_ZLIB); // dis │ │ │ │ +0018fb90: 6162 6c65 205a 6c69 6226 2333 393b 7320 able Zlib's │ │ │ │ +0018fba0: 677a 6970 203c 2f73 7061 6e3e 3c2f 6469 gzip .
    #defi │ │ │ │ +0018fc90: 6e65 2053 4f41 505f 454e 435f 5a4c 4942 ne SOAP_ENC_ZLIB │ │ │ │ +0018fca0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    soap_mo │ │ │ │ +0018fcc0: 6465 2045 4e43 206f 7574 7075 7420 666c de ENC output fl │ │ │ │ +0018fcd0: 6167 2076 616c 7565 2074 6f20 636f 6d70 ag value to comp │ │ │ │ +0018fce0: 7265 7373 206d 6573 7361 6765 7320 7365 ress messages se │ │ │ │ +0018fcf0: 6e74 2c20 7265 7175 6972 6573 207a 6c69 nt, requires zli │ │ │ │ +0018fd00: 6220 656e 6162 6c65 6420 7769 7468 2063 b enabled with c │ │ │ │ +0018fd10: 6f6d 7069 6c65 2d74 696d 6520 666c 2e2e ompile-time fl.. │ │ │ │ +0018fd20: 2e3c 2f64 6976 3e3c 6469 7620 636c 6173 .
    Def │ │ │ │ +0018fd40: 696e 6974 696f 6e3a 3c2f 623e 2073 7464 inition: std │ │ │ │ +0018fd50: 736f 6170 322e 683a 3137 3838 3c2f 6469 soap2.h:1788
    .
    < │ │ │ │ +0018fd70: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +0018fd80: 3c70 3e54 6869 7320 7769 6c6c 2073 656e

    This will sen │ │ │ │ +0018fd90: 6420 6120 636f 6d70 7265 7373 6564 2053 d a compressed S │ │ │ │ +0018fda0: 4f41 502f 584d 4c20 7265 7175 6573 7420 OAP/XML request │ │ │ │ +0018fdb0: 746f 2061 2073 6572 7669 6365 2c20 7072 to a service, pr │ │ │ │ +0018fdc0: 6f76 6964 6564 2074 6861 7420 5a6c 6962 ovided that Zlib │ │ │ │ +0018fdd0: 2069 7320 696e 7374 616c 6c65 6420 616e is installed an │ │ │ │ +0018fde0: 6420 6c69 6e6b 6564 2077 6974 6820 7468 d linked with th │ │ │ │ +0018fdf0: 6520 6170 706c 6963 6174 696f 6e20 616e e application an │ │ │ │ +0018fe00: 6420 7468 6520 636f 6d70 696c 652d 7469 d the compile-ti │ │ │ │ +0018fe10: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W │ │ │ │ +0018fe20: 4954 485f 475a 4950 3c2f 636f 6465 3e20 ITH_GZIP │ │ │ │ +0018fe30: 6f70 7469 6f6e 2077 6173 2075 7365 6420 option was used │ │ │ │ +0018fe40: 746f 2063 6f6d 7069 6c65 2074 6865 2073 to compile the s │ │ │ │ +0018fe50: 6f75 7263 6573 2e20 5265 6365 6976 696e ources. Receivin │ │ │ │ +0018fe60: 6720 636f 6d70 7265 7373 6564 2053 4f41 g compressed SOA │ │ │ │ +0018fe70: 502f 584d 4c20 6f76 6572 2048 5454 5020 P/XML over HTTP │ │ │ │ +0018fe80: 6569 7468 6572 2069 6e20 677a 6970 206f either in gzip o │ │ │ │ +0018fe90: 7220 6465 666c 6174 6520 666f 726d 6174 r deflate format │ │ │ │ +0018fea0: 7320 6973 2061 7574 6f6d 6174 6963 2e20 s is automatic. │ │ │ │ +0018feb0: 5468 6520 3c63 6f64 653e 2353 4f41 505f The #SOAP_ │ │ │ │ +0018fec0: 454e 435f 5a4c 4942 3c2f 636f 6465 3e20 ENC_ZLIB │ │ │ │ +0018fed0: 666c 6167 2064 6f65 7320 6e6f 7420 6861 flag does not ha │ │ │ │ +0018fee0: 7665 2074 6f20 6265 2073 6574 2061 7420 ve to be set at │ │ │ │ +0018fef0: 7468 6520 7365 7276 6572 2073 6964 6520 the server side │ │ │ │ +0018ff00: 746f 2061 6363 6570 7420 636f 6d70 7265 to accept compre │ │ │ │ +0018ff10: 7373 6564 206d 6573 7361 6765 732e 2052 ssed messages. R │ │ │ │ +0018ff20: 6561 6469 6e67 2061 6e64 2072 6563 6569 eading and recei │ │ │ │ +0018ff30: 7669 6e67 2067 7a69 7020 636f 6d70 7265 ving gzip compre │ │ │ │ +0018ff40: 7373 6564 2053 4f41 502f 584d 4c20 7769 ssed SOAP/XML wi │ │ │ │ +0018ff50: 7468 6f75 7420 4854 5450 2068 6561 6465 thout HTTP heade │ │ │ │ +0018ff60: 7273 2028 652e 672e 2077 6974 6820 6f74 rs (e.g. with ot │ │ │ │ +0018ff70: 6865 7220 7472 616e 7370 6f72 7420 7072 her transport pr │ │ │ │ +0018ff80: 6f74 6f63 6f6c 7329 2069 7320 616c 736f otocols) is also │ │ │ │ +0018ff90: 2061 7574 6f6d 6174 6963 2e3c 2f70 3e0a automatic.

    . │ │ │ │ +0018ffa0: 3c70 3e54 6f20 636f 6e74 726f 6c20 7468

    To control th │ │ │ │ +0018ffb0: 6520 6c65 7665 6c20 6f66 2063 6f6d 7072 e level of compr │ │ │ │ +0018ffc0: 6573 7369 6f6e 2066 6f72 206f 7574 626f ession for outbo │ │ │ │ +0018ffd0: 756e 6420 6d65 7373 6167 6573 2c20 796f und messages, yo │ │ │ │ +0018ffe0: 7520 6361 6e20 7365 7420 7468 6520 3c63 u can set the soap::z_ │ │ │ │ +001900b0: 6c65 7665 6c3c 2f61 3e3c 2f63 6f64 653e level │ │ │ │ +001900c0: 2074 6f20 6120 7661 6c75 6520 6265 7477 to a value betw │ │ │ │ +001900d0: 6565 6e20 3120 616e 6420 392c 2077 6865 een 1 and 9, whe │ │ │ │ +001900e0: 7265 2031 2069 7320 7468 6520 6265 7374 re 1 is the best │ │ │ │ +001900f0: 2073 7065 6564 2061 6e64 2039 2069 7320 speed and 9 is │ │ │ │ +00190100: 7468 6520 6265 7374 2063 6f6d 7072 6573 the best compres │ │ │ │ +00190110: 7369 6f6e 2028 6465 6661 756c 7420 6973 sion (default is │ │ │ │ +00190120: 2036 292e 2046 6f72 2065 7861 6d70 6c65 6). For example │ │ │ │ +00190130: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    soap_init( │ │ │ │ +001901c0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ +001901f0: 3c2f 613e 293b 203c 2f64 6976 3e0a 3c64 );
    . │ │ │ │ +00190210: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_om │ │ │ │ +00190270: 6f64 653c 2f61 3e28 2661 6d70 3b3c 6120 ode(&soap, SOAP_ENC_ZLIB);
    .. │ │ │ │ +001903f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ +001904a0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    unsigned sho │ │ │ │ +001904c0: 7274 207a 5f6c 6576 656c 3c2f 6469 763e rt z_level
    │ │ │ │ +001904d0: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    User-definabl │ │ │ │ +001904f0: 6520 636f 6d70 7265 7373 696f 6e20 6c65 e compression le │ │ │ │ +00190500: 7665 6c20 666f 7220 677a 6970 2063 6f6d vel for gzip com │ │ │ │ +00190510: 7072 6573 7369 6f6e 2028 303d 6e6f 6e65 pression (0=none │ │ │ │ +00190520: 2c20 313d 6661 7374 2074 6f20 393d 6265 , 1=fast to 9=be │ │ │ │ +00190530: 7374 2920 6465 6661 756c 7420 6c65 7665 st) default leve │ │ │ │ +00190540: 6c20 6973 2036 2e3c 2f64 6976 3e3c 6469 l is 6.
    │ │ │ │ +00190560: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:37 │ │ │ │ +00190580: 3034 3c2f 6469 763e 3c2f 6469 763e 0a3c 04
    .< │ │ │ │ +00190590: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    To veri │ │ │ │ +001905b0: 6679 2061 6e64 206d 6f6e 6974 6f72 2063 fy and monitor c │ │ │ │ +001905c0: 6f6d 7072 6573 7369 6f6e 2072 6174 6573 ompression rates │ │ │ │ +001905d0: 2c20 796f 7520 6361 6e20 7573 6520 7468 , you can use th │ │ │ │ +001905e0: 6520 7661 6c75 6573 203c 636f 6465 3e3c e values < │ │ │ │ +001905f0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00190600: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +00190610: 6d6c 2361 3663 6331 3561 3131 6138 3937 ml#a6cc15a11a897 │ │ │ │ +00190620: 6364 6538 3166 3433 3033 3836 3664 6637 cde81f4303866df7 │ │ │ │ +00190630: 3437 6163 2220 7469 746c 653d 2254 6865 47ac" title="The │ │ │ │ +00190640: 2063 6f6d 7072 6573 7369 6f6e 2072 6174 compression rat │ │ │ │ +00190650: 696f 203d 2063 6f6d 7072 6573 7365 642e io = compressed. │ │ │ │ +00190660: 7369 7a65 2f75 6e63 6f6d 7072 6573 7365 size/uncompresse │ │ │ │ +00190670: 642e 7369 7a65 206f 6620 7468 6520 636f d.size of the co │ │ │ │ +00190680: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message │ │ │ │ +00190690: 2072 6563 6569 7665 642e 223e 736f 6170 received.">soap │ │ │ │ +001906a0: 3a3a 7a5f 7261 7469 6f5f 696e 3c2f 613e ::z_ratio_in │ │ │ │ +001906b0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and soap: │ │ │ │ +00190770: 3a7a 5f72 6174 696f 5f6f 7574 3c2f 613e :z_ratio_out │ │ │ │ +00190780: 3c2f 636f 6465 3e2e 2054 6865 7365 2074 . These t │ │ │ │ +00190790: 776f 2066 6c6f 6174 2076 616c 7565 7320 wo float values │ │ │ │ +001907a0: 6c69 6520 6265 7477 6565 6e20 302e 3020 lie between 0.0 │ │ │ │ +001907b0: 616e 6420 312e 3020 616e 6420 6578 7072 and 1.0 and expr │ │ │ │ +001907c0: 6573 7320 7468 6520 7261 7469 6f20 6f66 ess the ratio of │ │ │ │ +001907d0: 2074 6865 2063 6f6d 7072 6573 7365 6420 the compressed │ │ │ │ +001907e0: 6d65 7373 6167 6520 6c65 6e67 7468 206f message length o │ │ │ │ +001907f0: 7665 7220 756e 636f 6d70 7265 7373 6564 ver uncompressed │ │ │ │ +00190800: 206d 6573 7361 6765 206c 656e 6774 682e message length. │ │ │ │ +00190810: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    if │ │ │ │ +00190860: 2028 736f 6170 5f63 616c 6c5f 6e73 5f5f (soap_call_ns__ │ │ │ │ +00190870: 6d79 4d65 7468 6f64 2826 616d 703b 3c61 myMethod(&soap, . │ │ │ │ +001908b0: 2e2e 2929 3c2f 6469 763e 0a3c 6469 7620 ..))
    .
    {.
    {
    .< │ │ │ │ -001908f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00190900: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // │ │ │ │ -00190920: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error ... // error
    .
    }.
    }
    .< │ │ │ │ -00190960: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -00190970: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow">else
    .
    {.
    printf( │ │ │ │ -001909c0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -001909e0: 743b 436f 6d70 7265 7373 696f 6e20 7261 t;Compression ra │ │ │ │ -001909f0: 7469 6f3a 2025 6625 2520 2869 6e29 2025 tio: %f%% (in) % │ │ │ │ -00190a00: 6625 2520 286f 7574 295c 6e26 7175 6f74 f%% (out)\n" │ │ │ │ -00190a10: 3b3c 2f73 7061 6e3e 2c20 3130 302a 3c61 ;, 100*soap.z_ratio_o │ │ │ │ -00190aa0: 7574 3c2f 613e 2c20 3130 302a 3c61 2063 ut, 100*soap.z_ratio_in< │ │ │ │ -00190b30: 2f61 3e29 3b20 3c2f 6469 763e 0a3c 6469 /a>);
    . │ │ │ │ -00190b50: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // su │ │ │ │ -00190b70: 6363 6573 733c 2f73 7061 6e3e 3c2f 6469 ccess.
    }
    .
    │ │ │ │ -00190c50: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    float z_rati │ │ │ │ -00190c70: 6f5f 696e 3c2f 6469 763e 3c64 6976 2063 o_in
    The │ │ │ │ -00190c90: 2063 6f6d 7072 6573 7369 6f6e 2072 6174 compression rat │ │ │ │ -00190ca0: 696f 203d 2063 6f6d 7072 6573 7365 642e io = compressed. │ │ │ │ -00190cb0: 7369 7a65 2f75 6e63 6f6d 7072 6573 7365 size/uncompresse │ │ │ │ -00190cc0: 642e 7369 7a65 206f 6620 7468 6520 636f d.size of the co │ │ │ │ -00190cd0: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message │ │ │ │ -00190ce0: 2072 6563 6569 7665 642e 3c2f 6469 763e received.
    │ │ │ │ -00190cf0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -00190d10: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -00190d20: 3a33 3730 393c 2f64 6976 3e3c 2f64 6976 :3709
    .
    < │ │ │ │ -00190d90: 6120 6872 6566 3d22 7374 7275 6374 736f a href="structso │ │ │ │ -00190da0: 6170 2e68 746d 6c23 6162 3964 3061 6162 ap.html#ab9d0aab │ │ │ │ -00190db0: 3066 3839 6532 3130 3962 6130 3263 6134 0f89e2109ba02ca4 │ │ │ │ -00190dc0: 3630 6332 3139 3534 3122 3e73 6f61 703a 60c219541">soap: │ │ │ │ -00190dd0: 3a7a 5f72 6174 696f 5f6f 7574 3c2f 613e :z_ratio_out │ │ │ │ -00190de0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    float │ │ │ │ -00190e00: 7a5f 7261 7469 6f5f 6f75 743c 2f64 6976 z_ratio_out
    The compress │ │ │ │ -00190e30: 696f 6e20 7261 7469 6f20 3d20 636f 6d70 ion ratio = comp │ │ │ │ -00190e40: 7265 7373 6564 2e73 697a 652f 756e 636f ressed.size/unco │ │ │ │ -00190e50: 6d70 7265 7373 6564 2e73 697a 6520 6f66 mpressed.size of │ │ │ │ -00190e60: 2074 6865 2063 6f6d 7072 6573 7365 6420 the compressed │ │ │ │ -00190e70: 6d65 7373 6167 6520 7365 6e74 2e3c 2f64 message sent.
    Definit │ │ │ │ -00190ea0: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ -00190eb0: 322e 683a 3337 3134 3c2f 6469 763e 3c2f 2.h:3714
    .

    N │ │ │ │ -00190ee0: 6f74 653a 206c 6f77 6572 2072 6174 696f ote: lower ratio │ │ │ │ -00190ef0: 7320 6d65 616e 2068 6967 6865 7220 636f s mean higher co │ │ │ │ -00190f00: 6d70 7265 7373 696f 6e20 7261 7465 732e mpression rates. │ │ │ │ -00190f10: 3c2f 703e 0a3c 703e 436f 6d70 7265 7373

    .

    Compress │ │ │ │ -00190f20: 6564 2074 7261 6e73 6665 7273 2072 6571 ed transfers req │ │ │ │ -00190f30: 7569 7265 2062 7566 6665 7269 6e67 2074 uire buffering t │ │ │ │ -00190f40: 6865 2065 6e74 6972 6520 6f75 7470 7574 he entire output │ │ │ │ -00190f50: 206d 6573 7361 6765 2074 6f20 6465 7465 message to dete │ │ │ │ -00190f60: 726d 696e 6520 4854 5450 206d 6573 7361 rmine HTTP messa │ │ │ │ -00190f70: 6765 206c 656e 6774 682e 2054 6869 7320 ge length. This │ │ │ │ -00190f80: 6d65 616e 7320 7468 6174 2074 6865 203c means that the < │ │ │ │ -00190f90: 636f 6465 3e23 534f 4150 5f49 4f5f 5354 code>#SOAP_IO_ST │ │ │ │ -00190fa0: 4f52 453c 2f63 6f64 653e 2066 6c61 6720 ORE flag │ │ │ │ -00190fb0: 6973 2061 7574 6f6d 6174 6963 616c 6c79 is automatically │ │ │ │ -00190fc0: 2073 6574 2077 6865 6e20 7468 6520 3c63 set when the #SOAP_ENC_ZL │ │ │ │ -00190fe0: 4942 3c2f 636f 6465 3e20 666c 6167 2069 IB flag i │ │ │ │ -00190ff0: 7320 7365 7420 746f 2073 656e 6420 636f s set to send co │ │ │ │ -00191000: 6d70 7265 7373 6564 206d 6573 7361 6765 mpressed message │ │ │ │ -00191010: 732e 2054 6865 2075 7365 206f 6620 4854 s. The use of HT │ │ │ │ -00191020: 5450 2063 6875 6e6b 696e 6720 7369 676e TP chunking sign │ │ │ │ -00191030: 6966 6963 616e 746c 7920 7265 6475 6365 ificantly reduce │ │ │ │ -00191040: 7320 6d65 6d6f 7279 2075 7361 6765 2061 s memory usage a │ │ │ │ -00191050: 6e64 206d 6179 2073 7065 6564 2075 7020 nd may speed up │ │ │ │ -00191060: 7468 6520 7472 616e 736d 6973 7369 6f6e the transmission │ │ │ │ -00191070: 206f 6620 636f 6d70 7265 7373 6564 2053 of compressed S │ │ │ │ -00191080: 4f41 502f 584d 4c20 6d65 7373 6167 6573 OAP/XML messages │ │ │ │ -00191090: 2e20 5468 6973 2069 7320 6163 636f 6d70 . This is accomp │ │ │ │ -001910a0: 6c69 7368 6564 2062 7920 7365 7474 696e lished by settin │ │ │ │ -001910b0: 6720 7468 6520 3c63 6f64 653e 2353 4f41 g the #SOA │ │ │ │ -001910c0: 505f 494f 5f43 4855 4e4b 3c2f 636f 6465 P_IO_CHUNK flag with #SOAP_ENC_ZLIB │ │ │ │ -001910f0: 3c2f 636f 6465 3e20 666f 7220 7468 6520 for the │ │ │ │ -00191100: 6f75 7470 7574 206d 6f64 652e 2048 6f77 output mode. How │ │ │ │ -00191110: 6576 6572 2c20 736f 6d65 2057 6562 2073 ever, some Web s │ │ │ │ -00191120: 6572 7665 7273 2064 6f20 6e6f 7420 6163 ervers do not ac │ │ │ │ -00191130: 6365 7074 2048 5454 5020 6368 756e 6b65 cept HTTP chunke │ │ │ │ -00191140: 6420 7265 7175 6573 7420 6d65 7373 6167 d request messag │ │ │ │ -00191150: 6573 2028 6576 656e 2077 6865 6e20 7468 es (even when th │ │ │ │ -00191160: 6579 2072 6574 7572 6e20 4854 5450 2063 ey return HTTP c │ │ │ │ -00191170: 6875 6e6b 6564 206d 6573 7361 6765 7321 hunked messages! │ │ │ │ -00191180: 292e 2053 7461 6e64 2d61 6c6f 6e65 2067 ). Stand-alone g │ │ │ │ -00191190: 534f 4150 2073 6572 7669 6365 7320 616c SOAP services al │ │ │ │ -001911a0: 7761 7973 2061 6363 6570 7420 6368 756e ways accept chun │ │ │ │ -001911b0: 6b65 6420 7265 7175 6573 7420 6d65 7373 ked request mess │ │ │ │ -001911c0: 6167 6573 2e3c 2f70 3e0a 3c70 3e54 6f20 ages.

    .

    To │ │ │ │ -001911d0: 7265 7374 7269 6374 2074 6865 2063 6f6d restrict the com │ │ │ │ -001911e0: 7072 6573 7369 6f6e 2074 6f20 7468 6520 pression to the │ │ │ │ -001911f0: 6465 666c 6174 6520 666f 726d 6174 206f deflate format o │ │ │ │ -00191200: 6e6c 792c 2063 6f6d 7069 6c65 2074 6865 nly, compile the │ │ │ │ -00191210: 2073 6f75 7263 6573 2077 6974 6820 7468 sources with th │ │ │ │ -00191220: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f │ │ │ │ -00191230: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_ │ │ │ │ -00191240: 5a4c 4942 3c2f 636f 6465 3e2e 2054 6869 ZLIB. Thi │ │ │ │ -00191250: 7320 6c69 6d69 7473 2063 6f6d 7072 6573 s limits compres │ │ │ │ -00191260: 7369 6f6e 2061 6e64 2064 6563 6f6d 7072 sion and decompr │ │ │ │ -00191270: 6573 7369 6f6e 2074 6f20 7468 6520 6465 ession to the de │ │ │ │ -00191280: 666c 6174 6520 666f 726d 6174 2e20 4f6e flate format. On │ │ │ │ -00191290: 6c79 2070 6c61 696e 2061 6e64 2064 6566 ly plain and def │ │ │ │ -001912a0: 6c61 7465 6420 6d65 7373 6167 6573 2063 lated messages c │ │ │ │ -001912b0: 616e 2062 6520 6578 6368 616e 6765 642c an be exchanged, │ │ │ │ -001912c0: 2067 7a69 7020 6973 206e 6f74 2073 7570 gzip is not sup │ │ │ │ -001912d0: 706f 7274 6564 2077 6974 6820 7468 6973 ported with this │ │ │ │ -001912e0: 206f 7074 696f 6e2e 2052 6563 6569 7669 option. Receivi │ │ │ │ -001912f0: 6e67 2067 7a69 7020 636f 6d70 7265 7373 ng gzip compress │ │ │ │ -00191300: 6564 2063 6f6e 7465 6e74 2069 7320 6175 ed content is au │ │ │ │ -00191310: 746f 6d61 7469 632c 2065 7665 6e20 696e tomatic, even in │ │ │ │ -00191320: 2074 6865 2061 6273 656e 6365 206f 6620 the absence of │ │ │ │ -00191330: 4854 5450 2068 6561 6465 7273 2e20 5265 HTTP headers. Re │ │ │ │ -00191340: 6365 6976 696e 6720 6465 666c 6174 6520 ceiving deflate │ │ │ │ -00191350: 636f 6d70 7265 7373 6564 2063 6f6e 7465 compressed conte │ │ │ │ -00191360: 6e74 2069 7320 6e6f 7420 6175 746f 6d61 nt is not automa │ │ │ │ -00191370: 7469 6320 696e 2074 6865 2061 6273 656e tic in the absen │ │ │ │ -00191380: 6365 206f 6620 4854 5450 2068 6561 6465 ce of HTTP heade │ │ │ │ -00191390: 7273 2061 6e64 2072 6571 7569 7265 7320 rs and requires │ │ │ │ -001913a0: 7468 6520 666c 6167 203c 636f 6465 3e23 the flag # │ │ │ │ -001913b0: 534f 4150 5f45 4e43 5f5a 4c49 423c 2f63 SOAP_ENC_ZLIB to be set f │ │ │ │ -001913d0: 6f72 2074 6865 2069 6e70 7574 206d 6f64 or the input mod │ │ │ │ -001913e0: 6520 746f 2064 6563 6f6d 7072 6573 7320 e to decompress │ │ │ │ -001913f0: 6465 666c 6174 6564 2064 6174 612e 3c2f deflated data..

    < │ │ │ │ -00191420: 6474 3e57 6172 6e69 6e67 3c2f 6474 3e3c dt>Warning< │ │ │ │ -00191430: 6464 3e49 7420 6973 2069 6d70 6f72 7461 dd>It is importa │ │ │ │ -00191440: 6e74 2074 6861 7420 7468 6520 3c63 6f64 nt that the #WITH_GZIP and #W │ │ │ │ -00191470: 4954 485f 5a4c 4942 3c2f 636f 6465 3e20 ITH_ZLIB │ │ │ │ -00191480: 6d61 6372 6f73 206d 7573 7420 6265 2063 macros must be c │ │ │ │ -00191490: 6f6e 7369 7374 656e 746c 7920 6465 6669 onsistently defi │ │ │ │ -001914a0: 6e65 6420 746f 2063 6f6d 7069 6c65 2074 ned to compile t │ │ │ │ -001914b0: 6865 2073 6f75 7263 6573 2c20 7375 6368 he sources, such │ │ │ │ -001914c0: 2061 7320 3c65 6d3e 3c63 6f64 653e 6773 as gs │ │ │ │ -001914d0: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp │ │ │ │ -001914e0: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , soapC.cp │ │ │ │ -00191500: 703c 2f63 6f64 653e 3c2f 656d 3e2c 203c p, < │ │ │ │ -00191510: 656d 3e3c 636f 6465 3e73 6f61 7043 6c69 em>soapCli │ │ │ │ -00191520: 656e 742e 6370 703c 2f63 6f64 653e 3c2f ent.cpp, s │ │ │ │ -00191540: 6f61 7053 6572 7665 722e 6370 703c 2f63 oapServer.cpp, and a │ │ │ │ -00191560: 6c6c 2061 7070 6c69 6361 7469 6f6e 2073 ll application s │ │ │ │ -00191570: 6f75 7263 6573 2074 6861 7420 696e 636c ources that incl │ │ │ │ -00191580: 7564 6520 3c65 6d3e 3c63 6f64 653e 6773 ude gs │ │ │ │ -00191590: 6f61 702f 7374 6473 6f61 7032 2e68 3c2f oap/stdsoap2.h or soapH.h< │ │ │ │ -001915c0: 2f63 6f64 653e 3c2f 656d 3e2e 2049 6620 /code>. If │ │ │ │ -001915d0: 7468 6520 6d61 6372 6f73 2061 7265 206e the macros are n │ │ │ │ -001915e0: 6f74 2063 6f6e 7369 7374 656e 746c 7920 ot consistently │ │ │ │ -001915f0: 7573 6564 2c20 7468 6520 6170 706c 6963 used, the applic │ │ │ │ -00191600: 6174 696f 6e20 7769 6c6c 2063 7261 7368 ation will crash │ │ │ │ -00191610: 2064 7565 2074 6f20 6120 6d69 736d 6174 due to a mismat │ │ │ │ -00191620: 6368 6573 2069 6e20 7468 6520 6465 636c ches in the decl │ │ │ │ -00191630: 6172 6174 696f 6e20 616e 6420 6163 6365 aration and acce │ │ │ │ -00191640: 7373 206f 6620 7468 6520 3c63 6f64 653e ss of the │ │ │ │ -00191650: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ -001916a0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ -001916b0: 6578 742e 3c2f 6464 3e3c 2f64 6c3e 0a3c ext.
    .< │ │ │ │ -001916c0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -001916e0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -001916f0: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Client-side co │ │ │ │ -00191730: 6f6b 6965 2073 7570 706f 7274 3c2f 6832 okie support

    .

    Client-side │ │ │ │ -00191750: 2063 6f6f 6b69 6520 7375 7070 6f72 7420 cookie support │ │ │ │ -00191760: 6973 206f 7074 696f 6e61 6c2e 2054 6f20 is optional. To │ │ │ │ -00191770: 656e 6162 6c65 2063 6f6f 6b69 6520 7375 enable cookie su │ │ │ │ -00191780: 7070 6f72 742c 2063 6f6d 7069 6c65 2061 pport, compile a │ │ │ │ -00191790: 6c6c 2073 6f75 7263 6573 2077 6974 6820 ll sources with │ │ │ │ -001917a0: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time │ │ │ │ -001917b0: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT │ │ │ │ -001917c0: 485f 434f 4f4b 4945 533c 2f63 6f64 653e H_COOKIES │ │ │ │ -001917d0: 2c20 666f 7220 6578 616d 706c 653a 203c , for example: < │ │ │ │ -001917e0: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     c++ -D
    │ │ │ │ -00191800: 5749 5448 5f43 4f4f 4b49 4553 202d 6f20  WITH_COOKIES -o 
    │ │ │ │ -00191810: 6d79 636c 6965 6e74 2073 7464 736f 6170  myclient stdsoap
    │ │ │ │ -00191820: 322e 6370 7020 736f 6170 432e 6370 7020  2.cpp soapC.cpp 
    │ │ │ │ -00191830: 736f 6170 436c 6965 6e74 2e63 7070 0a3c  soapClient.cpp.<
    │ │ │ │ -00191840: 2f70 7265 3e3c 703e 206f 7220 6164 6420  /pre>

    or add │ │ │ │ -00191850: 7468 6520 666f 6c6c 6f77 696e 6720 6c69 the following li │ │ │ │ -00191860: 6e65 2074 6f20 3c65 6d3e 3c63 6f64 653e ne to │ │ │ │ -00191870: 7374 6473 6f61 702e 683c 2f63 6f64 653e stdsoap.h │ │ │ │ -00191880: 3c2f 656d 3e3a 3c2f 703e 0a3c 6469 7620 :

    .
    #d │ │ │ │ -001918d0: 6566 696e 6520 5749 5448 5f43 4f4f 4b49 efine WITH_COOKI │ │ │ │ -001918e0: 4553 3c2f 7370 616e 3e3c 2f64 6976 3e0a ES
    . │ │ │ │ -001918f0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    Client │ │ │ │ -00191910: 2d73 6964 6520 636f 6f6b 6965 2073 7570 -side cookie sup │ │ │ │ -00191920: 706f 7274 2069 7320 6675 6c6c 7920 6175 port is fully au │ │ │ │ -00191930: 746f 6d61 7469 632e 2053 6f20 6a75 7374 tomatic. So just │ │ │ │ -00191940: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile gsoap/stdsoap │ │ │ │ -00191960: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp with the compi │ │ │ │ -00191980: 6c65 2d74 696d 6520 666c 6167 203c 636f le-time flag #WITH_COOKIES │ │ │ │ -001919a0: 3c2f 636f 6465 3e20 746f 2065 6e61 626c to enabl │ │ │ │ -001919b0: 6520 636f 6f6b 6965 2d62 6173 6564 2073 e cookie-based s │ │ │ │ -001919c0: 6573 7369 6f6e 2063 6f6e 7472 6f6c 2069 ession control i │ │ │ │ -001919d0: 6e20 796f 7572 2063 6c69 656e 742e 3c2f n your client..

    A cookie s │ │ │ │ -001919f0: 746f 7265 2077 6974 6820 636f 6f6b 6965 tore with cookie │ │ │ │ -00191a00: 7320 6973 206b 6570 7420 616e 6420 7265 s is kept and re │ │ │ │ -00191a10: 7475 726e 6564 2074 6f20 7468 6520 6170 turned to the ap │ │ │ │ -00191a20: 7072 6f70 7269 6174 6520 7365 7276 6572 propriate server │ │ │ │ -00191a30: 7320 7768 656e 2074 6865 2063 6c69 656e s when the clien │ │ │ │ -00191a40: 7420 636f 6e6e 6563 7473 2074 6f20 7468 t connects to th │ │ │ │ -00191a50: 6573 6520 7365 7276 6572 732e 2043 6f6f ese servers. Coo │ │ │ │ -00191a60: 6b69 6573 2061 7265 206e 6f74 2061 7574 kies are not aut │ │ │ │ -00191a70: 6f6d 6174 6963 616c 6c79 2073 6176 6564 omatically saved │ │ │ │ -00191a80: 2074 6f20 6120 6669 6c65 2062 7920 6120 to a file by a │ │ │ │ -00191a90: 636c 6965 6e74 2e20 416e 2065 7861 6d70 client. An examp │ │ │ │ -00191aa0: 6c65 2063 6f6f 6b69 6520 6669 6c65 206d le cookie file m │ │ │ │ -00191ab0: 616e 6167 6572 2069 7320 696e 636c 7564 anager is includ │ │ │ │ -00191ac0: 6564 2061 7320 616e 2065 7874 7261 7320 ed as an extras │ │ │ │ -00191ad0: 696e 2074 6865 2067 534f 4150 2070 6163 in the gSOAP pac │ │ │ │ -00191ae0: 6b61 6765 2e20 596f 7520 6361 6e20 7265 kage. You can re │ │ │ │ -00191af0: 6d6f 7665 2061 6c6c 2063 6f6f 6b69 6573 move all cookies │ │ │ │ -00191b00: 2066 726f 6d20 6120 3c63 6f64 653e 3c61 from a soap contex │ │ │ │ -00191b70: 7420 6279 2063 616c 6c69 6e67 203c 636f t by calling soap_free_coo │ │ │ │ -00191b90: 6b69 6573 2873 6f61 7029 3c2f 636f 6465 kies(soap), which also ha │ │ │ │ -00191bb0: 7070 656e 7320 7768 656e 2079 6f75 2063 ppens when you c │ │ │ │ -00191bc0: 616c 6c20 3c63 6f64 653e 736f 6170 5f64 all soap_d │ │ │ │ -00191bd0: 6f6e 6528 736f 6170 293c 2f63 6f64 653e one(soap) │ │ │ │ -00191be0: 2e3c 2f70 3e0a 3c70 3e54 6f20 6176 6f69 .

    .

    To avoi │ │ │ │ -00191bf0: 6420 2263 6f6f 6b69 6520 7374 6f72 6d73 d "cookie storms │ │ │ │ -00191c00: 2220 6361 7573 6564 2062 7920 6d61 6c69 " caused by mali │ │ │ │ -00191c10: 6369 6f75 7320 7365 7276 6572 7320 7468 cious servers th │ │ │ │ -00191c20: 6174 2072 6574 7572 6e20 616e 2075 6e72 at return an unr │ │ │ │ -00191c30: 6561 736f 6e61 626c 6520 616d 6f75 6e74 easonable amount │ │ │ │ -00191c40: 206f 6620 636f 6f6b 6965 732c 2067 534f of cookies, gSO │ │ │ │ -00191c50: 4150 2063 6c69 656e 7473 2f73 6572 7665 AP clients/serve │ │ │ │ -00191c60: 7273 2061 7265 206c 696d 6974 6564 2074 rs are limited t │ │ │ │ -00191c70: 6f20 6120 636f 6f6b 6965 2073 746f 7265 o a cookie store │ │ │ │ -00191c80: 2073 697a 6520 6f66 203c 636f 6465 3e3c size of < │ │ │ │ -00191c90: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -00191ca0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -00191cb0: 6d6c 2361 3434 6264 3766 6338 6261 3038 ml#a44bd7fc8ba08 │ │ │ │ -00191cc0: 6231 6465 6332 6630 3832 3939 6437 6637 b1dec2f08299d7f7 │ │ │ │ -00191cd0: 3233 6464 2220 7469 746c 653d 2255 7365 23dd" title="Use │ │ │ │ -00191ce0: 722d 6465 6669 6e61 626c 6520 6d61 7869 r-definable maxi │ │ │ │ -00191cf0: 6d75 6d20 6e75 6d62 6572 206f 6620 6163 mum number of ac │ │ │ │ -00191d00: 7469 7665 2063 6f6f 6b69 6573 2061 6c6c tive cookies all │ │ │ │ -00191d10: 6f77 6564 2074 6f20 6265 2073 6574 2077 owed to be set w │ │ │ │ -00191d20: 6974 6820 736f 6170 5f73 6574 5f63 6f6f ith soap_set_coo │ │ │ │ -00191d30: 6b69 6520 6265 666f 7265 2063 6f6f 6b69 kie before cooki │ │ │ │ -00191d40: 6520 2e2e 2e22 3e73 6f61 703a 3a63 6f6f e ...">soap::coo │ │ │ │ -00191d50: 6b69 655f 6d61 783c 2f61 3e3c 2f63 6f64 kie_max that the user │ │ │ │ -00191d70: 2063 616e 2063 6861 6e67 652c 2066 6f72 can change, for │ │ │ │ -00191d80: 2065 7861 6d70 6c65 3a3c 2f70 3e0a 3c64 example:

    .
    stru │ │ │ │ -00191dd0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new() │ │ │ │ -00191ea0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    soap->< │ │ │ │ -00191ef0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00191f00: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00191f10: 6874 6d6c 2361 3434 6264 3766 6338 6261 html#a44bd7fc8ba │ │ │ │ -00191f20: 3038 6231 6465 6332 6630 3832 3939 6437 08b1dec2f08299d7 │ │ │ │ -00191f30: 6637 3233 6464 223e 636f 6f6b 6965 5f6d f723dd">cookie_m │ │ │ │ -00191f40: 6178 3c2f 613e 203d 2031 303b 3c2f 6469 ax = 10;.
    │ │ │ │ -00191fb0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap │ │ │ │ -00191ff0: 3a3a 636f 6f6b 6965 5f6d 6178 3c2f 613e ::cookie_max │ │ │ │ -00192000: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int co │ │ │ │ -00192020: 6f6b 6965 5f6d 6178 3c2f 6469 763e 3c64 okie_max
    User-definable │ │ │ │ -00192050: 6d61 7869 6d75 6d20 6e75 6d62 6572 206f maximum number o │ │ │ │ -00192060: 6620 6163 7469 7665 2063 6f6f 6b69 6573 f active cookies │ │ │ │ -00192070: 2061 6c6c 6f77 6564 2074 6f20 6265 2073 allowed to be s │ │ │ │ -00192080: 6574 2077 6974 6820 736f 6170 5f73 6574 et with soap_set │ │ │ │ -00192090: 5f63 6f6f 6b69 6520 6265 666f 7265 2063 _cookie before c │ │ │ │ -001920a0: 6f6f 6b69 6520 2e2e 2e3c 2f64 6976 3e3c ookie ...
    < │ │ │ │ -001920b0: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ -001920c0: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ -001920d0: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ -001920e0: 3239 3733 3c2f 6469 763e 3c2f 6469 763e 2973
    │ │ │ │ -001920f0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    The c │ │ │ │ -00192110: 6f6f 6b69 6520 7374 6f72 6520 6973 2061 ookie store is a │ │ │ │ -00192120: 206c 696e 6b65 6420 6c69 7374 206f 6620 linked list of │ │ │ │ -00192130: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soa │ │ │ │ -00192180: 705f 636f 6f6b 6965 3c2f 613e 3c2f 636f p_cookie structures p │ │ │ │ -001921a0: 6f69 6e74 6564 2074 6f20 6279 203c 636f ointed to by │ │ │ │ -00192230: 736f 6170 3a3a 636f 6f6b 6965 733c 2f61 soap::cookies.

    .

    Since the cooki │ │ │ │ -00192260: 6520 7374 6f72 6520 6973 206c 696e 6b65 e store is linke │ │ │ │ -00192270: 6420 746f 2074 6865 2063 7572 7265 6e74 d to the current │ │ │ │ -00192280: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context, and │ │ │ │ -001922f0: 6561 6368 2074 6872 6561 6420 6d75 7374 each thread must │ │ │ │ -00192300: 2075 7365 2069 7473 206f 776e 2063 6f6e use its own con │ │ │ │ -00192310: 7465 7874 2c20 6561 6368 2074 6872 6561 text, each threa │ │ │ │ -00192320: 6420 616c 736f 2068 6173 2069 7473 206f d also has its o │ │ │ │ -00192330: 776e 2063 6f6f 6b69 6520 7374 6f72 652e wn cookie store. │ │ │ │ -00192340: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ -00192360: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ -00192370: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    < │ │ │ │ -00192380: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ -00192390: 2069 643d 2273 6572 7665 7263 6f6f 6b69 id="servercooki │ │ │ │ -001923a0: 6522 3e3c 2f61 3e0a 5365 7276 6572 2d73 e">.Server-s │ │ │ │ -001923b0: 6964 6520 636f 6f6b 6965 2073 7570 706f ide cookie suppo │ │ │ │ -001923c0: 7274 3c2f 6832 3e0a 3c70 3e54 6869 7320 rt

    .

    This │ │ │ │ -001923d0: 6665 6174 7572 6520 6973 206e 6f74 2072 feature is not r │ │ │ │ -001923e0: 6563 6f6d 6d65 6e64 6564 2074 6f20 696d ecommended to im │ │ │ │ -001923f0: 706c 656d 656e 7420 7374 6174 6520 696e plement state in │ │ │ │ -00192400: 2073 7461 6e64 2d61 6c6f 6e65 2073 6572 stand-alone ser │ │ │ │ -00192410: 7665 7273 2e20 436f 6f6b 6965 7320 6d61 vers. Cookies ma │ │ │ │ -00192420: 7920 7265 7175 6972 6520 6120 6661 6972 y require a fair │ │ │ │ -00192430: 2061 6d6f 756e 7420 6f66 2070 726f 6365 amount of proce │ │ │ │ -00192440: 7373 696e 6720 6f76 6572 6865 6164 2061 ssing overhead a │ │ │ │ -00192450: 6e64 2061 7265 206e 6f74 2069 6e20 6661 nd are not in fa │ │ │ │ -00192460: 6374 206e 6565 6465 6420 746f 2069 6d70 ct needed to imp │ │ │ │ -00192470: 6c65 6d65 6e74 2073 7461 7465 6675 6c20 lement stateful │ │ │ │ -00192480: 7365 7276 6963 6573 2c20 7768 6963 6820 services, which │ │ │ │ -00192490: 6973 2074 7970 6963 616c 6c79 2070 6572 is typically per │ │ │ │ -001924a0: 666f 726d 6564 2077 6974 6820 7365 7373 formed with sess │ │ │ │ -001924b0: 696f 6e20 4944 7320 696e 2058 4d4c 2f4a ion IDs in XML/J │ │ │ │ -001924c0: 534f 4e20 6d65 7373 6167 6573 206f 7220 SON messages or │ │ │ │ -001924d0: 6279 2070 6173 7369 6e67 2074 6865 2073 by passing the s │ │ │ │ -001924e0: 6573 7369 6f6e 2049 4473 2076 6961 2074 ession IDs via t │ │ │ │ -001924f0: 6865 2055 524c 2e3c 2f70 3e0a 3c70 3e53 he URL.

    .

    S │ │ │ │ -00192500: 6572 7665 722d 7369 6465 2063 6f6f 6b69 erver-side cooki │ │ │ │ -00192510: 6520 7375 7070 6f72 7420 6973 206f 7074 e support is opt │ │ │ │ -00192520: 696f 6e61 6c2e 2054 6f20 656e 6162 6c65 ional. To enable │ │ │ │ -00192530: 2063 6f6f 6b69 6520 7375 7070 6f72 742c cookie support, │ │ │ │ -00192540: 2063 6f6d 7069 6c65 2061 6c6c 2073 6f75 compile all sou │ │ │ │ -00192550: 7263 6573 2077 6974 6820 636f 6d70 696c rces with compil │ │ │ │ -00192560: 652d 7469 6d65 2066 6c61 6720 3c63 6f64 e-time flag #WITH_COOKIES< │ │ │ │ -00192580: 2f63 6f64 653e 3a20 3c2f 703e 3c70 7265 /code>:

     c++ -DWITH_CO
    │ │ │ │ -001925b0: 4f4b 4945 5320 2d6f 206d 7973 6572 7665  OKIES -o myserve
    │ │ │ │ -001925c0: 7220 2e2e 2e0a 3c2f 7072 653e 3c70 3e20  r ....

    │ │ │ │ -001925d0: 5365 6520 4150 4920 646f 6375 6d65 6e74 See API document │ │ │ │ -001925e0: 6174 696f 6e20 4d6f 6475 6c65 203c 6120 ation Module HTT │ │ │ │ -00192620: 5020 636f 6f6b 6965 2066 756e 6374 696f P cookie functio │ │ │ │ -00192630: 6e73 3c2f 613e 2066 6f72 2074 6865 2063 ns for the c │ │ │ │ -00192640: 6f6f 6b69 6520 4150 4920 6675 6e63 7469 ookie API functi │ │ │ │ -00192650: 6f6e 732e 2053 6565 2074 6865 203c 6120 ons. See the HTTP sessi │ │ │ │ -00192690: 6f6e 7320 706c 7567 696e 3c2f 613e 2066 ons plugin f │ │ │ │ -001926a0: 6f72 2048 5454 5020 7365 7373 696f 6e20 or HTTP session │ │ │ │ -001926b0: 6d61 6e61 6765 6d65 6e74 2077 6974 6820 management with │ │ │ │ -001926c0: 636f 6f6b 6965 7320 7468 6174 2069 7320 cookies that is │ │ │ │ -001926d0: 7265 7175 6972 6564 2066 6f72 2073 6572 required for ser │ │ │ │ -001926e0: 7665 722d 7369 6465 2073 6573 7369 6f6e ver-side session │ │ │ │ -001926f0: 2063 6f6e 7472 6f6c 2e20 5468 6520 3c63 control. The #WITH_COOKIE │ │ │ │ -00192710: 533c 2f63 6f64 653e 2066 6c61 6720 6973 S flag is │ │ │ │ -00192720: 2075 7365 6c65 7373 2077 6974 686f 7574 useless without │ │ │ │ -00192730: 2073 6572 7665 722d 7369 6465 2073 6573 server-side ses │ │ │ │ -00192740: 7369 6f6e 206d 616e 6167 656d 656e 7420 sion management │ │ │ │ -00192750: 616e 6420 636f 6e74 726f 6c2e 3c2f 703e and control.

    │ │ │ │ -00192760: 0a3c 703e 4865 7265 2069 7320 616e 206f .

    Here is an o │ │ │ │ -00192770: 7665 7276 6965 7720 6f66 2074 6865 2063 verview of the c │ │ │ │ -00192780: 6f6f 6b69 6520 4150 4920 6675 6e63 7469 ookie API functi │ │ │ │ -00192790: 6f6e 733a 3c2f 703e 0a3c 756c 3e0a 3c6c ons:

    ..

    The f │ │ │ │ -00195250: 6f6c 6c6f 7769 6e67 2076 6172 6961 626c ollowing variabl │ │ │ │ -00195260: 6573 206f 6620 7468 6520 3c63 6f64 653e es of the │ │ │ │ -00195270: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ -001952c0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ -001952d0: 6578 7420 6172 6520 7573 6564 2074 6f20 ext are used to │ │ │ │ -001952e0: 6465 6669 6e65 2074 6865 2063 7572 7265 define the curre │ │ │ │ -001952f0: 6e74 2064 6f6d 6169 6e20 616e 6420 7061 nt domain and pa │ │ │ │ -00195300: 7468 3a3c 2f70 3e0a 3c75 6c3e 0a3c 6c69 th:

    ..

    The │ │ │ │ -00195640: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::coo │ │ │ │ -001956f0: 6b69 655f 7061 7468 3c2f 613e 3c2f 636f kie_path value is use │ │ │ │ -00195710: 6420 746f 2066 696c 7465 7220 636f 6f6b d to filter cook │ │ │ │ -00195720: 6965 7320 696e 7465 6e64 6564 2066 6f72 ies intended for │ │ │ │ -00195730: 2074 6869 7320 7365 7276 6963 6520 6163 this service ac │ │ │ │ -00195740: 636f 7264 696e 6720 746f 2074 6865 2070 cording to the p │ │ │ │ -00195750: 6174 6820 7072 6566 6978 2072 756c 6573 ath prefix rules │ │ │ │ -00195760: 206f 7574 6c69 6e65 6420 696e 2052 4643 outlined in RFC │ │ │ │ -00195770: 3231 3039 2e3c 2f70 3e0a 3c70 3e54 6865 2109.

    .

    The │ │ │ │ -00195780: 2066 6f6c 6c6f 7769 6e67 2065 7861 6d70 following examp │ │ │ │ -00195790: 6c65 2073 6572 7665 7220 6164 6f70 7473 le server adopts │ │ │ │ -001957a0: 2063 6f6f 6b69 6573 2066 6f72 2073 6573 cookies for ses │ │ │ │ -001957b0: 7369 6f6e 2063 6f6e 7472 6f6c 3a3c 2f70 sion control:

    .
    int m │ │ │ │ -00195810: 6169 6e28 2920 3c2f 6469 763e 0a3c 6469 ain()
    .{ │ │ │ │ -00195830: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct < │ │ │ │ -00195870: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -00195880: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -00195890: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html">soap < │ │ │ │ -001958a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001958b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001958c0: 6874 6d6c 223e 736f 6170 3c2f 613e 3b20 html">soap; │ │ │ │ -001958d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int │ │ │ │ -00195910: 6d2c 2073 3b20 3c2f 6469 763e 0a3c 6469 m, s;
    . │ │ │ │ -00195930: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_init< │ │ │ │ -00195990: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ -001959c0: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap);
    .
    soa │ │ │ │ -00195a10: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.c │ │ │ │ -00195a60: 6f6f 6b69 655f 646f 6d61 696e 3c2f 613e ookie_domain │ │ │ │ -00195a70: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ -00195a90: 7175 6f74 3b2e 2e2e 2671 756f 743b 3c2f quot;...";
    . │ │ │ │ -00195ac0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap.cooki │ │ │ │ -00195b40: 655f 7061 7468 3c2f 613e 203d 203c 7370 e_path = "/ │ │ │ │ -00195b70: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; < │ │ │ │ -00195b80: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00195b90: 656e 7422 3e2f 2f20 7468 6520 7061 7468 ent">// the path │ │ │ │ -00195ba0: 2077 6869 6368 2069 7320 7573 6564 2074 which is used t │ │ │ │ -00195bb0: 6f20 6669 6c74 6572 2f73 6574 2063 6f6f o filter/set coo │ │ │ │ -00195bc0: 6b69 6573 2077 6974 6820 7468 6973 2064 kies with this d │ │ │ │ -00195bd0: 6573 7469 6e61 7469 6f6e 203c 2f73 7061 estination
    .
    if │ │ │ │ -00195c20: 2028 6172 6763 2026 6c74 3b20 3229 203c (argc < 2) < │ │ │ │ -00195c30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .
    soa │ │ │ │ -00195cc0: 705f 6765 7465 6e76 5f63 6f6f 6b69 6573 p_getenv_cookies │ │ │ │ -00195cd0: 3c2f 613e 2826 616d 703b 3c61 2063 6c61 (&soap); // CGI app: gr │ │ │ │ -00195d30: 6162 2063 6f6f 6b69 6573 2066 726f 6d20 ab cookies from │ │ │ │ -00195d40: 2623 3339 3b48 5454 505f 434f 4f4b 4945 'HTTP_COOKIE │ │ │ │ -00195d50: 2623 3339 3b20 656e 7620 7661 7220 3c2f ' env var
    .
    │ │ │ │ -00195d80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_serve │ │ │ │ -00195de0: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -00195e10: 703c 2f61 3e29 3b20 3c2f 6469 763e 0a3c p);
    .< │ │ │ │ -00195e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00195e30: 3e20 207d 203c 2f64 6976 3e0a 3c64 6976 > }
    .
    │ │ │ │ -00195e50: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    . │ │ │ │ -00195e90: 207b 3c2f 6469 763e 0a3c 6469 7620 636c {
    .
    m │ │ │ │ -00195eb0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_bind │ │ │ │ -00195f10: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -00195f40: 703c 2f61 3e2c 204e 554c 4c2c 2061 746f p, NULL, ato │ │ │ │ -00195f50: 6928 6172 6776 5b31 5d29 2c20 3130 293b i(argv[1]), 10); │ │ │ │ -00195f60: 203c 7370 616e 2063 6c61 7373 3d22 636f // small │ │ │ │ -00195f80: 4241 434b 4c4f 4720 666f 7220 6974 6572 BACKLOG for iter │ │ │ │ -00195f90: 6174 6976 6520 7365 7276 6572 733c 2f73 ative servers
    .
    │ │ │ │ -00195fc0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!soap_va │ │ │ │ -00196040: 6c69 645f 736f 636b 6574 3c2f 613e 286d lid_socket(m │ │ │ │ -00196050: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    │ │ │ │ -00196070: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL │ │ │ │ -00196080: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . │ │ │ │ -001960a0: 2020 203c 7370 616e 2063 6c61 7373 3d22 for │ │ │ │ -001960c0: 3c2f 7370 616e 3e20 283c 7370 616e 2063 (int i │ │ │ │ -001960f0: 3d20 313b 203b 2069 2b2b 2920 3c2f 6469 = 1; ; i++) .
    {
    │ │ │ │ -00196120: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s = soa │ │ │ │ -00196190: 705f 6163 6365 7074 3c2f 613e 2826 616d p_accept(&am │ │ │ │ -001961a0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap);
    .
    │ │ │ │ -001961f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ -00196210: 2f73 7061 6e3e 2028 213c 6120 636c 6173 /span> (!soap_ │ │ │ │ -00196270: 7661 6c69 645f 736f 636b 6574 3c2f 613e valid_socket │ │ │ │ -00196280: 2873 2929 203c 2f64 6976 3e0a 3c64 6976 (s))
    .
    │ │ │ │ -001962a0: 2020 2020 2020 6578 6974 2845 5849 545f exit(EXIT_ │ │ │ │ -001962b0: 4641 494c 5552 4529 3b20 3c2f 6469 763e FAILURE);
    │ │ │ │ -001962c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_se │ │ │ │ -00196330: 7276 653c 2f61 3e28 2661 6d70 3b3c 6120 rve(&soap); < │ │ │ │ -00196370: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_end( │ │ │ │ -001963f0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ -00196420: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . │ │ │ │ -00196440: 2020 2020 203c 6120 636c 6173 733d 2263 soap_f │ │ │ │ -001964a0: 7265 655f 636f 6f6b 6965 733c 2f61 3e28 ree_cookies( │ │ │ │ -001964b0: 2661 6d70 3b3c 6120 636c 6173 733d 2263 &soap │ │ │ │ -001964e0: 3c2f 613e 293b 203c 7370 616e 2063 6c61 ); // │ │ │ │ -00196500: 7265 6d6f 7665 2061 6c6c 206f 6c64 2063 remove all old c │ │ │ │ -00196510: 6f6f 6b69 6573 2066 726f 6d20 6461 7461 ookies from data │ │ │ │ -00196520: 6261 7365 2073 6f20 6e6f 2069 6e74 6572 base so no inter │ │ │ │ -00196530: 6665 7265 6e63 6520 6f63 6375 7273 2077 ference occurs w │ │ │ │ -00196540: 6974 6820 7468 6520 6172 7269 7661 6c20 ith the arrival │ │ │ │ -00196550: 6f66 206e 6577 2063 6f6f 6b69 6573 203c of new cookies < │ │ │ │ -00196560: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -00196580: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    .
    │ │ │ │ -001965a0: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    return 0;
    .< │ │ │ │ -001965f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00196600: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    │ │ │ │ -00196650: 696e 743c 2f73 7061 6e3e 206e 735f 5f77 int ns__w │ │ │ │ -00196660: 6562 6d65 7468 6f64 283c 7370 616e 2063 ebmethod(s │ │ │ │ -00196680: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, . │ │ │ │ -001966f0: 2e2e 2920 3c2f 6469 763e 0a3c 6469 7620 ..)
    .
    {.
    c │ │ │ │ -00196740: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *cookie_value │ │ │ │ -00196780: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_cook │ │ │ │ -001967e0: 6965 5f76 616c 7565 3c2f 613e 283c 6120 ie_value(soap, " │ │ │ │ -00196840: 636f 6f6b 6965 5f6e 616d 6526 7175 6f74 cookie_name" │ │ │ │ -00196850: 3b3c 2f73 7061 6e3e 2c20 4e55 4c4c 2c20 ;, NULL, │ │ │ │ -00196860: 4e55 4c4c 293b 3c2f 6469 763e 0a3c 6469 NULL);
    . │ │ │ │ -00196880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (!cookie_va │ │ │ │ -001968b0: 6c75 6529 2020 2020 2020 2020 2020 2020 lue) │ │ │ │ -001968c0: 2020 2020 3c73 7061 6e20 636c 6173 733d // coo │ │ │ │ -001968e0: 6b69 6520 7265 7475 726e 6564 2062 7920 kie returned by │ │ │ │ -001968f0: 636c 6965 6e74 3f20 3c2f 7370 616e 3e3c client? < │ │ │ │ -00196900: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    cook │ │ │ │ -00196920: 6965 5f76 616c 7565 203d 203c 7370 616e ie_value = "ini │ │ │ │ -00196950: 7469 616c 5f76 616c 7565 2671 756f 743b tial_value" │ │ │ │ -00196960: 3c2f 7370 616e 3e3b 203c 7370 616e 2063 ; / │ │ │ │ -00196980: 2f20 6e6f 3a20 7365 7420 696e 6974 6961 / no: set initia │ │ │ │ -00196990: 6c20 636f 6f6b 6965 2076 616c 7565 203c l cookie value < │ │ │ │ -001969a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -001969c0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ -001969e0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -00196a00: 2020 2020 2e2e 2e20 2020 2020 2020 2020 ... │ │ │ │ -00196a10: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ -00196a20: 2020 2020 3c73 7061 6e20 636c 6173 733d // yes │ │ │ │ -00196a40: 3a20 6d6f 6469 6679 2074 6865 2063 6f6f : modify the coo │ │ │ │ -00196a50: 6b69 6520 7661 6c75 6520 746f 2072 6566 kie value to ref │ │ │ │ -00196a60: 6c65 6374 2074 6865 206e 6577 2073 7461 lect the new sta │ │ │ │ -00196a70: 7465 3c2f 7370 616e 3e3c 2f64 6976 3e0a te
    . │ │ │ │ -00196a80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_se │ │ │ │ -00196af0: 745f 636f 6f6b 6965 3c2f 613e 283c 6120 t_cookie(soap, " │ │ │ │ -00196b50: 636f 6f6b 6965 5f6e 616d 6526 7175 6f74 cookie_name" │ │ │ │ -00196b60: 3b3c 2f73 7061 6e3e 2c20 636f 6f6b 6965 ;, cookie │ │ │ │ -00196b70: 5f76 616c 7565 2c20 4e55 4c4c 2c20 4e55 _value, NULL, NU │ │ │ │ -00196b80: 4c4c 293b 203c 2f64 6976 3e0a 3c64 6976 LL);
    .
    │ │ │ │ -00196ba0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_co │ │ │ │ -00196c00: 6f6b 6965 5f65 7870 6972 653c 2f61 3e28 okie_expire( │ │ │ │ -00196c10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -00196c40: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -00196c60: 6f74 3b63 6f6f 6b69 655f 6e61 6d65 2671 ot;cookie_name&q │ │ │ │ -00196c70: 756f 743b 3c2f 7370 616e 3e2c 2036 302c uot;, 60, │ │ │ │ -00196c80: 204e 554c 4c2c 204e 554c 4c29 3b20 3c73 NULL, NULL); // cookie ex │ │ │ │ -00196cb0: 7069 7265 7320 696e 2036 3020 7365 636f pires in 60 seco │ │ │ │ -00196cc0: 6e64 7320 3c2f 7370 616e 3e3c 2f64 6976 nds
    .
    │ │ │ │ -00196d00: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; < │ │ │ │ +00190940: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine">e │ │ │ │ +00190960: 6c73 653c 2f73 7061 6e3e 3c2f 6469 763e lse
    │ │ │ │ +00190970: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    p │ │ │ │ +001909a0: 7269 6e74 6628 3c73 7061 6e20 636c 6173 rintf("Compress │ │ │ │ +001909d0: 696f 6e20 7261 7469 6f3a 2025 6625 2520 ion ratio: %f%% │ │ │ │ +001909e0: 2869 6e29 2025 6625 2520 286f 7574 295c (in) %f%% (out)\ │ │ │ │ +001909f0: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ +00190a00: 3130 302a 3c61 2063 6c61 7373 3d22 636f 100*soap< │ │ │ │ +00190a30: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.z_r │ │ │ │ +00190a80: 6174 696f 5f6f 7574 3c2f 613e 2c20 3130 atio_out, 10 │ │ │ │ +00190a90: 302a 3c61 2063 6c61 7373 3d22 636f 6465 0*soap.z_rat │ │ │ │ +00190b10: 696f 5f69 6e3c 2f61 3e29 3b20 3c2f 6469 io_in); .
    ... // success
    .
    }.
    │ │ │ │ +00190be0: 3c61 2068 7265 663d 2273 7472 7563 7473 soap │ │ │ │ +00190c20: 3a3a 7a5f 7261 7469 6f5f 696e 3c2f 613e ::z_ratio_in │ │ │ │ +00190c30: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    float │ │ │ │ +00190c50: 7a5f 7261 7469 6f5f 696e 3c2f 6469 763e z_ratio_in
    │ │ │ │ +00190c60: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    The compressi │ │ │ │ +00190c80: 6f6e 2072 6174 696f 203d 2063 6f6d 7072 on ratio = compr │ │ │ │ +00190c90: 6573 7365 642e 7369 7a65 2f75 6e63 6f6d essed.size/uncom │ │ │ │ +00190ca0: 7072 6573 7365 642e 7369 7a65 206f 6620 pressed.size of │ │ │ │ +00190cb0: 7468 6520 636f 6d70 7265 7373 6564 206d the compressed m │ │ │ │ +00190cc0: 6573 7361 6765 2072 6563 6569 7665 642e essage received. │ │ │ │ +00190cd0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +00190cf0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +00190d00: 6f61 7032 2e68 3a33 3730 393c 2f64 6976 oap2.h:3709
    .
    │ │ │ │ +00190de0: 666c 6f61 7420 7a5f 7261 7469 6f5f 6f75 float z_ratio_ou │ │ │ │ +00190df0: 743c 2f64 6976 3e3c 6469 7620 636c 6173 t
    The co │ │ │ │ +00190e10: 6d70 7265 7373 696f 6e20 7261 7469 6f20 mpression ratio │ │ │ │ +00190e20: 3d20 636f 6d70 7265 7373 6564 2e73 697a = compressed.siz │ │ │ │ +00190e30: 652f 756e 636f 6d70 7265 7373 6564 2e73 e/uncompressed.s │ │ │ │ +00190e40: 697a 6520 6f66 2074 6865 2063 6f6d 7072 ize of the compr │ │ │ │ +00190e50: 6573 7365 6420 6d65 7373 6167 6520 7365 essed message se │ │ │ │ +00190e60: 6e74 2e3c 2f64 6976 3e3c 6469 7620 636c nt.
    D │ │ │ │ +00190e80: 6566 696e 6974 696f 6e3a 3c2f 623e 2073 efinition: s │ │ │ │ +00190e90: 7464 736f 6170 322e 683a 3337 3134 3c2f tdsoap2.h:3714
    .

    │ │ │ │ +001918f0: 436c 6965 6e74 2d73 6964 6520 636f 6f6b Client-side cook │ │ │ │ +00191900: 6965 2073 7570 706f 7274 2069 7320 6675 ie support is fu │ │ │ │ +00191910: 6c6c 7920 6175 746f 6d61 7469 632e 2053 lly automatic. S │ │ │ │ +00191920: 6f20 6a75 7374 2063 6f6d 7069 6c65 203c o just compile < │ │ │ │ +00191930: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s │ │ │ │ +00191940: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp with the │ │ │ │ +00191960: 2063 6f6d 7069 6c65 2d74 696d 6520 666c compile-time fl │ │ │ │ +00191970: 6167 203c 636f 6465 3e23 5749 5448 5f43 ag #WITH_C │ │ │ │ +00191980: 4f4f 4b49 4553 3c2f 636f 6465 3e20 746f OOKIES to │ │ │ │ +00191990: 2065 6e61 626c 6520 636f 6f6b 6965 2d62 enable cookie-b │ │ │ │ +001919a0: 6173 6564 2073 6573 7369 6f6e 2063 6f6e ased session con │ │ │ │ +001919b0: 7472 6f6c 2069 6e20 796f 7572 2063 6c69 trol in your cli │ │ │ │ +001919c0: 656e 742e 3c2f 703e 0a3c 703e 4120 636f ent.

    .

    A co │ │ │ │ +001919d0: 6f6b 6965 2073 746f 7265 2077 6974 6820 okie store with │ │ │ │ +001919e0: 636f 6f6b 6965 7320 6973 206b 6570 7420 cookies is kept │ │ │ │ +001919f0: 616e 6420 7265 7475 726e 6564 2074 6f20 and returned to │ │ │ │ +00191a00: 7468 6520 6170 7072 6f70 7269 6174 6520 the appropriate │ │ │ │ +00191a10: 7365 7276 6572 7320 7768 656e 2074 6865 servers when the │ │ │ │ +00191a20: 2063 6c69 656e 7420 636f 6e6e 6563 7473 client connects │ │ │ │ +00191a30: 2074 6f20 7468 6573 6520 7365 7276 6572 to these server │ │ │ │ +00191a40: 732e 2043 6f6f 6b69 6573 2061 7265 206e s. Cookies are n │ │ │ │ +00191a50: 6f74 2061 7574 6f6d 6174 6963 616c 6c79 ot automatically │ │ │ │ +00191a60: 2073 6176 6564 2074 6f20 6120 6669 6c65 saved to a file │ │ │ │ +00191a70: 2062 7920 6120 636c 6965 6e74 2e20 416e by a client. An │ │ │ │ +00191a80: 2065 7861 6d70 6c65 2063 6f6f 6b69 6520 example cookie │ │ │ │ +00191a90: 6669 6c65 206d 616e 6167 6572 2069 7320 file manager is │ │ │ │ +00191aa0: 696e 636c 7564 6564 2061 7320 616e 2065 included as an e │ │ │ │ +00191ab0: 7874 7261 7320 696e 2074 6865 2067 534f xtras in the gSO │ │ │ │ +00191ac0: 4150 2070 6163 6b61 6765 2e20 596f 7520 AP package. You │ │ │ │ +00191ad0: 6361 6e20 7265 6d6f 7665 2061 6c6c 2063 can remove all c │ │ │ │ +00191ae0: 6f6f 6b69 6573 2066 726f 6d20 6120 3c63 ookies from a │ │ │ │ +00191b40: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap │ │ │ │ +00191b50: 636f 6e74 6578 7420 6279 2063 616c 6c69 context by calli │ │ │ │ +00191b60: 6e67 203c 636f 6465 3e73 6f61 705f 6672 ng soap_fr │ │ │ │ +00191b70: 6565 5f63 6f6f 6b69 6573 2873 6f61 7029 ee_cookies(soap) │ │ │ │ +00191b80: 3c2f 636f 6465 3e2c 2077 6869 6368 2061 , which a │ │ │ │ +00191b90: 6c73 6f20 6861 7070 656e 7320 7768 656e lso happens when │ │ │ │ +00191ba0: 2079 6f75 2063 616c 6c20 3c63 6f64 653e you call │ │ │ │ +00191bb0: 736f 6170 5f64 6f6e 6528 736f 6170 293c soap_done(soap)< │ │ │ │ +00191bc0: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e54 /code>.

    .

    T │ │ │ │ +00191bd0: 6f20 6176 6f69 6420 2263 6f6f 6b69 6520 o avoid "cookie │ │ │ │ +00191be0: 7374 6f72 6d73 2220 6361 7573 6564 2062 storms" caused b │ │ │ │ +00191bf0: 7920 6d61 6c69 6369 6f75 7320 7365 7276 y malicious serv │ │ │ │ +00191c00: 6572 7320 7468 6174 2072 6574 7572 6e20 ers that return │ │ │ │ +00191c10: 616e 2075 6e72 6561 736f 6e61 626c 6520 an unreasonable │ │ │ │ +00191c20: 616d 6f75 6e74 206f 6620 636f 6f6b 6965 amount of cookie │ │ │ │ +00191c30: 732c 2067 534f 4150 2063 6c69 656e 7473 s, gSOAP clients │ │ │ │ +00191c40: 2f73 6572 7665 7273 2061 7265 206c 696d /servers are lim │ │ │ │ +00191c50: 6974 6564 2074 6f20 6120 636f 6f6b 6965 ited to a cookie │ │ │ │ +00191c60: 2073 746f 7265 2073 697a 6520 6f66 203c store size of < │ │ │ │ +00191c70: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soa │ │ │ │ +00191d30: 703a 3a63 6f6f 6b69 655f 6d61 783c 2f61 p::cookie_max that th │ │ │ │ +00191d50: 6520 7573 6572 2063 616e 2063 6861 6e67 e user can chang │ │ │ │ +00191d60: 652c 2066 6f72 2065 7861 6d70 6c65 3a3c e, for example:< │ │ │ │ +00191d70: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    struct │ │ │ │ +00191dc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +00191df0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +00191e20: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new │ │ │ │ +00191e80: 3c2f 613e 2829 3b20 3c2f 6469 763e 0a3c ();
    .< │ │ │ │ +00191e90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00191ea0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ +00191ed0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->co │ │ │ │ +00191f20: 6f6b 6965 5f6d 6178 3c2f 613e 203d 2031 okie_max = 1 │ │ │ │ +00191f30: 303b 3c2f 6469 763e 0a3c 6469 7620 636c 0;
    .
    │ │ │ │ +00192000: 696e 7420 636f 6f6b 6965 5f6d 6178 3c2f int cookie_max
    User-defi │ │ │ │ +00192030: 6e61 626c 6520 6d61 7869 6d75 6d20 6e75 nable maximum nu │ │ │ │ +00192040: 6d62 6572 206f 6620 6163 7469 7665 2063 mber of active c │ │ │ │ +00192050: 6f6f 6b69 6573 2061 6c6c 6f77 6564 2074 ookies allowed t │ │ │ │ +00192060: 6f20 6265 2073 6574 2077 6974 6820 736f o be set with so │ │ │ │ +00192070: 6170 5f73 6574 5f63 6f6f 6b69 6520 6265 ap_set_cookie be │ │ │ │ +00192080: 666f 7265 2063 6f6f 6b69 6520 2e2e 2e3c fore cookie ...< │ │ │ │ +00192090: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +001920b0: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +001920c0: 6170 322e 683a 3239 3733 3c2f 6469 763e ap2.h:2973
    │ │ │ │ +001920d0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    The cookie stor │ │ │ │ +00192100: 6520 6973 2061 206c 696e 6b65 6420 6c69 e is a linked li │ │ │ │ +00192110: 7374 206f 6620 3c63 6f64 653e 3c61 2063 st of soap_cookie struct │ │ │ │ +00192180: 7572 6573 2070 6f69 6e74 6564 2074 6f20 ures pointed to │ │ │ │ +00192190: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap::cook │ │ │ │ +00192220: 6965 733c 2f61 3e3c 2f63 6f64 653e 2e3c ies.< │ │ │ │ +00192230: 2f70 3e0a 3c70 3e53 696e 6365 2074 6865 /p>.

    Since the │ │ │ │ +00192240: 2063 6f6f 6b69 6520 7374 6f72 6520 6973 cookie store is │ │ │ │ +00192250: 206c 696e 6b65 6420 746f 2074 6865 2063 linked to the c │ │ │ │ +00192260: 7572 7265 6e74 203c 636f 6465 3e3c 6120 urrent soap context │ │ │ │ +001922d0: 2c20 616e 6420 6561 6368 2074 6872 6561 , and each threa │ │ │ │ +001922e0: 6420 6d75 7374 2075 7365 2069 7473 206f d must use its o │ │ │ │ +001922f0: 776e 2063 6f6e 7465 7874 2c20 6561 6368 wn context, each │ │ │ │ +00192300: 2074 6872 6561 6420 616c 736f 2068 6173 thread also has │ │ │ │ +00192310: 2069 7473 206f 776e 2063 6f6f 6b69 6520 its own cookie │ │ │ │ +00192320: 7374 6f72 652e 3c2f 703e 0a3c 703e f09f store.

    .

    .. │ │ │ │ +00192330: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ +00192340: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ +00192350: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ +00192360: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .Se │ │ │ │ +00192390: 7276 6572 2d73 6964 6520 636f 6f6b 6965 rver-side cookie │ │ │ │ +001923a0: 2073 7570 706f 7274 3c2f 6832 3e0a 3c70 support

    .

    This feature is │ │ │ │ +001923c0: 206e 6f74 2072 6563 6f6d 6d65 6e64 6564 not recommended │ │ │ │ +001923d0: 2074 6f20 696d 706c 656d 656e 7420 7374 to implement st │ │ │ │ +001923e0: 6174 6520 696e 2073 7461 6e64 2d61 6c6f ate in stand-alo │ │ │ │ +001923f0: 6e65 2073 6572 7665 7273 2e20 436f 6f6b ne servers. Cook │ │ │ │ +00192400: 6965 7320 6d61 7920 7265 7175 6972 6520 ies may require │ │ │ │ +00192410: 6120 6661 6972 2061 6d6f 756e 7420 6f66 a fair amount of │ │ │ │ +00192420: 2070 726f 6365 7373 696e 6720 6f76 6572 processing over │ │ │ │ +00192430: 6865 6164 2061 6e64 2061 7265 206e 6f74 head and are not │ │ │ │ +00192440: 2069 6e20 6661 6374 206e 6565 6465 6420 in fact needed │ │ │ │ +00192450: 746f 2069 6d70 6c65 6d65 6e74 2073 7461 to implement sta │ │ │ │ +00192460: 7465 6675 6c20 7365 7276 6963 6573 2c20 teful services, │ │ │ │ +00192470: 7768 6963 6820 6973 2074 7970 6963 616c which is typical │ │ │ │ +00192480: 6c79 2070 6572 666f 726d 6564 2077 6974 ly performed wit │ │ │ │ +00192490: 6820 7365 7373 696f 6e20 4944 7320 696e h session IDs in │ │ │ │ +001924a0: 2058 4d4c 2f4a 534f 4e20 6d65 7373 6167 XML/JSON messag │ │ │ │ +001924b0: 6573 206f 7220 6279 2070 6173 7369 6e67 es or by passing │ │ │ │ +001924c0: 2074 6865 2073 6573 7369 6f6e 2049 4473 the session IDs │ │ │ │ +001924d0: 2076 6961 2074 6865 2055 524c 2e3c 2f70 via the URL.

    .

    Server-side │ │ │ │ +001924f0: 2063 6f6f 6b69 6520 7375 7070 6f72 7420 cookie support │ │ │ │ +00192500: 6973 206f 7074 696f 6e61 6c2e 2054 6f20 is optional. To │ │ │ │ +00192510: 656e 6162 6c65 2063 6f6f 6b69 6520 7375 enable cookie su │ │ │ │ +00192520: 7070 6f72 742c 2063 6f6d 7069 6c65 2061 pport, compile a │ │ │ │ +00192530: 6c6c 2073 6f75 7263 6573 2077 6974 6820 ll sources with │ │ │ │ +00192540: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla │ │ │ │ +00192550: 6720 3c63 6f64 653e 2357 4954 485f 434f g #WITH_CO │ │ │ │ +00192560: 4f4b 4945 533c 2f63 6f64 653e 3a20 3c2f OKIES:

     c++ -DW
    │ │ │ │ +00192590: 4954 485f 434f 4f4b 4945 5320 2d6f 206d  ITH_COOKIES -o m
    │ │ │ │ +001925a0: 7973 6572 7665 7220 2e2e 2e0a 3c2f 7072  yserver ....

    See API do │ │ │ │ +001925c0: 6375 6d65 6e74 6174 696f 6e20 4d6f 6475 cumentation Modu │ │ │ │ +001925d0: 6c65 203c 6120 636c 6173 733d 2265 6c22 le HTTP cookie f │ │ │ │ +00192610: 756e 6374 696f 6e73 3c2f 613e 2066 6f72 unctions for │ │ │ │ +00192620: 2074 6865 2063 6f6f 6b69 6520 4150 4920 the cookie API │ │ │ │ +00192630: 6675 6e63 7469 6f6e 732e 2053 6565 2074 functions. See t │ │ │ │ +00192640: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he HTTP │ │ │ │ +00192670: 2073 6573 7369 6f6e 7320 706c 7567 696e sessions plugin │ │ │ │ +00192680: 3c2f 613e 2066 6f72 2048 5454 5020 7365 for HTTP se │ │ │ │ +00192690: 7373 696f 6e20 6d61 6e61 6765 6d65 6e74 ssion management │ │ │ │ +001926a0: 2077 6974 6820 636f 6f6b 6965 7320 7468 with cookies th │ │ │ │ +001926b0: 6174 2069 7320 7265 7175 6972 6564 2066 at is required f │ │ │ │ +001926c0: 6f72 2073 6572 7665 722d 7369 6465 2073 or server-side s │ │ │ │ +001926d0: 6573 7369 6f6e 2063 6f6e 7472 6f6c 2e20 ession control. │ │ │ │ +001926e0: 5468 6520 3c63 6f64 653e 2357 4954 485f The #WITH_ │ │ │ │ +001926f0: 434f 4f4b 4945 533c 2f63 6f64 653e 2066 COOKIES f │ │ │ │ +00192700: 6c61 6720 6973 2075 7365 6c65 7373 2077 lag is useless w │ │ │ │ +00192710: 6974 686f 7574 2073 6572 7665 722d 7369 ithout server-si │ │ │ │ +00192720: 6465 2073 6573 7369 6f6e 206d 616e 6167 de session manag │ │ │ │ +00192730: 656d 656e 7420 616e 6420 636f 6e74 726f ement and contro │ │ │ │ +00192740: 6c2e 3c2f 703e 0a3c 703e 4865 7265 2069 l.

    .

    Here i │ │ │ │ +00192750: 7320 616e 206f 7665 7276 6965 7720 6f66 s an overview of │ │ │ │ +00192760: 2074 6865 2063 6f6f 6b69 6520 4150 4920 the cookie API │ │ │ │ +00192770: 6675 6e63 7469 6f6e 733a 3c2f 703e 0a3c functions:

    .< │ │ │ │ +00192780: 756c 3e0a 3c6c 693e 3c63 6f64 653e 7374 ul>.
  • st │ │ │ │ +00192790: 7275 6374 203c 6120 636c 6173 733d 2265 ruct soap │ │ │ │ +001927e0: 5f63 6f6f 6b69 653c 2f61 3e20 2a73 6f61 _cookie *soa │ │ │ │ +001927f0: 705f 7365 745f 636f 6f6b 6965 2873 7472 p_set_cookie(str │ │ │ │ +00192800: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +00192810: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name │ │ │ │ +00192820: 2c20 636f 6e73 7420 6368 6172 202a 7661 , const char *va │ │ │ │ +00192830: 6c75 652c 2063 6f6e 7374 2063 6861 7220 lue, const char │ │ │ │ +00192840: 2a64 6f6d 6169 6e2c 2063 6f6e 7374 2063 *domain, const c │ │ │ │ +00192850: 6861 7220 2a70 6174 6829 3b3c 2f63 6f64 har *path); This function │ │ │ │ +00192870: 2061 6464 7320 6120 636f 6f6b 6965 2074 adds a cookie t │ │ │ │ +00192880: 6f20 7468 6520 636f 6f6b 6965 2073 746f o the cookie sto │ │ │ │ +00192890: 7265 2061 7420 7468 6520 7365 7276 6572 re at the server │ │ │ │ +001928a0: 2073 6964 652c 2069 6620 6e6f 7420 616c side, if not al │ │ │ │ +001928b0: 7265 6164 7920 7468 6572 652c 2077 6974 ready there, wit │ │ │ │ +001928c0: 6820 7468 6520 7370 6563 6966 6965 6420 h the specified │ │ │ │ +001928d0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name and valu │ │ │ │ +001928f0: 653c 2f63 6f64 653e 2e20 5468 6520 3c63 e. The domain and path │ │ │ │ +00192920: 3c2f 636f 6465 3e20 7061 7261 6d65 7465 paramete │ │ │ │ +00192930: 7273 2063 616e 2062 6520 7370 6563 6966 rs can be specif │ │ │ │ +00192940: 6965 6420 6f72 2063 616e 2062 6520 4e55 ied or can be NU │ │ │ │ +00192950: 4c4c 2074 6f20 7573 6520 7468 6520 6375 LL to use the cu │ │ │ │ +00192960: 7272 656e 7420 646f 6d61 696e 2061 6e64 rrent domain and │ │ │ │ +00192970: 2070 6174 6820 6769 7665 6e20 6279 203c path given by < │ │ │ │ +00192980: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::coo │ │ │ │ +00192a30: 6b69 655f 646f 6d61 696e 3c2f 613e 3c2f kie_domain and │ │ │ │ +00192a50: 3c61 2063 6c61 7373 3d22 656c 2220 6872 │ │ │ │ +00192af0: 736f 6170 3a3a 636f 6f6b 6965 5f70 6174 soap::cookie_pat │ │ │ │ +00192b00: 683c 2f61 3e3c 2f63 6f64 653e 2e20 5265 h. Re │ │ │ │ +00192b10: 7475 726e 7320 706f 696e 7465 7220 746f turns pointer to │ │ │ │ +00192b20: 2074 6865 2063 6f6f 6b69 6520 7374 7275 the cookie stru │ │ │ │ +00192b30: 6374 7572 6520 696e 2074 6865 2064 6174 cture in the dat │ │ │ │ +00192b40: 6162 6173 6520 6f72 204e 554c 4c20 7768 abase or NULL wh │ │ │ │ +00192b50: 656e 2061 6e20 6572 726f 7220 6f63 6375 en an error occu │ │ │ │ +00192b60: 7272 6564 2e3c 2f6c 693e 0a3c 6c69 3e3c rred.
  • .
  • < │ │ │ │ +00192b70: 636f 6465 3e69 6e74 203c 6120 636c 6173 code>int soap_ │ │ │ │ +00192bf0: 7365 745f 636f 6f6b 6965 5f65 7870 6972 set_cookie_expir │ │ │ │ +00192c00: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s │ │ │ │ +00192c10: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char │ │ │ │ +00192c20: 2a6e 616d 652c 206c 6f6e 6720 6578 7069 *name, long expi │ │ │ │ +00192c30: 7265 2c20 636f 6e73 7420 6368 6172 202a re, const char * │ │ │ │ +00192c40: 646f 6d61 696e 2c20 636f 6e73 7420 6368 domain, const ch │ │ │ │ +00192c50: 6172 202a 7061 7468 293c 2f61 3e3b 3c2f ar *path); This funct │ │ │ │ +00192c70: 696f 6e20 7365 7473 2074 6865 2065 7870 ion sets the exp │ │ │ │ +00192c80: 6972 6174 696f 6e20 6f66 2074 6865 2073 iration of the s │ │ │ │ +00192c90: 7065 6369 6669 6564 2063 6f6f 6b69 6520 pecified cookie │ │ │ │ +00192ca0: 3c63 6f64 653e 6e61 6d65 3c2f 636f 6465 name in seconds and │ │ │ │ +00192cc0: 2075 7064 6174 6573 2074 6865 2063 6f6f updates the coo │ │ │ │ +00192cd0: 6b69 6520 7374 6f72 6520 6174 2074 6865 kie store at the │ │ │ │ +00192ce0: 2073 6572 7665 7220 7369 6465 2e20 5468 server side. Th │ │ │ │ +00192cf0: 6520 3c63 6f64 653e 646f 6d61 696e 3c2f e domain and │ │ │ │ +00192d10: 7061 7468 3c2f 636f 6465 3e20 7061 7261 path para │ │ │ │ +00192d20: 6d65 7465 7273 2063 616e 2062 6520 7370 meters can be sp │ │ │ │ +00192d30: 6563 6966 6965 6420 6f72 2063 616e 2062 ecified or can b │ │ │ │ +00192d40: 6520 4e55 4c4c 2074 6f20 7573 6520 7468 e NULL to use th │ │ │ │ +00192d50: 6520 6375 7272 656e 7420 646f 6d61 696e e current domain │ │ │ │ +00192d60: 2061 6e64 2070 6174 6820 6769 7665 6e20 and path given │ │ │ │ +00192d70: 6279 203c 636f 6465 3e3c 6120 636c 6173 by soap: │ │ │ │ +00192e20: 3a63 6f6f 6b69 655f 646f 6d61 696e 3c2f :cookie_domain and soap::cookie │ │ │ │ +00192ef0: 5f70 6174 683c 2f61 3e3c 2f63 6f64 653e _path │ │ │ │ +00192f00: 2e20 5265 7475 726e 7320 3c63 6f64 653e . Returns │ │ │ │ +00192f10: 2353 4f41 505f 4f4b 3c2f 636f 6465 3e20 #SOAP_OK │ │ │ │ +00192f20: 6f72 2061 203c 636f 6465 3e3c 6120 636c or a soap │ │ │ │ +00192fe0: 5f73 7461 7475 733c 2f61 3e3c 2f63 6f64 _status error code..
  • in │ │ │ │ +00193010: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t │ │ │ │ +00193080: 736f 6170 5f73 6574 5f63 6f6f 6b69 655f soap_set_cookie_ │ │ │ │ +00193090: 7365 6375 7265 2873 7472 7563 7420 736f secure(struct so │ │ │ │ +001930a0: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const │ │ │ │ +001930b0: 6368 6172 202a 6e61 6d65 2c20 636f 6e73 char *name, cons │ │ │ │ +001930c0: 7420 6368 6172 202a 646f 6d61 696e 2c20 t char *domain, │ │ │ │ +001930d0: 636f 6e73 7420 6368 6172 202a 7061 7468 const char *path │ │ │ │ +001930e0: 293c 2f61 3e3b 3c2f 636f 6465 3e20 5468 ); Th │ │ │ │ +001930f0: 6973 2066 756e 6374 696f 6e20 7365 7473 is function sets │ │ │ │ +00193100: 2074 6865 2022 7365 6375 7265 2220 7072 the "secure" pr │ │ │ │ +00193110: 6f70 6572 7479 206f 6620 7468 6520 7370 operty of the sp │ │ │ │ +00193120: 6563 6966 6965 6420 636f 6f6b 6965 203c ecified cookie < │ │ │ │ +00193130: 636f 6465 3e6e 616d 653c 2f63 6f64 653e code>name │ │ │ │ +00193140: 2061 6e64 2075 7064 6174 6573 2074 6865 and updates the │ │ │ │ +00193150: 2063 6f6f 6b69 6520 7374 6f72 6520 6174 cookie store at │ │ │ │ +00193160: 2074 6865 2073 6572 7665 7220 7369 6465 the server side │ │ │ │ +00193170: 2e20 5468 6520 2273 6563 7572 6522 2070 . The "secure" p │ │ │ │ +00193180: 726f 7065 7274 7920 6d65 616e 7320 7468 roperty means th │ │ │ │ +00193190: 6174 2074 6869 7320 636f 6f6b 6965 2073 at this cookie s │ │ │ │ +001931a0: 686f 756c 6420 6265 2073 656e 7420 6279 hould be sent by │ │ │ │ +001931b0: 2074 6865 2063 6c69 656e 7420 746f 2074 the client to t │ │ │ │ +001931c0: 6865 2073 6572 7665 7220 6f6e 6c79 2077 he server only w │ │ │ │ +001931d0: 6865 6e20 6120 7365 6375 7265 2048 5454 hen a secure HTT │ │ │ │ +001931e0: 5053 2063 6f6e 6e65 6374 696f 6e20 6361 PS connection ca │ │ │ │ +001931f0: 6e20 6265 2065 7374 6162 6c69 7368 6564 n be established │ │ │ │ +00193200: 2e20 5768 656e 2048 5454 5053 2069 7320 . When HTTPS is │ │ │ │ +00193210: 656e 6162 6c65 6420 616c 6c20 636f 6f6b enabled all cook │ │ │ │ +00193220: 6965 7320 6172 6520 7365 6e74 2062 7920 ies are sent by │ │ │ │ +00193230: 7468 6520 7365 7276 6572 2074 6f20 7468 the server to th │ │ │ │ +00193240: 6520 636c 6965 6e74 2077 6974 6820 7468 e client with th │ │ │ │ +00193250: 6520 2273 6563 7572 6522 2070 726f 7065 e "secure" prope │ │ │ │ +00193260: 7274 7920 7365 742c 2077 6869 6368 206d rty set, which m │ │ │ │ +00193270: 6561 6e73 2074 6861 7420 7468 6973 2066 eans that this f │ │ │ │ +00193280: 756e 6374 696f 6e20 6973 2067 656e 6572 unction is gener │ │ │ │ +00193290: 616c 6c79 206e 6f74 206e 6565 6465 6420 ally not needed │ │ │ │ +001932a0: 756e 6c65 7373 2074 6865 2073 6572 7665 unless the serve │ │ │ │ +001932b0: 7220 6973 206e 6f74 2048 5454 5053 2d65 r is not HTTPS-e │ │ │ │ +001932c0: 6e61 626c 6564 2062 7574 2063 6f6f 6b69 nabled but cooki │ │ │ │ +001932d0: 6573 206d 7573 7420 6265 2073 6563 7572 es must be secur │ │ │ │ +001932e0: 652e 2054 6865 203c 636f 6465 3e64 6f6d e. The dom │ │ │ │ +001932f0: 6169 6e3c 2f63 6f64 653e 2061 6e64 203c ain and < │ │ │ │ +00193300: 636f 6465 3e70 6174 683c 2f63 6f64 653e code>path │ │ │ │ +00193310: 2070 6172 616d 6574 6572 7320 6361 6e20 parameters can │ │ │ │ +00193320: 6265 2073 7065 6369 6669 6564 206f 7220 be specified or │ │ │ │ +00193330: 6361 6e20 6265 204e 554c 4c20 746f 2075 can be NULL to u │ │ │ │ +00193340: 7365 2074 6865 2063 7572 7265 6e74 2064 se the current d │ │ │ │ +00193350: 6f6d 6169 6e20 616e 6420 7061 7468 2067 omain and path g │ │ │ │ +00193360: 6976 656e 2062 7920 3c63 6f64 653e 3c61 iven by │ │ │ │ +00193410: 736f 6170 3a3a 636f 6f6b 6965 5f64 6f6d soap::cookie_dom │ │ │ │ +00193420: 6169 6e3c 2f61 3e3c 2f63 6f64 653e 2061 ain a │ │ │ │ +00193430: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soap::c │ │ │ │ +001934e0: 6f6f 6b69 655f 7061 7468 3c2f 613e 3c2f ookie_path. Returns < │ │ │ │ +00193500: 636f 6465 3e23 534f 4150 5f4f 4b3c 2f63 code>#SOAP_OK or a │ │ │ │ +00193520: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_status │ │ │ │ +001935e0: 3c2f 636f 6465 3e20 6572 726f 7220 636f error co │ │ │ │ +001935f0: 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c 636f de.
  • .
  • int soap_set_c │ │ │ │ +00193680: 6f6f 6b69 655f 7365 7373 696f 6e28 7374 ookie_session(st │ │ │ │ +00193690: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ +001936a0: 2063 6f6e 7374 2063 6861 7220 2a6e 616d const char *nam │ │ │ │ +001936b0: 652c 2063 6f6e 7374 2063 6861 7220 2a64 e, const char *d │ │ │ │ +001936c0: 6f6d 6169 6e2c 2063 6f6e 7374 2063 6861 omain, const cha │ │ │ │ +001936d0: 7220 2a70 6174 6829 3c2f 613e 3b3c 2f63 r *path); This functi │ │ │ │ +001936f0: 6f6e 206d 616b 6573 2074 6865 2073 7065 on makes the spe │ │ │ │ +00193700: 6369 6669 6564 2063 6f6f 6b69 6520 3c63 cified cookie name │ │ │ │ +00193720: 6120 2273 6573 7369 6f6e 2063 6f6f 6b69 a "session cooki │ │ │ │ +00193730: 6522 2061 6e64 2075 7064 6174 6573 2074 e" and updates t │ │ │ │ +00193740: 6865 2063 6f6f 6b69 6520 7374 6f72 6520 he cookie store │ │ │ │ +00193750: 6174 2074 6865 2073 6572 7665 7220 7369 at the server si │ │ │ │ +00193760: 6465 2062 7920 6d61 726b 696e 6720 7468 de by marking th │ │ │ │ +00193770: 6520 636f 6f6b 6965 2061 7320 6120 7365 e cookie as a se │ │ │ │ +00193780: 7373 696f 6e20 636f 6f6b 6965 2e20 5468 ssion cookie. Th │ │ │ │ +00193790: 6973 206d 6561 6e73 2074 6861 7420 7468 is means that th │ │ │ │ +001937a0: 6520 636f 6f6b 6965 2077 696c 6c20 6265 e cookie will be │ │ │ │ +001937b0: 2073 656e 7420 746f 2063 6c69 656e 7473 sent to clients │ │ │ │ +001937c0: 2074 6861 7420 636f 6e6e 6563 7420 746f that connect to │ │ │ │ +001937d0: 2074 6865 2073 6572 7665 722e 2054 6869 the server. Thi │ │ │ │ +001937e0: 7320 6675 6e63 7469 6f6e 2069 7320 6e6f s function is no │ │ │ │ +001937f0: 7420 6e65 6564 6564 2077 6865 6e20 6120 t needed when a │ │ │ │ +00193800: 636f 6f6b 6965 2069 7320 6d6f 6469 6669 cookie is modifi │ │ │ │ +00193810: 6564 2077 6974 6820 3c63 6f64 653e 3c61 ed with │ │ │ │ +00193890: 736f 6170 5f73 6574 5f63 6f6f 6b69 655f soap_set_cookie_ │ │ │ │ +001938a0: 6578 7069 7265 3c2f 613e 3c2f 636f 6465 expire, for example, │ │ │ │ +001938c0: 6265 6361 7573 6520 6d6f 6469 6669 6564 because modified │ │ │ │ +001938d0: 2063 6f6f 6b69 6573 2061 7265 2061 6c77 cookies are alw │ │ │ │ +001938e0: 6179 7320 7365 6e74 2062 6163 6b20 746f ays sent back to │ │ │ │ +001938f0: 2074 6865 2063 6c69 656e 742e 2054 6865 the client. The │ │ │ │ +00193900: 203c 636f 6465 3e64 6f6d 6169 6e3c 2f63 domain and p │ │ │ │ +00193920: 6174 683c 2f63 6f64 653e 2070 6172 616d ath param │ │ │ │ +00193930: 6574 6572 7320 6361 6e20 6265 2073 7065 eters can be spe │ │ │ │ +00193940: 6369 6669 6564 206f 7220 6361 6e20 6265 cified or can be │ │ │ │ +00193950: 204e 554c 4c20 746f 2075 7365 2074 6865 NULL to use the │ │ │ │ +00193960: 2063 7572 7265 6e74 2064 6f6d 6169 6e20 current domain │ │ │ │ +00193970: 616e 6420 7061 7468 2067 6976 656e 2062 and path given b │ │ │ │ +00193980: 7920 3c63 6f64 653e 3c61 2063 6c61 7373 y soap:: │ │ │ │ +00193a30: 636f 6f6b 6965 5f64 6f6d 6169 6e3c 2f61 cookie_domain and soap::cookie_ │ │ │ │ +00193b00: 7061 7468 3c2f 613e 3c2f 636f 6465 3e2e path. │ │ │ │ +00193b10: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns # │ │ │ │ +00193b20: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o │ │ │ │ +00193b30: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_ │ │ │ │ +00193bf0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error code..
  • voi │ │ │ │ +00193c20: 6420 3c61 2063 6c61 7373 3d22 656c 2220 d soap_ │ │ │ │ +00193c90: 636c 725f 636f 6f6b 6965 2873 7472 7563 clr_cookie(struc │ │ │ │ +00193ca0: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co │ │ │ │ +00193cb0: 6e73 7420 6368 6172 202a 6e61 6d65 2c20 nst char *name, │ │ │ │ +00193cc0: 636f 6e73 7420 6368 6172 202a 646f 6d61 const char *doma │ │ │ │ +00193cd0: 696e 2c20 636f 6e73 7420 6368 6172 202a in, const char * │ │ │ │ +00193ce0: 7061 7468 293c 2f61 3e3b 3c2f 636f 6465 path); This function │ │ │ │ +00193d00: 6465 6c65 7465 7320 7468 6520 7370 6563 deletes the spec │ │ │ │ +00193d10: 6966 6965 6420 636f 6f6b 6965 203c 636f ified cookie name f │ │ │ │ +00193d30: 726f 6d20 7468 6520 636f 6f6b 6965 2073 rom the cookie s │ │ │ │ +00193d40: 746f 7265 2061 7420 7468 6520 7365 7276 tore at the serv │ │ │ │ +00193d50: 6572 2073 6964 652e 2054 6865 203c 636f er side. The domain │ │ │ │ +00193d70: 2061 6e64 203c 636f 6465 3e70 6174 683c and path< │ │ │ │ +00193d80: 2f63 6f64 653e 2070 6172 616d 6574 6572 /code> parameter │ │ │ │ +00193d90: 7320 6361 6e20 6265 2073 7065 6369 6669 s can be specifi │ │ │ │ +00193da0: 6564 206f 7220 6361 6e20 6265 204e 554c ed or can be NUL │ │ │ │ +00193db0: 4c20 746f 2075 7365 2074 6865 2063 7572 L to use the cur │ │ │ │ +00193dc0: 7265 6e74 2064 6f6d 6169 6e20 616e 6420 rent domain and │ │ │ │ +00193dd0: 7061 7468 2067 6976 656e 2062 7920 3c63 path given by soap::cook │ │ │ │ +00193e90: 6965 5f64 6f6d 6169 6e3c 2f61 3e3c 2f63 ie_domain and < │ │ │ │ +00193eb0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +00193ec0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +00193ed0: 6d6c 2361 6664 6439 3163 6531 3138 3966 ml#afdd91ce1189f │ │ │ │ +00193ee0: 6564 6433 3265 6266 6135 3164 6436 6564 edd32ebfa51dd6ed │ │ │ │ +00193ef0: 3333 6562 2220 7469 746c 653d 2255 7365 33eb" title="Use │ │ │ │ +00193f00: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri │ │ │ │ +00193f10: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie │ │ │ │ +00193f20: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki │ │ │ │ +00193f30: 6520 7061 7468 206f 6620 7468 6520 7275 e path of the ru │ │ │ │ +00193f40: 6e6e 696e 6720 7365 7276 6572 2e22 3e73 nning server.">s │ │ │ │ +00193f50: 6f61 703a 3a63 6f6f 6b69 655f 7061 7468 oap::cookie_path │ │ │ │ +00193f60: 3c2f 613e 3c2f 636f 6465 3e2e 3c2f 6c69 .
  • .
  • int │ │ │ │ +00193f80: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_clr_cookie │ │ │ │ +00194000: 5f73 6573 7369 6f6e 2873 7472 7563 7420 _session(struct │ │ │ │ +00194010: 736f 6170 202a 736f 6170 2c20 636f 6e73 soap *soap, cons │ │ │ │ +00194020: 7420 6368 6172 202a 6e61 6d65 2c20 636f t char *name, co │ │ │ │ +00194030: 6e73 7420 6368 6172 202a 646f 6d61 696e nst char *domain │ │ │ │ +00194040: 2c20 636f 6e73 7420 6368 6172 202a 7061 , const char *pa │ │ │ │ +00194050: 7468 293c 2f61 3e3b 3c2f 636f 6465 3e20 th); │ │ │ │ +00194060: 5468 6973 2066 756e 6374 696f 6e20 636c This function cl │ │ │ │ +00194070: 6561 7273 2074 6865 2073 6573 7369 6f6e ears the session │ │ │ │ +00194080: 2070 726f 7065 7274 7920 6f66 2074 6865 property of the │ │ │ │ +00194090: 2073 7065 6369 6669 6564 2063 6f6f 6b69 specified cooki │ │ │ │ +001940a0: 6520 3c63 6f64 653e 6e61 6d65 3c2f 636f e name and updates │ │ │ │ +001940c0: 7468 6520 636f 6f6b 6965 2073 746f 7265 the cookie store │ │ │ │ +001940d0: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s │ │ │ │ +001940e0: 6964 652e 2054 6865 203c 636f 6465 3e64 ide. The d │ │ │ │ +001940f0: 6f6d 6169 6e3c 2f63 6f64 653e 2061 6e64 omain and │ │ │ │ +00194100: 203c 636f 6465 3e70 6174 683c 2f63 6f64 path parameters ca │ │ │ │ +00194120: 6e20 6265 2073 7065 6369 6669 6564 206f n be specified o │ │ │ │ +00194130: 7220 6361 6e20 6265 204e 554c 4c20 746f r can be NULL to │ │ │ │ +00194140: 2075 7365 2074 6865 2063 7572 7265 6e74 use the current │ │ │ │ +00194150: 2064 6f6d 6169 6e20 616e 6420 7061 7468 domain and path │ │ │ │ +00194160: 2067 6976 656e 2062 7920 3c63 6f64 653e given by │ │ │ │ +00194170: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap::cookie_d │ │ │ │ +00194220: 6f6d 6169 6e3c 2f61 3e3c 2f63 6f64 653e omain │ │ │ │ +00194230: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap: │ │ │ │ +001942e0: 3a63 6f6f 6b69 655f 7061 7468 3c2f 613e :cookie_path │ │ │ │ +001942f0: 3c2f 636f 6465 3e2e 2052 6574 7572 6e73 . Returns │ │ │ │ +00194300: 203c 636f 6465 3e23 534f 4150 5f4f 4b3c #SOAP_OK< │ │ │ │ +00194310: 2f63 6f64 653e 206f 7220 6120 3c63 6f64 /code> or a soap_status error │ │ │ │ +001943f0: 636f 6465 2e3c 2f6c 693e 0a3c 6c69 3e3c code.
  • .
  • < │ │ │ │ +00194400: 636f 6465 3e73 7472 7563 7420 3c61 2063 code>struct soap_cookie *soap_cookie( │ │ │ │ +00194470: 7374 7275 6374 2073 6f61 7020 2a73 6f61 struct soap *soa │ │ │ │ +00194480: 702c 2063 6f6e 7374 2063 6861 7220 2a6e p, const char *n │ │ │ │ +00194490: 616d 652c 2063 6f6e 7374 2063 6861 7220 ame, const char │ │ │ │ +001944a0: 2a64 6f6d 6169 6e2c 2063 6f6e 7374 2063 *domain, const c │ │ │ │ +001944b0: 6861 7220 2a70 6174 6829 3b3c 2f63 6f64 har *path); This function │ │ │ │ +001944d0: 2072 6574 7572 6e73 2074 6865 2063 6f6f returns the coo │ │ │ │ +001944e0: 6b69 6520 7374 7275 6374 7572 6520 6f66 kie structure of │ │ │ │ +001944f0: 2074 6865 2073 7065 6369 6669 6564 2063 the specified c │ │ │ │ +00194500: 6f6f 6b69 6520 3c63 6f64 653e 6e61 6d65 ookie name │ │ │ │ +00194510: 3c2f 636f 6465 3e20 6f72 204e 554c 4c20 or NULL │ │ │ │ +00194520: 7768 656e 206e 6f74 2066 6f75 6e64 2062 when not found b │ │ │ │ +00194530: 7920 7365 6172 6368 696e 6720 7468 6520 y searching the │ │ │ │ +00194540: 636f 6f6b 6965 2073 746f 7265 2061 7420 cookie store at │ │ │ │ +00194550: 7468 6520 7365 7276 6572 2073 6964 652e the server side. │ │ │ │ +00194560: 2054 6865 203c 636f 6465 3e64 6f6d 6169 The domai │ │ │ │ +00194570: 6e3c 2f63 6f64 653e 2061 6e64 203c 636f n and path p │ │ │ │ +00194590: 6172 616d 6574 6572 7320 6361 6e20 6265 arameters can be │ │ │ │ +001945a0: 2073 7065 6369 6669 6564 206f 7220 6361 specified or ca │ │ │ │ +001945b0: 6e20 6265 204e 554c 4c20 746f 2075 7365 n be NULL to use │ │ │ │ +001945c0: 2074 6865 2063 7572 7265 6e74 2064 6f6d the current dom │ │ │ │ +001945d0: 6169 6e20 616e 6420 7061 7468 2067 6976 ain and path giv │ │ │ │ +001945e0: 656e 2062 7920 3c63 6f64 653e 3c61 2063 en by so │ │ │ │ +00194690: 6170 3a3a 636f 6f6b 6965 5f64 6f6d 6169 ap::cookie_domai │ │ │ │ +001946a0: 6e3c 2f61 3e3c 2f63 6f64 653e 2061 6e64 n and │ │ │ │ +001946b0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::coo │ │ │ │ +00194760: 6b69 655f 7061 7468 3c2f 613e 3c2f 636f kie_path.
  • .
  • const char * │ │ │ │ +00194790: 736f 6170 5f63 6f6f 6b69 655f 7661 6c75 soap_cookie_valu │ │ │ │ +001947a0: 6528 7374 7275 6374 2073 6f61 7020 2a73 e(struct soap *s │ │ │ │ +001947b0: 6f61 702c 2063 6f6e 7374 2063 6861 7220 oap, const char │ │ │ │ +001947c0: 2a6e 616d 652c 2063 6f6e 7374 2063 6861 *name, const cha │ │ │ │ +001947d0: 7220 2a64 6f6d 6169 6e2c 2063 6f6e 7374 r *domain, const │ │ │ │ +001947e0: 2063 6861 7220 2a70 6174 6829 3b3c 2f63 char *path); This functi │ │ │ │ +00194800: 6f6e 2072 6574 7572 6e73 2074 6865 2063 on returns the c │ │ │ │ +00194810: 6f6f 6b69 6520 7661 6c75 6520 6f66 2074 ookie value of t │ │ │ │ +00194820: 6865 2073 7065 6369 6669 6564 2063 6f6f he specified coo │ │ │ │ +00194830: 6b69 6520 3c63 6f64 653e 6e61 6d65 3c2f kie name or NULL wh │ │ │ │ +00194850: 656e 206e 6f74 2066 6f75 6e64 2062 7920 en not found by │ │ │ │ +00194860: 7365 6172 6368 696e 6720 7468 6520 636f searching the co │ │ │ │ +00194870: 6f6b 6965 2073 746f 7265 2061 7420 7468 okie store at th │ │ │ │ +00194880: 6520 7365 7276 6572 2073 6964 652e 2054 e server side. T │ │ │ │ +00194890: 6865 203c 636f 6465 3e64 6f6d 6169 6e3c he domain< │ │ │ │ +001948a0: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and path par │ │ │ │ +001948c0: 616d 6574 6572 7320 6361 6e20 6265 2073 ameters can be s │ │ │ │ +001948d0: 7065 6369 6669 6564 206f 7220 6361 6e20 pecified or can │ │ │ │ +001948e0: 6265 204e 554c 4c20 746f 2075 7365 2074 be NULL to use t │ │ │ │ +001948f0: 6865 2063 7572 7265 6e74 2064 6f6d 6169 he current domai │ │ │ │ +00194900: 6e20 616e 6420 7061 7468 2067 6976 656e n and path given │ │ │ │ +00194910: 2062 7920 3c63 6f64 653e 3c61 2063 6c61 by soap │ │ │ │ +001949c0: 3a3a 636f 6f6b 6965 5f64 6f6d 6169 6e3c ::cookie_domain< │ │ │ │ +001949d0: 2f61 3e3c 2f63 6f64 653e 2061 6e64 203c /a> and < │ │ │ │ +001949e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap::cooki │ │ │ │ +00194a90: 655f 7061 7468 3c2f 613e 3c2f 636f 6465 e_path.
  • .
  • time_t soap_ │ │ │ │ +00194b30: 636f 6f6b 6965 5f65 7870 6972 6528 7374 cookie_expire(st │ │ │ │ +00194b40: 7275 6374 2073 6f61 7020 2a73 6f61 702c ruct soap *soap, │ │ │ │ +00194b50: 2063 6f6e 7374 2063 6861 7220 2a6e 616d const char *nam │ │ │ │ +00194b60: 652c 2063 6f6e 7374 2063 6861 7220 2a64 e, const char *d │ │ │ │ +00194b70: 6f6d 6169 6e2c 2063 6f6e 7374 2063 6861 omain, const cha │ │ │ │ +00194b80: 7220 2a70 6174 6829 3c2f 613e 3b3c 2f63 r *path); This functi │ │ │ │ +00194ba0: 6f6e 2072 6574 7572 6e73 2074 6865 2063 on returns the c │ │ │ │ +00194bb0: 6f6f 6b69 6520 6578 7069 7261 7469 6f6e ookie expiration │ │ │ │ +00194bc0: 2074 696d 6520 3c63 6f64 653e 7469 6d65 time time │ │ │ │ +00194bd0: 5f74 3c2f 636f 6465 3e20 6f66 2074 6865 _t of the │ │ │ │ +00194be0: 2073 7065 6369 6669 6564 2063 6f6f 6b69 specified cooki │ │ │ │ +00194bf0: 6520 3c63 6f64 653e 6e61 6d65 3c2f 636f e name or -1 when n │ │ │ │ +00194c10: 6f74 2066 6f75 6e64 2062 7920 7365 6172 ot found by sear │ │ │ │ +00194c20: 6368 696e 6720 7468 6520 636f 6f6b 6965 ching the cookie │ │ │ │ +00194c30: 2073 746f 7265 2061 7420 7468 6520 7365 store at the se │ │ │ │ +00194c40: 7276 6572 2073 6964 652e 2054 6865 203c rver side. The < │ │ │ │ +00194c50: 636f 6465 3e64 6f6d 6169 6e3c 2f63 6f64 code>domain and pat │ │ │ │ +00194c70: 683c 2f63 6f64 653e 2070 6172 616d 6574 h paramet │ │ │ │ +00194c80: 6572 7320 6361 6e20 6265 2073 7065 6369 ers can be speci │ │ │ │ +00194c90: 6669 6564 206f 7220 6361 6e20 6265 204e fied or can be N │ │ │ │ +00194ca0: 554c 4c20 746f 2075 7365 2074 6865 2063 ULL to use the c │ │ │ │ +00194cb0: 7572 7265 6e74 2064 6f6d 6169 6e20 616e urrent domain an │ │ │ │ +00194cc0: 6420 7061 7468 2067 6976 656e 2062 7920 d path given by │ │ │ │ +00194cd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::co │ │ │ │ +00194d80: 6f6b 6965 5f64 6f6d 6169 6e3c 2f61 3e3c okie_domain< │ │ │ │ +00194d90: 2f63 6f64 653e 2061 6e64 203c 636f 6465 /code> and soap::cookie_pa │ │ │ │ +00194e50: 7468 3c2f 613e 3c2f 636f 6465 3e2e 3c2f th..
  • in │ │ │ │ +00194e70: 7420 3c61 2063 6c61 7373 3d22 656c 2220 t soap_getenv_ │ │ │ │ +00194f10: 636f 6f6b 6965 7328 7374 7275 6374 2073 cookies(struct s │ │ │ │ +00194f20: 6f61 7020 2a73 6f61 7029 3c2f 613e 3b3c oap *soap);< │ │ │ │ +00194f30: 2f63 6f64 653e 2054 6869 7320 6675 6e63 /code> This func │ │ │ │ +00194f40: 7469 6f6e 2069 6e69 7469 616c 697a 6573 tion initializes │ │ │ │ +00194f50: 2074 6865 2063 6f6f 6b69 6520 7374 6f72 the cookie stor │ │ │ │ +00194f60: 6520 6174 2074 6865 2073 6572 7665 7220 e at the server │ │ │ │ +00194f70: 7369 6465 2062 7920 7265 6164 696e 6720 side by reading │ │ │ │ +00194f80: 7468 6520 3c63 6f64 653e 4854 5450 5f43 the HTTP_C │ │ │ │ +00194f90: 4f4f 4b49 453c 2f63 6f64 653e 2065 6e76 OOKIE env │ │ │ │ +00194fa0: 6972 6f6e 6d65 6e74 2076 6172 6961 626c ironment variabl │ │ │ │ +00194fb0: 652e 2054 6869 7320 7072 6f76 6964 6573 e. This provides │ │ │ │ +00194fc0: 2061 206d 6561 6e73 2066 6f72 2061 2043 a means for a C │ │ │ │ +00194fd0: 4749 2061 7070 6c69 6361 7469 6f6e 2074 GI application t │ │ │ │ +00194fe0: 6f20 7265 6164 2063 6f6f 6b69 6573 2073 o read cookies s │ │ │ │ +00194ff0: 656e 7420 6279 2061 2063 6c69 656e 742e ent by a client. │ │ │ │ +00195000: 2052 6574 7572 6e73 203c 636f 6465 3e23 Returns # │ │ │ │ +00195010: 534f 4150 5f4f 4b3c 2f63 6f64 653e 206f SOAP_OK o │ │ │ │ +00195020: 7220 6120 3c63 6f64 653e 3c61 2063 6c61 r a soap_ │ │ │ │ +001950e0: 7374 6174 7573 3c2f 613e 3c2f 636f 6465 status error code whe │ │ │ │ +00195100: 6e20 7468 6520 3c63 6f64 653e 4854 5450 n the HTTP │ │ │ │ +00195110: 5f43 4f4f 4b49 453c 2f63 6f64 653e 2076 _COOKIE v │ │ │ │ +00195120: 6172 6961 626c 6520 7761 7320 6e6f 7420 ariable was not │ │ │ │ +00195130: 666f 756e 642e 3c2f 6c69 3e0a 3c6c 693e found.
  • .
  • │ │ │ │ +00195140: 3c63 6f64 653e 766f 6964 203c 6120 636c void soap_free_co │ │ │ │ +001951c0: 6f6b 6965 7328 7374 7275 6374 2073 6f61 okies(struct soa │ │ │ │ +001951d0: 7020 2a73 6f61 7029 3c2f 613e 3b3c 2f63 p *soap); This functi │ │ │ │ +001951f0: 6f6e 2066 7265 6573 2074 6865 2063 6f6f on frees the coo │ │ │ │ +00195200: 6b69 6520 7374 6f72 6520 616e 6420 6465 kie store and de │ │ │ │ +00195210: 6c65 7465 7320 616c 6c20 636f 6f6b 6965 letes all cookie │ │ │ │ +00195220: 732e 3c2f 6c69 3e0a 3c2f 756c 3e0a 3c70 s.
  • ..

    The following v │ │ │ │ +00195240: 6172 6961 626c 6573 206f 6620 7468 6520 ariables of the │ │ │ │ +00195250: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context are us │ │ │ │ +001952c0: 6564 2074 6f20 6465 6669 6e65 2074 6865 ed to define the │ │ │ │ +001952d0: 2063 7572 7265 6e74 2064 6f6d 6169 6e20 current domain │ │ │ │ +001952e0: 616e 6420 7061 7468 3a3c 2f70 3e0a 3c75 and path:

    ..
  • con │ │ │ │ +00195300: 7374 2063 6861 7220 2a20 3c61 2063 6c61 st char * soap │ │ │ │ +001953b0: 3a3a 636f 6f6b 6965 5f64 6f6d 6169 6e3c ::cookie_domain< │ │ │ │ +001953c0: 2f61 3e3c 2f63 6f64 653e 2073 686f 756c /a> shoul │ │ │ │ +001953d0: 6420 6265 2073 6574 2074 6f20 7468 6520 d be set to the │ │ │ │ +001953e0: 646f 6d61 696e 2028 686f 7374 2920 6f66 domain (host) of │ │ │ │ +001953f0: 2074 6865 2073 6572 7669 6365 3c2f 6c69 the service
  • .
  • cons │ │ │ │ +00195410: 7420 6368 6172 202a 203c 6120 636c 6173 t char * soap::c │ │ │ │ +001954c0: 6f6f 6b69 655f 7061 7468 3c2f 613e 3c2f ookie_path may be set │ │ │ │ +001954e0: 2074 6f20 7468 6520 6465 6661 756c 7420 to the default │ │ │ │ +001954f0: 7061 7468 2074 6f20 7468 6520 7365 7276 path to the serv │ │ │ │ +00195500: 6963 653c 2f6c 693e 0a3c 6c69 3e3c 636f ice
  • .
  • int s │ │ │ │ +001955d0: 6f61 703a 3a63 6f6f 6b69 655f 6d61 783c oap::cookie_max< │ │ │ │ +001955e0: 2f61 3e3c 2f63 6f64 653e 206d 6178 696d /a> maxim │ │ │ │ +001955f0: 756d 2063 6f6f 6b69 6520 6461 7461 6261 um cookie databa │ │ │ │ +00195600: 7365 2073 697a 6520 2864 6566 6175 6c74 se size (default │ │ │ │ +00195610: 3d33 3229 3c2f 6c69 3e0a 3c2f 756c 3e0a =32)
  • .. │ │ │ │ +00195620: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soa │ │ │ │ +001956d0: 703a 3a63 6f6f 6b69 655f 7061 7468 3c2f p::cookie_path value │ │ │ │ +001956f0: 6973 2075 7365 6420 746f 2066 696c 7465 is used to filte │ │ │ │ +00195700: 7220 636f 6f6b 6965 7320 696e 7465 6e64 r cookies intend │ │ │ │ +00195710: 6564 2066 6f72 2074 6869 7320 7365 7276 ed for this serv │ │ │ │ +00195720: 6963 6520 6163 636f 7264 696e 6720 746f ice according to │ │ │ │ +00195730: 2074 6865 2070 6174 6820 7072 6566 6978 the path prefix │ │ │ │ +00195740: 2072 756c 6573 206f 7574 6c69 6e65 6420 rules outlined │ │ │ │ +00195750: 696e 2052 4643 3231 3039 2e3c 2f70 3e0a in RFC2109.

    . │ │ │ │ +00195760: 3c70 3e54 6865 2066 6f6c 6c6f 7769 6e67

    The following │ │ │ │ +00195770: 2065 7861 6d70 6c65 2073 6572 7665 7220 example server │ │ │ │ +00195780: 6164 6f70 7473 2063 6f6f 6b69 6573 2066 adopts cookies f │ │ │ │ +00195790: 6f72 2073 6573 7369 6f6e 2063 6f6e 7472 or session contr │ │ │ │ +001957a0: 6f6c 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ol:

    .
    . │ │ │ │ +001958d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int m, s; .
    soap │ │ │ │ +00195970: 5f69 6e69 743c 2f61 3e28 2661 6d70 3b3c _init(&< │ │ │ │ +00195980: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00195990: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001959a0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ +001959b0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    soap.cookie_doma │ │ │ │ +00195a50: 696e 3c2f 613e 203d 203c 7370 616e 2063 in = "...&q │ │ │ │ +00195a80: 756f 743b 3c2f 7370 616e 3e3b 203c 2f64 uot;; .
    s │ │ │ │ +00195ad0: 6f61 703c 2f61 3e2e 3c61 2063 6c61 7373 oap.cookie_path │ │ │ │ +00195b30: 203d 203c 7370 616e 2063 6c61 7373 3d22 = & │ │ │ │ +00195b50: 7175 6f74 3b2f 2671 756f 743b 3c2f 7370 quot;/"; // th │ │ │ │ +00195b80: 6520 7061 7468 2077 6869 6368 2069 7320 e path which is │ │ │ │ +00195b90: 7573 6564 2074 6f20 6669 6c74 6572 2f73 used to filter/s │ │ │ │ +00195ba0: 6574 2063 6f6f 6b69 6573 2077 6974 6820 et cookies with │ │ │ │ +00195bb0: 7468 6973 2064 6573 7469 6e61 7469 6f6e this destination │ │ │ │ +00195bc0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +00195bd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00195be0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +00195c00: 2f73 7061 6e3e 2028 6172 6763 2026 6c74 /span> (argc < │ │ │ │ +00195c10: 3b20 3229 203c 2f64 6976 3e0a 3c64 6976 ; 2)
    .
    │ │ │ │ +00195c30: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    soap_getenv_c │ │ │ │ +00195cb0: 6f6f 6b69 6573 3c2f 613e 2826 616d 703b ookies(& │ │ │ │ +00195cc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +00195cf0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // CGI a │ │ │ │ +00195d10: 7070 3a20 6772 6162 2063 6f6f 6b69 6573 pp: grab cookies │ │ │ │ +00195d20: 2066 726f 6d20 2623 3339 3b48 5454 505f from 'HTTP_ │ │ │ │ +00195d30: 434f 4f4b 4945 2623 3339 3b20 656e 7620 COOKIE' env │ │ │ │ +00195d40: 7661 7220 3c2f 7370 616e 3e3c 2f64 6976 var
    .
    soap_ser │ │ │ │ +00195dc0: 7665 3c2f 613e 2826 616d 703b 3c61 2063 ve(&soap); .
    }
    .
    │ │ │ │ +00195e50: 656c 7365 3c2f 7370 616e 3e20 3c2f 6469 else .
    {
    .< │ │ │ │ +00195e80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +00195e90: 3e20 2020 206d 203d 203c 6120 636c 6173 > m = soap_bi │ │ │ │ +00195ef0: 6e64 3c2f 613e 2826 616d 703b 3c61 2063 nd(&soap, NUL │ │ │ │ +00195f30: 4c2c 2061 746f 6928 6172 6776 5b31 5d29 L, atoi(argv[1]) │ │ │ │ +00195f40: 2c20 3130 293b 203c 7370 616e 2063 6c61 , 10); // │ │ │ │ +00195f60: 736d 616c 6c20 4241 434b 4c4f 4720 666f small BACKLOG fo │ │ │ │ +00195f70: 7220 6974 6572 6174 6976 6520 7365 7276 r iterative serv │ │ │ │ +00195f80: 6572 733c 2f73 7061 6e3e 3c2f 6469 763e ers
    │ │ │ │ +00195f90: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ +00196040: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    exit(EXI │ │ │ │ +00196060: 545f 4641 494c 5552 4529 3b20 3c2f 6469 T_FAILURE); .
    for (< │ │ │ │ +001960b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001960c0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int i = 1; ; i++ │ │ │ │ +001960e0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    { │ │ │ │ +00196100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    s │ │ │ │ +00196120: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_accept(&s │ │ │ │ +001961b0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    │ │ │ │ +001961c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (!< │ │ │ │ +00196200: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00196210: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00196220: 705f 5f73 6f61 702e 6874 6d6c 2367 6161 p__soap.html#gaa │ │ │ │ +00196230: 6165 3837 3437 6634 6364 6163 6565 3537 ae8747f4cdacee57 │ │ │ │ +00196240: 3538 3735 6333 6132 3438 3864 3939 6322 5875c3a2488d99c" │ │ │ │ +00196250: 3e73 6f61 705f 7661 6c69 645f 736f 636b >soap_valid_sock │ │ │ │ +00196260: 6574 3c2f 613e 2873 2929 203c 2f64 6976 et(s))
    .
    exit │ │ │ │ +00196290: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); │ │ │ │ +001962a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +001962c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001962d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001962e0: 705f 5f69 6f2e 6874 6d6c 2367 6135 3164 p__io.html#ga51d │ │ │ │ +001962f0: 6261 3737 3036 6135 3035 3234 3062 6438 ba7706a505240bd8 │ │ │ │ +00196300: 3933 3563 3062 3238 6534 3139 6422 3e73 935c0b28e419d">s │ │ │ │ +00196310: 6f61 705f 7365 7276 653c 2f61 3e28 2661 oap_serve(&a │ │ │ │ +00196320: 6d70 3b3c 6120 636c 6173 733d 2263 6f64 mp;soap);
    .
    │ │ │ │ +00196370: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_en │ │ │ │ +001963d0: 643c 2f61 3e28 2661 6d70 3b3c 6120 636c d(&soap);.
    │ │ │ │ +00196480: 736f 6170 5f66 7265 655f 636f 6f6b 6965 soap_free_cookie │ │ │ │ +00196490: 733c 2f61 3e28 2661 6d70 3b3c 6120 636c s(&soap); // remove all │ │ │ │ +001964f0: 206f 6c64 2063 6f6f 6b69 6573 2066 726f old cookies fro │ │ │ │ +00196500: 6d20 6461 7461 6261 7365 2073 6f20 6e6f m database so no │ │ │ │ +00196510: 2069 6e74 6572 6665 7265 6e63 6520 6f63 interference oc │ │ │ │ +00196520: 6375 7273 2077 6974 6820 7468 6520 6172 curs with the ar │ │ │ │ +00196530: 7269 7661 6c20 6f66 206e 6577 2063 6f6f rival of new coo │ │ │ │ +00196540: 6b69 6573 203c 2f73 7061 6e3e 3c2f 6469 kies .
    }
    .
    }
    .< │ │ │ │ +00196590: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001965a0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret │ │ │ │ +001965c0: 7572 6e3c 2f73 7061 6e3e 2030 3b20 3c2f urn 0; .
    }
    . │ │ │ │ +001965f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int │ │ │ │ +00196640: 206e 735f 5f77 6562 6d65 7468 6f64 283c ns__webmethod(< │ │ │ │ +00196650: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00196660: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ +001966d0: 2f61 3e2c 202e 2e2e 2920 3c2f 6469 763e /a>, ...)
    │ │ │ │ +001966e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ +00196710: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +00196720: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ +00196750: 3c2f 7370 616e 3e20 2a63 6f6f 6b69 655f *cookie_ │ │ │ │ +00196760: 7661 6c75 6520 3d20 3c61 2063 6c61 7373 value = soa │ │ │ │ +001967c0: 705f 636f 6f6b 6965 5f76 616c 7565 3c2f p_cookie_value(soap, │ │ │ │ +00196820: 2671 756f 743b 636f 6f6b 6965 5f6e 616d "cookie_nam │ │ │ │ +00196830: 6526 7175 6f74 3b3c 2f73 7061 6e3e 2c20 e", │ │ │ │ +00196840: 4e55 4c4c 2c20 4e55 4c4c 293b 3c2f 6469 NULL, NULL);.
    if (!coo │ │ │ │ +00196890: 6b69 655f 7661 6c75 6529 2020 2020 2020 kie_value) │ │ │ │ +001968a0: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +001968c0: 2f2f 2063 6f6f 6b69 6520 7265 7475 726e // cookie return │ │ │ │ +001968d0: 6564 2062 7920 636c 6965 6e74 3f20 3c2f ed by client?
    .
    │ │ │ │ +00196900: 2020 636f 6f6b 6965 5f76 616c 7565 203d cookie_value = │ │ │ │ +00196910: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +00196930: 6f74 3b69 6e69 7469 616c 5f76 616c 7565 ot;initial_value │ │ │ │ +00196940: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; < │ │ │ │ +00196950: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +00196960: 656e 7422 3e2f 2f20 6e6f 3a20 7365 7420 ent">// no: set │ │ │ │ +00196970: 696e 6974 6961 6c20 636f 6f6b 6965 2076 initial cookie v │ │ │ │ +00196980: 616c 7565 203c 2f73 7061 6e3e 3c2f 6469 alue .
    else .
    ... │ │ │ │ +001969f0: 2020 2020 2020 2020 2020 2020 2020 2020 │ │ │ │ +00196a00: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +00196a20: 2f2f 2079 6573 3a20 6d6f 6469 6679 2074 // yes: modify t │ │ │ │ +00196a30: 6865 2063 6f6f 6b69 6520 7661 6c75 6520 he cookie value │ │ │ │ +00196a40: 746f 2072 6566 6c65 6374 2074 6865 206e to reflect the n │ │ │ │ +00196a50: 6577 2073 7461 7465 3c2f 7370 616e 3e3c ew state< │ │ │ │ +00196a60: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    soap_ │ │ │ │ +00196be0: 7365 745f 636f 6f6b 6965 5f65 7870 6972 set_cookie_expir │ │ │ │ +00196bf0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa │ │ │ │ +00196c20: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "cookie_ │ │ │ │ +00196c50: 6e61 6d65 2671 756f 743b 3c2f 7370 616e name", 60, NULL, NUL │ │ │ │ +00196c70: 4c29 3b20 3c73 7061 6e20 636c 6173 733d L); // coo │ │ │ │ +00196c90: 6b69 6520 6578 7069 7265 7320 696e 2036 kie expires in 6 │ │ │ │ +00196ca0: 3020 7365 636f 6e64 7320 3c2f 7370 616e 0 seconds
    ..
    }< │ │ │ │ 00196d70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ -00196d90: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ -00196e70: 636f 6e73 7420 6368 6172 202a 2073 6f61 const char * soa │ │ │ │ -00196e80: 705f 636f 6f6b 6965 5f76 616c 7565 2873 p_cookie_value(s │ │ │ │ -00196e90: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -00196ea0: 2c20 636f 6e73 7420 6368 6172 202a 6e61 , const char *na │ │ │ │ -00196eb0: 6d65 2c20 636f 6e73 7420 6368 6172 202a me, const char * │ │ │ │ -00196ec0: 646f 6d61 696e 2c20 636f 6e73 7420 6368 domain, const ch │ │ │ │ -00196ed0: 6172 202a 7061 7468 293c 2f64 6976 3e3c ar *path)
    < │ │ │ │ -00196ee0: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -00196ef0: 223e 4765 7420 636f 6f6b 6965 2076 616c ">Get cookie val │ │ │ │ -00196f00: 7565 2e3c 2f64 6976 3e3c 2f64 6976 3e0a ue.
    . │ │ │ │ -00196f10: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    st │ │ │ │ -00196ff0: 7275 6374 2073 6f61 705f 636f 6f6b 6965 ruct soap_cookie │ │ │ │ -00197000: 202a 2073 6f61 705f 7365 745f 636f 6f6b * soap_set_cook │ │ │ │ -00197010: 6965 2873 7472 7563 7420 736f 6170 202a ie(struct soap * │ │ │ │ -00197020: 736f 6170 2c20 636f 6e73 7420 6368 6172 soap, const char │ │ │ │ -00197030: 202a 6e61 6d65 2c20 636f 6e73 7420 6368 *name, const ch │ │ │ │ -00197040: 6172 202a 7661 6c75 652c 2063 6f6e 7374 ar *value, const │ │ │ │ -00197050: 2063 6861 7220 2a64 6f6d 6169 6e2c 2063 char *domain, c │ │ │ │ -00197060: 6f6e 7374 2063 6861 7220 2a70 6174 6829 onst char *path) │ │ │ │ -00197070: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Add a c │ │ │ │ -00197090: 6f6f 6b69 652e 3c2f 6469 763e 3c2f 6469 ookie.
    .
    int soap_ge │ │ │ │ -00197190: 7465 6e76 5f63 6f6f 6b69 6573 2873 7472 tenv_cookies(str │ │ │ │ -001971a0: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)< │ │ │ │ -001971b0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Get cook │ │ │ │ -001971d0: 6965 7320 6672 6f6d 2074 6865 2048 5454 ies from the HTT │ │ │ │ -001971e0: 505f 434f 4f4b 4945 2065 6e76 6972 6f6e P_COOKIE environ │ │ │ │ -001971f0: 6d65 6e74 2076 6172 6961 626c 652e 3c2f ment variable.
    .
    │ │ │ │ -00197260: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    void │ │ │ │ -001972f0: 736f 6170 5f66 7265 655f 636f 6f6b 6965 soap_free_cookie │ │ │ │ -00197300: 7328 7374 7275 6374 2073 6f61 7020 2a73 s(struct soap *s │ │ │ │ -00197310: 6f61 7029 3c2f 6469 763e 3c64 6976 2063 oap)
    Fre │ │ │ │ -00197330: 6520 636f 6f6b 6965 732e 3c2f 6469 763e e cookies.
    │ │ │ │ -00197340: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -001973b0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap_set │ │ │ │ -00197400: 5f63 6f6f 6b69 655f 6578 7069 7265 3c2f _cookie_expire
    int │ │ │ │ -00197430: 736f 6170 5f73 6574 5f63 6f6f 6b69 655f soap_set_cookie_ │ │ │ │ -00197440: 6578 7069 7265 2873 7472 7563 7420 736f expire(struct so │ │ │ │ -00197450: 6170 202a 736f 6170 2c20 636f 6e73 7420 ap *soap, const │ │ │ │ -00197460: 6368 6172 202a 6e61 6d65 2c20 6c6f 6e67 char *name, long │ │ │ │ -00197470: 206d 6178 6167 652c 2063 6f6e 7374 2063 maxage, const c │ │ │ │ -00197480: 6861 7220 2a64 6f6d 6169 6e2c 2063 6f6e har *domain, con │ │ │ │ -00197490: 7374 2063 6861 7220 2a70 6174 6829 3c2f st char *path)
    Set cooki │ │ │ │ -001974c0: 6520 6578 7069 7261 7469 6f6e 2e3c 2f64 e expiration.
    .
    │ │ │ │ -00197590: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    const char * │ │ │ │ -001975b0: 2063 6f6f 6b69 655f 646f 6d61 696e 3c2f cookie_domain
    User-defi │ │ │ │ -001975e0: 6e61 626c 6520 7374 7269 6e67 2074 6861 nable string tha │ │ │ │ -001975f0: 7420 7370 6563 6966 6965 7320 7468 6520 t specifies the │ │ │ │ -00197600: 4854 5450 2063 6f6f 6b69 6520 646f 6d61 HTTP cookie doma │ │ │ │ -00197610: 696e 206f 6620 7468 6520 7275 6e6e 696e in of the runnin │ │ │ │ -00197620: 6720 7365 7276 6572 2e3c 2f64 6976 3e3c g server.
    < │ │ │ │ -00197630: 6469 7620 636c 6173 733d 2274 7464 6566 div class="ttdef │ │ │ │ -00197640: 223e 3c62 3e44 6566 696e 6974 696f 6e3a ">Definition: │ │ │ │ -00197650: 3c2f 623e 2073 7464 736f 6170 322e 683a stdsoap2.h: │ │ │ │ -00197660: 3239 3639 3c2f 6469 763e 3c2f 6469 763e 2969
    │ │ │ │ -00197670: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap:: │ │ │ │ -00197710: 636f 6f6b 6965 5f70 6174 683c 2f61 3e3c cookie_path< │ │ │ │ -00197720: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    const c │ │ │ │ -00197740: 6861 7220 2a20 636f 6f6b 6965 5f70 6174 har * cookie_pat │ │ │ │ -00197750: 683c 2f64 6976 3e3c 6469 7620 636c 6173 h
    User-d │ │ │ │ -00197770: 6566 696e 6162 6c65 2073 7472 696e 6720 efinable string │ │ │ │ -00197780: 7468 6174 2073 7065 6369 6669 6573 2074 that specifies t │ │ │ │ -00197790: 6865 2048 5454 5020 636f 6f6b 6965 2070 he HTTP cookie p │ │ │ │ -001977a0: 6174 6820 6f66 2074 6865 2072 756e 6e69 ath of the runni │ │ │ │ -001977b0: 6e67 2073 6572 7665 722e 3c2f 6469 763e ng server.
    │ │ │ │ -001977c0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    Definition │ │ │ │ -001977e0: 3a3c 2f62 3e20 7374 6473 6f61 7032 2e68 : stdsoap2.h │ │ │ │ -001977f0: 3a32 3937 313c 2f64 6976 3e3c 2f64 6976 :2971
    .

    .... │ │ │ │ -00197820: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ -00197830: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ -00197840: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ -00197850: 6832 3e3c 6120 636c 6173 733d 2261 6e63 h2>.Conn │ │ │ │ -00197880: 6563 7469 6e67 2063 6c69 656e 7473 2074 ecting clients t │ │ │ │ -00197890: 6872 6f75 6768 2070 726f 7879 2073 6572 hrough proxy ser │ │ │ │ -001978a0: 7665 7273 3c2f 6832 3e0a 3c70 3e57 6865 vers

    .

    Whe │ │ │ │ -001978b0: 6e20 6120 636c 6965 6e74 206e 6565 6473 n a client needs │ │ │ │ -001978c0: 2074 6f20 636f 6e6e 6563 7420 746f 2061 to connect to a │ │ │ │ -001978d0: 2057 6562 2053 6572 7669 6365 2074 6872 Web Service thr │ │ │ │ -001978e0: 6f75 6768 2061 2070 726f 7879 2073 6572 ough a proxy ser │ │ │ │ -001978f0: 7665 722c 2073 6574 2074 6865 203c 636f ver, set the so │ │ │ │ -001979b0: 6170 3a3a 7072 6f78 795f 686f 7374 3c2f ap::proxy_host string │ │ │ │ -001979d0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap::proxy_p │ │ │ │ -00197aa0: 6f72 743c 2f61 3e3c 2f63 6f64 653e 2069 ort i │ │ │ │ -00197ab0: 6e74 6567 6572 2061 7474 7269 6275 7465 nteger attribute │ │ │ │ -00197ac0: 7320 6f66 2074 6865 2063 7572 7265 6e74 s of the current │ │ │ │ -00197ad0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap context to th │ │ │ │ -00197b40: 6520 7072 6f78 7927 7320 686f 7374 206e e proxy's host n │ │ │ │ -00197b50: 616d 6520 616e 6420 706f 7274 2c20 7265 ame and port, re │ │ │ │ -00197b60: 7370 6563 7469 7665 6c79 2e20 466f 7220 spectively. For │ │ │ │ -00197b70: 6578 616d 706c 653a 3c2f 703e 0a3c 6469 example:

    . │ │ │ │ -00197c30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    soap_ini │ │ │ │ -00197ca0: 743c 2f61 3e28 2661 6d70 3b3c 6120 636c t(&soap); .
    soa │ │ │ │ -00197d20: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.p │ │ │ │ -00197d70: 726f 7879 5f68 6f73 743c 2f61 3e20 3d20 roxy_host = │ │ │ │ -00197d80: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -00197da0: 743b 7072 6f78 7968 6f73 746e 616d 6526 t;proxyhostname& │ │ │ │ -00197db0: 7175 6f74 3b3c 2f73 7061 6e3e 3b20 3c2f quot;; .. │ │ │ │ -00197e80: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n │ │ │ │ -00197eb0: 735f 5f77 6562 6d65 7468 6f64 2826 616d s__webmethod(&am │ │ │ │ -00197ec0: 703b 3c61 2063 6c61 7373 3d22 636f 6465 p;soap, & │ │ │ │ -00197f10: 7175 6f74 3b68 7474 703a 2f2f 686f 7374 quot;http://host │ │ │ │ -00197f20: 3a70 6f72 742f 7061 7468 2671 756f 743b :port/path" │ │ │ │ -00197f30: 3c2f 7370 616e 3e2c 203c 7370 616e 2063 , "actio │ │ │ │ -00197f60: 6e26 7175 6f74 3b3c 2f73 7061 6e3e 2c20 n", │ │ │ │ -00197f70: 2e2e 2e29 2920 3c2f 6469 763e 0a3c 6469 ...))
    . │ │ │ │ -00197f90: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f │ │ │ │ -00197ff0: 6175 6c74 3c2f 613e 2826 616d 703b 3c61 ault(&soap, s │ │ │ │ -00198030: 7464 6572 7229 3b20 3c2f 6469 763e 0a3c tderr);
    .< │ │ │ │ -00198040: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00198050: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else< │ │ │ │ -00198070: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -00198090: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s │ │ │ │ -001980b0: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.

    Th │ │ │ │ -001980e0: 6520 636f 6e74 6578 7420 6174 7472 6962 e context attrib │ │ │ │ -001980f0: 7574 6573 203c 636f 6465 3e3c 6120 636c utes soap::prox │ │ │ │ -001981b0: 795f 686f 7374 3c2f 613e 3c2f 636f 6465 y_host and soap::proxy_ │ │ │ │ -00198290: 706f 7274 3c2f 613e 3c2f 636f 6465 3e20 port │ │ │ │ -001982a0: 6b65 6570 2074 6865 6972 2076 616c 7565 keep their value │ │ │ │ -001982b0: 7320 7468 726f 7567 6820 6120 7365 7175 s through a sequ │ │ │ │ -001982c0: 656e 6365 206f 6620 7365 7276 6963 6520 ence of service │ │ │ │ -001982d0: 6f70 6572 6174 696f 6e20 6361 6c6c 732c operation calls, │ │ │ │ -001982e0: 2073 6f20 7468 6579 206f 6e6c 7920 6e65 so they only ne │ │ │ │ -001982f0: 6564 2074 6f20 6265 2073 6574 206f 6e63 ed to be set onc │ │ │ │ -00198300: 652e 3c2f 703e 0a3c 703e 5768 656e 2058 e.

    .

    When X │ │ │ │ -00198310: 2d46 6f72 7761 7264 6564 2d46 6f72 2068 -Forwarded-For h │ │ │ │ -00198320: 6561 6465 7273 2061 7265 2072 6574 7572 eaders are retur │ │ │ │ -00198330: 6e65 6420 6279 2074 6865 2070 726f 7879 ned by the proxy │ │ │ │ -00198340: 2c20 7468 6520 6865 6164 6572 2063 616e , the header can │ │ │ │ -00198350: 2062 6520 6163 6365 7373 6564 2069 6e20 be accessed in │ │ │ │ -00198360: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the soap::proxy_fro │ │ │ │ -00198400: 6d3c 2f61 3e3c 2f63 6f64 653e 2073 7472 m str │ │ │ │ -00198410: 696e 672e 3c2f 703e 0a3c 703e 5365 6520 ing.

    .

    See │ │ │ │ -00198420: 616c 736f 2053 6563 7469 6f6e 7320 3c61 also Sections HTTP proxy bas │ │ │ │ -00198470: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio │ │ │ │ -00198480: 6e3c 2f61 3e20 616e 6420 3c61 2063 6c61 n and HTTP proxy NTL │ │ │ │ -001984d0: 4d20 6175 7468 656e 7469 6361 7469 6f6e M authentication │ │ │ │ -001984e0: 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 9f94 .

    .

    ... │ │ │ │ -001984f0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -00198500: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -00198510: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -00198520: 3c68 323e 3c61 2063 6c61 7373 3d22 616e

    .Bind before co │ │ │ │ -00198560: 6e6e 6563 7420 616e 6420 7365 7474 696e nnect and settin │ │ │ │ -00198570: 6720 7468 6520 636c 6965 6e74 2069 6e74 g the client int │ │ │ │ -00198580: 6572 6661 6365 2061 6464 7265 7373 3c2f erface address.

    To bind t │ │ │ │ -001985a0: 6865 2063 6c69 656e 7420 746f 2061 2070 he client to a p │ │ │ │ -001985b0: 6f72 7420 6265 666f 7265 2063 6f6e 6e65 ort before conne │ │ │ │ -001985c0: 6374 2c20 7365 7420 7468 6520 3c63 6f64 ct, set the soap::c │ │ │ │ -00198680: 6c69 656e 745f 706f 7274 3c2f 613e 3c2f lient_port to a non-n │ │ │ │ -001986a0: 6567 6174 6976 6520 706f 7274 206e 756d egative port num │ │ │ │ -001986b0: 6265 723a 3c2f 703e 0a3c 6469 7620 636c ber:

    .
    < │ │ │ │ -001986d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001986e0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >struct soap │ │ │ │ -00198730: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ -00198760: 703c 2f61 3e20 3d20 3c61 2063 6c61 7373 p = soa │ │ │ │ -001987c0: 705f 6e65 773c 2f61 3e28 293b 203c 2f64 p_new(); ..
    if │ │ │ │ -001988f0: 2873 6f61 705f 6361 6c6c 5f6e 735f 5f77 (soap_call_ns__w │ │ │ │ -00198900: 6562 6d65 7468 6f64 283c 6120 636c 6173 ebmethod( │ │ │ │ -00198930: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, "http │ │ │ │ -00198960: 3a2f 2f68 6f73 743a 706f 7274 2f70 6174 ://host:port/pat │ │ │ │ -00198970: 6826 7175 6f74 3b3c 2f73 7061 6e3e 2c20 h", │ │ │ │ -00198980: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -001989a0: 743b 6163 7469 6f6e 2671 756f 743b 3c2f t;action", ...)) .
    ... // error
    .
    else │ │ │ │ -00198a40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ -00198a60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00198a70: 656e 7422 3e2f 2f20 7375 6363 6573 733c ent">// success< │ │ │ │ -00198a80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .
    int client_ │ │ │ │ -00198b60: 706f 7274 3c2f 6469 763e 3c64 6976 2063 port
    Use │ │ │ │ -00198b80: 722d 6465 6669 6e61 626c 6520 636c 6965 r-definable clie │ │ │ │ -00198b90: 6e74 2070 6f72 7420 746f 2062 696e 6420 nt port to bind │ │ │ │ -00198ba0: 746f 2062 6566 6f72 6520 636f 6e6e 6563 to before connec │ │ │ │ -00198bb0: 7469 6e67 2074 6f20 6120 7365 7276 6572 ting to a server │ │ │ │ -00198bc0: 2c20 7768 656e 206e 6f6e 2d6e 6567 6174 , when non-negat │ │ │ │ -00198bd0: 6976 652e 3c2f 6469 763e 3c64 6976 2063 ive.
    │ │ │ │ -00198bf0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ -00198c00: 7374 6473 6f61 7032 2e68 3a33 3639 303c stdsoap2.h:3690< │ │ │ │ -00198c10: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    This port │ │ │ │ -00198c40: 6e75 6d62 6572 2069 7320 7573 6564 206f number is used o │ │ │ │ -00198c50: 6e6c 7920 6f6e 6365 2061 6e64 2072 6573 nly once and res │ │ │ │ -00198c60: 6574 2074 6f20 2d31 2028 6469 7361 626c et to -1 (disabl │ │ │ │ -00198c70: 6564 292e 2053 6574 2069 7420 6167 6169 ed). Set it agai │ │ │ │ -00198c80: 6e20 666f 7220 7468 6520 6e65 7874 2063 n for the next c │ │ │ │ -00198c90: 616c 6c2e 3c2f 703e 0a3c 703e 546f 2073 all.

    .

    To s │ │ │ │ -00198ca0: 6574 2061 2063 6c69 656e 7420 696e 7465 et a client inte │ │ │ │ -00198cb0: 7266 6163 6520 6164 6472 6573 7320 666f rface address fo │ │ │ │ -00198cc0: 7220 7468 6520 636f 6e6e 6563 7469 6f6e r the connection │ │ │ │ -00198cd0: 2074 6861 7420 6973 2061 6e20 4950 2061 that is an IP a │ │ │ │ -00198ce0: 6464 7265 7373 206f 6620 7468 6520 636c ddress of the cl │ │ │ │ -00198cf0: 6965 6e74 3a3c 2f70 3e0a 3c64 6976 2063 ient:

    .
    │ │ │ │ -00198d10: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -00198d40: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -00198d70: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -00198da0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so │ │ │ │ -00198e00: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
    so │ │ │ │ -00198e50: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->client_inter │ │ │ │ -00198eb0: 6661 6365 3c2f 613e 203d 203c 7370 616e face = "... │ │ │ │ -00198ee0: 2671 756f 743b 3c2f 7370 616e 3e3b 203c "; < │ │ │ │ -00198ef0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -00198f00: 656e 7422 3e2f 2f20 4950 2061 6464 7265 ent">// IP addre │ │ │ │ -00198f10: 7373 203c 2f73 7061 6e3e 3c2f 6469 763e ss
    │ │ │ │ -00198f20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if< │ │ │ │ -00198f50: 2f73 7061 6e3e 2028 736f 6170 5f63 616c /span> (soap_cal │ │ │ │ -00198f60: 6c5f 6e73 5f5f 7765 626d 6574 686f 6428 l_ns__webmethod( │ │ │ │ -00198f70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -00198fa0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -00198fc0: 6f74 3b68 7474 703a 2f2f 686f 7374 3a70 ot;http://host:p │ │ │ │ -00198fd0: 6f72 742f 7061 7468 2671 756f 743b 3c2f ort/path", "action& │ │ │ │ -00199010: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2e2e quot;, .. │ │ │ │ -00199020: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    . │ │ │ │ -00199040: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // erro │ │ │ │ -00199060: 723c 2f73 7061 6e3e 3c2f 6469 763e 0a3c r
    .< │ │ │ │ -00199070: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -00199080: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >else< │ │ │ │ -001990a0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -001990c0: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // s │ │ │ │ -001990e0: 7563 6365 7373 3c2f 7370 616e 3e3c 2f64 uccess.const char * cl │ │ │ │ -001991d0: 6965 6e74 5f69 6e74 6572 6661 6365 3c2f ient_interface
    User-defi │ │ │ │ -00199200: 6e61 626c 6520 636c 6965 6e74 2069 6e74 nable client int │ │ │ │ -00199210: 6572 6661 6365 2061 6464 7265 7373 2074 erface address t │ │ │ │ -00199220: 6f20 6f76 6572 7269 6465 2077 6865 6e20 o override when │ │ │ │ -00199230: 636f 6e6e 6563 7469 6e67 2074 6f20 6120 connecting to a │ │ │ │ -00199240: 7365 7276 6572 2c20 7768 656e 206e 6f6e server, when non │ │ │ │ -00199250: 2d4e 554c 4c20 2857 696e 646f 2e2e 2e3c -NULL (Windo...< │ │ │ │ -00199260: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ -00199280: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ -00199290: 6170 322e 683a 3336 3939 3c2f 6469 763e ap2.h:3699
    │ │ │ │ -001992a0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    This client int │ │ │ │ -001992d0: 6572 6661 6365 2061 6464 7265 7373 2073 erface address s │ │ │ │ -001992e0: 7472 696e 6720 6973 2075 7365 6420 6f6e tring is used on │ │ │ │ -001992f0: 6c79 206f 6e63 6520 616e 6420 7265 7365 ly once and rese │ │ │ │ -00199300: 7420 746f 204e 554c 4c20 2864 6973 6162 t to NULL (disab │ │ │ │ -00199310: 6c65 6429 2e20 5365 7420 6974 2061 6761 led). Set it aga │ │ │ │ -00199320: 696e 2066 6f72 2074 6865 206e 6578 7420 in for the next │ │ │ │ -00199330: 6361 6c6c 2e20 5468 6973 2066 6561 7475 call. This featu │ │ │ │ -00199340: 7265 2069 7320 6e6f 7420 6176 6169 6c61 re is not availa │ │ │ │ -00199350: 626c 6520 7768 656e 2063 6f6d 7069 6c69 ble when compili │ │ │ │ -00199360: 6e67 2074 6865 2063 6f64 6520 6f6e 2077 ng the code on w │ │ │ │ -00199370: 696e 646f 7773 2e3c 2f70 3e0a 3c70 3ef0 indows.

    .

    . │ │ │ │ -00199380: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -00199390: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -001993a0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .FastCG │ │ │ │ -001993e0: 493c 2f68 323e 0a3c 703e 546f 2065 6e61 I

    .

    To ena │ │ │ │ -001993f0: 626c 6520 4661 7374 4347 4920 7375 7070 ble FastCGI supp │ │ │ │ -00199400: 6f72 742c 2069 6e73 7461 6c6c 2046 6173 ort, install Fas │ │ │ │ -00199410: 7443 4749 2061 6e64 2063 6f6d 7069 6c65 tCGI and compile │ │ │ │ -00199420: 2061 6c6c 2073 6f61 7063 7070 322d 6765 all soapcpp2-ge │ │ │ │ -00199430: 6e65 7261 7465 6420 736f 7572 6365 2063 nerated source c │ │ │ │ -00199440: 6f64 6520 6669 6c65 7320 616e 6420 796f ode files and yo │ │ │ │ -00199450: 7572 2061 7070 6c69 6361 7469 6f6e 2073 ur application s │ │ │ │ -00199460: 6f75 7263 6573 2077 6974 6820 7468 6520 ources with the │ │ │ │ -00199470: 636f 6d70 696c 652d 7469 6d65 2066 6c61 compile-time fla │ │ │ │ -00199480: 6720 3c63 6f64 653e 2357 4954 485f 4641 g #WITH_FA │ │ │ │ -00199490: 5354 4347 493c 2f63 6f64 653e 206f 7220 STCGI or │ │ │ │ -001994a0: 6164 643a 3c2f 703e 0a3c 6469 7620 636c add:

    .
    < │ │ │ │ -001994c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001994d0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#def │ │ │ │ -001994f0: 696e 6520 5749 5448 5f46 4153 5443 4749 ine WITH_FASTCGI │ │ │ │ -00199500: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c2f
    .

    to < │ │ │ │ -00199530: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso │ │ │ │ -00199540: 6170 322e 683c 2f63 6f64 653e 3c2f 656d ap2.h and recompile │ │ │ │ -00199560: 7468 6520 7072 6f6a 6563 7420 636f 6465 the project code │ │ │ │ -00199570: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    Warning
    Do not lin │ │ │ │ -001995b0: 6b20 6167 6169 6e73 7420 7468 6520 3c65 k against the gsoap/li │ │ │ │ -001995d0: 6267 736f 6170 2a3c 2f63 6f64 653e 3c2f bgsoap* libraries as │ │ │ │ -001995f0: 2074 6865 7365 2061 7265 206e 6f74 2073 these are not s │ │ │ │ -00199600: 7569 7461 626c 6520 666f 7220 4661 7374 uitable for Fast │ │ │ │ -00199610: 4347 492e 2043 6f6d 7069 6c65 203c 656d CGI. Compile gsoap/std │ │ │ │ -00199630: 736f 6170 322e 633c 2f63 6f64 653e 3c2f soap2.c (or gsoap/stdsoap2 │ │ │ │ -00199660: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp │ │ │ │ -00199670: 2920 696e 7374 6561 642e 3c2f 6464 3e3c ) instead.
    < │ │ │ │ -00199680: 2f64 6c3e 0a3c 703e f09f 949d 203c 6120 /dl>.

    .... Back to │ │ │ │ -001996a0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ -001996b0: 7473 3c2f 613e 3c2f 703e 0a3c 6832 3e3c ts

    .

    < │ │ │ │ -001996c0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ -001996d0: 2069 643d 226c 6561 6e22 3e3c 2f61 3e0a id="lean">. │ │ │ │ -001996e0: 486f 7720 746f 206d 696e 696d 697a 6520 How to minimize │ │ │ │ -001996f0: 6170 706c 6963 6174 696f 6e20 6d65 6d6f application memo │ │ │ │ -00199700: 7279 2066 6f6f 7470 7269 6e74 3c2f 6832 ry footprint

    .

    To compile │ │ │ │ -00199720: 6753 4f41 5020 6170 706c 6963 6174 696f gSOAP applicatio │ │ │ │ -00199730: 6e73 2069 6e74 656e 6465 6420 666f 7220 ns intended for │ │ │ │ -00199740: 736d 616c 6c20 6d65 6d6f 7279 2064 6576 small memory dev │ │ │ │ -00199750: 6963 6573 2c20 796f 7520 6d61 7920 7761 ices, you may wa │ │ │ │ -00199760: 6e74 2074 6f20 7265 6d6f 7665 2061 6c6c nt to remove all │ │ │ │ -00199770: 206e 6f6e 2d65 7373 656e 7469 616c 2066 non-essential f │ │ │ │ -00199780: 6561 7475 7265 7320 7468 6174 2063 6f6e eatures that con │ │ │ │ -00199790: 7375 6d65 2070 7265 6369 6f75 7320 636f sume precious co │ │ │ │ -001997a0: 6465 2061 6e64 2064 6174 6120 7370 6163 de and data spac │ │ │ │ -001997b0: 652e 2054 6f20 646f 2074 6869 732c 2063 e. To do this, c │ │ │ │ -001997c0: 6f6d 7069 6c65 2074 6865 2073 6f75 7263 ompile the sourc │ │ │ │ -001997d0: 6520 636f 6465 2066 696c 6573 2077 6974 e code files wit │ │ │ │ -001997e0: 6820 7468 6520 636f 6d70 696c 652d 7469 h the compile-ti │ │ │ │ -001997f0: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W │ │ │ │ -00199800: 4954 485f 4c45 414e 3c2f 636f 6465 3e20 ITH_LEAN │ │ │ │ -00199810: 2869 2e65 2e20 3c63 6f64 653e 2364 6566 (i.e. #def │ │ │ │ -00199820: 696e 6520 5749 5448 5f4c 4541 4e3c 2f63 ine WITH_LEAN) to remove │ │ │ │ -00199840: 6d61 6e79 206e 6f6e 2d65 7373 656e 7469 many non-essenti │ │ │ │ -00199850: 616c 2066 6561 7475 7265 732e 2054 6865 al features. The │ │ │ │ -00199860: 2066 6561 7475 7265 7320 7468 6174 2077 features that w │ │ │ │ -00199870: 696c 6c20 6265 2064 6973 6162 6c65 6420 ill be disabled │ │ │ │ -00199880: 6172 653a 3c2f 703e 0a3c 756c 3e0a 3c6c are:

    ..

    │ │ │ │ -0019a1c0: 5573 6520 7468 6520 636f 6d70 696c 652d Use the compile- │ │ │ │ -0019a1d0: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag │ │ │ │ -0019a1e0: 2357 4954 485f 4c45 414e 4552 3c2f 636f #WITH_LEANER to make the │ │ │ │ -0019a200: 6578 6563 7574 6162 6c65 2065 7665 6e20 executable even │ │ │ │ -0019a210: 736d 616c 6c65 7220 6279 2072 656d 6f76 smaller by remov │ │ │ │ -0019a220: 696e 6720 4449 4d45 2061 6e64 204d 494d ing DIME and MIM │ │ │ │ -0019a230: 4520 6174 7461 6368 6d65 6e74 2068 616e E attachment han │ │ │ │ -0019a240: 646c 696e 672c 203c 636f 6465 3e23 4c4f dling, #LO │ │ │ │ -0019a250: 4e47 3634 3c2f 636f 6465 3e20 2836 3420 NG64 (64 │ │ │ │ -0019a260: 6269 7429 2073 6572 6961 6c69 7a61 7469 bit) serializati │ │ │ │ -0019a270: 6f6e 2c20 3c63 6f64 653e 7763 6861 725f on, wchar_ │ │ │ │ -0019a280: 742a 3c2f 636f 6465 3e20 7365 7269 616c t* serial │ │ │ │ -0019a290: 697a 6174 696f 6e2c 2061 6e64 2073 7570 ization, and sup │ │ │ │ -0019a2a0: 706f 7274 2066 6f72 2058 4d4c 2044 4f4d port for XML DOM │ │ │ │ -0019a2b0: 206f 7065 7261 7469 6f6e 732e 204e 6f74 operations. Not │ │ │ │ -0019a2c0: 6520 7468 6174 2044 494d 452f 4d49 4d45 e that DIME/MIME │ │ │ │ -0019a2d0: 2061 7474 6163 686d 656e 7473 2061 7265 attachments are │ │ │ │ -0019a2e0: 206e 6f74 2065 7373 656e 7469 616c 2074 not essential t │ │ │ │ -0019a2f0: 6f20 6163 6869 6576 6520 534f 4150 2f58 o achieve SOAP/X │ │ │ │ -0019a300: 4d4c 2069 6e74 6572 6f70 6572 6162 696c ML interoperabil │ │ │ │ -0019a310: 6974 792e 2044 494d 4520 6174 7461 6368 ity. DIME attach │ │ │ │ -0019a320: 6d65 6e74 7320 6172 6520 6120 636f 6e76 ments are a conv │ │ │ │ -0019a330: 656e 6965 6e74 2077 6179 2074 6f20 6578 enient way to ex │ │ │ │ -0019a340: 6368 616e 6765 206e 6f6e 2d74 6578 742d change non-text- │ │ │ │ -0019a350: 6261 7365 6420 2869 2e65 2e20 6269 6e61 based (i.e. bina │ │ │ │ -0019a360: 7279 2920 636f 6e74 656e 742c 2062 7574 ry) content, but │ │ │ │ -0019a370: 2061 7265 206e 6f74 2072 6571 7569 7265 are not require │ │ │ │ -0019a380: 6420 666f 7220 6261 7369 6320 534f 4150 d for basic SOAP │ │ │ │ -0019a390: 2f58 4d4c 2069 6e74 6572 6f70 6572 6162 /XML interoperab │ │ │ │ -0019a3a0: 696c 6974 792e 2041 7474 6163 686d 656e ility. Attachmen │ │ │ │ -0019a3b0: 7420 7265 7175 6972 656d 656e 7473 2061 t requirements a │ │ │ │ -0019a3c0: 7265 2070 7265 6469 6374 6162 6c65 2e20 re predictable. │ │ │ │ -0019a3d0: 5468 6174 2069 732c 2061 7070 6c69 6361 That is, applica │ │ │ │ -0019a3e0: 7469 6f6e 7320 776f 6e27 7420 7375 6464 tions won't sudd │ │ │ │ -0019a3f0: 656e 6c79 2064 6563 6964 6520 746f 2075 enly decide to u │ │ │ │ -0019a400: 7365 2044 494d 4520 6f72 204d 494d 4520 se DIME or MIME │ │ │ │ -0019a410: 696e 7374 6561 6420 6f66 2058 4d4c 2074 instead of XML t │ │ │ │ -0019a420: 6f20 6578 6368 616e 6765 2063 6f6e 7465 o exchange conte │ │ │ │ -0019a430: 6e74 2e3c 2f70 3e0a 3c70 3e49 7420 6973 nt.

    .

    It is │ │ │ │ -0019a440: 2073 6166 6520 746f 2074 7279 2074 6f20 safe to try to │ │ │ │ -0019a450: 636f 6d70 696c 6520 796f 7572 2061 7070 compile your app │ │ │ │ -0019a460: 6c69 6361 7469 6f6e 2077 6974 6820 7468 lication with th │ │ │ │ -0019a470: 6520 636f 6d70 696c 652d 7469 6d65 2066 e compile-time f │ │ │ │ -0019a480: 6c61 6720 3c63 6f64 653e 2357 4954 485f lag #WITH_ │ │ │ │ -0019a490: 4c45 414e 3c2f 636f 6465 3e2c 2070 726f LEAN, pro │ │ │ │ -0019a4a0: 7669 6465 6420 7468 6174 2079 6f75 7220 vided that your │ │ │ │ -0019a4b0: 6170 706c 6963 6174 696f 6e20 646f 6573 application does │ │ │ │ -0019a4c0: 206e 6f74 2072 656c 7920 6f6e 2049 2f4f not rely on I/O │ │ │ │ -0019a4d0: 2074 696d 656f 7574 732e 2057 6865 6e20 timeouts. When │ │ │ │ -0019a4e0: 6e6f 206c 696e 6b61 6765 2065 7272 6f72 no linkage error │ │ │ │ -0019a4f0: 206f 6363 7572 7320 696e 2074 6865 2063 occurs in the c │ │ │ │ -0019a500: 6f6d 7069 6c61 7469 6f6e 2070 726f 6365 ompilation proce │ │ │ │ -0019a510: 7373 2c20 6974 2069 7320 7361 6665 2074 ss, it is safe t │ │ │ │ -0019a520: 6f20 6173 7375 6d65 2074 6861 7420 796f o assume that yo │ │ │ │ -0019a530: 7572 2061 7070 6c69 6361 7469 6f6e 2077 ur application w │ │ │ │ -0019a540: 696c 6c20 7275 6e20 6a75 7374 2066 696e ill run just fin │ │ │ │ -0019a550: 652e 3c2f 703e 0a3c 703e f09f 949d 203c e.

    .

    .... < │ │ │ │ -0019a560: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -0019a570: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -0019a580: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    .How to remove │ │ │ │ -0019a5c0: 7468 6520 4253 4420 736f 636b 6574 206c the BSD socket l │ │ │ │ -0019a5d0: 6962 7261 7279 2072 6571 7569 7265 6d65 ibrary requireme │ │ │ │ -0019a5e0: 6e74 3c2f 6832 3e0a 3c70 3e54 6865 203c nt

    .

    The < │ │ │ │ -0019a5f0: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s │ │ │ │ -0019a600: 7464 736f 6170 322e 633c 2f63 6f64 653e tdsoap2.c │ │ │ │ -0019a610: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and gsoap/stdsoa │ │ │ │ -0019a630: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp libraries sho │ │ │ │ -0019a650: 756c 6420 6265 206c 696e 6b65 6420 7769 uld be linked wi │ │ │ │ -0019a660: 7468 2061 2042 5344 2073 6f63 6b65 7420 th a BSD socket │ │ │ │ -0019a670: 6c69 6272 6172 7920 696e 2074 6865 2070 library in the p │ │ │ │ -0019a680: 726f 6a65 6374 2062 7569 6c64 2e20 546f roject build. To │ │ │ │ -0019a690: 2072 656d 6f76 6520 7468 6520 6e65 6564 remove the need │ │ │ │ -0019a6a0: 2074 6f20 6c69 6e6b 2061 2073 6f63 6b65 to link a socke │ │ │ │ -0019a6b0: 7420 6c69 6272 6172 792c 2079 6f75 2063 t library, you c │ │ │ │ -0019a6c0: 616e 2063 6f6d 7069 6c65 203c 656d 3e3c an compile < │ │ │ │ -0019a6d0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso │ │ │ │ -0019a6e0: 6170 322e 633c 2f63 6f64 653e 3c2f 656d ap2.c (for C) and gsoap/st │ │ │ │ -0019a710: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp (for C++) │ │ │ │ -0019a730: 2077 6974 6820 7468 6520 7468 6520 636f with the the co │ │ │ │ -0019a740: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag │ │ │ │ -0019a750: 3c63 6f64 653e 2357 4954 485f 4e4f 494f #WITH_NOIO │ │ │ │ -0019a760: 3c2f 636f 6465 3e20 6d61 6372 6f20 7365 macro se │ │ │ │ -0019a770: 7420 2869 2e65 2e20 3c63 6f64 653e 2364 t (i.e. #d │ │ │ │ -0019a780: 6566 696e 6520 5749 5448 5f4e 4f49 4f3c efine WITH_NOIO< │ │ │ │ -0019a790: 2f63 6f64 653e 292e 2054 6869 7320 7265 /code>). This re │ │ │ │ -0019a7a0: 6d6f 7665 7320 7468 6520 6465 7065 6e64 moves the depend │ │ │ │ -0019a7b0: 656e 6379 206f 6e20 7468 6520 4253 4420 ency on the BSD │ │ │ │ -0019a7c0: 736f 636b 6574 2041 5049 2c20 494f 2073 socket API, IO s │ │ │ │ -0019a7d0: 7472 6561 6d73 2c20 3c63 6f64 653e 4649 treams, FI │ │ │ │ -0019a7e0: 4c45 3c2f 636f 6465 3e20 7479 7065 2c20 LE type, │ │ │ │ -0019a7f0: 616e 6420 3c63 6f64 653e 6572 726e 6f3c and errno< │ │ │ │ -0019a800: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3e59 /code>.

    .

    Y │ │ │ │ -0019a810: 6f75 2073 686f 756c 6420 6465 6669 6e65 ou should define │ │ │ │ -0019a820: 2063 616c 6c62 6163 6b73 2074 6f20 7265 callbacks to re │ │ │ │ -0019a830: 706c 6163 6520 7468 6520 6d69 7373 696e place the missin │ │ │ │ -0019a840: 6720 736f 636b 6574 2073 7461 636b 2e20 g socket stack. │ │ │ │ -0019a850: 546f 2064 6f20 736f 2c20 6164 6420 746f To do so, add to │ │ │ │ -0019a860: 2079 6f75 7220 636f 6465 2074 6865 2066 your code the f │ │ │ │ -0019a870: 6f6c 6c6f 7769 6e67 2064 6566 696e 6974 ollowing definit │ │ │ │ -0019a880: 696f 6e73 3a3c 2f70 3e0a 3c64 6976 2063 ions:

    .
    │ │ │ │ -0019a8a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ -0019a950: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_init(&s │ │ │ │ -0019a9e0: 6f61 703c 2f61 3e29 3b20 3c2f 6469 763e oap);
    │ │ │ │ -0019a9f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* fsen │ │ │ │ -0019aa20: 6420 6973 2075 7365 6420 746f 2074 7261 d is used to tra │ │ │ │ -0019aa30: 6e73 6d69 7420 6461 7461 2069 6e20 626c nsmit data in bl │ │ │ │ -0019aa40: 6f63 6b73 202a 2f3c 2f73 7061 6e3e 203c ocks */ < │ │ │ │ -0019aa50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    /* frecv is u │ │ │ │ -0019ab40: 7365 6420 746f 2072 6563 6569 7665 2064 sed to receive d │ │ │ │ -0019ab50: 6174 6120 696e 2062 6c6f 636b 7320 2a2f ata in blocks */ │ │ │ │ -0019ab60: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0019ab70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0019ab80: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ -0019abb0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .frecv = my_recv; .
    /* f │ │ │ │ -0019ac50: 6f70 656e 2069 7320 7573 6564 2074 6f20 open is used to │ │ │ │ -0019ac60: 636f 6e6e 6563 7420 2a2f 3c2f 7370 616e connect */
    .
    soap.fopen = my │ │ │ │ -0019ad20: 5f74 6370 5f63 6f6e 6e65 6374 3b20 3c2f _tcp_connect; .
    /* │ │ │ │ -0019ad60: 6663 6c6f 7365 2069 7320 7573 6564 2074 fclose is used t │ │ │ │ -0019ad70: 6f20 6469 7363 6f6e 6e65 6374 202a 2f3c o disconnect */< │ │ │ │ -0019ad80: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -0019ada0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap. │ │ │ │ -0019add0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 fclose = my_tcp_disco │ │ │ │ -0019ae40: 6e6e 6563 743b 203c 2f64 6976 3e0a 3c64 nnect;
    . │ │ │ │ -0019ae60: 3c73 7061 6e20 636c 6173 733d 2263 6f6d /* fcloses │ │ │ │ -0019ae80: 6f63 6b65 7420 6973 2075 7365 6420 6f6e ocket is used on │ │ │ │ -0019ae90: 6c79 2074 6f20 636c 6f73 6520 7468 6520 ly to close the │ │ │ │ -0019aea0: 6d61 7374 6572 2073 6f63 6b65 7420 696e master socket in │ │ │ │ -0019aeb0: 2061 2073 6572 7665 7220 7570 6f6e 2073 a server upon s │ │ │ │ -0019aec0: 6f61 705f 646f 6e65 2829 202a 2f3c 2f73 oap_done() */
    .
    soap.fclosesocke │ │ │ │ -0019af80: 743c 2f61 3e20 3d20 6d79 5f74 6370 5f63 t = my_tcp_c │ │ │ │ -0019af90: 6c6f 7365 736f 636b 6574 3b20 3c2f 6469 losesocket; .
    /* fs │ │ │ │ -0019afd0: 6875 7464 6f77 6e73 6f63 6b65 7420 6973 hutdownsocket is │ │ │ │ -0019afe0: 2075 7365 6420 6166 7465 7220 636f 6d70 used after comp │ │ │ │ -0019aff0: 6c65 7469 6e67 2061 2073 656e 6420 6f70 leting a send op │ │ │ │ -0019b000: 6572 6174 696f 6e20 746f 2073 656e 6420 eration to send │ │ │ │ -0019b010: 5443 5020 4649 4e20 2a2f 3c2f 7370 616e TCP FIN */
    .
    soap.fshutdownsocke │ │ │ │ -0019b0d0: 743c 2f61 3e20 3d20 6d79 5f74 6370 5f73 t = my_tcp_s │ │ │ │ -0019b0e0: 6875 7464 6f77 6e73 6f63 6b65 743b 203c hutdownsocket; < │ │ │ │ -0019b0f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    /* │ │ │ │ -0019b120: 2073 6574 7469 6e67 2066 706f 6c6c 2069 setting fpoll i │ │ │ │ -0019b130: 7320 6f70 7469 6f6e 616c 2c20 6c65 6176 s optional, leav │ │ │ │ -0019b140: 6520 6974 204e 554c 4c20 746f 206f 6d69 e it NULL to omi │ │ │ │ -0019b150: 7420 706f 6c6c 696e 6720 7468 6520 7365 t polling the se │ │ │ │ -0019b160: 7276 6572 202a 2f3c 2f73 7061 6e3e 203c rver */ < │ │ │ │ -0019b170: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    /* faccept is │ │ │ │ -0019b260: 2075 7365 6420 6f6e 6c79 2062 7920 6120 used only by a │ │ │ │ -0019b270: 7365 7276 6572 2061 7070 6c69 6361 7469 server applicati │ │ │ │ -0019b280: 6f6e 202a 2f3c 2f73 7061 6e3e 203c 2f64 on */ ..
    soap::fpoll │ │ │ │ -0019b410: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int(* │ │ │ │ -0019b430: 6670 6f6c 6c29 2873 7472 7563 7420 736f fpoll)(struct so │ │ │ │ -0019b440: 6170 202a 736f 6170 293c 2f64 6976 3e3c ap *soap)
    < │ │ │ │ -0019b450: 6469 7620 636c 6173 733d 2274 7464 6f63 div class="ttdoc │ │ │ │ -0019b460: 223e 4361 6c6c 6261 636b 2074 6861 7420 ">Callback that │ │ │ │ -0019b470: 626c 6f63 6b73 2075 6e74 696c 2061 6374 blocks until act │ │ │ │ -0019b480: 6976 6974 7920 6973 2064 6574 6563 7465 ivity is detecte │ │ │ │ -0019b490: 6420 6f6e 2074 6865 2073 6f61 703a 3a73 d on the soap::s │ │ │ │ -0019b4a0: 6f63 6b65 7420 6f72 2073 6f61 703a 3a6d ocket or soap::m │ │ │ │ -0019b4b0: 6173 7465 7220 736f 636b 6574 2c2e 2e2e aster socket,... │ │ │ │ -0019b4c0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ -0019b4e0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ -0019b4f0: 6f61 7032 2e68 3a34 3539 343c 2f64 6976 oap2.h:4594
    .
    < │ │ │ │ -0019b560: 6469 7620 636c 6173 733d 2274 746e 616d div class="ttnam │ │ │ │ -0019b570: 6522 3e3c 6120 6872 6566 3d22 6772 6f75 e">soa │ │ │ │ -0019b5c0: 703a 3a66 636c 6f73 6573 6f63 6b65 743c p::fclosesocket< │ │ │ │ -0019b5d0: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    .
    int(* fshutdow │ │ │ │ -0019b7a0: 6e73 6f63 6b65 7429 2873 7472 7563 7420 nsocket)(struct │ │ │ │ -0019b7b0: 736f 6170 202a 736f 6170 2c20 534f 4150 soap *soap, SOAP │ │ │ │ -0019b7c0: 5f53 4f43 4b45 5420 736f 636b 2c20 696e _SOCKET sock, in │ │ │ │ -0019b7d0: 7420 686f 7729 3c2f 6469 763e 3c64 6976 t how)
    C │ │ │ │ -0019b7f0: 616c 6c62 6163 6b20 7468 6174 2073 6875 allback that shu │ │ │ │ -0019b800: 7473 2064 6f77 6e20 6120 6769 7665 6e20 ts down a given │ │ │ │ -0019b810: 736f 636b 6574 2e3c 2f64 6976 3e3c 6469 socket.
    │ │ │ │ -0019b830: 3c62 3e44 6566 696e 6974 696f 6e3a 3c2f Definition: stdsoap2.h:45 │ │ │ │ -0019b850: 3833 3c2f 6469 763e 3c2f 6469 763e 0a3c 83
    .< │ │ │ │ -0019b860: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -0019b870: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ -0019b880: 705f 5f63 616c 6c62 6163 6b73 5f68 746d p__callbacks_htm │ │ │ │ -0019b890: 6c5f 6761 3832 3439 6234 6332 3366 3636 l_ga8249b4c23f66 │ │ │ │ -0019b8a0: 3264 6265 3638 3061 6430 6465 6566 3237 2dbe680ad0deef27 │ │ │ │ -0019b8b0: 3461 6538 223e 3c64 6976 2063 6c61 7373 4ae8">
    S │ │ │ │ -0019b940: 4f41 505f 534f 434b 4554 282a 2066 6163 OAP_SOCKET(* fac │ │ │ │ -0019b950: 6365 7074 2928 7374 7275 6374 2073 6f61 cept)(struct soa │ │ │ │ -0019b960: 7020 2a73 6f61 702c 2053 4f41 505f 534f p *soap, SOAP_SO │ │ │ │ -0019b970: 434b 4554 2073 6f63 6b2c 2073 7472 7563 CKET sock, struc │ │ │ │ -0019b980: 7420 736f 636b 6164 6472 202a 6164 6472 t sockaddr *addr │ │ │ │ -0019b990: 2c20 696e 7420 2a6c 656e 293c 2f64 6976 , int *len)
    Callback tha │ │ │ │ -0019b9c0: 7420 7761 6974 7320 666f 7220 616e 6420 t waits for and │ │ │ │ -0019b9d0: 6163 6365 7074 7320 6120 736f 636b 6574 accepts a socket │ │ │ │ -0019b9e0: 2063 6f6e 6e65 6374 696f 6e20 7265 7175 connection requ │ │ │ │ -0019b9f0: 6573 7465 6420 6279 2061 2063 6c69 656e ested by a clien │ │ │ │ -0019ba00: 742e 3c2f 6469 763e 3c64 6976 2063 6c61 t.
    De │ │ │ │ -0019ba20: 6669 6e69 7469 6f6e 3a3c 2f62 3e20 7374 finition: st │ │ │ │ -0019ba30: 6473 6f61 7032 2e68 3a34 3530 393c 2f64 dsoap2.h:4509
    .
    │ │ │ │ -0019ba50: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d < │ │ │ │ -0019cbd0: 703e 5768 656e 2063 6f6d 7069 6c69 6e67 p>When compiling │ │ │ │ -0019cbe0: 2074 6869 7320 696e 7465 7266 6163 6520 this interface │ │ │ │ -0019cbf0: 6865 6164 6572 2066 696c 6520 7769 7468 header file with │ │ │ │ -0019cc00: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to │ │ │ │ -0019cc10: 6f6c 2c20 616c 6c20 7479 7065 2064 6566 ol, all type def │ │ │ │ -0019cc20: 696e 6974 696f 6e73 2c20 7468 6520 7365 initions, the se │ │ │ │ -0019cc30: 7269 616c 697a 6572 7320 666f 7220 7468 rializers for th │ │ │ │ -0019cc40: 6573 6520 7479 7065 732c 2061 6e64 2074 ese types, and t │ │ │ │ -0019cc50: 6865 2073 7475 6220 616e 6420 736b 656c he stub and skel │ │ │ │ -0019cc60: 6574 6f6e 2066 756e 6374 696f 6e73 2077 eton functions w │ │ │ │ -0019cc70: 696c 6c20 6265 2070 6c61 6365 6420 696e ill be placed in │ │ │ │ -0019cc80: 2074 6869 7320 6e61 6d65 7370 6163 652e this namespace. │ │ │ │ -0019cc90: 2054 6865 2058 4d4c 206e 616d 6573 7061 The XML namespa │ │ │ │ -0019cca0: 6365 206d 6170 7069 6e67 2074 6162 6c65 ce mapping table │ │ │ │ -0019ccb0: 2028 7361 7665 6420 696e 2061 203c 656d (saved in a .nsmap file) │ │ │ │ -0019cce0: 7769 6c6c 206e 6f74 2062 6520 706c 6163 will not be plac │ │ │ │ -0019ccf0: 6564 2069 6e20 7468 6520 636f 6465 206e ed in the code n │ │ │ │ -0019cd00: 616d 6573 7061 6365 2074 6f20 616c 6c6f amespace to allo │ │ │ │ -0019cd10: 7720 6974 2074 6f20 6265 206c 696e 6b65 w it to be linke │ │ │ │ -0019cd20: 6420 6173 2061 2067 6c6f 6261 6c20 6f62 d as a global ob │ │ │ │ -0019cd30: 6a65 6374 2e20 596f 7520 6361 6e20 7573 ject. You can us │ │ │ │ -0019cd40: 6520 3c62 3e3c 636f 6465 3e73 6f61 7063 e soapc │ │ │ │ -0019cd50: 7070 3220 2d6e 3c2f 636f 6465 3e3c 2f62 pp2 -n option -n │ │ │ │ -0019cd80: 746f 2063 7265 6174 6520 6c6f 6361 6c20 to create local │ │ │ │ -0019cd90: 584d 4c20 6e61 6d65 7370 6163 6520 7461 XML namespace ta │ │ │ │ -0019cda0: 626c 6573 2c20 7365 6520 5365 6374 696f bles, see Sectio │ │ │ │ -0019cdb0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n soapcpp2 optio │ │ │ │ -0019cdf0: 6e73 3c2f 613e 2028 6275 7420 7265 6d65 ns (but reme │ │ │ │ -0019ce00: 6d62 6572 2074 6861 7420 796f 7520 6578 mber that you ex │ │ │ │ -0019ce10: 706c 6963 6974 6c79 206e 6565 6420 746f plicitly need to │ │ │ │ -0019ce20: 2069 6e69 7469 616c 697a 6520 7468 6520 initialize the │ │ │ │ -0019ce30: 6e61 6d65 7370 6163 6573 2074 6f20 706f namespaces to po │ │ │ │ -0019ce40: 696e 7420 746f 2061 2074 6162 6c65 2061 int to a table a │ │ │ │ -0019ce50: 7420 7275 6e20 7469 6d65 2075 7369 6e67 t run time using │ │ │ │ -0019ce60: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set_ │ │ │ │ -0019cf30: 6e61 6d65 7370 6163 6573 3c2f 613e 3c2f namespaces). The gene │ │ │ │ -0019cf50: 7261 7465 6420 6669 6c65 7320 6172 6520 rated files are │ │ │ │ -0019cf60: 7072 6566 6978 6564 2077 6974 6820 7468 prefixed with th │ │ │ │ -0019cf70: 6520 636f 6465 206e 616d 6573 7061 6365 e code namespace │ │ │ │ -0019cf80: 206e 616d 6520 696e 7374 6561 6420 6f66 name instead of │ │ │ │ -0019cf90: 2074 6865 2075 7375 616c 203c 656d 3e3c the usual < │ │ │ │ -0019cfa0: 636f 6465 3e73 6f61 703c 2f63 6f64 653e code>soap │ │ │ │ -0019cfb0: 3c2f 656d 3e20 6669 6c65 206e 616d 6520 file name │ │ │ │ -0019cfc0: 7072 6566 6978 2074 6f20 656e 6162 6c65 prefix to enable │ │ │ │ -0019cfd0: 206d 756c 7469 706c 6520 636c 6965 6e74 multiple client │ │ │ │ -0019cfe0: 2f73 6572 7665 7220 636f 6465 7320 746f /server codes to │ │ │ │ -0019cff0: 2062 6520 6275 696c 6420 696e 2074 6865 be build in the │ │ │ │ -0019d000: 2073 616d 6520 7072 6f6a 6563 7420 6469 same project di │ │ │ │ -0019d010: 7265 6374 6f72 792e 3c2f 703e 0a3c 703e rectory.

    .

    │ │ │ │ -0019d020: 4265 6361 7573 6520 7468 6520 534f 4150 Because the SOAP │ │ │ │ -0019d030: 2048 6561 6465 7220 616e 6420 4661 756c Header and Faul │ │ │ │ -0019d040: 7420 7365 7269 616c 697a 6572 7320 7769 t serializers wi │ │ │ │ -0019d050: 6c6c 2061 6c73 6f20 6265 2070 6c61 6365 ll also be place │ │ │ │ -0019d060: 6420 696e 2074 6865 206e 616d 6573 7061 d in the namespa │ │ │ │ -0019d070: 6365 2c20 7468 6579 2063 616e 6e6f 7420 ce, they cannot │ │ │ │ -0019d080: 6265 2063 616c 6c65 6420 6672 6f6d 2074 be called from t │ │ │ │ -0019d090: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso │ │ │ │ -0019d0a0: 6170 2f73 7464 736f 6170 322e 6370 703c ap/stdsoap2.cpp< │ │ │ │ -0019d0b0: 2f63 6f64 653e 3c2f 656d 3e20 7275 6e20 /code> run │ │ │ │ -0019d0c0: 7469 6d65 206c 6962 7261 7279 2063 6f64 time library cod │ │ │ │ -0019d0d0: 6520 616e 6420 6172 6520 7468 6572 6566 e and are theref │ │ │ │ -0019d0e0: 6f72 6520 7265 6e64 6572 6564 2075 6e75 ore rendered unu │ │ │ │ -0019d0f0: 7361 626c 652e 2054 6865 7265 666f 7265 sable. Therefore │ │ │ │ -0019d100: 2c20 7468 6573 6520 7365 7269 616c 697a , these serializ │ │ │ │ -0019d110: 6572 7320 6172 6520 6e6f 7420 636f 6d70 ers are not comp │ │ │ │ -0019d120: 696c 6564 2061 7420 616c 6c20 2865 6e66 iled at all (enf │ │ │ │ -0019d130: 6f72 6365 6420 7769 7468 203c 636f 6465 orced with #define WITH_NO │ │ │ │ -0019d150: 474c 4f42 414c 3c2f 636f 6465 3e29 2e20 GLOBAL). │ │ │ │ -0019d160: 546f 2061 6464 2053 4f41 5020 4865 6164 To add SOAP Head │ │ │ │ -0019d170: 6572 2061 6e64 2046 6175 6c74 2073 6572 er and Fault ser │ │ │ │ -0019d180: 6961 6c69 7a65 7273 2c20 796f 7520 6d75 ializers, you mu │ │ │ │ -0019d190: 7374 2063 6f6d 7069 6c65 2074 6865 6d20 st compile them │ │ │ │ -0019d1a0: 7365 7061 7261 7465 6c79 2061 7320 666f separately as fo │ │ │ │ -0019d1b0: 6c6c 6f77 732e 2046 6972 7374 2c20 6372 llows. First, cr │ │ │ │ -0019d1c0: 6561 7465 2061 206e 6577 2068 6561 6465 eate a new heade │ │ │ │ -0019d1d0: 7220 6669 6c65 203c 656d 3e3c 636f 6465 r file env.h with the SOAP │ │ │ │ -0019d200: 2048 6561 6465 7220 3c63 6f64 653e 3c61 Header SOAP_EN │ │ │ │ -0019d270: 565f 5f48 6561 6465 723c 2f61 3e3c 2f63 V__Header and SOAP Fa │ │ │ │ -0019d290: 756c 7420 3c63 6f64 653e 3c61 2063 6c61 ult SOAP_ENV__Fau │ │ │ │ -0019d300: 6c74 3c2f 613e 3c2f 636f 6465 3e20 7374 lt st │ │ │ │ -0019d310: 7275 6374 7572 6573 2c20 696e 636c 7564 ructures, includ │ │ │ │ -0019d320: 696e 6720 3c63 6f64 653e 3c61 2063 6c61 ing SOAP_ │ │ │ │ -0019d390: 454e 565f 5f44 6574 6169 6c3c 2f61 3e3c ENV__Detail< │ │ │ │ -0019d3a0: 2f63 6f64 653e 2069 6620 7468 6973 2073 /code> if this s │ │ │ │ -0019d3b0: 7472 7563 7475 7265 2063 6f6e 7461 696e tructure contain │ │ │ │ -0019d3c0: 7320 6d65 6d62 6572 7320 7468 6174 2061 s members that a │ │ │ │ -0019d3d0: 7265 2073 6572 6961 6c69 7a65 6420 6173 re serialized as │ │ │ │ -0019d3e0: 2066 6175 6c74 2064 6574 6169 6c73 2e20 fault details. │ │ │ │ -0019d3f0: 596f 7520 6361 6e20 6c65 6176 6520 7468 You can leave th │ │ │ │ -0019d400: 6973 2068 6561 6465 7220 6669 6c65 2065 is header file e │ │ │ │ -0019d410: 6d70 7479 2069 6620 796f 7520 7761 6e74 mpty if you want │ │ │ │ -0019d420: 2074 6f20 7573 6520 7468 6520 6465 6661 to use the defa │ │ │ │ -0019d430: 756c 7420 534f 4150 2048 6561 6465 7220 ult SOAP Header │ │ │ │ -0019d440: 616e 6420 4661 756c 742e 2048 6f77 6576 and Fault. Howev │ │ │ │ -0019d450: 6572 2c20 6966 2053 4f41 5020 4865 6164 er, if SOAP Head │ │ │ │ -0019d460: 6572 7320 6172 6520 7265 7175 6972 6564 ers are required │ │ │ │ -0019d470: 2074 6865 6e20 796f 7520 6361 6e6e 6f74 then you cannot │ │ │ │ -0019d480: 206c 6561 7665 2074 6865 203c 636f 6465 leave the SOAP │ │ │ │ -0019d4f0: 5f45 4e56 5f5f 4865 6164 6572 3c2f 613e _ENV__Header │ │ │ │ -0019d500: 3c2f 636f 6465 3e20 7374 7275 6374 7572 structur │ │ │ │ -0019d510: 6520 656d 7074 792e 2046 6f72 2065 7861 e empty. For exa │ │ │ │ -0019d520: 6d70 6c65 2c20 7468 6520 5753 2d41 6464 mple, the WS-Add │ │ │ │ -0019d530: 7265 7373 696e 6720 616e 6420 5753 2d53 ressing and WS-S │ │ │ │ -0019d540: 6563 7572 6974 7920 706c 7567 696e 7320 ecurity plugins │ │ │ │ -0019d550: 7265 7175 6972 6520 534f 4150 2048 6561 require SOAP Hea │ │ │ │ -0019d560: 6465 7273 2077 6869 6368 2063 616e 2062 ders which can b │ │ │ │ -0019d570: 6520 696d 706f 7274 6564 2062 7920 6164 e imported by ad │ │ │ │ -0019d580: 6469 6e67 203c 636f 6465 3e23 696d 706f ding #impo │ │ │ │ -0019d590: 7274 2022 7773 6135 2e68 223c 2f63 6f64 rt "wsa5.h" and #im │ │ │ │ -0019d5b0: 706f 7274 2022 7773 7365 2e68 223c 2f63 port "wsse.h", respective │ │ │ │ -0019d5d0: 6c79 2074 6f20 3c65 6d3e 3c63 6f64 653e ly to │ │ │ │ -0019d5e0: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h. Then compile │ │ │ │ -0019d600: 7468 6973 2068 6561 6465 7220 6669 6c65 this header file │ │ │ │ -0019d610: 2077 6974 683a 203c 2f70 3e3c 7072 6520 with:

     soapcpp2 -penv
    │ │ │ │ -0019d640: 2065 6e76 2e68 0a3c 2f70 7265 3e3c 703e   env.h.

    │ │ │ │ -0019d650: 2054 6865 2067 656e 6572 6174 6564 203c The generated < │ │ │ │ -0019d660: 656d 3e3c 636f 6465 3e65 6e76 432e 6370 em>envC.cp │ │ │ │ -0019d670: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi │ │ │ │ -0019d680: 6c65 2068 6f6c 6473 2074 6865 2053 4f41 le holds the SOA │ │ │ │ -0019d690: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau │ │ │ │ -0019d6a0: 6c74 2073 6572 6961 6c69 7a65 7273 2061 lt serializers a │ │ │ │ -0019d6b0: 6e64 2079 6f75 2063 616e 206c 696e 6b20 nd you can link │ │ │ │ -0019d6c0: 7468 6973 2066 696c 6520 7769 7468 2079 this file with y │ │ │ │ -0019d6d0: 6f75 7220 636c 6965 6e74 2061 6e64 2073 our client and s │ │ │ │ -0019d6e0: 6572 7665 7220 6170 706c 6963 6174 696f erver applicatio │ │ │ │ -0019d6f0: 6e73 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 ns.

    .

    .... │ │ │ │ -0019d700: 3c61 2068 7265 663d 2223 223e 4261 636b Back │ │ │ │ -0019d710: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con │ │ │ │ -0019d720: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    . │ │ │ │ -0019d750: 3c2f 613e 0a48 6f77 2074 6f20 6372 6561 .How to crea │ │ │ │ -0019d760: 7465 2063 6c69 656e 742f 7365 7276 6572 te client/server │ │ │ │ -0019d770: 206c 6962 7261 7269 6573 3c2f 6832 3e0a libraries

    . │ │ │ │ -0019d780: 3c70 3e54 6865 2073 6f61 7063 7070 3220

    The soapcpp2 │ │ │ │ -0019d790: 746f 6f6c 2070 726f 6475 6365 7320 3c65 tool produces soapClie │ │ │ │ -0019d7b0: 6e74 4c69 622e 6370 703c 2f63 6f64 653e ntLib.cpp │ │ │ │ -0019d7c0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and soapServerLi │ │ │ │ -0019d7e0: 622e 6370 703c 2f63 6f64 653e 3c2f 656d b.cpp source code fi │ │ │ │ -0019d800: 6c65 7320 7468 6174 2061 7265 2073 7065 les that are spe │ │ │ │ -0019d810: 6369 6669 6361 6c6c 7920 696e 7465 6e64 cifically intend │ │ │ │ -0019d820: 6564 2066 6f72 2062 7569 6c64 696e 6720 ed for building │ │ │ │ -0019d830: 7374 6174 6963 206f 7220 6479 6e61 6d69 static or dynami │ │ │ │ -0019d840: 6320 636c 6965 6e74 2061 6e64 2073 6572 c client and ser │ │ │ │ -0019d850: 7665 7220 6c69 6272 6172 6965 7320 696e ver libraries in │ │ │ │ -0019d860: 2043 206f 7220 432b 2b2e 2054 6865 7365 C or C++. These │ │ │ │ -0019d870: 2066 696c 6573 2065 7870 6f72 7420 7468 files export th │ │ │ │ -0019d880: 6520 7374 7562 2061 6e64 2073 6b65 6c65 e stub and skele │ │ │ │ -0019d890: 746f 6e20 6675 6e63 7469 6f6e 732c 2062 ton functions, b │ │ │ │ -0019d8a0: 7574 206b 6565 7020 616c 6c20 7365 7269 ut keep all seri │ │ │ │ -0019d8b0: 616c 697a 6174 696f 6e20 636f 6465 2073 alization code s │ │ │ │ -0019d8c0: 7461 7469 632c 2074 6875 7320 6869 6464 tatic, thus hidd │ │ │ │ -0019d8d0: 656e 2074 6f20 6176 6f69 6420 6c69 6e6b en to avoid link │ │ │ │ -0019d8e0: 2073 796d 626f 6c20 636f 6e66 6c69 6374 symbol conflict │ │ │ │ -0019d8f0: 7320 7768 656e 2063 6f6d 6269 6e69 6e67 s when combining │ │ │ │ -0019d900: 206d 756c 7469 706c 6520 636c 6965 6e74 multiple client │ │ │ │ -0019d910: 7320 616e 6420 7365 7276 6963 6573 2069 s and services i │ │ │ │ -0019d920: 6e74 6f20 6f6e 6520 6578 6563 7574 6162 nto one executab │ │ │ │ -0019d930: 6c65 2e20 4e6f 7465 2074 6861 7420 6974 le. Note that it │ │ │ │ -0019d940: 2069 7320 6661 7220 7369 6d70 6c65 7220 is far simpler │ │ │ │ -0019d950: 746f 2075 7365 2074 6865 2077 7364 6c32 to use the wsdl2 │ │ │ │ -0019d960: 6820 746f 6f6c 206f 6e20 6d75 6c74 6970 h tool on multip │ │ │ │ -0019d970: 6c65 2057 5344 4c20 6669 6c65 7320 746f le WSDL files to │ │ │ │ -0019d980: 2067 656e 6572 6174 6520 6120 6865 6164 generate a head │ │ │ │ -0019d990: 6572 2066 696c 6520 7468 6174 2063 6f6d er file that com │ │ │ │ -0019d9a0: 6269 6e65 7320 616c 6c20 7365 7276 6963 bines all servic │ │ │ │ -0019d9b0: 6520 6465 6669 6e69 7469 6f6e 732e 2048 e definitions. H │ │ │ │ -0019d9c0: 6f77 6576 6572 2c20 7468 6520 6170 7072 owever, the appr │ │ │ │ -0019d9d0: 6f61 6368 2070 7265 7365 6e74 6564 2069 oach presented i │ │ │ │ -0019d9e0: 6e20 7468 6973 2073 6563 7469 6f6e 2069 n this section i │ │ │ │ -0019d9f0: 7320 7573 6566 756c 2077 6865 6e20 6372 s useful when cr │ │ │ │ -0019da00: 6561 7469 6e67 2028 6479 6e61 6d69 6329 eating (dynamic) │ │ │ │ -0019da10: 206c 6962 7261 7269 6573 2066 6f72 2063 libraries for c │ │ │ │ -0019da20: 6c69 656e 7420 616e 6420 7365 7276 6572 lient and server │ │ │ │ -0019da30: 206f 626a 6563 7473 2c20 7375 6368 2061 objects, such a │ │ │ │ -0019da40: 7320 444c 4c73 2061 7320 6465 7363 7269 s DLLs as descri │ │ │ │ -0019da50: 6265 6420 696e 2053 6563 7469 6f6e 203c bed in Section < │ │ │ │ -0019da60: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -0019da70: 663d 2269 6e64 6578 2e68 746d 6c23 646c f="index.html#dl │ │ │ │ -0019da80: 6c22 3e48 6f77 2074 6f20 6372 6561 7465 l">How to create │ │ │ │ -0019da90: 2044 4c4c 733c 2f61 3e20 2e3c 2f70 3e0a DLLs .

    . │ │ │ │ -0019daa0: 3c64 6c20 636c 6173 733d 2273 6563 7469
    Not │ │ │ │ -0019dac0: 653c 2f64 743e 3c64 643e 4f6e 6520 6d61 e
    One ma │ │ │ │ -0019dad0: 6a6f 7220 6469 7361 6476 616e 7461 6765 jor disadvantage │ │ │ │ -0019dae0: 206f 6620 7468 6520 6170 7072 6f61 6368 of the approach │ │ │ │ -0019daf0: 2070 7265 7365 6e74 6564 2068 6572 6520 presented here │ │ │ │ -0019db00: 6973 2074 6861 7420 7468 6520 7365 7269 is that the seri │ │ │ │ -0019db10: 616c 697a 6572 2066 756e 6374 696f 6e73 alizer functions │ │ │ │ -0019db20: 2061 7265 206e 6f20 6c6f 6e67 6572 2061 are no longer a │ │ │ │ -0019db30: 6363 6573 7369 626c 6520 696e 2074 6865 ccessible in the │ │ │ │ -0019db40: 2075 7365 7227 7320 736f 7572 6365 2063 user's source c │ │ │ │ -0019db50: 6f64 652c 2062 6563 6175 7365 2073 6572 ode, because ser │ │ │ │ -0019db60: 6961 6c69 7a65 7273 2077 696c 6c20 6265 ializers will be │ │ │ │ -0019db70: 2063 6f6e 7665 7274 6564 2074 6f20 7374 converted to st │ │ │ │ -0019db80: 6174 6963 2066 756e 6374 696f 6e73 2028 atic functions ( │ │ │ │ -0019db90: 746f 2062 6520 7573 6564 2062 7920 7468 to be used by th │ │ │ │ -0019dba0: 6520 6765 6e65 7261 7465 6420 7374 7562 e generated stub │ │ │ │ -0019dbb0: 2061 6e64 2073 6b65 6c65 746f 6e20 6675 and skeleton fu │ │ │ │ -0019dbc0: 6e63 7469 6f6e 7320 6f6e 6c79 292e 2046 nctions only). F │ │ │ │ -0019dbd0: 6f72 2065 7861 6d70 6c65 2c20 6675 6e63 or example, func │ │ │ │ -0019dbe0: 7469 6f6e 7320 7375 6368 2061 7320 3c63 tions such as soap_new_T, soa │ │ │ │ -0019dc10: 705f 6465 6661 756c 745f 543c 2f63 6f64 p_default_T, soap_w │ │ │ │ -0019dc30: 7269 7465 5f54 3c2f 636f 6465 3e2c 203c rite_T, < │ │ │ │ -0019dc40: 636f 6465 3e73 6f61 705f 7265 6164 5f54 code>soap_read_T │ │ │ │ -0019dc50: 3c2f 636f 6465 3e2c 203c 636f 6465 3e73 , s │ │ │ │ -0019dc60: 6f61 705f 7075 745f 543c 2f63 6f64 653e oap_put_T │ │ │ │ -0019dc70: 2c20 616e 6420 3c63 6f64 653e 736f 6170 , and soap │ │ │ │ -0019dc80: 5f67 6574 5f54 3c2f 636f 6465 3e20 6361 _get_T ca │ │ │ │ -0019dc90: 6e6e 6f74 2062 6520 7573 6564 2061 6e79 nnot be used any │ │ │ │ -0019dca0: 206c 6f6e 6765 722e 3c2f 6464 3e3c 2f64 longer.
    .

    Using C++ │ │ │ │ -0019dcc0: 6e61 6d65 7370 6163 6573 2069 7320 6120 namespaces is a │ │ │ │ -0019dcd0: 6265 7474 6572 2061 6c74 6572 6e61 7469 better alternati │ │ │ │ -0019dce0: 7665 2077 6865 6e20 6275 696c 6469 6e67 ve when building │ │ │ │ -0019dcf0: 2061 7070 6c69 6361 7469 6f6e 7320 696e applications in │ │ │ │ -0019dd00: 2043 2b2b 2074 6861 7420 636f 6d62 696e C++ that combin │ │ │ │ -0019dd10: 6520 6d75 6c74 6970 6c65 2063 6c69 656e e multiple clien │ │ │ │ -0019dd20: 7473 2061 6e64 2073 6572 7669 6365 732e ts and services. │ │ │ │ -0019dd30: 2054 6f20 6275 696c 6420 6d75 6c74 6970 To build multip │ │ │ │ -0019dd40: 6c65 206c 6962 7261 7269 6573 2c20 796f le libraries, yo │ │ │ │ -0019dd50: 7520 6361 6e20 6465 6669 6e65 2061 2043 u can define a C │ │ │ │ -0019dd60: 2b2b 206e 616d 6573 7061 6365 2069 6e20 ++ namespace in │ │ │ │ -0019dd70: 796f 7572 2068 6561 6465 7220 6669 6c65 your header file │ │ │ │ -0019dd80: 2077 6974 6820 3c62 3e3c 636f 6465 3e73 with s │ │ │ │ -0019dd90: 6f61 7063 7070 3220 2d71 6e61 6d65 3c2f oapcpp2 -qname option │ │ │ │ -0019ddb0: 203c 623e 3c63 6f64 653e 2d71 6e61 6d65 -qname │ │ │ │ -0019ddc0: 3c2f 636f 6465 3e3c 2f62 3e2c 2073 6565 , see │ │ │ │ -0019ddd0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section How to bu │ │ │ │ -0019de10: 696c 6420 6120 636c 6965 6e74 206f 7220 ild a client or │ │ │ │ -0019de20: 7365 7276 6572 2069 6e20 6120 432b 2b20 server in a C++ │ │ │ │ -0019de30: 636f 6465 206e 616d 6573 7061 6365 3c2f code namespace for details.< │ │ │ │ -0019de50: 2f70 3e0a 3c70 3e46 6f72 2043 2c20 796f /p>.

    For C, yo │ │ │ │ -0019de60: 7520 6361 6e20 7573 6520 3c62 3e3c 636f u can use soapcpp2 -c - │ │ │ │ -0019de80: 7020 6e61 6d65 3c2f 636f 6465 3e3c 2f62 p name option -p name │ │ │ │ -0019deb0: 3c2f 623e 2074 6f20 7265 6e61 6d65 2074 to rename t │ │ │ │ -0019dec0: 6865 2067 656e 6572 6174 6564 203c 656d he generated soapClien │ │ │ │ -0019dee0: 744c 6962 2e63 3c2f 636f 6465 3e3c 2f65 tLib.c and soapServerLib.c │ │ │ │ -0019df10: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 616e (an │ │ │ │ -0019df20: 6420 6173 736f 6369 6174 6564 2920 6669 d associated) fi │ │ │ │ -0019df30: 6c65 732e 2054 6865 203c 623e 3c63 6f64 les. The -p name │ │ │ │ -0019df50: 3c2f 623e 206f 7074 696f 6e20 7370 6563 option spec │ │ │ │ -0019df60: 6966 6965 7320 7468 6520 6669 6c65 203c ifies the file < │ │ │ │ -0019df70: 656d 3e3c 636f 6465 3e6e 616d 653c 2f63 em>name prefix │ │ │ │ -0019df90: 2074 6f20 7265 706c 6163 6520 7468 6520 to replace the │ │ │ │ -0019dfa0: 3c65 6d3e 3c63 6f64 653e 736f 6170 3c2f soap file │ │ │ │ -0019dfc0: 6e61 6d65 2070 7265 6669 782e 3c2f 703e name prefix.

    │ │ │ │ -0019dfd0: 0a3c 703e 5468 6520 656e 6769 6e65 2064 .

    The engine d │ │ │ │ -0019dfe0: 6f65 7320 6e6f 7420 6465 6669 6e65 2053 oes not define S │ │ │ │ -0019dff0: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F │ │ │ │ -0019e000: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers │ │ │ │ -0019e010: 2074 6861 7420 7468 6520 656e 6769 6e65 that the engine │ │ │ │ -0019e020: 206e 6565 6473 2e20 5765 2074 6865 7265 needs. We there │ │ │ │ -0019e030: 666f 7265 2061 6464 2053 4f41 5020 4865 fore add SOAP He │ │ │ │ -0019e040: 6164 6572 2061 6e64 2046 6175 6c74 2073 ader and Fault s │ │ │ │ -0019e050: 6572 6961 6c69 7a65 7273 2c20 7768 6963 erializers, whic │ │ │ │ -0019e060: 6820 6172 6520 636f 6d70 696c 6564 2073 h are compiled s │ │ │ │ -0019e070: 6570 6172 6174 656c 7920 6173 2066 6f6c eparately as fol │ │ │ │ -0019e080: 6c6f 7773 2e20 4669 7273 742c 2063 7265 lows. First, cre │ │ │ │ -0019e090: 6174 6520 6120 6e65 7720 6865 6164 6572 ate a new header │ │ │ │ -0019e0a0: 2066 696c 6520 3c65 6d3e 3c63 6f64 653e file │ │ │ │ -0019e0b0: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h with the SOAP │ │ │ │ -0019e0d0: 4865 6164 6572 203c 636f 6465 3e3c 6120 Header SOAP_ENV │ │ │ │ -0019e140: 5f5f 4865 6164 6572 3c2f 613e 3c2f 636f __Header and SOAP Fau │ │ │ │ -0019e160: 6c74 203c 636f 6465 3e3c 6120 636c 6173 lt SOAP_ENV__Faul │ │ │ │ -0019e1d0: 743c 2f61 3e3c 2f63 6f64 653e 2073 7472 t str │ │ │ │ -0019e1e0: 7563 7475 7265 732c 2069 6e63 6c75 6469 uctures, includi │ │ │ │ -0019e1f0: 6e67 203c 636f 6465 3e3c 6120 636c 6173 ng SOAP_E │ │ │ │ -0019e260: 4e56 5f5f 4465 7461 696c 3c2f 613e 3c2f NV__Detail if this st │ │ │ │ -0019e280: 7275 6374 7572 6520 636f 6e74 6169 6e73 ructure contains │ │ │ │ -0019e290: 206d 656d 6265 7273 2074 6861 7420 6172 members that ar │ │ │ │ -0019e2a0: 6520 7365 7269 616c 697a 6564 2061 7320 e serialized as │ │ │ │ -0019e2b0: 6661 756c 7420 6465 7461 696c 732e 2059 fault details. Y │ │ │ │ -0019e2c0: 6f75 2063 616e 206c 6561 7665 2074 6869 ou can leave thi │ │ │ │ -0019e2d0: 7320 6865 6164 6572 2066 696c 6520 656d s header file em │ │ │ │ -0019e2e0: 7074 7920 6966 2079 6f75 2077 616e 7420 pty if you want │ │ │ │ -0019e2f0: 746f 2075 7365 2074 6865 2064 6566 6175 to use the defau │ │ │ │ -0019e300: 6c74 2053 4f41 5020 4865 6164 6572 2061 lt SOAP Header a │ │ │ │ -0019e310: 6e64 2046 6175 6c74 2e20 486f 7765 7665 nd Fault. Howeve │ │ │ │ -0019e320: 722c 2069 6620 534f 4150 2048 6561 6465 r, if SOAP Heade │ │ │ │ -0019e330: 7273 2061 7265 2072 6571 7569 7265 6420 rs are required │ │ │ │ -0019e340: 7468 656e 2079 6f75 2063 616e 6e6f 7420 then you cannot │ │ │ │ -0019e350: 6c65 6176 6520 7468 6520 3c63 6f64 653e leave the │ │ │ │ -0019e360: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_ │ │ │ │ -0019e3c0: 454e 565f 5f48 6561 6465 723c 2f61 3e3c ENV__Header< │ │ │ │ -0019e3d0: 2f63 6f64 653e 2073 7472 7563 7475 7265 /code> structure │ │ │ │ -0019e3e0: 2065 6d70 7479 2e20 466f 7220 6578 616d empty. For exam │ │ │ │ -0019e3f0: 706c 652c 2074 6865 2057 532d 4164 6472 ple, the WS-Addr │ │ │ │ -0019e400: 6573 7369 6e67 2061 6e64 2057 532d 5365 essing and WS-Se │ │ │ │ -0019e410: 6375 7269 7479 2070 6c75 6769 6e73 2072 curity plugins r │ │ │ │ -0019e420: 6571 7569 7265 2053 4f41 5020 4865 6164 equire SOAP Head │ │ │ │ -0019e430: 6572 7320 7768 6963 6820 6361 6e20 6265 ers which can be │ │ │ │ -0019e440: 2069 6d70 6f72 7465 6420 6279 2061 6464 imported by add │ │ │ │ -0019e450: 696e 6720 3c63 6f64 653e 2369 6d70 6f72 ing #impor │ │ │ │ -0019e460: 7420 2277 7361 352e 6822 3c2f 636f 6465 t "wsa5.h" and #imp │ │ │ │ -0019e480: 6f72 7420 2277 7373 652e 6822 3c2f 636f ort "wsse.h", respectivel │ │ │ │ -0019e4a0: 7920 746f 203c 656d 3e3c 636f 6465 3e65 y to e │ │ │ │ -0019e4b0: 6e76 2e68 3c2f 636f 6465 3e3c 2f65 6d3e nv.h │ │ │ │ -0019e4c0: 2e20 5468 656e 2063 6f6d 7069 6c65 2074 . Then compile t │ │ │ │ -0019e4d0: 6869 7320 6865 6164 6572 2066 696c 6520 his header file │ │ │ │ -0019e4e0: 7769 7468 3a20 3c2f 703e 3c70 7265 2063 with:

    │ │ │ │ -0019e500: 2073 6f61 7063 7070 3220 2d70 656e 7620   soapcpp2 -penv 
    │ │ │ │ -0019e510: 656e 762e 680a 3c2f 7072 653e 3c70 3e20  env.h.

    │ │ │ │ -0019e520: 5468 6520 6765 6e65 7261 7465 6420 3c65 The generated envC.cpp │ │ │ │ -0019e540: 3c2f 636f 6465 3e3c 2f65 6d3e 2066 696c fil │ │ │ │ -0019e550: 6520 686f 6c64 7320 7468 6520 534f 4150 e holds the SOAP │ │ │ │ -0019e560: 2048 6561 6465 7220 616e 6420 4661 756c Header and Faul │ │ │ │ -0019e570: 7420 7365 7269 616c 697a 6572 7320 616e t serializers an │ │ │ │ -0019e580: 6420 796f 7520 6361 6e20 6372 6561 7465 d you can create │ │ │ │ -0019e590: 2061 2028 6479 6e61 6d69 6329 206c 6962 a (dynamic) lib │ │ │ │ -0019e5a0: 7261 7279 2066 6f72 2069 7420 746f 206c rary for it to l │ │ │ │ -0019e5b0: 696e 6b20 6974 2077 6974 6820 796f 7572 ink it with your │ │ │ │ -0019e5c0: 2063 6c69 656e 7420 616e 6420 7365 7276 client and serv │ │ │ │ -0019e5d0: 6572 2061 7070 6c69 6361 7469 6f6e 732e er applications. │ │ │ │ -0019e5e0: 3c2f 703e 0a3c 703e 596f 7520 7368 6f75

    .

    You shou │ │ │ │ -0019e5f0: 6c64 2074 6865 6e20 636f 6d70 696c 6520 ld then compile │ │ │ │ -0019e600: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs │ │ │ │ -0019e610: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp │ │ │ │ -0019e620: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6962 lib │ │ │ │ -0019e630: 7261 7279 2077 6974 6820 7468 6520 636f rary with the co │ │ │ │ -0019e640: 6d70 696c 652d 7469 6d65 203c 636f 6465 mpile-time #WITH_NONAMESPA │ │ │ │ -0019e660: 4345 533c 2f63 6f64 653e 2066 6c61 673a CES flag: │ │ │ │ -0019e670: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     c++ 
    │ │ │ │ -0019e690: 2d44 5749 5448 5f4e 4f4e 414d 4553 5041  -DWITH_NONAMESPA
    │ │ │ │ -0019e6a0: 4345 5320 2d63 2073 7464 736f 6170 322e  CES -c stdsoap2.
    │ │ │ │ -0019e6b0: 6370 700a 3c2f 7072 653e 3c70 3e20 5468  cpp.

    Th │ │ │ │ -0019e6c0: 6973 206f 6d69 7473 2074 6865 2072 6566 is omits the ref │ │ │ │ -0019e6d0: 6572 656e 6365 2074 6f20 7468 6520 676c erence to the gl │ │ │ │ -0019e6e0: 6f62 616c 206e 616d 6573 7061 6365 7320 obal namespaces │ │ │ │ -0019e6f0: 7461 626c 652c 2077 6869 6368 2069 7320 table, which is │ │ │ │ -0019e700: 6e6f 7768 6572 6520 746f 2062 6520 6465 nowhere to be de │ │ │ │ -0019e710: 6669 6e65 6420 7369 6e63 6520 7765 2077 fined since we w │ │ │ │ -0019e720: 696c 6c20 7573 6520 584d 4c20 6e61 6d65 ill use XML name │ │ │ │ -0019e730: 7370 6163 6573 2066 6f72 2065 6163 6820 spaces for each │ │ │ │ -0019e740: 636c 6965 6e74 2f73 6572 7669 6365 2073 client/service s │ │ │ │ -0019e750: 6570 6172 6174 656c 792e 2054 6865 7265 eparately. There │ │ │ │ -0019e760: 666f 7265 2c20 796f 7520 6d75 7374 2065 fore, you must e │ │ │ │ -0019e770: 7870 6c69 6369 746c 7920 7365 7420 7468 xplicitly set th │ │ │ │ -0019e780: 6520 6e61 6d65 7370 6163 6573 2076 616c e namespaces val │ │ │ │ -0019e790: 7565 206f 6620 7468 6520 3c63 6f64 653e ue of the │ │ │ │ -0019e7a0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ -0019e7f0: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ -0019e800: 6578 7420 696e 2079 6f75 7220 636f 6465 ext in your code │ │ │ │ -0019e810: 2065 7665 7279 2074 696d 6520 6166 7465 every time afte │ │ │ │ -0019e820: 7220 696e 6974 6961 6c69 7a61 7469 6f6e r initialization │ │ │ │ -0019e830: 206f 6620 7468 6520 3c63 6f64 653e 3c61 of the soap contex │ │ │ │ -0019e8a0: 7420 7769 7468 2074 6865 203c 636f 6465 t with the soap_set_namesp │ │ │ │ -0019e980: 6163 6573 2873 7472 7563 7420 736f 6170 aces(struct soap │ │ │ │ -0019e990: 2a2c 2063 6f6e 7374 2073 7472 7563 7420 *, const struct │ │ │ │ -0019e9a0: 4e61 6d65 7370 6163 652a 293c 2f61 3e3c Namespace*)< │ │ │ │ -0019e9b0: 2f63 6f64 653e 2066 756e 6374 696f 6e2e /code> function. │ │ │ │ -0019e9c0: 3c2f 703e 0a3c 703e 466f 7220 6578 616d

    .

    For exam │ │ │ │ -0019e9d0: 706c 652c 2073 7570 706f 7365 2077 6520 ple, suppose we │ │ │ │ -0019e9e0: 6861 7665 2074 776f 2063 6c69 656e 7473 have two clients │ │ │ │ -0019e9f0: 2064 6566 696e 6564 2069 6e20 6865 6164 defined in head │ │ │ │ -0019ea00: 6572 2066 696c 6573 203c 656d 3e3c 636f er files client1.h and client2.h │ │ │ │ -0019ea40: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5765 . We │ │ │ │ -0019ea50: 2066 6972 7374 2067 656e 6572 6174 6520 first generate │ │ │ │ -0019ea60: 7468 6520 3c65 6d3e 3c63 6f64 653e 656e the en │ │ │ │ -0019ea70: 7648 2e68 3c2f 636f 6465 3e3c 2f65 6d3e vH.h │ │ │ │ -0019ea80: 2066 696c 6520 666f 7220 7468 6520 534f file for the SO │ │ │ │ -0019ea90: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa │ │ │ │ -0019eaa0: 756c 7420 6465 6669 6e69 7469 6f6e 733a ult definitions: │ │ │ │ -0019eab0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     soap
    │ │ │ │ -0019ead0: 6370 7032 202d 6320 2d70 656e 7620 656e  cpp2 -c -penv en
    │ │ │ │ -0019eae0: 762e 680a 3c2f 7072 653e 3c70 3e20 5468  v.h.

    Th │ │ │ │ -0019eaf0: 656e 2077 6520 6765 6e65 7261 7465 2074 en we generate t │ │ │ │ -0019eb00: 6865 2063 6f64 6520 666f 7220 636c 6965 he code for clie │ │ │ │ -0019eb10: 6e74 3120 616e 6420 636c 6965 6e74 323a nt1 and client2: │ │ │ │ -0019eb20: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     soap
    │ │ │ │ -0019eb40: 6370 7032 202d 6320 2d6e 202d 706d 7943  cpp2 -c -n -pmyC
    │ │ │ │ -0019eb50: 6c69 656e 7431 2063 6c69 656e 7431 2e68  lient1 client1.h
    │ │ │ │ -0019eb60: 0a20 736f 6170 6370 7032 202d 6320 2d6e  . soapcpp2 -c -n
    │ │ │ │ -0019eb70: 202d 706d 7943 6c69 656e 7432 2063 6c69   -pmyClient2 cli
    │ │ │ │ -0019eb80: 656e 7432 2e68 0a3c 2f70 7265 3e3c 703e  ent2.h.

    │ │ │ │ -0019eb90: 2054 6869 7320 6765 6e65 7261 7465 7320 This generates │ │ │ │ -0019eba0: 3c65 6d3e 3c63 6f64 653e 6d79 436c 6965 myClie │ │ │ │ -0019ebb0: 6e74 3143 6c69 656e 744c 6962 2e63 3c2f nt1ClientLib.c and < │ │ │ │ -0019ebd0: 656d 3e3c 636f 6465 3e6d 7943 6c69 656e em>myClien │ │ │ │ -0019ebe0: 7432 436c 6965 6e74 4c69 622e 633c 2f63 t2ClientLib.c (among │ │ │ │ -0019ec00: 2073 6576 6572 616c 206f 7468 6572 2066 several other f │ │ │ │ -0019ec10: 696c 6573 292e 2054 6865 7365 2074 776f iles). These two │ │ │ │ -0019ec20: 2066 696c 6573 2073 686f 756c 6420 6265 files should be │ │ │ │ -0019ec30: 2063 6f6d 7069 6c65 6420 616e 6420 6c69 compiled and li │ │ │ │ -0019ec40: 6e6b 6564 2077 6974 6820 796f 7572 2061 nked with your a │ │ │ │ -0019ec50: 7070 6c69 6361 7469 6f6e 2e20 5468 6520 pplication. The │ │ │ │ -0019ec60: 736f 7572 6365 2063 6f64 6520 6f66 2079 source code of y │ │ │ │ -0019ec70: 6f75 7220 6170 706c 6963 6174 696f 6e20 our application │ │ │ │ -0019ec80: 7368 6f75 6c64 2069 6e63 6c75 6465 2074 should include t │ │ │ │ -0019ec90: 6865 2067 656e 6572 6174 6564 203c 656d he generated envH.h, < │ │ │ │ -0019ecc0: 636f 6465 3e6d 7943 6c69 656e 7431 482e code>myClient1H. │ │ │ │ -0019ecd0: 683c 2f63 6f64 653e 3c2f 656d 3e2c 203c h, < │ │ │ │ -0019ece0: 656d 3e3c 636f 6465 3e6d 7943 6c69 656e em>myClien │ │ │ │ -0019ecf0: 7432 2e68 3c2f 636f 6465 3e3c 2f65 6d3e t2.h │ │ │ │ -0019ed00: 2066 696c 6573 2061 6e64 203c 656d 3e3c files and < │ │ │ │ -0019ed10: 636f 6465 3e6d 7943 6c69 656e 7431 2e6e code>myClient1.n │ │ │ │ -0019ed20: 736d 6170 3c2f 636f 6465 3e3c 2f65 6d3e smap │ │ │ │ -0019ed30: 2c20 3c65 6d3e 3c63 6f64 653e 6d79 436c , myCl │ │ │ │ -0019ed40: 6965 6e74 322e 6e73 6d61 703c 2f63 6f64 ient2.nsmap files:.

    #include & │ │ │ │ -0019edb0: 7175 6f74 3b6d 7943 6c69 656e 7431 482e quot;myClient1H. │ │ │ │ -0019edc0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" < │ │ │ │ -0019edd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -0019ede0: 656e 7422 3e2f 2f20 696e 636c 7564 6520 ent">// include │ │ │ │ -0019edf0: 636c 6965 6e74 2031 2073 7475 6273 203c client 1 stubs < │ │ │ │ -0019ee00: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -0019ee20: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ -0019ee30: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ │ -0019ee40: 6465 2026 7175 6f74 3b6d 7943 6c69 656e de "myClien │ │ │ │ -0019ee50: 7432 482e 6826 7175 6f74 3b3c 2f73 7061 t2H.h" // incl │ │ │ │ -0019ee80: 7564 6520 636c 6965 6e74 2032 2073 7475 ude client 2 stu │ │ │ │ -0019ee90: 6273 203c 2f73 7061 6e3e 3c2f 6469 763e bs
    │ │ │ │ -0019eea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i │ │ │ │ -0019eed0: 6e63 6c75 6465 2026 7175 6f74 3b65 6e76 nclude "env │ │ │ │ -0019eee0: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h" │ │ │ │ -0019eef0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... //.
    #include " │ │ │ │ -0019ef70: 6d79 436c 6965 6e74 3148 2e6e 736d 6170 myClient1H.nsmap │ │ │ │ -0019ef80: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " // include c │ │ │ │ -0019efb0: 6c69 656e 7420 3120 6e73 6d61 7020 3c2f lient 1 nsmap
    .
    #includ │ │ │ │ -0019f000: 6520 2671 756f 743b 6d79 436c 6965 6e74 e "myClient │ │ │ │ -0019f010: 3248 2e6e 736d 6170 2671 756f 743b 3c2f 2H.nsmap" // i │ │ │ │ -0019f040: 6e63 6c75 6465 2063 6c69 656e 7420 3220 nclude client 2 │ │ │ │ -0019f050: 6e73 6d61 7020 3c2f 7370 616e 3e3c 2f64 nsmap
    < │ │ │ │ +00196de0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ +00196df0: 726f 7570 5f5f 636f 6f6b 6965 732e 6874 roup__cookies.ht │ │ │ │ +00196e00: 6d6c 2367 6130 6464 3832 6334 6664 3762 ml#ga0dd82c4fd7b │ │ │ │ +00196e10: 3439 3932 3038 6432 3430 3262 3139 3561 499208d2402b195a │ │ │ │ +00196e20: 3138 3266 6522 3e73 6f61 705f 636f 6f6b 182fe">soap_cook │ │ │ │ +00196e30: 6965 5f76 616c 7565 3c2f 613e 3c2f 6469 ie_value
    const char │ │ │ │ +00196e60: 202a 2073 6f61 705f 636f 6f6b 6965 5f76 * soap_cookie_v │ │ │ │ +00196e70: 616c 7565 2873 7472 7563 7420 736f 6170 alue(struct soap │ │ │ │ +00196e80: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch │ │ │ │ +00196e90: 6172 202a 6e61 6d65 2c20 636f 6e73 7420 ar *name, const │ │ │ │ +00196ea0: 6368 6172 202a 646f 6d61 696e 2c20 636f char *domain, co │ │ │ │ +00196eb0: 6e73 7420 6368 6172 202a 7061 7468 293c nst char *path)< │ │ │ │ +00196ec0: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Get cook │ │ │ │ +00196ee0: 6965 2076 616c 7565 2e3c 2f64 6976 3e3c ie value.
    < │ │ │ │ +00196ef0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>. │ │ │ │ +001971f0: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    void soap_free_ │ │ │ │ +001972e0: 636f 6f6b 6965 7328 7374 7275 6374 2073 cookies(struct s │ │ │ │ +001972f0: 6f61 7020 2a73 6f61 7029 3c2f 6469 763e oap *soap)
    │ │ │ │ +00197300: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    Free cookies. │ │ │ │ +00197320: 3c2f 6469 763e 3c2f 6469 763e 0a3c 6469
    .int soap_set_c │ │ │ │ +00197420: 6f6f 6b69 655f 6578 7069 7265 2873 7472 ookie_expire(str │ │ │ │ +00197430: 7563 7420 736f 6170 202a 736f 6170 2c20 uct soap *soap, │ │ │ │ +00197440: 636f 6e73 7420 6368 6172 202a 6e61 6d65 const char *name │ │ │ │ +00197450: 2c20 6c6f 6e67 206d 6178 6167 652c 2063 , long maxage, c │ │ │ │ +00197460: 6f6e 7374 2063 6861 7220 2a64 6f6d 6169 onst char *domai │ │ │ │ +00197470: 6e2c 2063 6f6e 7374 2063 6861 7220 2a70 n, const char *p │ │ │ │ +00197480: 6174 6829 3c2f 6469 763e 3c64 6976 2063 ath)
    Set │ │ │ │ +001974a0: 2063 6f6f 6b69 6520 6578 7069 7261 7469 cookie expirati │ │ │ │ +001974b0: 6f6e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a on.
    . │ │ │ │ +001974c0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::c │ │ │ │ +00197560: 6f6f 6b69 655f 646f 6d61 696e 3c2f 613e ookie_domain │ │ │ │ +00197570: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    const │ │ │ │ +00197590: 6368 6172 202a 2063 6f6f 6b69 655f 646f char * cookie_do │ │ │ │ +001975a0: 6d61 696e 3c2f 6469 763e 3c64 6976 2063 main
    Use │ │ │ │ +001975c0: 722d 6465 6669 6e61 626c 6520 7374 7269 r-definable stri │ │ │ │ +001975d0: 6e67 2074 6861 7420 7370 6563 6966 6965 ng that specifie │ │ │ │ +001975e0: 7320 7468 6520 4854 5450 2063 6f6f 6b69 s the HTTP cooki │ │ │ │ +001975f0: 6520 646f 6d61 696e 206f 6620 7468 6520 e domain of the │ │ │ │ +00197600: 7275 6e6e 696e 6720 7365 7276 6572 2e3c running server.< │ │ │ │ +00197610: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Defin │ │ │ │ +00197630: 6974 696f 6e3a 3c2f 623e 2073 7464 736f ition: stdso │ │ │ │ +00197640: 6170 322e 683a 3239 3639 3c2f 6469 763e ap2.h:2969
    │ │ │ │ +00197650: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001976a0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    c │ │ │ │ +00197720: 6f6e 7374 2063 6861 7220 2a20 636f 6f6b onst char * cook │ │ │ │ +00197730: 6965 5f70 6174 683c 2f64 6976 3e3c 6469 ie_path
    │ │ │ │ +00197750: 5573 6572 2d64 6566 696e 6162 6c65 2073 User-definable s │ │ │ │ +00197760: 7472 696e 6720 7468 6174 2073 7065 6369 tring that speci │ │ │ │ +00197770: 6669 6573 2074 6865 2048 5454 5020 636f fies the HTTP co │ │ │ │ +00197780: 6f6b 6965 2070 6174 6820 6f66 2074 6865 okie path of the │ │ │ │ +00197790: 2072 756e 6e69 6e67 2073 6572 7665 722e running server. │ │ │ │ +001977a0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    Defi │ │ │ │ +001977c0: 6e69 7469 6f6e 3a3c 2f62 3e20 7374 6473 nition: stds │ │ │ │ +001977d0: 6f61 7032 2e68 3a32 3937 313c 2f64 6976 oap2.h:2971
    .
    < │ │ │ │ +00197800: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ +00197820: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ +00197830: 3c2f 703e 0a3c 6832 3e3c 6120 636c 6173

    .

    .Connecting cli │ │ │ │ +00197870: 656e 7473 2074 6872 6f75 6768 2070 726f ents through pro │ │ │ │ +00197880: 7879 2073 6572 7665 7273 3c2f 6832 3e0a xy servers

    . │ │ │ │ +00197890: 3c70 3e57 6865 6e20 6120 636c 6965 6e74

    When a client │ │ │ │ +001978a0: 206e 6565 6473 2074 6f20 636f 6e6e 6563 needs to connec │ │ │ │ +001978b0: 7420 746f 2061 2057 6562 2053 6572 7669 t to a Web Servi │ │ │ │ +001978c0: 6365 2074 6872 6f75 6768 2061 2070 726f ce through a pro │ │ │ │ +001978d0: 7879 2073 6572 7665 722c 2073 6574 2074 xy server, set t │ │ │ │ +001978e0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap::proxy_ │ │ │ │ +001979a0: 686f 7374 3c2f 613e 3c2f 636f 6465 3e20 host │ │ │ │ +001979b0: 7374 7269 6e67 2061 6e64 203c 636f 6465 string and soap::p │ │ │ │ +00197a80: 726f 7879 5f70 6f72 743c 2f61 3e3c 2f63 roxy_port integer att │ │ │ │ +00197aa0: 7269 6275 7465 7320 6f66 2074 6865 2063 ributes of the c │ │ │ │ +00197ab0: 7572 7265 6e74 203c 636f 6465 3e3c 6120 urrent soap context │ │ │ │ +00197b20: 2074 6f20 7468 6520 7072 6f78 7927 7320 to the proxy's │ │ │ │ +00197b30: 686f 7374 206e 616d 6520 616e 6420 706f host name and po │ │ │ │ +00197b40: 7274 2c20 7265 7370 6563 7469 7665 6c79 rt, respectively │ │ │ │ +00197b50: 2e20 466f 7220 6578 616d 706c 653a 3c2f . For example:.

    struct < │ │ │ │ +00197bb0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00197bc0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00197bd0: 6874 6d6c 223e 736f 6170 3c2f 613e 203c html">soap < │ │ │ │ +00197be0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00197bf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +00197c00: 6874 6d6c 223e 736f 6170 3c2f 613e 3b20 html">soap; │ │ │ │ +00197c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so │ │ │ │ +00197c80: 6170 5f69 6e69 743c 2f61 3e28 2661 6d70 ap_init(& │ │ │ │ +00197c90: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;soap │ │ │ │ +00197cc0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    ..
    soap.proxy_port │ │ │ │ +00197e40: 3c2f 613e 203d 2038 3038 303b 203c 2f64 = 8080; .
    │ │ │ │ +00197e80: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_ │ │ │ │ +00197e90: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth │ │ │ │ +00197ea0: 6f64 2826 616d 703b 3c61 2063 6c61 7373 od(&s │ │ │ │ +00197ed0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, "http: │ │ │ │ +00197f00: 2f2f 686f 7374 3a70 6f72 742f 7061 7468 //host:port/path │ │ │ │ +00197f10: 2671 756f 743b 3c2f 7370 616e 3e2c 203c ", < │ │ │ │ +00197f20: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +00197f30: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +00197f40: 3b61 6374 696f 6e26 7175 6f74 3b3c 2f73 ;action", ...)) .
    soap_p │ │ │ │ +00197fd0: 7269 6e74 5f66 6175 6c74 3c2f 613e 2826 rint_fault(& │ │ │ │ +00197fe0: 616d 703b 3c61 2063 6c61 7373 3d22 636f amp;soap< │ │ │ │ +00198010: 2f61 3e2c 2073 7464 6572 7229 3b20 3c2f /a>, stderr); .
    else .
    ... // success
    .
    │ │ │ │ +001980b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    This │ │ │ │ +00198c20: 2070 6f72 7420 6e75 6d62 6572 2069 7320 port number is │ │ │ │ +00198c30: 7573 6564 206f 6e6c 7920 6f6e 6365 2061 used only once a │ │ │ │ +00198c40: 6e64 2072 6573 6574 2074 6f20 2d31 2028 nd reset to -1 ( │ │ │ │ +00198c50: 6469 7361 626c 6564 292e 2053 6574 2069 disabled). Set i │ │ │ │ +00198c60: 7420 6167 6169 6e20 666f 7220 7468 6520 t again for the │ │ │ │ +00198c70: 6e65 7874 2063 616c 6c2e 3c2f 703e 0a3c next call.

    .< │ │ │ │ +00198c80: 703e 546f 2073 6574 2061 2063 6c69 656e p>To set a clien │ │ │ │ +00198c90: 7420 696e 7465 7266 6163 6520 6164 6472 t interface addr │ │ │ │ +00198ca0: 6573 7320 666f 7220 7468 6520 636f 6e6e ess for the conn │ │ │ │ +00198cb0: 6563 7469 6f6e 2074 6861 7420 6973 2061 ection that is a │ │ │ │ +00198cc0: 6e20 4950 2061 6464 7265 7373 206f 6620 n IP address of │ │ │ │ +00198cd0: 7468 6520 636c 6965 6e74 3a3c 2f70 3e0a the client:

    . │ │ │ │ +00198ce0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ +00198d20: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = < │ │ │ │ +00198d90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +00198da0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +00198db0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ +00198dc0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68 │ │ │ │ +00198dd0: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498 │ │ │ │ +00198de0: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c">soap_new │ │ │ │ +00198df0: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    soap-> │ │ │ │ +00198e40: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;client │ │ │ │ +00198e90: 5f69 6e74 6572 6661 6365 3c2f 613e 203d _interface = │ │ │ │ +00198ea0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +00198ec0: 6f74 3b2e 2e2e 2671 756f 743b 3c2f 7370 ot;..."; // IP │ │ │ │ +00198ef0: 2061 6464 7265 7373 203c 2f73 7061 6e3e address │ │ │ │ +00198f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so │ │ │ │ +00198f40: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm │ │ │ │ +00198f50: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa │ │ │ │ +00198f80: 703c 2f61 3e2c 203c 7370 616e 2063 6c61 p, "http:// │ │ │ │ +00198fb0: 686f 7374 3a70 6f72 742f 7061 7468 2671 host:port/path&q │ │ │ │ +00198fc0: 756f 743b 3c2f 7370 616e 3e2c 203c 7370 uot;, "a │ │ │ │ +00198ff0: 6374 696f 6e26 7175 6f74 3b3c 2f73 7061 ction", ...))
    │ │ │ │ +00199010: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ +00199040: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.
    else .
    ... // success
    .
    soap::client_ │ │ │ │ +00199180: 696e 7465 7266 6163 653c 2f61 3e3c 2f64 interface
    const cha │ │ │ │ +001991b0: 7220 2a20 636c 6965 6e74 5f69 6e74 6572 r * client_inter │ │ │ │ +001991c0: 6661 6365 3c2f 6469 763e 3c64 6976 2063 face
    Use │ │ │ │ +001991e0: 722d 6465 6669 6e61 626c 6520 636c 6965 r-definable clie │ │ │ │ +001991f0: 6e74 2069 6e74 6572 6661 6365 2061 6464 nt interface add │ │ │ │ +00199200: 7265 7373 2074 6f20 6f76 6572 7269 6465 ress to override │ │ │ │ +00199210: 2077 6865 6e20 636f 6e6e 6563 7469 6e67 when connecting │ │ │ │ +00199220: 2074 6f20 6120 7365 7276 6572 2c20 7768 to a server, wh │ │ │ │ +00199230: 656e 206e 6f6e 2d4e 554c 4c20 2857 696e en non-NULL (Win │ │ │ │ +00199240: 646f 2e2e 2e3c 2f64 6976 3e3c 6469 7620 do...
    Definition: │ │ │ │ +00199270: 2073 7464 736f 6170 322e 683a 3336 3939 stdsoap2.h:3699 │ │ │ │ +00199280: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    This clie │ │ │ │ +001992b0: 6e74 2069 6e74 6572 6661 6365 2061 6464 nt interface add │ │ │ │ +001992c0: 7265 7373 2073 7472 696e 6720 6973 2075 ress string is u │ │ │ │ +001992d0: 7365 6420 6f6e 6c79 206f 6e63 6520 616e sed only once an │ │ │ │ +001992e0: 6420 7265 7365 7420 746f 204e 554c 4c20 d reset to NULL │ │ │ │ +001992f0: 2864 6973 6162 6c65 6429 2e20 5365 7420 (disabled). Set │ │ │ │ +00199300: 6974 2061 6761 696e 2066 6f72 2074 6865 it again for the │ │ │ │ +00199310: 206e 6578 7420 6361 6c6c 2e20 5468 6973 next call. This │ │ │ │ +00199320: 2066 6561 7475 7265 2069 7320 6e6f 7420 feature is not │ │ │ │ +00199330: 6176 6169 6c61 626c 6520 7768 656e 2063 available when c │ │ │ │ +00199340: 6f6d 7069 6c69 6e67 2074 6865 2063 6f64 ompiling the cod │ │ │ │ +00199350: 6520 6f6e 2077 696e 646f 7773 2e3c 2f70 e on windows.

    .

    .... Back to ta │ │ │ │ +00199380: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +00199390: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    . │ │ │ │ +001993c0: 4661 7374 4347 493c 2f68 323e 0a3c 703e FastCGI

    .

    │ │ │ │ +001993d0: 546f 2065 6e61 626c 6520 4661 7374 4347 To enable FastCG │ │ │ │ +001993e0: 4920 7375 7070 6f72 742c 2069 6e73 7461 I support, insta │ │ │ │ +001993f0: 6c6c 2046 6173 7443 4749 2061 6e64 2063 ll FastCGI and c │ │ │ │ +00199400: 6f6d 7069 6c65 2061 6c6c 2073 6f61 7063 ompile all soapc │ │ │ │ +00199410: 7070 322d 6765 6e65 7261 7465 6420 736f pp2-generated so │ │ │ │ +00199420: 7572 6365 2063 6f64 6520 6669 6c65 7320 urce code files │ │ │ │ +00199430: 616e 6420 796f 7572 2061 7070 6c69 6361 and your applica │ │ │ │ +00199440: 7469 6f6e 2073 6f75 7263 6573 2077 6974 tion sources wit │ │ │ │ +00199450: 6820 7468 6520 636f 6d70 696c 652d 7469 h the compile-ti │ │ │ │ +00199460: 6d65 2066 6c61 6720 3c63 6f64 653e 2357 me flag #W │ │ │ │ +00199470: 4954 485f 4641 5354 4347 493c 2f63 6f64 ITH_FASTCGI or add:

    .< │ │ │ │ +00199490: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +001994a0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    #define WITH_F │ │ │ │ +001994e0: 4153 5443 4749 3c2f 7370 616e 3e3c 2f64 ASTCGI.

    to │ │ │ │ +00199510: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ +00199520: 2f73 7464 736f 6170 322e 683c 2f63 6f64 /stdsoap2.h and reco │ │ │ │ +00199540: 6d70 696c 6520 7468 6520 7072 6f6a 6563 mpile the projec │ │ │ │ +00199550: 7420 636f 6465 2e3c 2f70 3e0a 3c64 6c20 t code.

    .
    Warn │ │ │ │ +00199580: 696e 673c 2f64 743e 3c64 643e 446f 206e ing
    Do n │ │ │ │ +00199590: 6f74 206c 696e 6b20 6167 6169 6e73 7420 ot link against │ │ │ │ +001995a0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs │ │ │ │ +001995b0: 6f61 702f 6c69 6267 736f 6170 2a3c 2f63 oap/libgsoap* librar │ │ │ │ +001995d0: 6965 7320 6173 2074 6865 7365 2061 7265 ies as these are │ │ │ │ +001995e0: 206e 6f74 2073 7569 7461 626c 6520 666f not suitable fo │ │ │ │ +001995f0: 7220 4661 7374 4347 492e 2043 6f6d 7069 r FastCGI. Compi │ │ │ │ +00199600: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso │ │ │ │ +00199610: 6170 2f73 7464 736f 6170 322e 633c 2f63 ap/stdsoap2.c (or gsoap/st │ │ │ │ +00199640: 6473 6f61 7032 2e63 7070 3c2f 636f 6465 dsoap2.cpp) instead. │ │ │ │ +00199660: 3c2f 6464 3e3c 2f64 6c3e 0a3c 703e f09f
    .

    .. │ │ │ │ +00199670: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ +00199680: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ +00199690: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ +001996a0: 0a3c 6832 3e3c 6120 636c 6173 733d 2261 .

    .How to min │ │ │ │ +001996d0: 696d 697a 6520 6170 706c 6963 6174 696f imize applicatio │ │ │ │ +001996e0: 6e20 6d65 6d6f 7279 2066 6f6f 7470 7269 n memory footpri │ │ │ │ +001996f0: 6e74 3c2f 6832 3e0a 3c70 3e54 6f20 636f nt

    .

    To co │ │ │ │ +00199700: 6d70 696c 6520 6753 4f41 5020 6170 706c mpile gSOAP appl │ │ │ │ +00199710: 6963 6174 696f 6e73 2069 6e74 656e 6465 ications intende │ │ │ │ +00199720: 6420 666f 7220 736d 616c 6c20 6d65 6d6f d for small memo │ │ │ │ +00199730: 7279 2064 6576 6963 6573 2c20 796f 7520 ry devices, you │ │ │ │ +00199740: 6d61 7920 7761 6e74 2074 6f20 7265 6d6f may want to remo │ │ │ │ +00199750: 7665 2061 6c6c 206e 6f6e 2d65 7373 656e ve all non-essen │ │ │ │ +00199760: 7469 616c 2066 6561 7475 7265 7320 7468 tial features th │ │ │ │ +00199770: 6174 2063 6f6e 7375 6d65 2070 7265 6369 at consume preci │ │ │ │ +00199780: 6f75 7320 636f 6465 2061 6e64 2064 6174 ous code and dat │ │ │ │ +00199790: 6120 7370 6163 652e 2054 6f20 646f 2074 a space. To do t │ │ │ │ +001997a0: 6869 732c 2063 6f6d 7069 6c65 2074 6865 his, compile the │ │ │ │ +001997b0: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil │ │ │ │ +001997c0: 6573 2077 6974 6820 7468 6520 636f 6d70 es with the comp │ │ │ │ +001997d0: 696c 652d 7469 6d65 2066 6c61 6720 3c63 ile-time flag #WITH_LEAN (i.e. #define WITH_L │ │ │ │ +00199810: 4541 4e3c 2f63 6f64 653e 2920 746f 2072 EAN) to r │ │ │ │ +00199820: 656d 6f76 6520 6d61 6e79 206e 6f6e 2d65 emove many non-e │ │ │ │ +00199830: 7373 656e 7469 616c 2066 6561 7475 7265 ssential feature │ │ │ │ +00199840: 732e 2054 6865 2066 6561 7475 7265 7320 s. The features │ │ │ │ +00199850: 7468 6174 2077 696c 6c20 6265 2064 6973 that will be dis │ │ │ │ +00199860: 6162 6c65 6420 6172 653a 3c2f 703e 0a3c abled are:

    .< │ │ │ │ +00199870: 756c 3e0a 3c6c 693e 4e6f 2055 4450 2073 ul>.
  • No UDP s │ │ │ │ +00199880: 7570 706f 7274 3c2f 6c69 3e0a 3c6c 693e upport
  • .
  • │ │ │ │ +00199890: 4e6f 2048 5454 5020 6b65 6570 2061 6c69 No HTTP keep ali │ │ │ │ +001998a0: 7665 2073 7570 706f 7274 3c2f 6c69 3e0a ve support
  • . │ │ │ │ +001998b0: 3c6c 693e 4e6f 2048 5454 5020 6265 6172
  • No HTTP bear │ │ │ │ +001998c0: 6572 2c20 6261 7369 632c 2061 6e64 2064 er, basic, and d │ │ │ │ +001998d0: 6967 6573 7420 6175 7468 656e 7469 6361 igest authentica │ │ │ │ +001998e0: 7469 6f6e 3c2f 6c69 3e0a 3c6c 693e 4e6f tion
  • .
  • No │ │ │ │ +001998f0: 2048 5454 5020 6368 756e 6b65 6420 6f75 HTTP chunked ou │ │ │ │ +00199900: 7470 7574 2077 6974 6820 3c63 6f64 653e tput with │ │ │ │ +00199910: 2353 4f41 505f 494f 5f43 4855 4e4b 3c2f #SOAP_IO_CHUNK, but chunk │ │ │ │ +00199930: 6564 2048 5454 5020 696e 7075 7420 6973 ed HTTP input is │ │ │ │ +00199940: 2061 6363 6570 7465 643c 2f6c 693e 0a3c accepted
  • .< │ │ │ │ +00199950: 6c69 3e4e 6f20 4854 5450 2063 6f6d 7072 li>No HTTP compr │ │ │ │ +00199960: 6573 7365 6420 6f75 7470 7574 2077 6974 essed output wit │ │ │ │ +00199970: 6820 3c63 6f64 653e 2353 4f41 505f 454e h #SOAP_EN │ │ │ │ +00199980: 435f 5a4c 4942 3c2f 636f 6465 3e2c 2062 C_ZLIB, b │ │ │ │ +00199990: 7574 2063 6f6d 7072 6573 7365 6420 696e ut compressed in │ │ │ │ +001999a0: 7075 7420 6973 2061 6363 6570 7465 643c put is accepted< │ │ │ │ +001999b0: 2f6c 693e 0a3c 6c69 3e4e 6f20 6361 6e6f /li>.
  • No cano │ │ │ │ +001999c0: 6e69 6361 6c20 584d 4c20 6f75 7470 7574 nical XML output │ │ │ │ +001999d0: 2077 6974 6820 3c63 6f64 653e 2353 4f41 with #SOA │ │ │ │ +001999e0: 505f 584d 4c5f 4341 4e4f 4e49 4341 4c3c P_XML_CANONICAL< │ │ │ │ +001999f0: 2f63 6f64 653e 3c2f 6c69 3e0a 3c6c 693e /code>
  • .
  • │ │ │ │ +00199a00: 4e6f 203c 636f 6465 3e3c 6120 636c 6173 No soap::connect_t │ │ │ │ +00199ad0: 696d 656f 7574 3c2f 613e 3c2f 636f 6465 imeout, soap::send_time │ │ │ │ +00199ba0: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2c20 out, │ │ │ │ +00199bb0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap::recv_time │ │ │ │ +00199c70: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2061 out a │ │ │ │ +00199c80: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd soa │ │ │ │ +00199d40: 703a 3a74 7261 6e73 6665 725f 7469 6d65 p::transfer_time │ │ │ │ +00199d50: 6f75 743c 2f61 3e3c 2f63 6f64 653e 2074 out t │ │ │ │ +00199d60: 696d 656f 7574 733c 2f6c 693e 0a3c 6c69 imeouts
  • .
  • No support for │ │ │ │ +00199d80: 736f 636b 6574 2066 6c61 6773 2c20 6e6f socket flags, no │ │ │ │ +00199d90: 203c 636f 6465 3e3c 6120 636c 6173 733d s │ │ │ │ +00199e50: 6f61 703a 3a73 6f63 6b65 745f 666c 6167 oap::socket_flag │ │ │ │ +00199e60: 733c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 s, soap │ │ │ │ +00199f30: 3a3a 636f 6e6e 6563 745f 666c 6167 733c ::connect_flags< │ │ │ │ +00199f40: 2f61 3e3c 2f63 6f64 653e 2c20 3c63 6f64 /a>, soap:: │ │ │ │ +0019a010: 6269 6e64 5f66 6c61 6773 3c2f 613e 3c2f bind_flags, soap::accep │ │ │ │ +0019a0f0: 745f 666c 6167 733c 2f61 3e3c 2f63 6f64 t_flags
  • .
  • No s │ │ │ │ +0019a110: 7570 706f 7274 2066 6f72 203c 636f 6465 upport for time_t s │ │ │ │ +0019a130: 6572 6961 6c69 7a61 7469 6f6e 2077 6974 erialization wit │ │ │ │ +0019a140: 6820 7468 6520 3c63 6f64 653e 7873 645f h the xsd_ │ │ │ │ +0019a150: 5f64 6174 6554 696d 653c 2f63 6f64 653e _dateTime │ │ │ │ +0019a160: 2074 7970 652c 2075 7365 2061 2073 7472 type, use a str │ │ │ │ +0019a170: 696e 6720 746f 2073 746f 7265 2074 6865 ing to store the │ │ │ │ +0019a180: 2064 6174 6520 616e 6420 7469 6d65 2069 date and time i │ │ │ │ +0019a190: 6e73 7465 6164 2e3c 2f6c 693e 0a3c 2f75 nstead.
  • ..

    Use the co │ │ │ │ +0019a1b0: 6d70 696c 652d 7469 6d65 2066 6c61 6720 mpile-time flag │ │ │ │ +0019a1c0: 3c63 6f64 653e 2357 4954 485f 4c45 414e #WITH_LEAN │ │ │ │ +0019a1d0: 4552 3c2f 636f 6465 3e20 746f 206d 616b ER to mak │ │ │ │ +0019a1e0: 6520 7468 6520 6578 6563 7574 6162 6c65 e the executable │ │ │ │ +0019a1f0: 2065 7665 6e20 736d 616c 6c65 7220 6279 even smaller by │ │ │ │ +0019a200: 2072 656d 6f76 696e 6720 4449 4d45 2061 removing DIME a │ │ │ │ +0019a210: 6e64 204d 494d 4520 6174 7461 6368 6d65 nd MIME attachme │ │ │ │ +0019a220: 6e74 2068 616e 646c 696e 672c 203c 636f nt handling, #LONG64 (64 bit) seria │ │ │ │ +0019a250: 6c69 7a61 7469 6f6e 2c20 3c63 6f64 653e lization, │ │ │ │ +0019a260: 7763 6861 725f 742a 3c2f 636f 6465 3e20 wchar_t* │ │ │ │ +0019a270: 7365 7269 616c 697a 6174 696f 6e2c 2061 serialization, a │ │ │ │ +0019a280: 6e64 2073 7570 706f 7274 2066 6f72 2058 nd support for X │ │ │ │ +0019a290: 4d4c 2044 4f4d 206f 7065 7261 7469 6f6e ML DOM operation │ │ │ │ +0019a2a0: 732e 204e 6f74 6520 7468 6174 2044 494d s. Note that DIM │ │ │ │ +0019a2b0: 452f 4d49 4d45 2061 7474 6163 686d 656e E/MIME attachmen │ │ │ │ +0019a2c0: 7473 2061 7265 206e 6f74 2065 7373 656e ts are not essen │ │ │ │ +0019a2d0: 7469 616c 2074 6f20 6163 6869 6576 6520 tial to achieve │ │ │ │ +0019a2e0: 534f 4150 2f58 4d4c 2069 6e74 6572 6f70 SOAP/XML interop │ │ │ │ +0019a2f0: 6572 6162 696c 6974 792e 2044 494d 4520 erability. DIME │ │ │ │ +0019a300: 6174 7461 6368 6d65 6e74 7320 6172 6520 attachments are │ │ │ │ +0019a310: 6120 636f 6e76 656e 6965 6e74 2077 6179 a convenient way │ │ │ │ +0019a320: 2074 6f20 6578 6368 616e 6765 206e 6f6e to exchange non │ │ │ │ +0019a330: 2d74 6578 742d 6261 7365 6420 2869 2e65 -text-based (i.e │ │ │ │ +0019a340: 2e20 6269 6e61 7279 2920 636f 6e74 656e . binary) conten │ │ │ │ +0019a350: 742c 2062 7574 2061 7265 206e 6f74 2072 t, but are not r │ │ │ │ +0019a360: 6571 7569 7265 6420 666f 7220 6261 7369 equired for basi │ │ │ │ +0019a370: 6320 534f 4150 2f58 4d4c 2069 6e74 6572 c SOAP/XML inter │ │ │ │ +0019a380: 6f70 6572 6162 696c 6974 792e 2041 7474 operability. Att │ │ │ │ +0019a390: 6163 686d 656e 7420 7265 7175 6972 656d achment requirem │ │ │ │ +0019a3a0: 656e 7473 2061 7265 2070 7265 6469 6374 ents are predict │ │ │ │ +0019a3b0: 6162 6c65 2e20 5468 6174 2069 732c 2061 able. That is, a │ │ │ │ +0019a3c0: 7070 6c69 6361 7469 6f6e 7320 776f 6e27 pplications won' │ │ │ │ +0019a3d0: 7420 7375 6464 656e 6c79 2064 6563 6964 t suddenly decid │ │ │ │ +0019a3e0: 6520 746f 2075 7365 2044 494d 4520 6f72 e to use DIME or │ │ │ │ +0019a3f0: 204d 494d 4520 696e 7374 6561 6420 6f66 MIME instead of │ │ │ │ +0019a400: 2058 4d4c 2074 6f20 6578 6368 616e 6765 XML to exchange │ │ │ │ +0019a410: 2063 6f6e 7465 6e74 2e3c 2f70 3e0a 3c70 content.

    .

    It is safe to t │ │ │ │ +0019a430: 7279 2074 6f20 636f 6d70 696c 6520 796f ry to compile yo │ │ │ │ +0019a440: 7572 2061 7070 6c69 6361 7469 6f6e 2077 ur application w │ │ │ │ +0019a450: 6974 6820 7468 6520 636f 6d70 696c 652d ith the compile- │ │ │ │ +0019a460: 7469 6d65 2066 6c61 6720 3c63 6f64 653e time flag │ │ │ │ +0019a470: 2357 4954 485f 4c45 414e 3c2f 636f 6465 #WITH_LEAN, provided that │ │ │ │ +0019a490: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio │ │ │ │ +0019a4a0: 6e20 646f 6573 206e 6f74 2072 656c 7920 n does not rely │ │ │ │ +0019a4b0: 6f6e 2049 2f4f 2074 696d 656f 7574 732e on I/O timeouts. │ │ │ │ +0019a4c0: 2057 6865 6e20 6e6f 206c 696e 6b61 6765 When no linkage │ │ │ │ +0019a4d0: 2065 7272 6f72 206f 6363 7572 7320 696e error occurs in │ │ │ │ +0019a4e0: 2074 6865 2063 6f6d 7069 6c61 7469 6f6e the compilation │ │ │ │ +0019a4f0: 2070 726f 6365 7373 2c20 6974 2069 7320 process, it is │ │ │ │ +0019a500: 7361 6665 2074 6f20 6173 7375 6d65 2074 safe to assume t │ │ │ │ +0019a510: 6861 7420 796f 7572 2061 7070 6c69 6361 hat your applica │ │ │ │ +0019a520: 7469 6f6e 2077 696c 6c20 7275 6e20 6a75 tion will run ju │ │ │ │ +0019a530: 7374 2066 696e 652e 3c2f 703e 0a3c 703e st fine.

    .

    │ │ │ │ +0019a540: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +0019a560: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .How to r │ │ │ │ +0019a5a0: 656d 6f76 6520 7468 6520 4253 4420 736f emove the BSD so │ │ │ │ +0019a5b0: 636b 6574 206c 6962 7261 7279 2072 6571 cket library req │ │ │ │ +0019a5c0: 7569 7265 6d65 6e74 3c2f 6832 3e0a 3c70 uirement

    .

    The g │ │ │ │ +0019a5e0: 736f 6170 2f73 7464 736f 6170 322e 633c soap/stdsoap2.c< │ │ │ │ +0019a5f0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ +0019a600: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ +0019a610: 7374 6473 6f61 7032 2e63 7070 3c2f 636f stdsoap2.cpp librari │ │ │ │ +0019a630: 6573 2073 686f 756c 6420 6265 206c 696e es should be lin │ │ │ │ +0019a640: 6b65 6420 7769 7468 2061 2042 5344 2073 ked with a BSD s │ │ │ │ +0019a650: 6f63 6b65 7420 6c69 6272 6172 7920 696e ocket library in │ │ │ │ +0019a660: 2074 6865 2070 726f 6a65 6374 2062 7569 the project bui │ │ │ │ +0019a670: 6c64 2e20 546f 2072 656d 6f76 6520 7468 ld. To remove th │ │ │ │ +0019a680: 6520 6e65 6564 2074 6f20 6c69 6e6b 2061 e need to link a │ │ │ │ +0019a690: 2073 6f63 6b65 7420 6c69 6272 6172 792c socket library, │ │ │ │ +0019a6a0: 2079 6f75 2063 616e 2063 6f6d 7069 6c65 you can compile │ │ │ │ +0019a6b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ +0019a6c0: 2f73 7464 736f 6170 322e 633c 2f63 6f64 /stdsoap2.c (for C) │ │ │ │ +0019a6e0: 616e 6420 3c65 6d3e 3c63 6f64 653e 6773 and gs │ │ │ │ +0019a6f0: 6f61 702f 7374 6473 6f61 7032 2e63 7070 oap/stdsoap2.cpp │ │ │ │ +0019a700: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 666f (fo │ │ │ │ +0019a710: 7220 432b 2b29 2077 6974 6820 7468 6520 r C++) with the │ │ │ │ +0019a720: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time │ │ │ │ +0019a730: 2066 6c61 6720 3c63 6f64 653e 2357 4954 flag #WIT │ │ │ │ +0019a740: 485f 4e4f 494f 3c2f 636f 6465 3e20 6d61 H_NOIO ma │ │ │ │ +0019a750: 6372 6f20 7365 7420 2869 2e65 2e20 3c63 cro set (i.e. #define WITH │ │ │ │ +0019a770: 5f4e 4f49 4f3c 2f63 6f64 653e 292e 2054 _NOIO). T │ │ │ │ +0019a780: 6869 7320 7265 6d6f 7665 7320 7468 6520 his removes the │ │ │ │ +0019a790: 6465 7065 6e64 656e 6379 206f 6e20 7468 dependency on th │ │ │ │ +0019a7a0: 6520 4253 4420 736f 636b 6574 2041 5049 e BSD socket API │ │ │ │ +0019a7b0: 2c20 494f 2073 7472 6561 6d73 2c20 3c63 , IO streams, FILE │ │ │ │ +0019a7d0: 7479 7065 2c20 616e 6420 3c63 6f64 653e type, and │ │ │ │ +0019a7e0: 6572 726e 6f3c 2f63 6f64 653e 2e3c 2f70 errno.

    .

    You should │ │ │ │ +0019a800: 6465 6669 6e65 2063 616c 6c62 6163 6b73 define callbacks │ │ │ │ +0019a810: 2074 6f20 7265 706c 6163 6520 7468 6520 to replace the │ │ │ │ +0019a820: 6d69 7373 696e 6720 736f 636b 6574 2073 missing socket s │ │ │ │ +0019a830: 7461 636b 2e20 546f 2064 6f20 736f 2c20 tack. To do so, │ │ │ │ +0019a840: 6164 6420 746f 2079 6f75 7220 636f 6465 add to your code │ │ │ │ +0019a850: 2074 6865 2066 6f6c 6c6f 7769 6e67 2064 the following d │ │ │ │ +0019a860: 6566 696e 6974 696f 6e73 3a3c 2f70 3e0a efinitions:

    . │ │ │ │ +0019a870: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    st │ │ │ │ +0019a8b0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap soap; .
    soap_ │ │ │ │ +0019a990: 696e 6974 3c2f 613e 2826 616d 703b 3c61 init(&soap); │ │ │ │ +0019a9d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +0019aa00: 2a20 6673 656e 6420 6973 2075 7365 6420 * fsend is used │ │ │ │ +0019aa10: 746f 2074 7261 6e73 6d69 7420 6461 7461 to transmit data │ │ │ │ +0019aa20: 2069 6e20 626c 6f63 6b73 202a 2f3c 2f73 in blocks */
    .
    soap.fsend = │ │ │ │ +0019aae0: 206d 795f 7365 6e64 3b20 3c2f 6469 763e my_send;
    │ │ │ │ +0019aaf0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* frec │ │ │ │ +0019ab20: 7620 6973 2075 7365 6420 746f 2072 6563 v is used to rec │ │ │ │ +0019ab30: 6569 7665 2064 6174 6120 696e 2062 6c6f eive data in blo │ │ │ │ +0019ab40: 636b 7320 2a2f 3c2f 7370 616e 3e20 3c2f cks */ ..
    /* fopen is us │ │ │ │ +0019ac40: 6564 2074 6f20 636f 6e6e 6563 7420 2a2f ed to connect */ │ │ │ │ +0019ac50: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0019ac60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0019ac70: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ +0019aca0: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fopen = my_tcp_conne │ │ │ │ +0019ad10: 6374 3b20 3c2f 6469 763e 0a3c 6469 7620 ct;
    .
    /* fclose is │ │ │ │ +0019ad50: 7573 6564 2074 6f20 6469 7363 6f6e 6e65 used to disconne │ │ │ │ +0019ad60: 6374 202a 2f3c 2f73 7061 6e3e 203c 2f64 ct */ .
    soa │ │ │ │ +0019adb0: 703c 2f61 3e2e 3c61 2063 6c61 7373 3d22 p.fcl │ │ │ │ +0019ae10: 6f73 653c 2f61 3e20 3d20 6d79 5f74 6370 ose = my_tcp │ │ │ │ +0019ae20: 5f64 6973 636f 6e6e 6563 743b 203c 2f64 _disconnect; .
    /* f │ │ │ │ +0019ae60: 636c 6f73 6573 6f63 6b65 7420 6973 2075 closesocket is u │ │ │ │ +0019ae70: 7365 6420 6f6e 6c79 2074 6f20 636c 6f73 sed only to clos │ │ │ │ +0019ae80: 6520 7468 6520 6d61 7374 6572 2073 6f63 e the master soc │ │ │ │ +0019ae90: 6b65 7420 696e 2061 2073 6572 7665 7220 ket in a server │ │ │ │ +0019aea0: 7570 6f6e 2073 6f61 705f 646f 6e65 2829 upon soap_done() │ │ │ │ +0019aeb0: 202a 2f3c 2f73 7061 6e3e 203c 2f64 6976 */
    .
    soap< │ │ │ │ +0019af00: 2f61 3e2e 3c61 2063 6c61 7373 3d22 636f /a>.fclos │ │ │ │ +0019af60: 6573 6f63 6b65 743c 2f61 3e20 3d20 6d79 esocket = my │ │ │ │ +0019af70: 5f74 6370 5f63 6c6f 7365 736f 636b 6574 _tcp_closesocket │ │ │ │ +0019af80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    /* fshutdownsoc │ │ │ │ +0019afc0: 6b65 7420 6973 2075 7365 6420 6166 7465 ket is used afte │ │ │ │ +0019afd0: 7220 636f 6d70 6c65 7469 6e67 2061 2073 r completing a s │ │ │ │ +0019afe0: 656e 6420 6f70 6572 6174 696f 6e20 746f end operation to │ │ │ │ +0019aff0: 2073 656e 6420 5443 5020 4649 4e20 2a2f send TCP FIN */ │ │ │ │ +0019b000: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +0019b010: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0019b020: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap │ │ │ │ +0019b050: 2e3c 6120 636c 6173 733d 2263 6f64 6522 .fshutdow │ │ │ │ +0019b0b0: 6e73 6f63 6b65 743c 2f61 3e20 3d20 6d79 nsocket = my │ │ │ │ +0019b0c0: 5f74 6370 5f73 6875 7464 6f77 6e73 6f63 _tcp_shutdownsoc │ │ │ │ +0019b0d0: 6b65 743b 203c 2f64 6976 3e0a 3c64 6976 ket;
    .
    /* setting f │ │ │ │ +0019b110: 706f 6c6c 2069 7320 6f70 7469 6f6e 616c poll is optional │ │ │ │ +0019b120: 2c20 6c65 6176 6520 6974 204e 554c 4c20 , leave it NULL │ │ │ │ +0019b130: 746f 206f 6d69 7420 706f 6c6c 696e 6720 to omit polling │ │ │ │ +0019b140: 7468 6520 7365 7276 6572 202a 2f3c 2f73 the server */
    .
    soap.fpoll = │ │ │ │ +0019b200: 206d 795f 706f 6c6c 3b20 3c2f 6469 763e my_poll;
    │ │ │ │ +0019b210: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    /* facc │ │ │ │ +0019b240: 6570 7420 6973 2075 7365 6420 6f6e 6c79 ept is used only │ │ │ │ +0019b250: 2062 7920 6120 7365 7276 6572 2061 7070 by a server app │ │ │ │ +0019b260: 6c69 6361 7469 6f6e 202a 2f3c 2f73 7061 lication */
    .
    soap.faccept = │ │ │ │ +0019b320: 206d 795f 6163 6365 7074 3b3c 2f64 6976 my_accept;
    .
    │ │ │ │ +0019b410: 696e 7428 2a20 6670 6f6c 6c29 2873 7472 int(* fpoll)(str │ │ │ │ +0019b420: 7563 7420 736f 6170 202a 736f 6170 293c uct soap *soap)< │ │ │ │ +0019b430: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Callback │ │ │ │ +0019b450: 2074 6861 7420 626c 6f63 6b73 2075 6e74 that blocks unt │ │ │ │ +0019b460: 696c 2061 6374 6976 6974 7920 6973 2064 il activity is d │ │ │ │ +0019b470: 6574 6563 7465 6420 6f6e 2074 6865 2073 etected on the s │ │ │ │ +0019b480: 6f61 703a 3a73 6f63 6b65 7420 6f72 2073 oap::socket or s │ │ │ │ +0019b490: 6f61 703a 3a6d 6173 7465 7220 736f 636b oap::master sock │ │ │ │ +0019b4a0: 6574 2c2e 2e2e 3c2f 6469 763e 3c64 6976 et,...
    < │ │ │ │ +0019b4c0: 623e 4465 6669 6e69 7469 6f6e 3a3c 2f62 b>Definition: stdsoap2.h:459 │ │ │ │ +0019b4e0: 343c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 4
    .< │ │ │ │ +0019b5c0: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +0019b5d0: 6922 3e69 6e74 282a 2066 636c 6f73 6573 i">int(* fcloses │ │ │ │ +0019b5e0: 6f63 6b65 7429 2873 7472 7563 7420 736f ocket)(struct so │ │ │ │ +0019b5f0: 6170 202a 736f 6170 2c20 534f 4150 5f53 ap *soap, SOAP_S │ │ │ │ +0019b600: 4f43 4b45 5420 736f 636b 293c 2f64 6976 OCKET sock)
    Callback tha │ │ │ │ +0019b630: 7420 636c 6f73 6573 2061 2067 6976 656e t closes a given │ │ │ │ +0019b640: 2073 6f63 6b65 742e 3c2f 6469 763e 3c64 socket.
    Definition:< │ │ │ │ +0019b670: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4 │ │ │ │ +0019b680: 3537 303c 2f64 6976 3e3c 2f64 6976 3e0a 570
    . │ │ │ │ +0019b690: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    soap::fshut │ │ │ │ +0019b750: 646f 776e 736f 636b 6574 3c2f 613e 3c2f downsocket
    int(* fs │ │ │ │ +0019b780: 6875 7464 6f77 6e73 6f63 6b65 7429 2873 hutdownsocket)(s │ │ │ │ +0019b790: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +0019b7a0: 2c20 534f 4150 5f53 4f43 4b45 5420 736f , SOAP_SOCKET so │ │ │ │ +0019b7b0: 636b 2c20 696e 7420 686f 7729 3c2f 6469 ck, int how)
    Callback th │ │ │ │ +0019b7e0: 6174 2073 6875 7473 2064 6f77 6e20 6120 at shuts down a │ │ │ │ +0019b7f0: 6769 7665 6e20 736f 636b 6574 2e3c 2f64 given socket.
    Definit │ │ │ │ +0019b820: 696f 6e3a 3c2f 623e 2073 7464 736f 6170 ion: stdsoap │ │ │ │ +0019b830: 322e 683a 3435 3833 3c2f 6469 763e 3c2f 2.h:4583
    .
    │ │ │ │ +0019b8b0: 3c61 2068 7265 663d 2267 726f 7570 5f5f soap:: │ │ │ │ +0019b900: 6661 6363 6570 743c 2f61 3e3c 2f64 6976 faccept
    SOAP_SOCKET │ │ │ │ +0019b930: 282a 2066 6163 6365 7074 2928 7374 7275 (* faccept)(stru │ │ │ │ +0019b940: 6374 2073 6f61 7020 2a73 6f61 702c 2053 ct soap *soap, S │ │ │ │ +0019b950: 4f41 505f 534f 434b 4554 2073 6f63 6b2c OAP_SOCKET sock, │ │ │ │ +0019b960: 2073 7472 7563 7420 736f 636b 6164 6472 struct sockaddr │ │ │ │ +0019b970: 202a 6164 6472 2c20 696e 7420 2a6c 656e *addr, int *len │ │ │ │ +0019b980: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Callba │ │ │ │ +0019b9a0: 636b 2074 6861 7420 7761 6974 7320 666f ck that waits fo │ │ │ │ +0019b9b0: 7220 616e 6420 6163 6365 7074 7320 6120 r and accepts a │ │ │ │ +0019b9c0: 736f 636b 6574 2063 6f6e 6e65 6374 696f socket connectio │ │ │ │ +0019b9d0: 6e20 7265 7175 6573 7465 6420 6279 2061 n requested by a │ │ │ │ +0019b9e0: 2063 6c69 656e 742e 3c2f 6469 763e 3c64 client.
    Definition:< │ │ │ │ +0019ba10: 2f62 3e20 7374 6473 6f61 7032 2e68 3a34 /b> stdsoap2.h:4 │ │ │ │ +0019ba20: 3530 393c 2f64 6976 3e3c 2f64 6976 3e0a 509
    . │ │ │ │ +0019ba30: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    These │ │ │ │ +0019ba50: 6675 6e63 7469 6f6e 7320 7368 6f75 6c64 functions should │ │ │ │ +0019ba60: 2070 726f 7669 6465 2061 206d 696e 696d provide a minim │ │ │ │ +0019ba70: 616c 2069 6e70 7574 2f6f 7574 7075 7420 al input/output │ │ │ │ +0019ba80: 7374 6163 6b20 283c 636f 6465 3e3c 6120 stack (soap::frec │ │ │ │ +0019bb30: 763c 2f61 3e3c 2f63 6f64 653e 2061 6e64 v and │ │ │ │ +0019bb40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap::fsend │ │ │ │ +0019bbe0: 3c2f 636f 6465 3e29 2074 6f20 7265 6164 ) to read │ │ │ │ +0019bbf0: 2f77 7269 7465 2058 4d4c 2061 6e64 2073 /write XML and s │ │ │ │ +0019bc00: 6f63 6b65 742d 6c69 6b65 2073 7461 636b ocket-like stack │ │ │ │ +0019bc10: 2028 7468 6520 6f74 6865 7220 6675 6e63 (the other func │ │ │ │ +0019bc20: 7469 6f6e 7329 2077 6865 6e20 6465 7665 tions) when deve │ │ │ │ +0019bc30: 6c6f 7069 6e67 2063 6c69 656e 7420 616e loping client an │ │ │ │ +0019bc40: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica │ │ │ │ +0019bc50: 7469 6f6e 732e 3c2f 703e 0a3c 703e 5365 tions.

    .

    Se │ │ │ │ +0019bc60: 6520 5365 6374 696f 6e20 3c61 2063 6c61 e Section Function call │ │ │ │ +0019bca0: 6261 636b 7320 666f 7220 6375 7374 6f6d backs for custom │ │ │ │ +0019bcb0: 697a 6564 2049 2f4f 2061 6e64 2048 5454 ized I/O and HTT │ │ │ │ +0019bcc0: 5020 6861 6e64 6c69 6e67 3c2f 613e 2066 P handling f │ │ │ │ +0019bcd0: 6f72 206d 6f72 6520 6465 7461 696c 7320 or more details │ │ │ │ +0019bce0: 6f6e 2074 6865 2075 7365 206f 6620 7468 on the use of th │ │ │ │ +0019bcf0: 6573 6520 6361 6c6c 6261 636b 732e 2041 ese callbacks. A │ │ │ │ +0019bd00: 6c6c 2063 616c 6c62 6163 6b20 6675 6e63 ll callback func │ │ │ │ +0019bd10: 7469 6f6e 2070 6f69 6e74 6572 7320 7368 tion pointers sh │ │ │ │ +0019bd20: 6f75 6c64 2062 6520 6e6f 6e2d 4e55 4c4c ould be non-NULL │ │ │ │ +0019bd30: 2c20 6578 6365 7074 203c 636f 6465 3e3c , except < │ │ │ │ +0019bd40: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0019bd50: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0019bd60: 5f63 616c 6c62 6163 6b73 2e68 746d 6c23 _callbacks.html# │ │ │ │ +0019bd70: 6761 3230 3231 3061 6131 3731 3031 3962 ga20210aa171019b │ │ │ │ +0019bd80: 3237 6566 3138 3264 3835 3365 3264 3665 27ef182d853e2d6e │ │ │ │ +0019bd90: 3266 2220 7469 746c 653d 2243 616c 6c62 2f" title="Callb │ │ │ │ +0019bda0: 6163 6b20 7468 6174 2062 6c6f 636b 7320 ack that blocks │ │ │ │ +0019bdb0: 756e 7469 6c20 6163 7469 7669 7479 2069 until activity i │ │ │ │ +0019bdc0: 7320 6465 7465 6374 6564 206f 6e20 7468 s detected on th │ │ │ │ +0019bdd0: 6520 736f 6170 3a3a 736f 636b 6574 206f e soap::socket o │ │ │ │ +0019bde0: 7220 736f 6170 3a3a 6d61 7374 6572 2073 r soap::master s │ │ │ │ +0019bdf0: 6f63 6b65 742c 2e2e 2e22 3e73 6f61 703a ocket,...">soap: │ │ │ │ +0019be00: 3a66 706f 6c6c 3c2f 613e 3c2f 636f 6465 :fpoll.

    .

    You ca │ │ │ │ +0019be20: 6e6e 6f74 2075 7365 203c 636f 6465 3e3c nnot use < │ │ │ │ +0019be30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0019be40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +0019be50: 5f66 6175 6c74 2e68 746d 6c23 6761 3933 _fault.html#ga93 │ │ │ │ +0019be60: 3161 3461 6236 6466 3235 3533 6234 3861 1a4ab6df2553b48a │ │ │ │ +0019be70: 3063 3237 3066 3861 3061 3838 6166 2220 0c270f8a0a88af" │ │ │ │ +0019be80: 7469 746c 653d 2250 7269 6e74 2065 7272 title="Print err │ │ │ │ +0019be90: 6f72 206d 6573 7361 6765 206f 6e20 7468 or message on th │ │ │ │ +0019bea0: 6520 7370 6563 6966 6965 6420 6f75 7470 e specified outp │ │ │ │ +0019beb0: 7574 2e22 3e73 6f61 705f 7072 696e 745f ut.">soap_print_ │ │ │ │ +0019bec0: 6661 756c 743c 2f61 3e3c 2f63 6f64 653e fault │ │ │ │ +0019bed0: 2061 6e64 203c 636f 6465 3e3c 6120 636c and soap_pr │ │ │ │ +0019bf80: 696e 745f 6661 756c 745f 6c6f 6361 7469 int_fault_locati │ │ │ │ +0019bf90: 6f6e 3c2f 613e 3c2f 636f 6465 3e20 746f on to │ │ │ │ +0019bfa0: 2070 7269 6e74 2065 7272 6f72 2064 6961 print error dia │ │ │ │ +0019bfb0: 676e 6f73 7469 6373 2e20 496e 7374 6561 gnostics. Instea │ │ │ │ +0019bfc0: 642c 2074 6865 2076 616c 7565 206f 6620 d, the value of │ │ │ │ +0019bfd0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap │ │ │ │ +0019c080: 3a3a 6572 726f 723c 2f61 3e3c 2f63 6f64 ::error, which contai │ │ │ │ +0019c0a0: 6e73 2074 6865 2067 534f 4150 2065 7272 ns the gSOAP err │ │ │ │ +0019c0b0: 6f72 2063 6f64 652c 2063 616e 2062 6520 or code, can be │ │ │ │ +0019c0c0: 7573 6564 2074 6f20 6465 7465 726d 696e used to determin │ │ │ │ +0019c0d0: 6520 7468 6520 6361 7573 6520 6f66 2061 e the cause of a │ │ │ │ +0019c0e0: 2066 6175 6c74 2e3c 2f70 3e0a 3c70 3ef0 fault.

    .

    . │ │ │ │ +0019c0f0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ +0019c100: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ +0019c110: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .How to │ │ │ │ +0019c150: 2063 6f6d 6269 6e65 206d 756c 7469 706c combine multipl │ │ │ │ +0019c160: 6520 636c 6965 6e74 2061 6e64 2073 6572 e client and ser │ │ │ │ +0019c170: 7665 7220 696d 706c 656d 656e 7461 7469 ver implementati │ │ │ │ +0019c180: 6f6e 7320 696e 746f 206f 6e65 2065 7865 ons into one exe │ │ │ │ +0019c190: 6375 7461 626c 653c 2f68 323e 0a3c 703e cutable

    .

    │ │ │ │ +0019c1a0: 5468 6520 7773 646c 3268 2074 6f6f 6c20 The wsdl2h tool │ │ │ │ +0019c1b0: 6361 6e20 6265 2075 7365 6420 746f 2069 can be used to i │ │ │ │ +0019c1c0: 6d70 6f72 7420 6d75 6c74 6970 6c65 2057 mport multiple W │ │ │ │ +0019c1d0: 5344 4c73 2061 6e64 2073 6368 656d 6173 SDLs and schemas │ │ │ │ +0019c1e0: 2061 7420 6f6e 6365 2e20 5468 6520 7365 at once. The se │ │ │ │ +0019c1f0: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition │ │ │ │ +0019c200: 7320 6172 6520 636f 6d62 696e 6564 2069 s are combined i │ │ │ │ +0019c210: 6e20 6f6e 6520 6865 6164 6572 2066 696c n one header fil │ │ │ │ +0019c220: 6520 746f 2062 6520 7061 7273 6564 2062 e to be parsed b │ │ │ │ +0019c230: 7920 736f 6170 6370 7032 2e20 4974 2069 y soapcpp2. It i │ │ │ │ +0019c240: 7320 696d 706f 7274 616e 7420 746f 2061 s important to a │ │ │ │ +0019c250: 7373 6967 6e20 6e61 6d65 7370 6163 6520 ssign namespace │ │ │ │ +0019c260: 7072 6566 6978 6573 2074 6f20 6e61 6d65 prefixes to name │ │ │ │ +0019c270: 7370 6163 6520 5552 4973 2075 7369 6e67 space URIs using │ │ │ │ +0019c280: 2074 6865 203c 656d 3e3c 636f 6465 3e74 the t │ │ │ │ +0019c290: 7970 656d 6170 2e64 6174 3c2f 636f 6465 ypemap.dat file. Oth │ │ │ │ +0019c2b0: 6572 7769 7365 2c20 7773 646c 3268 2077 erwise, wsdl2h w │ │ │ │ +0019c2c0: 696c 6c20 6173 7369 676e 206e 616d 6573 ill assign names │ │ │ │ +0019c2d0: 7061 6365 2070 7265 6669 7865 7320 3c63 pace prefixes ns1, │ │ │ │ +0019c2f0: 3c63 6f64 653e 6e73 323c 2f63 6f64 653e ns2 │ │ │ │ +0019c300: 2c20 616e 6420 736f 206f 6e20 746f 2074 , and so on to t │ │ │ │ +0019c310: 6865 2073 6572 7669 6365 206f 7065 7261 he service opera │ │ │ │ +0019c320: 7469 6f6e 7320 616e 6420 7363 6865 6d61 tions and schema │ │ │ │ +0019c330: 2074 7970 6573 2e20 5468 7573 2c20 616e types. Thus, an │ │ │ │ +0019c340: 7920 6368 616e 6765 2074 6f20 6120 5753 y change to a WS │ │ │ │ +0019c350: 444c 206f 7220 7363 6865 6d61 206d 6179 DL or schema may │ │ │ │ +0019c360: 2072 6573 756c 7420 696e 2061 206e 6577 result in a new │ │ │ │ +0019c370: 2070 7265 6669 7820 6173 7369 676e 6d65 prefix assignme │ │ │ │ +0019c380: 6e74 2e20 466f 7220 6d6f 7265 2064 6574 nt. For more det │ │ │ │ +0019c390: 6169 6c73 2c20 706c 6561 7365 2073 6565 ails, please see │ │ │ │ +0019c3a0: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section Customizing XML │ │ │ │ +0019c3e0: 2064 6174 6120 6269 6e64 696e 6773 2077 data bindings w │ │ │ │ +0019c3f0: 6974 6820 7468 6520 7479 7065 6d61 702e ith the typemap. │ │ │ │ +0019c400: 6461 7420 6669 6c65 3c2f 613e 202e 3c2f dat file ..

    Another ap │ │ │ │ +0019c420: 7072 6f61 6368 2074 6f20 636f 6d62 696e proach to combin │ │ │ │ +0019c430: 6520 6d75 6c74 6970 6c65 2063 6c69 656e e multiple clien │ │ │ │ +0019c440: 7420 616e 6420 7365 7276 6963 6520 6170 t and service ap │ │ │ │ +0019c450: 706c 6963 6174 696f 6e73 2069 6e74 6f20 plications into │ │ │ │ +0019c460: 6f6e 6520 6578 6563 7574 6162 6c65 2069 one executable i │ │ │ │ +0019c470: 7320 6279 2075 7369 6e67 2043 2b2b 206e s by using C++ n │ │ │ │ +0019c480: 616d 6573 7061 6365 7320 746f 2073 7472 amespaces to str │ │ │ │ +0019c490: 7563 7475 7261 6c6c 7920 7365 7061 7261 ucturally separa │ │ │ │ +0019c4a0: 7465 2074 6865 2064 6566 696e 6974 696f te the definitio │ │ │ │ +0019c4b0: 6e73 2e20 5468 6973 2069 7320 6175 746f ns. This is auto │ │ │ │ +0019c4c0: 6d61 7465 6420 7769 7468 203c 6120 6872 mated with < │ │ │ │ +0019c4e0: 623e 3c63 6f64 653e 7773 646c 3268 202d b>wsdl2h - │ │ │ │ +0019c4f0: 7120 6e61 6d65 3c2f 636f 6465 3e3c 2f62 q name option -q name │ │ │ │ +0019c520: 3c2f 623e 3c2f 613e 2e20 4f72 2062 7920 . Or by │ │ │ │ +0019c530: 6372 6561 7469 6e67 206c 6962 7261 7269 creating librari │ │ │ │ +0019c540: 6573 2069 6e20 4320 666f 7220 7468 6520 es in C for the │ │ │ │ +0019c550: 636c 6965 6e74 2f73 6572 7665 7220 6f62 client/server ob │ │ │ │ +0019c560: 6a65 6374 7320 6173 2065 7870 6c61 696e jects as explain │ │ │ │ +0019c570: 6564 2069 6e20 7375 6273 6571 7565 6e74 ed in subsequent │ │ │ │ +0019c580: 2073 6563 7469 6f6e 733c 2f70 3e0a 3c70 sections

    .

    Both approaches │ │ │ │ +0019c5a0: 2061 7265 2064 656d 6f6e 7374 7261 7465 are demonstrate │ │ │ │ +0019c5b0: 6420 6279 2065 7861 6d70 6c65 7320 696e d by examples in │ │ │ │ +0019c5c0: 2074 6865 2067 534f 4150 2073 6f75 7263 the gSOAP sourc │ │ │ │ +0019c5d0: 6520 636f 6465 2070 6163 6b61 6765 2c20 e code package, │ │ │ │ +0019c5e0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs │ │ │ │ +0019c5f0: 6f61 702f 7361 6d70 6c65 732f 6c69 6e6b oap/samples/link │ │ │ │ +0019c600: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 4320 (C │ │ │ │ +0019c610: 6f6e 6c79 2920 616e 6420 3c65 6d3e 3c63 only) and gsoap/sample │ │ │ │ +0019c630: 732f 6c69 6e6b 2b2b 3c2f 636f 6465 3e3c s/link++< │ │ │ │ +0019c640: 2f65 6d3e 2028 432b 2b20 7769 7468 2043 /em> (C++ with C │ │ │ │ +0019c650: 2b2b 206e 616d 6573 7061 6365 7329 2065 ++ namespaces) e │ │ │ │ +0019c660: 7861 6d70 6c65 732e 3c2f 703e 0a3c 703e xamples.

    .

    │ │ │ │ +0019c670: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +0019c690: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    │ │ │ │ +0019c6d0: 0a48 6f77 2074 6f20 6275 696c 6420 6120 .How to build a │ │ │ │ +0019c6e0: 636c 6965 6e74 206f 7220 7365 7276 6572 client or server │ │ │ │ +0019c6f0: 2069 6e20 6120 432b 2b20 636f 6465 206e in a C++ code n │ │ │ │ +0019c700: 616d 6573 7061 6365 3c2f 6832 3e0a 3c70 amespace

    .

    You can use a C │ │ │ │ +0019c720: 2b2b 2063 6f64 6520 6e61 6d65 7370 6163 ++ code namespac │ │ │ │ +0019c730: 6520 6f66 2079 6f75 7220 6368 6f69 6365 e of your choice │ │ │ │ +0019c740: 2069 6e20 796f 7572 2069 6e74 6572 6661 in your interfa │ │ │ │ +0019c750: 6365 2068 6561 6465 7220 6669 6c65 2074 ce header file t │ │ │ │ +0019c760: 6f20 6275 696c 6420 6120 636c 6965 6e74 o build a client │ │ │ │ +0019c770: 206f 7220 7365 7276 6572 2069 6e20 7468 or server in th │ │ │ │ +0019c780: 6174 2043 2b2b 206e 616d 6573 7061 6365 at C++ namespace │ │ │ │ +0019c790: 2e20 496e 2074 6869 7320 7761 792c 2079 . In this way, y │ │ │ │ +0019c7a0: 6f75 2063 616e 2063 7265 6174 6520 6d75 ou can create mu │ │ │ │ +0019c7b0: 6c74 6970 6c65 2063 6c69 656e 7473 2061 ltiple clients a │ │ │ │ +0019c7c0: 6e64 2073 6572 7665 7273 2074 6861 7420 nd servers that │ │ │ │ +0019c7d0: 6361 6e20 6265 2063 6f6d 6269 6e65 6420 can be combined │ │ │ │ +0019c7e0: 616e 6420 6c69 6e6b 6564 2074 6f67 6574 and linked toget │ │ │ │ +0019c7f0: 6865 7220 7769 7468 6f75 7420 636f 6e66 her without conf │ │ │ │ +0019c800: 6c69 6374 732c 2077 6869 6368 2069 7320 licts, which is │ │ │ │ +0019c810: 6578 706c 6169 6e65 6420 696e 206d 6f72 explained in mor │ │ │ │ +0019c820: 6520 6465 7461 696c 2069 6e20 7468 6520 e detail in the │ │ │ │ +0019c830: 6e65 7874 2073 6563 7469 6f6e 2028 7768 next section (wh │ │ │ │ +0019c840: 6963 6820 616c 736f 2073 686f 7773 2061 ich also shows a │ │ │ │ +0019c850: 6e20 6578 616d 706c 6520 636f 6d62 696e n example combin │ │ │ │ +0019c860: 696e 6720 7477 6f20 636c 6965 6e74 206c ing two client l │ │ │ │ +0019c870: 6962 7261 7269 6573 2064 6566 696e 6564 ibraries defined │ │ │ │ +0019c880: 2069 6e20 7477 6f20 432b 2b20 636f 6465 in two C++ code │ │ │ │ +0019c890: 206e 616d 6573 7061 6365 7329 2e3c 2f70 namespaces).

    .

    Use │ │ │ │ +0019c8c0: 3c63 6f64 653e 7773 646c 3268 202d 7120 wsdl2h -q │ │ │ │ +0019c8d0: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name │ │ │ │ +0019c8e0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ +0019c8f0: 2d71 206e 616d 653c 2f63 6f64 653e 3c2f -q name to genera │ │ │ │ +0019c910: 7465 2064 6566 696e 6974 696f 6e73 2069 te definitions i │ │ │ │ +0019c920: 6e20 7468 6520 432b 2b20 3c63 6f64 653e n the C++ │ │ │ │ +0019c930: 6e61 6d65 3c2f 636f 6465 3e20 6e61 6d65 name name │ │ │ │ +0019c940: 7370 6163 652e 2054 6869 7320 6f70 7469 space. This opti │ │ │ │ +0019c950: 6f6e 2063 616e 2061 6c73 6f20 6265 2075 on can also be u │ │ │ │ +0019c960: 7365 6420 696e 2063 6f6d 6269 6e61 7469 sed in combinati │ │ │ │ +0019c970: 6f6e 2077 6974 6820 432b 2b20 7072 6f78 on with C++ prox │ │ │ │ +0019c980: 7920 616e 6420 7365 7276 6572 206f 626a y and server obj │ │ │ │ +0019c990: 6563 7420 6765 6e65 7261 7469 6f6e 2c20 ect generation, │ │ │ │ +0019c9a0: 7573 696e 6720 3c62 3e3c 636f 6465 3e73 using s │ │ │ │ +0019c9b0: 6f61 7063 7070 3220 2d6a 3c2f 636f 6465 oapcpp2 -j option │ │ │ │ +0019c9d0: 3c63 6f64 653e 2d6a 3c2f 636f 6465 3e3c -j< │ │ │ │ +0019c9e0: 2f62 3e20 6f72 206f 7074 696f 6e20 3c62 /b> or option -i │ │ │ │ +0019ca00: 3c2f 623e 292e 3c2f 703e 0a3c 703e 4174 ).

    .

    At │ │ │ │ +0019ca10: 206d 6f73 7420 6f6e 6520 6e61 6d65 7370 most one namesp │ │ │ │ +0019ca20: 6163 6520 6361 6e20 6265 2064 6566 696e ace can be defin │ │ │ │ +0019ca30: 6564 2066 6f72 2074 6865 2065 6e74 6972 ed for the entir │ │ │ │ +0019ca40: 6520 696e 7465 7266 6163 6520 6865 6164 e interface head │ │ │ │ +0019ca50: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap │ │ │ │ +0019ca60: 6370 7032 2e20 5468 6520 432b 2b20 6e61 cpp2. The C++ na │ │ │ │ +0019ca70: 6d65 7370 6163 6520 6d75 7374 2063 6f6d mespace must com │ │ │ │ +0019ca80: 706c 6574 656c 7920 656e 6361 7073 756c pletely encapsul │ │ │ │ +0019ca90: 6174 6520 7468 6520 656e 7469 7265 2063 ate the entire c │ │ │ │ +0019caa0: 6f6e 7465 6e74 7320 6f66 2074 6865 2068 ontents of the h │ │ │ │ +0019cab0: 6561 6465 7220 6669 6c65 3a3c 2f70 3e0a eader file:

    . │ │ │ │ +0019cac0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    na │ │ │ │ +0019cb00: 6d65 7370 6163 6520 3c2f 7370 616e 3e4e mespace N │ │ │ │ +0019cb10: 616d 6573 7061 6365 4e61 6d65 207b 3c2f amespaceName {.
    ... interface header file │ │ │ │ +0019cb70: 636f 6e74 656e 7473 202e 2e2e 203c 2f64 contents ... .
    }
    .

    When com │ │ │ │ +0019cbc0: 7069 6c69 6e67 2074 6869 7320 696e 7465 piling this inte │ │ │ │ +0019cbd0: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil │ │ │ │ +0019cbe0: 6520 7769 7468 2074 6865 2073 6f61 7063 e with the soapc │ │ │ │ +0019cbf0: 7070 3220 746f 6f6c 2c20 616c 6c20 7479 pp2 tool, all ty │ │ │ │ +0019cc00: 7065 2064 6566 696e 6974 696f 6e73 2c20 pe definitions, │ │ │ │ +0019cc10: 7468 6520 7365 7269 616c 697a 6572 7320 the serializers │ │ │ │ +0019cc20: 666f 7220 7468 6573 6520 7479 7065 732c for these types, │ │ │ │ +0019cc30: 2061 6e64 2074 6865 2073 7475 6220 616e and the stub an │ │ │ │ +0019cc40: 6420 736b 656c 6574 6f6e 2066 756e 6374 d skeleton funct │ │ │ │ +0019cc50: 696f 6e73 2077 696c 6c20 6265 2070 6c61 ions will be pla │ │ │ │ +0019cc60: 6365 6420 696e 2074 6869 7320 6e61 6d65 ced in this name │ │ │ │ +0019cc70: 7370 6163 652e 2054 6865 2058 4d4c 206e space. The XML n │ │ │ │ +0019cc80: 616d 6573 7061 6365 206d 6170 7069 6e67 amespace mapping │ │ │ │ +0019cc90: 2074 6162 6c65 2028 7361 7665 6420 696e table (saved in │ │ │ │ +0019cca0: 2061 203c 656d 3e3c 636f 6465 3e2e 6e73 a .ns │ │ │ │ +0019ccb0: 6d61 703c 2f63 6f64 653e 3c2f 656d 3e20 map │ │ │ │ +0019ccc0: 6669 6c65 2920 7769 6c6c 206e 6f74 2062 file) will not b │ │ │ │ +0019ccd0: 6520 706c 6163 6564 2069 6e20 7468 6520 e placed in the │ │ │ │ +0019cce0: 636f 6465 206e 616d 6573 7061 6365 2074 code namespace t │ │ │ │ +0019ccf0: 6f20 616c 6c6f 7720 6974 2074 6f20 6265 o allow it to be │ │ │ │ +0019cd00: 206c 696e 6b65 6420 6173 2061 2067 6c6f linked as a glo │ │ │ │ +0019cd10: 6261 6c20 6f62 6a65 6374 2e20 596f 7520 bal object. You │ │ │ │ +0019cd20: 6361 6e20 7573 6520 3c62 3e3c 636f 6465 can use soapcpp2 -n option < │ │ │ │ +0019cd50: 623e 3c63 6f64 653e 2d6e 3c2f 636f 6465 b>-n to create │ │ │ │ +0019cd70: 6c6f 6361 6c20 584d 4c20 6e61 6d65 7370 local XML namesp │ │ │ │ +0019cd80: 6163 6520 7461 626c 6573 2c20 7365 6520 ace tables, see │ │ │ │ +0019cd90: 5365 6374 696f 6e20 3c61 2063 6c61 7373 Section soapcpp2 │ │ │ │ +0019cdd0: 206f 7074 696f 6e73 3c2f 613e 2028 6275 options (bu │ │ │ │ +0019cde0: 7420 7265 6d65 6d62 6572 2074 6861 7420 t remember that │ │ │ │ +0019cdf0: 796f 7520 6578 706c 6963 6974 6c79 206e you explicitly n │ │ │ │ +0019ce00: 6565 6420 746f 2069 6e69 7469 616c 697a eed to initializ │ │ │ │ +0019ce10: 6520 7468 6520 6e61 6d65 7370 6163 6573 e the namespaces │ │ │ │ +0019ce20: 2074 6f20 706f 696e 7420 746f 2061 2074 to point to a t │ │ │ │ +0019ce30: 6162 6c65 2061 7420 7275 6e20 7469 6d65 able at run time │ │ │ │ +0019ce40: 2075 7369 6e67 203c 636f 6465 3e3c 6120 using soa │ │ │ │ +0019cf10: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces │ │ │ │ +0019cf20: 3c2f 613e 3c2f 636f 6465 3e29 2e20 5468 ). Th │ │ │ │ +0019cf30: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file │ │ │ │ +0019cf40: 7320 6172 6520 7072 6566 6978 6564 2077 s are prefixed w │ │ │ │ +0019cf50: 6974 6820 7468 6520 636f 6465 206e 616d ith the code nam │ │ │ │ +0019cf60: 6573 7061 6365 206e 616d 6520 696e 7374 espace name inst │ │ │ │ +0019cf70: 6561 6420 6f66 2074 6865 2075 7375 616c ead of the usual │ │ │ │ +0019cf80: 203c 656d 3e3c 636f 6465 3e73 6f61 703c soap< │ │ │ │ +0019cf90: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file │ │ │ │ +0019cfa0: 206e 616d 6520 7072 6566 6978 2074 6f20 name prefix to │ │ │ │ +0019cfb0: 656e 6162 6c65 206d 756c 7469 706c 6520 enable multiple │ │ │ │ +0019cfc0: 636c 6965 6e74 2f73 6572 7665 7220 636f client/server co │ │ │ │ +0019cfd0: 6465 7320 746f 2062 6520 6275 696c 6420 des to be build │ │ │ │ +0019cfe0: 696e 2074 6865 2073 616d 6520 7072 6f6a in the same proj │ │ │ │ +0019cff0: 6563 7420 6469 7265 6374 6f72 792e 3c2f ect directory..

    Because th │ │ │ │ +0019d010: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an │ │ │ │ +0019d020: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ │ │ │ │ +0019d030: 6572 7320 7769 6c6c 2061 6c73 6f20 6265 ers will also be │ │ │ │ +0019d040: 2070 6c61 6365 6420 696e 2074 6865 206e placed in the n │ │ │ │ +0019d050: 616d 6573 7061 6365 2c20 7468 6579 2063 amespace, they c │ │ │ │ +0019d060: 616e 6e6f 7420 6265 2063 616c 6c65 6420 annot be called │ │ │ │ +0019d070: 6672 6f6d 2074 6865 203c 656d 3e3c 636f from the gsoap/stdsoap │ │ │ │ +0019d090: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp run time libra │ │ │ │ +0019d0b0: 7279 2063 6f64 6520 616e 6420 6172 6520 ry code and are │ │ │ │ +0019d0c0: 7468 6572 6566 6f72 6520 7265 6e64 6572 therefore render │ │ │ │ +0019d0d0: 6564 2075 6e75 7361 626c 652e 2054 6865 ed unusable. The │ │ │ │ +0019d0e0: 7265 666f 7265 2c20 7468 6573 6520 7365 refore, these se │ │ │ │ +0019d0f0: 7269 616c 697a 6572 7320 6172 6520 6e6f rializers are no │ │ │ │ +0019d100: 7420 636f 6d70 696c 6564 2061 7420 616c t compiled at al │ │ │ │ +0019d110: 6c20 2865 6e66 6f72 6365 6420 7769 7468 l (enforced with │ │ │ │ +0019d120: 203c 636f 6465 3e23 6465 6669 6e65 2057 #define W │ │ │ │ +0019d130: 4954 485f 4e4f 474c 4f42 414c 3c2f 636f ITH_NOGLOBAL). To add SOA │ │ │ │ +0019d150: 5020 4865 6164 6572 2061 6e64 2046 6175 P Header and Fau │ │ │ │ +0019d160: 6c74 2073 6572 6961 6c69 7a65 7273 2c20 lt serializers, │ │ │ │ +0019d170: 796f 7520 6d75 7374 2063 6f6d 7069 6c65 you must compile │ │ │ │ +0019d180: 2074 6865 6d20 7365 7061 7261 7465 6c79 them separately │ │ │ │ +0019d190: 2061 7320 666f 6c6c 6f77 732e 2046 6972 as follows. Fir │ │ │ │ +0019d1a0: 7374 2c20 6372 6561 7465 2061 206e 6577 st, create a new │ │ │ │ +0019d1b0: 2068 6561 6465 7220 6669 6c65 203c 656d header file env.h with th │ │ │ │ +0019d1e0: 6520 534f 4150 2048 6561 6465 7220 3c63 e SOAP Header S │ │ │ │ +0019d250: 4f41 505f 454e 565f 5f48 6561 6465 723c OAP_ENV__Header< │ │ │ │ +0019d260: 2f61 3e3c 2f63 6f64 653e 2061 6e64 2053 /a> and S │ │ │ │ +0019d270: 4f41 5020 4661 756c 7420 3c63 6f64 653e OAP Fault │ │ │ │ +0019d280: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_EN │ │ │ │ +0019d2e0: 565f 5f46 6175 6c74 3c2f 613e 3c2f 636f V__Fault structures, │ │ │ │ +0019d300: 696e 636c 7564 696e 6720 3c63 6f64 653e including │ │ │ │ +0019d310: 3c61 2063 6c61 7373 3d22 656c 2220 6872 SOAP_ENV__Detai │ │ │ │ +0019d380: 6c3c 2f61 3e3c 2f63 6f64 653e 2069 6620 l if │ │ │ │ +0019d390: 7468 6973 2073 7472 7563 7475 7265 2063 this structure c │ │ │ │ +0019d3a0: 6f6e 7461 696e 7320 6d65 6d62 6572 7320 ontains members │ │ │ │ +0019d3b0: 7468 6174 2061 7265 2073 6572 6961 6c69 that are seriali │ │ │ │ +0019d3c0: 7a65 6420 6173 2066 6175 6c74 2064 6574 zed as fault det │ │ │ │ +0019d3d0: 6169 6c73 2e20 596f 7520 6361 6e20 6c65 ails. You can le │ │ │ │ +0019d3e0: 6176 6520 7468 6973 2068 6561 6465 7220 ave this header │ │ │ │ +0019d3f0: 6669 6c65 2065 6d70 7479 2069 6620 796f file empty if yo │ │ │ │ +0019d400: 7520 7761 6e74 2074 6f20 7573 6520 7468 u want to use th │ │ │ │ +0019d410: 6520 6465 6661 756c 7420 534f 4150 2048 e default SOAP H │ │ │ │ +0019d420: 6561 6465 7220 616e 6420 4661 756c 742e eader and Fault. │ │ │ │ +0019d430: 2048 6f77 6576 6572 2c20 6966 2053 4f41 However, if SOA │ │ │ │ +0019d440: 5020 4865 6164 6572 7320 6172 6520 7265 P Headers are re │ │ │ │ +0019d450: 7175 6972 6564 2074 6865 6e20 796f 7520 quired then you │ │ │ │ +0019d460: 6361 6e6e 6f74 206c 6561 7665 2074 6865 cannot leave the │ │ │ │ +0019d470: 203c 636f 6465 3e3c 6120 636c 6173 733d SOAP_ENV__Head │ │ │ │ +0019d4e0: 6572 3c2f 613e 3c2f 636f 6465 3e20 7374 er st │ │ │ │ +0019d4f0: 7275 6374 7572 6520 656d 7074 792e 2046 ructure empty. F │ │ │ │ +0019d500: 6f72 2065 7861 6d70 6c65 2c20 7468 6520 or example, the │ │ │ │ +0019d510: 5753 2d41 6464 7265 7373 696e 6720 616e WS-Addressing an │ │ │ │ +0019d520: 6420 5753 2d53 6563 7572 6974 7920 706c d WS-Security pl │ │ │ │ +0019d530: 7567 696e 7320 7265 7175 6972 6520 534f ugins require SO │ │ │ │ +0019d540: 4150 2048 6561 6465 7273 2077 6869 6368 AP Headers which │ │ │ │ +0019d550: 2063 616e 2062 6520 696d 706f 7274 6564 can be imported │ │ │ │ +0019d560: 2062 7920 6164 6469 6e67 203c 636f 6465 by adding #import "wsa5.h │ │ │ │ +0019d580: 223c 2f63 6f64 653e 2061 6e64 203c 636f " and #import "wsse │ │ │ │ +0019d5a0: 2e68 223c 2f63 6f64 653e 2c20 7265 7370 .h", resp │ │ │ │ +0019d5b0: 6563 7469 7665 6c79 2074 6f20 3c65 6d3e ectively to │ │ │ │ +0019d5c0: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h. Then co │ │ │ │ +0019d5e0: 6d70 696c 6520 7468 6973 2068 6561 6465 mpile this heade │ │ │ │ +0019d5f0: 7220 6669 6c65 2077 6974 683a 203c 2f70 r file with:

     soapcpp2
    │ │ │ │ +0019d620: 202d 7065 6e76 2065 6e76 2e68 0a3c 2f70   -penv env.h.

    The gener │ │ │ │ +0019d640: 6174 6564 203c 656d 3e3c 636f 6465 3e65 ated e │ │ │ │ +0019d650: 6e76 432e 6370 703c 2f63 6f64 653e 3c2f nvC.cpp file holds t │ │ │ │ +0019d670: 6865 2053 4f41 5020 4865 6164 6572 2061 he SOAP Header a │ │ │ │ +0019d680: 6e64 2046 6175 6c74 2073 6572 6961 6c69 nd Fault seriali │ │ │ │ +0019d690: 7a65 7273 2061 6e64 2079 6f75 2063 616e zers and you can │ │ │ │ +0019d6a0: 206c 696e 6b20 7468 6973 2066 696c 6520 link this file │ │ │ │ +0019d6b0: 7769 7468 2079 6f75 7220 636c 6965 6e74 with your client │ │ │ │ +0019d6c0: 2061 6e64 2073 6572 7665 7220 6170 706c and server appl │ │ │ │ +0019d6d0: 6963 6174 696f 6e73 2e3c 2f70 3e0a 3c70 ications.

    .

    .... Back to table │ │ │ │ +0019d700: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents< │ │ │ │ +0019d710: 2f70 3e0a 3c68 323e 3c61 2063 6c61 7373 /p>.

    .How t │ │ │ │ +0019d740: 6f20 6372 6561 7465 2063 6c69 656e 742f o create client/ │ │ │ │ +0019d750: 7365 7276 6572 206c 6962 7261 7269 6573 server libraries │ │ │ │ +0019d760: 3c2f 6832 3e0a 3c70 3e54 6865 2073 6f61

    .

    The soa │ │ │ │ +0019d770: 7063 7070 3220 746f 6f6c 2070 726f 6475 pcpp2 tool produ │ │ │ │ +0019d780: 6365 7320 3c65 6d3e 3c63 6f64 653e 736f ces so │ │ │ │ +0019d790: 6170 436c 6965 6e74 4c69 622e 6370 703c apClientLib.cpp< │ │ │ │ +0019d7a0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ +0019d7b0: 3c65 6d3e 3c63 6f64 653e 736f 6170 5365 soapSe │ │ │ │ +0019d7c0: 7276 6572 4c69 622e 6370 703c 2f63 6f64 rverLib.cpp source c │ │ │ │ +0019d7e0: 6f64 6520 6669 6c65 7320 7468 6174 2061 ode files that a │ │ │ │ +0019d7f0: 7265 2073 7065 6369 6669 6361 6c6c 7920 re specifically │ │ │ │ +0019d800: 696e 7465 6e64 6564 2066 6f72 2062 7569 intended for bui │ │ │ │ +0019d810: 6c64 696e 6720 7374 6174 6963 206f 7220 lding static or │ │ │ │ +0019d820: 6479 6e61 6d69 6320 636c 6965 6e74 2061 dynamic client a │ │ │ │ +0019d830: 6e64 2073 6572 7665 7220 6c69 6272 6172 nd server librar │ │ │ │ +0019d840: 6965 7320 696e 2043 206f 7220 432b 2b2e ies in C or C++. │ │ │ │ +0019d850: 2054 6865 7365 2066 696c 6573 2065 7870 These files exp │ │ │ │ +0019d860: 6f72 7420 7468 6520 7374 7562 2061 6e64 ort the stub and │ │ │ │ +0019d870: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi │ │ │ │ +0019d880: 6f6e 732c 2062 7574 206b 6565 7020 616c ons, but keep al │ │ │ │ +0019d890: 6c20 7365 7269 616c 697a 6174 696f 6e20 l serialization │ │ │ │ +0019d8a0: 636f 6465 2073 7461 7469 632c 2074 6875 code static, thu │ │ │ │ +0019d8b0: 7320 6869 6464 656e 2074 6f20 6176 6f69 s hidden to avoi │ │ │ │ +0019d8c0: 6420 6c69 6e6b 2073 796d 626f 6c20 636f d link symbol co │ │ │ │ +0019d8d0: 6e66 6c69 6374 7320 7768 656e 2063 6f6d nflicts when com │ │ │ │ +0019d8e0: 6269 6e69 6e67 206d 756c 7469 706c 6520 bining multiple │ │ │ │ +0019d8f0: 636c 6965 6e74 7320 616e 6420 7365 7276 clients and serv │ │ │ │ +0019d900: 6963 6573 2069 6e74 6f20 6f6e 6520 6578 ices into one ex │ │ │ │ +0019d910: 6563 7574 6162 6c65 2e20 4e6f 7465 2074 ecutable. Note t │ │ │ │ +0019d920: 6861 7420 6974 2069 7320 6661 7220 7369 hat it is far si │ │ │ │ +0019d930: 6d70 6c65 7220 746f 2075 7365 2074 6865 mpler to use the │ │ │ │ +0019d940: 2077 7364 6c32 6820 746f 6f6c 206f 6e20 wsdl2h tool on │ │ │ │ +0019d950: 6d75 6c74 6970 6c65 2057 5344 4c20 6669 multiple WSDL fi │ │ │ │ +0019d960: 6c65 7320 746f 2067 656e 6572 6174 6520 les to generate │ │ │ │ +0019d970: 6120 6865 6164 6572 2066 696c 6520 7468 a header file th │ │ │ │ +0019d980: 6174 2063 6f6d 6269 6e65 7320 616c 6c20 at combines all │ │ │ │ +0019d990: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti │ │ │ │ +0019d9a0: 6f6e 732e 2048 6f77 6576 6572 2c20 7468 ons. However, th │ │ │ │ +0019d9b0: 6520 6170 7072 6f61 6368 2070 7265 7365 e approach prese │ │ │ │ +0019d9c0: 6e74 6564 2069 6e20 7468 6973 2073 6563 nted in this sec │ │ │ │ +0019d9d0: 7469 6f6e 2069 7320 7573 6566 756c 2077 tion is useful w │ │ │ │ +0019d9e0: 6865 6e20 6372 6561 7469 6e67 2028 6479 hen creating (dy │ │ │ │ +0019d9f0: 6e61 6d69 6329 206c 6962 7261 7269 6573 namic) libraries │ │ │ │ +0019da00: 2066 6f72 2063 6c69 656e 7420 616e 6420 for client and │ │ │ │ +0019da10: 7365 7276 6572 206f 626a 6563 7473 2c20 server objects, │ │ │ │ +0019da20: 7375 6368 2061 7320 444c 4c73 2061 7320 such as DLLs as │ │ │ │ +0019da30: 6465 7363 7269 6265 6420 696e 2053 6563 described in Sec │ │ │ │ +0019da40: 7469 6f6e 203c 6120 636c 6173 733d 2265 tion How to │ │ │ │ +0019da70: 6372 6561 7465 2044 4c4c 733c 2f61 3e20 create DLLs │ │ │ │ +0019da80: 2e3c 2f70 3e0a 3c64 6c20 636c 6173 733d .

    .
    < │ │ │ │ +0019daa0: 6474 3e4e 6f74 653c 2f64 743e 3c64 643e dt>Note
    │ │ │ │ +0019dab0: 4f6e 6520 6d61 6a6f 7220 6469 7361 6476 One major disadv │ │ │ │ +0019dac0: 616e 7461 6765 206f 6620 7468 6520 6170 antage of the ap │ │ │ │ +0019dad0: 7072 6f61 6368 2070 7265 7365 6e74 6564 proach presented │ │ │ │ +0019dae0: 2068 6572 6520 6973 2074 6861 7420 7468 here is that th │ │ │ │ +0019daf0: 6520 7365 7269 616c 697a 6572 2066 756e e serializer fun │ │ │ │ +0019db00: 6374 696f 6e73 2061 7265 206e 6f20 6c6f ctions are no lo │ │ │ │ +0019db10: 6e67 6572 2061 6363 6573 7369 626c 6520 nger accessible │ │ │ │ +0019db20: 696e 2074 6865 2075 7365 7227 7320 736f in the user's so │ │ │ │ +0019db30: 7572 6365 2063 6f64 652c 2062 6563 6175 urce code, becau │ │ │ │ +0019db40: 7365 2073 6572 6961 6c69 7a65 7273 2077 se serializers w │ │ │ │ +0019db50: 696c 6c20 6265 2063 6f6e 7665 7274 6564 ill be converted │ │ │ │ +0019db60: 2074 6f20 7374 6174 6963 2066 756e 6374 to static funct │ │ │ │ +0019db70: 696f 6e73 2028 746f 2062 6520 7573 6564 ions (to be used │ │ │ │ +0019db80: 2062 7920 7468 6520 6765 6e65 7261 7465 by the generate │ │ │ │ +0019db90: 6420 7374 7562 2061 6e64 2073 6b65 6c65 d stub and skele │ │ │ │ +0019dba0: 746f 6e20 6675 6e63 7469 6f6e 7320 6f6e ton functions on │ │ │ │ +0019dbb0: 6c79 292e 2046 6f72 2065 7861 6d70 6c65 ly). For example │ │ │ │ +0019dbc0: 2c20 6675 6e63 7469 6f6e 7320 7375 6368 , functions such │ │ │ │ +0019dbd0: 2061 7320 3c63 6f64 653e 736f 6170 5f6e as soap_n │ │ │ │ +0019dbe0: 6577 5f54 3c2f 636f 6465 3e2c 203c 636f ew_T, soap_default_ │ │ │ │ +0019dc00: 543c 2f63 6f64 653e 2c20 3c63 6f64 653e T, │ │ │ │ +0019dc10: 736f 6170 5f77 7269 7465 5f54 3c2f 636f soap_write_T, soap_ │ │ │ │ +0019dc30: 7265 6164 5f54 3c2f 636f 6465 3e2c 203c read_T, < │ │ │ │ +0019dc40: 636f 6465 3e73 6f61 705f 7075 745f 543c code>soap_put_T< │ │ │ │ +0019dc50: 2f63 6f64 653e 2c20 616e 6420 3c63 6f64 /code>, and soap_get_T cannot be us │ │ │ │ +0019dc80: 6564 2061 6e79 206c 6f6e 6765 722e 3c2f ed any longer.
    .

    Usin │ │ │ │ +0019dca0: 6720 432b 2b20 6e61 6d65 7370 6163 6573 g C++ namespaces │ │ │ │ +0019dcb0: 2069 7320 6120 6265 7474 6572 2061 6c74 is a better alt │ │ │ │ +0019dcc0: 6572 6e61 7469 7665 2077 6865 6e20 6275 ernative when bu │ │ │ │ +0019dcd0: 696c 6469 6e67 2061 7070 6c69 6361 7469 ilding applicati │ │ │ │ +0019dce0: 6f6e 7320 696e 2043 2b2b 2074 6861 7420 ons in C++ that │ │ │ │ +0019dcf0: 636f 6d62 696e 6520 6d75 6c74 6970 6c65 combine multiple │ │ │ │ +0019dd00: 2063 6c69 656e 7473 2061 6e64 2073 6572 clients and ser │ │ │ │ +0019dd10: 7669 6365 732e 2054 6f20 6275 696c 6420 vices. To build │ │ │ │ +0019dd20: 6d75 6c74 6970 6c65 206c 6962 7261 7269 multiple librari │ │ │ │ +0019dd30: 6573 2c20 796f 7520 6361 6e20 6465 6669 es, you can defi │ │ │ │ +0019dd40: 6e65 2061 2043 2b2b 206e 616d 6573 7061 ne a C++ namespa │ │ │ │ +0019dd50: 6365 2069 6e20 796f 7572 2068 6561 6465 ce in your heade │ │ │ │ +0019dd60: 7220 6669 6c65 2077 6974 6820 3c62 3e3c r file with < │ │ │ │ +0019dd70: 636f 6465 3e73 6f61 7063 7070 3220 2d71 code>soapcpp2 -q │ │ │ │ +0019dd80: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name │ │ │ │ +0019dd90: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ +0019dda0: 2d71 6e61 6d65 3c2f 636f 6465 3e3c 2f62 -qname, see Section < │ │ │ │ +0019ddc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0019ddd0: 663d 2269 6e64 6578 2e68 746d 6c23 636f f="index.html#co │ │ │ │ +0019dde0: 6465 6e61 6d65 7370 6163 6522 3e48 6f77 denamespace">How │ │ │ │ +0019ddf0: 2074 6f20 6275 696c 6420 6120 636c 6965 to build a clie │ │ │ │ +0019de00: 6e74 206f 7220 7365 7276 6572 2069 6e20 nt or server in │ │ │ │ +0019de10: 6120 432b 2b20 636f 6465 206e 616d 6573 a C++ code names │ │ │ │ +0019de20: 7061 6365 3c2f 613e 2066 6f72 2064 6574 pace for det │ │ │ │ +0019de30: 6169 6c73 2e3c 2f70 3e0a 3c70 3e46 6f72 ails.

    .

    For │ │ │ │ +0019de40: 2043 2c20 796f 7520 6361 6e20 7573 6520 C, you can use │ │ │ │ +0019de50: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp │ │ │ │ +0019de60: 3220 2d63 202d 7020 6e61 6d65 3c2f 636f 2 -c -p name option < │ │ │ │ +0019de80: 623e 3c63 6f64 653e 2d70 206e 616d 653c b>-p name< │ │ │ │ +0019de90: 2f63 6f64 653e 3c2f 623e 2074 6f20 7265 /code> to re │ │ │ │ +0019dea0: 6e61 6d65 2074 6865 2067 656e 6572 6174 name the generat │ │ │ │ +0019deb0: 6564 203c 656d 3e3c 636f 6465 3e73 6f61 ed soa │ │ │ │ +0019dec0: 7043 6c69 656e 744c 6962 2e63 3c2f 636f pClientLib.c and soapServe │ │ │ │ +0019def0: 724c 6962 2e63 3c2f 636f 6465 3e3c 2f65 rLib.c (and associat │ │ │ │ +0019df10: 6564 2920 6669 6c65 732e 2054 6865 203c ed) files. The < │ │ │ │ +0019df20: 623e 3c63 6f64 653e 2d70 206e 616d 653c b>-p name< │ │ │ │ +0019df30: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio │ │ │ │ +0019df40: 6e20 7370 6563 6966 6965 7320 7468 6520 n specifies the │ │ │ │ +0019df50: 6669 6c65 203c 656d 3e3c 636f 6465 3e6e file n │ │ │ │ +0019df60: 616d 653c 2f63 6f64 653e 3c2f 656d 3e20 ame │ │ │ │ +0019df70: 7072 6566 6978 2074 6f20 7265 706c 6163 prefix to replac │ │ │ │ +0019df80: 6520 7468 6520 3c65 6d3e 3c63 6f64 653e e the │ │ │ │ +0019df90: 736f 6170 3c2f 636f 6465 3e3c 2f65 6d3e soap │ │ │ │ +0019dfa0: 2066 696c 6520 6e61 6d65 2070 7265 6669 file name prefi │ │ │ │ +0019dfb0: 782e 3c2f 703e 0a3c 703e 5468 6520 656e x.

    .

    The en │ │ │ │ +0019dfc0: 6769 6e65 2064 6f65 7320 6e6f 7420 6465 gine does not de │ │ │ │ +0019dfd0: 6669 6e65 2053 4f41 5020 4865 6164 6572 fine SOAP Header │ │ │ │ +0019dfe0: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria │ │ │ │ +0019dff0: 6c69 7a65 7273 2074 6861 7420 7468 6520 lizers that the │ │ │ │ +0019e000: 656e 6769 6e65 206e 6565 6473 2e20 5765 engine needs. We │ │ │ │ +0019e010: 2074 6865 7265 666f 7265 2061 6464 2053 therefore add S │ │ │ │ +0019e020: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F │ │ │ │ +0019e030: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers │ │ │ │ +0019e040: 2c20 7768 6963 6820 6172 6520 636f 6d70 , which are comp │ │ │ │ +0019e050: 696c 6564 2073 6570 6172 6174 656c 7920 iled separately │ │ │ │ +0019e060: 6173 2066 6f6c 6c6f 7773 2e20 4669 7273 as follows. Firs │ │ │ │ +0019e070: 742c 2063 7265 6174 6520 6120 6e65 7720 t, create a new │ │ │ │ +0019e080: 6865 6164 6572 2066 696c 6520 3c65 6d3e header file │ │ │ │ +0019e090: 3c63 6f64 653e 656e 762e 683c 2f63 6f64 env.h with the │ │ │ │ +0019e0b0: 2053 4f41 5020 4865 6164 6572 203c 636f SOAP Header SO │ │ │ │ +0019e120: 4150 5f45 4e56 5f5f 4865 6164 6572 3c2f AP_ENV__Header and SO │ │ │ │ +0019e140: 4150 2046 6175 6c74 203c 636f 6465 3e3c AP Fault < │ │ │ │ +0019e150: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0019e160: 663d 2273 7472 7563 745f 735f 6f5f 615f f="struct_s_o_a_ │ │ │ │ +0019e170: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6661 p___e_n_v_____fa │ │ │ │ +0019e180: 756c 742e 6874 6d6c 2220 7469 746c 653d ult.html" title= │ │ │ │ +0019e190: 2253 4f41 5020 4661 756c 7420 7374 7275 "SOAP Fault stru │ │ │ │ +0019e1a0: 6374 7572 652e 223e 534f 4150 5f45 4e56 cture.">SOAP_ENV │ │ │ │ +0019e1b0: 5f5f 4661 756c 743c 2f61 3e3c 2f63 6f64 __Fault structures, i │ │ │ │ +0019e1d0: 6e63 6c75 6469 6e67 203c 636f 6465 3e3c ncluding < │ │ │ │ +0019e1e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +0019e1f0: 663d 2273 7472 7563 745f 735f 6f5f 615f f="struct_s_o_a_ │ │ │ │ +0019e200: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6465 p___e_n_v_____de │ │ │ │ +0019e210: 7461 696c 2e68 746d 6c22 2074 6974 6c65 tail.html" title │ │ │ │ +0019e220: 3d22 534f 4150 2046 6175 6c74 2044 6574 ="SOAP Fault Det │ │ │ │ +0019e230: 6169 6c20 7374 7275 6374 7572 652e 223e ail structure."> │ │ │ │ +0019e240: 534f 4150 5f45 4e56 5f5f 4465 7461 696c SOAP_ENV__Detail │ │ │ │ +0019e250: 3c2f 613e 3c2f 636f 6465 3e20 6966 2074 if t │ │ │ │ +0019e260: 6869 7320 7374 7275 6374 7572 6520 636f his structure co │ │ │ │ +0019e270: 6e74 6169 6e73 206d 656d 6265 7273 2074 ntains members t │ │ │ │ +0019e280: 6861 7420 6172 6520 7365 7269 616c 697a hat are serializ │ │ │ │ +0019e290: 6564 2061 7320 6661 756c 7420 6465 7461 ed as fault deta │ │ │ │ +0019e2a0: 696c 732e 2059 6f75 2063 616e 206c 6561 ils. You can lea │ │ │ │ +0019e2b0: 7665 2074 6869 7320 6865 6164 6572 2066 ve this header f │ │ │ │ +0019e2c0: 696c 6520 656d 7074 7920 6966 2079 6f75 ile empty if you │ │ │ │ +0019e2d0: 2077 616e 7420 746f 2075 7365 2074 6865 want to use the │ │ │ │ +0019e2e0: 2064 6566 6175 6c74 2053 4f41 5020 4865 default SOAP He │ │ │ │ +0019e2f0: 6164 6572 2061 6e64 2046 6175 6c74 2e20 ader and Fault. │ │ │ │ +0019e300: 486f 7765 7665 722c 2069 6620 534f 4150 However, if SOAP │ │ │ │ +0019e310: 2048 6561 6465 7273 2061 7265 2072 6571 Headers are req │ │ │ │ +0019e320: 7569 7265 6420 7468 656e 2079 6f75 2063 uired then you c │ │ │ │ +0019e330: 616e 6e6f 7420 6c65 6176 6520 7468 6520 annot leave the │ │ │ │ +0019e340: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 SOAP_ENV__Heade │ │ │ │ +0019e3b0: 723c 2f61 3e3c 2f63 6f64 653e 2073 7472 r str │ │ │ │ +0019e3c0: 7563 7475 7265 2065 6d70 7479 2e20 466f ucture empty. Fo │ │ │ │ +0019e3d0: 7220 6578 616d 706c 652c 2074 6865 2057 r example, the W │ │ │ │ +0019e3e0: 532d 4164 6472 6573 7369 6e67 2061 6e64 S-Addressing and │ │ │ │ +0019e3f0: 2057 532d 5365 6375 7269 7479 2070 6c75 WS-Security plu │ │ │ │ +0019e400: 6769 6e73 2072 6571 7569 7265 2053 4f41 gins require SOA │ │ │ │ +0019e410: 5020 4865 6164 6572 7320 7768 6963 6820 P Headers which │ │ │ │ +0019e420: 6361 6e20 6265 2069 6d70 6f72 7465 6420 can be imported │ │ │ │ +0019e430: 6279 2061 6464 696e 6720 3c63 6f64 653e by adding │ │ │ │ +0019e440: 2369 6d70 6f72 7420 2277 7361 352e 6822 #import "wsa5.h" │ │ │ │ +0019e450: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and #import "wsse. │ │ │ │ +0019e470: 6822 3c2f 636f 6465 3e2c 2072 6573 7065 h", respe │ │ │ │ +0019e480: 6374 6976 656c 7920 746f 203c 656d 3e3c ctively to < │ │ │ │ +0019e490: 636f 6465 3e65 6e76 2e68 3c2f 636f 6465 code>env.h. Then com │ │ │ │ +0019e4b0: 7069 6c65 2074 6869 7320 6865 6164 6572 pile this header │ │ │ │ +0019e4c0: 2066 696c 6520 7769 7468 3a20 3c2f 703e file with:

    │ │ │ │ +0019e4d0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 
    │ │ │ │ +0019e4f0: 2d70 656e 7620 656e 762e 680a 3c2f 7072  -penv env.h.

    The genera │ │ │ │ +0019e510: 7465 6420 3c65 6d3e 3c63 6f64 653e 656e ted en │ │ │ │ +0019e520: 7643 2e63 7070 3c2f 636f 6465 3e3c 2f65 vC.cpp file holds th │ │ │ │ +0019e540: 6520 534f 4150 2048 6561 6465 7220 616e e SOAP Header an │ │ │ │ +0019e550: 6420 4661 756c 7420 7365 7269 616c 697a d Fault serializ │ │ │ │ +0019e560: 6572 7320 616e 6420 796f 7520 6361 6e20 ers and you can │ │ │ │ +0019e570: 6372 6561 7465 2061 2028 6479 6e61 6d69 create a (dynami │ │ │ │ +0019e580: 6329 206c 6962 7261 7279 2066 6f72 2069 c) library for i │ │ │ │ +0019e590: 7420 746f 206c 696e 6b20 6974 2077 6974 t to link it wit │ │ │ │ +0019e5a0: 6820 796f 7572 2063 6c69 656e 7420 616e h your client an │ │ │ │ +0019e5b0: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica │ │ │ │ +0019e5c0: 7469 6f6e 732e 3c2f 703e 0a3c 703e 596f tions.

    .

    Yo │ │ │ │ +0019e5d0: 7520 7368 6f75 6c64 2074 6865 6e20 636f u should then co │ │ │ │ +0019e5e0: 6d70 696c 6520 7468 6520 3c65 6d3e 3c63 mpile the gsoap/stdsoa │ │ │ │ +0019e600: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp library with │ │ │ │ +0019e620: 7468 6520 636f 6d70 696c 652d 7469 6d65 the compile-time │ │ │ │ +0019e630: 203c 636f 6465 3e23 5749 5448 5f4e 4f4e #WITH_NON │ │ │ │ +0019e640: 414d 4553 5041 4345 533c 2f63 6f64 653e AMESPACES │ │ │ │ +0019e650: 2066 6c61 673a 203c 2f70 3e3c 7072 6520 flag:

     c++ -DWITH_NON
    │ │ │ │ +0019e680: 414d 4553 5041 4345 5320 2d63 2073 7464  AMESPACES -c std
    │ │ │ │ +0019e690: 736f 6170 322e 6370 700a 3c2f 7072 653e  soap2.cpp.
    │ │ │ │ +0019e6a0: 3c70 3e20 5468 6973 206f 6d69 7473 2074

    This omits t │ │ │ │ +0019e6b0: 6865 2072 6566 6572 656e 6365 2074 6f20 he reference to │ │ │ │ +0019e6c0: 7468 6520 676c 6f62 616c 206e 616d 6573 the global names │ │ │ │ +0019e6d0: 7061 6365 7320 7461 626c 652c 2077 6869 paces table, whi │ │ │ │ +0019e6e0: 6368 2069 7320 6e6f 7768 6572 6520 746f ch is nowhere to │ │ │ │ +0019e6f0: 2062 6520 6465 6669 6e65 6420 7369 6e63 be defined sinc │ │ │ │ +0019e700: 6520 7765 2077 696c 6c20 7573 6520 584d e we will use XM │ │ │ │ +0019e710: 4c20 6e61 6d65 7370 6163 6573 2066 6f72 L namespaces for │ │ │ │ +0019e720: 2065 6163 6820 636c 6965 6e74 2f73 6572 each client/ser │ │ │ │ +0019e730: 7669 6365 2073 6570 6172 6174 656c 792e vice separately. │ │ │ │ +0019e740: 2054 6865 7265 666f 7265 2c20 796f 7520 Therefore, you │ │ │ │ +0019e750: 6d75 7374 2065 7870 6c69 6369 746c 7920 must explicitly │ │ │ │ +0019e760: 7365 7420 7468 6520 6e61 6d65 7370 6163 set the namespac │ │ │ │ +0019e770: 6573 2076 616c 7565 206f 6620 7468 6520 es value of the │ │ │ │ +0019e780: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context in you │ │ │ │ +0019e7f0: 7220 636f 6465 2065 7665 7279 2074 696d r code every tim │ │ │ │ +0019e800: 6520 6166 7465 7220 696e 6974 6961 6c69 e after initiali │ │ │ │ +0019e810: 7a61 7469 6f6e 206f 6620 7468 6520 3c63 zation of the │ │ │ │ +0019e870: 736f 6170 3c2f 613e 3c2f 636f 6465 3e20 soap │ │ │ │ +0019e880: 636f 6e74 6578 7420 7769 7468 2074 6865 context with the │ │ │ │ +0019e890: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_set_ │ │ │ │ +0019e960: 6e61 6d65 7370 6163 6573 2873 7472 7563 namespaces(struc │ │ │ │ +0019e970: 7420 736f 6170 2a2c 2063 6f6e 7374 2073 t soap*, const s │ │ │ │ +0019e980: 7472 7563 7420 4e61 6d65 7370 6163 652a truct Namespace* │ │ │ │ +0019e990: 293c 2f61 3e3c 2f63 6f64 653e 2066 756e ) fun │ │ │ │ +0019e9a0: 6374 696f 6e2e 3c2f 703e 0a3c 703e 466f ction.

    .

    Fo │ │ │ │ +0019e9b0: 7220 6578 616d 706c 652c 2073 7570 706f r example, suppo │ │ │ │ +0019e9c0: 7365 2077 6520 6861 7665 2074 776f 2063 se we have two c │ │ │ │ +0019e9d0: 6c69 656e 7473 2064 6566 696e 6564 2069 lients defined i │ │ │ │ +0019e9e0: 6e20 6865 6164 6572 2066 696c 6573 203c n header files < │ │ │ │ +0019e9f0: 656d 3e3c 636f 6465 3e63 6c69 656e 7431 em>client1 │ │ │ │ +0019ea00: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a │ │ │ │ +0019ea10: 6e64 203c 656d 3e3c 636f 6465 3e63 6c69 nd cli │ │ │ │ +0019ea20: 656e 7432 2e68 3c2f 636f 6465 3e3c 2f65 ent2.h. We first gen │ │ │ │ +0019ea40: 6572 6174 6520 7468 6520 3c65 6d3e 3c63 erate the envH.h file for │ │ │ │ +0019ea70: 7468 6520 534f 4150 2048 6561 6465 7220 the SOAP Header │ │ │ │ +0019ea80: 616e 6420 4661 756c 7420 6465 6669 6e69 and Fault defini │ │ │ │ +0019ea90: 7469 6f6e 733a 203c 2f70 3e3c 7072 6520 tions:

     soapcpp2 -c -p
    │ │ │ │ +0019eac0: 656e 7620 656e 762e 680a 3c2f 7072 653e  env env.h.
    │ │ │ │ +0019ead0: 3c70 3e20 5468 656e 2077 6520 6765 6e65

    Then we gene │ │ │ │ +0019eae0: 7261 7465 2074 6865 2063 6f64 6520 666f rate the code fo │ │ │ │ +0019eaf0: 7220 636c 6965 6e74 3120 616e 6420 636c r client1 and cl │ │ │ │ +0019eb00: 6965 6e74 323a 203c 2f70 3e3c 7072 6520 ient2:

     soapcpp2 -c -n
    │ │ │ │ +0019eb30: 202d 706d 7943 6c69 656e 7431 2063 6c69   -pmyClient1 cli
    │ │ │ │ +0019eb40: 656e 7431 2e68 0a20 736f 6170 6370 7032  ent1.h. soapcpp2
    │ │ │ │ +0019eb50: 202d 6320 2d6e 202d 706d 7943 6c69 656e   -c -n -pmyClien
    │ │ │ │ +0019eb60: 7432 2063 6c69 656e 7432 2e68 0a3c 2f70  t2 client2.h.

    This gene │ │ │ │ +0019eb80: 7261 7465 7320 3c65 6d3e 3c63 6f64 653e rates │ │ │ │ +0019eb90: 6d79 436c 6965 6e74 3143 6c69 656e 744c myClient1ClientL │ │ │ │ +0019eba0: 6962 2e63 3c2f 636f 6465 3e3c 2f65 6d3e ib.c │ │ │ │ +0019ebb0: 2061 6e64 203c 656d 3e3c 636f 6465 3e6d and m │ │ │ │ +0019ebc0: 7943 6c69 656e 7432 436c 6965 6e74 4c69 yClient2ClientLi │ │ │ │ +0019ebd0: 622e 633c 2f63 6f64 653e 3c2f 656d 3e20 b.c │ │ │ │ +0019ebe0: 2861 6d6f 6e67 2073 6576 6572 616c 206f (among several o │ │ │ │ +0019ebf0: 7468 6572 2066 696c 6573 292e 2054 6865 ther files). The │ │ │ │ +0019ec00: 7365 2074 776f 2066 696c 6573 2073 686f se two files sho │ │ │ │ +0019ec10: 756c 6420 6265 2063 6f6d 7069 6c65 6420 uld be compiled │ │ │ │ +0019ec20: 616e 6420 6c69 6e6b 6564 2077 6974 6820 and linked with │ │ │ │ +0019ec30: 796f 7572 2061 7070 6c69 6361 7469 6f6e your application │ │ │ │ +0019ec40: 2e20 5468 6520 736f 7572 6365 2063 6f64 . The source cod │ │ │ │ +0019ec50: 6520 6f66 2079 6f75 7220 6170 706c 6963 e of your applic │ │ │ │ +0019ec60: 6174 696f 6e20 7368 6f75 6c64 2069 6e63 ation should inc │ │ │ │ +0019ec70: 6c75 6465 2074 6865 2067 656e 6572 6174 lude the generat │ │ │ │ +0019ec80: 6564 203c 656d 3e3c 636f 6465 3e65 6e76 ed env │ │ │ │ +0019ec90: 482e 683c 2f63 6f64 653e 3c2f 656d 3e2c H.h, │ │ │ │ +0019eca0: 203c 656d 3e3c 636f 6465 3e6d 7943 6c69 myCli │ │ │ │ +0019ecb0: 656e 7431 482e 683c 2f63 6f64 653e 3c2f ent1H.h, m │ │ │ │ +0019ecd0: 7943 6c69 656e 7432 2e68 3c2f 636f 6465 yClient2.h files and │ │ │ │ +0019ecf0: 203c 656d 3e3c 636f 6465 3e6d 7943 6c69 myCli │ │ │ │ +0019ed00: 656e 7431 2e6e 736d 6170 3c2f 636f 6465 ent1.nsmap, myClient2.nsma │ │ │ │ +0019ed30: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi │ │ │ │ +0019ed40: 6c65 733a 3c2f 703e 0a3c 6469 7620 636c les:

    .
    < │ │ │ │ +0019ed60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +0019ed70: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc │ │ │ │ +0019ed90: 6c75 6465 2026 7175 6f74 3b6d 7943 6c69 lude "myCli │ │ │ │ +0019eda0: 656e 7431 482e 6826 7175 6f74 3b3c 2f73 ent1H.h" // in │ │ │ │ +0019edd0: 636c 7564 6520 636c 6965 6e74 2031 2073 clude client 1 s │ │ │ │ +0019ede0: 7475 6273 203c 2f73 7061 6e3e 3c2f 6469 tubs .
    │ │ │ │ +0019ee20: 2369 6e63 6c75 6465 2026 7175 6f74 3b6d #include "m │ │ │ │ +0019ee30: 7943 6c69 656e 7432 482e 6826 7175 6f74 yClient2H.h" │ │ │ │ +0019ee40: 3b3c 2f73 7061 6e3e 203c 7370 616e 2063 ; / │ │ │ │ +0019ee60: 2f20 696e 636c 7564 6520 636c 6965 6e74 / include client │ │ │ │ +0019ee70: 2032 2073 7475 6273 203c 2f73 7061 6e3e 2 stubs │ │ │ │ +0019ee80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu │ │ │ │ +0019eec0: 6f74 3b65 6e76 482e 6826 7175 6f74 3b3c ot;envH.h"< │ │ │ │ +0019eed0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +0019eef0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... //
    .
    #include │ │ │ │ +0019ef50: 2671 756f 743b 6d79 436c 6965 6e74 3148 "myClient1H │ │ │ │ +0019ef60: 2e6e 736d 6170 2671 756f 743b 3c2f 7370 .nsmap" // inc │ │ │ │ +0019ef90: 6c75 6465 2063 6c69 656e 7420 3120 6e73 lude client 1 ns │ │ │ │ +0019efa0: 6d61 7020 3c2f 7370 616e 3e3c 2f64 6976 map
    .
    # │ │ │ │ +0019efe0: 696e 636c 7564 6520 2671 756f 743b 6d79 include "my │ │ │ │ +0019eff0: 436c 6965 6e74 3248 2e6e 736d 6170 2671 Client2H.nsmap&q │ │ │ │ +0019f000: 756f 743b 3c2f 7370 616e 3e20 3c73 7061 uot; // include cli │ │ │ │ +0019f030: 656e 7420 3220 6e73 6d61 7020 3c2f 7370 ent 2 nsmap
    .
    ..
    ... // │ │ │ │ -0019f280: 206d 616b 6520 436c 6965 6e74 2031 2069 make Client 1 i │ │ │ │ -0019f290: 6e76 6f63 6174 696f 6e73 3c2f 7370 616e nvocations
    .
    ... //.
    soa │ │ │ │ -0019f350: 705f 7365 745f 6e61 6d65 7370 6163 6573 p_set_namespaces │ │ │ │ -0019f360: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -0019f390: 3c2f 613e 2c20 6d79 436c 6965 6e74 325f , myClient2_ │ │ │ │ -0019f3a0: 6e61 6d65 7370 6163 6573 293b 203c 2f64 namespaces); .
    ... │ │ │ │ -0019f3e0: 2f2f 206d 616b 6520 436c 6965 6e74 2032 // make Client 2 │ │ │ │ -0019f3f0: 2069 6e76 6f63 6174 696f 6e73 3c2f 7370 invocations
    .
    │ │ │ │ -0019f410: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    It is │ │ │ │ +0019f410: 696d 706f 7274 616e 7420 746f 2075 7365 important to use │ │ │ │ +0019f420: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp │ │ │ │ +0019f430: 7032 202d 6e3c 2f63 6f64 653e 3c2f 623e p2 -n │ │ │ │ +0019f440: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -n, │ │ │ │ +0019f460: 7365 6520 5365 6374 696f 6e20 3c61 2063 see Section soap │ │ │ │ +0019f4a0: 6370 7032 206f 7074 696f 6e73 3c2f 613e cpp2 options │ │ │ │ +0019f4b0: 2c20 746f 2072 656e 616d 6520 7468 6520 , to rename the │ │ │ │ +0019f4c0: 6e61 6d65 7370 6163 6520 7461 626c 6573 namespace tables │ │ │ │ +0019f4d0: 2073 6f20 7765 2063 616e 2069 6e63 6c75 so we can inclu │ │ │ │ +0019f4e0: 6465 2074 6865 6d20 616c 6c20 7769 7468 de them all with │ │ │ │ +0019f4f0: 6f75 7420 7275 6e6e 696e 6720 696e 746f out running into │ │ │ │ +0019f500: 2072 6564 6566 696e 6974 696f 6e73 2e3c redefinitions.< │ │ │ │ +0019f510: 2f70 3e0a 3c64 6c20 636c 6173 733d 2273 /p>.

    Note
    Li │ │ │ │ +0019f540: 6e6b 2063 6f6e 666c 6963 7473 206d 6179 nk conflicts may │ │ │ │ +0019f550: 2073 7469 6c6c 206f 6363 7572 2069 6e20 still occur in │ │ │ │ +0019f560: 7468 6520 756e 6c69 6b65 6c79 2073 6974 the unlikely sit │ │ │ │ +0019f570: 7561 7469 6f6e 2074 6861 7420 6964 656e uation that iden │ │ │ │ +0019f580: 7469 6361 6c20 7365 7276 6963 6520 6f70 tical service op │ │ │ │ +0019f590: 6572 6174 696f 6e20 6e61 6d65 7320 6172 eration names ar │ │ │ │ +0019f5a0: 6520 6465 6669 6e65 6420 696e 2074 776f e defined in two │ │ │ │ +0019f5b0: 206f 7220 6d6f 7265 2073 7475 6220 6f72 or more stub or │ │ │ │ +0019f5c0: 2073 6b65 6c65 746f 6e20 6675 6e63 7469 skeleton functi │ │ │ │ +0019f5d0: 6f6e 7320 7768 656e 2074 6865 7365 206d ons when these m │ │ │ │ +0019f5e0: 6574 686f 6473 2073 6861 7265 2074 6865 ethods share the │ │ │ │ +0019f5f0: 2073 616d 6520 584d 4c20 6e61 6d65 7370 same XML namesp │ │ │ │ +0019f600: 6163 6520 7072 6566 6978 2e3c 2f64 643e ace prefix.
    │ │ │ │ +0019f610: 3c2f 646c 3e0a 3c70 3ef0 9f94 9d20 3c61
    .

    .... Back t │ │ │ │ +0019f630: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ +0019f640: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    │ │ │ │ +0019f650: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .C++ exampl │ │ │ │ +0019f680: 6573 3c2f 6833 3e0a 3c70 3e41 7320 616e es

    .

    As an │ │ │ │ +0019f690: 2065 7861 6d70 6c65 2077 6520 7769 6c6c example we will │ │ │ │ +0019f6a0: 2062 7569 6c64 2061 2044 656c 6179 6564 build a Delayed │ │ │ │ +0019f6b0: 2053 746f 636b 2051 756f 7465 2063 6c69 Stock Quote cli │ │ │ │ +0019f6c0: 656e 7420 6c69 6272 6172 7920 616e 6420 ent library and │ │ │ │ +0019f6d0: 6120 4375 7272 656e 6379 2045 7863 6861 a Currency Excha │ │ │ │ +0019f6e0: 6e67 6520 5261 7465 2063 6c69 656e 7420 nge Rate client │ │ │ │ +0019f6f0: 6c69 6272 6172 792e 3c2f 703e 0a3c 703e library.

    .

    │ │ │ │ +0019f700: 4669 7273 742c 2077 6520 6372 6561 7465 First, we create │ │ │ │ +0019f710: 2061 6e20 656d 7074 7920 6865 6164 6572 an empty header │ │ │ │ +0019f720: 2066 696c 6520 3c65 6d3e 3c63 6f64 653e file │ │ │ │ +0019f730: 656e 762e 683c 2f63 6f64 653e 3c2f 656d env.h, which may be │ │ │ │ +0019f750: 656d 7074 7920 6f72 2073 686f 756c 6420 empty or should │ │ │ │ +0019f760: 636f 6e74 6169 6e20 534f 4150 2048 6561 contain SOAP Hea │ │ │ │ +0019f770: 6465 7220 616e 6420 4661 756c 7420 6465 der and Fault de │ │ │ │ +0019f780: 6669 6e69 7469 6f6e 7320 6173 2065 7870 finitions as exp │ │ │ │ +0019f790: 6c61 696e 6564 2069 6e20 5365 6374 696f lained in Sectio │ │ │ │ +0019f7a0: 6e20 3c61 2063 6c61 7373 3d22 656c 2220 n How to │ │ │ │ +0019f7d0: 6372 6561 7465 2063 6c69 656e 742f 7365 create client/se │ │ │ │ +0019f7e0: 7276 6572 206c 6962 7261 7269 6573 3c2f rver libraries, and compile │ │ │ │ +0019f800: 6974 2061 7320 666f 6c6c 6f77 733a 203c it as follows: < │ │ │ │ +0019f810: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

     soapcp
    │ │ │ │ +0019f830: 7032 202d 7065 6e76 2065 6e76 2e68 0a20  p2 -penv env.h. 
    │ │ │ │ +0019f840: 632b 2b20 2d63 2065 6e76 432e 6370 700a  c++ -c envC.cpp.
    │ │ │ │ +0019f850: 3c2f 7072 653e 3c70 3e20 5765 2061 6c73  

    We als │ │ │ │ +0019f860: 6f20 636f 6d70 696c 6520 3c65 6d3e 3c63 o compile gsoap/stdsoa │ │ │ │ +0019f880: 7032 2e63 7070 3c2f 636f 6465 3e3c 2f65 p2.cpp without names │ │ │ │ +0019f8a0: 7061 6365 733a 203c 2f70 3e3c 7072 6520 paces:

     c++ -c -DWITH_
    │ │ │ │ +0019f8d0: 4e4f 4e41 4d45 5350 4143 4553 2073 7464  NONAMESPACES std
    │ │ │ │ +0019f8e0: 736f 6170 322e 6370 700a 3c2f 7072 653e  soap2.cpp.
    │ │ │ │ +0019f8f0: 3c70 3e20 4966 2079 6f75 2064 6f20 6e6f

    If you do no │ │ │ │ +0019f900: 7420 7573 6520 3c63 6f64 653e 2357 4954 t use #WIT │ │ │ │ +0019f910: 485f 4e4f 4e41 4d45 5350 4143 4553 3c2f H_NONAMESPACES then you w │ │ │ │ +0019f930: 696c 6c20 6765 7420 616e 2075 6e72 6573 ill get an unres │ │ │ │ +0019f940: 6f6c 7665 6420 6c69 6e6b 2065 7272 6f72 olved link error │ │ │ │ +0019f950: 2066 6f72 2074 6865 2067 6c6f 6261 6c20 for the global │ │ │ │ +0019f960: 3c63 6f64 653e 6e61 6d65 7370 6163 6573 namespaces │ │ │ │ +0019f970: 3c2f 636f 6465 3e20 7461 626c 652e 2059 table. Y │ │ │ │ +0019f980: 6f75 2063 616e 2064 6566 696e 6520 6120 ou can define a │ │ │ │ +0019f990: 6475 6d6d 7920 7461 626c 6520 746f 2061 dummy table to a │ │ │ │ +0019f9a0: 766f 6964 2068 6176 696e 6720 746f 2072 void having to r │ │ │ │ +0019f9b0: 6563 6f6d 7069 6c65 203c 656d 3e3c 636f ecompile gsoap/stdsoap │ │ │ │ +0019f9d0: 322e 6370 703c 2f63 6f64 653e 3c2f 656d 2.cpp.

    .

    Second │ │ │ │ +0019f9f0: 2c20 7765 2063 7265 6174 6520 7468 6520 , we create the │ │ │ │ +0019fa00: 4465 6c61 7965 6420 5374 6f63 6b20 5175 Delayed Stock Qu │ │ │ │ +0019fa10: 6f74 6520 6865 6164 6572 2066 696c 6520 ote header file │ │ │ │ +0019fa20: 7370 6563 6966 6963 6174 696f 6e2c 2077 specification, w │ │ │ │ +0019fa30: 6869 6368 206d 6179 2062 6520 6f62 7461 hich may be obta │ │ │ │ +0019fa40: 696e 6564 2075 7369 6e67 2074 6865 2057 ined using the W │ │ │ │ +0019fa50: 5344 4c20 696d 706f 7274 6572 2e20 4966 SDL importer. If │ │ │ │ +0019fa60: 2079 6f75 2077 616e 7420 746f 2075 7365 you want to use │ │ │ │ +0019fa70: 2043 2b2b 206e 616d 6573 7061 6365 7320 C++ namespaces │ │ │ │ +0019fa80: 7468 656e 2079 6f75 206e 6565 6420 746f then you need to │ │ │ │ +0019fa90: 206d 616e 7561 6c6c 7920 6164 6420 7468 manually add th │ │ │ │ +0019faa0: 6520 3c63 6f64 653e 6e61 6d65 7370 6163 e namespac │ │ │ │ +0019fab0: 653c 2f63 6f64 653e 2064 6563 6c61 7261 e declara │ │ │ │ +0019fac0: 7469 6f6e 2074 6f20 7468 6520 6765 6e65 tion to the gene │ │ │ │ +0019fad0: 7261 7465 6420 6865 6164 6572 2066 696c rated header fil │ │ │ │ +0019fae0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +0019fb10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +0019fb20: 6f72 6422 3e6e 616d 6573 7061 6365 203c ord">namespace < │ │ │ │ +0019fb30: 2f73 7061 6e3e 7175 6f74 6520 7b3c 2f64 /span>quote {.
    . │ │ │ │ -0019fb70: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -0019fba0: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi │ │ │ │ -0019fbb0: 6365 206e 616d 653a 2053 6572 7669 6365 ce name: Service │ │ │ │ -0019fbc0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -0019fbd0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0019fbe0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ -0019fc00: 7320 7365 7276 6963 6520 7374 796c 653a s service style: │ │ │ │ -0019fc10: 2072 7063 203c 2f73 7061 6e3e 3c2f 6469 rpc .
    //gso │ │ │ │ -0019fc50: 6170 206e 7320 7365 7276 6963 6520 656e ap ns service en │ │ │ │ -0019fc60: 636f 6469 6e67 3a20 656e 636f 6465 6420 coding: encoded │ │ │ │ -0019fc70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -0019fc90: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ -0019fcb0: 2073 6572 7669 6365 206c 6f63 6174 696f service locatio │ │ │ │ -0019fcc0: 6e3a 2068 7474 703a 2f2f 7365 7276 6963 n: http://servic │ │ │ │ -0019fcd0: 6573 2e78 6d65 7468 6f64 732e 6e65 742f es.xmethods.net/ │ │ │ │ -0019fce0: 736f 6170 203c 2f73 7061 6e3e 3c2f 6469 soap .
    //gso │ │ │ │ -0019fd20: 6170 206e 7320 7363 6865 6d61 206e 616d ap ns schema nam │ │ │ │ -0019fd30: 6573 7061 6365 3a20 7572 6e3a 786d 6574 espace: urn:xmet │ │ │ │ -0019fd40: 686f 6473 2d64 656c 6179 6564 2d71 756f hods-delayed-quo │ │ │ │ -0019fd50: 7465 7320 3c2f 7370 616e 3e3c 2f64 6976 tes
    .
    //gsoa │ │ │ │ -0019fd90: 7020 6e73 2073 6572 7669 6365 206d 6574 p ns service met │ │ │ │ -0019fda0: 686f 642d 6163 7469 6f6e 3a20 6765 7451 hod-action: getQ │ │ │ │ -0019fdb0: 756f 7465 2026 7175 6f74 3b26 7175 6f74 uote "" │ │ │ │ -0019fdc0: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
    . │ │ │ │ -0019fdd0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ -0019fe00: 2f73 7061 6e3e 206e 735f 5f67 6574 5175 /span> ns__getQu │ │ │ │ -0019fe10: 6f74 6528 3c73 7061 6e20 636c 6173 733d ote(ch │ │ │ │ -0019fe30: 6172 3c2f 7370 616e 3e20 2a73 796d 626f ar *symbo │ │ │ │ -0019fe40: 6c2c 203c 7370 616e 2063 6c61 7373 3d22 l, flo │ │ │ │ -0019fe60: 6174 3c2f 7370 616e 3e20 2661 6d70 3b52 at &R │ │ │ │ -0019fe70: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .< │ │ │ │ +0019fb70: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ +0019fb90: 2073 6572 7669 6365 206e 616d 653a 2053 service name: S │ │ │ │ +0019fba0: 6572 7669 6365 203c 2f73 7061 6e3e 3c2f ervice .
    //g │ │ │ │ +0019fbe0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ +0019fbf0: 7374 796c 653a 2072 7063 203c 2f73 7061 style: rpc
    .
    //gsoap ns serv │ │ │ │ +0019fc40: 6963 6520 656e 636f 6469 6e67 3a20 656e ice encoding: en │ │ │ │ +0019fc50: 636f 6465 6420 3c2f 7370 616e 3e3c 2f64 coded .
    //gs │ │ │ │ +0019fc90: 6f61 7020 6e73 2073 6572 7669 6365 206c oap ns service l │ │ │ │ +0019fca0: 6f63 6174 696f 6e3a 2068 7474 703a 2f2f ocation: http:// │ │ │ │ +0019fcb0: 7365 7276 6963 6573 2e78 6d65 7468 6f64 services.xmethod │ │ │ │ +0019fcc0: 732e 6e65 742f 736f 6170 203c 2f73 7061 s.net/soap
    .
    //gsoap ns sche │ │ │ │ +0019fd10: 6d61 206e 616d 6573 7061 6365 3a20 7572 ma namespace: ur │ │ │ │ +0019fd20: 6e3a 786d 6574 686f 6473 2d64 656c 6179 n:xmethods-delay │ │ │ │ +0019fd30: 6564 2d71 756f 7465 7320 3c2f 7370 616e ed-quotes
    .
    │ │ │ │ +0019fd70: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi │ │ │ │ +0019fd80: 6365 206d 6574 686f 642d 6163 7469 6f6e ce method-action │ │ │ │ +0019fd90: 3a20 6765 7451 756f 7465 2026 7175 6f74 : getQuote " │ │ │ │ +0019fda0: 3b26 7175 6f74 3b20 3c2f 7370 616e 3e3c ;" < │ │ │ │ +0019fdb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_ │ │ │ │ +0019fdf0: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(char │ │ │ │ +0019fe20: 2a73 796d 626f 6c2c 203c 7370 616e 2063 *symbol, float │ │ │ │ +0019fe50: 2661 6d70 3b52 6573 756c 7429 3b20 3c2f &Result); .
    .< │ │ │ │ 0019fe80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -0019fe90: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    } // namespace │ │ │ │ -0019fed0: 7175 6f74 653c 2f73 7061 6e3e 3c2f 6469 quote.

    We │ │ │ │ -0019ff00: 7468 656e 2063 6f6d 7069 6c65 2069 7420 then compile it │ │ │ │ -0019ff10: 6173 2061 206c 6962 7261 7279 2061 6e64 as a library and │ │ │ │ -0019ff20: 2077 6520 7573 6520 6f70 7469 6f6e 203c we use option < │ │ │ │ -0019ff30: 623e 3c63 6f64 653e 2d6e 3c2f 636f 6465 b>-n to prefix │ │ │ │ -0019ff50: 7468 6520 6765 6e65 7261 7465 6420 6669 the generated fi │ │ │ │ -0019ff60: 6c65 7320 616e 6420 746f 2072 656e 616d les and to renam │ │ │ │ -0019ff70: 6520 7468 6520 6e61 6d65 7370 6163 6520 e the namespace │ │ │ │ -0019ff80: 7461 626c 6520 746f 2061 766f 6964 206c table to avoid l │ │ │ │ -0019ff90: 696e 6b20 636f 6e66 6c69 6374 7320 6c61 ink conflicts la │ │ │ │ -0019ffa0: 7465 723a 203c 2f70 3e3c 7072 6520 636c ter:

     
    │ │ │ │ -0019ffc0: 736f 6170 6370 7032 202d 6e20 7175 6f74  soapcpp2 -n quot
    │ │ │ │ -0019ffd0: 652e 680a 2063 2b2b 202d 6320 7175 6f74  e.h. c++ -c quot
    │ │ │ │ -0019ffe0: 6543 6c69 656e 744c 6962 2e63 7070 0a3c  eClientLib.cpp.<
    │ │ │ │ -0019fff0: 2f70 7265 3e3c 703e 2049 6620 796f 7520  /pre>

    If you │ │ │ │ -001a0000: 646f 6e27 7420 7761 6e74 2074 6f20 7573 don't want to us │ │ │ │ -001a0010: 6520 6120 432b 2b20 636f 6465 206e 616d e a C++ code nam │ │ │ │ -001a0020: 6573 7061 6365 2c20 796f 7520 7368 6f75 espace, you shou │ │ │ │ -001a0030: 6c64 2063 6f6d 7069 6c65 203c 656d 3e3c ld compile < │ │ │ │ -001a0040: 636f 6465 3e71 756f 7465 2e68 3c2f 636f code>quote.h "as is" │ │ │ │ -001a0060: 2077 6974 6820 6f70 7469 6f6e 203c 623e with option │ │ │ │ -001a0070: 3c63 6f64 653e 2d70 7175 6f74 653c 2f63 -pquote:

    soapcpp2 -n │ │ │ │ -001a00b0: 202d 7071 756f 7465 2071 756f 7465 2e68 -pquote quote.h │ │ │ │ -001a00c0: 0a20 632b 2b20 2d63 2071 756f 7465 436c . c++ -c quoteCl │ │ │ │ -001a00d0: 6965 6e74 4c69 622e 6370 700a 3c2f 7072 ientLib.cpp.

    Third, we │ │ │ │ -001a00f0: 6372 6561 7465 2074 6865 2043 7572 7265 create the Curre │ │ │ │ -001a0100: 6e63 7920 4578 6368 616e 6765 2052 6174 ncy Exchange Rat │ │ │ │ -001a0110: 6520 6865 6164 6572 2066 696c 6520 7370 e header file sp │ │ │ │ -001a0120: 6563 6966 6963 6174 696f 6e3a 3c2f 703e ecification:

    │ │ │ │ -001a0130: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    n │ │ │ │ -001a0170: 616d 6573 7061 6365 203c 2f73 7061 6e3e amespace │ │ │ │ -001a0180: 7261 7465 207b 3c2f 6469 763e 0a3c 6469 rate {
    . │ │ │ │ -001a01a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -001a01d0: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -001a01e0: 6520 6e61 6d65 3a20 5365 7276 6963 6520 e name: Service │ │ │ │ -001a01f0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001a0210: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ -001a0230: 2073 6572 7669 6365 2073 7479 6c65 3a20 service style: │ │ │ │ -001a0240: 7270 6320 3c2f 7370 616e 3e3c 2f64 6976 rpc
    .
    //gsoa │ │ │ │ -001a0280: 7020 6e73 2073 6572 7669 6365 2065 6e63 p ns service enc │ │ │ │ -001a0290: 6f64 696e 673a 2065 6e63 6f64 6564 203c oding: encoded < │ │ │ │ -001a02a0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -001a02c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001a02d0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ -001a02e0: 7365 7276 6963 6520 6c6f 6361 7469 6f6e service location │ │ │ │ -001a02f0: 3a20 6874 7470 3a2f 2f73 6572 7669 6365 : http://service │ │ │ │ -001a0300: 732e 786d 6574 686f 6473 2e6e 6574 2f73 s.xmethods.net/s │ │ │ │ -001a0310: 6f61 7020 3c2f 7370 616e 3e3c 2f64 6976 oap
    .
    //gsoa │ │ │ │ -001a0350: 7020 6e73 2073 6368 656d 6120 6e61 6d65 p ns schema name │ │ │ │ -001a0360: 7370 6163 653a 2075 726e 3a78 6d65 7468 space: urn:xmeth │ │ │ │ -001a0370: 6f64 732d 4375 7272 656e 6379 4578 6368 ods-CurrencyExch │ │ │ │ -001a0380: 616e 6765 203c 2f73 7061 6e3e 3c2f 6469 ange .
    //gso │ │ │ │ -001a03c0: 6170 206e 7320 7365 7276 6963 6520 6d65 ap ns service me │ │ │ │ -001a03d0: 7468 6f64 2d61 6374 696f 6e3a 2067 6574 thod-action: get │ │ │ │ -001a03e0: 5261 7465 2026 7175 6f74 3b26 7175 6f74 Rate "" │ │ │ │ -001a03f0: 3b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a ;
    . │ │ │ │ -001a0400: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    int< │ │ │ │ -001a0430: 2f73 7061 6e3e 206e 735f 5f67 6574 5261 /span> ns__getRa │ │ │ │ -001a0440: 7465 283c 7370 616e 2063 6c61 7373 3d22 te(cha │ │ │ │ -001a0460: 723c 2f73 7061 6e3e 202a 636f 756e 7472 r *countr │ │ │ │ -001a0470: 7931 2c20 3c73 7061 6e20 636c 6173 733d y1, ch │ │ │ │ -001a0490: 6172 3c2f 7370 616e 3e20 2a63 6f75 6e74 ar *count │ │ │ │ -001a04a0: 7279 322c 203c 7370 616e 2063 6c61 7373 ry2, f │ │ │ │ -001a04c0: 6c6f 6174 3c2f 7370 616e 3e20 2661 6d70 loat & │ │ │ │ -001a04d0: 3b52 6573 756c 7429 3b20 3c2f 6469 763e ;Result);
    │ │ │ │ +0019fe90: 3e7d 203c 7370 616e 2063 6c61 7373 3d22 >} // name │ │ │ │ +0019feb0: 7370 6163 6520 7175 6f74 653c 2f73 7061 space quote
    .
    < │ │ │ │ +0019fed0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +0019fee0: 3c70 3e57 6520 7468 656e 2063 6f6d 7069

    We then compi │ │ │ │ +0019fef0: 6c65 2069 7420 6173 2061 206c 6962 7261 le it as a libra │ │ │ │ +0019ff00: 7279 2061 6e64 2077 6520 7573 6520 6f70 ry and we use op │ │ │ │ +0019ff10: 7469 6f6e 203c 623e 3c63 6f64 653e 2d6e tion -n │ │ │ │ +0019ff20: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2070 to p │ │ │ │ +0019ff30: 7265 6669 7820 7468 6520 6765 6e65 7261 refix the genera │ │ │ │ +0019ff40: 7465 6420 6669 6c65 7320 616e 6420 746f ted files and to │ │ │ │ +0019ff50: 2072 656e 616d 6520 7468 6520 6e61 6d65 rename the name │ │ │ │ +0019ff60: 7370 6163 6520 7461 626c 6520 746f 2061 space table to a │ │ │ │ +0019ff70: 766f 6964 206c 696e 6b20 636f 6e66 6c69 void link confli │ │ │ │ +0019ff80: 6374 7320 6c61 7465 723a 203c 2f70 3e3c cts later:

    < │ │ │ │ +0019ff90: 7072 6520 636c 6173 733d 2266 7261 676d pre class="fragm │ │ │ │ +0019ffa0: 656e 7422 3e20 736f 6170 6370 7032 202d ent"> soapcpp2 - │ │ │ │ +0019ffb0: 6e20 7175 6f74 652e 680a 2063 2b2b 202d n quote.h. c++ - │ │ │ │ +0019ffc0: 6320 7175 6f74 6543 6c69 656e 744c 6962 c quoteClientLib │ │ │ │ +0019ffd0: 2e63 7070 0a3c 2f70 7265 3e3c 703e 2049 .cpp.

    I │ │ │ │ +0019ffe0: 6620 796f 7520 646f 6e27 7420 7761 6e74 f you don't want │ │ │ │ +0019fff0: 2074 6f20 7573 6520 6120 432b 2b20 636f to use a C++ co │ │ │ │ +001a0000: 6465 206e 616d 6573 7061 6365 2c20 796f de namespace, yo │ │ │ │ +001a0010: 7520 7368 6f75 6c64 2063 6f6d 7069 6c65 u should compile │ │ │ │ +001a0020: 203c 656d 3e3c 636f 6465 3e71 756f 7465 quote │ │ │ │ +001a0030: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2022 .h " │ │ │ │ +001a0040: 6173 2069 7322 2077 6974 6820 6f70 7469 as is" with opti │ │ │ │ +001a0050: 6f6e 203c 623e 3c63 6f64 653e 2d70 7175 on -pqu │ │ │ │ +001a0060: 6f74 653c 2f63 6f64 653e 3c2f 623e 3a20 ote: │ │ │ │ +001a0070: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     soapc
    │ │ │ │ +001a0090: 7070 3220 2d6e 202d 7071 756f 7465 2071  pp2 -n -pquote q
    │ │ │ │ +001a00a0: 756f 7465 2e68 0a20 632b 2b20 2d63 2071  uote.h. c++ -c q
    │ │ │ │ +001a00b0: 756f 7465 436c 6965 6e74 4c69 622e 6370  uoteClientLib.cp
    │ │ │ │ +001a00c0: 700a 3c2f 7072 653e 3c70 3e20 5468 6972  p.

    Thir │ │ │ │ +001a00d0: 642c 2077 6520 6372 6561 7465 2074 6865 d, we create the │ │ │ │ +001a00e0: 2043 7572 7265 6e63 7920 4578 6368 616e Currency Exchan │ │ │ │ +001a00f0: 6765 2052 6174 6520 6865 6164 6572 2066 ge Rate header f │ │ │ │ +001a0100: 696c 6520 7370 6563 6966 6963 6174 696f ile specificatio │ │ │ │ +001a0110: 6e3a 3c2f 703e 0a3c 6469 7620 636c 6173 n:

    .
    < │ │ │ │ +001a0140: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a0150: 6f72 6422 3e6e 616d 6573 7061 6365 203c ord">namespace < │ │ │ │ +001a0160: 2f73 7061 6e3e 7261 7465 207b 3c2f 6469 /span>rate {.
    .< │ │ │ │ +001a01a0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001a01b0: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +001a01c0: 7365 7276 6963 6520 6e61 6d65 3a20 5365 service name: Se │ │ │ │ +001a01d0: 7276 6963 6520 3c2f 7370 616e 3e3c 2f64 rvice .
    //gs │ │ │ │ +001a0210: 6f61 7020 6e73 2073 6572 7669 6365 2073 oap ns service s │ │ │ │ +001a0220: 7479 6c65 3a20 7270 6320 3c2f 7370 616e tyle: rpc
    .
    │ │ │ │ +001a0260: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi │ │ │ │ +001a0270: 6365 2065 6e63 6f64 696e 673a 2065 6e63 ce encoding: enc │ │ │ │ +001a0280: 6f64 6564 203c 2f73 7061 6e3e 3c2f 6469 oded .
    //gso │ │ │ │ +001a02c0: 6170 206e 7320 7365 7276 6963 6520 6c6f ap ns service lo │ │ │ │ +001a02d0: 6361 7469 6f6e 3a20 6874 7470 3a2f 2f73 cation: http://s │ │ │ │ +001a02e0: 6572 7669 6365 732e 786d 6574 686f 6473 ervices.xmethods │ │ │ │ +001a02f0: 2e6e 6574 2f73 6f61 7020 3c2f 7370 616e .net/soap
    .
    │ │ │ │ +001a0330: 2f2f 6773 6f61 7020 6e73 2073 6368 656d //gsoap ns schem │ │ │ │ +001a0340: 6120 6e61 6d65 7370 6163 653a 2075 726e a namespace: urn │ │ │ │ +001a0350: 3a78 6d65 7468 6f64 732d 4375 7272 656e :xmethods-Curren │ │ │ │ +001a0360: 6379 4578 6368 616e 6765 203c 2f73 7061 cyExchange
    .
    //gsoap ns serv │ │ │ │ +001a03b0: 6963 6520 6d65 7468 6f64 2d61 6374 696f ice method-actio │ │ │ │ +001a03c0: 6e3a 2067 6574 5261 7465 2026 7175 6f74 n: getRate " │ │ │ │ +001a03d0: 3b26 7175 6f74 3b20 3c2f 7370 616e 3e3c ;" < │ │ │ │ +001a03e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_ │ │ │ │ +001a0420: 5f67 6574 5261 7465 283c 7370 616e 2063 _getRate(char * │ │ │ │ +001a0450: 636f 756e 7472 7931 2c20 3c73 7061 6e20 country1, char │ │ │ │ +001a0480: 2a63 6f75 6e74 7279 322c 203c 7370 616e *country2, float &Result); │ │ │ │ +001a04c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ 001a04e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    } < │ │ │ │ -001a0510: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001a0520: 656e 7422 3e2f 2f20 6e61 6d65 7370 6163 ent">// namespac │ │ │ │ -001a0530: 6520 7261 7465 3c2f 7370 616e 3e3c 2f64 e rate.

    Si │ │ │ │ -001a0560: 6d69 6c61 7220 746f 2074 6865 2051 756f milar to the Quo │ │ │ │ -001a0570: 7465 2065 7861 6d70 6c65 2061 626f 7665 te example above │ │ │ │ -001a0580: 2c20 7765 2067 656e 6572 6174 6520 736f , we generate so │ │ │ │ -001a0590: 7572 6365 2063 6f64 6520 7573 696e 6720 urce code using │ │ │ │ -001a05a0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ -001a05b0: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 746f -n to │ │ │ │ -001a05c0: 2070 7265 6669 7820 7468 6520 6765 6e65 prefix the gene │ │ │ │ -001a05d0: 7261 7465 6420 6669 6c65 7320 616e 6420 rated files and │ │ │ │ -001a05e0: 746f 2072 656e 616d 6520 7468 6520 6e61 to rename the na │ │ │ │ -001a05f0: 6d65 7370 6163 6520 7461 626c 6520 746f mespace table to │ │ │ │ -001a0600: 2061 766f 6964 206c 696e 6b20 636f 6e66 avoid link conf │ │ │ │ -001a0610: 6c69 6374 733a 203c 2f70 3e3c 7072 6520 licts:

     soapcpp2 -n ra
    │ │ │ │ -001a0640: 7465 2e68 0a3c 2f70 7265 3e3c 703e 2046  te.h.

    F │ │ │ │ -001a0650: 6f75 7274 682c 2077 6520 7573 6520 7468 ourth, we use th │ │ │ │ -001a0660: 6520 6765 6e65 7261 7465 6420 736f 7572 e generated sour │ │ │ │ -001a0670: 6365 2063 6f64 6520 6c69 6272 6172 6965 ce code librarie │ │ │ │ -001a0680: 7320 7769 7468 2074 6865 206d 6169 6e20 s with the main │ │ │ │ -001a0690: 7072 6f67 7261 6d2e 3c2f 703e 0a3c 6469 program.

    .
    │ │ │ │ -001a06e0: 2369 6e63 6c75 6465 2026 7175 6f74 3b71 #include "q │ │ │ │ -001a06f0: 756f 7465 482e 682e 6826 7175 6f74 3b3c uoteH.h.h"< │ │ │ │ -001a0700: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -001a0720: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ -001a0730: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ │ -001a0740: 6465 2026 7175 6f74 3b72 6174 6548 2e68 de "rateH.h │ │ │ │ -001a0750: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"< │ │ │ │ -001a0760: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo │ │ │ │ -001a07a0: 743b 7175 6f74 652e 6e73 6d61 7026 7175 t;quote.nsmap&qu │ │ │ │ -001a07b0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    │ │ │ │ -001a07c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i │ │ │ │ -001a07f0: 6e63 6c75 6465 2026 7175 6f74 3b72 6174 nclude "rat │ │ │ │ -001a0800: 652e 6e73 6d61 7026 7175 6f74 3b3c 2f73 e.nsmap"
    .
    .
    int main │ │ │ │ -001a0870: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (int argc, char *argv[])
    } // na │ │ │ │ +001a0510: 6d65 7370 6163 6520 7261 7465 3c2f 7370 mespace rate
    .
    │ │ │ │ +001a0530: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Compi │ │ │ │ -001a15c0: 6c65 2061 6e64 206c 696e 6b20 7468 6973 le and link this │ │ │ │ -001a15d0: 2061 7070 6c69 6361 7469 6f6e 2077 6974 application wit │ │ │ │ -001a15e0: 6820 3c65 6d3e 3c63 6f64 653e 7374 6473 h stds │ │ │ │ -001a15f0: 6f61 7032 2e6f 3c2f 636f 6465 3e3c 2f65 oap2.o, en │ │ │ │ -001a1610: 7643 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e vC.o │ │ │ │ -001a1620: 2c20 3c65 6d3e 3c63 6f64 653e 7175 6f74 , quot │ │ │ │ -001a1630: 6553 6572 7665 7250 726f 7879 2e6f 3c2f eServerProxy.o, and │ │ │ │ -001a1650: 3c65 6d3e 3c63 6f64 653e 7261 7465 5365 rateSe │ │ │ │ -001a1660: 7276 6572 5072 6f78 792e 6f3c 2f63 6f64 rverProxy.o.

    .

    │ │ │ │ -001a1680: 496e 7374 6561 6420 6f66 2074 6865 2067 Instead of the g │ │ │ │ -001a1690: 656e 6572 6174 6564 203c 636f 6465 3e73 enerated s │ │ │ │ -001a16a0: 6f61 705f 6361 6c6c 5f77 6562 6d65 7468 oap_call_webmeth │ │ │ │ -001a16b0: 6f64 3c2f 636f 6465 3e20 7374 7562 2066 od stub f │ │ │ │ -001a16c0: 756e 6374 696f 6e73 2079 6f75 2063 616e unctions you can │ │ │ │ -001a16d0: 2061 6c73 6f20 7573 6520 3c62 3e3c 636f also use soapcpp2 -j option │ │ │ │ -001a1700: 203c 623e 3c63 6f64 653e 2d6a 3c2f 636f -j or optio │ │ │ │ -001a1720: 6e20 3c62 3e3c 636f 6465 3e2d 693c 2f63 n -i to gene │ │ │ │ -001a1740: 7261 7465 2043 2b2b 2070 726f 7879 2063 rate C++ proxy c │ │ │ │ -001a1750: 6c61 7373 6573 2e3c 2f70 3e0a 3c70 3e54 lasses.

    .

    T │ │ │ │ -001a1760: 6f20 636f 6d70 696c 6520 7365 7276 6572 o compile server │ │ │ │ -001a1770: 2069 7320 7665 7279 2073 696d 696c 6172 is very similar │ │ │ │ -001a1780: 2e20 466f 7220 6578 616d 706c 652c 2061 . For example, a │ │ │ │ -001a1790: 7373 756d 6520 7468 6174 2077 6520 6e65 ssume that we ne │ │ │ │ -001a17a0: 6564 2074 6f20 696d 706c 656d 656e 7420 ed to implement │ │ │ │ -001a17b0: 6120 6361 6c63 756c 6174 6f72 2073 6572 a calculator ser │ │ │ │ -001a17c0: 7669 6365 2061 6e64 2077 6520 7761 6e74 vice and we want │ │ │ │ -001a17d0: 2074 6f20 6372 6561 7465 2061 206c 6962 to create a lib │ │ │ │ -001a17e0: 7261 7279 2066 6f72 2069 742e 3c2f 703e rary for it.

    │ │ │ │ -001a17f0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    n │ │ │ │ -001a1830: 616d 6573 7061 6365 203c 2f73 7061 6e3e amespace │ │ │ │ -001a1840: 6361 6c63 207b 3c2f 6469 763e 0a3c 6469 calc {
    . │ │ │ │ -001a1860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -001a1890: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ -001a18a0: 6520 6e61 6d65 3a20 4361 6c63 203c 2f73 e name: Calc
    .
    //gsoap ns se │ │ │ │ -001a18f0: 7276 6963 6520 7374 796c 653a 2072 7063 rvice style: rpc │ │ │ │ -001a1900: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -001a1910: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a1920: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ -001a1940: 7320 7365 7276 6963 6520 656e 636f 6469 s service encodi │ │ │ │ -001a1950: 6e67 3a20 656e 636f 6465 6420 3c2f 7370 ng: encoded
    .
    //gsoap ns ser │ │ │ │ -001a19a0: 7669 6365 206c 6f63 6174 696f 6e3a 2068 vice location: h │ │ │ │ -001a19b0: 7474 703a 2f2f 7777 772e 6373 2e66 7375 ttp://www.cs.fsu │ │ │ │ -001a19c0: 2e65 6475 2f7e 656e 6765 6c65 6e2f 6361 .edu/~engelen/ca │ │ │ │ -001a19d0: 6c63 2e63 6769 203c 2f73 7061 6e3e 3c2f lc.cgi .
    //g │ │ │ │ -001a1a10: 736f 6170 206e 7320 7363 6865 6d61 206e soap ns schema n │ │ │ │ -001a1a20: 616d 6573 7061 6365 3a20 7572 6e3a 6361 amespace: urn:ca │ │ │ │ -001a1a30: 6c63 203c 2f73 7061 6e3e 3c2f 6469 763e lc
    │ │ │ │ -001a1a40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int │ │ │ │ -001a1a70: 3c2f 7370 616e 3e20 6e73 5f5f 6164 6428 ns__add( │ │ │ │ -001a1a80: 3c73 7061 6e20 636c 6173 733d 226b 6579 double │ │ │ │ -001a1aa0: 3c2f 7370 616e 3e20 612c 203c 7370 616e a, double b, │ │ │ │ -001a1af0: 646f 7562 6c65 3c2f 7370 616e 3e20 2661 double &a │ │ │ │ -001a1b00: 6d70 3b72 6573 756c 7429 3b20 3c2f 6469 mp;result); .
    i │ │ │ │ -001a1b40: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 7375 nt ns__su │ │ │ │ -001a1b50: 6228 3c73 7061 6e20 636c 6173 733d 226b b(doub │ │ │ │ -001a1b70: 6c65 3c2f 7370 616e 3e20 612c 203c 7370 le a, double b, double │ │ │ │ -001a1bd0: 2661 6d70 3b72 6573 756c 7429 3b20 3c2f &result); .
    int ns__ │ │ │ │ -001a1c20: 6d75 6c28 3c73 7061 6e20 636c 6173 733d mul(do │ │ │ │ -001a1c40: 7562 6c65 3c2f 7370 616e 3e20 612c 203c uble a, < │ │ │ │ -001a1c50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001a1c60: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype">double< │ │ │ │ -001a1c70: 2f73 7061 6e3e 2062 2c20 3c73 7061 6e20 /span> b, double &result); │ │ │ │ -001a1cb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns │ │ │ │ -001a1cf0: 5f5f 6469 7628 3c73 7061 6e20 636c 6173 __div( │ │ │ │ -001a1d10: 646f 7562 6c65 3c2f 7370 616e 3e20 612c double a, │ │ │ │ -001a1d20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl │ │ │ │ -001a1d40: 653c 2f73 7061 6e3e 2062 2c20 3c73 7061 e b, double &result) │ │ │ │ -001a1d80: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    .
    } // │ │ │ │ -001a1dd0: 6e61 6d65 7370 6163 6520 6361 6c63 3c2f namespace calc
    .

    We generat │ │ │ │ -001a1e10: 6520 636f 6465 3a20 3c2f 703e 3c70 7265 e code:

     soapcpp2 -j -
    │ │ │ │ -001a1e40: 6e20 6361 6c63 2e68 0a3c 2f70 7265 3e3c  n calc.h.
    < │ │ │ │ -001a1e50: 703e 2048 6572 6520 7765 2075 7365 6420 p> Here we used │ │ │ │ -001a1e60: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ -001a1e70: 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 746f -j to │ │ │ │ -001a1e80: 2067 656e 6572 6174 6520 6120 432b 2b20 generate a C++ │ │ │ │ -001a1e90: 7365 7276 6963 6520 636c 6173 7320 3c65 service class calcCalc │ │ │ │ -001a1eb0: 5365 7276 6963 652e 683c 2f63 6f64 653e Service.h │ │ │ │ -001a1ec0: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63
    and calcCalcServ │ │ │ │ -001a1ee0: 6963 652e 6370 703c 2f63 6f64 653e 3c2f ice.cpp
    . The effect │ │ │ │ -001a1f00: 6f66 2074 6865 203c 623e 3c63 6f64 653e of the │ │ │ │ -001a1f10: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 6f70 -n op │ │ │ │ -001a1f20: 7469 6f6e 2069 7320 7468 6174 2069 7420 tion is that it │ │ │ │ -001a1f30: 6372 6561 7465 7320 6c6f 6361 6c20 6e61 creates local na │ │ │ │ -001a1f40: 6d65 7370 6163 6520 7461 626c 6573 2061 mespace tables a │ │ │ │ -001a1f50: 6e64 2075 7365 7320 3c65 6d3e 3c63 6f64 nd uses calc
    to prefix the │ │ │ │ -001a1f80: 2067 656e 6572 6174 6564 2066 696c 6573 generated files │ │ │ │ -001a1f90: 2e3c 2f70 3e0a 3c64 6976 2063 6c61 7373 .

    .
    #includ │ │ │ │ -001a1fe0: 6520 2671 756f 743b 6361 6c63 4361 6c63 e "calcCalc │ │ │ │ -001a1ff0: 5365 7276 6963 652e 6826 7175 6f74 3b3c Service.h"< │ │ │ │ -001a2000: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -001a2020: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ -001a2030: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ │ -001a2040: 6465 2026 7175 6f74 3b63 616c 632e 6e73 de "calc.ns │ │ │ │ -001a2050: 6d61 7026 7175 6f74 3b3c 2f73 7061 6e3e map" │ │ │ │ +001a08e0: 6e65 223e 2020 3c73 7061 6e20 636c 6173 ne"> │ │ │ │ +001a0900: 6966 3c2f 7370 616e 3e20 2861 7267 6320 if (argc │ │ │ │ +001a0910: 266c 743b 3d20 3129 203c 2f64 6976 3e0a <= 1)
    . │ │ │ │ +001a0920: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    │ │ │ │ +001a0950: 2020 7374 643a 3a63 6572 7220 266c 743b std::cerr < │ │ │ │ +001a0960: 266c 743b 203c 7370 616e 2063 6c61 7373 < "Usage: ma │ │ │ │ +001a0990: 696e 2074 6963 6b65 7220 5b63 7572 7265 in ticker [curre │ │ │ │ +001a09a0: 6e63 795d 2671 756f 743b 3c2f 7370 616e ncy]" << std:: │ │ │ │ +001a09c0: 656e 646c 203c 2f64 6976 3e0a 3c64 6976 endl
    .
    │ │ │ │ +001a09e0: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL │ │ │ │ +001a09f0: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . │ │ │ │ +001a0a10: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    .
    . │ │ │ │ +001a0b20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    fl │ │ │ │ +001a0b50: 6f61 743c 2f73 7061 6e3e 2071 3b20 3c2f oat q; ...
    }.
    else < │ │ │ │ +001a0e30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    .
    if (arg │ │ │ │ +001a0e90: 6320 2667 743b 2032 2920 3c2f 6469 763e c > 2)
    │ │ │ │ +001a0ea0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .< │ │ │ │ +001a0ec0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a0ed0: 3e20 2020 2020 203c 7370 616e 2063 6c61 > float r; │ │ │ │ +001a0f00: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +001a0f20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_ │ │ │ │ +001a0f80: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(< │ │ │ │ +001a0f90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a0fa0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001a0fb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001a0fc0: 7261 7465 5f6e 616d 6573 7061 6365 7329 rate_namespaces) │ │ │ │ +001a0fd0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ +001a0ff0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_call_ │ │ │ │ +001a1020: 6e73 5f5f 6765 7452 6174 6528 3c61 2063 ns__getRate(soap, NUL │ │ │ │ +001a1060: 4c2c 204e 554c 4c2c 203c 7370 616e 2063 L, NULL, "us&qu │ │ │ │ +001a1090: 6f74 3b3c 2f73 7061 6e3e 2c20 6172 6776 ot;, argv │ │ │ │ +001a10a0: 5b32 5d2c 2072 2929 203c 7370 616e 2063 [2], r)) / │ │ │ │ +001a10c0: 2f20 6765 7420 7261 7465 2069 6e20 5553 / get rate in US │ │ │ │ +001a10d0: 2064 6f6c 6c61 7273 203c 2f73 7061 6e3e dollars │ │ │ │ +001a10e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001a1100: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_print_f │ │ │ │ +001a1160: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault( │ │ │ │ +001a1190: 736f 6170 3c2f 613e 2c20 7374 6465 7272 soap, stderr │ │ │ │ +001a11a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ +001a11c0: 2020 3c73 7061 6e20 636c 6173 733d 226b else │ │ │ │ +001a11e0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001a11f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a1200: 3e20 2020 2020 2020 2071 202a 3d20 723b > q *= r; │ │ │ │ +001a1210: 203c 7370 616e 2063 6c61 7373 3d22 636f // conver │ │ │ │ +001a1230: 7420 7468 6520 7175 6f74 6520 3c2f 7370 t the quote
    .
    │ │ │ │ +001a1260: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    s │ │ │ │ +001a1280: 7464 3a3a 636f 7574 2026 6c74 3b26 6c74 td::cout << │ │ │ │ +001a1290: 3b20 6172 6776 5b31 5d20 266c 743b 266c ; argv[1] <&l │ │ │ │ +001a12a0: 743b 203c 7370 616e 2063 6c61 7373 3d22 t; & │ │ │ │ +001a12c0: 7175 6f74 3b3a 2026 7175 6f74 3b3c 2f73 quot;: " << q │ │ │ │ +001a12e0: 266c 743b 266c 743b 2073 7464 3a3a 656e << std::en │ │ │ │ +001a12f0: 646c 3b20 3c2f 6469 763e 0a3c 6469 7620 dl;
    .
    } │ │ │ │ +001a1310: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    soap_end( │ │ │ │ +001a1440: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ +001a1470: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    soap_free(< │ │ │ │ +001a14f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a1500: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001a1510: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ +001a1520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return 0;
    .} │ │ │ │ +001a1580: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    Compile and lin │ │ │ │ +001a15b0: 6b20 7468 6973 2061 7070 6c69 6361 7469 k this applicati │ │ │ │ +001a15c0: 6f6e 2077 6974 6820 3c65 6d3e 3c63 6f64 on with stdsoap2.o, envC.o, quoteServerPro │ │ │ │ +001a1620: 7879 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e xy.o │ │ │ │ +001a1630: 2c20 616e 6420 3c65 6d3e 3c63 6f64 653e , and │ │ │ │ +001a1640: 7261 7465 5365 7276 6572 5072 6f78 792e rateServerProxy. │ │ │ │ +001a1650: 6f3c 2f63 6f64 653e 3c2f 656d 3e2e 3c2f o..

    Instead of │ │ │ │ +001a1670: 2074 6865 2067 656e 6572 6174 6564 203c the generated < │ │ │ │ +001a1680: 636f 6465 3e73 6f61 705f 6361 6c6c 5f77 code>soap_call_w │ │ │ │ +001a1690: 6562 6d65 7468 6f64 3c2f 636f 6465 3e20 ebmethod │ │ │ │ +001a16a0: 7374 7562 2066 756e 6374 696f 6e73 2079 stub functions y │ │ │ │ +001a16b0: 6f75 2063 616e 2061 6c73 6f20 7573 6520 ou can also use │ │ │ │ +001a16c0: 3c62 3e3c 636f 6465 3e73 6f61 7063 7070 soapcpp │ │ │ │ +001a16d0: 3220 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 2 -j │ │ │ │ +001a16e0: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ +001a16f0: 2d6a 3c2f 636f 6465 3e3c 2f62 3e20 6f72 -j or │ │ │ │ +001a1700: 206f 7074 696f 6e20 3c62 3e3c 636f 6465 option -i t │ │ │ │ +001a1720: 6f20 6765 6e65 7261 7465 2043 2b2b 2070 o generate C++ p │ │ │ │ +001a1730: 726f 7879 2063 6c61 7373 6573 2e3c 2f70 roxy classes.

    .

    To compile │ │ │ │ +001a1750: 7365 7276 6572 2069 7320 7665 7279 2073 server is very s │ │ │ │ +001a1760: 696d 696c 6172 2e20 466f 7220 6578 616d imilar. For exam │ │ │ │ +001a1770: 706c 652c 2061 7373 756d 6520 7468 6174 ple, assume that │ │ │ │ +001a1780: 2077 6520 6e65 6564 2074 6f20 696d 706c we need to impl │ │ │ │ +001a1790: 656d 656e 7420 6120 6361 6c63 756c 6174 ement a calculat │ │ │ │ +001a17a0: 6f72 2073 6572 7669 6365 2061 6e64 2077 or service and w │ │ │ │ +001a17b0: 6520 7761 6e74 2074 6f20 6372 6561 7465 e want to create │ │ │ │ +001a17c0: 2061 206c 6962 7261 7279 2066 6f72 2069 a library for i │ │ │ │ +001a17d0: 742e 3c2f 703e 0a3c 6469 7620 636c 6173 t.

    .
    < │ │ │ │ +001a1800: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a1810: 6f72 6422 3e6e 616d 6573 7061 6365 203c ord">namespace < │ │ │ │ +001a1820: 2f73 7061 6e3e 6361 6c63 207b 3c2f 6469 /span>calc {.
    .< │ │ │ │ +001a1860: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001a1870: 656e 7422 3e2f 2f67 736f 6170 206e 7320 ent">//gsoap ns │ │ │ │ +001a1880: 7365 7276 6963 6520 6e61 6d65 3a20 4361 service name: Ca │ │ │ │ +001a1890: 6c63 203c 2f73 7061 6e3e 3c2f 6469 763e lc
    │ │ │ │ +001a18a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ +001a18d0: 206e 7320 7365 7276 6963 6520 7374 796c ns service styl │ │ │ │ +001a18e0: 653a 2072 7063 203c 2f73 7061 6e3e 3c2f e: rpc .
    //g │ │ │ │ +001a1920: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ +001a1930: 656e 636f 6469 6e67 3a20 656e 636f 6465 encoding: encode │ │ │ │ +001a1940: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    . │ │ │ │ +001a1950: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ +001a1980: 6e73 2073 6572 7669 6365 206c 6f63 6174 ns service locat │ │ │ │ +001a1990: 696f 6e3a 2068 7474 703a 2f2f 7777 772e ion: http://www. │ │ │ │ +001a19a0: 6373 2e66 7375 2e65 6475 2f7e 656e 6765 cs.fsu.edu/~enge │ │ │ │ +001a19b0: 6c65 6e2f 6361 6c63 2e63 6769 203c 2f73 len/calc.cgi
    .
    //gsoap ns sc │ │ │ │ +001a1a00: 6865 6d61 206e 616d 6573 7061 6365 3a20 hema namespace: │ │ │ │ +001a1a10: 7572 6e3a 6361 6c63 203c 2f73 7061 6e3e urn:calc │ │ │ │ +001a1a20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int ns │ │ │ │ +001a1a60: 5f5f 6164 6428 3c73 7061 6e20 636c 6173 __add( │ │ │ │ +001a1a80: 646f 7562 6c65 3c2f 7370 616e 3e20 612c double a, │ │ │ │ +001a1a90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl │ │ │ │ +001a1ab0: 653c 2f73 7061 6e3e 2062 2c20 3c73 7061 e b, double &result) │ │ │ │ +001a1af0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    int │ │ │ │ +001a1b30: 6e73 5f5f 7375 6228 3c73 7061 6e20 636c ns__sub(double │ │ │ │ +001a1b60: 612c 203c 7370 616e 2063 6c61 7373 3d22 a, dou │ │ │ │ +001a1b80: 626c 653c 2f73 7061 6e3e 2062 2c20 3c73 ble b, double &resul │ │ │ │ +001a1bc0: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
    .
    int ns__mul(double a, d │ │ │ │ +001a1c50: 6f75 626c 653c 2f73 7061 6e3e 2062 2c20 ouble b, │ │ │ │ +001a1c60: 3c73 7061 6e20 636c 6173 733d 226b 6579 double │ │ │ │ +001a1c80: 3c2f 7370 616e 3e20 2661 6d70 3b72 6573 &res │ │ │ │ +001a1c90: 756c 7429 3b20 3c2f 6469 763e 0a3c 6469 ult);
    .< │ │ │ │ +001a1cb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a1cc0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int ns__div(double a, double b │ │ │ │ +001a1d30: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub │ │ │ │ +001a1d50: 6c65 3c2f 7370 616e 3e20 2661 6d70 3b72 le &r │ │ │ │ +001a1d60: 6573 756c 7429 3b20 3c2f 6469 763e 0a3c esult);
    .< │ │ │ │ +001a1d70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a1d80: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    } // namespace │ │ │ │ +001a1dc0: 6361 6c63 3c2f 7370 616e 3e3c 2f64 6976 calc
    .

    We g │ │ │ │ +001a1df0: 656e 6572 6174 6520 636f 6465 3a20 3c2f enerate code:

     soapcpp
    │ │ │ │ +001a1e20: 3220 2d6a 202d 6e20 6361 6c63 2e68 0a3c  2 -j -n calc.h.<
    │ │ │ │ +001a1e30: 2f70 7265 3e3c 703e 2048 6572 6520 7765  /pre>

    Here we │ │ │ │ +001a1e40: 2075 7365 6420 6f70 7469 6f6e 203c 623e used option │ │ │ │ +001a1e50: 3c63 6f64 653e 2d6a 3c2f 636f 6465 3e3c -j< │ │ │ │ +001a1e60: 2f62 3e20 746f 2067 656e 6572 6174 6520 /b> to generate │ │ │ │ +001a1e70: 6120 432b 2b20 7365 7276 6963 6520 636c a C++ service cl │ │ │ │ +001a1e80: 6173 7320 3c65 6d3e 3c63 6f64 653e 6361 ass ca │ │ │ │ +001a1e90: 6c63 4361 6c63 5365 7276 6963 652e 683c lcCalcService.h< │ │ │ │ +001a1ea0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ +001a1eb0: 3c65 6d3e 3c63 6f64 653e 6361 6c63 4361 calcCa │ │ │ │ +001a1ec0: 6c63 5365 7276 6963 652e 6370 703c 2f63 lcService.cpp. The e │ │ │ │ +001a1ee0: 6666 6563 7420 6f66 2074 6865 203c 623e ffect of the │ │ │ │ +001a1ef0: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n< │ │ │ │ +001a1f00: 2f62 3e20 6f70 7469 6f6e 2069 7320 7468 /b> option is th │ │ │ │ +001a1f10: 6174 2069 7420 6372 6561 7465 7320 6c6f at it creates lo │ │ │ │ +001a1f20: 6361 6c20 6e61 6d65 7370 6163 6520 7461 cal namespace ta │ │ │ │ +001a1f30: 626c 6573 2061 6e64 2075 7365 7320 3c65 bles and uses calc to pref │ │ │ │ +001a1f60: 6978 2074 6865 2067 656e 6572 6174 6564 ix the generated │ │ │ │ +001a1f70: 2066 696c 6573 2e3c 2f70 3e0a 3c64 6976 files.

    .
    # │ │ │ │ +001a1fc0: 696e 636c 7564 6520 2671 756f 743b 6361 include "ca │ │ │ │ +001a1fd0: 6c63 4361 6c63 5365 7276 6963 652e 6826 lcCalcService.h& │ │ │ │ +001a1fe0: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    │ │ │ │ +001a2020: 2369 6e63 6c75 6465 2026 7175 6f74 3b63 #include "c │ │ │ │ +001a2030: 616c 632e 6e73 6d61 7026 7175 6f74 3b3c alc.nsmap"< │ │ │ │ +001a2040: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ 001a2060: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -001a2080: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int │ │ │ │ -001a20b0: 3c2f 7370 616e 3e20 6d61 696e 2829 3c2f main()int ma │ │ │ │ +001a20a0: 696e 2829 3c2f 6469 763e 0a3c 6469 7620 in()
    .
    {.
    {
    .< │ │ │ │ -001a20e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a20f0: 3e20 2063 616c 633a 3a43 616c 6320 6361 > calc::Calc ca │ │ │ │ -001a2100: 6c63 3b20 3c2f 6469 763e 0a3c 6469 7620 lc;
    .
    . │ │ │ │ -001a2120: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
    .
    cal │ │ │ │ -001a2160: 632e 7365 7276 6528 293b 203c 7370 616e c.serve(); // calls reques │ │ │ │ -001a2190: 7420 6469 7370 6174 6368 6572 2074 6f20 t dispatcher to │ │ │ │ -001a21a0: 696e 766f 6b65 206f 6e65 206f 6620 7468 invoke one of th │ │ │ │ -001a21b0: 6520 6675 6e63 7469 6f6e 7320 6265 6c6f e functions belo │ │ │ │ -001a21c0: 7720 3c2f 7370 616e 3e3c 2f64 6976 3e0a w
    . │ │ │ │ -001a21d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... // │ │ │ │ -001a2200: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . calc::C │ │ │ │ +001a20e0: 616c 6320 6361 6c63 3b20 3c2f 6469 763e alc calc;
    │ │ │ │ +001a20f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ +001a2120: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ +001a2130: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a2140: 3e20 2063 616c 632e 7365 7276 6528 293b > calc.serve(); │ │ │ │ +001a2150: 203c 7370 616e 2063 6c61 7373 3d22 636f // calls │ │ │ │ +001a2170: 7265 7175 6573 7420 6469 7370 6174 6368 request dispatch │ │ │ │ +001a2180: 6572 2074 6f20 696e 766f 6b65 206f 6e65 er to invoke one │ │ │ │ +001a2190: 206f 6620 7468 6520 6675 6e63 7469 6f6e of the function │ │ │ │ +001a21a0: 7320 6265 6c6f 7720 3c2f 7370 616e 3e3c s below < │ │ │ │ +001a21b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... //.
    }
    . │ │ │ │ -001a2220: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    .
    in │ │ │ │ -001a2270: 743c 2f73 7061 6e3e 2063 616c 633a 3a43 t calc::C │ │ │ │ -001a2280: 616c 633a 3a61 6464 283c 7370 616e 2063 alc::add(double │ │ │ │ -001a22b0: 2061 2c20 3c73 7061 6e20 636c 6173 733d a, do │ │ │ │ -001a22d0: 7562 6c65 3c2f 7370 616e 3e20 622c 203c uble b, < │ │ │ │ -001a22e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001a22f0: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype">double< │ │ │ │ -001a2300: 2f73 7061 6e3e 2026 616d 703b 7265 7375 /span> &resu │ │ │ │ -001a2310: 6c74 293c 2f64 6976 3e0a 3c64 6976 2063 lt)
    .
    {.
    result = │ │ │ │ -001a2350: 2061 202b 2062 3b3c 2f64 6976 3e0a 3c64 a + b;
    . │ │ │ │ -001a2370: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ -001a2390: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn SO │ │ │ │ -001a23f0: 4150 5f4f 4b3c 2f61 3e3b 3c2f 6469 763e AP_OK;
    │ │ │ │ -001a2400: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .
    < │ │ │ │ -001a2430: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int cal │ │ │ │ -001a2470: 633a 3a43 616c 633a 3a73 7562 283c 7370 c::Calc::sub(double a, double │ │ │ │ -001a24d0: 622c 203c 7370 616e 2063 6c61 7373 3d22 b, dou │ │ │ │ -001a24f0: 626c 653c 2f73 7061 6e3e 2026 616d 703b ble & │ │ │ │ -001a2500: 7265 7375 6c74 293c 2f64 6976 3e0a 3c64 result)
    ..
    int c │ │ │ │ +001a2260: 616c 633a 3a43 616c 633a 3a61 6464 283c alc::Calc::add(< │ │ │ │ +001a2270: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a2280: 6f72 6474 7970 6522 3e64 6f75 626c 653c ordtype">double< │ │ │ │ +001a2290: 2f73 7061 6e3e 2061 2c20 3c73 7061 6e20 /span> a, double b, d │ │ │ │ +001a22e0: 6f75 626c 653c 2f73 7061 6e3e 2026 616d ouble &am │ │ │ │ +001a22f0: 703b 7265 7375 6c74 293c 2f64 6976 3e0a p;result)
    . │ │ │ │ +001a2300: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    re │ │ │ │ +001a2330: 7375 6c74 203d 2061 202b 2062 3b3c 2f64 sult = a + b;.
    return │ │ │ │ +001a2380: 3c61 2063 6c61 7373 3d22 636f 6465 2220 SOAP_OK; │ │ │ │ +001a23e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    .
    .
    int calc::Calc::s │ │ │ │ +001a2460: 7562 283c 7370 616e 2063 6c61 7373 3d22 ub(dou │ │ │ │ +001a2480: 626c 653c 2f73 7061 6e3e 2061 2c20 3c73 ble a, double b, double │ │ │ │ +001a24e0: 2026 616d 703b 7265 7375 6c74 293c 2f64 &result).
    {
    . │ │ │ │ -001a2520: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    resu │ │ │ │ -001a2540: 6c74 203d 2061 202d 2062 3b3c 2f64 6976 lt = a - b;
    .
    │ │ │ │ -001a2580: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK;.
    }
    . │ │ │ │ +001a2520: 2020 7265 7375 6c74 203d 2061 202d 2062 result = a - b │ │ │ │ +001a2530: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    ..
    } < │ │ │ │ +001a25f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    . │ │ │ │ 001a2610: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    int │ │ │ │ -001a2660: 2063 616c 633a 3a43 616c 633a 3a6d 756c calc::Calc::mul │ │ │ │ -001a2670: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (doubl │ │ │ │ -001a2690: 653c 2f73 7061 6e3e 2061 2c20 3c73 7061 e a, double b, double & │ │ │ │ -001a26f0: 616d 703b 7265 7375 6c74 293c 2f64 6976 amp;result)
    int< │ │ │ │ +001a2640: 2f73 7061 6e3e 2063 616c 633a 3a43 616c /span> calc::Cal │ │ │ │ +001a2650: 633a 3a6d 756c 283c 7370 616e 2063 6c61 c::mul(double a │ │ │ │ +001a2680: 2c20 3c73 7061 6e20 636c 6173 733d 226b , doub │ │ │ │ +001a26a0: 6c65 3c2f 7370 616e 3e20 622c 203c 7370 le b, double
    &result │ │ │ │ +001a26e0: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {
    .
    {
    .
    │ │ │ │ -001a2730: 7265 7375 6c74 203d 2061 202a 2062 3b3c result = a * b;< │ │ │ │ -001a2740: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    } result = a │ │ │ │ +001a2720: 202a 2062 3b3c 2f64 6976 3e0a 3c64 6976 * b;
    .
    │ │ │ │ +001a2740: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +001a2760: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP │ │ │ │ +001a27c0: 5f4f 4b3c 2f61 3e3b 3c2f 6469 763e 0a3c _OK;
    .< │ │ │ │ +001a27d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a27e0: 3e7d 203c 2f64 6976 3e0a 3c64 6976 2063 >}
    .
    .
    . │ │ │ │ -001a2830: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    calc::Calc: │ │ │ │ -001a2860: 3a64 6976 283c 7370 616e 2063 6c61 7373 :div(d │ │ │ │ -001a2880: 6f75 626c 653c 2f73 7061 6e3e 2061 2c20 ouble a, │ │ │ │ -001a2890: 3c73 7061 6e20 636c 6173 733d 226b 6579 double │ │ │ │ -001a28b0: 3c2f 7370 616e 3e20 622c 203c 7370 616e b, double &result)< │ │ │ │ +001a2810: 6c69 6e65 223e 3c73 7061 6e20 636c 6173 line"> │ │ │ │ +001a2830: 696e 743c 2f73 7061 6e3e 2063 616c 633a int calc: │ │ │ │ +001a2840: 3a43 616c 633a 3a64 6976 283c 7370 616e :Calc::div(double a, │ │ │ │ +001a2890: 646f 7562 6c65 3c2f 7370 616e 3e20 622c double b, │ │ │ │ +001a28a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 doubl │ │ │ │ +001a28c0: 653c 2f73 7061 6e3e 2026 616d 703b 7265 e &re │ │ │ │ +001a28d0: 7375 6c74 293c 2f64 6976 3e0a 3c64 6976 sult)
    .
    {< │ │ │ │ 001a28f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -001a2910: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    result = a / │ │ │ │ -001a2930: 2062 3b3c 2f64 6976 3e0a 3c64 6976 2063 b;
    ..} │ │ │ │ -001a29f0: 203c 2f64 6976 3e0a 3c2f 6469 763e 3c21
    .
    < │ │ │ │ -001a2a10: 703e 5468 6520 6578 616d 706c 6520 6162 p>The example ab │ │ │ │ -001a2a20: 6f76 6520 7365 7276 6573 2072 6571 7565 ove serves reque │ │ │ │ -001a2a30: 7374 7320 6f76 6572 2073 7464 696e 2f6f sts over stdin/o │ │ │ │ -001a2a40: 7574 2e20 5573 6520 7468 6520 6269 6e64 ut. Use the bind │ │ │ │ -001a2a50: 2061 6e64 2061 6363 6570 7420 6361 6c6c and accept call │ │ │ │ -001a2a60: 7320 746f 2063 7265 6174 6520 6120 7374 s to create a st │ │ │ │ -001a2a70: 616e 642d 616c 6f6e 6520 7365 7276 6572 and-alone server │ │ │ │ -001a2a80: 2074 6f20 7365 7276 6963 6520 696e 626f to service inbo │ │ │ │ -001a2a90: 756e 6420 7265 7175 6573 7473 206f 7665 und requests ove │ │ │ │ -001a2aa0: 7220 736f 636b 6574 732c 2073 6565 2053 r sockets, see S │ │ │ │ -001a2ab0: 6563 7469 6f6e 203c 6120 636c 6173 733d ection How to create │ │ │ │ -001a2af0: 2061 2073 7461 6e64 2d61 6c6f 6e65 2073 a stand-alone s │ │ │ │ -001a2b00: 6572 7665 723c 2f61 3e20 2e3c 2f70 3e0a erver .

    . │ │ │ │ -001a2b10: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ -001a2b30: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    . │ │ │ │ -001a2b70: 4320 6578 616d 706c 6573 3c2f 6833 3e0a C examples

    . │ │ │ │ -001a2b80: 3c70 3e54 6869 7320 6973 2074 6865 2073

    This is the s │ │ │ │ -001a2b90: 616d 6520 6578 616d 706c 6520 6173 2061 ame example as a │ │ │ │ -001a2ba0: 626f 7665 2c20 6275 7420 7468 6520 636c bove, but the cl │ │ │ │ -001a2bb0: 6965 6e74 7320 6172 6520 6275 696c 6420 ients are build │ │ │ │ -001a2bc0: 696e 2043 2e3c 2f70 3e0a 3c70 3e57 6520 in C.

    .

    We │ │ │ │ -001a2bd0: 6372 6561 7465 2061 203c 656d 3e3c 636f create a env.h< │ │ │ │ -001a2bf0: 2f65 6d3e 2074 6861 7420 636f 6e74 6169 /em> that contai │ │ │ │ -001a2c00: 6e73 2074 6865 206a 6f69 6e74 2053 4f41 ns the joint SOA │ │ │ │ -001a2c10: 5020 4865 6164 6572 2061 6e64 2053 4f41 P Header and SOA │ │ │ │ -001a2c20: 5020 4661 756c 7420 6465 6669 6e69 7469 P Fault definiti │ │ │ │ -001a2c30: 6f6e 732e 2059 6f75 206d 6179 2068 6176 ons. You may hav │ │ │ │ -001a2c40: 6520 746f 2063 6f70 792d 7061 7374 6520 e to copy-paste │ │ │ │ -001a2c50: 7468 6573 6520 6672 6f6d 2074 6865 206f these from the o │ │ │ │ -001a2c60: 7468 6572 2068 6561 6465 7220 6669 6c65 ther header file │ │ │ │ -001a2c70: 732e 2054 6865 6e2c 2063 6f6d 7069 6c65 s. Then, compile │ │ │ │ -001a2c80: 2069 7420 6173 2066 6f6c 6c6f 7773 3a20 it as follows: │ │ │ │ -001a2c90: 3c2f 703e 3c70 7265 2063 6c61 7373 3d22

     soapc
    │ │ │ │ -001a2cb0: 7070 3220 2d63 202d 7065 6e76 2065 6e76  pp2 -c -penv env
    │ │ │ │ -001a2cc0: 2e68 0a20 6363 202d 6320 656e 7643 2e63  .h. cc -c envC.c
    │ │ │ │ -001a2cd0: 0a3c 2f70 7265 3e3c 703e 2057 6520 616c  .

    We al │ │ │ │ -001a2ce0: 736f 2063 6f6d 7069 6c65 203c 656d 3e3c so compile < │ │ │ │ -001a2cf0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso │ │ │ │ -001a2d00: 6170 322e 633c 2f63 6f64 653e 3c2f 656d ap2.c without namesp │ │ │ │ -001a2d20: 6163 6573 3a20 3c2f 703e 3c70 7265 2063 aces:

    │ │ │ │ -001a2d40: 2063 6320 2d63 202d 4457 4954 485f 4e4f   cc -c -DWITH_NO
    │ │ │ │ -001a2d50: 4e41 4d45 5350 4143 4553 2073 7464 736f  NAMESPACES stdso
    │ │ │ │ -001a2d60: 6170 322e 630a 3c2f 7072 653e 3c70 3e20  ap2.c.

    │ │ │ │ -001a2d70: 5365 636f 6e64 2c20 7765 2063 7265 6174 Second, we creat │ │ │ │ -001a2d80: 6520 7468 6520 4465 6c61 7965 6420 5374 e the Delayed St │ │ │ │ -001a2d90: 6f63 6b20 5175 6f74 6520 6865 6164 6572 ock Quote header │ │ │ │ -001a2da0: 2066 696c 6520 7370 6563 6966 6963 6174 file specificat │ │ │ │ -001a2db0: 696f 6e2c 2077 6869 6368 206d 6179 2062 ion, which may b │ │ │ │ -001a2dc0: 6520 6f62 7461 696e 6564 2075 7369 6e67 e obtained using │ │ │ │ -001a2dd0: 2074 6865 2057 5344 4c20 696d 706f 7274 the WSDL import │ │ │ │ -001a2de0: 6572 2e3c 2f70 3e0a 3c64 6976 2063 6c61 er.

    .
    │ │ │ │ -001a2e10: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ -001a2e30: 2073 6572 7669 6365 206e 616d 653a 2053 service name: S │ │ │ │ -001a2e40: 6572 7669 6365 203c 2f73 7061 6e3e 3c2f ervice .
    //g │ │ │ │ -001a2e80: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ -001a2e90: 7374 796c 653a 2072 7063 203c 2f73 7061 style: rpc
    .
    //gsoap ns serv │ │ │ │ -001a2ee0: 6963 6520 656e 636f 6469 6e67 3a20 656e ice encoding: en │ │ │ │ -001a2ef0: 636f 6465 6420 3c2f 7370 616e 3e3c 2f64 coded .
    //gs │ │ │ │ -001a2f30: 6f61 7020 6e73 2073 6572 7669 6365 206c oap ns service l │ │ │ │ -001a2f40: 6f63 6174 696f 6e3a 2068 7474 703a 2f2f ocation: http:// │ │ │ │ -001a2f50: 7365 7276 6963 6573 2e78 6d65 7468 6f64 services.xmethod │ │ │ │ -001a2f60: 732e 6e65 742f 736f 6170 203c 2f73 7061 s.net/soap
    .
    //gsoap ns sche │ │ │ │ -001a2fb0: 6d61 206e 616d 6573 7061 6365 3a20 7572 ma namespace: ur │ │ │ │ -001a2fc0: 6e3a 786d 6574 686f 6473 2d64 656c 6179 n:xmethods-delay │ │ │ │ -001a2fd0: 6564 2d71 756f 7465 7320 3c2f 7370 616e ed-quotes
    .
    │ │ │ │ -001a3010: 2f2f 6773 6f61 7020 6e73 2073 6572 7669 //gsoap ns servi │ │ │ │ -001a3020: 6365 206d 6574 686f 642d 6163 7469 6f6e ce method-action │ │ │ │ -001a3030: 3a20 6765 7451 756f 7465 2026 7175 6f74 : getQuote " │ │ │ │ -001a3040: 3b26 7175 6f74 3b20 3c2f 7370 616e 3e3c ;" < │ │ │ │ -001a3050: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    int ns_ │ │ │ │ -001a3090: 5f67 6574 5175 6f74 6528 3c73 7061 6e20 _getQuote(char │ │ │ │ -001a30c0: 2a73 796d 626f 6c2c 203c 7370 616e 2063 *symbol, float │ │ │ │ -001a30f0: 2a52 6573 756c 7429 3b3c 2f64 6976 3e0a *Result);
    . │ │ │ │ -001a3100: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    We com │ │ │ │ -001a3120: 7069 6c65 2069 7420 6173 2061 206c 6962 pile it as a lib │ │ │ │ -001a3130: 7261 7279 2061 6e64 2077 6520 7573 6520 rary and we use │ │ │ │ -001a3140: 6f70 7469 6f6e 7320 3c62 3e3c 636f 6465 options -n a │ │ │ │ -001a3160: 6e64 203c 623e 3c63 6f64 653e 2d70 7175 nd -pqu │ │ │ │ -001a3170: 6f74 653c 2f63 6f64 653e 3c2f 623e 2074 ote t │ │ │ │ -001a3180: 6f20 7072 6566 6978 2074 6865 2067 656e o prefix the gen │ │ │ │ -001a3190: 6572 6174 6564 2066 696c 6573 2061 6e64 erated files and │ │ │ │ -001a31a0: 2074 6f20 7265 6e61 6d65 2074 6865 206e to rename the n │ │ │ │ -001a31b0: 616d 6573 7061 6365 2074 6162 6c65 2074 amespace table t │ │ │ │ -001a31c0: 6f20 6176 6f69 6420 6c69 6e6b 2063 6f6e o avoid link con │ │ │ │ -001a31d0: 666c 6963 7473 3a20 3c2f 703e 3c70 7265 flicts:

     soapcpp2 -c -
    │ │ │ │ -001a3200: 6e20 2d70 7175 6f74 6520 7175 6f74 652e  n -pquote quote.
    │ │ │ │ -001a3210: 680a 2063 6320 2d63 2071 756f 7465 436c  h. cc -c quoteCl
    │ │ │ │ -001a3220: 6965 6e74 4c69 622e 630a 3c2f 7072 653e  ientLib.c.
    │ │ │ │ -001a3230: 3c70 3e20 5468 6972 642c 2077 6520 6372

    Third, we cr │ │ │ │ -001a3240: 6561 7465 2074 6865 2043 7572 7265 6e63 eate the Currenc │ │ │ │ -001a3250: 7920 4578 6368 616e 6765 2052 6174 6520 y Exchange Rate │ │ │ │ -001a3260: 6865 6164 6572 2066 696c 6520 7370 6563 header file spec │ │ │ │ -001a3270: 6966 6963 6174 696f 6e3a 3c2f 703e 0a3c ification:

    .< │ │ │ │ -001a3280: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ -001a3290: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    //g │ │ │ │ -001a32c0: 736f 6170 206e 7320 7365 7276 6963 6520 soap ns service │ │ │ │ -001a32d0: 6e61 6d65 3a20 5365 7276 6963 6520 3c2f name: Service
    .
    //gsoap ns s │ │ │ │ -001a3320: 6572 7669 6365 2073 7479 6c65 3a20 7270 ervice style: rp │ │ │ │ -001a3330: 6320 3c2f 7370 616e 3e3c 2f64 6976 3e0a c
    . │ │ │ │ -001a3340: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ -001a3370: 6e73 2073 6572 7669 6365 2065 6e63 6f64 ns service encod │ │ │ │ -001a3380: 696e 673a 2065 6e63 6f64 6564 203c 2f73 ing: encoded
    .
    //gsoap ns se │ │ │ │ -001a33d0: 7276 6963 6520 6c6f 6361 7469 6f6e 3a20 rvice location: │ │ │ │ -001a33e0: 6874 7470 3a2f 2f73 6572 7669 6365 732e http://services. │ │ │ │ -001a33f0: 786d 6574 686f 6473 2e6e 6574 2f73 6f61 xmethods.net/soa │ │ │ │ -001a3400: 7020 3c2f 7370 616e 3e3c 2f64 6976 3e0a p
    . │ │ │ │ -001a3410: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    //gsoap │ │ │ │ -001a3440: 6e73 2073 6368 656d 6120 6e61 6d65 7370 ns schema namesp │ │ │ │ -001a3450: 6163 653a 2075 726e 3a78 6d65 7468 6f64 ace: urn:xmethod │ │ │ │ -001a3460: 732d 4375 7272 656e 6379 4578 6368 616e s-CurrencyExchan │ │ │ │ -001a3470: 6765 203c 2f73 7061 6e3e 3c2f 6469 763e ge
    │ │ │ │ -001a3480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ -001a34b0: 206e 7320 7365 7276 6963 6520 6d65 7468 ns service meth │ │ │ │ -001a34c0: 6f64 2d61 6374 696f 6e3a 2067 6574 5261 od-action: getRa │ │ │ │ -001a34d0: 7465 2026 7175 6f74 3b26 7175 6f74 3b20 te "" │ │ │ │ -001a34e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001a3500: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    ns__getRate │ │ │ │ -001a3530: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (char< │ │ │ │ -001a3550: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1 │ │ │ │ -001a3560: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char │ │ │ │ -001a3580: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country │ │ │ │ -001a3590: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo │ │ │ │ -001a35b0: 6174 3c2f 7370 616e 3e20 2a52 6573 756c at *Resul │ │ │ │ -001a35c0: 7429 3b3c 2f64 6976 3e0a 3c2f 6469 763e t);
    .
    │ │ │ │ -001a35d0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The exam │ │ │ │ +001a2a00: 706c 6520 6162 6f76 6520 7365 7276 6573 ple above serves │ │ │ │ +001a2a10: 2072 6571 7565 7374 7320 6f76 6572 2073 requests over s │ │ │ │ +001a2a20: 7464 696e 2f6f 7574 2e20 5573 6520 7468 tdin/out. Use th │ │ │ │ +001a2a30: 6520 6269 6e64 2061 6e64 2061 6363 6570 e bind and accep │ │ │ │ +001a2a40: 7420 6361 6c6c 7320 746f 2063 7265 6174 t calls to creat │ │ │ │ +001a2a50: 6520 6120 7374 616e 642d 616c 6f6e 6520 e a stand-alone │ │ │ │ +001a2a60: 7365 7276 6572 2074 6f20 7365 7276 6963 server to servic │ │ │ │ +001a2a70: 6520 696e 626f 756e 6420 7265 7175 6573 e inbound reques │ │ │ │ +001a2a80: 7473 206f 7665 7220 736f 636b 6574 732c ts over sockets, │ │ │ │ +001a2a90: 2073 6565 2053 6563 7469 6f6e 203c 6120 see Section How to │ │ │ │ +001a2ad0: 6372 6561 7465 2061 2073 7461 6e64 2d61 create a stand-a │ │ │ │ +001a2ae0: 6c6f 6e65 2073 6572 7665 723c 2f61 3e20 lone server │ │ │ │ +001a2af0: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ +001a2b10: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ +001a2b20: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    │ │ │ │ +001a2b30: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .C examples │ │ │ │ +001a2b60: 3c2f 6833 3e0a 3c70 3e54 6869 7320 6973

    .

    This is │ │ │ │ +001a2b70: 2074 6865 2073 616d 6520 6578 616d 706c the same exampl │ │ │ │ +001a2b80: 6520 6173 2061 626f 7665 2c20 6275 7420 e as above, but │ │ │ │ +001a2b90: 7468 6520 636c 6965 6e74 7320 6172 6520 the clients are │ │ │ │ +001a2ba0: 6275 696c 6420 696e 2043 2e3c 2f70 3e0a build in C.

    . │ │ │ │ +001a2bb0: 3c70 3e57 6520 6372 6561 7465 2061 203c

    We create a < │ │ │ │ +001a2bc0: 656d 3e3c 636f 6465 3e65 6e76 2e68 3c2f em>env.h that │ │ │ │ +001a2be0: 636f 6e74 6169 6e73 2074 6865 206a 6f69 contains the joi │ │ │ │ +001a2bf0: 6e74 2053 4f41 5020 4865 6164 6572 2061 nt SOAP Header a │ │ │ │ +001a2c00: 6e64 2053 4f41 5020 4661 756c 7420 6465 nd SOAP Fault de │ │ │ │ +001a2c10: 6669 6e69 7469 6f6e 732e 2059 6f75 206d finitions. You m │ │ │ │ +001a2c20: 6179 2068 6176 6520 746f 2063 6f70 792d ay have to copy- │ │ │ │ +001a2c30: 7061 7374 6520 7468 6573 6520 6672 6f6d paste these from │ │ │ │ +001a2c40: 2074 6865 206f 7468 6572 2068 6561 6465 the other heade │ │ │ │ +001a2c50: 7220 6669 6c65 732e 2054 6865 6e2c 2063 r files. Then, c │ │ │ │ +001a2c60: 6f6d 7069 6c65 2069 7420 6173 2066 6f6c ompile it as fol │ │ │ │ +001a2c70: 6c6f 7773 3a20 3c2f 703e 3c70 7265 2063 lows:

    │ │ │ │ +001a2c90: 2073 6f61 7063 7070 3220 2d63 202d 7065   soapcpp2 -c -pe
    │ │ │ │ +001a2ca0: 6e76 2065 6e76 2e68 0a20 6363 202d 6320  nv env.h. cc -c 
    │ │ │ │ +001a2cb0: 656e 7643 2e63 0a3c 2f70 7265 3e3c 703e  envC.c.

    │ │ │ │ +001a2cc0: 2057 6520 616c 736f 2063 6f6d 7069 6c65 We also compile │ │ │ │ +001a2cd0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ +001a2ce0: 2f73 7464 736f 6170 322e 633c 2f63 6f64 /stdsoap2.c without │ │ │ │ +001a2d00: 6e61 6d65 7370 6163 6573 3a20 3c2f 703e namespaces:

    │ │ │ │ +001a2d10: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     cc -c -DW
    │ │ │ │ +001a2d30: 4954 485f 4e4f 4e41 4d45 5350 4143 4553  ITH_NONAMESPACES
    │ │ │ │ +001a2d40: 2073 7464 736f 6170 322e 630a 3c2f 7072   stdsoap2.c.

    Second, we │ │ │ │ +001a2d60: 2063 7265 6174 6520 7468 6520 4465 6c61 create the Dela │ │ │ │ +001a2d70: 7965 6420 5374 6f63 6b20 5175 6f74 6520 yed Stock Quote │ │ │ │ +001a2d80: 6865 6164 6572 2066 696c 6520 7370 6563 header file spec │ │ │ │ +001a2d90: 6966 6963 6174 696f 6e2c 2077 6869 6368 ification, which │ │ │ │ +001a2da0: 206d 6179 2062 6520 6f62 7461 696e 6564 may be obtained │ │ │ │ +001a2db0: 2075 7369 6e67 2074 6865 2057 5344 4c20 using the WSDL │ │ │ │ +001a2dc0: 696d 706f 7274 6572 2e3c 2f70 3e0a 3c64 importer.

    .
    //gs │ │ │ │ +001a2e10: 6f61 7020 6e73 2073 6572 7669 6365 206e oap ns service n │ │ │ │ +001a2e20: 616d 653a 2053 6572 7669 6365 203c 2f73 ame: Service
    .
    //gsoap ns se │ │ │ │ +001a2e70: 7276 6963 6520 7374 796c 653a 2072 7063 rvice style: rpc │ │ │ │ +001a2e80: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001a2e90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a2ea0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ +001a2ec0: 7320 7365 7276 6963 6520 656e 636f 6469 s service encodi │ │ │ │ +001a2ed0: 6e67 3a20 656e 636f 6465 6420 3c2f 7370 ng: encoded
    .
    //gsoap ns ser │ │ │ │ +001a2f20: 7669 6365 206c 6f63 6174 696f 6e3a 2068 vice location: h │ │ │ │ +001a2f30: 7474 703a 2f2f 7365 7276 6963 6573 2e78 ttp://services.x │ │ │ │ +001a2f40: 6d65 7468 6f64 732e 6e65 742f 736f 6170 methods.net/soap │ │ │ │ +001a2f50: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001a2f60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a2f70: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >//gsoap n │ │ │ │ +001a2f90: 7320 7363 6865 6d61 206e 616d 6573 7061 s schema namespa │ │ │ │ +001a2fa0: 6365 3a20 7572 6e3a 786d 6574 686f 6473 ce: urn:xmethods │ │ │ │ +001a2fb0: 2d64 656c 6179 6564 2d71 756f 7465 7320 -delayed-quotes │ │ │ │ +001a2fc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001a2fe0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //gsoap ns │ │ │ │ +001a3000: 2073 6572 7669 6365 206d 6574 686f 642d service method- │ │ │ │ +001a3010: 6163 7469 6f6e 3a20 6765 7451 756f 7465 action: getQuote │ │ │ │ +001a3020: 2026 7175 6f74 3b26 7175 6f74 3b20 3c2f ""
    .
    int ns__getQuote( │ │ │ │ +001a3080: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *symbol, < │ │ │ │ +001a30b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a30c0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype">float *Result);< │ │ │ │ +001a30e0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +001a3100: 5765 2063 6f6d 7069 6c65 2069 7420 6173 We compile it as │ │ │ │ +001a3110: 2061 206c 6962 7261 7279 2061 6e64 2077 a library and w │ │ │ │ +001a3120: 6520 7573 6520 6f70 7469 6f6e 7320 3c62 e use options -n │ │ │ │ +001a3140: 3c2f 623e 2061 6e64 203c 623e 3c63 6f64 and -pquote │ │ │ │ +001a3160: 3c2f 623e 2074 6f20 7072 6566 6978 2074 to prefix t │ │ │ │ +001a3170: 6865 2067 656e 6572 6174 6564 2066 696c he generated fil │ │ │ │ +001a3180: 6573 2061 6e64 2074 6f20 7265 6e61 6d65 es and to rename │ │ │ │ +001a3190: 2074 6865 206e 616d 6573 7061 6365 2074 the namespace t │ │ │ │ +001a31a0: 6162 6c65 2074 6f20 6176 6f69 6420 6c69 able to avoid li │ │ │ │ +001a31b0: 6e6b 2063 6f6e 666c 6963 7473 3a20 3c2f nk conflicts:

     soapcpp
    │ │ │ │ +001a31e0: 3220 2d63 202d 6e20 2d70 7175 6f74 6520  2 -c -n -pquote 
    │ │ │ │ +001a31f0: 7175 6f74 652e 680a 2063 6320 2d63 2071  quote.h. cc -c q
    │ │ │ │ +001a3200: 756f 7465 436c 6965 6e74 4c69 622e 630a  uoteClientLib.c.
    │ │ │ │ +001a3210: 3c2f 7072 653e 3c70 3e20 5468 6972 642c  

    Third, │ │ │ │ +001a3220: 2077 6520 6372 6561 7465 2074 6865 2043 we create the C │ │ │ │ +001a3230: 7572 7265 6e63 7920 4578 6368 616e 6765 urrency Exchange │ │ │ │ +001a3240: 2052 6174 6520 6865 6164 6572 2066 696c Rate header fil │ │ │ │ +001a3250: 6520 7370 6563 6966 6963 6174 696f 6e3a e specification: │ │ │ │ +001a3260: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    //gsoap ns se │ │ │ │ +001a32b0: 7276 6963 6520 6e61 6d65 3a20 5365 7276 rvice name: Serv │ │ │ │ +001a32c0: 6963 6520 3c2f 7370 616e 3e3c 2f64 6976 ice
    .
    //gsoa │ │ │ │ +001a3300: 7020 6e73 2073 6572 7669 6365 2073 7479 p ns service sty │ │ │ │ +001a3310: 6c65 3a20 7270 6320 3c2f 7370 616e 3e3c le: rpc < │ │ │ │ +001a3320: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ +001a3350: 6773 6f61 7020 6e73 2073 6572 7669 6365 gsoap ns service │ │ │ │ +001a3360: 2065 6e63 6f64 696e 673a 2065 6e63 6f64 encoding: encod │ │ │ │ +001a3370: 6564 203c 2f73 7061 6e3e 3c2f 6469 763e ed
    │ │ │ │ +001a3380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    //gsoap │ │ │ │ +001a33b0: 206e 7320 7365 7276 6963 6520 6c6f 6361 ns service loca │ │ │ │ +001a33c0: 7469 6f6e 3a20 6874 7470 3a2f 2f73 6572 tion: http://ser │ │ │ │ +001a33d0: 7669 6365 732e 786d 6574 686f 6473 2e6e vices.xmethods.n │ │ │ │ +001a33e0: 6574 2f73 6f61 7020 3c2f 7370 616e 3e3c et/soap < │ │ │ │ +001a33f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ +001a3420: 6773 6f61 7020 6e73 2073 6368 656d 6120 gsoap ns schema │ │ │ │ +001a3430: 6e61 6d65 7370 6163 653a 2075 726e 3a78 namespace: urn:x │ │ │ │ +001a3440: 6d65 7468 6f64 732d 4375 7272 656e 6379 methods-Currency │ │ │ │ +001a3450: 4578 6368 616e 6765 203c 2f73 7061 6e3e Exchange │ │ │ │ +001a3460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ +001a3490: 2f67 736f 6170 206e 7320 7365 7276 6963 /gsoap ns servic │ │ │ │ +001a34a0: 6520 6d65 7468 6f64 2d61 6374 696f 6e3a e method-action: │ │ │ │ +001a34b0: 2067 6574 5261 7465 2026 7175 6f74 3b26 getRate "& │ │ │ │ +001a34c0: 7175 6f74 3b20 3c2f 7370 616e 3e3c 2f64 quot; .
    │ │ │ │ +001a3500: 696e 743c 2f73 7061 6e3e 206e 735f 5f67 int ns__g │ │ │ │ +001a3510: 6574 5261 7465 283c 7370 616e 2063 6c61 etRate(char *co │ │ │ │ +001a3540: 756e 7472 7931 2c20 3c73 7061 6e20 636c untry1, char *c │ │ │ │ +001a3570: 6f75 6e74 7279 322c 203c 7370 616e 2063 ountry2, float │ │ │ │ +001a35a0: 2a52 6573 756c 7429 3b3c 2f64 6976 3e0a *Result);
    . │ │ │ │ +001a35b0: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    We com │ │ │ │ +001a35d0: 7069 6c65 2069 7420 6173 2061 206c 6962 pile it as a lib │ │ │ │ +001a35e0: 7261 7279 2061 6e64 2077 6520 7573 6520 rary and we use │ │ │ │ +001a35f0: 6f70 7469 6f6e 7320 3c62 3e3c 636f 6465 options -n a │ │ │ │ +001a3610: 6e64 203c 623e 3c63 6f64 653e 2d70 7261 nd -pra │ │ │ │ +001a3620: 7465 3c2f 636f 6465 3e3c 2f62 3e20 746f te to │ │ │ │ +001a3630: 2070 7265 6669 7820 7468 6520 6765 6e65 prefix the gene │ │ │ │ +001a3640: 7261 7465 6420 6669 6c65 7320 616e 6420 rated files and │ │ │ │ +001a3650: 746f 2072 656e 616d 6520 7468 6520 6e61 to rename the na │ │ │ │ +001a3660: 6d65 7370 6163 6520 7461 626c 6520 746f mespace table to │ │ │ │ +001a3670: 2061 766f 6964 206c 696e 6b20 636f 6e66 avoid link conf │ │ │ │ +001a3680: 6c69 6374 733a 203c 2f70 3e3c 7072 6520 licts:

     soapcpp2 -c -n
    │ │ │ │ +001a36b0: 202d 7072 6174 6520 7261 7465 2e68 0a20   -prate rate.h. 
    │ │ │ │ +001a36c0: 6363 202d 6320 7261 7465 436c 6965 6e74  cc -c rateClient
    │ │ │ │ +001a36d0: 4c69 622e 630a 3c2f 7072 653e 3c70 3e20  Lib.c.

    │ │ │ │ +001a36e0: 5468 6520 6d61 696e 2070 726f 6772 616d The main program │ │ │ │ +001a36f0: 2069 733a 3c2f 703e 0a3c 6469 7620 636c is:

    .
    < │ │ │ │ +001a3710: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a3720: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#inc │ │ │ │ +001a3740: 6c75 6465 2026 7175 6f74 3b71 756f 7465 lude "quote │ │ │ │ +001a3750: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h" │ │ │ │ +001a3760: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu │ │ │ │ +001a37a0: 6f74 3b72 6174 6548 2e68 2671 756f 743b ot;rateH.h" │ │ │ │ +001a37b0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001a37d0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ +001a37f0: 7564 6520 2671 756f 743b 7175 6f74 652e ude "quote. │ │ │ │ +001a3800: 6e73 6d61 7026 7175 6f74 3b3c 2f73 7061 nsmap"
    .
    #include & │ │ │ │ +001a3850: 7175 6f74 3b72 6174 652e 6e73 6d61 7026 quot;rate.nsmap& │ │ │ │ +001a3860: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.
    .< │ │ │ │ +001a38a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a38b0: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int main(int ar │ │ │ │ +001a38f0: 6763 2c20 3c73 7061 6e20 636c 6173 733d gc, ch │ │ │ │ +001a3910: 6172 3c2f 7370 616e 3e20 2a61 7267 765b ar *argv[ │ │ │ │ +001a3920: 5d29 203c 2f64 6976 3e0a 3c64 6976 2063 ])
    .
    {.
    {
    . │ │ │ │ -001a3970: 2020 3c73 7061 6e20 636c 6173 733d 226b if (argc < │ │ │ │ -001a39a0: 3d20 3129 203c 2f64 6976 3e0a 3c64 6976 = 1)
    .
    │ │ │ │ -001a39c0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    fp │ │ │ │ -001a39e0: 7269 6e74 6628 7374 6465 7272 2c20 3c73 rintf(stderr, " │ │ │ │ -001a3a10: 5573 6167 653a 206d 6169 6e20 7469 636b Usage: main tick │ │ │ │ -001a3a20: 6572 205b 6375 7272 656e 6379 5d5c 6e26 er [currency]\n& │ │ │ │ -001a3a30: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); < │ │ │ │ -001a3a40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    exit │ │ │ │ -001a3a60: 2845 5849 545f 4641 494c 5552 4529 3b20 (EXIT_FAILURE); │ │ │ │ -001a3a70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    st │ │ │ │ -001a3ac0: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = < │ │ │ │ -001a3b30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001a3b40: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001a3b50: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ -001a3b60: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68 │ │ │ │ -001a3b70: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498 │ │ │ │ -001a3b80: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c">soap_new │ │ │ │ -001a3b90: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    < │ │ │ │ -001a3bb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001a3bc0: 6f72 6474 7970 6522 3e66 6c6f 6174 3c2f ordtype">float q;
    . │ │ │ │ -001a3be0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ -001a3cc0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_call │ │ │ │ -001a3cf0: 5f6e 735f 5f67 6574 5175 6f74 6528 3c61 _ns__getQuote(soap, N │ │ │ │ -001a3d30: 554c 4c2c 204e 554c 4c2c 2061 7267 765b ULL, NULL, argv[ │ │ │ │ -001a3d40: 315d 2c20 2661 6d70 3b71 2929 203c 7370 1], &q)) // get quote │ │ │ │ -001a3d70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001a3d90: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin │ │ │ │ -001a3df0: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std │ │ │ │ -001a3e30: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . │ │ │ │ -001a3e50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ -001a3e70: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ -001a3e90: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ -001a3eb0: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (argc > 2 │ │ │ │ -001a3ee0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    { │ │ │ │ -001a3f00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ -001a3f20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001a3f30: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001a3f40: 705f 5f6e 616d 6573 7061 6365 2e68 746d p__namespace.htm │ │ │ │ -001a3f50: 6c23 6761 3565 6339 3133 6163 6363 3730 l#ga5ec913accc70 │ │ │ │ -001a3f60: 3563 6361 3332 3936 6162 3735 6261 6539 5cca3296ab75bae9 │ │ │ │ -001a3f70: 3535 6135 223e 736f 6170 5f73 6574 5f6e 55a5">soap_set_n │ │ │ │ -001a3f80: 616d 6573 7061 6365 733c 2f61 3e28 3c61 amespaces(soap, r │ │ │ │ -001a3fc0: 6174 655f 6e61 6d65 7370 6163 6573 293b ate_namespaces); │ │ │ │ -001a3fd0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001a3ff0: 3c73 7061 6e20 636c 6173 733d 226b 6579 float< │ │ │ │ -001a4010: 2f73 7061 6e3e 2072 3b20 3c2f 6469 763e /span> r;
    │ │ │ │ -001a4020: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (so │ │ │ │ -001a4060: 6170 5f63 616c 6c5f 6e73 5f5f 6765 7452 ap_call_ns__getR │ │ │ │ -001a4070: 6174 6528 3c61 2063 6c61 7373 3d22 636f ate(soap< │ │ │ │ -001a40a0: 2f61 3e2c 204e 554c 4c2c 204e 554c 4c2c /a>, NULL, NULL, │ │ │ │ -001a40b0: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ -001a40d0: 6f74 3b75 7326 7175 6f74 3b3c 2f73 7061 ot;us", argv[2], &am │ │ │ │ -001a40f0: 703b 7229 2920 3c73 7061 6e20 636c 6173 p;r)) // g │ │ │ │ -001a4110: 6574 2072 6174 6520 696e 2055 5320 646f et rate in US do │ │ │ │ -001a4120: 6c6c 6172 7320 3c2f 7370 616e 3e3c 2f64 llars ..
    < │ │ │ │ -001a4210: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001a4220: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow">else
    .
    │ │ │ │ -001a4250: 2020 2020 2020 7120 2a3d 2072 3b20 3c73 q *= r; // convert t │ │ │ │ -001a4280: 6865 2071 756f 7465 203c 2f73 7061 6e3e he quote │ │ │ │ -001a4290: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } < │ │ │ │ -001a42b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    prin │ │ │ │ -001a42d0: 7466 283c 7370 616e 2063 6c61 7373 3d22 tf(& │ │ │ │ -001a42f0: 7175 6f74 3b25 733a 2025 6620 5c6e 2671 quot;%s: %f \n&q │ │ │ │ -001a4300: 756f 743b 3c2f 7370 616e 3e2c 2061 7267 uot;, arg │ │ │ │ -001a4310: 765b 315d 2c20 7129 3b20 3c2f 6469 763e v[1], q);
    │ │ │ │ -001a4320: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ -001a4350: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_dest │ │ │ │ -001a43b0: 726f 793c 2f61 3e28 3c61 2063 6c61 7373 roy(s │ │ │ │ -001a43e0: 6f61 703c 2f61 3e29 3b3c 2f64 6976 3e0a oap);
    . │ │ │ │ -001a43f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 . │ │ │ │ -001a44b0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_free │ │ │ │ -001a4510: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -001a4540: 3c2f 613e 293b 3c2f 6469 763e 0a3c 6469 );
    . │ │ │ │ -001a4560: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ -001a4580: 6e3c 2f73 7061 6e3e 2030 3b20 3c2f 6469 n 0; .
    }
    .

    Compile a │ │ │ │ -001a45d0: 6e64 206c 696e 6b20 7468 6973 2061 7070 nd link this app │ │ │ │ -001a45e0: 6c69 6361 7469 6f6e 2077 6974 6820 3c65 lication with stdsoap2 │ │ │ │ -001a4600: 2e6f 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .o, │ │ │ │ -001a4610: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e6f envC.o │ │ │ │ -001a4620: 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 3c65 , quoteCli │ │ │ │ -001a4640: 656e 744c 6962 2e6f 3c2f 636f 6465 3e3c entLib.o< │ │ │ │ -001a4650: 2f65 6d3e 2c20 616e 6420 3c65 6d3e 3c63 /em>, and rateClientLi │ │ │ │ -001a4670: 622e 6f3c 2f63 6f64 653e 3c2f 656d 3e2e b.o. │ │ │ │ -001a4680: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ -001a46a0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ -001a46b0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ -001a46c0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ -001a46d0: 2069 643d 2265 7861 6d70 6c65 3135 223e id="example15"> │ │ │ │ -001a46e0: 3c2f 613e 0a48 6f77 2074 6f20 6368 6169 .How to chai │ │ │ │ -001a46f0: 6e20 4320 7365 7276 6963 6573 2074 6f20 n C services to │ │ │ │ -001a4700: 6163 6365 7074 206d 6573 7361 6765 7320 accept messages │ │ │ │ -001a4710: 6f6e 2074 6865 2073 616d 6520 706f 7274 on the same port │ │ │ │ -001a4720: 3c2f 6833 3e0a 3c70 3e57 6865 6e20 636f

    .

    When co │ │ │ │ -001a4730: 6d62 696e 696e 6720 6d75 6c74 6970 6c65 mbining multiple │ │ │ │ -001a4740: 2073 6572 7669 6365 7320 696e 746f 206f services into o │ │ │ │ -001a4750: 6e65 2061 7070 6c69 6361 7469 6f6e 2c20 ne application, │ │ │ │ -001a4760: 796f 7520 6361 6e20 7275 6e20 7773 646c you can run wsdl │ │ │ │ -001a4770: 3268 206f 6e20 6d75 6c74 6970 6c65 2057 2h on multiple W │ │ │ │ -001a4780: 5344 4c73 2074 6f20 6765 6e65 7261 7465 SDLs to generate │ │ │ │ -001a4790: 2074 6865 2073 696e 676c 6520 616c 6c2d the single all- │ │ │ │ -001a47a0: 696e 636c 7573 6976 6520 7365 7276 6963 inclusive servic │ │ │ │ -001a47b0: 6520 6465 6669 6e69 7469 6f6e 7320 696e e definitions in │ │ │ │ -001a47c0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f │ │ │ │ -001a47d0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2 │ │ │ │ -001a47e0: 2e20 5468 6973 2068 6561 6465 7220 6669 . This header fi │ │ │ │ -001a47f0: 6c65 2069 7320 7468 656e 2070 726f 6365 le is then proce │ │ │ │ -001a4800: 7373 6564 2077 6974 6820 736f 6170 6370 ssed with soapcp │ │ │ │ -001a4810: 7032 2074 6f20 6765 6e65 7261 7465 2073 p2 to generate s │ │ │ │ -001a4820: 6b65 6c65 746f 6e20 6675 6e63 7469 6f6e keleton function │ │ │ │ -001a4830: 7320 696e 2043 2e3c 2f70 3e0a 3c70 3e57 s in C.

    .

    W │ │ │ │ -001a4840: 6861 7420 6966 2077 6520 6765 6e65 7261 hat if we genera │ │ │ │ -001a4850: 7465 206d 756c 7469 706c 6520 7365 7276 te multiple serv │ │ │ │ -001a4860: 6963 6573 2c20 6561 6368 2066 726f 6d20 ices, each from │ │ │ │ -001a4870: 6120 5753 444c 2073 6570 6172 6174 656c a WSDL separatel │ │ │ │ -001a4880: 792c 2061 6e64 2077 616e 7420 746f 2064 y, and want to d │ │ │ │ -001a4890: 6570 6c6f 7920 7468 656d 206f 6e20 7468 eploy them on th │ │ │ │ -001a48a0: 6520 7361 6d65 2070 6f72 743f 2054 6869 e same port? Thi │ │ │ │ -001a48b0: 7320 7265 7175 6972 6573 206c 6973 7465 s requires liste │ │ │ │ -001a48c0: 6e69 6e67 2074 6f20 7468 6520 7361 6d65 ning to the same │ │ │ │ -001a48d0: 2070 6f72 7420 616e 6420 7468 656e 2063 port and then c │ │ │ │ -001a48e0: 6861 696e 696e 6720 7468 6520 7365 7276 haining the serv │ │ │ │ -001a48f0: 6963 6520 6469 7370 6174 6368 6573 2073 ice dispatches s │ │ │ │ -001a4900: 6f20 7468 6174 2065 6163 6820 7365 7276 o that each serv │ │ │ │ -001a4910: 6963 6520 6361 6e20 7365 7276 6520 6120 ice can serve a │ │ │ │ -001a4920: 7265 7175 6573 742e 3c2f 703e 0a3c 703e request.

    .

    │ │ │ │ -001a4930: 4669 7273 7420 7765 2063 7265 6174 6520 First we create │ │ │ │ -001a4940: 6120 3c65 6d3e 3c63 6f64 653e 656e 762e a env. │ │ │ │ -001a4950: 683c 2f63 6f64 653e 3c2f 656d 3e20 7468 h th │ │ │ │ -001a4960: 6174 2063 6f6e 7461 696e 7320 7468 6520 at contains the │ │ │ │ -001a4970: 6a6f 696e 7420 534f 4150 2048 6561 6465 joint SOAP Heade │ │ │ │ -001a4980: 7220 616e 6420 534f 4150 2046 6175 6c74 r and SOAP Fault │ │ │ │ -001a4990: 2064 6566 696e 6974 696f 6e73 2c20 666f definitions, fo │ │ │ │ -001a49a0: 7220 6578 616d 706c 6520 6279 2063 6f70 r example by cop │ │ │ │ -001a49b0: 792d 7061 7374 696e 6720 7468 6573 6520 y-pasting these │ │ │ │ -001a49c0: 6672 6f6d 2074 6865 206f 7468 6572 2068 from the other h │ │ │ │ -001a49d0: 6561 6465 7220 6669 6c65 7320 6765 6e65 eader files gene │ │ │ │ -001a49e0: 7261 7465 6420 6279 2077 7364 6c32 682e rated by wsdl2h. │ │ │ │ -001a49f0: 204f 7220 7468 6973 2066 696c 6520 6973 Or this file is │ │ │ │ -001a4a00: 2065 6d70 7479 2069 6620 6e6f 2073 7065 empty if no spe │ │ │ │ -001a4a10: 6369 616c 697a 6564 2053 4f41 5020 4865 cialized SOAP He │ │ │ │ -001a4a20: 6164 6572 7320 616e 6420 4661 756c 7473 aders and Faults │ │ │ │ -001a4a30: 2061 7265 2075 7365 642e 2057 6520 636f are used. We co │ │ │ │ -001a4a40: 6d70 696c 6520 6974 2061 7320 666f 6c6c mpile it as foll │ │ │ │ -001a4a50: 6f77 733a 203c 2f70 3e3c 7072 6520 636c ows:

     
    │ │ │ │ -001a4a70: 736f 6170 6370 7032 202d 6320 2d70 656e  soapcpp2 -c -pen
    │ │ │ │ -001a4a80: 7620 656e 762e 680a 2063 6320 2d63 2065  v env.h. cc -c e
    │ │ │ │ -001a4a90: 6e76 432e 630a 3c2f 7072 653e 3c70 3e20  nvC.c.

    │ │ │ │ -001a4aa0: 5765 2061 6c73 6f20 636f 6d70 696c 6520 We also compile │ │ │ │ -001a4ab0: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ -001a4ac0: 7374 6473 6f61 7032 2e63 3c2f 636f 6465 stdsoap2.c without n │ │ │ │ -001a4ae0: 616d 6573 7061 6365 733a 203c 2f70 3e3c amespaces:

    < │ │ │ │ -001a4af0: 7072 6520 636c 6173 733d 2266 7261 676d pre class="fragm │ │ │ │ -001a4b00: 656e 7422 3e20 6363 202d 6320 2d44 5749 ent"> cc -c -DWI │ │ │ │ -001a4b10: 5448 5f4e 4f4e 414d 4553 5041 4345 5320 TH_NONAMESPACES │ │ │ │ -001a4b20: 7374 6473 6f61 7032 2e63 0a3c 2f70 7265 stdsoap2.c.

    Say for exa │ │ │ │ -001a4b40: 6d70 6c65 2074 6861 7420 7765 2068 6176 mple that we hav │ │ │ │ -001a4b50: 6520 6120 7365 7276 6963 6520 6465 6669 e a service defi │ │ │ │ -001a4b60: 6e69 7469 6f6e 2069 6e20 3c65 6d3e 3c63 nition in quote.h. We comp │ │ │ │ -001a4b90: 696c 6520 6974 2061 7320 6120 6c69 6272 ile it as a libr │ │ │ │ -001a4ba0: 6172 7920 616e 6420 7765 2075 7365 206f ary and we use o │ │ │ │ -001a4bb0: 7074 696f 6e73 203c 623e 3c63 6f64 653e ptions │ │ │ │ -001a4bc0: 2d6e 3c2f 636f 6465 3e3c 2f62 3e20 616e -n an │ │ │ │ -001a4bd0: 6420 3c62 3e3c 636f 6465 3e2d 7071 756f d -pquo │ │ │ │ -001a4be0: 7465 3c2f 636f 6465 3e3c 2f62 3e20 746f te to │ │ │ │ -001a4bf0: 2070 7265 6669 7820 7468 6520 6765 6e65 prefix the gene │ │ │ │ -001a4c00: 7261 7465 6420 6669 6c65 7320 616e 6420 rated files and │ │ │ │ -001a4c10: 746f 2072 656e 616d 6520 7468 6520 6e61 to rename the na │ │ │ │ -001a4c20: 6d65 7370 6163 6520 7461 626c 6520 746f mespace table to │ │ │ │ -001a4c30: 2061 766f 6964 206c 696e 6b20 636f 6e66 avoid link conf │ │ │ │ -001a4c40: 6c69 6374 733a 203c 2f70 3e3c 7072 6520 licts:

     soapcpp2 -c -n
    │ │ │ │ -001a4c70: 202d 7071 756f 7465 2071 756f 7465 2e68   -pquote quote.h
    │ │ │ │ -001a4c80: 0a20 6363 202d 6320 7175 6f74 6543 6c69  . cc -c quoteCli
    │ │ │ │ -001a4c90: 656e 744c 6962 2e63 0a3c 2f70 7265 3e3c  entLib.c.
    < │ │ │ │ -001a4ca0: 703e 2057 6520 646f 2074 6865 2073 616d p> We do the sam │ │ │ │ -001a4cb0: 6520 666f 7220 6120 7365 7276 6963 6520 e for a service │ │ │ │ -001a4cc0: 6465 6669 6e69 7469 6f6e 2069 6e20 3c65 definition in rate.h
    :

    │ │ │ │ -001a4cf0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
     soapcpp2 
    │ │ │ │ -001a4d10: 2d63 202d 6e20 2d70 7261 7465 2072 6174  -c -n -prate rat
    │ │ │ │ -001a4d20: 652e 680a 2063 6320 2d63 2072 6174 6543  e.h. cc -c rateC
    │ │ │ │ -001a4d30: 6c69 656e 744c 6962 2e63 0a3c 2f70 7265  lientLib.c.

    To serve bo │ │ │ │ -001a4d50: 7468 2074 6865 2071 756f 7465 2061 6e64 th the quote and │ │ │ │ -001a4d60: 2072 6174 6520 7365 7276 6963 6573 206f rate services o │ │ │ │ -001a4d70: 6e20 7468 6520 7361 6d65 2070 6f72 742c n the same port, │ │ │ │ -001a4d80: 2077 6520 6368 6169 6e20 7468 6520 7365 we chain the se │ │ │ │ -001a4d90: 7276 6963 6520 6469 7370 6174 6368 6572 rvice dispatcher │ │ │ │ -001a4da0: 7320 6173 2066 6f6c 6c6f 7773 3a3c 2f70 s as follows:

    .
    #include &q │ │ │ │ -001a4e00: 756f 743b 7175 6f74 6548 2e68 2671 756f uot;quoteH.h&quo │ │ │ │ -001a4e10: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ │ -001a4e20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in │ │ │ │ -001a4e50: 636c 7564 6520 2671 756f 743b 7261 7465 clude "rate │ │ │ │ -001a4e60: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h" │ │ │ │ -001a4e70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu │ │ │ │ -001a4eb0: 6f74 3b71 756f 7465 2e6e 736d 6170 2671 ot;quote.nsmap&q │ │ │ │ -001a4ec0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    .
    # │ │ │ │ -001a4f00: 696e 636c 7564 6520 2671 756f 743b 7261 include "ra │ │ │ │ -001a4f10: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    .
    < │ │ │ │ -001a4f40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    st │ │ │ │ -001a4f70: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = < │ │ │ │ -001a4fe0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001a4ff0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001a5000: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ -001a5010: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68 │ │ │ │ -001a5020: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498 │ │ │ │ -001a5030: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c">soap_new │ │ │ │ -001a5040: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    if │ │ │ │ -001a5080: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s │ │ │ │ -001a50e0: 6f63 6b65 743c 2f61 3e28 3c61 2063 6c61 ocket(soap_b │ │ │ │ -001a5140: 696e 643c 2f61 3e28 3c61 2063 6c61 7373 ind(s │ │ │ │ -001a5170: 6f61 703c 2f61 3e2c 204e 554c 4c2c 2038 oap, NULL, 8 │ │ │ │ -001a5180: 3038 302c 2031 3029 2929 203c 7370 616e 080, 10))) // small BACKLO │ │ │ │ -001a51b0: 4720 666f 7220 6974 6572 6174 6976 6520 G for iterative │ │ │ │ -001a51c0: 7365 7276 6572 733c 2f73 7061 6e3e 3c2f servers if (arg │ │ │ │ +001a3980: 6320 266c 743b 3d20 3129 203c 2f64 6976 c <= 1)
    .
    {
    . │ │ │ │ +001a39c0: 2020 2020 6670 7269 6e74 6628 7374 6465 fprintf(stde │ │ │ │ +001a39d0: 7272 2c20 3c73 7061 6e20 636c 6173 733d rr, │ │ │ │ +001a39f0: 2671 756f 743b 5573 6167 653a 206d 6169 "Usage: mai │ │ │ │ +001a3a00: 6e20 7469 636b 6572 205b 6375 7272 656e n ticker [curren │ │ │ │ +001a3a10: 6379 5d5c 6e26 7175 6f74 3b3c 2f73 7061 cy]\n");
    .
    │ │ │ │ +001a3a40: 2020 6578 6974 2845 5849 545f 4641 494c exit(EXIT_FAIL │ │ │ │ +001a3a50: 5552 4529 3b20 3c2f 6469 763e 0a3c 6469 URE);
    . │ │ │ │ +001a3a70: 207d 203c 2f64 6976 3e0a 3c64 6976 2063 }
    . │ │ │ │ +001a3b80: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    f │ │ │ │ +001a3bb0: 6c6f 6174 3c2f 7370 616e 3e20 713b 203c loat q; < │ │ │ │ +001a3bc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_namesp │ │ │ │ +001a3c40: 6163 6573 3c2f 613e 283c 6120 636c 6173 aces( │ │ │ │ +001a3c70: 736f 6170 3c2f 613e 2c20 7175 6f74 655f soap, quote_ │ │ │ │ +001a3c80: 6e61 6d65 7370 6163 6573 293b 203c 2f64 namespaces); .
    if (soa │ │ │ │ +001a3cd0: 705f 6361 6c6c 5f6e 735f 5f67 6574 5175 p_call_ns__getQu │ │ │ │ +001a3ce0: 6f74 6528 3c61 2063 6c61 7373 3d22 636f ote(soap< │ │ │ │ +001a3d10: 2f61 3e2c 204e 554c 4c2c 204e 554c 4c2c /a>, NULL, NULL, │ │ │ │ +001a3d20: 2061 7267 765b 315d 2c20 2661 6d70 3b71 argv[1], &q │ │ │ │ +001a3d30: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // get │ │ │ │ +001a3d50: 7175 6f74 6520 3c2f 7370 616e 3e3c 2f64 quote .
    soa │ │ │ │ +001a3dd0: 705f 7072 696e 745f 6661 756c 743c 2f61 p_print_fault(soap, stderr); .
    else .
    {
    . │ │ │ │ +001a3e80: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +001a3eb0: 6966 3c2f 7370 616e 3e20 2861 7267 6320 if (argc │ │ │ │ +001a3ec0: 2667 743b 2032 2920 3c2f 6469 763e 0a3c > 2)
    .< │ │ │ │ +001a3ed0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a3ee0: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . │ │ │ │ +001a3f00: 2020 2020 203c 6120 636c 6173 733d 2263 soap │ │ │ │ +001a3f60: 5f73 6574 5f6e 616d 6573 7061 6365 733c _set_namespaces< │ │ │ │ +001a3f70: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ +001a3fa0: 2f61 3e2c 2072 6174 655f 6e61 6d65 7370 /a>, rate_namesp │ │ │ │ +001a3fb0: 6163 6573 293b 203c 2f64 6976 3e0a 3c64 aces);
    . │ │ │ │ +001a3fd0: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +001a3ff0: 666c 6f61 743c 2f73 7061 6e3e 2072 3b20 float r; │ │ │ │ +001a4000: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    < │ │ │ │ +001a4020: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001a4030: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (soap_call_ns │ │ │ │ +001a4050: 5f5f 6765 7452 6174 6528 3c61 2063 6c61 __getRate(soap, NULL, │ │ │ │ +001a4090: 204e 554c 4c2c 203c 7370 616e 2063 6c61 NULL, "us" │ │ │ │ +001a40c0: 3b3c 2f73 7061 6e3e 2c20 6172 6776 5b32 ;, argv[2 │ │ │ │ +001a40d0: 5d2c 2026 616d 703b 7229 2920 3c73 7061 ], &r)) // get rate in │ │ │ │ +001a4100: 2055 5320 646f 6c6c 6172 7320 3c2f 7370 US dollars
    .
    │ │ │ │ +001a4130: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin │ │ │ │ +001a4190: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std │ │ │ │ +001a41d0: 6572 7229 3b20 3c2f 6469 763e 0a3c 6469 err);
    . │ │ │ │ +001a41f0: 2020 2020 203c 7370 616e 2063 6c61 7373 e │ │ │ │ +001a4210: 6c73 653c 2f73 7061 6e3e 203c 2f64 6976 lse
    .
    q *= │ │ │ │ +001a4240: 2072 3b20 3c73 7061 6e20 636c 6173 733d r; // con │ │ │ │ +001a4260: 7665 7274 2074 6865 2071 756f 7465 203c vert the quote < │ │ │ │ +001a4270: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +001a4290: 2020 207d 203c 2f64 6976 3e0a 3c64 6976 }
    .
    │ │ │ │ +001a42b0: 2020 7072 696e 7466 283c 7370 616e 2063 printf("%s: % │ │ │ │ +001a42e0: 6620 5c6e 2671 756f 743b 3c2f 7370 616e f \n", argv[1], q); │ │ │ │ +001a4300: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } .
    soa │ │ │ │ +001a4390: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap);< │ │ │ │ +001a43d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    s │ │ │ │ +001a4440: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap);.
    soa │ │ │ │ +001a44f0: 705f 6672 6565 3c2f 613e 283c 6120 636c p_free(soap);.
    return 0 │ │ │ │ +001a4570: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    }.

    Com │ │ │ │ +001a45b0: 7069 6c65 2061 6e64 206c 696e 6b20 7468 pile and link th │ │ │ │ +001a45c0: 6973 2061 7070 6c69 6361 7469 6f6e 2077 is application w │ │ │ │ +001a45d0: 6974 6820 3c65 6d3e 3c63 6f64 653e 7374 ith st │ │ │ │ +001a45e0: 6473 6f61 7032 2e6f 3c2f 636f 6465 3e3c dsoap2.o< │ │ │ │ +001a45f0: 2f65 6d3e 2c20 3c65 6d3e 3c63 6f64 653e /em>, │ │ │ │ +001a4600: 656e 7643 2e6f 3c2f 636f 6465 3e3c 2f65 envC.o, qu │ │ │ │ +001a4620: 6f74 6543 6c69 656e 744c 6962 2e6f 3c2f oteClientLib.o, and │ │ │ │ +001a4640: 3c65 6d3e 3c63 6f64 653e 7261 7465 436c rateCl │ │ │ │ +001a4650: 6965 6e74 4c69 622e 6f3c 2f63 6f64 653e ientLib.o │ │ │ │ +001a4660: 3c2f 656d 3e2e 3c2f 703e 0a3c 703e f09f .

    .

    .. │ │ │ │ +001a4670: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ +001a4680: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ +001a4690: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ +001a46a0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    .How t │ │ │ │ +001a46d0: 6f20 6368 6169 6e20 4320 7365 7276 6963 o chain C servic │ │ │ │ +001a46e0: 6573 2074 6f20 6163 6365 7074 206d 6573 es to accept mes │ │ │ │ +001a46f0: 7361 6765 7320 6f6e 2074 6865 2073 616d sages on the sam │ │ │ │ +001a4700: 6520 706f 7274 3c2f 6833 3e0a 3c70 3e57 e port

    .

    W │ │ │ │ +001a4710: 6865 6e20 636f 6d62 696e 696e 6720 6d75 hen combining mu │ │ │ │ +001a4720: 6c74 6970 6c65 2073 6572 7669 6365 7320 ltiple services │ │ │ │ +001a4730: 696e 746f 206f 6e65 2061 7070 6c69 6361 into one applica │ │ │ │ +001a4740: 7469 6f6e 2c20 796f 7520 6361 6e20 7275 tion, you can ru │ │ │ │ +001a4750: 6e20 7773 646c 3268 206f 6e20 6d75 6c74 n wsdl2h on mult │ │ │ │ +001a4760: 6970 6c65 2057 5344 4c73 2074 6f20 6765 iple WSDLs to ge │ │ │ │ +001a4770: 6e65 7261 7465 2074 6865 2073 696e 676c nerate the singl │ │ │ │ +001a4780: 6520 616c 6c2d 696e 636c 7573 6976 6520 e all-inclusive │ │ │ │ +001a4790: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti │ │ │ │ +001a47a0: 6f6e 7320 696e 7465 7266 6163 6520 6865 ons interface he │ │ │ │ +001a47b0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so │ │ │ │ +001a47c0: 6170 6370 7032 2e20 5468 6973 2068 6561 apcpp2. This hea │ │ │ │ +001a47d0: 6465 7220 6669 6c65 2069 7320 7468 656e der file is then │ │ │ │ +001a47e0: 2070 726f 6365 7373 6564 2077 6974 6820 processed with │ │ │ │ +001a47f0: 736f 6170 6370 7032 2074 6f20 6765 6e65 soapcpp2 to gene │ │ │ │ +001a4800: 7261 7465 2073 6b65 6c65 746f 6e20 6675 rate skeleton fu │ │ │ │ +001a4810: 6e63 7469 6f6e 7320 696e 2043 2e3c 2f70 nctions in C.

    .

    What if we │ │ │ │ +001a4830: 6765 6e65 7261 7465 206d 756c 7469 706c generate multipl │ │ │ │ +001a4840: 6520 7365 7276 6963 6573 2c20 6561 6368 e services, each │ │ │ │ +001a4850: 2066 726f 6d20 6120 5753 444c 2073 6570 from a WSDL sep │ │ │ │ +001a4860: 6172 6174 656c 792c 2061 6e64 2077 616e arately, and wan │ │ │ │ +001a4870: 7420 746f 2064 6570 6c6f 7920 7468 656d t to deploy them │ │ │ │ +001a4880: 206f 6e20 7468 6520 7361 6d65 2070 6f72 on the same por │ │ │ │ +001a4890: 743f 2054 6869 7320 7265 7175 6972 6573 t? This requires │ │ │ │ +001a48a0: 206c 6973 7465 6e69 6e67 2074 6f20 7468 listening to th │ │ │ │ +001a48b0: 6520 7361 6d65 2070 6f72 7420 616e 6420 e same port and │ │ │ │ +001a48c0: 7468 656e 2063 6861 696e 696e 6720 7468 then chaining th │ │ │ │ +001a48d0: 6520 7365 7276 6963 6520 6469 7370 6174 e service dispat │ │ │ │ +001a48e0: 6368 6573 2073 6f20 7468 6174 2065 6163 ches so that eac │ │ │ │ +001a48f0: 6820 7365 7276 6963 6520 6361 6e20 7365 h service can se │ │ │ │ +001a4900: 7276 6520 6120 7265 7175 6573 742e 3c2f rve a request..

    First we c │ │ │ │ +001a4920: 7265 6174 6520 6120 3c65 6d3e 3c63 6f64 reate a env.h that contain │ │ │ │ +001a4950: 7320 7468 6520 6a6f 696e 7420 534f 4150 s the joint SOAP │ │ │ │ +001a4960: 2048 6561 6465 7220 616e 6420 534f 4150 Header and SOAP │ │ │ │ +001a4970: 2046 6175 6c74 2064 6566 696e 6974 696f Fault definitio │ │ │ │ +001a4980: 6e73 2c20 666f 7220 6578 616d 706c 6520 ns, for example │ │ │ │ +001a4990: 6279 2063 6f70 792d 7061 7374 696e 6720 by copy-pasting │ │ │ │ +001a49a0: 7468 6573 6520 6672 6f6d 2074 6865 206f these from the o │ │ │ │ +001a49b0: 7468 6572 2068 6561 6465 7220 6669 6c65 ther header file │ │ │ │ +001a49c0: 7320 6765 6e65 7261 7465 6420 6279 2077 s generated by w │ │ │ │ +001a49d0: 7364 6c32 682e 204f 7220 7468 6973 2066 sdl2h. Or this f │ │ │ │ +001a49e0: 696c 6520 6973 2065 6d70 7479 2069 6620 ile is empty if │ │ │ │ +001a49f0: 6e6f 2073 7065 6369 616c 697a 6564 2053 no specialized S │ │ │ │ +001a4a00: 4f41 5020 4865 6164 6572 7320 616e 6420 OAP Headers and │ │ │ │ +001a4a10: 4661 756c 7473 2061 7265 2075 7365 642e Faults are used. │ │ │ │ +001a4a20: 2057 6520 636f 6d70 696c 6520 6974 2061 We compile it a │ │ │ │ +001a4a30: 7320 666f 6c6c 6f77 733a 203c 2f70 3e3c s follows:

    < │ │ │ │ +001a4a40: 7072 6520 636c 6173 733d 2266 7261 676d pre class="fragm │ │ │ │ +001a4a50: 656e 7422 3e20 736f 6170 6370 7032 202d ent"> soapcpp2 - │ │ │ │ +001a4a60: 6320 2d70 656e 7620 656e 762e 680a 2063 c -penv env.h. c │ │ │ │ +001a4a70: 6320 2d63 2065 6e76 432e 630a 3c2f 7072 c -c envC.c.

    We also co │ │ │ │ +001a4a90: 6d70 696c 6520 3c65 6d3e 3c63 6f64 653e mpile │ │ │ │ +001a4aa0: 6773 6f61 702f 7374 6473 6f61 7032 2e63 gsoap/stdsoap2.c │ │ │ │ +001a4ab0: 3c2f 636f 6465 3e3c 2f65 6d3e 2077 6974 wit │ │ │ │ +001a4ac0: 686f 7574 206e 616d 6573 7061 6365 733a hout namespaces: │ │ │ │ +001a4ad0: 203c 2f70 3e3c 7072 6520 636c 6173 733d

     cc -
    │ │ │ │ +001a4af0: 6320 2d44 5749 5448 5f4e 4f4e 414d 4553  c -DWITH_NONAMES
    │ │ │ │ +001a4b00: 5041 4345 5320 7374 6473 6f61 7032 2e63  PACES stdsoap2.c
    │ │ │ │ +001a4b10: 0a3c 2f70 7265 3e3c 703e 2053 6179 2066  .

    Say f │ │ │ │ +001a4b20: 6f72 2065 7861 6d70 6c65 2074 6861 7420 or example that │ │ │ │ +001a4b30: 7765 2068 6176 6520 6120 7365 7276 6963 we have a servic │ │ │ │ +001a4b40: 6520 6465 6669 6e69 7469 6f6e 2069 6e20 e definition in │ │ │ │ +001a4b50: 3c65 6d3e 3c63 6f64 653e 7175 6f74 652e quote. │ │ │ │ +001a4b60: 683c 2f63 6f64 653e 3c2f 656d 3e2e 2057 h. W │ │ │ │ +001a4b70: 6520 636f 6d70 696c 6520 6974 2061 7320 e compile it as │ │ │ │ +001a4b80: 6120 6c69 6272 6172 7920 616e 6420 7765 a library and we │ │ │ │ +001a4b90: 2075 7365 206f 7074 696f 6e73 203c 623e use options │ │ │ │ +001a4ba0: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n< │ │ │ │ +001a4bb0: 2f62 3e20 616e 6420 3c62 3e3c 636f 6465 /b> and -pquote< │ │ │ │ +001a4bd0: 2f62 3e20 746f 2070 7265 6669 7820 7468 /b> to prefix th │ │ │ │ +001a4be0: 6520 6765 6e65 7261 7465 6420 6669 6c65 e generated file │ │ │ │ +001a4bf0: 7320 616e 6420 746f 2072 656e 616d 6520 s and to rename │ │ │ │ +001a4c00: 7468 6520 6e61 6d65 7370 6163 6520 7461 the namespace ta │ │ │ │ +001a4c10: 626c 6520 746f 2061 766f 6964 206c 696e ble to avoid lin │ │ │ │ +001a4c20: 6b20 636f 6e66 6c69 6374 733a 203c 2f70 k conflicts:

     soapcpp2
    │ │ │ │ +001a4c50: 202d 6320 2d6e 202d 7071 756f 7465 2071   -c -n -pquote q
    │ │ │ │ +001a4c60: 756f 7465 2e68 0a20 6363 202d 6320 7175  uote.h. cc -c qu
    │ │ │ │ +001a4c70: 6f74 6543 6c69 656e 744c 6962 2e63 0a3c  oteClientLib.c.<
    │ │ │ │ +001a4c80: 2f70 7265 3e3c 703e 2057 6520 646f 2074  /pre>

    We do t │ │ │ │ +001a4c90: 6865 2073 616d 6520 666f 7220 6120 7365 he same for a se │ │ │ │ +001a4ca0: 7276 6963 6520 6465 6669 6e69 7469 6f6e rvice definition │ │ │ │ +001a4cb0: 2069 6e20 3c65 6d3e 3c63 6f64 653e 7261 in ra │ │ │ │ +001a4cc0: 7465 2e68 3c2f 636f 6465 3e3c 2f65 6d3e te.h │ │ │ │ +001a4cd0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     soa
    │ │ │ │ +001a4cf0: 7063 7070 3220 2d63 202d 6e20 2d70 7261  pcpp2 -c -n -pra
    │ │ │ │ +001a4d00: 7465 2072 6174 652e 680a 2063 6320 2d63  te rate.h. cc -c
    │ │ │ │ +001a4d10: 2072 6174 6543 6c69 656e 744c 6962 2e63   rateClientLib.c
    │ │ │ │ +001a4d20: 0a3c 2f70 7265 3e3c 703e 2054 6f20 7365  .

    To se │ │ │ │ +001a4d30: 7276 6520 626f 7468 2074 6865 2071 756f rve both the quo │ │ │ │ +001a4d40: 7465 2061 6e64 2072 6174 6520 7365 7276 te and rate serv │ │ │ │ +001a4d50: 6963 6573 206f 6e20 7468 6520 7361 6d65 ices on the same │ │ │ │ +001a4d60: 2070 6f72 742c 2077 6520 6368 6169 6e20 port, we chain │ │ │ │ +001a4d70: 7468 6520 7365 7276 6963 6520 6469 7370 the service disp │ │ │ │ +001a4d80: 6174 6368 6572 7320 6173 2066 6f6c 6c6f atchers as follo │ │ │ │ +001a4d90: 7773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ws:

    .
    │ │ │ │ +001a4dc0: 3c73 7061 6e20 636c 6173 733d 2270 7265 #incl │ │ │ │ +001a4de0: 7564 6520 2671 756f 743b 7175 6f74 6548 ude "quoteH │ │ │ │ +001a4df0: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"< │ │ │ │ +001a4e00: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    #include &quo │ │ │ │ +001a4e40: 743b 7261 7465 482e 6826 7175 6f74 3b3c t;rateH.h"< │ │ │ │ +001a4e50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001a4e70: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ +001a4e80: 726f 6365 7373 6f72 223e 2369 6e63 6c75 rocessor">#inclu │ │ │ │ +001a4e90: 6465 2026 7175 6f74 3b71 756f 7465 2e6e de "quote.n │ │ │ │ +001a4ea0: 736d 6170 2671 756f 743b 3c2f 7370 616e smap"
    .
    #include &q │ │ │ │ +001a4ef0: 756f 743b 7261 7465 2e6e 736d 6170 2671 uot;rate.nsmap&q │ │ │ │ +001a4f00: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    .
    . │ │ │ │ +001a5030: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if< │ │ │ │ +001a5060: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (soap_v │ │ │ │ +001a50c0: 616c 6964 5f73 6f63 6b65 743c 2f61 3e28 alid_socket( │ │ │ │ +001a50d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 │ │ │ │ +001a5120: 736f 6170 5f62 696e 643c 2f61 3e28 3c61 soap_bind(soap, N │ │ │ │ +001a5160: 554c 4c2c 2038 3038 302c 2031 3029 2929 ULL, 8080, 10))) │ │ │ │ +001a5170: 203c 7370 616e 2063 6c61 7373 3d22 636f // small │ │ │ │ +001a5190: 4241 434b 4c4f 4720 666f 7220 6974 6572 BACKLOG for iter │ │ │ │ +001a51a0: 6174 6976 6520 7365 7276 6572 733c 2f73 ative servers
    .
    {.
    {
    .< │ │ │ │ -001a51f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a5200: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > whi │ │ │ │ -001a5220: 6c65 3c2f 7370 616e 3e20 2831 293c 2f64 le (1).
    {
    . │ │ │ │ -001a5250: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -001a5280: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soa │ │ │ │ -001a52e0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(soap_accept(soap)))
    .
    │ │ │ │ -001a53a0: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ -001a53c0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (soap_begi │ │ │ │ -001a5440: 6e5f 7365 7276 653c 2f61 3e28 3c61 2063 n_serve(soap)) .
    {.
    < │ │ │ │ -001a54c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001a54d0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001a54e0: 705f 5f66 6175 6c74 2e68 746d 6c23 6761 p__fault.html#ga │ │ │ │ -001a54f0: 3933 3161 3461 6236 6466 3235 3533 6234 931a4ab6df2553b4 │ │ │ │ -001a5500: 3861 3063 3237 3066 3861 3061 3838 6166 8a0c270f8a0a88af │ │ │ │ -001a5510: 223e 736f 6170 5f70 7269 6e74 5f66 6175 ">soap_print_fau │ │ │ │ -001a5520: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so │ │ │ │ -001a5550: 6170 3c2f 613e 2c20 7374 6465 7272 293b ap, stderr); │ │ │ │ -001a5560: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001a5580: 2020 3c73 7061 6e20 636c 6173 733d 226b cont │ │ │ │ -001a55a0: 696e 7565 3c2f 7370 616e 3e3b 3c2f 6469 inue;.
    }.
    soap_set_names │ │ │ │ -001a5650: 7061 6365 733c 2f61 3e28 3c61 2063 6c61 paces(soap, quote │ │ │ │ -001a5690: 5f6e 616d 6573 7061 6365 7329 3b3c 2f64 _namespaces);.
    if │ │ │ │ -001a56e0: 2871 756f 7465 5f73 6572 7665 5f72 6571 (quote_serve_req │ │ │ │ -001a56f0: 7565 7374 283c 6120 636c 6173 733d 2263 uest(soap │ │ │ │ -001a5720: 3c2f 613e 2920 3d3d 203c 6120 636c 6173 ) == SOA │ │ │ │ -001a5780: 505f 4e4f 5f4d 4554 484f 443c 2f61 3e29 P_NO_METHOD) │ │ │ │ -001a5790: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001a57b0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ -001a57d0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_se │ │ │ │ -001a5830: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces │ │ │ │ -001a5840: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001a5870: 2c20 7261 7465 5f6e 616d 6573 7061 6365 , rate_namespace │ │ │ │ -001a5880: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    │ │ │ │ -001a58a0: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ -001a58c0: 3c2f 7370 616e 3e20 2872 6174 655f 7365 (rate_se │ │ │ │ -001a58d0: 7276 655f 7265 7175 6573 7428 3c61 2063 rve_request(soap))..
    } .
    else │ │ │ │ -001a5a60: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa │ │ │ │ -001a5ab0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error) .
    {.
    < │ │ │ │ -001a5b50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001a5b60: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001a5b70: 705f 5f69 6f2e 6874 6d6c 2367 6162 3033 p__io.html#gab03 │ │ │ │ -001a5b80: 6537 6132 6332 3630 3530 3034 6337 6637 e7a2c2605004c7f7 │ │ │ │ -001a5b90: 3462 6532 3737 3338 6363 3632 3922 3e73 4be27738cc629">s │ │ │ │ -001a5ba0: 6f61 705f 7365 6e64 5f66 6175 6c74 3c2f oap_send_fault(soap); // se │ │ │ │ -001a5c00: 6e64 2066 6175 6c74 2074 6f20 636c 6965 nd fault to clie │ │ │ │ -001a5c10: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    │ │ │ │ -001a5c20: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    │ │ │ │ -001a5c40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .< │ │ │ │ -001a5c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a5c70: 3e20 2020 203c 7370 616e 2063 6c61 7373 > e │ │ │ │ -001a5c90: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if ( │ │ │ │ -001a5cc0: 3c61 2063 6c61 7373 3d22 636f 6465 2220
    soap- │ │ │ │ -001a5cf0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err │ │ │ │ -001a5d40: 6e75 6d3c 2f61 3e29 203c 7370 616e 2063 num) / │ │ │ │ -001a5d60: 2f20 6163 6365 7074 2066 6169 6c65 642c / accept failed, │ │ │ │ -001a5d70: 2074 7279 2061 6761 696e 2061 6674 6572 try again after │ │ │ │ -001a5d80: 2031 2073 6563 6f6e 643c 2f73 7061 6e3e 1 second │ │ │ │ -001a5d90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    │ │ │ │ -001a5e20: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault │ │ │ │ -001a5e30: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -001a5e60: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); < │ │ │ │ -001a5e70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    sl │ │ │ │ -001a5e90: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    . │ │ │ │ -001a5eb0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . │ │ │ │ -001a5ed0: 2020 203c 7370 616e 2063 6c61 7373 3d22 els │ │ │ │ -001a5ef0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ -001a5f00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a5f10: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . │ │ │ │ -001a5f30: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std │ │ │ │ -001a5f40: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "server ti │ │ │ │ -001a5f70: 6d65 6420 6f75 745c 6e26 7175 6f74 3b3c med out\n"< │ │ │ │ -001a5f80: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    . │ │ │ │ -001a5f90: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; │ │ │ │ -001a5fd0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    │ │ │ │ -001a6060: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy │ │ │ │ -001a6070: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001a60a0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ -001a60c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    } │ │ │ │ +001a51e0: 226c 696e 6522 3e20 203c 7370 616e 2063 "line"> while │ │ │ │ +001a5210: 2831 293c 2f64 6976 3e0a 3c64 6976 2063 (1)
    .
    {< │ │ │ │ +001a5230: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..
    {
    . │ │ │ │ +001a5390: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 .
    │ │ │ │ +001a5480: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    │ │ │ │ +001a54a0: 2020 2020 203c 6120 636c 6173 733d 2263 soap_pri │ │ │ │ +001a5500: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st │ │ │ │ +001a5540: 6465 7272 293b 203c 2f64 6976 3e0a 3c64 derr);
    . │ │ │ │ +001a5560: 2020 2020 2020 2020 3c73 7061 6e20 636c continue;
    .
    │ │ │ │ +001a55b0: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    │ │ │ │ +001a55d0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_set │ │ │ │ +001a5630: 5f6e 616d 6573 7061 6365 733c 2f61 3e28 _namespaces( │ │ │ │ +001a5640: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001a5670: 2071 756f 7465 5f6e 616d 6573 7061 6365 quote_namespace │ │ │ │ +001a5680: 7329 3b3c 2f64 6976 3e0a 3c64 6976 2063 s);
    .
    │ │ │ │ +001a56a0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (quote_ser │ │ │ │ +001a56d0: 7665 5f72 6571 7565 7374 283c 6120 636c ve_request(soap) == < │ │ │ │ +001a5710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a5720: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001a5730: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ +001a5740: 6162 3063 3539 3539 6563 3462 3735 3039 ab0c5959ec4b7509 │ │ │ │ +001a5750: 6365 3438 6439 6132 3963 3836 3031 6661 ce48d9a29c8601fa │ │ │ │ +001a5760: 6422 3e53 4f41 505f 4e4f 5f4d 4554 484f d">SOAP_NO_METHO │ │ │ │ +001a5770: 443c 2f61 3e29 203c 2f64 6976 3e0a 3c64 D)
    . │ │ │ │ +001a5790: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    . │ │ │ │ +001a57b0: 2020 2020 2020 2020 3c61 2063 6c61 7373 s │ │ │ │ +001a5810: 6f61 705f 7365 745f 6e61 6d65 7370 6163 oap_set_namespac │ │ │ │ +001a5820: 6573 3c2f 613e 283c 6120 636c 6173 733d es(so │ │ │ │ +001a5850: 6170 3c2f 613e 2c20 7261 7465 5f6e 616d ap, rate_nam │ │ │ │ +001a5860: 6573 7061 6365 7329 3b3c 2f64 6976 3e0a espaces);
    . │ │ │ │ +001a5870: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if (r │ │ │ │ +001a58b0: 6174 655f 7365 7276 655f 7265 7175 6573 ate_serve_reques │ │ │ │ +001a58c0: 7428 3c61 2063 6c61 7373 3d22 636f 6465 t(soap))
    .
    │ │ │ │ +001a5910: 2020 2020 2020 3c61 2063 6c61 7373 3d22 soap_send_ │ │ │ │ +001a5970: 6661 756c 743c 2f61 3e28 3c61 2063 6c61 fault(soap); // send fault │ │ │ │ +001a59d0: 746f 2063 6c69 656e 7420 3c2f 7370 616e to client
    .
    │ │ │ │ +001a5a00: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    │ │ │ │ +001a5a20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ +001a5a40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap-> │ │ │ │ +001a5aa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error)
    .
    │ │ │ │ +001a5b10: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    │ │ │ │ +001a5b30: 2020 2020 203c 6120 636c 6173 733d 2263 soap_send_f │ │ │ │ +001a5b90: 6175 6c74 3c2f 613e 283c 6120 636c 6173 ault( │ │ │ │ +001a5bc0: 736f 6170 3c2f 613e 293b 203c 7370 616e soap); // send fault t │ │ │ │ +001a5bf0: 6f20 636c 6965 6e74 203c 2f73 7061 6e3e o client │ │ │ │ +001a5c00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    } │ │ │ │ +001a5c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    else │ │ │ │ +001a5c80: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa │ │ │ │ +001a5cd0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->errnum) < │ │ │ │ +001a5d30: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001a5d40: 656e 7422 3e2f 2f20 6163 6365 7074 2066 ent">// accept f │ │ │ │ +001a5d50: 6169 6c65 642c 2074 7279 2061 6761 696e ailed, try again │ │ │ │ +001a5d60: 2061 6674 6572 2031 2073 6563 6f6e 643c after 1 second< │ │ │ │ +001a5d70: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +001a5d90: 2020 207b 3c2f 6469 763e 0a3c 6469 7620 {
    .
    │ │ │ │ +001a5db0: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_print │ │ │ │ +001a5e10: 5f66 6175 6c74 3c2f 613e 283c 6120 636c _fault(soap, stde │ │ │ │ +001a5e50: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    .
    │ │ │ │ +001a5e70: 2020 2020 736c 6565 7028 3129 3b3c 2f64 sleep(1);.
    } .
    else.
    {.
    fprin │ │ │ │ +001a5f20: 7466 2873 7464 6572 722c 203c 7370 616e tf(stderr, "ser │ │ │ │ +001a5f50: 7665 7220 7469 6d65 6420 6f75 745c 6e26 ver timed out\n& │ │ │ │ +001a5f60: 7175 6f74 3b3c 2f73 7061 6e3e 293b 203c quot;); < │ │ │ │ +001a5f70: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    break;
    . │ │ │ │ +001a5fd0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .. │ │ │ │ +001a6090: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65 │ │ │ │ +001a6140: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .} │ │ │ │ 001a6170: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ -001a6190: 0a3c 6469 7620 636c 6173 733d 226c 696e ...< │ │ │ │ -001a62f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a6300: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_free< │ │ │ │ -001a6360: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ -001a6390: 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f 6469 /a>);
    .

    This chain │ │ │ │ -001a63c0: 696e 6720 6361 6e20 6265 2061 7262 6974 ing can be arbit │ │ │ │ -001a63d0: 7261 7269 6c79 2064 6565 702e 2057 6865 rarily deep. Whe │ │ │ │ -001a63e0: 6e20 7468 6520 7072 6576 696f 7573 2072 n the previous r │ │ │ │ -001a63f0: 6571 7565 7374 2066 6169 6c73 2077 6974 equest fails wit │ │ │ │ -001a6400: 6820 6120 3c63 6f64 653e 2353 4f41 505f h a #SOAP_ │ │ │ │ -001a6410: 4e4f 5f4d 4554 484f 443c 2f63 6f64 653e NO_METHOD │ │ │ │ -001a6420: 2074 6865 6e20 6e65 7874 2072 6571 7565 then next reque │ │ │ │ -001a6430: 7374 2064 6973 7061 7463 6865 7220 6361 st dispatcher ca │ │ │ │ -001a6440: 6e20 6265 2074 7269 6564 2e3c 2f70 3e0a n be tried.

    . │ │ │ │ -001a6450: 3c70 3e54 6865 2073 6572 7665 7220 7368

    The server sh │ │ │ │ -001a6460: 6f75 6c64 2061 6c73 6f20 6465 6669 6e65 ould also define │ │ │ │ -001a6470: 2074 6865 2073 6572 7669 6365 206f 7065 the service ope │ │ │ │ -001a6480: 7261 7469 6f6e 733a 3c2f 703e 0a3c 6469 rations:

    .
    i │ │ │ │ -001a64d0: 6e74 3c2f 7370 616e 3e20 6e73 5f5f 6765 nt ns__ge │ │ │ │ -001a64e0: 7451 756f 7465 283c 7370 616e 2063 6c61 tQuote(str │ │ │ │ -001a6500: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, char *symbol, float *Result); so │ │ │ │ +001a61e0: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(< │ │ │ │ +001a61f0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a6200: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001a6210: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ +001a6220: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .

    This │ │ │ │ +001a63a0: 2063 6861 696e 696e 6720 6361 6e20 6265 chaining can be │ │ │ │ +001a63b0: 2061 7262 6974 7261 7269 6c79 2064 6565 arbitrarily dee │ │ │ │ +001a63c0: 702e 2057 6865 6e20 7468 6520 7072 6576 p. When the prev │ │ │ │ +001a63d0: 696f 7573 2072 6571 7565 7374 2066 6169 ious request fai │ │ │ │ +001a63e0: 6c73 2077 6974 6820 6120 3c63 6f64 653e ls with a │ │ │ │ +001a63f0: 2353 4f41 505f 4e4f 5f4d 4554 484f 443c #SOAP_NO_METHOD< │ │ │ │ +001a6400: 2f63 6f64 653e 2074 6865 6e20 6e65 7874 /code> then next │ │ │ │ +001a6410: 2072 6571 7565 7374 2064 6973 7061 7463 request dispatc │ │ │ │ +001a6420: 6865 7220 6361 6e20 6265 2074 7269 6564 her can be tried │ │ │ │ +001a6430: 2e3c 2f70 3e0a 3c70 3e54 6865 2073 6572 .

    .

    The ser │ │ │ │ +001a6440: 7665 7220 7368 6f75 6c64 2061 6c73 6f20 ver should also │ │ │ │ +001a6450: 6465 6669 6e65 2074 6865 2073 6572 7669 define the servi │ │ │ │ +001a6460: 6365 206f 7065 7261 7469 6f6e 733a 3c2f ce operations:.

    int │ │ │ │ +001a64c0: 6e73 5f5f 6765 7451 756f 7465 283c 7370 ns__getQuote(struct │ │ │ │ +001a64f0: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +001a6520: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha │ │ │ │ +001a6570: 723c 2f73 7061 6e3e 202a 7379 6d62 6f6c r *symbol │ │ │ │ +001a6580: 2c20 3c73 7061 6e20 636c 6173 733d 226b , floa │ │ │ │ +001a65a0: 743c 2f73 7061 6e3e 202a 5265 7375 6c74 t *Result │ │ │ │ +001a65b0: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    {.
    {
    . │ │ │ │ -001a6600: 2020 2a52 6573 756c 7420 3d20 2e2e 2e20 *Result = ... │ │ │ │ -001a6610: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    ..} │ │ │ │ +001a65e0: 6c69 6e65 223e 2020 2a52 6573 756c 7420 line"> *Result │ │ │ │ +001a65f0: 3d20 2e2e 2e20 3b20 3c2f 6469 763e 0a3c = ... ;
    .< │ │ │ │ +001a6600: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a6610: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret │ │ │ │ +001a6630: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S │ │ │ │ +001a6690: 4f41 505f 4f4b 3c2f 613e 3b20 3c2f 6469 OAP_OK; .
    }
    . │ │ │ │ 001a66d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .
    in │ │ │ │ -001a6720: 743c 2f73 7061 6e3e 206e 735f 5f67 6574 t ns__get │ │ │ │ -001a6730: 5261 7465 283c 7370 616e 2063 6c61 7373 Rate(struc │ │ │ │ -001a6750: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -001a6780: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, char │ │ │ │ -001a67e0: 202a 636f 756e 7472 7931 2c20 3c73 7061 *country1, char *country2, float *Result); int n │ │ │ │ +001a6710: 735f 5f67 6574 5261 7465 283c 7370 616e s__getRate(struct < │ │ │ │ +001a6740: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a6750: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001a6760: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +001a6770: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001a67a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001a67c0: 2f73 7061 6e3e 202a 636f 756e 7472 7931 /span> *country1 │ │ │ │ +001a67d0: 2c20 3c73 7061 6e20 636c 6173 733d 226b , char │ │ │ │ +001a67f0: 3c2f 7370 616e 3e20 2a63 6f75 6e74 7279 *country │ │ │ │ +001a6800: 322c 203c 7370 616e 2063 6c61 7373 3d22 2, flo │ │ │ │ +001a6820: 6174 3c2f 7370 616e 3e20 2a52 6573 756c at *Resul │ │ │ │ +001a6830: 7429 3b20 3c2f 6469 763e 0a3c 6469 7620 t);
    .
    {.
    {
    .< │ │ │ │ -001a6870: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a6880: 3e20 202a 5265 7375 6c74 203d 202e 2e2e > *Result = ... │ │ │ │ -001a6890: 203b 203c 2f64 6976 3e0a 3c64 6976 2063 ;
    .. │ │ │ │ -001a6950: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    < │ │ │ │ -001a6970: 703e 486f 7765 7665 722c 2074 6865 2077 p>However, the w │ │ │ │ -001a6980: 6869 6c65 206c 6f6f 7020 6974 6572 6174 hile loop iterat │ │ │ │ -001a6990: 6573 2066 6f72 2065 6163 6820 6e65 7720 es for each new │ │ │ │ -001a69a0: 636f 6e6e 6563 7469 6f6e 2074 6861 7420 connection that │ │ │ │ -001a69b0: 6973 2065 7374 6162 6c69 7368 6564 2077 is established w │ │ │ │ -001a69c0: 6974 6820 3c63 6f64 653e 3c61 2063 6c61 ith soap_accept and do │ │ │ │ -001a6a60: 6573 206e 6f74 2061 6c6c 6f77 2066 6f72 es not allow for │ │ │ │ -001a6a70: 2048 5454 5020 6b65 6570 2d61 6c69 7665 HTTP keep-alive │ │ │ │ -001a6a80: 2063 6f6e 6e65 6374 696f 6e73 2074 6f20 connections to │ │ │ │ -001a6a90: 7065 7273 6973 742e 2046 6f72 206f 7572 persist. For our │ │ │ │ -001a6aa0: 2066 696e 616c 2069 6d70 726f 7665 6d65 final improveme │ │ │ │ -001a6ab0: 6e74 2077 6520 7761 6e74 2074 6f20 7375 nt we want to su │ │ │ │ -001a6ac0: 7070 6f72 7420 4854 5450 206b 6565 702d pport HTTP keep- │ │ │ │ -001a6ad0: 616c 6976 6520 636f 6e6e 6563 7469 6f6e alive connection │ │ │ │ -001a6ae0: 7320 7468 6174 2072 6571 7569 7265 206c s that require l │ │ │ │ -001a6af0: 6f6f 7069 6e67 206f 7665 7220 7468 6520 ooping over the │ │ │ │ -001a6b00: 7365 7276 6963 6520 6469 7370 6174 6368 service dispatch │ │ │ │ -001a6b10: 6573 2075 6e74 696c 2074 6865 2063 6f6e es until the con │ │ │ │ -001a6b20: 6e65 6374 696f 6e20 636c 6f73 6573 206f nection closes o │ │ │ │ -001a6b30: 6e20 6569 7468 6572 2065 6e64 2c20 6166 n either end, af │ │ │ │ -001a6b40: 7465 7220 7768 6963 6820 7765 2072 6573 ter which we res │ │ │ │ -001a6b50: 756d 6520 7468 6520 6f75 7465 7220 6c6f ume the outer lo │ │ │ │ -001a6b60: 6f70 2e20 5468 6520 7265 7375 6c74 696e op. The resultin │ │ │ │ -001a6b70: 6720 636f 6465 2069 7320 7665 7279 2063 g code is very c │ │ │ │ -001a6b80: 6c6f 7365 2074 6f20 7468 6520 736f 6170 lose to the soap │ │ │ │ -001a6b90: 6370 7032 2d67 656e 6572 6174 6564 203c cpp2-generated < │ │ │ │ -001a6ba0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap_serve code a │ │ │ │ -001a6c30: 6e64 2074 6865 203c 636f 6465 3e73 6572 nd the ser │ │ │ │ -001a6c40: 7665 3c2f 636f 6465 3e20 7365 7276 6963 ve servic │ │ │ │ -001a6c50: 6520 636c 6173 7320 6d65 7468 6f64 732c e class methods, │ │ │ │ -001a6c60: 2077 6974 6820 7468 6520 6164 6469 7469 with the additi │ │ │ │ -001a6c70: 6f6e 206f 6620 7468 6520 6368 6169 6e20 on of the chain │ │ │ │ -001a6c80: 6f66 2073 6572 7669 6365 2064 6973 7061 of service dispa │ │ │ │ -001a6c90: 7463 6865 7320 696e 2074 6865 206c 6f6f tches in the loo │ │ │ │ -001a6ca0: 7020 626f 6479 3a3c 2f70 3e0a 3c64 6976 p body:

    .
    # │ │ │ │ -001a6cf0: 696e 636c 7564 6520 2671 756f 743b 7175 include "qu │ │ │ │ -001a6d00: 6f74 6548 2e68 2671 756f 743b 3c2f 7370 oteH.h"
    .
    #include │ │ │ │ -001a6d50: 2671 756f 743b 7261 7465 482e 6826 7175 "rateH.h&qu │ │ │ │ -001a6d60: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    │ │ │ │ -001a6d70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i │ │ │ │ -001a6da0: 6e63 6c75 6465 2026 7175 6f74 3b71 756f nclude "quo │ │ │ │ -001a6db0: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    .
    #includ │ │ │ │ -001a6e00: 6520 2671 756f 743b 7261 7465 2e6e 736d e "rate.nsm │ │ │ │ -001a6e10: 6170 2671 756f 743b 3c2f 7370 616e 3e3c ap"< │ │ │ │ +001a6860: 226c 696e 6522 3e20 202a 5265 7375 6c74 "line"> *Result │ │ │ │ +001a6870: 203d 202e 2e2e 203b 203c 2f64 6976 3e0a = ... ;
    . │ │ │ │ +001a6880: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ +001a68b0: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn │ │ │ │ +001a6910: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .

    However, │ │ │ │ +001a6960: 2074 6865 2077 6869 6c65 206c 6f6f 7020 the while loop │ │ │ │ +001a6970: 6974 6572 6174 6573 2066 6f72 2065 6163 iterates for eac │ │ │ │ +001a6980: 6820 6e65 7720 636f 6e6e 6563 7469 6f6e h new connection │ │ │ │ +001a6990: 2074 6861 7420 6973 2065 7374 6162 6c69 that is establi │ │ │ │ +001a69a0: 7368 6564 2077 6974 6820 3c63 6f64 653e shed with │ │ │ │ +001a69b0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ac │ │ │ │ +001a6a30: 6365 7074 3c2f 613e 3c2f 636f 6465 3e20 cept │ │ │ │ +001a6a40: 616e 6420 646f 6573 206e 6f74 2061 6c6c and does not all │ │ │ │ +001a6a50: 6f77 2066 6f72 2048 5454 5020 6b65 6570 ow for HTTP keep │ │ │ │ +001a6a60: 2d61 6c69 7665 2063 6f6e 6e65 6374 696f -alive connectio │ │ │ │ +001a6a70: 6e73 2074 6f20 7065 7273 6973 742e 2046 ns to persist. F │ │ │ │ +001a6a80: 6f72 206f 7572 2066 696e 616c 2069 6d70 or our final imp │ │ │ │ +001a6a90: 726f 7665 6d65 6e74 2077 6520 7761 6e74 rovement we want │ │ │ │ +001a6aa0: 2074 6f20 7375 7070 6f72 7420 4854 5450 to support HTTP │ │ │ │ +001a6ab0: 206b 6565 702d 616c 6976 6520 636f 6e6e keep-alive conn │ │ │ │ +001a6ac0: 6563 7469 6f6e 7320 7468 6174 2072 6571 ections that req │ │ │ │ +001a6ad0: 7569 7265 206c 6f6f 7069 6e67 206f 7665 uire looping ove │ │ │ │ +001a6ae0: 7220 7468 6520 7365 7276 6963 6520 6469 r the service di │ │ │ │ +001a6af0: 7370 6174 6368 6573 2075 6e74 696c 2074 spatches until t │ │ │ │ +001a6b00: 6865 2063 6f6e 6e65 6374 696f 6e20 636c he connection cl │ │ │ │ +001a6b10: 6f73 6573 206f 6e20 6569 7468 6572 2065 oses on either e │ │ │ │ +001a6b20: 6e64 2c20 6166 7465 7220 7768 6963 6820 nd, after which │ │ │ │ +001a6b30: 7765 2072 6573 756d 6520 7468 6520 6f75 we resume the ou │ │ │ │ +001a6b40: 7465 7220 6c6f 6f70 2e20 5468 6520 7265 ter loop. The re │ │ │ │ +001a6b50: 7375 6c74 696e 6720 636f 6465 2069 7320 sulting code is │ │ │ │ +001a6b60: 7665 7279 2063 6c6f 7365 2074 6f20 7468 very close to th │ │ │ │ +001a6b70: 6520 736f 6170 6370 7032 2d67 656e 6572 e soapcpp2-gener │ │ │ │ +001a6b80: 6174 6564 203c 636f 6465 3e3c 6120 636c ated soap_s │ │ │ │ +001a6c00: 6572 7665 3c2f 613e 3c2f 636f 6465 3e20 erve │ │ │ │ +001a6c10: 636f 6465 2061 6e64 2074 6865 203c 636f code and the serve │ │ │ │ +001a6c30: 7365 7276 6963 6520 636c 6173 7320 6d65 service class me │ │ │ │ +001a6c40: 7468 6f64 732c 2077 6974 6820 7468 6520 thods, with the │ │ │ │ +001a6c50: 6164 6469 7469 6f6e 206f 6620 7468 6520 addition of the │ │ │ │ +001a6c60: 6368 6169 6e20 6f66 2073 6572 7669 6365 chain of service │ │ │ │ +001a6c70: 2064 6973 7061 7463 6865 7320 696e 2074 dispatches in t │ │ │ │ +001a6c80: 6865 206c 6f6f 7020 626f 6479 3a3c 2f70 he loop body:

    .
    #include &q │ │ │ │ +001a6ce0: 756f 743b 7175 6f74 6548 2e68 2671 756f uot;quoteH.h&quo │ │ │ │ +001a6cf0: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ │ +001a6d00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in │ │ │ │ +001a6d30: 636c 7564 6520 2671 756f 743b 7261 7465 clude "rate │ │ │ │ +001a6d40: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h" │ │ │ │ +001a6d50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu │ │ │ │ +001a6d90: 6f74 3b71 756f 7465 2e6e 736d 6170 2671 ot;quote.nsmap&q │ │ │ │ +001a6da0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    .
    # │ │ │ │ +001a6de0: 696e 636c 7564 6520 2671 756f 743b 7261 include "ra │ │ │ │ +001a6df0: 7465 2e6e 736d 6170 2671 756f 743b 3c2f te.nsmap"
    .
    < │ │ │ │ 001a6e20: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    . │ │ │ │ -001a6e40: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct < │ │ │ │ -001a6e70: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -001a6ea0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -001a6ed0: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so │ │ │ │ -001a6f30: 6170 5f6e 6577 3c2f 613e 2829 3b20 3c2f ap_new(); .
    if (so │ │ │ │ -001a6fd0: 6170 5f76 616c 6964 5f73 6f63 6b65 743c ap_valid_socket< │ │ │ │ -001a6fe0: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap_bind(soap, NULL, 8080, 1 │ │ │ │ -001a7080: 3029 2929 203c 7370 616e 2063 6c61 7373 0))) // sm │ │ │ │ -001a70a0: 616c 6c20 4241 434b 4c4f 4720 666f 7220 all BACKLOG for │ │ │ │ -001a70b0: 6974 6572 6174 6976 6520 7365 7276 6572 iterative server │ │ │ │ -001a70c0: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ +001a6e30: 3d22 6c69 6e65 223e 3c73 7061 6e20 636c ="line">st │ │ │ │ +001a6e50: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap *soap = < │ │ │ │ +001a6ec0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a6ed0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001a6ee0: 705f 5f63 6f6e 7465 7874 2e68 746d 6c23 p__context.html# │ │ │ │ +001a6ef0: 6761 3837 6332 3034 3838 6232 6463 3638 ga87c20488b2dc68 │ │ │ │ +001a6f00: 3061 6161 3736 3839 6231 6430 3234 3938 0aaa7689b1d02498 │ │ │ │ +001a6f10: 3963 223e 736f 6170 5f6e 6577 3c2f 613e 9c">soap_new │ │ │ │ +001a6f20: 2829 3b20 3c2f 6469 763e 0a3c 6469 7620 ();
    .
    if │ │ │ │ +001a6f60: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_valid_s │ │ │ │ +001a6fc0: 6f63 6b65 743c 2f61 3e28 3c61 2063 6c61 ocket(soap_b │ │ │ │ +001a7020: 696e 643c 2f61 3e28 3c61 2063 6c61 7373 ind(s │ │ │ │ +001a7050: 6f61 703c 2f61 3e2c 204e 554c 4c2c 2038 oap, NULL, 8 │ │ │ │ +001a7060: 3038 302c 2031 3029 2929 203c 7370 616e 080, 10))) // small BACKLO │ │ │ │ +001a7090: 4720 666f 7220 6974 6572 6174 6976 6520 G for iterative │ │ │ │ +001a70a0: 7365 7276 6572 733c 2f73 7061 6e3e 3c2f servers.
    {
    .< │ │ │ │ 001a70d0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a70e0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    while (1)
    . │ │ │ │ -001a7140: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ -001a7160: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_vali │ │ │ │ -001a71e0: 645f 736f 636b 6574 3c2f 613e 283c 6120 d_socket(soa │ │ │ │ -001a7240: 705f 6163 6365 7074 3c2f 613e 283c 6120 p_accept(soap)))< │ │ │ │ -001a7280: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    soap-> │ │ │ │ -001a72f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 keep_al │ │ │ │ -001a7340: 6976 653c 2f61 3e20 3d20 3c61 2063 6c61 ive = soap->max_keep_ │ │ │ │ -001a73d0: 616c 6976 653c 2f61 3e20 2b20 313b 203c alive + 1; < │ │ │ │ -001a73e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001a73f0: 656e 7422 3e2f 2f20 6d61 7820 6b65 6570 ent">// max keep │ │ │ │ -001a7400: 2d61 6c69 7665 2069 7465 7261 7469 6f6e -alive iteration │ │ │ │ -001a7410: 733c 2f73 7061 6e3e 3c2f 6469 763e 0a3c s
    .< │ │ │ │ -001a7420: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a7430: 3e20 2020 2020 203c 7370 616e 2063 6c61 > do
    │ │ │ │ -001a7460: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    │ │ │ │ -001a7480: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if ( │ │ │ │ -001a74c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001a74f0: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ke │ │ │ │ -001a7540: 6570 5f61 6c69 7665 3c2f 613e 2026 6774 ep_alive > │ │ │ │ -001a7550: 3b20 3029 2026 616d 703b 2661 6d70 3b20 ; 0) && │ │ │ │ -001a7560: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001a7590: 2d26 6774 3b3c 6120 636c 6173 733d 2263 ->ma │ │ │ │ -001a75e0: 785f 6b65 6570 5f61 6c69 7665 3c2f 613e x_keep_alive │ │ │ │ -001a75f0: 2026 6774 3b20 3029 293c 2f64 6976 3e0a > 0))
    . │ │ │ │ -001a7600: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap-> │ │ │ │ -001a7650: 3c61 2063 6c61 7373 3d22 636f 6465 2220 keep_al │ │ │ │ -001a76a0: 6976 653c 2f61 3e2d 2d3b 3c2f 6469 763e ive--;
    │ │ │ │ -001a76b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ -001a77a0: 2020 2020 2020 207b 3c2f 6469 763e 0a3c {
    .< │ │ │ │ -001a77b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a77c0: 3e20 2020 2020 2020 2020 203c 7370 616e > if ( │ │ │ │ -001a77f0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ -001a7820: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err │ │ │ │ -001a7870: 6f72 3c2f 613e 2026 6774 3b3d 203c 6120 or >= SOAP_STOP) │ │ │ │ -001a78e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // if a pl │ │ │ │ -001a7900: 7567 696e 2068 6173 2073 6572 7665 6420 ugin has served │ │ │ │ -001a7910: 7468 6520 7265 7175 6573 743c 2f73 7061 the request
    .
    │ │ │ │ -001a7940: 2020 2020 2020 203c 7370 616e 2063 6c61 continue │ │ │ │ -001a7970: 3b20 2020 2020 2020 2020 2020 2020 2020 ; │ │ │ │ -001a7980: 2020 2020 3c73 7061 6e20 636c 6173 733d // the │ │ │ │ -001a79a0: 6e20 636f 6e74 696e 7565 2077 6974 6820 n continue with │ │ │ │ -001a79b0: 7468 6520 6e65 7874 2072 6571 7565 7374 the next request │ │ │ │ -001a79c0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001a79e0: 2020 2020 2020 2020 2020 3c73 7061 6e20 break │ │ │ │ -001a7a10: 3b20 2020 2020 2020 2020 2020 2020 2020 ; │ │ │ │ -001a7a20: 2020 2020 2020 2020 203c 7370 616e 2063 / │ │ │ │ -001a7a40: 2f20 616e 2065 7272 6f72 206f 6363 7572 / an error occur │ │ │ │ -001a7a50: 7265 643c 2f73 7061 6e3e 3c2f 6469 763e red
    │ │ │ │ -001a7a60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }.
    soap_set_nam │ │ │ │ -001a7b00: 6573 7061 6365 733c 2f61 3e28 3c61 2063 espaces(soap, quo │ │ │ │ -001a7b40: 7465 5f6e 616d 6573 7061 6365 7329 3b3c te_namespaces);< │ │ │ │ -001a7b50: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ -001a7b70: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (quote_serve │ │ │ │ -001a7ba0: 5f72 6571 7565 7374 283c 6120 636c 6173 _request( │ │ │ │ -001a7bd0: 736f 6170 3c2f 613e 2920 3d3d 203c 6120 soap) == SOAP_NO_METHOD< │ │ │ │ -001a7c40: 2f61 3e29 203c 2f64 6976 3e0a 3c64 6976 /a>)
    .
    │ │ │ │ -001a7c60: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    . │ │ │ │ -001a7c80: 2020 2020 2020 2020 2020 3c61 2063 6c61
    soap_set_namesp │ │ │ │ -001a7cf0: 6163 6573 3c2f 613e 283c 6120 636c 6173 aces( │ │ │ │ -001a7d20: 736f 6170 3c2f 613e 2c20 7261 7465 5f6e soap, rate_n │ │ │ │ -001a7d30: 616d 6573 7061 6365 7329 3b3c 2f64 6976 amespaces);
    .
    if (rate_serve_re │ │ │ │ -001a7d90: 7175 6573 7428 3c61 2063 6c61 7373 3d22 quest(soa │ │ │ │ -001a7dc0: 703c 2f61 3e29 293c 2f64 6976 3e0a 3c64 p))
    . │ │ │ │ -001a7de0: 2020 2020 2020 2020 2020 2020 3c61 2063 soap │ │ │ │ -001a7e40: 5f73 656e 645f 6661 756c 743c 2f61 3e28 _send_fault( │ │ │ │ -001a7e50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -001a7e80: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // send │ │ │ │ -001a7ea0: 6661 756c 7420 746f 2063 6c69 656e 7420 fault to client │ │ │ │ -001a7eb0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001a7ed0: 2020 2020 2020 2020 7d20 3c2f 6469 763e }
    │ │ │ │ -001a7ee0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    else │ │ │ │ -001a7f20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa │ │ │ │ -001a7f70: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error) .
    { │ │ │ │ -001a7ff0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -001a8010: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_send_fau │ │ │ │ -001a8070: 6c74 3c2f 613e 283c 6120 636c 6173 733d lt(so │ │ │ │ -001a80a0: 6170 3c2f 613e 293b 203c 7370 616e 2063 ap); / │ │ │ │ -001a80c0: 2f20 7365 6e64 2066 6175 6c74 2074 6f20 / send fault to │ │ │ │ -001a80d0: 636c 6965 6e74 203c 2f73 7061 6e3e 3c2f client .
    } │ │ │ │ -001a8100: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .. │ │ │ │ -001a81c0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    s │ │ │ │ -001a8230: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .
    } < │ │ │ │ -001a8290: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001a82a0: 6f72 6466 6c6f 7722 3e77 6869 6c65 3c2f ordflow">while (so │ │ │ │ -001a82e0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->keep_alive);
    .
    │ │ │ │ -001a8360: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    < │ │ │ │ -001a8380: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001a8390: 6f72 6466 6c6f 7722 3e65 6c73 653c 2f73 ordflow">else i │ │ │ │ -001a83c0: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (soap->errnum) // acce │ │ │ │ -001a8470: 7074 2066 6169 6c65 642c 2074 7279 2061 pt failed, try a │ │ │ │ -001a8480: 6761 696e 2061 6674 6572 2031 2073 6563 gain after 1 sec │ │ │ │ -001a8490: 6f6e 643c 2f73 7061 6e3e 3c2f 6469 763e ond
    │ │ │ │ -001a84a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .< │ │ │ │ -001a84c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a84d0: 3e20 2020 2020 203c 6120 636c 6173 733d > soap_p │ │ │ │ -001a8530: 7269 6e74 5f66 6175 6c74 3c2f 613e 283c rint_fault(< │ │ │ │ -001a8540: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001a8550: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001a8560: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001a8570: 7374 6465 7272 293b 203c 2f64 6976 3e0a stderr);
    . │ │ │ │ -001a8580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    sleep(1) │ │ │ │ -001a85a0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    } │ │ │ │ -001a85c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else
    .
    { │ │ │ │ -001a8620: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    f │ │ │ │ -001a8640: 7072 696e 7466 2873 7464 6572 722c 203c printf(stderr, < │ │ │ │ -001a8650: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ -001a8660: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ -001a8670: 3b73 6572 7665 7220 7469 6d65 6420 6f75 ;server timed ou │ │ │ │ -001a8680: 745c 6e26 7175 6f74 3b3c 2f73 7061 6e3e t\n" │ │ │ │ -001a8690: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ -001a86b0: 2020 3c73 7061 6e20 636c 6173 733d 226b brea │ │ │ │ -001a86d0: 6b3c 2f73 7061 6e3e 3b20 3c2f 6469 763e k;
    │ │ │ │ -001a86e0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .< │ │ │ │ -001a8700: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001a8710: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_d │ │ │ │ -001a8770: 6573 7472 6f79 3c2f 613e 283c 6120 636c estroy(soap); .
    s │ │ │ │ -001a8820: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); .
    }
    │ │ │ │ +001a70e0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > whi │ │ │ │ +001a7100: 6c65 3c2f 7370 616e 3e20 2831 293c 2f64 le (1).
    {
    . │ │ │ │ +001a7130: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +001a7160: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soa │ │ │ │ +001a71c0: 705f 7661 6c69 645f 736f 636b 6574 3c2f p_valid_socket(soap_accept(soap)))
    .
    │ │ │ │ +001a7280: 2020 7b3c 2f64 6976 3e0a 3c64 6976 2063 {
    .
    │ │ │ │ +001a72a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->k │ │ │ │ +001a7320: 6565 705f 616c 6976 653c 2f61 3e20 3d20 eep_alive = │ │ │ │ +001a7330: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +001a7360: 2667 743b 3c61 2063 6c61 7373 3d22 636f >max │ │ │ │ +001a73b0: 5f6b 6565 705f 616c 6976 653c 2f61 3e20 _keep_alive │ │ │ │ +001a73c0: 2b20 313b 203c 7370 616e 2063 6c61 7373 + 1; // ma │ │ │ │ +001a73e0: 7820 6b65 6570 2d61 6c69 7665 2069 7465 x keep-alive ite │ │ │ │ +001a73f0: 7261 7469 6f6e 733c 2f73 7061 6e3e 3c2f rations.
    do │ │ │ │ +001a7440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { │ │ │ │ +001a7460: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001a7480: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if ((so │ │ │ │ +001a74d0: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->keep_alive > 0) & │ │ │ │ +001a7540: 2661 6d70 3b20 283c 6120 636c 6173 733d & (so │ │ │ │ +001a7570: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->max_keep_ali │ │ │ │ +001a75d0: 7665 3c2f 613e 2026 6774 3b20 3029 293c ve > 0))< │ │ │ │ +001a75e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +001a7600: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->k │ │ │ │ +001a7680: 6565 705f 616c 6976 653c 2f61 3e2d 2d3b eep_alive--; │ │ │ │ +001a7690: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001a76b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soap_begin │ │ │ │ +001a7730: 5f73 6572 7665 3c2f 613e 283c 6120 636c _serve(soap)).
    {.
    │ │ │ │ +001a77b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if (soa │ │ │ │ +001a7800: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->error > │ │ │ │ +001a7860: 3b3d 203c 6120 636c 6173 733d 2263 6f64 ;= SOAP_STOP │ │ │ │ +001a78c0: 3c2f 613e 2920 3c73 7061 6e20 636c 6173 ) // i │ │ │ │ +001a78e0: 6620 6120 706c 7567 696e 2068 6173 2073 f a plugin has s │ │ │ │ +001a78f0: 6572 7665 6420 7468 6520 7265 7175 6573 erved the reques │ │ │ │ +001a7900: 743c 2f73 7061 6e3e 3c2f 6469 763e 0a3c t
    .< │ │ │ │ +001a7910: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a7920: 3e20 2020 2020 2020 2020 2020 203c 7370 > continue< │ │ │ │ +001a7950: 2f73 7061 6e3e 3b20 2020 2020 2020 2020 /span>; │ │ │ │ +001a7960: 2020 2020 2020 2020 2020 3c73 7061 6e20 │ │ │ │ +001a7980: 2f2f 2074 6865 6e20 636f 6e74 696e 7565 // then continue │ │ │ │ +001a7990: 2077 6974 6820 7468 6520 6e65 7874 2072 with the next r │ │ │ │ +001a79a0: 6571 7565 7374 3c2f 7370 616e 3e3c 2f64 equest.
    │ │ │ │ +001a79d0: 3c73 7061 6e20 636c 6173 733d 226b 6579 break< │ │ │ │ +001a79f0: 2f73 7061 6e3e 3b20 2020 2020 2020 2020 /span>; │ │ │ │ +001a7a00: 2020 2020 2020 2020 2020 2020 2020 203c < │ │ │ │ +001a7a10: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001a7a20: 656e 7422 3e2f 2f20 616e 2065 7272 6f72 ent">// an error │ │ │ │ +001a7a30: 206f 6363 7572 7265 643c 2f73 7061 6e3e occurred │ │ │ │ +001a7a40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001a7a60: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    │ │ │ │ +001a7a80: 2020 203c 6120 636c 6173 733d 2263 6f64 soap_s │ │ │ │ +001a7ae0: 6574 5f6e 616d 6573 7061 6365 733c 2f61 et_namespaces(soap, quote_namespa │ │ │ │ +001a7b30: 6365 7329 3b3c 2f64 6976 3e0a 3c64 6976 ces);
    .
    │ │ │ │ +001a7b50: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ +001a7b70: 6966 3c2f 7370 616e 3e20 2871 756f 7465 if (quote │ │ │ │ +001a7b80: 5f73 6572 7665 5f72 6571 7565 7374 283c _serve_request(< │ │ │ │ +001a7b90: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a7ba0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001a7bb0: 6874 6d6c 223e 736f 6170 3c2f 613e 2920 html">soap) │ │ │ │ +001a7bc0: 3d3d 203c 6120 636c 6173 733d 2263 6f64 == SOAP_NO_M │ │ │ │ +001a7c20: 4554 484f 443c 2f61 3e29 203c 2f64 6976 ETHOD)
    .
    {.
    │ │ │ │ +001a7c70: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_set_ │ │ │ │ +001a7cd0: 6e61 6d65 7370 6163 6573 3c2f 613e 283c namespaces(< │ │ │ │ +001a7ce0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001a7cf0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001a7d00: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001a7d10: 7261 7465 5f6e 616d 6573 7061 6365 7329 rate_namespaces) │ │ │ │ +001a7d20: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ +001a7d40: 2020 2020 3c73 7061 6e20 636c 6173 733d if │ │ │ │ +001a7d60: 3c2f 7370 616e 3e20 2872 6174 655f 7365 (rate_se │ │ │ │ +001a7d70: 7276 655f 7265 7175 6573 7428 3c61 2063 rve_request(soap)).
    │ │ │ │ +001a7dd0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_send_faul │ │ │ │ +001a7e30: 743c 2f61 3e28 3c61 2063 6c61 7373 3d22 t(soa │ │ │ │ +001a7e60: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); // │ │ │ │ +001a7e80: 2073 656e 6420 6661 756c 7420 746f 2063 send fault to c │ │ │ │ +001a7e90: 6c69 656e 7420 3c2f 7370 616e 3e3c 2f64 lient .
    } │ │ │ │ +001a7ec0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001a7ee0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ +001a7f00: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap-> │ │ │ │ +001a7f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 error)
    .
    │ │ │ │ +001a7fd0: 2020 2020 207b 3c2f 6469 763e 0a3c 6469 {
    . │ │ │ │ +001a7ff0: 2020 2020 2020 2020 203c 6120 636c 6173
    soap_se │ │ │ │ +001a8050: 6e64 5f66 6175 6c74 3c2f 613e 283c 6120 nd_fault(soap); < │ │ │ │ +001a8090: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001a80a0: 656e 7422 3e2f 2f20 7365 6e64 2066 6175 ent">// send fau │ │ │ │ +001a80b0: 6c74 2074 6f20 636c 6965 6e74 203c 2f73 lt to client
    .
    │ │ │ │ +001a80e0: 2020 2020 207d 3c2f 6469 763e 0a3c 6469 }
    . │ │ │ │ +001a8100: 2020 2020 2020 203c 6120 636c 6173 733d soap │ │ │ │ +001a8160: 5f64 6573 7472 6f79 3c2f 613e 283c 6120 _destroy(soap); < │ │ │ │ +001a81a0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +001a81c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    │ │ │ │ +001a8270: 2020 207d 203c 7370 616e 2063 6c61 7373 } w │ │ │ │ +001a8290: 6869 6c65 3c2f 7370 616e 3e20 283c 6120 hile (soap-> │ │ │ │ +001a82d0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;keep_a │ │ │ │ +001a8320: 6c69 7665 3c2f 613e 293b 3c2f 6469 763e live);
    │ │ │ │ +001a8330: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .< │ │ │ │ +001a8350: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a8360: 3e20 2020 203c 7370 616e 2063 6c61 7373 > e │ │ │ │ +001a8380: 6c73 653c 2f73 7061 6e3e 203c 7370 616e lse if ( │ │ │ │ +001a83b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ +001a83e0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >err │ │ │ │ +001a8430: 6e75 6d3c 2f61 3e29 203c 7370 616e 2063 num) / │ │ │ │ +001a8450: 2f20 6163 6365 7074 2066 6169 6c65 642c / accept failed, │ │ │ │ +001a8460: 2074 7279 2061 6761 696e 2061 6674 6572 try again after │ │ │ │ +001a8470: 2031 2073 6563 6f6e 643c 2f73 7061 6e3e 1 second │ │ │ │ +001a8480: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {.
    │ │ │ │ +001a8510: 736f 6170 5f70 7269 6e74 5f66 6175 6c74 soap_print_fault │ │ │ │ +001a8520: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ +001a8550: 3c2f 613e 2c20 7374 6465 7272 293b 203c , stderr); < │ │ │ │ +001a8560: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    sl │ │ │ │ +001a8580: 6565 7028 3129 3b3c 2f64 6976 3e0a 3c64 eep(1);
    . │ │ │ │ +001a85a0: 2020 2020 7d20 3c2f 6469 763e 0a3c 6469 }
    . │ │ │ │ +001a85c0: 2020 203c 7370 616e 2063 6c61 7373 3d22 els │ │ │ │ +001a85e0: 653c 2f73 7061 6e3e 3c2f 6469 763e 0a3c e
    .< │ │ │ │ +001a85f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a8600: 3e20 2020 207b 3c2f 6469 763e 0a3c 6469 > {
    . │ │ │ │ +001a8620: 2020 2020 2066 7072 696e 7466 2873 7464 fprintf(std │ │ │ │ +001a8630: 6572 722c 203c 7370 616e 2063 6c61 7373 err, "server ti │ │ │ │ +001a8660: 6d65 6420 6f75 745c 6e26 7175 6f74 3b3c med out\n"< │ │ │ │ +001a8670: 2f73 7061 6e3e 293b 203c 2f64 6976 3e0a /span>);
    . │ │ │ │ +001a8680: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    break; │ │ │ │ +001a86c0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }.
    │ │ │ │ +001a8750: 736f 6170 5f64 6573 7472 6f79 3c2f 613e soap_destroy │ │ │ │ +001a8760: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +001a8790: 293b 203c 2f64 6976 3e0a 3c64 6976 2063 );
    .
    │ │ │ │ +001a87b0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_end(soap);
    .
    } │ │ │ │ +001a8860: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    }
    │ │ │ │ 001a8880: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    ..
    soap_end( │ │ │ │ -001a89c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap) │ │ │ │ -001a89f0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    │ │ │ │ -001a8a60: 736f 6170 5f66 7265 653c 2f61 3e28 3c61 soap_free(soap);< │ │ │ │ -001a8aa0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -001a8ac0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ -001a8ae0: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .How to cr │ │ │ │ -001a8b20: 6561 7465 2044 4c4c 733c 2f68 323e 0a3c eate DLLs

    .< │ │ │ │ -001a8b30: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -001a8b50: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -001a8b60: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .Cre │ │ │ │ -001a8b90: 6174 696e 6720 7468 6520 6261 7365 2073 ating the base s │ │ │ │ -001a8ba0: 7464 736f 6170 322e 646c 6c3c 2f68 333e tdsoap2.dll

    │ │ │ │ -001a8bb0: 0a3c 703e 5468 6520 656e 6769 6e65 2064 .

    The engine d │ │ │ │ -001a8bc0: 6f65 7320 6e6f 7420 6465 6669 6e65 2053 oes not define S │ │ │ │ -001a8bd0: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F │ │ │ │ -001a8be0: 6175 6c74 2073 6572 6961 6c69 7a65 7273 ault serializers │ │ │ │ -001a8bf0: 2074 6861 7420 7468 6520 656e 6769 6e65 that the engine │ │ │ │ -001a8c00: 206e 6565 6473 2077 6865 6e20 696e 7374 needs when inst │ │ │ │ -001a8c10: 616c 6c65 6420 6173 2061 206c 6962 7261 alled as a libra │ │ │ │ -001a8c20: 7279 2e20 5765 2074 6865 7265 666f 7265 ry. We therefore │ │ │ │ -001a8c30: 2061 6464 2053 4f41 5020 4865 6164 6572 add SOAP Header │ │ │ │ -001a8c40: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria │ │ │ │ -001a8c50: 6c69 7a65 7273 2c20 7768 6963 6820 6172 lizers, which ar │ │ │ │ -001a8c60: 6520 636f 6d70 696c 6564 2073 6570 6172 e compiled separ │ │ │ │ -001a8c70: 6174 656c 7920 6173 2066 6f6c 6c6f 7773 ately as follows │ │ │ │ -001a8c80: 2e20 4669 7273 742c 2063 7265 6174 6520 . First, create │ │ │ │ -001a8c90: 6120 6e65 7720 6865 6164 6572 2066 696c a new header fil │ │ │ │ -001a8ca0: 6520 3c65 6d3e 3c63 6f64 653e 656e 762e e env. │ │ │ │ -001a8cb0: 683c 2f63 6f64 653e 3c2f 656d 3e20 7769 h wi │ │ │ │ -001a8cc0: 7468 2074 6865 2053 4f41 5020 4865 6164 th the SOAP Head │ │ │ │ -001a8cd0: 6572 203c 636f 6465 3e3c 6120 636c 6173 er SOAP_ENV__He │ │ │ │ -001a8d40: 6164 6572 3c2f 613e 3c2f 636f 6465 3e20 ader │ │ │ │ -001a8d50: 616e 6420 534f 4150 2046 6175 6c74 203c and SOAP Fault < │ │ │ │ -001a8d60: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SO │ │ │ │ -001a8dc0: 4150 5f45 4e56 5f5f 4661 756c 743c 2f61 AP_ENV__Fault structu │ │ │ │ -001a8de0: 7265 732c 2069 6e63 6c75 6469 6e67 203c res, including < │ │ │ │ -001a8df0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>SOAP_ENV__ │ │ │ │ -001a8e60: 4465 7461 696c 3c2f 613e 3c2f 636f 6465 Detail if this struct │ │ │ │ -001a8e80: 7572 6520 636f 6e74 6169 6e73 206d 656d ure contains mem │ │ │ │ -001a8e90: 6265 7273 2074 6861 7420 6172 6520 7365 bers that are se │ │ │ │ -001a8ea0: 7269 616c 697a 6564 2061 7320 6661 756c rialized as faul │ │ │ │ -001a8eb0: 7420 6465 7461 696c 732e 2059 6f75 2063 t details. You c │ │ │ │ -001a8ec0: 616e 206c 6561 7665 2074 6869 7320 6865 an leave this he │ │ │ │ -001a8ed0: 6164 6572 2066 696c 6520 656d 7074 7920 ader file empty │ │ │ │ -001a8ee0: 6966 2079 6f75 2077 616e 7420 746f 2075 if you want to u │ │ │ │ -001a8ef0: 7365 2074 6865 2064 6566 6175 6c74 2053 se the default S │ │ │ │ -001a8f00: 4f41 5020 4865 6164 6572 2061 6e64 2046 OAP Header and F │ │ │ │ -001a8f10: 6175 6c74 2e20 486f 7765 7665 722c 2069 ault. However, i │ │ │ │ -001a8f20: 6620 534f 4150 2048 6561 6465 7273 2061 f SOAP Headers a │ │ │ │ -001a8f30: 7265 2072 6571 7569 7265 6420 7468 656e re required then │ │ │ │ -001a8f40: 2079 6f75 2063 616e 6e6f 7420 6c65 6176 you cannot leav │ │ │ │ -001a8f50: 6520 7468 6520 3c63 6f64 653e 3c61 2063 e the SOAP_ENV_ │ │ │ │ -001a8fc0: 5f48 6561 6465 723c 2f61 3e3c 2f63 6f64 _Header structure emp │ │ │ │ -001a8fe0: 7479 2e20 466f 7220 6578 616d 706c 652c ty. For example, │ │ │ │ -001a8ff0: 2074 6865 2057 532d 4164 6472 6573 7369 the WS-Addressi │ │ │ │ -001a9000: 6e67 2061 6e64 2057 532d 5365 6375 7269 ng and WS-Securi │ │ │ │ -001a9010: 7479 2070 6c75 6769 6e73 2072 6571 7569 ty plugins requi │ │ │ │ -001a9020: 7265 2053 4f41 5020 4865 6164 6572 7320 re SOAP Headers │ │ │ │ -001a9030: 7768 6963 6820 6361 6e20 6265 2069 6d70 which can be imp │ │ │ │ -001a9040: 6f72 7465 6420 6279 2061 6464 696e 6720 orted by adding │ │ │ │ -001a9050: 3c63 6f64 653e 2369 6d70 6f72 7420 2277 #import "w │ │ │ │ -001a9060: 7361 352e 6822 3c2f 636f 6465 3e20 616e sa5.h" an │ │ │ │ -001a9070: 6420 3c63 6f64 653e 2369 6d70 6f72 7420 d #import │ │ │ │ -001a9080: 2277 7373 652e 6822 3c2f 636f 6465 3e2c "wsse.h", │ │ │ │ -001a9090: 2072 6573 7065 6374 6976 656c 7920 746f respectively to │ │ │ │ -001a90a0: 203c 656d 3e3c 636f 6465 3e65 6e76 2e68 env.h │ │ │ │ -001a90b0: 3c2f 636f 6465 3e3c 2f65 6d3e 2e20 5468 . Th │ │ │ │ -001a90c0: 656e 2063 6f6d 7069 6c65 2074 6869 7320 en compile this │ │ │ │ -001a90d0: 6865 6164 6572 2066 696c 6520 7769 7468 header file with │ │ │ │ -001a90e0: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

     soa
    │ │ │ │ -001a9100: 7063 7070 3220 2d70 656e 7620 656e 762e  pcpp2 -penv env.
    │ │ │ │ -001a9110: 680a 3c2f 7072 653e 3c70 3e20 5468 6520  h.

    The │ │ │ │ -001a9120: 6765 6e65 7261 7465 6420 3c65 6d3e 3c63 generated envC.cpp file ho │ │ │ │ -001a9150: 6c64 7320 7468 6520 534f 4150 2048 6561 lds the SOAP Hea │ │ │ │ -001a9160: 6465 7220 616e 6420 4661 756c 7420 7365 der and Fault se │ │ │ │ -001a9170: 7269 616c 697a 6572 732e 2057 6520 6361 rializers. We ca │ │ │ │ -001a9180: 6e20 6569 7468 6572 2063 7265 6174 6520 n either create │ │ │ │ -001a9190: 6120 7365 7061 7261 7465 203c 656d 3e3c a separate < │ │ │ │ -001a91a0: 636f 6465 3e65 6e76 432e 646c 6c3c 2f63 code>envC.dll DLL fo │ │ │ │ -001a91c0: 7220 7468 6973 2074 6861 7420 616c 6c20 r this that all │ │ │ │ -001a91d0: 636c 6965 6e74 7320 616e 6420 7365 7276 clients and serv │ │ │ │ -001a91e0: 6963 6520 6170 706c 6963 6174 696f 6e73 ice applications │ │ │ │ -001a91f0: 2077 696c 6c20 7573 652c 206f 7220 636f will use, or co │ │ │ │ -001a9200: 6d62 696e 6520 3c65 6d3e 3c63 6f64 653e mbine │ │ │ │ -001a9210: 656e 7643 2e63 7070 3c2f 636f 6465 3e3c envC.cpp< │ │ │ │ -001a9220: 2f65 6d3e 2077 6974 6820 7468 6520 3c65 /em> with the stdsoap2 │ │ │ │ -001a9240: 2e64 6c6c 3c2f 636f 6465 3e3c 2f65 6d3e .dll │ │ │ │ -001a9250: 2077 6520 6372 6561 7465 2c20 7768 6963 we create, whic │ │ │ │ -001a9260: 6820 7765 2077 696c 6c20 6578 706c 6169 h we will explai │ │ │ │ -001a9270: 6e20 6675 7274 6865 722e 3c2f 703e 0a3c n further.

    .< │ │ │ │ -001a9280: 703e 5468 6520 6e65 7874 2073 7465 7020 p>The next step │ │ │ │ -001a9290: 6973 2074 6f20 6372 6561 7465 203c 656d is to create stdsoap2. │ │ │ │ -001a92b0: 646c 6c3c 2f63 6f64 653e 3c2f 656d 3e20 dll │ │ │ │ -001a92c0: 7768 6963 6820 636f 6e73 6973 7473 206f which consists o │ │ │ │ -001a92d0: 6620 7468 6520 6669 6c65 203c 656d 3e3c f the file < │ │ │ │ -001a92e0: 636f 6465 3e67 736f 6170 2f73 7464 736f code>gsoap/stdso │ │ │ │ -001a92f0: 6170 322e 6370 703c 2f63 6f64 653e 3c2f ap2.cpp and envC.cpp and optio │ │ │ │ -001a9330: 6e61 6c6c 7920 7468 6520 706c 7567 696e nally the plugin │ │ │ │ -001a9340: 7320 796f 7520 7761 6e74 2074 6f20 7573 s you want to us │ │ │ │ -001a9350: 6520 7375 6368 2061 7320 3c65 6d3e 3c63 e such as wsseapi.cpp< │ │ │ │ -001a9370: 2f63 6f64 653e 3c2f 656d 3e20 2877 6520 /code> (we │ │ │ │ -001a9380: 6e65 6564 2074 6f20 7265 6e61 6d65 2061 need to rename a │ │ │ │ -001a9390: 6c6c 203c 656d 3e3c 636f 6465 3e2e 633c ll .c< │ │ │ │ -001a93a0: 2f63 6f64 653e 3c2f 656d 3e20 6669 6c65 /code> file │ │ │ │ -001a93b0: 7320 746f 203c 656d 3e3c 636f 6465 3e2e s to . │ │ │ │ -001a93c0: 6370 703c 2f63 6f64 653e 3c2f 656d 3e20 cpp │ │ │ │ -001a93d0: 6669 6c65 7320 746f 2061 766f 6964 2069 files to avoid i │ │ │ │ -001a93e0: 7373 7565 7320 7769 7468 204d 5356 432b ssues with MSVC+ │ │ │ │ -001a93f0: 2b29 2e20 5468 6973 2044 4c4c 2063 6f6e +). This DLL con │ │ │ │ -001a9400: 7461 696e 7320 616c 6c20 636f 6d6d 6f6e tains all common │ │ │ │ -001a9410: 2066 756e 6374 696f 6e73 206e 6565 6465 functions neede │ │ │ │ -001a9420: 6420 666f 7220 616c 6c20 6f74 6865 7220 d for all other │ │ │ │ -001a9430: 636c 6965 6e74 7320 616e 6420 7365 7276 clients and serv │ │ │ │ -001a9440: 6572 7320 6261 7365 6420 6f6e 2067 534f ers based on gSO │ │ │ │ -001a9450: 4150 2e20 436f 6d70 696c 6520 3c65 6d3e AP. Compile │ │ │ │ -001a9460: 3c63 6f64 653e 656e 7643 2e63 7070 3c2f envC.cpp and < │ │ │ │ -001a9480: 656d 3e3c 636f 6465 3e67 736f 6170 2f73 em>gsoap/s │ │ │ │ -001a9490: 7464 736f 6170 322e 6370 703c 2f63 6f64 tdsoap2.cpp into stdsoap2. │ │ │ │ -001a94c0: 646c 6c3c 2f63 6f64 653e 3c2f 656d 3e20 dll │ │ │ │ -001a94d0: 7573 696e 6720 7468 6520 636f 6d70 696c using the compil │ │ │ │ -001a94e0: 6572 206f 7074 696f 6e20 3c63 6f64 653e er option │ │ │ │ -001a94f0: 2f44 3c2f 636f 6465 3e20 3c63 6f64 653e /D │ │ │ │ -001a9500: 2357 4954 485f 4e4f 4e41 4d45 5350 4143 #WITH_NONAMESPAC │ │ │ │ -001a9510: 4553 3c2f 636f 6465 3e20 616e 6420 7468 ES and th │ │ │ │ -001a9520: 6520 4d53 5643 2050 7265 2d50 726f 6365 e MSVC Pre-Proce │ │ │ │ -001a9530: 7373 6f72 2064 6566 696e 6974 696f 6e73 ssor definitions │ │ │ │ -001a9540: 203c 636f 6465 3e53 4f41 505f 464d 4143 SOAP_FMAC │ │ │ │ -001a9550: 313d 5f5f 6465 636c 7370 6563 2864 6c6c 1=__declspec(dll │ │ │ │ -001a9560: 6578 706f 7274 293c 2f63 6f64 653e 2c20 export), │ │ │ │ -001a9570: 3c63 6f64 653e 534f 4150 5f46 4d41 4333 SOAP_FMAC3 │ │ │ │ -001a9580: 3d5f 5f64 6563 6c73 7065 6328 646c 6c65 =__declspec(dlle │ │ │ │ -001a9590: 7870 6f72 7429 3c2f 636f 6465 3e2c 2061 xport), a │ │ │ │ -001a95a0: 6e64 2074 6865 203c 636f 6465 3e23 534f nd the #SO │ │ │ │ -001a95b0: 4150 5f53 5444 5f45 5850 4f52 5453 3c2f AP_STD_EXPORTS macro set │ │ │ │ -001a95d0: 6173 2073 686f 776e 2062 656c 6f77 2066 as shown below f │ │ │ │ -001a95e0: 726f 6d20 7468 6520 4d53 5643 2063 6f6d rom the MSVC com │ │ │ │ -001a95f0: 6d61 6e64 2070 726f 6d70 743a 203c 2f70 mand prompt:

    C:> cl
    │ │ │ │ -001a9620: 202f 6320 2f49 2e20 2f45 4873 6320 2f44   /c /I. /EHsc /D
    │ │ │ │ -001a9630: 5749 5448 5f4e 4f4e 414d 4553 5041 4345  WITH_NONAMESPACE
    │ │ │ │ -001a9640: 5320 2f44 534f 4150 5f46 4d41 4331 3d5f  S /DSOAP_FMAC1=_
    │ │ │ │ -001a9650: 5f64 6563 6c73 7065 6328 646c 6c65 7870  _declspec(dllexp
    │ │ │ │ -001a9660: 6f72 7429 202f 4453 4f41 505f 464d 4143  ort) /DSOAP_FMAC
    │ │ │ │ -001a9670: 333d 5f5f 6465 636c 7370 6563 2864 6c6c  3=__declspec(dll
    │ │ │ │ -001a9680: 6578 706f 7274 2920 2f44 534f 4150 5f53  export) /DSOAP_S
    │ │ │ │ -001a9690: 5444 5f45 5850 4f52 5453 2065 6e76 432e  TD_EXPORTS envC.
    │ │ │ │ -001a96a0: 6370 7020 7374 6473 6f61 7032 2e63 7070  cpp stdsoap2.cpp
    │ │ │ │ -001a96b0: 0a43 3a26 6774 3b20 6c69 6e6b 202f 4c49  .C:> link /LI
    │ │ │ │ -001a96c0: 4250 4154 4820 7773 325f 3332 2e6c 6962  BPATH ws2_32.lib
    │ │ │ │ -001a96d0: 202f 4f55 543a 6d79 6773 6f61 702e 646c   /OUT:mygsoap.dl
    │ │ │ │ -001a96e0: 6c20 2f44 4c4c 2065 6e76 432e 6f62 6a20  l /DLL envC.obj 
    │ │ │ │ -001a96f0: 7374 6473 6f61 7032 2e6f 626a 0a3c 2f70  stdsoap2.obj.

    Note: as │ │ │ │ -001a9710: 6f66 2067 534f 4150 2032 2e38 2e33 3020 of gSOAP 2.8.30 │ │ │ │ -001a9720: 616e 6420 6c61 7465 722c 2074 6865 2044 and later, the D │ │ │ │ -001a9730: 4c4c 2065 7870 6f72 7420 6d61 6372 6f73 LL export macros │ │ │ │ -001a9740: 2073 686f 776e 2068 6572 6520 6172 6520 shown here are │ │ │ │ -001a9750: 616c 6c20 7365 7420 7769 7468 206f 6e65 all set with one │ │ │ │ -001a9760: 2070 7265 2d70 726f 6365 7373 6f72 2064 pre-processor d │ │ │ │ -001a9770: 6566 696e 6974 696f 6e20 3c63 6f64 653e efinition │ │ │ │ -001a9780: 2353 4f41 505f 5354 445f 4558 504f 5254 #SOAP_STD_EXPORT │ │ │ │ -001a9790: 533c 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 S.

    .

    Alternatively, │ │ │ │ -001a97b0: 796f 7520 6361 6e20 636f 6d70 696c 6520 you can compile │ │ │ │ -001a97c0: 7769 7468 203c 636f 6465 3e2f 443c 2f63 with /D #WITH │ │ │ │ -001a97e0: 5f53 4f41 5044 4546 535f 483c 2f63 6f64 _SOAPDEFS_H and put the m │ │ │ │ -001a9800: 6163 726f 2064 6566 696e 6974 696f 6e73 acro definitions │ │ │ │ -001a9810: 2069 6e20 3c65 6d3e 3c63 6f64 653e 736f in so │ │ │ │ -001a9820: 6170 6465 6673 2e68 3c2f 636f 6465 3e3c apdefs.h< │ │ │ │ -001a9830: 2f65 6d3e 2e20 5468 6973 2065 7870 6f72 /em>. This expor │ │ │ │ -001a9840: 7473 2061 6c6c 2066 756e 6374 696f 6e73 ts all functions │ │ │ │ -001a9850: 2077 6869 6368 2061 7265 2070 7265 6365 which are prece │ │ │ │ -001a9860: 6465 6420 6279 2074 6865 206d 6163 726f ded by the macro │ │ │ │ -001a9870: 203c 636f 6465 3e23 534f 4150 5f46 4d41 #SOAP_FMA │ │ │ │ -001a9880: 4331 3c2f 636f 6465 3e20 696e 2074 6865 C1 in the │ │ │ │ -001a9890: 203c 656d 3e3c 636f 6465 3e73 6f61 7063 soapc │ │ │ │ -001a98a0: 7070 322e 6370 703c 2f63 6f64 653e 3c2f pp2.cpp source file │ │ │ │ -001a98c0: 616e 6420 6d61 6372 6f20 3c63 6f64 653e and macro │ │ │ │ -001a98d0: 2353 4f41 505f 464d 4143 333c 2f63 6f64 #SOAP_FMAC3 in the envC.cpp source │ │ │ │ -001a9910: 6669 6c65 2e3c 2f70 3e0a 3c70 3e46 696e file.

    .

    Fin │ │ │ │ -001a9920: 616c 6c79 2c20 6e6f 7465 2074 6861 7420 ally, note that │ │ │ │ -001a9930: 7468 6520 6753 4f41 5020 736f 7572 6365 the gSOAP source │ │ │ │ -001a9940: 2063 6f64 6520 7061 636b 6167 6520 636f code package co │ │ │ │ -001a9950: 6e74 6169 6e73 2061 206c 6f74 206f 6620 ntains a lot of │ │ │ │ -001a9960: 3c65 6d3e 3c63 6f64 653e 2e63 3c2f 636f .c source │ │ │ │ -001a9980: 636f 6465 2066 696c 6573 2e20 4d69 7869 code files. Mixi │ │ │ │ -001a9990: 6e67 2043 2077 6974 6820 432b 2b20 6669 ng C with C++ fi │ │ │ │ -001a99a0: 6c65 7320 6973 206e 6f74 2072 6563 6f6d les is not recom │ │ │ │ -001a99b0: 6d65 6e64 6564 2077 6974 6820 5669 7375 mended with Visu │ │ │ │ -001a99c0: 616c 2053 7475 6469 6f20 616e 6420 7769 al Studio and wi │ │ │ │ -001a99d0: 6c6c 206c 6561 6420 746f 2072 756e 2d74 ll lead to run-t │ │ │ │ -001a99e0: 696d 6520 6572 726f 7273 2077 6865 6e20 ime errors when │ │ │ │ -001a99f0: 6275 696c 6469 6e67 2044 4c4c 732e 2054 building DLLs. T │ │ │ │ -001a9a00: 6865 7265 666f 7265 2c20 616c 7761 7973 herefore, always │ │ │ │ -001a9a10: 2072 656e 616d 6520 3c65 6d3e 3c63 6f64 rename .c │ │ │ │ -001a9a30: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil │ │ │ │ -001a9a40: 6573 2074 6f20 3c65 6d3e 3c63 6f64 653e es to │ │ │ │ -001a9a50: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp │ │ │ │ -001a9a60: 2073 6f75 7263 6520 636f 6465 2066 696c source code fil │ │ │ │ -001a9a70: 6573 2077 6865 6e20 6372 6561 7469 6e67 es when creating │ │ │ │ -001a9a80: 2044 4c4c 732e 3c2f 703e 0a3c 703e f09f DLLs.

    .

    .. │ │ │ │ -001a9a90: 949d 203c 6120 6872 6566 3d22 2322 3e42 .. B │ │ │ │ -001a9aa0: 6163 6b20 746f 2074 6162 6c65 206f 6620 ack to table of │ │ │ │ -001a9ab0: 636f 6e74 656e 7473 3c2f 613e 3c2f 703e contents

    │ │ │ │ -001a9ac0: 0a3c 6833 3e3c 6120 636c 6173 733d 2261 .

    │ │ │ │ -001a9af0: 0a43 7265 6174 696e 6720 636c 6965 6e74 .Creating client │ │ │ │ -001a9b00: 2061 6e64 2073 6572 7665 7220 444c 4c73 and server DLLs │ │ │ │ -001a9b10: 3c2f 6833 3e0a 3c70 3e43 6f6d 7069 6c65

    .

    Compile │ │ │ │ -001a9b20: 2074 6865 203c 656d 3e3c 636f 6465 3e73 the s │ │ │ │ -001a9b30: 6f61 7043 6c69 656e 744c 6962 2e63 7070 oapClientLib.cpp │ │ │ │ -001a9b40: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and │ │ │ │ -001a9b50: 203c 656d 3e3c 636f 6465 3e73 6f61 7053 soapS │ │ │ │ -001a9b60: 6572 7665 724c 6962 2e63 7070 3c2f 636f erverLib.cpp sources │ │ │ │ -001a9b80: 2061 7320 444c 4c73 2062 7920 7573 696e as DLLs by usin │ │ │ │ -001a9b90: 6720 7468 6520 4d53 5643 2050 7265 2d50 g the MSVC Pre-P │ │ │ │ -001a9ba0: 726f 6365 7373 6f72 2064 6566 696e 6974 rocessor definit │ │ │ │ -001a9bb0: 696f 6e73 203c 636f 6465 3e53 4f41 505f ions SOAP_ │ │ │ │ -001a9bc0: 464d 4143 353d 5f5f 6465 636c 7370 6563 FMAC5=__declspec │ │ │ │ -001a9bd0: 2864 6c6c 6578 706f 7274 293c 2f63 6f64 (dllexport) and SOA │ │ │ │ -001a9bf0: 505f 434d 4143 3d5f 5f64 6563 6c73 7065 P_CMAC=__declspe │ │ │ │ -001a9c00: 6328 646c 6c65 7870 6f72 7429 3c2f 636f c(dllexport), and by usin │ │ │ │ -001a9c20: 6720 7468 6520 432b 2b20 636f 6d70 696c g the C++ compil │ │ │ │ -001a9c30: 6572 206f 7074 696f 6e20 3c63 6f64 653e er option │ │ │ │ -001a9c40: 2f44 3c2f 636f 6465 3e20 3c63 6f64 653e /D │ │ │ │ -001a9c50: 2357 4954 485f 4e4f 4e41 4d45 5350 4143 #WITH_NONAMESPAC │ │ │ │ -001a9c60: 4553 3c2f 636f 6465 3e2e 2041 6c6c 206f ES. All o │ │ │ │ -001a9c70: 6620 7468 6573 6520 6d61 6372 6f73 2061 f these macros a │ │ │ │ -001a9c80: 7265 2073 6574 2061 7320 6120 7368 6f72 re set as a shor │ │ │ │ -001a9c90: 7468 616e 6420 7769 7468 206f 6e65 2070 thand with one p │ │ │ │ -001a9ca0: 7265 2d70 726f 6365 7373 6f72 2064 6566 re-processor def │ │ │ │ -001a9cb0: 696e 6974 696f 6e20 3c63 6f64 653e 2353 inition #S │ │ │ │ -001a9cc0: 4f41 505f 5354 445f 4558 504f 5254 533c OAP_STD_EXPORTS< │ │ │ │ -001a9cd0: 2f63 6f64 653e 2028 7265 7175 6972 6573 /code> (requires │ │ │ │ -001a9ce0: 2067 534f 4150 2032 2e38 2e33 3020 6f72 gSOAP 2.8.30 or │ │ │ │ -001a9cf0: 206c 6174 6572 292e 3c2f 703e 0a3c 703e later).

    .

    │ │ │ │ -001a9d00: 5468 6973 2044 4c4c 206c 696e 6b73 2074 This DLL links t │ │ │ │ -001a9d10: 6f20 3c65 6d3e 3c63 6f64 653e 7374 6473 o stds │ │ │ │ -001a9d20: 6f61 7032 2e64 6c6c 3c2f 636f 6465 3e3c oap2.dll< │ │ │ │ -001a9d30: 2f65 6d3e 2077 6520 6372 6561 7465 6420 /em> we created │ │ │ │ -001a9d40: 696e 2053 6563 7469 6f6e 203c 6120 636c in Section Creating the │ │ │ │ -001a9d80: 6261 7365 2073 7464 736f 6170 322e 646c base stdsoap2.dl │ │ │ │ -001a9d90: 6c3c 2f61 3e2e 3c2f 703e 0a3c 703e 546f l.

    .

    To │ │ │ │ -001a9da0: 2063 7265 6174 6520 6d75 6c74 6970 6c65 create multiple │ │ │ │ -001a9db0: 2044 4c4c 7320 696e 2074 6865 2073 616d DLLs in the sam │ │ │ │ -001a9dc0: 6520 7072 6f6a 6563 7420 6469 7265 6374 e project direct │ │ │ │ -001a9dd0: 6f72 792c 2079 6f75 2073 686f 756c 6420 ory, you should │ │ │ │ -001a9de0: 7573 6520 3c62 3e3c 636f 6465 3e73 6f61 use soa │ │ │ │ -001a9df0: 7063 7070 3220 2d70 206e 616d 653c 2f63 pcpp2 -p name option │ │ │ │ -001a9e10: 3c62 3e3c 636f 6465 3e2d 7020 6e61 6d65 -p name │ │ │ │ -001a9e20: 3c2f 636f 6465 3e3c 2f62 3e20 746f 2072 to r │ │ │ │ -001a9e30: 656e 616d 6520 7468 6520 6765 6e65 7261 ename the genera │ │ │ │ -001a9e40: 7465 6420 3c65 6d3e 3c63 6f64 653e 736f ted so │ │ │ │ -001a9e50: 6170 436c 6965 6e74 4c69 622e 6370 703c apClientLib.cpp< │ │ │ │ -001a9e60: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ -001a9e70: 3c65 6d3e 3c63 6f64 653e 736f 6170 5365 soapSe │ │ │ │ -001a9e80: 7276 6572 4c69 622e 6370 703c 2f63 6f64 rverLib.cpp (and ass │ │ │ │ -001a9ea0: 6f63 6961 7465 6429 2066 696c 6573 2e20 ociated) files. │ │ │ │ -001a9eb0: 5468 6520 3c62 3e3c 636f 6465 3e2d 7020 The -p │ │ │ │ -001a9ec0: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name │ │ │ │ -001a9ed0: 6f70 7469 6f6e 2073 7065 6369 6669 6573 option specifies │ │ │ │ -001a9ee0: 2061 203c 656d 3e3c 636f 6465 3e6e 616d a nam │ │ │ │ -001a9ef0: 653c 2f63 6f64 653e 3c2f 656d 3e20 7072 e pr │ │ │ │ -001a9f00: 6566 6978 2074 6f20 7265 706c 6163 6520 efix to replace │ │ │ │ -001a9f10: 7468 6520 3c65 6d3e 3c63 6f64 653e 736f the so │ │ │ │ -001a9f20: 6170 3c2f 636f 6465 3e3c 2f65 6d3e 2066 ap f │ │ │ │ -001a9f30: 696c 6520 6e61 6d65 2070 7265 6669 782e ile name prefix. │ │ │ │ -001a9f40: 2041 6e6f 7468 6572 2077 6179 2069 7320 Another way is │ │ │ │ -001a9f50: 746f 2075 7365 2043 2b2b 206e 616d 6573 to use C++ names │ │ │ │ -001a9f60: 7061 6365 7320 7769 7468 203c 623e 3c63 paces with soapcpp2 -q │ │ │ │ -001a9f80: 6e61 6d65 3c2f 636f 6465 3e3c 2f62 3e20 name │ │ │ │ -001a9f90: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ -001a9fa0: 2d71 206e 616d 653c 2f63 6f64 653e 3c2f -q name, if the inter │ │ │ │ -001a9fc0: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ -001a9fd0: 2069 6e70 7574 2074 6f20 736f 6170 6370 input to soapcp │ │ │ │ -001a9fe0: 7032 2064 6f65 7320 6e6f 7420 616c 7265 p2 does not alre │ │ │ │ -001a9ff0: 6164 7920 6465 636c 6172 6520 6120 432b ady declare a C+ │ │ │ │ -001aa000: 2b20 6e61 6d65 7370 6163 652e 2041 2063 + namespace. A c │ │ │ │ -001aa010: 6c65 616e 2073 6570 6172 6174 696f 6e20 lean separation │ │ │ │ -001aa020: 6f66 206c 6962 7261 7269 6573 2063 616e of libraries can │ │ │ │ -001aa030: 2061 6c73 6f20 6265 2061 6368 6965 7665 also be achieve │ │ │ │ -001aa040: 6420 7769 7468 2043 2b2b 206e 616d 6573 d with C++ names │ │ │ │ -001aa050: 7061 6365 732c 2073 6565 2053 6563 7469 paces, see Secti │ │ │ │ -001aa060: 6f6e 203c 6120 636c 6173 733d 2265 6c22 on How to build a │ │ │ │ -001aa0a0: 636c 6965 6e74 206f 7220 7365 7276 6572 client or server │ │ │ │ -001aa0b0: 2069 6e20 6120 432b 2b20 636f 6465 206e in a C++ code n │ │ │ │ -001aa0c0: 616d 6573 7061 6365 3c2f 613e 202e 3c2f amespace ..

    Unless you │ │ │ │ -001aa0e0: 2075 7365 2074 6865 2063 6c69 656e 7420 use the client │ │ │ │ -001aa0f0: 7072 6f78 7920 616e 6420 7365 7276 6572 proxy and server │ │ │ │ -001aa100: 206f 626a 6563 7420 636c 6173 7365 7320 object classes │ │ │ │ -001aa110: 283c 656d 3e3c 636f 6465 3e73 6f61 7058 (soapX │ │ │ │ -001aa120: 595a 5072 6f78 792e 683c 2f63 6f64 653e YZProxy.h │ │ │ │ -001aa130: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and soapXYZServi │ │ │ │ -001aa150: 6365 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ce.h │ │ │ │ -001aa160: 292c 2061 6c6c 2063 6c69 656e 7420 616e ), all client an │ │ │ │ -001aa170: 6420 7365 7276 6572 2061 7070 6c69 6361 d server applica │ │ │ │ -001aa180: 7469 6f6e 7320 6d75 7374 2065 7870 6c69 tions must expli │ │ │ │ -001aa190: 6369 746c 7920 7365 7420 7468 6520 6e61 citly set the na │ │ │ │ -001aa1a0: 6d65 7370 6163 6573 2076 616c 7565 206f mespaces value o │ │ │ │ -001aa1b0: 6620 7468 6520 3c63 6f64 653e 3c61 2063 f the soap │ │ │ │ -001aa210: 3c2f 636f 6465 3e20 636f 6e74 6578 7420 context │ │ │ │ -001aa220: 7769 7468 3a3c 2f70 3e0a 3c64 6976 2063 with:

    .
    │ │ │ │ -001aa240: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_se │ │ │ │ -001aa2b0: 745f 6e61 6d65 7370 6163 6573 3c2f 613e t_namespaces │ │ │ │ -001aa2c0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001aa2f0: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , namespa │ │ │ │ -001aa350: 6365 733c 2f61 3e29 3b3c 2f64 6976 3e0a ces);
    . │ │ │ │ -001aa360: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    where │ │ │ │ -001aa380: 7468 6520 3c63 6f64 653e 6e61 6d65 7370 the namesp │ │ │ │ -001aa390: 6163 6573 5b5d 3c2f 636f 6465 3e20 7461 aces[] ta │ │ │ │ -001aa3a0: 626c 6520 7368 6f75 6c64 2062 6520 6465 ble should be de │ │ │ │ -001aa3b0: 6669 6e65 6420 696e 2074 6865 2063 6c69 fined in the cli │ │ │ │ -001aa3c0: 656e 742f 7365 7276 6572 2073 6f75 7263 ent/server sourc │ │ │ │ -001aa3d0: 652e 2054 6865 7365 2074 6162 6c65 7320 e. These tables │ │ │ │ -001aa3e0: 6172 6520 6765 6e65 7261 7465 6420 696e are generated in │ │ │ │ -001aa3f0: 2074 6865 203c 656d 3e3c 636f 6465 3e2e the . │ │ │ │ -001aa400: 6e73 6d61 703c 2f63 6f64 653e 3c2f 656d nsmap files. The tab │ │ │ │ -001aa420: 6c65 7320 6172 6520 7265 6e61 6d65 6420 les are renamed │ │ │ │ -001aa430: 666f 7220 636f 6e76 656e 6965 6e63 6520 for convenience │ │ │ │ -001aa440: 7573 696e 6720 3c62 3e3c 636f 6465 3e73 using s │ │ │ │ -001aa450: 6f61 7063 7070 3220 2d6e 3c2f 636f 6465 oapcpp2 -n option │ │ │ │ -001aa470: 3c63 6f64 653e 2d6e 3c2f 636f 6465 3e3c -n< │ │ │ │ -001aa480: 2f62 3e2c 2073 6565 2053 6563 7469 6f6e /b>, see Section │ │ │ │ -001aa490: 203c 6120 636c 6173 733d 2265 6c22 2068 soapcpp2 option │ │ │ │ -001aa4d0: 733c 2f61 3e20 2e3c 2f70 3e0a 3c70 3ef0 s .

    .

    . │ │ │ │ -001aa4e0: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -001aa4f0: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -001aa500: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .How to │ │ │ │ -001aa540: 6275 696c 6420 6d6f 6475 6c65 7320 616e build modules an │ │ │ │ -001aa550: 6420 6c69 6272 6172 6965 7320 7769 7468 d libraries with │ │ │ │ -001aa560: 2074 6865 2023 6d6f 6475 6c65 2064 6972 the #module dir │ │ │ │ -001aa570: 6563 7469 7665 3c2f 6832 3e0a 3c70 3e54 ective

    .

    T │ │ │ │ -001aa580: 6865 203c 636f 6465 3e23 6d6f 6475 6c65 he #module │ │ │ │ -001aa590: 3c2f 636f 6465 3e20 6469 7265 6374 6976 directiv │ │ │ │ -001aa5a0: 6520 6973 2075 7365 6420 746f 2062 7569 e is used to bui │ │ │ │ -001aa5b0: 6c64 206d 6f64 756c 6573 2077 6974 6820 ld modules with │ │ │ │ -001aa5c0: 736f 6170 6370 7032 2e20 4120 6c69 6272 soapcpp2. A libr │ │ │ │ -001aa5d0: 6172 7920 6361 6e20 6265 2062 7569 6c74 ary can be built │ │ │ │ -001aa5e0: 2066 726f 6d20 6120 6d6f 6475 6c65 2061 from a module a │ │ │ │ -001aa5f0: 6e64 206c 696e 6b65 6420 7769 7468 206d nd linked with m │ │ │ │ -001aa600: 756c 7469 706c 6520 5765 6220 7365 7276 ultiple Web serv │ │ │ │ -001aa610: 6963 6573 2061 7070 6c69 6361 7469 6f6e ices application │ │ │ │ -001aa620: 732e 2054 6865 2064 6972 6563 7469 7665 s. The directive │ │ │ │ -001aa630: 2073 686f 756c 6420 6170 7065 6172 2061 should appear a │ │ │ │ -001aa640: 7420 7468 6520 746f 7020 6f66 2074 6865 t the top of the │ │ │ │ -001aa650: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ -001aa660: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc │ │ │ │ -001aa670: 7070 3220 616e 6420 6861 7320 7468 6520 pp2 and has the │ │ │ │ -001aa680: 666f 6c6c 6f77 696e 6720 666f 726d 6174 following format │ │ │ │ -001aa690: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    < │ │ │ │ -001aa6c0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ -001aa6d0: 726f 6365 7373 6f72 223e 236d 6f64 756c rocessor">#modul │ │ │ │ -001aa6e0: 6520 2671 756f 743b 6e61 6d65 2671 756f e "name&quo │ │ │ │ -001aa6f0: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    │ │ │ │ -001aa700: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    and.

    #module &q │ │ │ │ -001aa770: 756f 743b 6e61 6d65 2671 756f 743b 3c2f uot;name" "full │ │ │ │ -001aa790: 6e61 6d65 2671 756f 743b 3c2f 6469 763e name"
    │ │ │ │ -001aa7a0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    where │ │ │ │ -001aa7c0: 2074 6865 203c 636f 6465 3e6e 616d 653c the name< │ │ │ │ -001aa7d0: 2f63 6f64 653e 206d 7573 7420 6265 2061 /code> must be a │ │ │ │ -001aa7e0: 2075 6e69 7175 6520 7368 6f72 7420 6e61 unique short na │ │ │ │ -001aa7f0: 6d65 2066 6f72 2074 6865 206d 6f64 756c me for the modul │ │ │ │ -001aa800: 652e 2054 6865 206e 616d 6520 6973 2063 e. The name is c │ │ │ │ -001aa810: 6173 6520 696e 7365 6e73 6974 6976 6520 ase insensitive │ │ │ │ -001aa820: 616e 6420 6d75 7374 206e 6f74 2065 7863 and must not exc │ │ │ │ -001aa830: 6565 6420 3420 6368 6172 6163 7465 7273 eed 4 characters │ │ │ │ -001aa840: 2069 6e20 6c65 6e67 7468 2e20 5468 6520 in length. The │ │ │ │ -001aa850: 3c63 6f64 653e 6675 6c6c 6e61 6d65 3c2f fullname, when pres │ │ │ │ -001aa870: 656e 742c 2072 6570 7265 7365 6e74 7320 ent, represents │ │ │ │ -001aa880: 7468 6520 6675 6c6c 206e 616d 6520 6f66 the full name of │ │ │ │ -001aa890: 2074 6865 206d 6f64 756c 6520 616e 6420 the module and │ │ │ │ -001aa8a0: 6973 2075 7365 6420 746f 2070 7265 6669 is used to prefi │ │ │ │ -001aa8b0: 7820 7468 6520 6675 6e63 7469 6f6e 206e x the function n │ │ │ │ -001aa8c0: 616d 6573 206f 6620 7468 6520 6765 6e65 ames of the gene │ │ │ │ -001aa8d0: 7261 7465 6420 7365 7269 616c 697a 6572 rated serializer │ │ │ │ -001aa8e0: 7320 7265 706c 6163 696e 6720 7468 6520 s replacing the │ │ │ │ -001aa8f0: 7573 7561 6c20 3c63 6f64 653e 736f 6170 usual soap │ │ │ │ -001aa900: 3c2f 636f 6465 3e20 7072 6566 6978 2e20 prefix. │ │ │ │ -001aa910: 4966 2061 6273 656e 742c 2074 6865 2073 If absent, the s │ │ │ │ -001aa920: 686f 7274 206e 616d 6520 6973 2075 7365 hort name is use │ │ │ │ -001aa930: 6420 746f 2070 7265 6669 7820 7468 6520 d to prefix the │ │ │ │ -001aa940: 6675 6e63 7469 6f6e 206e 616d 6573 206f function names o │ │ │ │ -001aa950: 6620 7468 6520 7365 7269 616c 697a 6572 f the serializer │ │ │ │ -001aa960: 732e 3c2f 703e 0a3c 703e 5468 6520 7265 s.

    .

    The re │ │ │ │ -001aa970: 7374 206f 6620 7468 6520 636f 6e74 656e st of the conten │ │ │ │ -001aa980: 7420 6f66 2074 6865 2069 6e74 6572 6661 t of the interfa │ │ │ │ -001aa990: 6365 2068 6561 6465 7220 6669 6c65 2069 ce header file i │ │ │ │ -001aa9a0: 6e63 6c75 6465 7320 7479 7065 2064 6563 ncludes type dec │ │ │ │ -001aa9b0: 6c61 7261 7469 6f6e 7320 616e 6420 6f70 larations and op │ │ │ │ -001aa9c0: 7469 6f6e 616c 6c79 2074 6865 2064 6563 tionally the dec │ │ │ │ -001aa9d0: 6c61 7261 7469 6f6e 7320 6f66 2073 6572 larations of ser │ │ │ │ -001aa9e0: 7669 6365 206f 7065 7261 7469 6f6e 7320 vice operations │ │ │ │ -001aa9f0: 616e 6420 534f 4150 2048 6561 6465 7273 and SOAP Headers │ │ │ │ -001aaa00: 2061 6e64 2046 6175 6c74 7320 7468 6174 and Faults that │ │ │ │ -001aaa10: 2061 7265 2075 6e69 7665 7273 616c 6c79 are universally │ │ │ │ -001aaa20: 2075 7365 6420 6279 2053 4f41 5020 7365 used by SOAP se │ │ │ │ -001aaa30: 7276 6963 6573 2c20 7768 656e 2061 7070 rvices, when app │ │ │ │ -001aaa40: 6c69 6361 626c 652e 2057 6865 6e20 7468 licable. When th │ │ │ │ -001aaa50: 6520 736f 6170 6370 7032 2074 6f6f 6c20 e soapcpp2 tool │ │ │ │ -001aaa60: 7072 6f63 6573 7365 7320 7468 6520 6865 processes the he │ │ │ │ -001aaa70: 6164 6572 2066 696c 6520 6d6f 6475 6c65 ader file module │ │ │ │ -001aaa80: 2c20 6974 2077 696c 6c20 6765 6e65 7261 , it will genera │ │ │ │ -001aaa90: 7465 2074 6865 2073 6f75 7263 6520 636f te the source co │ │ │ │ -001aaaa0: 6465 7320 666f 7220 6120 6c69 6272 6172 des for a librar │ │ │ │ -001aaab0: 792e 2054 6865 2057 6562 2073 6572 7669 y. The Web servi │ │ │ │ -001aaac0: 6365 7320 6170 706c 6963 6174 696f 6e20 ces application │ │ │ │ -001aaad0: 7468 6174 2075 7365 7320 7468 6520 6c69 that uses the li │ │ │ │ -001aaae0: 6272 6172 7920 7368 6f75 6c64 2075 7365 brary should use │ │ │ │ -001aaaf0: 2061 2068 6561 6465 7220 6669 6c65 2074 a header file t │ │ │ │ -001aab00: 6861 7420 696d 706f 7274 7320 7468 6520 hat imports the │ │ │ │ -001aab10: 6d6f 6475 6c65 2077 6974 6820 7468 6520 module with the │ │ │ │ -001aab20: 3c63 6f64 653e 2369 6d70 6f72 743c 2f63 #import directive, │ │ │ │ -001aab40: 666f 7220 6578 616d 706c 653a 3c2f 703e for example:

    │ │ │ │ -001aab50: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    / │ │ │ │ -001aab90: 2a20 436f 6e74 656e 7473 206f 6620 6669 * Contents of fi │ │ │ │ -001aaba0: 6c65 2026 7175 6f74 3b6d 6f64 756c 652e le "module. │ │ │ │ -001aabb0: 6826 7175 6f74 3b20 2a2f 3c2f 7370 616e h" */
    .
    #module &q │ │ │ │ -001aac00: 756f 743b 7465 7374 2671 756f 743b 3c2f uot;test"
    .
    < │ │ │ │ -001aac30: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    // │ │ │ │ -001aac60: 2074 7970 6573 2061 6e64 2074 7970 6564 types and typed │ │ │ │ -001aac70: 6566 7320 6265 636f 6d65 206d 6f64 756c efs become modul │ │ │ │ -001aac80: 652d 7370 6563 6966 6963 3c2f 7370 616e e-specific
    .
    │ │ │ │ -001aacc0: 7479 7065 6465 663c 2f73 7061 6e3e 203c typedef < │ │ │ │ -001aacd0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001aace0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001aacf0: 705f 5f73 6f61 702e 6874 6d6c 2367 6137 p__soap.html#ga7 │ │ │ │ -001aad00: 3862 3336 6335 3633 3665 6235 3238 3364 8b36c5636eb5283d │ │ │ │ -001aad10: 3635 3162 3639 6438 3638 3463 3661 6522 651b69d8684c6ae" │ │ │ │ -001aad20: 3e4c 4f4e 4736 343c 2f61 3e20 7873 645f >LONG64 xsd_ │ │ │ │ -001aad30: 5f6c 6f6e 673b 3c2f 6469 763e 0a3c 6469 _long;
    .< │ │ │ │ -001aad50: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001aad60: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char*;
    . │ │ │ │ -001aad90: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    / │ │ │ │ -001aadc0: 2f20 6120 6d6f 6475 6c65 2d73 7065 6369 / a module-speci │ │ │ │ -001aadd0: 6669 6320 7374 7275 6374 3c2f 7370 616e fic struct
    .
    │ │ │ │ -001aae10: 7374 7275 6374 203c 2f73 7061 6e3e 6e73 struct ns │ │ │ │ -001aae20: 5f5f 5320 3c2f 6469 763e 0a3c 6469 7620 __S
    .
    {.
    ... < │ │ │ │ -001aae60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001aae70: 656e 7422 3e2f 2f20 6d65 6d62 6572 733c ent">// members< │ │ │ │ -001aae80: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .} │ │ │ │ -001aaea0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    < │ │ │ │ -001aaec0: 703e 5468 6520 3c65 6d3e 3c63 6f64 653e p>The │ │ │ │ -001aaed0: 6d6f 6475 6c65 2e68 3c2f 636f 6465 3e3c module.h< │ │ │ │ -001aaee0: 2f65 6d3e 2064 6174 6120 6269 6e64 696e /em> data bindin │ │ │ │ -001aaef0: 6720 696e 7465 7266 6163 6520 6865 6164 g interface head │ │ │ │ -001aaf00: 6572 2066 696c 6520 666f 7220 736f 6170 er file for soap │ │ │ │ -001aaf10: 6370 7032 2064 6563 6c61 7265 7320 6d6f cpp2 declares mo │ │ │ │ -001aaf20: 6475 6c65 2d73 7065 6369 6669 6320 7365 dule-specific se │ │ │ │ -001aaf30: 7269 616c 697a 6162 6c65 2074 7970 6573 rializable types │ │ │ │ -001aaf40: 203c 636f 6465 3e4c 4f4e 4736 343c 2f63 LONG64, xsd_ │ │ │ │ -001aaf60: 5f6c 6f6e 673c 2f63 6f64 653e 2c20 3c63 _long, char* │ │ │ │ -001aaf80: 2c20 616e 6420 6120 3c63 6f64 653e 7374 , and a st │ │ │ │ -001aaf90: 7275 6374 206e 735f 5f53 3c2f 636f 6465 ruct ns__S. The module na │ │ │ │ -001aafb0: 6d65 2069 7320 2274 6573 7422 2c20 736f me is "test", so │ │ │ │ -001aafc0: 2074 6865 2073 6f61 7063 7070 3220 746f the soapcpp2 to │ │ │ │ -001aafd0: 6f6c 2070 726f 6475 6365 7320 6120 3c65 ol produces a testC.cp │ │ │ │ -001aaff0: 703c 2f63 6f64 653e 3c2f 656d 3e20 6669 p fi │ │ │ │ -001ab000: 6c65 2077 6974 6820 7468 6520 584d 4c20 le with the XML │ │ │ │ -001ab010: 7365 7269 616c 697a 6572 7320 666f 7220 serializers for │ │ │ │ -001ab020: 7468 6573 6520 7479 7065 732e 2054 6865 these types. The │ │ │ │ -001ab030: 203c 656d 3e3c 636f 6465 3e74 6573 7443 testC │ │ │ │ -001ab040: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp │ │ │ │ -001ab050: 2064 6174 6120 6269 6e64 696e 6720 696d data binding im │ │ │ │ -001ab060: 706c 656d 656e 7461 7469 6f6e 2073 6f75 plementation sou │ │ │ │ -001ab070: 7263 6520 636f 6465 2063 616e 2062 6520 rce code can be │ │ │ │ -001ab080: 7365 7061 7261 7465 6c79 2063 6f6d 7069 separately compi │ │ │ │ -001ab090: 6c65 6420 616e 6420 6c69 6e6b 6564 2077 led and linked w │ │ │ │ -001ab0a0: 6974 6820 616e 2061 7070 6c69 6361 7469 ith an applicati │ │ │ │ -001ab0b0: 6f6e 2e20 4966 2073 6572 7669 6365 206f on. If service o │ │ │ │ -001ab0c0: 7065 7261 7469 6f6e 7320 6172 6520 6465 perations are de │ │ │ │ -001ab0d0: 636c 6172 6564 2069 6e20 7468 6520 696e clared in the in │ │ │ │ -001ab0e0: 7465 7266 6163 6520 6865 6164 6572 2066 terface header f │ │ │ │ -001ab0f0: 696c 6520 6173 2066 756e 6374 696f 6e20 ile as function │ │ │ │ -001ab100: 7072 6f74 6f74 7970 6573 2c20 7765 2061 prototypes, we a │ │ │ │ -001ab110: 6c73 6f20 6765 7420 3c65 6d3e 3c63 6f64 lso get testClient.cpp │ │ │ │ -001ab130: 3c2f 636f 6465 3e3c 2f65 6d3e 2063 6c69 cli │ │ │ │ -001ab140: 656e 7420 7374 7562 2066 756e 6374 696f ent stub functio │ │ │ │ -001ab150: 6e73 2061 6e64 203c 656d 3e3c 636f 6465 ns and testServer.cpp< │ │ │ │ -001ab170: 2f63 6f64 653e 3c2f 656d 3e20 7365 7276 /code> serv │ │ │ │ -001ab180: 6572 2073 6b65 6c65 746f 6e20 6675 6e63 er skeleton func │ │ │ │ -001ab190: 7469 6f6e 732e 3c2f 703e 0a3c 703e 5468 tions.

    .

    Th │ │ │ │ -001ab1a0: 6572 6520 6172 6520 736f 6d65 206c 696d ere are some lim │ │ │ │ -001ab1b0: 6974 6174 696f 6e73 2066 6f72 206d 6f64 itations for mod │ │ │ │ -001ab1c0: 756c 6520 696d 706f 7274 733a 3c2f 703e ule imports:

    │ │ │ │ -001ab1d0: 0a3c 756c 3e0a 3c6c 693e 4120 6d6f 6475 .
      .
    • A modu │ │ │ │ -001ab1e0: 6c65 206d 7573 7420 6265 2069 6d70 6f72 le must be impor │ │ │ │ -001ab1f0: 7465 6420 696e 746f 2061 6e6f 7468 6572 ted into another │ │ │ │ -001ab200: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ -001ab210: 7220 746f 2075 7365 2074 6865 206d 6f64 r to use the mod │ │ │ │ -001ab220: 756c 6527 7320 7479 7065 2064 6566 696e ule's type defin │ │ │ │ -001ab230: 6974 696f 6e73 2e3c 2f6c 693e 0a3c 6c69 itions.
    • .
    • When multiple m │ │ │ │ -001ab250: 6f64 756c 6573 2061 7265 2069 6d70 6f72 odules are impor │ │ │ │ -001ab260: 7465 642c 2074 6865 2074 7970 6573 2074 ted, the types t │ │ │ │ -001ab270: 6861 7420 7468 6579 2064 6563 6c61 7265 hat they declare │ │ │ │ -001ab280: 206d 7573 7420 6265 2064 6563 6c61 7265 must be declare │ │ │ │ -001ab290: 6420 696e 206f 6e65 206d 6f64 756c 6520 d in one module │ │ │ │ -001ab2a0: 6f6e 6c79 2074 6f20 6176 6f69 6420 6e61 only to avoid na │ │ │ │ -001ab2b0: 6d65 2063 6c61 7368 6573 2061 6e64 206c me clashes and l │ │ │ │ -001ab2c0: 696e 6b20 6572 726f 7273 2e20 596f 7520 ink errors. You │ │ │ │ -001ab2d0: 6361 6e6e 6f74 2063 7265 6174 6520 7477 cannot create tw │ │ │ │ -001ab2e0: 6f20 6d6f 6475 6c65 7320 7468 6174 2064 o modules that d │ │ │ │ -001ab2f0: 6563 6c61 7265 206f 7220 7573 6520 7468 eclare or use th │ │ │ │ -001ab300: 6520 7361 6d65 2074 7970 6520 616e 6420 e same type and │ │ │ │ -001ab310: 696d 706f 7274 2074 6865 7365 206d 6f64 import these mod │ │ │ │ -001ab320: 756c 6573 2073 6570 6172 6174 656c 7920 ules separately │ │ │ │ -001ab330: 696e 746f 2061 6e6f 7468 6572 2068 6561 into another hea │ │ │ │ -001ab340: 6465 7220 6669 6c65 2e20 5768 656e 2075 der file. When u │ │ │ │ -001ab350: 7369 6e67 206d 6f64 756c 6573 2c20 636f sing modules, co │ │ │ │ -001ab360: 6e73 6964 6572 2063 7265 6174 696e 6720 nsider creating │ │ │ │ -001ab370: 6120 6d6f 6475 6c65 2068 6965 7261 7263 a module hierarc │ │ │ │ -001ab380: 6879 2073 7563 6820 7468 6174 2074 7970 hy such that typ │ │ │ │ -001ab390: 6573 2061 7265 2064 6563 6c61 7265 6420 es are declared │ │ │ │ -001ab3a0: 6f6e 6c79 206f 6e63 6520 616e 6420 6279 only once and by │ │ │ │ -001ab3b0: 206f 6e6c 7920 6f6e 6520 6d6f 6475 6c65 only one module │ │ │ │ -001ab3c0: 2077 6865 6e20 7468 6573 6520 6d6f 6475 when these modu │ │ │ │ -001ab3d0: 6c65 7320 6d75 7374 2062 6520 6c69 6e6b les must be link │ │ │ │ -001ab3e0: 6564 2e3c 2f6c 693e 0a3c 2f75 6c3e 0a3c ed.
    • .
    .< │ │ │ │ -001ab3f0: 703e 5769 7468 206d 6f64 756c 6573 2c20 p>With modules, │ │ │ │ -001ab400: 7468 6520 736f 7572 6365 2063 6f64 6520 the source code │ │ │ │ -001ab410: 7365 7269 616c 697a 6572 7320 666f 7220 serializers for │ │ │ │ -001ab420: 7468 6520 7479 7065 7320 6465 6669 6e65 the types define │ │ │ │ -001ab430: 6420 696e 2074 6865 206d 6f64 756c 6573 d in the modules │ │ │ │ -001ab440: 2061 7265 2067 656e 6572 6174 6564 2077 are generated w │ │ │ │ -001ab450: 6974 6820 736f 6170 6370 7032 2073 6570 ith soapcpp2 sep │ │ │ │ -001ab460: 6172 6174 656c 792e 2046 6f72 2065 7861 arately. For exa │ │ │ │ -001ab470: 6d70 6c65 2c20 6173 7375 6d65 2074 6861 mple, assume tha │ │ │ │ -001ab480: 7420 7765 2068 6176 6520 6120 6d6f 6475 t we have a modu │ │ │ │ -001ab490: 6c65 203c 656d 3e3c 636f 6465 3e6d 6f64 le mod │ │ │ │ -001ab4a0: 756c 652e 683c 2f63 6f64 653e 3c2f 656d ule.h:

    .
    < │ │ │ │ -001ab4e0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001ab4f0: 656e 7422 3e2f 2a20 436f 6e74 656e 7473 ent">/* Contents │ │ │ │ -001ab500: 206f 6620 6669 6c65 2026 7175 6f74 3b6d of file "m │ │ │ │ -001ab510: 6f64 756c 652e 6826 7175 6f74 3b20 2a2f odule.h" */ │ │ │ │ -001ab520: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001ab540: 3c73 7061 6e20 636c 6173 733d 2270 7265 #modu │ │ │ │ -001ab560: 6c65 2026 7175 6f74 3b74 6573 7426 7175 le "test&qu │ │ │ │ -001ab570: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    │ │ │ │ +001a8890: 6522 3e3c 6120 636c 6173 733d 2263 6f64 e">soap_des │ │ │ │ +001a88f0: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy( │ │ │ │ +001a8920: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap);
    ..< │ │ │ │ +001a89e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001a89f0: 3e3c 6120 636c 6173 733d 2263 6f64 6522 >soap_free< │ │ │ │ +001a8a50: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ +001a8a80: 2f61 3e29 3b3c 2f64 6976 3e0a 3c2f 6469 /a>);
    .

    .... Back to t │ │ │ │ +001a8ac0: 6162 6c65 206f 6620 636f 6e74 656e 7473 able of contents │ │ │ │ +001a8ad0: 3c2f 613e 3c2f 703e 0a3c 6832 3e3c 6120

    .

    .How │ │ │ │ +001a8b00: 2074 6f20 6372 6561 7465 2044 4c4c 733c to create DLLs< │ │ │ │ +001a8b10: 2f68 323e 0a3c 703e f09f 949d 203c 6120 /h2>.

    .... Back to │ │ │ │ +001a8b30: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +001a8b40: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ +001a8b50: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +001a8b60: 2069 643d 2262 6173 6564 6c6c 223e 3c2f id="basedll">.Creating the │ │ │ │ +001a8b80: 6261 7365 2073 7464 736f 6170 322e 646c base stdsoap2.dl │ │ │ │ +001a8b90: 6c3c 2f68 333e 0a3c 703e 5468 6520 656e l

    .

    The en │ │ │ │ +001a8ba0: 6769 6e65 2064 6f65 7320 6e6f 7420 6465 gine does not de │ │ │ │ +001a8bb0: 6669 6e65 2053 4f41 5020 4865 6164 6572 fine SOAP Header │ │ │ │ +001a8bc0: 2061 6e64 2046 6175 6c74 2073 6572 6961 and Fault seria │ │ │ │ +001a8bd0: 6c69 7a65 7273 2074 6861 7420 7468 6520 lizers that the │ │ │ │ +001a8be0: 656e 6769 6e65 206e 6565 6473 2077 6865 engine needs whe │ │ │ │ +001a8bf0: 6e20 696e 7374 616c 6c65 6420 6173 2061 n installed as a │ │ │ │ +001a8c00: 206c 6962 7261 7279 2e20 5765 2074 6865 library. We the │ │ │ │ +001a8c10: 7265 666f 7265 2061 6464 2053 4f41 5020 refore add SOAP │ │ │ │ +001a8c20: 4865 6164 6572 2061 6e64 2046 6175 6c74 Header and Fault │ │ │ │ +001a8c30: 2073 6572 6961 6c69 7a65 7273 2c20 7768 serializers, wh │ │ │ │ +001a8c40: 6963 6820 6172 6520 636f 6d70 696c 6564 ich are compiled │ │ │ │ +001a8c50: 2073 6570 6172 6174 656c 7920 6173 2066 separately as f │ │ │ │ +001a8c60: 6f6c 6c6f 7773 2e20 4669 7273 742c 2063 ollows. First, c │ │ │ │ +001a8c70: 7265 6174 6520 6120 6e65 7720 6865 6164 reate a new head │ │ │ │ +001a8c80: 6572 2066 696c 6520 3c65 6d3e 3c63 6f64 er file env.h with the SOA │ │ │ │ +001a8cb0: 5020 4865 6164 6572 203c 636f 6465 3e3c P Header < │ │ │ │ +001a8cc0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +001a8cd0: 663d 2273 7472 7563 745f 735f 6f5f 615f f="struct_s_o_a_ │ │ │ │ +001a8ce0: 705f 5f5f 655f 6e5f 765f 5f5f 5f5f 6865 p___e_n_v_____he │ │ │ │ +001a8cf0: 6164 6572 2e68 746d 6c22 2074 6974 6c65 ader.html" title │ │ │ │ +001a8d00: 3d22 534f 4150 2048 6561 6465 7220 7374 ="SOAP Header st │ │ │ │ +001a8d10: 7275 6374 7572 652e 223e 534f 4150 5f45 ructure.">SOAP_E │ │ │ │ +001a8d20: 4e56 5f5f 4865 6164 6572 3c2f 613e 3c2f NV__Header and SOAP F │ │ │ │ +001a8d40: 6175 6c74 203c 636f 6465 3e3c 6120 636c ault SOAP_ENV__Fa │ │ │ │ +001a8db0: 756c 743c 2f61 3e3c 2f63 6f64 653e 2073 ult s │ │ │ │ +001a8dc0: 7472 7563 7475 7265 732c 2069 6e63 6c75 tructures, inclu │ │ │ │ +001a8dd0: 6469 6e67 203c 636f 6465 3e3c 6120 636c ding SOAP │ │ │ │ +001a8e40: 5f45 4e56 5f5f 4465 7461 696c 3c2f 613e _ENV__Detail │ │ │ │ +001a8e50: 3c2f 636f 6465 3e20 6966 2074 6869 7320 if this │ │ │ │ +001a8e60: 7374 7275 6374 7572 6520 636f 6e74 6169 structure contai │ │ │ │ +001a8e70: 6e73 206d 656d 6265 7273 2074 6861 7420 ns members that │ │ │ │ +001a8e80: 6172 6520 7365 7269 616c 697a 6564 2061 are serialized a │ │ │ │ +001a8e90: 7320 6661 756c 7420 6465 7461 696c 732e s fault details. │ │ │ │ +001a8ea0: 2059 6f75 2063 616e 206c 6561 7665 2074 You can leave t │ │ │ │ +001a8eb0: 6869 7320 6865 6164 6572 2066 696c 6520 his header file │ │ │ │ +001a8ec0: 656d 7074 7920 6966 2079 6f75 2077 616e empty if you wan │ │ │ │ +001a8ed0: 7420 746f 2075 7365 2074 6865 2064 6566 t to use the def │ │ │ │ +001a8ee0: 6175 6c74 2053 4f41 5020 4865 6164 6572 ault SOAP Header │ │ │ │ +001a8ef0: 2061 6e64 2046 6175 6c74 2e20 486f 7765 and Fault. Howe │ │ │ │ +001a8f00: 7665 722c 2069 6620 534f 4150 2048 6561 ver, if SOAP Hea │ │ │ │ +001a8f10: 6465 7273 2061 7265 2072 6571 7569 7265 ders are require │ │ │ │ +001a8f20: 6420 7468 656e 2079 6f75 2063 616e 6e6f d then you canno │ │ │ │ +001a8f30: 7420 6c65 6176 6520 7468 6520 3c63 6f64 t leave the SOA │ │ │ │ +001a8fa0: 505f 454e 565f 5f48 6561 6465 723c 2f61 P_ENV__Header structu │ │ │ │ +001a8fc0: 7265 2065 6d70 7479 2e20 466f 7220 6578 re empty. For ex │ │ │ │ +001a8fd0: 616d 706c 652c 2074 6865 2057 532d 4164 ample, the WS-Ad │ │ │ │ +001a8fe0: 6472 6573 7369 6e67 2061 6e64 2057 532d dressing and WS- │ │ │ │ +001a8ff0: 5365 6375 7269 7479 2070 6c75 6769 6e73 Security plugins │ │ │ │ +001a9000: 2072 6571 7569 7265 2053 4f41 5020 4865 require SOAP He │ │ │ │ +001a9010: 6164 6572 7320 7768 6963 6820 6361 6e20 aders which can │ │ │ │ +001a9020: 6265 2069 6d70 6f72 7465 6420 6279 2061 be imported by a │ │ │ │ +001a9030: 6464 696e 6720 3c63 6f64 653e 2369 6d70 dding #imp │ │ │ │ +001a9040: 6f72 7420 2277 7361 352e 6822 3c2f 636f ort "wsa5.h" and #i │ │ │ │ +001a9060: 6d70 6f72 7420 2277 7373 652e 6822 3c2f mport "wsse.h", respectiv │ │ │ │ +001a9080: 656c 7920 746f 203c 656d 3e3c 636f 6465 ely to env.h. Then compile │ │ │ │ +001a90b0: 2074 6869 7320 6865 6164 6572 2066 696c this header fil │ │ │ │ +001a90c0: 6520 7769 7468 3a20 3c2f 703e 3c70 7265 e with:

     soapcpp2 -pen
    │ │ │ │ +001a90f0: 7620 656e 762e 680a 3c2f 7072 653e 3c70  v env.h.

    The generated │ │ │ │ +001a9110: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e63 envC.c │ │ │ │ +001a9120: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2066 pp f │ │ │ │ +001a9130: 696c 6520 686f 6c64 7320 7468 6520 534f ile holds the SO │ │ │ │ +001a9140: 4150 2048 6561 6465 7220 616e 6420 4661 AP Header and Fa │ │ │ │ +001a9150: 756c 7420 7365 7269 616c 697a 6572 732e ult serializers. │ │ │ │ +001a9160: 2057 6520 6361 6e20 6569 7468 6572 2063 We can either c │ │ │ │ +001a9170: 7265 6174 6520 6120 7365 7061 7261 7465 reate a separate │ │ │ │ +001a9180: 203c 656d 3e3c 636f 6465 3e65 6e76 432e envC. │ │ │ │ +001a9190: 646c 6c3c 2f63 6f64 653e 3c2f 656d 3e20 dll │ │ │ │ +001a91a0: 444c 4c20 666f 7220 7468 6973 2074 6861 DLL for this tha │ │ │ │ +001a91b0: 7420 616c 6c20 636c 6965 6e74 7320 616e t all clients an │ │ │ │ +001a91c0: 6420 7365 7276 6963 6520 6170 706c 6963 d service applic │ │ │ │ +001a91d0: 6174 696f 6e73 2077 696c 6c20 7573 652c ations will use, │ │ │ │ +001a91e0: 206f 7220 636f 6d62 696e 6520 3c65 6d3e or combine │ │ │ │ +001a91f0: 3c63 6f64 653e 656e 7643 2e63 7070 3c2f envC.cpp with │ │ │ │ +001a9210: 7468 6520 3c65 6d3e 3c63 6f64 653e 7374 the st │ │ │ │ +001a9220: 6473 6f61 7032 2e64 6c6c 3c2f 636f 6465 dsoap2.dll we create │ │ │ │ +001a9240: 2c20 7768 6963 6820 7765 2077 696c 6c20 , which we will │ │ │ │ +001a9250: 6578 706c 6169 6e20 6675 7274 6865 722e explain further. │ │ │ │ +001a9260: 3c2f 703e 0a3c 703e 5468 6520 6e65 7874

    .

    The next │ │ │ │ +001a9270: 2073 7465 7020 6973 2074 6f20 6372 6561 step is to crea │ │ │ │ +001a9280: 7465 203c 656d 3e3c 636f 6465 3e73 7464 te std │ │ │ │ +001a9290: 736f 6170 322e 646c 6c3c 2f63 6f64 653e soap2.dll │ │ │ │ +001a92a0: 3c2f 656d 3e20 7768 6963 6820 636f 6e73 which cons │ │ │ │ +001a92b0: 6973 7473 206f 6620 7468 6520 6669 6c65 ists of the file │ │ │ │ +001a92c0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ +001a92d0: 2f73 7464 736f 6170 322e 6370 703c 2f63 /stdsoap2.cpp and envC.cpp │ │ │ │ +001a9300: 3c2f 636f 6465 3e3c 2f65 6d3e 2061 6e64 and │ │ │ │ +001a9310: 206f 7074 696f 6e61 6c6c 7920 7468 6520 optionally the │ │ │ │ +001a9320: 706c 7567 696e 7320 796f 7520 7761 6e74 plugins you want │ │ │ │ +001a9330: 2074 6f20 7573 6520 7375 6368 2061 7320 to use such as │ │ │ │ +001a9340: 3c65 6d3e 3c63 6f64 653e 7773 7365 6170 wsseap │ │ │ │ +001a9350: 692e 6370 703c 2f63 6f64 653e 3c2f 656d i.cpp (we need to re │ │ │ │ +001a9370: 6e61 6d65 2061 6c6c 203c 656d 3e3c 636f name all .c files to < │ │ │ │ +001a93a0: 636f 6465 3e2e 6370 703c 2f63 6f64 653e code>.cpp │ │ │ │ +001a93b0: 3c2f 656d 3e20 6669 6c65 7320 746f 2061 files to a │ │ │ │ +001a93c0: 766f 6964 2069 7373 7565 7320 7769 7468 void issues with │ │ │ │ +001a93d0: 204d 5356 432b 2b29 2e20 5468 6973 2044 MSVC++). This D │ │ │ │ +001a93e0: 4c4c 2063 6f6e 7461 696e 7320 616c 6c20 LL contains all │ │ │ │ +001a93f0: 636f 6d6d 6f6e 2066 756e 6374 696f 6e73 common functions │ │ │ │ +001a9400: 206e 6565 6465 6420 666f 7220 616c 6c20 needed for all │ │ │ │ +001a9410: 6f74 6865 7220 636c 6965 6e74 7320 616e other clients an │ │ │ │ +001a9420: 6420 7365 7276 6572 7320 6261 7365 6420 d servers based │ │ │ │ +001a9430: 6f6e 2067 534f 4150 2e20 436f 6d70 696c on gSOAP. Compil │ │ │ │ +001a9440: 6520 3c65 6d3e 3c63 6f64 653e 656e 7643 e envC │ │ │ │ +001a9450: 2e63 7070 3c2f 636f 6465 3e3c 2f65 6d3e .cpp │ │ │ │ +001a9460: 2061 6e64 203c 656d 3e3c 636f 6465 3e67 and g │ │ │ │ +001a9470: 736f 6170 2f73 7464 736f 6170 322e 6370 soap/stdsoap2.cp │ │ │ │ +001a9480: 703c 2f63 6f64 653e 3c2f 656d 3e20 696e p in │ │ │ │ +001a9490: 746f 203c 656d 3e3c 636f 6465 3e73 7464 to std │ │ │ │ +001a94a0: 736f 6170 322e 646c 6c3c 2f63 6f64 653e soap2.dll │ │ │ │ +001a94b0: 3c2f 656d 3e20 7573 696e 6720 7468 6520 using the │ │ │ │ +001a94c0: 636f 6d70 696c 6572 206f 7074 696f 6e20 compiler option │ │ │ │ +001a94d0: 3c63 6f64 653e 2f44 3c2f 636f 6465 3e20 /D │ │ │ │ +001a94e0: 3c63 6f64 653e 2357 4954 485f 4e4f 4e41 #WITH_NONA │ │ │ │ +001a94f0: 4d45 5350 4143 4553 3c2f 636f 6465 3e20 MESPACES │ │ │ │ +001a9500: 616e 6420 7468 6520 4d53 5643 2050 7265 and the MSVC Pre │ │ │ │ +001a9510: 2d50 726f 6365 7373 6f72 2064 6566 696e -Processor defin │ │ │ │ +001a9520: 6974 696f 6e73 203c 636f 6465 3e53 4f41 itions SOA │ │ │ │ +001a9530: 505f 464d 4143 313d 5f5f 6465 636c 7370 P_FMAC1=__declsp │ │ │ │ +001a9540: 6563 2864 6c6c 6578 706f 7274 293c 2f63 ec(dllexport), SOAP │ │ │ │ +001a9560: 5f46 4d41 4333 3d5f 5f64 6563 6c73 7065 _FMAC3=__declspe │ │ │ │ +001a9570: 6328 646c 6c65 7870 6f72 7429 3c2f 636f c(dllexport), and the #SOAP_STD_EXP │ │ │ │ +001a95a0: 4f52 5453 3c2f 636f 6465 3e20 6d61 6372 ORTS macr │ │ │ │ +001a95b0: 6f20 7365 7420 6173 2073 686f 776e 2062 o set as shown b │ │ │ │ +001a95c0: 656c 6f77 2066 726f 6d20 7468 6520 4d53 elow from the MS │ │ │ │ +001a95d0: 5643 2063 6f6d 6d61 6e64 2070 726f 6d70 VC command promp │ │ │ │ +001a95e0: 743a 203c 2f70 3e3c 7072 6520 636c 6173 t:

    C:&
    │ │ │ │ +001a9600: 6774 3b20 636c 202f 6320 2f49 2e20 2f45  gt; cl /c /I. /E
    │ │ │ │ +001a9610: 4873 6320 2f44 5749 5448 5f4e 4f4e 414d  Hsc /DWITH_NONAM
    │ │ │ │ +001a9620: 4553 5041 4345 5320 2f44 534f 4150 5f46  ESPACES /DSOAP_F
    │ │ │ │ +001a9630: 4d41 4331 3d5f 5f64 6563 6c73 7065 6328  MAC1=__declspec(
    │ │ │ │ +001a9640: 646c 6c65 7870 6f72 7429 202f 4453 4f41  dllexport) /DSOA
    │ │ │ │ +001a9650: 505f 464d 4143 333d 5f5f 6465 636c 7370  P_FMAC3=__declsp
    │ │ │ │ +001a9660: 6563 2864 6c6c 6578 706f 7274 2920 2f44  ec(dllexport) /D
    │ │ │ │ +001a9670: 534f 4150 5f53 5444 5f45 5850 4f52 5453  SOAP_STD_EXPORTS
    │ │ │ │ +001a9680: 2065 6e76 432e 6370 7020 7374 6473 6f61   envC.cpp stdsoa
    │ │ │ │ +001a9690: 7032 2e63 7070 0a43 3a26 6774 3b20 6c69  p2.cpp.C:> li
    │ │ │ │ +001a96a0: 6e6b 202f 4c49 4250 4154 4820 7773 325f  nk /LIBPATH ws2_
    │ │ │ │ +001a96b0: 3332 2e6c 6962 202f 4f55 543a 6d79 6773  32.lib /OUT:mygs
    │ │ │ │ +001a96c0: 6f61 702e 646c 6c20 2f44 4c4c 2065 6e76  oap.dll /DLL env
    │ │ │ │ +001a96d0: 432e 6f62 6a20 7374 6473 6f61 7032 2e6f  C.obj stdsoap2.o
    │ │ │ │ +001a96e0: 626a 0a3c 2f70 7265 3e3c 703e 204e 6f74  bj.

    Not │ │ │ │ +001a96f0: 653a 2061 7320 6f66 2067 534f 4150 2032 e: as of gSOAP 2 │ │ │ │ +001a9700: 2e38 2e33 3020 616e 6420 6c61 7465 722c .8.30 and later, │ │ │ │ +001a9710: 2074 6865 2044 4c4c 2065 7870 6f72 7420 the DLL export │ │ │ │ +001a9720: 6d61 6372 6f73 2073 686f 776e 2068 6572 macros shown her │ │ │ │ +001a9730: 6520 6172 6520 616c 6c20 7365 7420 7769 e are all set wi │ │ │ │ +001a9740: 7468 206f 6e65 2070 7265 2d70 726f 6365 th one pre-proce │ │ │ │ +001a9750: 7373 6f72 2064 6566 696e 6974 696f 6e20 ssor definition │ │ │ │ +001a9760: 3c63 6f64 653e 2353 4f41 505f 5354 445f #SOAP_STD_ │ │ │ │ +001a9770: 4558 504f 5254 533c 2f63 6f64 653e 2e3c EXPORTS.< │ │ │ │ +001a9780: 2f70 3e0a 3c70 3e41 6c74 6572 6e61 7469 /p>.

    Alternati │ │ │ │ +001a9790: 7665 6c79 2c20 796f 7520 6361 6e20 636f vely, you can co │ │ │ │ +001a97a0: 6d70 696c 6520 7769 7468 203c 636f 6465 mpile with /D #WITH_SOAPDEFS_ │ │ │ │ +001a97d0: 483c 2f63 6f64 653e 2061 6e64 2070 7574 H and put │ │ │ │ +001a97e0: 2074 6865 206d 6163 726f 2064 6566 696e the macro defin │ │ │ │ +001a97f0: 6974 696f 6e73 2069 6e20 3c65 6d3e 3c63 itions in soapdefs.h. This │ │ │ │ +001a9820: 2065 7870 6f72 7473 2061 6c6c 2066 756e exports all fun │ │ │ │ +001a9830: 6374 696f 6e73 2077 6869 6368 2061 7265 ctions which are │ │ │ │ +001a9840: 2070 7265 6365 6465 6420 6279 2074 6865 preceded by the │ │ │ │ +001a9850: 206d 6163 726f 203c 636f 6465 3e23 534f macro #SO │ │ │ │ +001a9860: 4150 5f46 4d41 4331 3c2f 636f 6465 3e20 AP_FMAC1 │ │ │ │ +001a9870: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the soapcpp2.cpp source │ │ │ │ +001a98a0: 2066 696c 6520 616e 6420 6d61 6372 6f20 file and macro │ │ │ │ +001a98b0: 3c63 6f64 653e 2353 4f41 505f 464d 4143 #SOAP_FMAC │ │ │ │ +001a98c0: 333c 2f63 6f64 653e 2069 6e20 7468 6520 3 in the │ │ │ │ +001a98d0: 3c65 6d3e 3c63 6f64 653e 656e 7643 2e63 envC.c │ │ │ │ +001a98e0: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2073 pp s │ │ │ │ +001a98f0: 6f75 7263 6520 6669 6c65 2e3c 2f70 3e0a ource file.

    . │ │ │ │ +001a9900: 3c70 3e46 696e 616c 6c79 2c20 6e6f 7465

    Finally, note │ │ │ │ +001a9910: 2074 6861 7420 7468 6520 6753 4f41 5020 that the gSOAP │ │ │ │ +001a9920: 736f 7572 6365 2063 6f64 6520 7061 636b source code pack │ │ │ │ +001a9930: 6167 6520 636f 6e74 6169 6e73 2061 206c age contains a l │ │ │ │ +001a9940: 6f74 206f 6620 3c65 6d3e 3c63 6f64 653e ot of │ │ │ │ +001a9950: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2073 .c s │ │ │ │ +001a9960: 6f75 7263 6520 636f 6465 2066 696c 6573 ource code files │ │ │ │ +001a9970: 2e20 4d69 7869 6e67 2043 2077 6974 6820 . Mixing C with │ │ │ │ +001a9980: 432b 2b20 6669 6c65 7320 6973 206e 6f74 C++ files is not │ │ │ │ +001a9990: 2072 6563 6f6d 6d65 6e64 6564 2077 6974 recommended wit │ │ │ │ +001a99a0: 6820 5669 7375 616c 2053 7475 6469 6f20 h Visual Studio │ │ │ │ +001a99b0: 616e 6420 7769 6c6c 206c 6561 6420 746f and will lead to │ │ │ │ +001a99c0: 2072 756e 2d74 696d 6520 6572 726f 7273 run-time errors │ │ │ │ +001a99d0: 2077 6865 6e20 6275 696c 6469 6e67 2044 when building D │ │ │ │ +001a99e0: 4c4c 732e 2054 6865 7265 666f 7265 2c20 LLs. Therefore, │ │ │ │ +001a99f0: 616c 7761 7973 2072 656e 616d 6520 3c65 always rename .c source co │ │ │ │ +001a9a20: 6465 2066 696c 6573 2074 6f20 3c65 6d3e de files to │ │ │ │ +001a9a30: 3c63 6f64 653e 2e63 7070 3c2f 636f 6465 .cpp source co │ │ │ │ +001a9a50: 6465 2066 696c 6573 2077 6865 6e20 6372 de files when cr │ │ │ │ +001a9a60: 6561 7469 6e67 2044 4c4c 732e 3c2f 703e eating DLLs.

    │ │ │ │ +001a9a70: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ +001a9a90: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .Creating │ │ │ │ +001a9ae0: 636c 6965 6e74 2061 6e64 2073 6572 7665 client and serve │ │ │ │ +001a9af0: 7220 444c 4c73 3c2f 6833 3e0a 3c70 3e43 r DLLs

    .

    C │ │ │ │ +001a9b00: 6f6d 7069 6c65 2074 6865 203c 656d 3e3c ompile the < │ │ │ │ +001a9b10: 636f 6465 3e73 6f61 7043 6c69 656e 744c code>soapClientL │ │ │ │ +001a9b20: 6962 2e63 7070 3c2f 636f 6465 3e3c 2f65 ib.cpp and soapServerLib.c │ │ │ │ +001a9b50: 7070 3c2f 636f 6465 3e3c 2f65 6d3e 2073 pp s │ │ │ │ +001a9b60: 6f75 7263 6573 2061 7320 444c 4c73 2062 ources as DLLs b │ │ │ │ +001a9b70: 7920 7573 696e 6720 7468 6520 4d53 5643 y using the MSVC │ │ │ │ +001a9b80: 2050 7265 2d50 726f 6365 7373 6f72 2064 Pre-Processor d │ │ │ │ +001a9b90: 6566 696e 6974 696f 6e73 203c 636f 6465 efinitions SOAP_FMAC5=__de │ │ │ │ +001a9bb0: 636c 7370 6563 2864 6c6c 6578 706f 7274 clspec(dllexport │ │ │ │ +001a9bc0: 293c 2f63 6f64 653e 2061 6e64 203c 636f ) and SOAP_CMAC=__d │ │ │ │ +001a9be0: 6563 6c73 7065 6328 646c 6c65 7870 6f72 eclspec(dllexpor │ │ │ │ +001a9bf0: 7429 3c2f 636f 6465 3e2c 2061 6e64 2062 t), and b │ │ │ │ +001a9c00: 7920 7573 696e 6720 7468 6520 432b 2b20 y using the C++ │ │ │ │ +001a9c10: 636f 6d70 696c 6572 206f 7074 696f 6e20 compiler option │ │ │ │ +001a9c20: 3c63 6f64 653e 2f44 3c2f 636f 6465 3e20 /D │ │ │ │ +001a9c30: 3c63 6f64 653e 2357 4954 485f 4e4f 4e41 #WITH_NONA │ │ │ │ +001a9c40: 4d45 5350 4143 4553 3c2f 636f 6465 3e2e MESPACES. │ │ │ │ +001a9c50: 2041 6c6c 206f 6620 7468 6573 6520 6d61 All of these ma │ │ │ │ +001a9c60: 6372 6f73 2061 7265 2073 6574 2061 7320 cros are set as │ │ │ │ +001a9c70: 6120 7368 6f72 7468 616e 6420 7769 7468 a shorthand with │ │ │ │ +001a9c80: 206f 6e65 2070 7265 2d70 726f 6365 7373 one pre-process │ │ │ │ +001a9c90: 6f72 2064 6566 696e 6974 696f 6e20 3c63 or definition #SOAP_STD_EX │ │ │ │ +001a9cb0: 504f 5254 533c 2f63 6f64 653e 2028 7265 PORTS (re │ │ │ │ +001a9cc0: 7175 6972 6573 2067 534f 4150 2032 2e38 quires gSOAP 2.8 │ │ │ │ +001a9cd0: 2e33 3020 6f72 206c 6174 6572 292e 3c2f .30 or later)..

    This DLL l │ │ │ │ +001a9cf0: 696e 6b73 2074 6f20 3c65 6d3e 3c63 6f64 inks to stdsoap2.dll we cr │ │ │ │ +001a9d20: 6561 7465 6420 696e 2053 6563 7469 6f6e eated in Section │ │ │ │ +001a9d30: 203c 6120 636c 6173 733d 2265 6c22 2068 Creatin │ │ │ │ +001a9d60: 6720 7468 6520 6261 7365 2073 7464 736f g the base stdso │ │ │ │ +001a9d70: 6170 322e 646c 6c3c 2f61 3e2e 3c2f 703e ap2.dll.

    │ │ │ │ +001a9d80: 0a3c 703e 546f 2063 7265 6174 6520 6d75 .

    To create mu │ │ │ │ +001a9d90: 6c74 6970 6c65 2044 4c4c 7320 696e 2074 ltiple DLLs in t │ │ │ │ +001a9da0: 6865 2073 616d 6520 7072 6f6a 6563 7420 he same project │ │ │ │ +001a9db0: 6469 7265 6374 6f72 792c 2079 6f75 2073 directory, you s │ │ │ │ +001a9dc0: 686f 756c 6420 7573 6520 3c62 3e3c 636f hould use soapcpp2 -p n │ │ │ │ +001a9de0: 616d 653c 2f63 6f64 653e 3c2f 623e 206f ame o │ │ │ │ +001a9df0: 7074 696f 6e20 3c62 3e3c 636f 6465 3e2d ption - │ │ │ │ +001a9e00: 7020 6e61 6d65 3c2f 636f 6465 3e3c 2f62 p name to rename the │ │ │ │ +001a9e20: 6765 6e65 7261 7465 6420 3c65 6d3e 3c63 generated soapClientLi │ │ │ │ +001a9e40: 622e 6370 703c 2f63 6f64 653e 3c2f 656d b.cpp and │ │ │ │ +001a9e60: 736f 6170 5365 7276 6572 4c69 622e 6370 soapServerLib.cp │ │ │ │ +001a9e70: 703c 2f63 6f64 653e 3c2f 656d 3e20 2861 p (a │ │ │ │ +001a9e80: 6e64 2061 7373 6f63 6961 7465 6429 2066 nd associated) f │ │ │ │ +001a9e90: 696c 6573 2e20 5468 6520 3c62 3e3c 636f iles. The -p name option spe │ │ │ │ +001a9ec0: 6369 6669 6573 2061 203c 656d 3e3c 636f cifies a name prefix to re │ │ │ │ +001a9ef0: 706c 6163 6520 7468 6520 3c65 6d3e 3c63 place the soap< │ │ │ │ +001a9f10: 2f65 6d3e 2066 696c 6520 6e61 6d65 2070 /em> file name p │ │ │ │ +001a9f20: 7265 6669 782e 2041 6e6f 7468 6572 2077 refix. Another w │ │ │ │ +001a9f30: 6179 2069 7320 746f 2075 7365 2043 2b2b ay is to use C++ │ │ │ │ +001a9f40: 206e 616d 6573 7061 6365 7320 7769 7468 namespaces with │ │ │ │ +001a9f50: 203c 623e 3c63 6f64 653e 736f 6170 6370 soapcp │ │ │ │ +001a9f60: 7032 202d 7120 6e61 6d65 3c2f 636f 6465 p2 -q name option │ │ │ │ +001a9f80: 3c63 6f64 653e 2d71 206e 616d 653c 2f63 -q name, if the │ │ │ │ +001a9fa0: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ +001a9fb0: 7220 6669 6c65 2069 6e70 7574 2074 6f20 r file input to │ │ │ │ +001a9fc0: 736f 6170 6370 7032 2064 6f65 7320 6e6f soapcpp2 does no │ │ │ │ +001a9fd0: 7420 616c 7265 6164 7920 6465 636c 6172 t already declar │ │ │ │ +001a9fe0: 6520 6120 432b 2b20 6e61 6d65 7370 6163 e a C++ namespac │ │ │ │ +001a9ff0: 652e 2041 2063 6c65 616e 2073 6570 6172 e. A clean separ │ │ │ │ +001aa000: 6174 696f 6e20 6f66 206c 6962 7261 7269 ation of librari │ │ │ │ +001aa010: 6573 2063 616e 2061 6c73 6f20 6265 2061 es can also be a │ │ │ │ +001aa020: 6368 6965 7665 6420 7769 7468 2043 2b2b chieved with C++ │ │ │ │ +001aa030: 206e 616d 6573 7061 6365 732c 2073 6565 namespaces, see │ │ │ │ +001aa040: 2053 6563 7469 6f6e 203c 6120 636c 6173 Section How to bu │ │ │ │ +001aa080: 696c 6420 6120 636c 6965 6e74 206f 7220 ild a client or │ │ │ │ +001aa090: 7365 7276 6572 2069 6e20 6120 432b 2b20 server in a C++ │ │ │ │ +001aa0a0: 636f 6465 206e 616d 6573 7061 6365 3c2f code namespace .

    .

    Unle │ │ │ │ +001aa0c0: 7373 2079 6f75 2075 7365 2074 6865 2063 ss you use the c │ │ │ │ +001aa0d0: 6c69 656e 7420 7072 6f78 7920 616e 6420 lient proxy and │ │ │ │ +001aa0e0: 7365 7276 6572 206f 626a 6563 7420 636c server object cl │ │ │ │ +001aa0f0: 6173 7365 7320 283c 656d 3e3c 636f 6465 asses (soapXYZProxy.h< │ │ │ │ +001aa110: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ +001aa120: 3c65 6d3e 3c63 6f64 653e 736f 6170 5859 soapXY │ │ │ │ +001aa130: 5a53 6572 7669 6365 2e68 3c2f 636f 6465 ZService.h), all cli │ │ │ │ +001aa150: 656e 7420 616e 6420 7365 7276 6572 2061 ent and server a │ │ │ │ +001aa160: 7070 6c69 6361 7469 6f6e 7320 6d75 7374 pplications must │ │ │ │ +001aa170: 2065 7870 6c69 6369 746c 7920 7365 7420 explicitly set │ │ │ │ +001aa180: 7468 6520 6e61 6d65 7370 6163 6573 2076 the namespaces v │ │ │ │ +001aa190: 616c 7565 206f 6620 7468 6520 3c63 6f64 alue of the so │ │ │ │ +001aa1f0: 6170 3c2f 613e 3c2f 636f 6465 3e20 636f ap co │ │ │ │ +001aa200: 6e74 6578 7420 7769 7468 3a3c 2f70 3e0a ntext with:

    . │ │ │ │ +001aa210: 3c64 6976 2063 6c61 7373 3d22 6672 6167

    │ │ │ │ +001aa360: 7768 6572 6520 7468 6520 3c63 6f64 653e where the │ │ │ │ +001aa370: 6e61 6d65 7370 6163 6573 5b5d 3c2f 636f namespaces[] table should │ │ │ │ +001aa390: 2062 6520 6465 6669 6e65 6420 696e 2074 be defined in t │ │ │ │ +001aa3a0: 6865 2063 6c69 656e 742f 7365 7276 6572 he client/server │ │ │ │ +001aa3b0: 2073 6f75 7263 652e 2054 6865 7365 2074 source. These t │ │ │ │ +001aa3c0: 6162 6c65 7320 6172 6520 6765 6e65 7261 ables are genera │ │ │ │ +001aa3d0: 7465 6420 696e 2074 6865 203c 656d 3e3c ted in the < │ │ │ │ +001aa3e0: 636f 6465 3e2e 6e73 6d61 703c 2f63 6f64 code>.nsmap files. T │ │ │ │ +001aa400: 6865 2074 6162 6c65 7320 6172 6520 7265 he tables are re │ │ │ │ +001aa410: 6e61 6d65 6420 666f 7220 636f 6e76 656e named for conven │ │ │ │ +001aa420: 6965 6e63 6520 7573 696e 6720 3c62 3e3c ience using < │ │ │ │ +001aa430: 636f 6465 3e73 6f61 7063 7070 3220 2d6e code>soapcpp2 -n │ │ │ │ +001aa440: 3c2f 636f 6465 3e3c 2f62 3e20 6f70 7469 opti │ │ │ │ +001aa450: 6f6e 203c 623e 3c63 6f64 653e 2d6e 3c2f on -n, see S │ │ │ │ +001aa470: 6563 7469 6f6e 203c 6120 636c 6173 733d ection soapcpp2 │ │ │ │ +001aa4b0: 6f70 7469 6f6e 733c 2f61 3e20 2e3c 2f70 options .

    .

    .... Back to ta │ │ │ │ +001aa4e0: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +001aa4f0: 2f61 3e3c 2f70 3e0a 3c68 323e 3c61 2063 /a>

    .

    .H │ │ │ │ +001aa520: 6f77 2074 6f20 6275 696c 6420 6d6f 6475 ow to build modu │ │ │ │ +001aa530: 6c65 7320 616e 6420 6c69 6272 6172 6965 les and librarie │ │ │ │ +001aa540: 7320 7769 7468 2074 6865 2023 6d6f 6475 s with the #modu │ │ │ │ +001aa550: 6c65 2064 6972 6563 7469 7665 3c2f 6832 le directive

    .

    The # │ │ │ │ +001aa570: 6d6f 6475 6c65 3c2f 636f 6465 3e20 6469 module di │ │ │ │ +001aa580: 7265 6374 6976 6520 6973 2075 7365 6420 rective is used │ │ │ │ +001aa590: 746f 2062 7569 6c64 206d 6f64 756c 6573 to build modules │ │ │ │ +001aa5a0: 2077 6974 6820 736f 6170 6370 7032 2e20 with soapcpp2. │ │ │ │ +001aa5b0: 4120 6c69 6272 6172 7920 6361 6e20 6265 A library can be │ │ │ │ +001aa5c0: 2062 7569 6c74 2066 726f 6d20 6120 6d6f built from a mo │ │ │ │ +001aa5d0: 6475 6c65 2061 6e64 206c 696e 6b65 6420 dule and linked │ │ │ │ +001aa5e0: 7769 7468 206d 756c 7469 706c 6520 5765 with multiple We │ │ │ │ +001aa5f0: 6220 7365 7276 6963 6573 2061 7070 6c69 b services appli │ │ │ │ +001aa600: 6361 7469 6f6e 732e 2054 6865 2064 6972 cations. The dir │ │ │ │ +001aa610: 6563 7469 7665 2073 686f 756c 6420 6170 ective should ap │ │ │ │ +001aa620: 7065 6172 2061 7420 7468 6520 746f 7020 pear at the top │ │ │ │ +001aa630: 6f66 2074 6865 2069 6e74 6572 6661 6365 of the interface │ │ │ │ +001aa640: 2068 6561 6465 7220 6669 6c65 2066 6f72 header file for │ │ │ │ +001aa650: 2073 6f61 7063 7070 3220 616e 6420 6861 soapcpp2 and ha │ │ │ │ +001aa660: 7320 7468 6520 666f 6c6c 6f77 696e 6720 s the following │ │ │ │ +001aa670: 666f 726d 6174 733a 3c2f 703e 0a3c 6469 formats:

    .
    │ │ │ │ +001aa6c0: 236d 6f64 756c 6520 2671 756f 743b 6e61 #module "na │ │ │ │ +001aa6d0: 6d65 2671 756f 743b 3c2f 7370 616e 3e20 me" │ │ │ │ +001aa6e0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    and

    .
    < │ │ │ │ +001aa720: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001aa730: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#mod │ │ │ │ +001aa750: 756c 6520 2671 756f 743b 6e61 6d65 2671 ule "name&q │ │ │ │ +001aa760: 756f 743b 3c2f 7370 616e 3e20 2671 756f uot; &quo │ │ │ │ +001aa770: 743b 6675 6c6c 6e61 6d65 2671 756f 743b t;fullname" │ │ │ │ +001aa780: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    where the name mus │ │ │ │ +001aa7c0: 7420 6265 2061 2075 6e69 7175 6520 7368 t be a unique sh │ │ │ │ +001aa7d0: 6f72 7420 6e61 6d65 2066 6f72 2074 6865 ort name for the │ │ │ │ +001aa7e0: 206d 6f64 756c 652e 2054 6865 206e 616d module. The nam │ │ │ │ +001aa7f0: 6520 6973 2063 6173 6520 696e 7365 6e73 e is case insens │ │ │ │ +001aa800: 6974 6976 6520 616e 6420 6d75 7374 206e itive and must n │ │ │ │ +001aa810: 6f74 2065 7863 6565 6420 3420 6368 6172 ot exceed 4 char │ │ │ │ +001aa820: 6163 7465 7273 2069 6e20 6c65 6e67 7468 acters in length │ │ │ │ +001aa830: 2e20 5468 6520 3c63 6f64 653e 6675 6c6c . The full │ │ │ │ +001aa840: 6e61 6d65 3c2f 636f 6465 3e2c 2077 6865 name, whe │ │ │ │ +001aa850: 6e20 7072 6573 656e 742c 2072 6570 7265 n present, repre │ │ │ │ +001aa860: 7365 6e74 7320 7468 6520 6675 6c6c 206e sents the full n │ │ │ │ +001aa870: 616d 6520 6f66 2074 6865 206d 6f64 756c ame of the modul │ │ │ │ +001aa880: 6520 616e 6420 6973 2075 7365 6420 746f e and is used to │ │ │ │ +001aa890: 2070 7265 6669 7820 7468 6520 6675 6e63 prefix the func │ │ │ │ +001aa8a0: 7469 6f6e 206e 616d 6573 206f 6620 7468 tion names of th │ │ │ │ +001aa8b0: 6520 6765 6e65 7261 7465 6420 7365 7269 e generated seri │ │ │ │ +001aa8c0: 616c 697a 6572 7320 7265 706c 6163 696e alizers replacin │ │ │ │ +001aa8d0: 6720 7468 6520 7573 7561 6c20 3c63 6f64 g the usual soap pr │ │ │ │ +001aa8f0: 6566 6978 2e20 4966 2061 6273 656e 742c efix. If absent, │ │ │ │ +001aa900: 2074 6865 2073 686f 7274 206e 616d 6520 the short name │ │ │ │ +001aa910: 6973 2075 7365 6420 746f 2070 7265 6669 is used to prefi │ │ │ │ +001aa920: 7820 7468 6520 6675 6e63 7469 6f6e 206e x the function n │ │ │ │ +001aa930: 616d 6573 206f 6620 7468 6520 7365 7269 ames of the seri │ │ │ │ +001aa940: 616c 697a 6572 732e 3c2f 703e 0a3c 703e alizers.

    .

    │ │ │ │ +001aa950: 5468 6520 7265 7374 206f 6620 7468 6520 The rest of the │ │ │ │ +001aa960: 636f 6e74 656e 7420 6f66 2074 6865 2069 content of the i │ │ │ │ +001aa970: 6e74 6572 6661 6365 2068 6561 6465 7220 nterface header │ │ │ │ +001aa980: 6669 6c65 2069 6e63 6c75 6465 7320 7479 file includes ty │ │ │ │ +001aa990: 7065 2064 6563 6c61 7261 7469 6f6e 7320 pe declarations │ │ │ │ +001aa9a0: 616e 6420 6f70 7469 6f6e 616c 6c79 2074 and optionally t │ │ │ │ +001aa9b0: 6865 2064 6563 6c61 7261 7469 6f6e 7320 he declarations │ │ │ │ +001aa9c0: 6f66 2073 6572 7669 6365 206f 7065 7261 of service opera │ │ │ │ +001aa9d0: 7469 6f6e 7320 616e 6420 534f 4150 2048 tions and SOAP H │ │ │ │ +001aa9e0: 6561 6465 7273 2061 6e64 2046 6175 6c74 eaders and Fault │ │ │ │ +001aa9f0: 7320 7468 6174 2061 7265 2075 6e69 7665 s that are unive │ │ │ │ +001aaa00: 7273 616c 6c79 2075 7365 6420 6279 2053 rsally used by S │ │ │ │ +001aaa10: 4f41 5020 7365 7276 6963 6573 2c20 7768 OAP services, wh │ │ │ │ +001aaa20: 656e 2061 7070 6c69 6361 626c 652e 2057 en applicable. W │ │ │ │ +001aaa30: 6865 6e20 7468 6520 736f 6170 6370 7032 hen the soapcpp2 │ │ │ │ +001aaa40: 2074 6f6f 6c20 7072 6f63 6573 7365 7320 tool processes │ │ │ │ +001aaa50: 7468 6520 6865 6164 6572 2066 696c 6520 the header file │ │ │ │ +001aaa60: 6d6f 6475 6c65 2c20 6974 2077 696c 6c20 module, it will │ │ │ │ +001aaa70: 6765 6e65 7261 7465 2074 6865 2073 6f75 generate the sou │ │ │ │ +001aaa80: 7263 6520 636f 6465 7320 666f 7220 6120 rce codes for a │ │ │ │ +001aaa90: 6c69 6272 6172 792e 2054 6865 2057 6562 library. The Web │ │ │ │ +001aaaa0: 2073 6572 7669 6365 7320 6170 706c 6963 services applic │ │ │ │ +001aaab0: 6174 696f 6e20 7468 6174 2075 7365 7320 ation that uses │ │ │ │ +001aaac0: 7468 6520 6c69 6272 6172 7920 7368 6f75 the library shou │ │ │ │ +001aaad0: 6c64 2075 7365 2061 2068 6561 6465 7220 ld use a header │ │ │ │ +001aaae0: 6669 6c65 2074 6861 7420 696d 706f 7274 file that import │ │ │ │ +001aaaf0: 7320 7468 6520 6d6f 6475 6c65 2077 6974 s the module wit │ │ │ │ +001aab00: 6820 7468 6520 3c63 6f64 653e 2369 6d70 h the #imp │ │ │ │ +001aab10: 6f72 743c 2f63 6f64 653e 2064 6972 6563 ort direc │ │ │ │ +001aab20: 7469 7665 2c20 666f 7220 6578 616d 706c tive, for exampl │ │ │ │ +001aab30: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +001aab60: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001aab70: 656e 7422 3e2f 2a20 436f 6e74 656e 7473 ent">/* Contents │ │ │ │ +001aab80: 206f 6620 6669 6c65 2026 7175 6f74 3b6d of file "m │ │ │ │ +001aab90: 6f64 756c 652e 6826 7175 6f74 3b20 2a2f odule.h" */ │ │ │ │ +001aaba0: 3c2f 7370 616e 3e20 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001aabb0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001aabc0: 3e3c 7370 616e 2063 6c61 7373 3d22 7072 >#mod │ │ │ │ +001aabe0: 756c 6520 2671 756f 743b 7465 7374 2671 ule "test&q │ │ │ │ +001aabf0: 756f 743b 3c2f 7370 616e 3e3c 2f64 6976 uot;
    .
    .
    // types and │ │ │ │ +001aac50: 2074 7970 6564 6566 7320 6265 636f 6d65 typedefs become │ │ │ │ +001aac60: 206d 6f64 756c 652d 7370 6563 6966 6963 module-specific │ │ │ │ +001aac70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001aac90: 3c73 7061 6e20 636c 6173 733d 226b 6579 typedef LONG64 xsd__long;.
    c │ │ │ │ +001aad50: 6861 723c 2f73 7061 6e3e 2a3b 3c2f 6469 har*;.
    .< │ │ │ │ +001aad90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001aada0: 656e 7422 3e2f 2f20 6120 6d6f 6475 6c65 ent">// a module │ │ │ │ +001aadb0: 2d73 7065 6369 6669 6320 7374 7275 6374 -specific struct │ │ │ │ +001aadc0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001aade0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct
    ns__S
    │ │ │ │ +001aae10: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    │ │ │ │ +001aae40: 202e 2e2e 203c 7370 616e 2063 6c61 7373 ... // me │ │ │ │ +001aae60: 6d62 6572 733c 2f73 7061 6e3e 3c2f 6469 mbers.
    };
    .

    The │ │ │ │ +001aaeb0: 3c63 6f64 653e 6d6f 6475 6c65 2e68 3c2f module.h data │ │ │ │ +001aaed0: 6269 6e64 696e 6720 696e 7465 7266 6163 binding interfac │ │ │ │ +001aaee0: 6520 6865 6164 6572 2066 696c 6520 666f e header file fo │ │ │ │ +001aaef0: 7220 736f 6170 6370 7032 2064 6563 6c61 r soapcpp2 decla │ │ │ │ +001aaf00: 7265 7320 6d6f 6475 6c65 2d73 7065 6369 res module-speci │ │ │ │ +001aaf10: 6669 6320 7365 7269 616c 697a 6162 6c65 fic serializable │ │ │ │ +001aaf20: 2074 7970 6573 203c 636f 6465 3e4c 4f4e types LON │ │ │ │ +001aaf30: 4736 343c 2f63 6f64 653e 2c20 3c63 6f64 G64, xsd__long, char*< │ │ │ │ +001aaf60: 2f63 6f64 653e 2c20 616e 6420 6120 3c63 /code>, and a struct ns__S │ │ │ │ +001aaf80: 3c2f 636f 6465 3e2e 2054 6865 206d 6f64 . The mod │ │ │ │ +001aaf90: 756c 6520 6e61 6d65 2069 7320 2274 6573 ule name is "tes │ │ │ │ +001aafa0: 7422 2c20 736f 2074 6865 2073 6f61 7063 t", so the soapc │ │ │ │ +001aafb0: 7070 3220 746f 6f6c 2070 726f 6475 6365 pp2 tool produce │ │ │ │ +001aafc0: 7320 6120 3c65 6d3e 3c63 6f64 653e 7465 s a te │ │ │ │ +001aafd0: 7374 432e 6370 703c 2f63 6f64 653e 3c2f stC.cpp file with th │ │ │ │ +001aaff0: 6520 584d 4c20 7365 7269 616c 697a 6572 e XML serializer │ │ │ │ +001ab000: 7320 666f 7220 7468 6573 6520 7479 7065 s for these type │ │ │ │ +001ab010: 732e 2054 6865 203c 656d 3e3c 636f 6465 s. The testC.cpp data bind │ │ │ │ +001ab040: 696e 6720 696d 706c 656d 656e 7461 7469 ing implementati │ │ │ │ +001ab050: 6f6e 2073 6f75 7263 6520 636f 6465 2063 on source code c │ │ │ │ +001ab060: 616e 2062 6520 7365 7061 7261 7465 6c79 an be separately │ │ │ │ +001ab070: 2063 6f6d 7069 6c65 6420 616e 6420 6c69 compiled and li │ │ │ │ +001ab080: 6e6b 6564 2077 6974 6820 616e 2061 7070 nked with an app │ │ │ │ +001ab090: 6c69 6361 7469 6f6e 2e20 4966 2073 6572 lication. If ser │ │ │ │ +001ab0a0: 7669 6365 206f 7065 7261 7469 6f6e 7320 vice operations │ │ │ │ +001ab0b0: 6172 6520 6465 636c 6172 6564 2069 6e20 are declared in │ │ │ │ +001ab0c0: 7468 6520 696e 7465 7266 6163 6520 6865 the interface he │ │ │ │ +001ab0d0: 6164 6572 2066 696c 6520 6173 2066 756e ader file as fun │ │ │ │ +001ab0e0: 6374 696f 6e20 7072 6f74 6f74 7970 6573 ction prototypes │ │ │ │ +001ab0f0: 2c20 7765 2061 6c73 6f20 6765 7420 3c65 , we also get testClie │ │ │ │ +001ab110: 6e74 2e63 7070 3c2f 636f 6465 3e3c 2f65 nt.cpp client stub f │ │ │ │ +001ab130: 756e 6374 696f 6e73 2061 6e64 203c 656d unctions and testServe │ │ │ │ +001ab150: 722e 6370 703c 2f63 6f64 653e 3c2f 656d r.cpp server skeleto │ │ │ │ +001ab170: 6e20 6675 6e63 7469 6f6e 732e 3c2f 703e n functions.

    │ │ │ │ +001ab180: 0a3c 703e 5468 6572 6520 6172 6520 736f .

    There are so │ │ │ │ +001ab190: 6d65 206c 696d 6974 6174 696f 6e73 2066 me limitations f │ │ │ │ +001ab1a0: 6f72 206d 6f64 756c 6520 696d 706f 7274 or module import │ │ │ │ +001ab1b0: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

    .
      .
    • │ │ │ │ +001ab1c0: 4120 6d6f 6475 6c65 206d 7573 7420 6265 A module must be │ │ │ │ +001ab1d0: 2069 6d70 6f72 7465 6420 696e 746f 2061 imported into a │ │ │ │ +001ab1e0: 6e6f 7468 6572 2069 6e74 6572 6661 6365 nother interface │ │ │ │ +001ab1f0: 2068 6561 6465 7220 746f 2075 7365 2074 header to use t │ │ │ │ +001ab200: 6865 206d 6f64 756c 6527 7320 7479 7065 he module's type │ │ │ │ +001ab210: 2064 6566 696e 6974 696f 6e73 2e3c 2f6c definitions..
    • When mult │ │ │ │ +001ab230: 6970 6c65 206d 6f64 756c 6573 2061 7265 iple modules are │ │ │ │ +001ab240: 2069 6d70 6f72 7465 642c 2074 6865 2074 imported, the t │ │ │ │ +001ab250: 7970 6573 2074 6861 7420 7468 6579 2064 ypes that they d │ │ │ │ +001ab260: 6563 6c61 7265 206d 7573 7420 6265 2064 eclare must be d │ │ │ │ +001ab270: 6563 6c61 7265 6420 696e 206f 6e65 206d eclared in one m │ │ │ │ +001ab280: 6f64 756c 6520 6f6e 6c79 2074 6f20 6176 odule only to av │ │ │ │ +001ab290: 6f69 6420 6e61 6d65 2063 6c61 7368 6573 oid name clashes │ │ │ │ +001ab2a0: 2061 6e64 206c 696e 6b20 6572 726f 7273 and link errors │ │ │ │ +001ab2b0: 2e20 596f 7520 6361 6e6e 6f74 2063 7265 . You cannot cre │ │ │ │ +001ab2c0: 6174 6520 7477 6f20 6d6f 6475 6c65 7320 ate two modules │ │ │ │ +001ab2d0: 7468 6174 2064 6563 6c61 7265 206f 7220 that declare or │ │ │ │ +001ab2e0: 7573 6520 7468 6520 7361 6d65 2074 7970 use the same typ │ │ │ │ +001ab2f0: 6520 616e 6420 696d 706f 7274 2074 6865 e and import the │ │ │ │ +001ab300: 7365 206d 6f64 756c 6573 2073 6570 6172 se modules separ │ │ │ │ +001ab310: 6174 656c 7920 696e 746f 2061 6e6f 7468 ately into anoth │ │ │ │ +001ab320: 6572 2068 6561 6465 7220 6669 6c65 2e20 er header file. │ │ │ │ +001ab330: 5768 656e 2075 7369 6e67 206d 6f64 756c When using modul │ │ │ │ +001ab340: 6573 2c20 636f 6e73 6964 6572 2063 7265 es, consider cre │ │ │ │ +001ab350: 6174 696e 6720 6120 6d6f 6475 6c65 2068 ating a module h │ │ │ │ +001ab360: 6965 7261 7263 6879 2073 7563 6820 7468 ierarchy such th │ │ │ │ +001ab370: 6174 2074 7970 6573 2061 7265 2064 6563 at types are dec │ │ │ │ +001ab380: 6c61 7265 6420 6f6e 6c79 206f 6e63 6520 lared only once │ │ │ │ +001ab390: 616e 6420 6279 206f 6e6c 7920 6f6e 6520 and by only one │ │ │ │ +001ab3a0: 6d6f 6475 6c65 2077 6865 6e20 7468 6573 module when thes │ │ │ │ +001ab3b0: 6520 6d6f 6475 6c65 7320 6d75 7374 2062 e modules must b │ │ │ │ +001ab3c0: 6520 6c69 6e6b 6564 2e3c 2f6c 693e 0a3c e linked.
    • .< │ │ │ │ +001ab3d0: 2f75 6c3e 0a3c 703e 5769 7468 206d 6f64 /ul>.

      With mod │ │ │ │ +001ab3e0: 756c 6573 2c20 7468 6520 736f 7572 6365 ules, the source │ │ │ │ +001ab3f0: 2063 6f64 6520 7365 7269 616c 697a 6572 code serializer │ │ │ │ +001ab400: 7320 666f 7220 7468 6520 7479 7065 7320 s for the types │ │ │ │ +001ab410: 6465 6669 6e65 6420 696e 2074 6865 206d defined in the m │ │ │ │ +001ab420: 6f64 756c 6573 2061 7265 2067 656e 6572 odules are gener │ │ │ │ +001ab430: 6174 6564 2077 6974 6820 736f 6170 6370 ated with soapcp │ │ │ │ +001ab440: 7032 2073 6570 6172 6174 656c 792e 2046 p2 separately. F │ │ │ │ +001ab450: 6f72 2065 7861 6d70 6c65 2c20 6173 7375 or example, assu │ │ │ │ +001ab460: 6d65 2074 6861 7420 7765 2068 6176 6520 me that we have │ │ │ │ +001ab470: 6120 6d6f 6475 6c65 203c 656d 3e3c 636f a module module.h:

      .
      /* Co │ │ │ │ +001ab4e0: 6e74 656e 7473 206f 6620 6669 6c65 2026 ntents of file & │ │ │ │ +001ab4f0: 7175 6f74 3b6d 6f64 756c 652e 6826 7175 quot;module.h&qu │ │ │ │ +001ab500: 6f74 3b20 2a2f 3c2f 7370 616e 3e3c 2f64 ot; */.
      #module "t │ │ │ │ +001ab550: 6573 7426 7175 6f74 3b3c 2f73 7061 6e3e est" │ │ │ │ +001ab560: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      │ │ │ │ 001ab580: 0a3c 6469 7620 636c 6173 733d 226c 696e .
      .
      struct ns__S
      .{ │ │ │ │ -001ab5f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
      .
      char *name;
      . │ │ │ │ -001ab640: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
      │ │ │ │ -001ab670: 696e 743c 2f73 7061 6e3e 2061 6d6f 756e int amoun │ │ │ │ -001ab680: 743b 3c2f 6469 763e 0a3c 6469 7620 636c t;
      .
      };.

      an │ │ │ │ -001ab6c0: 6420 6120 6865 6164 6572 2066 696c 6520 d a header file │ │ │ │ -001ab6d0: 3c65 6d3e 3c63 6f64 653e 6578 616d 706c exampl │ │ │ │ -001ab6e0: 652e 683c 2f63 6f64 653e 3c2f 656d 3e20 e.h │ │ │ │ -001ab6f0: 7468 6174 2075 7365 7320 6974 3a3c 2f70 that uses it:

      .
      │ │ │ │ -001ab740: 2f2a 2043 6f6e 7465 6e74 7320 6f66 2066 /* Contents of f │ │ │ │ -001ab750: 696c 6520 2671 756f 743b 6578 616d 706c ile "exampl │ │ │ │ -001ab760: 652e 6826 7175 6f74 3b20 2a2f 3c2f 7370 e.h" */
      .
      #import & │ │ │ │ -001ab7b0: 7175 6f74 3b6d 6f64 756c 652e 6826 7175 quot;module.h&qu │ │ │ │ -001ab7c0: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
      │ │ │ │ +001ab590: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e">struct │ │ │ │ +001ab5b0: 3c2f 7370 616e 3e6e 735f 5f53 3c2f 6469 ns__S.
      {
      . │ │ │ │ +001ab5f0: 2020 203c 7370 616e 2063 6c61 7373 3d22 cha │ │ │ │ +001ab610: 723c 2f73 7061 6e3e 202a 6e61 6d65 3b3c r *name;< │ │ │ │ +001ab620: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
      int │ │ │ │ +001ab660: 2061 6d6f 756e 743b 3c2f 6469 763e 0a3c amount;
      .< │ │ │ │ +001ab670: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001ab680: 3e7d 3b3c 2f64 6976 3e0a 3c2f 6469 763e >};
      .
    │ │ │ │ +001ab690: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    The module │ │ │ │ -001ab910: 2069 7320 636f 6d70 696c 6564 2061 7320 is compiled as │ │ │ │ -001ab920: 666f 6c6c 6f77 733a 203c 2f70 3e3c 7072 follows:

    soapcpp2 modu │ │ │ │ -001ab950: 6c65 312e 680a 3c2f 7072 653e 3c70 3e20 le1.h.

    │ │ │ │ -001ab960: 5468 6973 2067 656e 6572 6174 6573 2074 This generates t │ │ │ │ -001ab970: 6865 2066 696c 6573 203c 656d 3e3c 636f he files testStub.h, < │ │ │ │ -001ab9a0: 636f 6465 3e74 6573 7448 2e68 3c2f 636f code>testH.h, and testC.cp │ │ │ │ -001ab9d0: 703c 2f63 6f64 653e 3c2f 656d 3e20 7769 p wi │ │ │ │ -001ab9e0: 7468 2073 6572 6961 6c69 7a65 7273 2066 th serializers f │ │ │ │ -001ab9f0: 6f72 203c 636f 6465 3e73 7472 7563 7420 or struct │ │ │ │ -001aba00: 6e73 5f5f 533c 2f63 6f64 653e 2062 7574 ns__S but │ │ │ │ -001aba10: 2061 6c73 6f20 666f 7220 3c63 6f64 653e also for │ │ │ │ -001aba20: 6368 6172 2a3c 2f63 6f64 653e 2061 6e64 char* and │ │ │ │ -001aba30: 203c 636f 6465 3e69 6e74 3c2f 636f 6465 int.

    .

    Runnin │ │ │ │ -001aba50: 6720 736f 6170 6370 7032 206f 6e20 3c65 g soapcpp2 on example. │ │ │ │ -001aba70: 683c 2f63 6f64 653e 3c2f 656d 3e20 696d h im │ │ │ │ -001aba80: 706f 7274 7320 7468 6520 6d6f 6475 6c65 ports the module │ │ │ │ -001aba90: 2064 6566 696e 6974 696f 6e73 2c20 6275 definitions, bu │ │ │ │ -001abaa0: 7420 646f 6573 206e 6f74 2067 656e 6572 t does not gener │ │ │ │ -001abab0: 6174 6520 7365 7269 616c 697a 6572 7320 ate serializers │ │ │ │ -001abac0: 666f 7220 3c63 6f64 653e 7374 7275 6374 for struct │ │ │ │ -001abad0: 206e 735f 5f53 3c2f 636f 6465 3e2c 203c ns__S, < │ │ │ │ -001abae0: 636f 6465 3e63 6861 722a 3c2f 636f 6465 code>char* and int< │ │ │ │ -001abb00: 2f63 6f64 653e 2073 696e 6365 2074 6865 /code> since the │ │ │ │ -001abb10: 7365 2061 7265 2064 6566 696e 6564 2062 se are defined b │ │ │ │ -001abb20: 7920 3c65 6d3e 3c63 6f64 653e 6d6f 6475 y modu │ │ │ │ -001abb30: 6c65 2e68 3c2f 636f 6465 3e3c 2f65 6d3e le.h │ │ │ │ -001abb40: 3a20 3c2f 703e 3c70 7265 2063 6c61 7373 :

    soap
    │ │ │ │ -001abb60: 6370 7032 202d 434c 2065 7861 6d70 6c65  cpp2 -CL example
    │ │ │ │ -001abb70: 2e68 0a3c 2f70 7265 3e3c 703e 2041 6e20  .h.

    An │ │ │ │ -001abb80: 6578 616d 706c 6520 636c 6965 6e74 2061 example client a │ │ │ │ -001abb90: 7070 6c69 6361 7469 6f6e 2074 6861 7420 pplication that │ │ │ │ -001abba0: 6361 6c6c 7320 7468 6520 636c 6965 6e74 calls the client │ │ │ │ -001abbb0: 2073 7475 6220 6675 6e63 7469 6f6e 3a3c stub function:< │ │ │ │ -001abbc0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include │ │ │ │ -001abc10: 2671 756f 743b 736f 6170 482e 6826 7175 "soapH.h&qu │ │ │ │ -001abc20: 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 763e ot;
    │ │ │ │ -001abc30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #i │ │ │ │ -001abc60: 6e63 6c75 6465 2026 7175 6f74 3b6e 732e nclude "ns. │ │ │ │ -001abc70: 6e73 6d61 7026 7175 6f74 3b3c 2f73 7061 nsmap"
    .
    .
    i │ │ │ │ -001abcd0: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main() │ │ │ │ +001ab7e0: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e">int │ │ │ │ +001ab800: 3c2f 7370 616e 3e20 6e73 5f5f 7765 626d ns__webm │ │ │ │ +001ab810: 6574 686f 6428 3c73 7061 6e20 636c 6173 ethod(cons │ │ │ │ +001ab830: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ +001ab860: 636f 6465 2c20 3c73 7061 6e20 636c 6173 code, stru │ │ │ │ +001ab880: 6374 3c2f 7370 616e 3e20 6e73 5f5f 5320 ct ns__S │ │ │ │ +001ab890: 2a72 6563 6f72 642c 203c 7370 616e 2063 *record, int *r │ │ │ │ +001ab8c0: 6573 756c 7429 3b20 2020 203c 2f64 6976 esult);
    .

    The │ │ │ │ +001ab8f0: 6d6f 6475 6c65 2069 7320 636f 6d70 696c module is compil │ │ │ │ +001ab900: 6564 2061 7320 666f 6c6c 6f77 733a 203c ed as follows: < │ │ │ │ +001ab910: 2f70 3e3c 7072 6520 636c 6173 733d 2266 /p>

    soapcpp
    │ │ │ │ +001ab930: 3220 6d6f 6475 6c65 312e 680a 3c2f 7072  2 module1.h.

    This gener │ │ │ │ +001ab950: 6174 6573 2074 6865 2066 696c 6573 203c ates the files < │ │ │ │ +001ab960: 656d 3e3c 636f 6465 3e74 6573 7453 7475 em>testStu │ │ │ │ +001ab970: 622e 683c 2f63 6f64 653e 3c2f 656d 3e2c b.h, │ │ │ │ +001ab980: 203c 656d 3e3c 636f 6465 3e74 6573 7448 testH │ │ │ │ +001ab990: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2c20 .h, │ │ │ │ +001ab9a0: 616e 6420 3c65 6d3e 3c63 6f64 653e 7465 and te │ │ │ │ +001ab9b0: 7374 432e 6370 703c 2f63 6f64 653e 3c2f stC.cpp with seriali │ │ │ │ +001ab9d0: 7a65 7273 2066 6f72 203c 636f 6465 3e73 zers for s │ │ │ │ +001ab9e0: 7472 7563 7420 6e73 5f5f 533c 2f63 6f64 truct ns__S but also for │ │ │ │ +001aba00: 3c63 6f64 653e 6368 6172 2a3c 2f63 6f64 char* and int │ │ │ │ +001aba20: 3c2f 636f 6465 3e2e 3c2f 703e 0a3c 703e .

    .

    │ │ │ │ +001aba30: 5275 6e6e 696e 6720 736f 6170 6370 7032 Running soapcpp2 │ │ │ │ +001aba40: 206f 6e20 3c65 6d3e 3c63 6f64 653e 6578 on ex │ │ │ │ +001aba50: 616d 706c 652e 683c 2f63 6f64 653e 3c2f ample.h imports the │ │ │ │ +001aba70: 6d6f 6475 6c65 2064 6566 696e 6974 696f module definitio │ │ │ │ +001aba80: 6e73 2c20 6275 7420 646f 6573 206e 6f74 ns, but does not │ │ │ │ +001aba90: 2067 656e 6572 6174 6520 7365 7269 616c generate serial │ │ │ │ +001abaa0: 697a 6572 7320 666f 7220 3c63 6f64 653e izers for │ │ │ │ +001abab0: 7374 7275 6374 206e 735f 5f53 3c2f 636f struct ns__S, char* │ │ │ │ +001abad0: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and int sin │ │ │ │ +001abaf0: 6365 2074 6865 7365 2061 7265 2064 6566 ce these are def │ │ │ │ +001abb00: 696e 6564 2062 7920 3c65 6d3e 3c63 6f64 ined by module.h:

    soapcpp2 -CL e
    │ │ │ │ +001abb50: 7861 6d70 6c65 2e68 0a3c 2f70 7265 3e3c  xample.h.
    < │ │ │ │ +001abb60: 703e 2041 6e20 6578 616d 706c 6520 636c p> An example cl │ │ │ │ +001abb70: 6965 6e74 2061 7070 6c69 6361 7469 6f6e ient application │ │ │ │ +001abb80: 2074 6861 7420 6361 6c6c 7320 7468 6520 that calls the │ │ │ │ +001abb90: 636c 6965 6e74 2073 7475 6220 6675 6e63 client stub func │ │ │ │ +001abba0: 7469 6f6e 3a3c 2f70 3e0a 3c64 6976 2063 tion:

    .
    │ │ │ │ +001abbc0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in │ │ │ │ +001abbf0: 636c 7564 6520 2671 756f 743b 736f 6170 clude "soap │ │ │ │ +001abc00: 482e 6826 7175 6f74 3b3c 2f73 7061 6e3e H.h" │ │ │ │ +001abc10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #include &qu │ │ │ │ +001abc50: 6f74 3b6e 732e 6e73 6d61 7026 7175 6f74 ot;ns.nsmap" │ │ │ │ +001abc60: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ │ +001abc70: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001abc80: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    int │ │ │ │ +001abcc0: 6d61 696e 2829 3c2f 6469 763e 0a3c 6469 main()
    .{ │ │ │ │ 001abce0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ -001abd00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc │ │ │ │ -001abd30: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ -001abd60: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new(); │ │ │ │ -001abe00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct n │ │ │ │ -001abe40: 735f 5f53 2073 3b3c 2f64 6976 3e0a 3c64 s__S s;
    . │ │ │ │ -001abe60: 2020 736f 6170 5f64 6566 6175 6c74 5f6e soap_default_n │ │ │ │ -001abe70: 735f 5f53 283c 6120 636c 6173 733d 2263 s__S(soap │ │ │ │ -001abea0: 3c2f 613e 2c20 2661 6d70 3b73 293b 3c2f , &s);.
    s.name │ │ │ │ -001abed0: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_strd │ │ │ │ -001abf30: 7570 3c2f 613e 283c 6120 636c 6173 733d up(so │ │ │ │ -001abf60: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, "name&q │ │ │ │ -001abf90: 756f 743b 3c2f 7370 616e 3e29 3b3c 2f64 uot;);.
    s.amount │ │ │ │ -001abfc0: 203d 2031 3234 3b3c 2f64 6976 3e0a 3c64 = 124;
    . │ │ │ │ -001abfe0: 2020 3c73 7061 6e20 636c 6173 733d 226b int< │ │ │ │ -001ac000: 2f73 7061 6e3e 206e 3b3c 2f64 6976 3e0a /span> n;
    . │ │ │ │ -001ac010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    if │ │ │ │ -001ac040: 3c2f 7370 616e 3e20 2873 6f61 705f 6361 (soap_ca │ │ │ │ -001ac050: 6c6c 5f6e 735f 5f77 6562 6d65 7468 6f64 ll_ns__webmethod │ │ │ │ -001ac060: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001ac090: 2c20 656e 6470 6f69 6e74 2c20 4e55 4c4c , endpoint, NULL │ │ │ │ -001ac0a0: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ -001ac0c0: 756f 743b 636f 6465 2671 756f 743b 3c2f uot;code", &s, & │ │ │ │ -001ac0e0: 616d 703b 6e29 293c 2f64 6976 3e0a 3c64 amp;n))
    . │ │ │ │ -001ac100: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_prin │ │ │ │ -001ac160: 745f 6661 756c 743c 2f61 3e28 3c61 2063 t_fault(soap, std │ │ │ │ -001ac1a0: 6572 7229 3b3c 2f64 6976 3e0a 3c64 6976 err);
    .
    │ │ │ │ -001ac1c0: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    .
    │ │ │ │ -001ac200: 2020 7072 696e 7466 283c 7370 616e 2063 printf("OK n │ │ │ │ -001ac230: 3d20 2564 5c6e 2671 756f 743b 3c2f 7370 = %d\n", n);
    .< │ │ │ │ -001ac250: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001ac260: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_des │ │ │ │ -001ac2c0: 7472 6f79 3c2f 613e 283c 6120 636c 6173 troy( │ │ │ │ -001ac2f0: 736f 6170 3c2f 613e 293b 3c2f 6469 763e soap);
    │ │ │ │ -001ac300: 0a3c 6469 7620 636c 6173 733d 226c 696e ..< │ │ │ │ -001ac3b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001ac3c0: 3e20 203c 6120 636c 6173 733d 2263 6f64 > soap_fre │ │ │ │ -001ac420: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa │ │ │ │ -001ac450: 703c 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 p);
    . │ │ │ │ -001ac470: 7d3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 }
    .
    < │ │ │ │ -001ac490: 703e 5765 2063 6f6d 7069 6c65 2074 6869 p>We compile thi │ │ │ │ -001ac4a0: 7320 6578 616d 706c 6520 6173 2066 6f6c s example as fol │ │ │ │ -001ac4b0: 6c6f 7773 3a20 3c2f 703e 3c70 7265 2063 lows:

    │ │ │ │ -001ac4d0: 632b 2b20 2d6f 2065 7861 6d70 6c65 2065  c++ -o example e
    │ │ │ │ -001ac4e0: 7861 6d70 6c65 2e63 7070 2074 6573 7443  xample.cpp testC
    │ │ │ │ -001ac4f0: 2e63 7070 2073 6f61 7043 2e63 7070 2073  .cpp soapC.cpp s
    │ │ │ │ -001ac500: 6f61 7043 6c69 656e 742e 6370 7020 7374  oapClient.cpp st
    │ │ │ │ -001ac510: 6473 6f61 7032 2e63 7070 0a3c 2f70 7265  dsoap2.cpp.

    Modules may │ │ │ │ -001ac530: 2068 656c 7020 746f 2064 6566 696e 6520 help to define │ │ │ │ -001ac540: 6120 6d6f 6475 6c61 7220 6869 6572 6172 a modular hierar │ │ │ │ -001ac550: 6368 7920 6f66 206c 6962 7261 7269 6573 chy of libraries │ │ │ │ -001ac560: 2077 6974 6820 7265 7573 6162 6c65 2073 with reusable s │ │ │ │ -001ac570: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type │ │ │ │ -001ac580: 732e 3c2f 703e 0a3c 703e f09f 949d 203c s.

    .

    .... < │ │ │ │ -001ac590: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -001ac5a0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -001ac5b0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6832 ents

    .

    │ │ │ │ -001ac5e0: 3c2f 613e 0a50 6c75 6769 6e73 2c20 6d6f .Plugins, mo │ │ │ │ -001ac5f0: 6475 6c65 732c 2061 6e64 2065 7874 656e dules, and exten │ │ │ │ -001ac600: 7369 6f6e 733c 2f68 323e 0a3c 703e 506c sions

    .

    Pl │ │ │ │ -001ac610: 7567 696e 7320 6f66 6665 7220 6120 636f ugins offer a co │ │ │ │ -001ac620: 6e76 656e 6965 6e74 2065 7874 656e 7369 nvenient extensi │ │ │ │ -001ac630: 6f6e 206d 6563 6861 6e69 736d 2066 6f72 on mechanism for │ │ │ │ -001ac640: 2074 6865 2067 534f 4150 2074 6f6f 6c6b the gSOAP toolk │ │ │ │ -001ac650: 6974 2062 7920 6578 7465 6e64 696e 6720 it by extending │ │ │ │ -001ac660: 7468 6520 6361 7061 6269 6c69 7469 6573 the capabilities │ │ │ │ -001ac670: 206f 6620 6974 7320 656e 6769 6e65 2e20 of its engine. │ │ │ │ -001ac680: 5768 656e 2074 6865 2070 6c75 6769 6e20 When the plugin │ │ │ │ -001ac690: 7265 6769 7374 6572 7320 7769 7468 2074 registers with t │ │ │ │ -001ac6a0: 6865 2067 534f 4150 2065 6e67 696e 652c he gSOAP engine, │ │ │ │ -001ac6b0: 2069 7420 6861 7320 6675 6c6c 2061 6363 it has full acc │ │ │ │ -001ac6c0: 6573 7320 746f 2074 6865 2072 756e 2d74 ess to the run-t │ │ │ │ -001ac6d0: 696d 6520 7365 7474 696e 6773 2061 6e64 ime settings and │ │ │ │ -001ac6e0: 2074 6865 2065 6e67 696e 6527 7320 6675 the engine's fu │ │ │ │ -001ac6f0: 6e63 7469 6f6e 2063 616c 6c62 6163 6b73 nction callbacks │ │ │ │ -001ac700: 2e20 5570 6f6e 2072 6567 6973 7472 792c . Upon registry, │ │ │ │ -001ac710: 2074 6865 2070 6c75 6769 6e27 7320 6c6f the plugin's lo │ │ │ │ -001ac720: 6361 6c20 6461 7461 2069 7320 6173 736f cal data is asso │ │ │ │ -001ac730: 6369 6174 6564 2077 6974 6820 7468 6520 ciated with the │ │ │ │ -001ac740: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context. By ov │ │ │ │ -001ac7b0: 6572 7269 6469 6e67 2074 6865 2063 616c erriding the cal │ │ │ │ -001ac7c0: 6c62 6163 6b73 2077 6974 6820 7468 6520 lbacks with the │ │ │ │ -001ac7d0: 706c 7567 696e 2773 2063 616c 6c62 6163 plugin's callbac │ │ │ │ -001ac7e0: 6b73 2c20 7468 6520 706c 7567 696e 2065 ks, the plugin e │ │ │ │ -001ac7f0: 7874 656e 6473 206f 7220 6d6f 6469 6669 xtends or modifi │ │ │ │ -001ac800: 6573 2074 6865 2065 6e67 696e 6527 7320 es the engine's │ │ │ │ -001ac810: 6361 7061 6269 6c69 7469 6573 2e20 5468 capabilities. Th │ │ │ │ -001ac820: 6520 6c6f 6361 6c20 706c 7567 696e 2064 e local plugin d │ │ │ │ -001ac830: 6174 6120 6361 6e20 6265 2061 6363 6573 ata can be acces │ │ │ │ -001ac840: 7365 6420 7468 726f 7567 6820 6120 6c6f sed through a lo │ │ │ │ -001ac850: 6f6b 7570 2066 756e 6374 696f 6e2c 2075 okup function, u │ │ │ │ -001ac860: 7375 616c 6c79 2069 6e76 6f6b 6564 2077 sually invoked w │ │ │ │ -001ac870: 6974 6869 6e20 6120 6361 6c6c 6261 636b ithin a callback │ │ │ │ -001ac880: 2066 756e 6374 696f 6e20 746f 2061 6363 function to acc │ │ │ │ -001ac890: 6573 7320 7468 6520 706c 7567 696e 2064 ess the plugin d │ │ │ │ -001ac8a0: 6174 612e 2054 6865 2072 6567 6973 7472 ata. The registr │ │ │ │ -001ac8b0: 7920 616e 6420 6c6f 6f6b 7570 2066 756e y and lookup fun │ │ │ │ -001ac8c0: 6374 696f 6e73 2061 7265 3a3c 2f70 3e0a ctions are:

    . │ │ │ │ -001ac8d0: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    .int soap_regis │ │ │ │ -001acc50: 7465 725f 706c 7567 696e 5f61 7267 2873 ter_plugin_arg(s │ │ │ │ -001acc60: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -001acc70: 2c20 696e 7428 2a66 6372 6561 7465 2928 , int(*fcreate)( │ │ │ │ -001acc80: 7374 7275 6374 2073 6f61 7020 2a2c 2073 struct soap *, s │ │ │ │ -001acc90: 7472 7563 7420 736f 6170 5f70 6c75 6769 truct soap_plugi │ │ │ │ -001acca0: 6e20 2a2c 2076 6f69 6420 2a29 2c20 766f n *, void *), vo │ │ │ │ -001accb0: 6964 202a 6172 6729 3c2f 6469 763e 3c64 id *arg)
    Register a plug │ │ │ │ -001acce0: 696e 2077 6974 6820 616e 2061 7267 756d in with an argum │ │ │ │ -001accf0: 656e 742e 3c2f 6469 763e 3c2f 6469 763e ent.
    │ │ │ │ -001acd00: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .
    < │ │ │ │ -001acd30: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001acd40: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ -001acd60: 2f73 7061 6e3e 2a20 736f 6170 5f6c 6f6f /span>* soap_loo │ │ │ │ -001acd70: 6b75 705f 706c 7567 696e 283c 7370 616e kup_plugin(struct < │ │ │ │ -001acda0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001acdb0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001acdc0: 6874 6d6c 223e 736f 6170 3c2f 613e 2a2c html">soap*, │ │ │ │ -001acdd0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ -001ace10: 6172 3c2f 7370 616e 3e2a 293b 3c2f 6469 ar*);.

    The │ │ │ │ -001ace40: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_copy< │ │ │ │ -001acf00: 2f63 6f64 653e 2066 756e 6374 696f 6e20 /code> function │ │ │ │ -001acf10: 7265 7475 726e 7320 6120 6e65 7720 6479 returns a new dy │ │ │ │ -001acf20: 6e61 6d69 6361 6c6c 7920 616c 6c6f 6361 namically alloca │ │ │ │ -001acf30: 7465 6420 3c63 6f64 653e 3c61 2063 6c61 ted soap context th │ │ │ │ -001acfa0: 6174 2069 7320 6120 636f 7079 206f 6620 at is a copy of │ │ │ │ -001acfb0: 616e 6f74 6865 722c 2073 7563 6820 7468 another, such th │ │ │ │ -001acfc0: 6174 206e 6f20 6461 7461 2069 7320 7368 at no data is sh │ │ │ │ -001acfd0: 6172 6564 2062 6574 7765 656e 2074 6865 ared between the │ │ │ │ -001acfe0: 2063 6f70 7920 616e 6420 7468 6520 6f72 copy and the or │ │ │ │ -001acff0: 6967 696e 616c 2063 6f6e 7465 7874 2e20 iginal context. │ │ │ │ -001ad000: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The soap_copy functi │ │ │ │ -001ad0d0: 6f6e 2069 6e76 6f6b 6573 2074 6865 2063 on invokes the c │ │ │ │ -001ad0e0: 6f70 7920 6675 6e63 7469 6f6e 7320 6f66 opy functions of │ │ │ │ -001ad0f0: 2074 6865 2072 6567 6973 7465 7265 6420 the registered │ │ │ │ -001ad100: 706c 7567 696e 7320 746f 2063 6f70 7920 plugins to copy │ │ │ │ -001ad110: 7468 6520 706c 7567 696e 7327 206c 6f63 the plugins' loc │ │ │ │ -001ad120: 616c 2064 6174 612e 2054 6865 203c 636f al data. The soap_done │ │ │ │ -001ad200: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and │ │ │ │ -001ad210: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_free< │ │ │ │ -001ad2c0: 2f61 3e3c 2f63 6f64 653e 2066 756e 6374 /a> funct │ │ │ │ -001ad2d0: 696f 6e73 2064 652d 7265 6769 7374 6572 ions de-register │ │ │ │ -001ad2e0: 7320 616c 6c20 706c 7567 696e 2e3c 2f70 s all plugin.

    .

    The follow │ │ │ │ -001ad300: 6578 616d 706c 6520 6f76 6572 7269 6465 example override │ │ │ │ -001ad310: 7320 7468 6520 7365 6e64 2061 6e64 2072 s the send and r │ │ │ │ -001ad320: 6563 6569 7665 2063 616c 6c62 6163 6b73 eceive callbacks │ │ │ │ -001ad330: 2074 6f20 636f 7079 2061 6c6c 206d 6573 to copy all mes │ │ │ │ -001ad340: 7361 6765 7320 7468 6174 2061 7265 2073 sages that are s │ │ │ │ -001ad350: 656e 7420 616e 6420 7265 6365 6976 6564 ent and received │ │ │ │ -001ad360: 2074 6f20 7468 6520 7465 726d 696e 616c to the terminal │ │ │ │ -001ad370: 2028 7374 6465 7272 292e 3c2f 703e 0a3c (stderr).

    .< │ │ │ │ -001ad380: 703e 4669 7273 742c 2077 6520 7772 6974 p>First, we writ │ │ │ │ -001ad390: 6520 6120 6865 6164 6572 2066 696c 6520 e a header file │ │ │ │ -001ad3a0: 3c65 6d3e 3c63 6f64 653e 706c 7567 696e plugin │ │ │ │ -001ad3b0: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2074 .h t │ │ │ │ -001ad3c0: 6f20 6465 6669 6e65 2074 6865 206c 6f63 o define the loc │ │ │ │ -001ad3d0: 616c 2070 6c75 6769 6e20 6461 7461 2073 al plugin data s │ │ │ │ -001ad3e0: 7472 7563 7475 7265 2873 2920 616e 6420 tructure(s) and │ │ │ │ -001ad3f0: 7765 2064 6566 696e 6520 6120 676c 6f62 we define a glob │ │ │ │ -001ad400: 616c 206e 616d 6520 746f 2069 6465 6e74 al name to ident │ │ │ │ -001ad410: 6966 7920 7468 6520 706c 7567 696e 3a3c ify the plugin:< │ │ │ │ -001ad420: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    │ │ │ │ -001ad4c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    #d │ │ │ │ -001ad4f0: 6566 696e 6520 504c 5547 494e 5f49 4420 efine PLUGIN_ID │ │ │ │ -001ad500: 2671 756f 743b 504c 5547 494e 2d31 2e30 "PLUGIN-1.0 │ │ │ │ -001ad510: 2671 756f 743b 3c2f 7370 616e 3e20 3c73 " // some name │ │ │ │ -001ad540: 2074 6f20 6964 656e 7469 6679 2070 6c75 to identify plu │ │ │ │ -001ad550: 6769 6e20 3c2f 7370 616e 3e3c 2f64 6976 gin
    struct < │ │ │ │ +001abd20: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001abd30: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001abd40: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +001abd50: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +001abd80: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new< │ │ │ │ +001abde0: 2f61 3e28 293b 3c2f 6469 763e 0a3c 6469 /a>();
    . │ │ │ │ +001abe00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct ns__S s;.
    soap_def │ │ │ │ +001abe50: 6175 6c74 5f6e 735f 5f53 283c 6120 636c ault_ns__S(soap, & │ │ │ │ +001abe90: 3b73 293b 3c2f 6469 763e 0a3c 6469 7620 ;s);
    .
    s │ │ │ │ +001abeb0: 2e6e 616d 6520 3d20 3c61 2063 6c61 7373 .name = soa │ │ │ │ +001abf10: 705f 7374 7264 7570 3c2f 613e 283c 6120 p_strdup(soap, " │ │ │ │ +001abf70: 6e61 6d65 2671 756f 743b 3c2f 7370 616e name");
    .
    s. │ │ │ │ +001abfa0: 616d 6f75 6e74 203d 2031 3234 3b3c 2f64 amount = 124;.
    int n;< │ │ │ │ +001abff0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if (s │ │ │ │ +001ac030: 6f61 705f 6361 6c6c 5f6e 735f 5f77 6562 oap_call_ns__web │ │ │ │ +001ac040: 6d65 7468 6f64 283c 6120 636c 6173 733d method(so │ │ │ │ +001ac070: 6170 3c2f 613e 2c20 656e 6470 6f69 6e74 ap, endpoint │ │ │ │ +001ac080: 2c20 4e55 4c4c 2c20 3c73 7061 6e20 636c , NULL, "code&q │ │ │ │ +001ac0b0: 756f 743b 3c2f 7370 616e 3e2c 2026 616d uot;, &am │ │ │ │ +001ac0c0: 703b 732c 2026 616d 703b 6e29 293c 2f64 p;s, &n))..
    │ │ │ │ +001ac1c0: 656c 7365 3c2f 7370 616e 3e3c 2f64 6976 else
    .
    printf(< │ │ │ │ +001ac1f0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +001ac200: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +001ac210: 3b4f 4b20 6e20 3d20 2564 5c6e 2671 756f ;OK n = %d\n&quo │ │ │ │ +001ac220: 743b 3c2f 7370 616e 3e2c 206e 293b 3c2f t;, n);.
    so │ │ │ │ +001ac2a0: 6170 5f64 6573 7472 6f79 3c2f 613e 283c ap_destroy(< │ │ │ │ +001ac2b0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001ac2c0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001ac2d0: 6874 6d6c 223e 736f 6170 3c2f 613e 293b html">soap); │ │ │ │ +001ac2e0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001ac350: 736f 6170 5f65 6e64 3c2f 613e 283c 6120 soap_end(soap);.
    so │ │ │ │ +001ac400: 6170 5f66 7265 653c 2f61 3e28 3c61 2063 ap_free(soap);.
    }
    .

    We compi │ │ │ │ +001ac480: 6c65 2074 6869 7320 6578 616d 706c 6520 le this example │ │ │ │ +001ac490: 6173 2066 6f6c 6c6f 7773 3a20 3c2f 703e as follows:

    │ │ │ │ +001ac4a0: 3c70 7265 2063 6c61 7373 3d22 6672 6167
    c++ -o exa
    │ │ │ │ +001ac4c0: 6d70 6c65 2065 7861 6d70 6c65 2e63 7070  mple example.cpp
    │ │ │ │ +001ac4d0: 2074 6573 7443 2e63 7070 2073 6f61 7043   testC.cpp soapC
    │ │ │ │ +001ac4e0: 2e63 7070 2073 6f61 7043 6c69 656e 742e  .cpp soapClient.
    │ │ │ │ +001ac4f0: 6370 7020 7374 6473 6f61 7032 2e63 7070  cpp stdsoap2.cpp
    │ │ │ │ +001ac500: 0a3c 2f70 7265 3e3c 703e 204d 6f64 756c  .

    Modul │ │ │ │ +001ac510: 6573 206d 6179 2068 656c 7020 746f 2064 es may help to d │ │ │ │ +001ac520: 6566 696e 6520 6120 6d6f 6475 6c61 7220 efine a modular │ │ │ │ +001ac530: 6869 6572 6172 6368 7920 6f66 206c 6962 hierarchy of lib │ │ │ │ +001ac540: 7261 7269 6573 2077 6974 6820 7265 7573 raries with reus │ │ │ │ +001ac550: 6162 6c65 2073 6572 6961 6c69 7a61 626c able serializabl │ │ │ │ +001ac560: 6520 7479 7065 732e 3c2f 703e 0a3c 703e e types.

    .

    │ │ │ │ +001ac570: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +001ac590: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .Plugi │ │ │ │ +001ac5d0: 6e73 2c20 6d6f 6475 6c65 732c 2061 6e64 ns, modules, and │ │ │ │ +001ac5e0: 2065 7874 656e 7369 6f6e 733c 2f68 323e extensions

    │ │ │ │ +001ac5f0: 0a3c 703e 506c 7567 696e 7320 6f66 6665 .

    Plugins offe │ │ │ │ +001ac600: 7220 6120 636f 6e76 656e 6965 6e74 2065 r a convenient e │ │ │ │ +001ac610: 7874 656e 7369 6f6e 206d 6563 6861 6e69 xtension mechani │ │ │ │ +001ac620: 736d 2066 6f72 2074 6865 2067 534f 4150 sm for the gSOAP │ │ │ │ +001ac630: 2074 6f6f 6c6b 6974 2062 7920 6578 7465 toolkit by exte │ │ │ │ +001ac640: 6e64 696e 6720 7468 6520 6361 7061 6269 nding the capabi │ │ │ │ +001ac650: 6c69 7469 6573 206f 6620 6974 7320 656e lities of its en │ │ │ │ +001ac660: 6769 6e65 2e20 5768 656e 2074 6865 2070 gine. When the p │ │ │ │ +001ac670: 6c75 6769 6e20 7265 6769 7374 6572 7320 lugin registers │ │ │ │ +001ac680: 7769 7468 2074 6865 2067 534f 4150 2065 with the gSOAP e │ │ │ │ +001ac690: 6e67 696e 652c 2069 7420 6861 7320 6675 ngine, it has fu │ │ │ │ +001ac6a0: 6c6c 2061 6363 6573 7320 746f 2074 6865 ll access to the │ │ │ │ +001ac6b0: 2072 756e 2d74 696d 6520 7365 7474 696e run-time settin │ │ │ │ +001ac6c0: 6773 2061 6e64 2074 6865 2065 6e67 696e gs and the engin │ │ │ │ +001ac6d0: 6527 7320 6675 6e63 7469 6f6e 2063 616c e's function cal │ │ │ │ +001ac6e0: 6c62 6163 6b73 2e20 5570 6f6e 2072 6567 lbacks. Upon reg │ │ │ │ +001ac6f0: 6973 7472 792c 2074 6865 2070 6c75 6769 istry, the plugi │ │ │ │ +001ac700: 6e27 7320 6c6f 6361 6c20 6461 7461 2069 n's local data i │ │ │ │ +001ac710: 7320 6173 736f 6369 6174 6564 2077 6974 s associated wit │ │ │ │ +001ac720: 6820 7468 6520 3c63 6f64 653e 3c61 2063 h the soap │ │ │ │ +001ac780: 3c2f 636f 6465 3e20 636f 6e74 6578 742e context. │ │ │ │ +001ac790: 2042 7920 6f76 6572 7269 6469 6e67 2074 By overriding t │ │ │ │ +001ac7a0: 6865 2063 616c 6c62 6163 6b73 2077 6974 he callbacks wit │ │ │ │ +001ac7b0: 6820 7468 6520 706c 7567 696e 2773 2063 h the plugin's c │ │ │ │ +001ac7c0: 616c 6c62 6163 6b73 2c20 7468 6520 706c allbacks, the pl │ │ │ │ +001ac7d0: 7567 696e 2065 7874 656e 6473 206f 7220 ugin extends or │ │ │ │ +001ac7e0: 6d6f 6469 6669 6573 2074 6865 2065 6e67 modifies the eng │ │ │ │ +001ac7f0: 696e 6527 7320 6361 7061 6269 6c69 7469 ine's capabiliti │ │ │ │ +001ac800: 6573 2e20 5468 6520 6c6f 6361 6c20 706c es. The local pl │ │ │ │ +001ac810: 7567 696e 2064 6174 6120 6361 6e20 6265 ugin data can be │ │ │ │ +001ac820: 2061 6363 6573 7365 6420 7468 726f 7567 accessed throug │ │ │ │ +001ac830: 6820 6120 6c6f 6f6b 7570 2066 756e 6374 h a lookup funct │ │ │ │ +001ac840: 696f 6e2c 2075 7375 616c 6c79 2069 6e76 ion, usually inv │ │ │ │ +001ac850: 6f6b 6564 2077 6974 6869 6e20 6120 6361 oked within a ca │ │ │ │ +001ac860: 6c6c 6261 636b 2066 756e 6374 696f 6e20 llback function │ │ │ │ +001ac870: 746f 2061 6363 6573 7320 7468 6520 706c to access the pl │ │ │ │ +001ac880: 7567 696e 2064 6174 612e 2054 6865 2072 ugin data. The r │ │ │ │ +001ac890: 6567 6973 7472 7920 616e 6420 6c6f 6f6b egistry and look │ │ │ │ +001ac8a0: 7570 2066 756e 6374 696f 6e73 2061 7265 up functions are │ │ │ │ +001ac8b0: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int soap_regi │ │ │ │ +001ac960: 7374 6572 5f70 6c75 6769 6e5f 6172 673c ster_plugin_arg< │ │ │ │ +001ac970: 2f61 3e28 3c73 7061 6e20 636c 6173 733d /a>(struct │ │ │ │ +001ac990: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 s │ │ │ │ +001ac9c0: 6f61 703c 2f61 3e20 2a3c 6120 636c 6173 oap * │ │ │ │ +001ac9f0: 736f 6170 3c2f 613e 2c20 3c73 7061 6e20 soap, int ( │ │ │ │ +001aca20: 2a66 6372 6561 7465 2928 3c73 7061 6e20 *fcreate)( │ │ │ │ +001aca40: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ +001aca80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001aca90: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001acaa0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001acab0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap_plugin │ │ │ │ +001acae0: 2a70 2c20 3c73 7061 6e20 636c 6173 733d *p, vo │ │ │ │ +001acb00: 6964 3c2f 7370 616e 3e20 2a61 7267 292c id *arg), │ │ │ │ +001acb10: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ │ +001acb30: 2f73 7061 6e3e 202a 6172 6729 3c2f 6469 /span> *arg).
    soap_register_ │ │ │ │ +001acc00: 706c 7567 696e 5f61 7267 3c2f 613e 3c2f plugin_arg
    int soap │ │ │ │ +001acc30: 5f72 6567 6973 7465 725f 706c 7567 696e _register_plugin │ │ │ │ +001acc40: 5f61 7267 2873 7472 7563 7420 736f 6170 _arg(struct soap │ │ │ │ +001acc50: 202a 736f 6170 2c20 696e 7428 2a66 6372 *soap, int(*fcr │ │ │ │ +001acc60: 6561 7465 2928 7374 7275 6374 2073 6f61 eate)(struct soa │ │ │ │ +001acc70: 7020 2a2c 2073 7472 7563 7420 736f 6170 p *, struct soap │ │ │ │ +001acc80: 5f70 6c75 6769 6e20 2a2c 2076 6f69 6420 _plugin *, void │ │ │ │ +001acc90: 2a29 2c20 766f 6964 202a 6172 6729 3c2f *), void *arg)
    Register │ │ │ │ +001accc0: 6120 706c 7567 696e 2077 6974 6820 616e a plugin with an │ │ │ │ +001accd0: 2061 7267 756d 656e 742e 3c2f 6469 763e argument.
    │ │ │ │ +001acce0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .
    < │ │ │ │ +001acd00: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +001acd10: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    void* so │ │ │ │ +001acd50: 6170 5f6c 6f6f 6b75 705f 706c 7567 696e ap_lookup_plugin │ │ │ │ +001acd60: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ +001acdb0: 3c2f 613e 2a2c 203c 7370 616e 2063 6c61 *, con │ │ │ │ +001acdd0: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char* │ │ │ │ +001ace00: 293b 3c2f 6469 763e 0a3c 2f64 6976 3e3c );
    .
    < │ │ │ │ +001ace10: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +001ace20: 3c70 3e54 6865 203c 636f 6465 3e3c 6120

    The soap_cop │ │ │ │ +001acee0: 793c 2f61 3e3c 2f63 6f64 653e 2066 756e y fun │ │ │ │ +001acef0: 6374 696f 6e20 7265 7475 726e 7320 6120 ction returns a │ │ │ │ +001acf00: 6e65 7720 6479 6e61 6d69 6361 6c6c 7920 new dynamically │ │ │ │ +001acf10: 616c 6c6f 6361 7465 6420 3c63 6f64 653e allocated │ │ │ │ +001acf20: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ +001acf70: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ +001acf80: 6578 7420 7468 6174 2069 7320 6120 636f ext that is a co │ │ │ │ +001acf90: 7079 206f 6620 616e 6f74 6865 722c 2073 py of another, s │ │ │ │ +001acfa0: 7563 6820 7468 6174 206e 6f20 6461 7461 uch that no data │ │ │ │ +001acfb0: 2069 7320 7368 6172 6564 2062 6574 7765 is shared betwe │ │ │ │ +001acfc0: 656e 2074 6865 2063 6f70 7920 616e 6420 en the copy and │ │ │ │ +001acfd0: 7468 6520 6f72 6967 696e 616c 2063 6f6e the original con │ │ │ │ +001acfe0: 7465 7874 2e20 5468 6520 3c63 6f64 653e text. The │ │ │ │ +001acff0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ │ │ │ │ +001ad0a0: 636f 7079 3c2f 613e 3c2f 636f 6465 3e20 copy │ │ │ │ +001ad0b0: 6675 6e63 7469 6f6e 2069 6e76 6f6b 6573 function invokes │ │ │ │ +001ad0c0: 2074 6865 2063 6f70 7920 6675 6e63 7469 the copy functi │ │ │ │ +001ad0d0: 6f6e 7320 6f66 2074 6865 2072 6567 6973 ons of the regis │ │ │ │ +001ad0e0: 7465 7265 6420 706c 7567 696e 7320 746f tered plugins to │ │ │ │ +001ad0f0: 2063 6f70 7920 7468 6520 706c 7567 696e copy the plugin │ │ │ │ +001ad100: 7327 206c 6f63 616c 2064 6174 612e 2054 s' local data. T │ │ │ │ +001ad110: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soa │ │ │ │ +001ad1e0: 705f 646f 6e65 3c2f 613e 3c2f 636f 6465 p_done and soap │ │ │ │ +001ad2a0: 5f66 7265 653c 2f61 3e3c 2f63 6f64 653e _free │ │ │ │ +001ad2b0: 2066 756e 6374 696f 6e73 2064 652d 7265 functions de-re │ │ │ │ +001ad2c0: 6769 7374 6572 7320 616c 6c20 706c 7567 gisters all plug │ │ │ │ +001ad2d0: 696e 2e3c 2f70 3e0a 3c70 3e54 6865 2066 in.

    .

    The f │ │ │ │ +001ad2e0: 6f6c 6c6f 7720 6578 616d 706c 6520 6f76 ollow example ov │ │ │ │ +001ad2f0: 6572 7269 6465 7320 7468 6520 7365 6e64 errides the send │ │ │ │ +001ad300: 2061 6e64 2072 6563 6569 7665 2063 616c and receive cal │ │ │ │ +001ad310: 6c62 6163 6b73 2074 6f20 636f 7079 2061 lbacks to copy a │ │ │ │ +001ad320: 6c6c 206d 6573 7361 6765 7320 7468 6174 ll messages that │ │ │ │ +001ad330: 2061 7265 2073 656e 7420 616e 6420 7265 are sent and re │ │ │ │ +001ad340: 6365 6976 6564 2074 6f20 7468 6520 7465 ceived to the te │ │ │ │ +001ad350: 726d 696e 616c 2028 7374 6465 7272 292e rminal (stderr). │ │ │ │ +001ad360: 3c2f 703e 0a3c 703e 4669 7273 742c 2077

    .

    First, w │ │ │ │ +001ad370: 6520 7772 6974 6520 6120 6865 6164 6572 e write a header │ │ │ │ +001ad380: 2066 696c 6520 3c65 6d3e 3c63 6f64 653e file │ │ │ │ +001ad390: 706c 7567 696e 2e68 3c2f 636f 6465 3e3c plugin.h< │ │ │ │ +001ad3a0: 2f65 6d3e 2074 6f20 6465 6669 6e65 2074 /em> to define t │ │ │ │ +001ad3b0: 6865 206c 6f63 616c 2070 6c75 6769 6e20 he local plugin │ │ │ │ +001ad3c0: 6461 7461 2073 7472 7563 7475 7265 2873 data structure(s │ │ │ │ +001ad3d0: 2920 616e 6420 7765 2064 6566 696e 6520 ) and we define │ │ │ │ +001ad3e0: 6120 676c 6f62 616c 206e 616d 6520 746f a global name to │ │ │ │ +001ad3f0: 2069 6465 6e74 6966 7920 7468 6520 706c identify the pl │ │ │ │ +001ad400: 7567 696e 3a3c 2f70 3e0a 3c64 6976 2063 ugin:

    .
    │ │ │ │ +001ad420: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in │ │ │ │ +001ad450: 636c 7564 6520 2671 756f 743b 3c61 2063 clude "stdsoap2.h" │ │ │ │ +001ad4a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    #define PLUG │ │ │ │ +001ad4e0: 494e 5f49 4420 2671 756f 743b 504c 5547 IN_ID "PLUG │ │ │ │ +001ad4f0: 494e 2d31 2e30 2671 756f 743b 3c2f 7370 IN-1.0" // som │ │ │ │ +001ad520: 6520 6e61 6d65 2074 6f20 6964 656e 7469 e name to identi │ │ │ │ +001ad530: 6679 2070 6c75 6769 6e20 3c2f 7370 616e fy plugin
    .
    .
    .
    struct plugin_data // local plu │ │ │ │ -001ad5e0: 6769 6e20 6461 7461 203c 2f73 7061 6e3e gin data │ │ │ │ +001ad570: 6e65 223e 3c73 7061 6e20 636c 6173 733d ne">struct │ │ │ │ +001ad590: 203c 2f73 7061 6e3e 706c 7567 696e 5f64 plugin_d │ │ │ │ +001ad5a0: 6174 6120 3c73 7061 6e20 636c 6173 733d ata // loc │ │ │ │ +001ad5c0: 616c 2070 6c75 6769 6e20 6461 7461 203c al plugin data < │ │ │ │ +001ad5d0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .{ │ │ │ │ 001ad5f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ -001ad610: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int (*fsend │ │ │ │ -001ad630: 2928 3c73 7061 6e20 636c 6173 733d 226b )(struct < │ │ │ │ -001ad650: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ -001ad680: 703c 2f61 3e2a 2c20 3c73 7061 6e20 636c p*, co │ │ │ │ -001ad6a0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -001ad6d0: 2a2c 2073 697a 655f 7429 3b20 3c73 7061 *, size_t); // to save and │ │ │ │ -001ad700: 2075 7365 2073 656e 6420 6361 6c6c 6261 use send callba │ │ │ │ -001ad710: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
    │ │ │ │ -001ad720: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    }; │ │ │ │ -001ad880: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    int p │ │ │ │ -001ad8c0: 6c75 6769 6e28 3c73 7061 6e20 636c 6173 lugin(stru │ │ │ │ -001ad8e0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, struct │ │ │ │ -001ad970: 736f 6170 5f70 6c75 6769 6e20 2a70 6c75 soap_plugin *plu │ │ │ │ -001ad980: 6769 6e2c 203c 7370 616e 2063 6c61 7373 gin, v │ │ │ │ -001ad9a0: 6f69 643c 2f73 7061 6e3e 202a 6172 6729 oid *arg) │ │ │ │ -001ad9b0: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    │ │ │ │ -001ad9e0: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    s │ │ │ │ -001ada10: 7464 736f 6170 322e 683c 2f61 3e3c 2f64 tdsoap2.h
    This file │ │ │ │ -001ada40: 6465 6669 6e65 7320 7468 6520 636f 6d6d defines the comm │ │ │ │ -001ada50: 6f6e 206d 6163 726f 732c 2074 7970 6573 on macros, types │ │ │ │ -001ada60: 2061 6e64 2066 756e 6374 696f 6e73 206f and functions o │ │ │ │ -001ada70: 6620 7468 6520 6753 4f41 5020 4150 4920 f the gSOAP API │ │ │ │ -001ada80: 6772 6f75 7065 6420 6279 206d 6f64 756c grouped by modul │ │ │ │ -001ada90: 6573 3c2f 6469 763e 3c2f 6469 763e 0a3c es
    .< │ │ │ │ -001adaa0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    Then, w │ │ │ │ -001adac0: 6520 7772 6974 6520 7468 6520 706c 7567 e write the plug │ │ │ │ -001adad0: 696e 2072 6567 6973 7472 7920 6675 6e63 in registry func │ │ │ │ -001adae0: 7469 6f6e 2061 6e64 2074 6865 2063 616c tion and the cal │ │ │ │ -001adaf0: 6c62 6163 6b73 3a3c 2f70 3e0a 3c64 6976 lbacks:

    .
    # │ │ │ │ -001adb40: 696e 636c 7564 6520 2671 756f 743b 706c include "pl │ │ │ │ -001adb50: 7567 696e 2e68 2671 756f 743b 3c2f 7370 ugin.h"
    .
    .
    sta │ │ │ │ -001adbb0: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic const char plugin_id[] │ │ │ │ -001adc10: 3d20 504c 5547 494e 5f49 443b 203c 7370 = PLUGIN_ID; // the plugin │ │ │ │ -001adc40: 2069 6420 3c2f 7370 616e 3e3c 2f64 6976 id
    .
    static │ │ │ │ -001adc80: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int plu │ │ │ │ -001adcb0: 6769 6e5f 696e 6974 283c 7370 616e 2063 gin_init(s │ │ │ │ -001adcd0: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ -001add40: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001add50: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct plugin_data * │ │ │ │ -001add70: 6461 7461 293b 203c 2f64 6976 3e0a 3c64 data);
    . │ │ │ │ -001add90: 3c73 7061 6e20 636c 6173 733d 226b 6579 static in │ │ │ │ -001addd0: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_ │ │ │ │ -001adde0: 636f 7079 283c 7370 616e 2063 6c61 7373 copy(struc │ │ │ │ -001ade00: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -001ade30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s │ │ │ │ -001ade90: 6f61 705f 706c 7567 696e 202a 6473 742c oap_plugin *dst, │ │ │ │ -001adea0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct
    soap_plugin │ │ │ │ -001aded0: 202a 7372 6329 3b20 3c2f 6469 763e 0a3c *src);
    .< │ │ │ │ -001adee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001adef0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static
    v │ │ │ │ -001adf30: 6f69 643c 2f73 7061 6e3e 2070 6c75 6769 oid plugi │ │ │ │ -001adf40: 6e5f 6465 6c65 7465 283c 7370 616e 2063 n_delete(s │ │ │ │ -001adf60: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ -001adfd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001adfe0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap_plugin * │ │ │ │ -001ae000: 7029 3b20 3c2f 6469 763e 0a3c 6469 7620 p);
    .
    static │ │ │ │ -001ae040: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int plugin_sen │ │ │ │ -001ae070: 6428 3c73 7061 6e20 636c 6173 733d 226b d(struct soa │ │ │ │ -001ae0c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -001ae0f0: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, co │ │ │ │ -001ae110: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -001ae140: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *buf, si │ │ │ │ -001ae1b0: 7a65 5f74 3c2f 7370 616e 3e20 6c65 6e29 ze_t len) │ │ │ │ -001ae1c0: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    static < │ │ │ │ -001ae200: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001ae210: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype">size_t< │ │ │ │ -001ae220: 2f73 7061 6e3e 2070 6c75 6769 6e5f 7265 /span> plugin_re │ │ │ │ -001ae230: 6376 283c 7370 616e 2063 6c61 7373 3d22 cv(struct< │ │ │ │ -001ae250: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ -001ae280: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ -001ae2b0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, char * │ │ │ │ -001ae2e0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 buf │ │ │ │ -001ae330: 2c20 3c73 7061 6e20 636c 6173 733d 226b , size │ │ │ │ -001ae350: 5f74 3c2f 7370 616e 3e20 6c65 6e29 3b20 _t len); │ │ │ │ +001ad600: 733d 226c 696e 6522 3e20 2069 6e74 2028 s="line"> int ( │ │ │ │ +001ad610: 2a66 7365 6e64 2928 3c73 7061 6e20 636c *fsend)(st │ │ │ │ +001ad630: 7275 6374 203c 2f73 7061 6e3e 3c61 2063 ruct soap*, const │ │ │ │ +001ad690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001ad6b0: 2f73 7061 6e3e 2a2c 2073 697a 655f 7429 /span>*, size_t) │ │ │ │ +001ad6c0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // to sa │ │ │ │ +001ad6e0: 7665 2061 6e64 2075 7365 2073 656e 6420 ve and use send │ │ │ │ +001ad6f0: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback │ │ │ │ +001ad700: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_ │ │ │ │ +001ad720: 7420 282a 3c61 2063 6c61 7373 3d22 636f t (*frecv │ │ │ │ +001ad780: 3c2f 613e 2928 3c73 7061 6e20 636c 6173 )(stru │ │ │ │ +001ad7a0: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap*, char*, size_t); // to save an │ │ │ │ +001ad830: 6420 7573 6520 7265 6376 2063 616c 6c62 d use recv callb │ │ │ │ +001ad840: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack
    .
    };
    . │ │ │ │ +001ad880: 3c73 7061 6e20 636c 6173 733d 226b 6579 int
    plugin(struct │ │ │ │ +001ad8d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +001ad900: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +001ad930: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi │ │ │ │ +001ad960: 6e20 2a70 6c75 6769 6e2c 203c 7370 616e n *plugin, void │ │ │ │ +001ad990: 202a 6172 6729 3b3c 2f64 6976 3e0a 3c64 *arg);
    ..

    T │ │ │ │ +001adaa0: 6865 6e2c 2077 6520 7772 6974 6520 7468 hen, we write th │ │ │ │ +001adab0: 6520 706c 7567 696e 2072 6567 6973 7472 e plugin registr │ │ │ │ +001adac0: 7920 6675 6e63 7469 6f6e 2061 6e64 2074 y function and t │ │ │ │ +001adad0: 6865 2063 616c 6c62 6163 6b73 3a3c 2f70 he callbacks:

    .
    #include &q │ │ │ │ +001adb30: 756f 743b 706c 7567 696e 2e68 2671 756f uot;plugin.h&quo │ │ │ │ +001adb40: 743b 3c2f 7370 616e 3e20 3c2f 6469 763e t;
    │ │ │ │ +001adb50: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    static │ │ │ │ +001adba0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 const ch │ │ │ │ +001adbe0: 6172 3c2f 7370 616e 3e20 706c 7567 696e ar plugin │ │ │ │ +001adbf0: 5f69 645b 5d20 3d20 504c 5547 494e 5f49 _id[] = PLUGIN_I │ │ │ │ +001adc00: 443b 203c 7370 616e 2063 6c61 7373 3d22 D; // the │ │ │ │ +001adc20: 706c 7567 696e 2069 6420 3c2f 7370 616e plugin id
    .
    │ │ │ │ +001adc60: 7374 6174 6963 3c2f 7370 616e 3e20 3c73 static int plugin_init(< │ │ │ │ +001adca0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001adcb0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ +001add20: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc │ │ │ │ +001add40: 743c 2f73 7061 6e3e 2070 6c75 6769 6e5f t plugin_ │ │ │ │ +001add50: 6461 7461 202a 6461 7461 293b 203c 2f64 data *data); .
    stat │ │ │ │ +001add90: 6963 3c2f 7370 616e 3e20 3c73 7061 6e20 ic int p │ │ │ │ +001addc0: 6c75 6769 6e5f 636f 7079 283c 7370 616e lugin_copy(struct < │ │ │ │ +001addf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001ade00: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001ade10: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +001ade20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001ade50: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap_plugin │ │ │ │ +001ade80: 202a 6473 742c 203c 7370 616e 2063 6c61 *dst, str │ │ │ │ +001adea0: 7563 743c 2f73 7061 6e3e 2073 6f61 705f uct soap_ │ │ │ │ +001adeb0: 706c 7567 696e 202a 7372 6329 3b20 3c2f plugin *src); .
    sta │ │ │ │ +001adef0: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic void │ │ │ │ +001adf20: 2070 6c75 6769 6e5f 6465 6c65 7465 283c plugin_delete(< │ │ │ │ +001adf30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001adf40: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ +001adfb0: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc │ │ │ │ +001adfd0: 743c 2f73 7061 6e3e 2073 6f61 705f 706c t soap_pl │ │ │ │ +001adfe0: 7567 696e 202a 7029 3b20 3c2f 6469 763e ugin *p);
    │ │ │ │ +001adff0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    static< │ │ │ │ +001ae020: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int plug │ │ │ │ +001ae050: 696e 5f73 656e 6428 3c73 7061 6e20 636c in_send(st │ │ │ │ +001ae070: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, const │ │ │ │ +001ae100: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001ae120: 2f73 7061 6e3e 202a 3c61 2063 6c61 7373 /span> *buf, size_t len);
    .< │ │ │ │ +001ae1b0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001ae1c0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >static s │ │ │ │ +001ae200: 697a 655f 743c 2f73 7061 6e3e 2070 6c75 ize_t plu │ │ │ │ +001ae210: 6769 6e5f 7265 6376 283c 7370 616e 2063 gin_recv(s │ │ │ │ +001ae230: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ +001ae2a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001ae2b0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *b │ │ │ │ +001ae310: 7566 3c2f 613e 2c20 3c73 7061 6e20 636c uf, size_t │ │ │ │ +001ae340: 6c65 6e29 3b20 3c2f 6469 763e 0a3c 6469 len);
    . │ │ │ │ 001ae360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -001ae380: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    // the │ │ │ │ -001ae3b0: 7265 6769 7374 7279 2066 756e 6374 696f registry functio │ │ │ │ -001ae3c0: 6e3a 203c 2f73 7061 6e3e 3c2f 6469 763e n:
    │ │ │ │ -001ae3d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    int │ │ │ │ -001ae400: 3c2f 7370 616e 3e20 706c 7567 696e 283c plugin(< │ │ │ │ -001ae410: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001ae420: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ -001ae490: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, struc │ │ │ │ -001ae4b0: 743c 2f73 7061 6e3e 2073 6f61 705f 706c t soap_pl │ │ │ │ -001ae4c0: 7567 696e 202a 702c 203c 7370 616e 2063 ugin *p, void * │ │ │ │ -001ae4f0: 6172 6729 203c 2f64 6976 3e0a 3c64 6976 arg)
    .
    {< │ │ │ │ -001ae510: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    p-> │ │ │ │ -001ae530: 6964 203d 2070 6c75 6769 6e5f 6964 3b20 id = plugin_id; │ │ │ │ -001ae540: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    p-> │ │ │ │ -001ae560: 3b64 6174 6120 3d20 283c 7370 616e 2063 ;data = (void*) │ │ │ │ -001ae590: 6d61 6c6c 6f63 283c 7370 616e 2063 6c61 malloc(siz │ │ │ │ -001ae5b0: 656f 663c 2f73 7061 6e3e 283c 7370 616e eof(struct p │ │ │ │ -001ae5e0: 6c75 6769 6e5f 6461 7461 2929 3b20 3c2f lugin_data)); .
    p->f │ │ │ │ -001ae610: 636f 7079 203d 2070 6c75 6769 6e5f 636f copy = plugin_co │ │ │ │ -001ae620: 7079 3b20 3c73 7061 6e20 636c 6173 733d py; /* opt │ │ │ │ -001ae640: 696f 6e61 6c3a 2077 6865 6e20 7365 7420 ional: when set │ │ │ │ -001ae650: 7468 6520 706c 7567 696e 206d 7573 7420 the plugin must │ │ │ │ -001ae660: 636f 7079 2069 7473 206c 6f63 616c 2064 copy its local d │ │ │ │ -001ae670: 6174 6120 2a2f 3c2f 7370 616e 3e3c 2f64 ata */.
    p->fd │ │ │ │ -001ae6a0: 656c 6574 6520 3d20 706c 7567 696e 5f64 elete = plugin_d │ │ │ │ -001ae6b0: 656c 6574 653b 203c 2f64 6976 3e0a 3c64 elete;
    . │ │ │ │ -001ae6d0: 2020 3c73 7061 6e20 636c 6173 733d 226b if (p->dat │ │ │ │ -001ae700: 6129 203c 2f64 6976 3e0a 3c64 6976 2063 a)
    .
    {< │ │ │ │ -001ae720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if │ │ │ │ -001ae760: 2870 6c75 6769 6e5f 696e 6974 283c 6120 (plugin_init(soap, (< │ │ │ │ -001ae7a0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001ae7b0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct plugin_data*) │ │ │ │ -001ae7d0: 702d 2667 743b 6461 7461 2929 203c 2f64 p->data)) .
    {
    .
    free(p │ │ │ │ -001ae820: 2d26 6774 3b64 6174 6129 3b20 3c73 7061 ->data); // error: coul │ │ │ │ -001ae850: 6420 6e6f 7420 696e 6974 203c 2f73 7061 d not init
    .
    │ │ │ │ -001ae880: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ -001ae8a0: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA │ │ │ │ -001ae900: 505f 454f 4d3c 2f61 3e3b 203c 7370 616e P_EOM; // return error │ │ │ │ -001ae930: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -001ae940: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001ae950: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    . │ │ │ │ -001ae970: 2020 7d3c 2f64 6976 3e0a 3c64 6976 2063 }
    .. │ │ │ │ -001aea30: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    stati │ │ │ │ -001aea80: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c int pl │ │ │ │ -001aeab0: 7567 696e 5f69 6e69 7428 3c73 7061 6e20 ugin_init( │ │ │ │ -001aead0: 7374 7275 6374 3c2f 7370 616e 3e20 3c61 struct soap *< │ │ │ │ -001aeb10: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001aeb20: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001aeb30: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001aeb40: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data │ │ │ │ -001aeb70: 2a64 6174 6129 203c 2f64 6976 3e0a 3c64 *data)
    ./ │ │ │ │ +001ae390: 2f20 7468 6520 7265 6769 7374 7279 2066 / the registry f │ │ │ │ +001ae3a0: 756e 6374 696f 6e3a 203c 2f73 7061 6e3e unction: │ │ │ │ +001ae3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    int pl │ │ │ │ +001ae3f0: 7567 696e 283c 7370 616e 2063 6c61 7373 ugin(struc │ │ │ │ +001ae410: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ +001ae440: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s │ │ │ │ +001ae4a0: 6f61 705f 706c 7567 696e 202a 702c 203c oap_plugin *p, < │ │ │ │ +001ae4b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001ae4c0: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void *arg)
    .
    {
    .
    │ │ │ │ +001ae510: 702d 2667 743b 6964 203d 2070 6c75 6769 p->id = plugi │ │ │ │ +001ae520: 6e5f 6964 3b20 3c2f 6469 763e 0a3c 6469 n_id;
    . │ │ │ │ +001ae540: 2070 2d26 6774 3b64 6174 6120 3d20 283c p->data = (< │ │ │ │ +001ae550: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001ae560: 6f72 6474 7970 6522 3e76 6f69 643c 2f73 ordtype">void
    *)malloc(sizeof │ │ │ │ +001ae5a0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct plugin_data │ │ │ │ +001ae5d0: 2929 3b20 3c2f 6469 763e 0a3c 6469 7620 ));
    .
    p │ │ │ │ +001ae5f0: 2d26 6774 3b66 636f 7079 203d 2070 6c75 ->fcopy = plu │ │ │ │ +001ae600: 6769 6e5f 636f 7079 3b20 3c73 7061 6e20 gin_copy; │ │ │ │ +001ae620: 2f2a 206f 7074 696f 6e61 6c3a 2077 6865 /* optional: whe │ │ │ │ +001ae630: 6e20 7365 7420 7468 6520 706c 7567 696e n set the plugin │ │ │ │ +001ae640: 206d 7573 7420 636f 7079 2069 7473 206c must copy its l │ │ │ │ +001ae650: 6f63 616c 2064 6174 6120 2a2f 3c2f 7370 ocal data */
    .
    p- │ │ │ │ +001ae680: 2667 743b 6664 656c 6574 6520 3d20 706c >fdelete = pl │ │ │ │ +001ae690: 7567 696e 5f64 656c 6574 653b 203c 2f64 ugin_delete; .
    if (p-& │ │ │ │ +001ae6e0: 6774 3b64 6174 6129 203c 2f64 6976 3e0a gt;data)
    . │ │ │ │ +001ae6f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    ..
    │ │ │ │ +001ae7e0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +001ae800: 6672 6565 2870 2d26 6774 3b64 6174 6129 free(p->data) │ │ │ │ +001ae810: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // error │ │ │ │ +001ae830: 3a20 636f 756c 6420 6e6f 7420 696e 6974 : could not init │ │ │ │ +001ae840: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001ae850: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001ae860: 3e20 2020 2020 203c 7370 616e 2063 6c61 > return < │ │ │ │ +001ae890: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001ae8a0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001ae8b0: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ +001ae8c0: 6139 6664 3633 3730 3736 6166 6364 3333 a9fd637076afcd33 │ │ │ │ +001ae8d0: 3034 3031 6632 6364 3061 3731 6665 3732 0401f2cd0a71fe72 │ │ │ │ +001ae8e0: 3922 3e53 4f41 505f 454f 4d3c 2f61 3e3b 9">SOAP_EOM
    ; │ │ │ │ +001ae8f0: 203c 7370 616e 2063 6c61 7373 3d22 636f // return │ │ │ │ +001ae910: 2065 7272 6f72 203c 2f73 7061 6e3e 3c2f error .
    } .
    }
    . │ │ │ │ +001ae960: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    re │ │ │ │ +001ae990: 7475 726e 3c2f 7370 616e 3e20 3c61 2063 turn │ │ │ │ +001ae9f0: 534f 4150 5f4f 4b3c 2f61 3e3b 203c 2f64 SOAP_OK; .
    }
    .< │ │ │ │ +001aea20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001aea30: 3e20 3c2f 6469 763e 0a3c 6469 7620 636c >
    .
    static < │ │ │ │ +001aea70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001aea80: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int plugin_init( │ │ │ │ +001aeaa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct soap< │ │ │ │ +001aeaf0: 2f61 3e20 2a3c 6120 636c 6173 733d 2263 /a> *soap │ │ │ │ +001aeb20: 3c2f 613e 2c20 3c73 7061 6e20 636c 6173 , stru │ │ │ │ +001aeb40: 6374 3c2f 7370 616e 3e20 706c 7567 696e ct plugin │ │ │ │ +001aeb50: 5f64 6174 6120 2a64 6174 6129 203c 2f64 _data *data) .
    {
    . │ │ │ │ -001aeb90: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    data │ │ │ │ -001aebb0: 2d26 6774 3b66 7365 6e64 203d 203c 6120 ->fsend = soap-> │ │ │ │ -001aebf0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;fsend; // save │ │ │ │ -001aec70: 206f 6c64 2072 6563 7620 6361 6c6c 6261 old recv callba │ │ │ │ -001aec80: 636b 203c 2f73 7061 6e3e 3c2f 6469 763e ck
    │ │ │ │ -001aec90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    data->fr │ │ │ │ -001aecb0: 6563 7620 3d20 3c61 2063 6c61 7373 3d22 ecv = soa │ │ │ │ -001aece0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->frecv; // save old se │ │ │ │ -001aed70: 6e64 2063 616c 6c62 6163 6b20 3c2f 7370 nd callback
    ..
    soap-> │ │ │ │ -001aeed0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 frecv │ │ │ │ -001aef30: 203d 2070 6c75 6769 6e5f 7265 6376 3b20 = plugin_recv; │ │ │ │ -001aef40: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // replace │ │ │ │ -001aef60: 2072 6563 7620 6361 6c6c 6261 636b 2077 recv callback w │ │ │ │ -001aef70: 6974 6820 6e65 7720 3c2f 7370 616e 3e3c ith new < │ │ │ │ -001aef80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return SOAP_OK;
    .
    } soap->fs │ │ │ │ +001aec30: 656e 643c 2f61 3e3b 203c 7370 616e 2063 end; / │ │ │ │ +001aec50: 2f20 7361 7665 206f 6c64 2072 6563 7620 / save old recv │ │ │ │ +001aec60: 6361 6c6c 6261 636b 203c 2f73 7061 6e3e callback │ │ │ │ +001aec70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    data- │ │ │ │ +001aec90: 2667 743b 6672 6563 7620 3d20 3c61 2063 >frecv = soap-> │ │ │ │ +001aecd0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 frecv │ │ │ │ +001aed30: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // save │ │ │ │ +001aed50: 6f6c 6420 7365 6e64 2063 616c 6c62 6163 old send callbac │ │ │ │ +001aed60: 6b20 3c2f 7370 616e 3e3c 2f64 6976 3e0a k
    . │ │ │ │ +001aed70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap< │ │ │ │ +001aedb0: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->f │ │ │ │ +001aee10: 7365 6e64 3c2f 613e 203d 2070 6c75 6769 send = plugi │ │ │ │ +001aee20: 6e5f 7365 6e64 3b20 3c73 7061 6e20 636c n_send; // │ │ │ │ +001aee40: 2072 6570 6c61 6365 2073 656e 6420 6361 replace send ca │ │ │ │ +001aee50: 6c6c 6261 636b 2077 6974 6820 6e65 7720 llback with new │ │ │ │ +001aee60: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001aee80: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap->fre │ │ │ │ +001aef10: 6376 3c2f 613e 203d 2070 6c75 6769 6e5f cv = plugin_ │ │ │ │ +001aef20: 7265 6376 3b20 3c73 7061 6e20 636c 6173 recv; // r │ │ │ │ +001aef40: 6570 6c61 6365 2072 6563 7620 6361 6c6c eplace recv call │ │ │ │ +001aef50: 6261 636b 2077 6974 6820 6e65 7720 3c2f back with new
    .
    │ │ │ │ +001aef80: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +001aefa0: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 SOAP │ │ │ │ +001af000: 5f4f 4b3c 2f61 3e3b 203c 2f64 6976 3e0a _OK;
    . │ │ │ │ +001af010: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    .
    .< │ │ │ │ -001af060: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001af070: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// copy p │ │ │ │ -001af090: 6c75 6769 6e20 6461 7461 2c20 6361 6c6c lugin data, call │ │ │ │ -001af0a0: 6564 2062 7920 736f 6170 5f63 6f70 7928 ed by soap_copy( │ │ │ │ -001af0b0: 293c 2f73 7061 6e3e 3c2f 6469 763e 0a3c )
    .< │ │ │ │ -001af0c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001af0d0: 3e3c 7370 616e 2063 6c61 7373 3d22 636f >// This i │ │ │ │ -001af0f0: 7320 696d 706f 7274 616e 743a 2077 6520 s important: we │ │ │ │ -001af100: 6e65 6564 2061 2064 6565 7020 636f 7079 need a deep copy │ │ │ │ -001af110: 2074 6f20 6176 6f69 6420 6461 7461 2073 to avoid data s │ │ │ │ -001af120: 6861 7269 6e67 2062 7920 7477 6f20 636f haring by two co │ │ │ │ -001af130: 6e74 6578 7473 203c 2f73 7061 6e3e 3c2f ntexts .
    sta │ │ │ │ -001af170: 7469 633c 2f73 7061 6e3e 203c 7370 616e tic int │ │ │ │ -001af1a0: 706c 7567 696e 5f63 6f70 7928 3c73 7061 plugin_copy(struct │ │ │ │ -001af1d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -001af200: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -001af230: 2c20 3c73 7061 6e20 636c 6173 733d 226b , struct soap_plugi │ │ │ │ -001af260: 6e20 2a64 7374 2c20 3c73 7061 6e20 636c n *dst, st │ │ │ │ -001af280: 7275 6374 3c2f 7370 616e 3e20 736f 6170 ruct soap │ │ │ │ -001af290: 5f70 6c75 6769 6e20 2a73 7263 2920 3c2f _plugin *src) // │ │ │ │ +001af070: 636f 7079 2070 6c75 6769 6e20 6461 7461 copy plugin data │ │ │ │ +001af080: 2c20 6361 6c6c 6564 2062 7920 736f 6170 , called by soap │ │ │ │ +001af090: 5f63 6f70 7928 293c 2f73 7061 6e3e 3c2f _copy().
    // │ │ │ │ +001af0d0: 5468 6973 2069 7320 696d 706f 7274 616e This is importan │ │ │ │ +001af0e0: 743a 2077 6520 6e65 6564 2061 2064 6565 t: we need a dee │ │ │ │ +001af0f0: 7020 636f 7079 2074 6f20 6176 6f69 6420 p copy to avoid │ │ │ │ +001af100: 6461 7461 2073 6861 7269 6e67 2062 7920 data sharing by │ │ │ │ +001af110: 7477 6f20 636f 6e74 6578 7473 203c 2f73 two contexts
    .
    static │ │ │ │ +001af160: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int plugin_cop │ │ │ │ +001af190: 7928 3c73 7061 6e20 636c 6173 733d 226b y(struct soa │ │ │ │ +001af1e0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +001af210: 6170 3c2f 613e 2c20 3c73 7061 6e20 636c ap, st │ │ │ │ +001af230: 7275 6374 3c2f 7370 616e 3e20 736f 6170 ruct soap │ │ │ │ +001af240: 5f70 6c75 6769 6e20 2a64 7374 2c20 3c73 _plugin *dst, struct soap_plugin *s │ │ │ │ +001af280: 7263 2920 3c2f 6469 763e 0a3c 6469 7620 rc)
    .
    {.
    {
    .< │ │ │ │ -001af2c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001af2d0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ -001af2f0: 2f73 7061 6e3e 2028 2128 6473 742d 2667 /span> (!(dst-&g │ │ │ │ -001af300: 743b 6461 7461 203d 2028 3c73 7061 6e20 t;data = ( │ │ │ │ -001af320: 7374 7275 6374 3c2f 7370 616e 3e20 706c struct pl │ │ │ │ -001af330: 7567 696e 5f64 6174 612a 296d 616c 6c6f ugin_data*)mallo │ │ │ │ -001af340: 6328 3c73 7061 6e20 636c 6173 733d 226b c(sizeof(stru │ │ │ │ -001af380: 6374 3c2f 7370 616e 3e20 706c 7567 696e ct plugin │ │ │ │ -001af390: 5f64 6174 6129 2929 2920 3c2f 6469 763e _data))))
    │ │ │ │ -001af3a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    return < │ │ │ │ -001af3e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001af3f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001af400: 705f 5f65 7272 6f72 732e 6874 6d6c 2367 p__errors.html#g │ │ │ │ -001af410: 6139 6664 3633 3730 3736 6166 6364 3333 a9fd637076afcd33 │ │ │ │ -001af420: 3034 3031 6632 6364 3061 3731 6665 3732 0401f2cd0a71fe72 │ │ │ │ -001af430: 3922 3e53 4f41 505f 454f 4d3c 2f61 3e3b 9">SOAP_EOM; │ │ │ │ -001af440: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    *dst │ │ │ │ -001af460: 2d26 6774 3b64 6174 6120 3d20 2a73 7263 ->data = *src │ │ │ │ -001af470: 2d26 6774 3b64 6174 613b 203c 2f64 6976 ->data;
    .
    │ │ │ │ -001af4b0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return SOAP_OK; < │ │ │ │ -001af520: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    │ │ │ │ +001af2b0: 226c 696e 6522 3e20 203c 7370 616e 2063 "line"> if (!( │ │ │ │ +001af2e0: 6473 742d 2667 743b 6461 7461 203d 2028 dst->data = ( │ │ │ │ +001af2f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data* │ │ │ │ +001af320: 296d 616c 6c6f 6328 3c73 7061 6e20 636c )malloc(si │ │ │ │ +001af340: 7a65 6f66 3c2f 7370 616e 3e28 3c73 7061 zeof(struct │ │ │ │ +001af370: 706c 7567 696e 5f64 6174 6129 2929 2920 plugin_data)))) │ │ │ │ +001af380: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    . │ │ │ │ +001af440: 2020 2a64 7374 2d26 6774 3b64 6174 6120 *dst->data │ │ │ │ +001af450: 3d20 2a73 7263 2d26 6774 3b64 6174 613b = *src->data; │ │ │ │ +001af460: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    } │ │ │ │ +001af520: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ 001af540: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // plugin del │ │ │ │ -001af590: 6574 696f 6e2c 2063 616c 6c65 6420 6279 etion, called by │ │ │ │ -001af5a0: 2073 6f61 705f 646f 6e65 2829 203c 2f73 soap_done()
    .
    static │ │ │ │ -001af5f0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 void< │ │ │ │ -001af610: 2f73 7061 6e3e 2070 6c75 6769 6e5f 6465 /span> plugin_de │ │ │ │ -001af620: 6c65 7465 283c 7370 616e 2063 6c61 7373 lete(struc │ │ │ │ -001af640: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -001af670: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap, struct s │ │ │ │ -001af6d0: 6f61 705f 706c 7567 696e 202a 7029 203c oap_plugin *p) < │ │ │ │ +001af550: 6522 3e3c 7370 616e 2063 6c61 7373 3d22 e">// plug │ │ │ │ +001af570: 696e 2064 656c 6574 696f 6e2c 2063 616c in deletion, cal │ │ │ │ +001af580: 6c65 6420 6279 2073 6f61 705f 646f 6e65 led by soap_done │ │ │ │ +001af590: 2829 203c 2f73 7061 6e3e 3c2f 6469 763e ()
    │ │ │ │ +001af5a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    static< │ │ │ │ +001af5d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> void plu │ │ │ │ +001af600: 6769 6e5f 6465 6c65 7465 283c 7370 616e gin_delete(struct < │ │ │ │ +001af630: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001af640: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001af650: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +001af660: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001af690: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct soap_plugin │ │ │ │ +001af6c0: 202a 7029 203c 2f64 6976 3e0a 3c64 6976 *p)
    .
    {< │ │ │ │ 001af6e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {
    . │ │ │ │ -001af700: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    free(p->d │ │ │ │ -001af720: 6174 6129 3b20 3c73 7061 6e20 636c 6173 ata); // f │ │ │ │ -001af740: 7265 6520 616c 6c6f 6361 7465 6420 706c ree allocated pl │ │ │ │ -001af750: 7567 696e 2064 6174 6120 3c2f 7370 616e ugin data
    .
    } free(p │ │ │ │ +001af700: 2d26 6774 3b64 6174 6129 3b20 3c73 7061 ->data); // free alloca │ │ │ │ +001af730: 7465 6420 706c 7567 696e 2064 6174 6120 ted plugin data │ │ │ │ +001af740: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001af760: 7d20 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    .
    .< │ │ │ │ -001af7b0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ -001af7c0: 656e 7422 3e2f 2f20 7468 6520 6e65 7720 ent">// the new │ │ │ │ -001af7d0: 7365 6e64 2063 616c 6c62 6163 6b20 3c2f send callback
    .
    static int< │ │ │ │ -001af840: 2f73 7061 6e3e 2070 6c75 6769 6e5f 7365 /span> plugin_se │ │ │ │ -001af850: 6e64 283c 7370 616e 2063 6c61 7373 3d22 nd(struct< │ │ │ │ -001af870: 2f73 7061 6e3e 203c 6120 636c 6173 733d /span> so │ │ │ │ -001af8a0: 6170 3c2f 613e 202a 3c61 2063 6c61 7373 ap *s │ │ │ │ -001af8d0: 6f61 703c 2f61 3e2c 203c 7370 616e 2063 oap, c │ │ │ │ -001af8f0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *buf< │ │ │ │ -001af970: 2f61 3e2c 203c 7370 616e 2063 6c61 7373 /a>, s │ │ │ │ -001af990: 697a 655f 743c 2f73 7061 6e3e 206c 656e ize_t len │ │ │ │ -001af9a0: 2920 3c2f 6469 763e 0a3c 6469 7620 636c )
    .
    {.
    str │ │ │ │ -001af9f0: 7563 7420 3c2f 7370 616e 3e70 6c75 6769 uct plugi │ │ │ │ -001afa00: 6e5f 6461 7461 202a 6461 7461 203d 2028 n_data *data = ( │ │ │ │ -001afa10: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct plugin_data* │ │ │ │ -001afa40: 2973 6f61 705f 6c6f 6f6b 7570 5f70 6c75 )soap_lookup_plu │ │ │ │ -001afa50: 6769 6e28 3c61 2063 6c61 7373 3d22 636f gin(soap< │ │ │ │ -001afa80: 2f61 3e2c 2070 6c75 6769 6e5f 6964 293b /a>, plugin_id); │ │ │ │ -001afa90: 203c 7370 616e 2063 6c61 7373 3d22 636f // fetch │ │ │ │ -001afab0: 706c 7567 696e 2623 3339 3b73 206c 6f63 plugin's loc │ │ │ │ -001afac0: 616c 2064 6174 6120 3c2f 7370 616e 3e3c al data < │ │ │ │ -001afad0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    fwrite │ │ │ │ -001afaf0: 2862 7566 2c20 6c65 6e2c 2031 2c20 7374 (buf, len, 1, st │ │ │ │ -001afb00: 6465 7272 293b 203c 7370 616e 2063 6c61 derr); // │ │ │ │ -001afb20: 7772 6974 6520 6d65 7373 6167 6520 746f write message to │ │ │ │ -001afb30: 2073 7464 6572 7220 3c2f 7370 616e 3e3c stderr < │ │ │ │ -001afb40: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return data->fsend │ │ │ │ -001afb90: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001afbc0: 2c20 6275 662c 206c 656e 293b 203c 7370 , buf, len); // pass data │ │ │ │ -001afbf0: 6f6e 2074 6f20 6f6c 6420 7365 6e64 2063 on to old send c │ │ │ │ -001afc00: 616c 6c62 6163 6b20 3c2f 7370 616e 3e3c allback < │ │ │ │ -001afc10: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    │ │ │ │ +001af790: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine">// th │ │ │ │ +001af7b0: 6520 6e65 7720 7365 6e64 2063 616c 6c62 e new send callb │ │ │ │ +001af7c0: 6163 6b20 3c2f 7370 616e 3e3c 2f64 6976 ack
    .
    static │ │ │ │ +001af800: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int plu │ │ │ │ +001af830: 6769 6e5f 7365 6e64 283c 7370 616e 2063 gin_send(s │ │ │ │ +001af850: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ +001af8c0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001af8d0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ +001af900: 3c2f 7370 616e 3e20 2a3c 6120 636c 6173 *buf, size_t len)
    .< │ │ │ │ +001af990: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001af9a0: 3e7b 3c2f 6469 763e 0a3c 6469 7620 636c >{
    .
    struct plugin_data *da │ │ │ │ +001af9f0: 7461 203d 2028 3c73 7061 6e20 636c 6173 ta = (stru │ │ │ │ +001afa10: 6374 203c 2f73 7061 6e3e 706c 7567 696e ct plugin │ │ │ │ +001afa20: 5f64 6174 612a 2973 6f61 705f 6c6f 6f6b _data*)soap_look │ │ │ │ +001afa30: 7570 5f70 6c75 6769 6e28 3c61 2063 6c61 up_plugin(soap, plugi │ │ │ │ +001afa70: 6e5f 6964 293b 203c 7370 616e 2063 6c61 n_id); // │ │ │ │ +001afa90: 6665 7463 6820 706c 7567 696e 2623 3339 fetch plugin' │ │ │ │ +001afaa0: 3b73 206c 6f63 616c 2064 6174 6120 3c2f ;s local data
    .
    │ │ │ │ +001afad0: 6677 7269 7465 2862 7566 2c20 6c65 6e2c fwrite(buf, len, │ │ │ │ +001afae0: 2031 2c20 7374 6465 7272 293b 203c 7370 1, stderr); // write mess │ │ │ │ +001afb10: 6167 6520 746f 2073 7464 6572 7220 3c2f age to stderr
    .
    │ │ │ │ +001afb40: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +001afb60: 3c2f 7370 616e 3e20 6461 7461 2d26 6774 data-> │ │ │ │ +001afb70: 3b66 7365 6e64 283c 6120 636c 6173 733d ;fsend(so │ │ │ │ +001afba0: 6170 3c2f 613e 2c20 6275 662c 206c 656e ap, buf, len │ │ │ │ +001afbb0: 293b 203c 7370 616e 2063 6c61 7373 3d22 ); // pass │ │ │ │ +001afbd0: 2064 6174 6120 6f6e 2074 6f20 6f6c 6420 data on to old │ │ │ │ +001afbe0: 7365 6e64 2063 616c 6c62 6163 6b20 3c2f send callback
    .
    } │ │ │ │ +001afc10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ 001afc30: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    .
    // the new re │ │ │ │ -001afc80: 6365 6976 6520 6361 6c6c 6261 636b 203c ceive callback < │ │ │ │ -001afc90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ -001afcb0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001afcc0: 6f72 6422 3e73 7461 7469 633c 2f73 7061 ord">static siz │ │ │ │ -001afcf0: 655f 743c 2f73 7061 6e3e 2070 6c75 6769 e_t plugi │ │ │ │ -001afd00: 6e5f 7265 6376 283c 7370 616e 2063 6c61 n_recv(str │ │ │ │ -001afd20: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, char *buf, size_t │ │ │ │ -001afde0: 206c 656e 2920 3c2f 6469 763e 0a3c 6469 len)
    .{ │ │ │ │ -001afe00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct p │ │ │ │ -001afe40: 6c75 6769 6e5f 6461 7461 202a 6461 7461 lugin_data *data │ │ │ │ -001afe50: 203d 2028 3c73 7061 6e20 636c 6173 733d = (struct │ │ │ │ -001afe70: 203c 2f73 7061 6e3e 706c 7567 696e 5f64 plugin_d │ │ │ │ -001afe80: 6174 612a 2973 6f61 705f 6c6f 6f6b 7570 ata*)soap_lookup │ │ │ │ -001afe90: 5f70 6c75 6769 6e28 3c61 2063 6c61 7373 _plugin(s │ │ │ │ -001afec0: 6f61 703c 2f61 3e2c 2070 6c75 6769 6e5f oap, plugin_ │ │ │ │ -001afed0: 6964 293b 203c 7370 616e 2063 6c61 7373 id); // fe │ │ │ │ -001afef0: 7463 6820 706c 7567 696e 2623 3339 3b73 tch plugin's │ │ │ │ -001aff00: 206c 6f63 616c 2064 6174 6120 3c2f 7370 local data
    .
    size_t res = data │ │ │ │ -001aff60: 2d26 6774 3b66 7265 6376 283c 6120 636c ->frecv(soap, buf, │ │ │ │ -001affa0: 206c 656e 293b 203c 7370 616e 2063 6c61 len); // │ │ │ │ -001affc0: 6765 7420 6461 7461 2066 726f 6d20 6f6c get data from ol │ │ │ │ -001affd0: 6420 7265 6376 2063 616c 6c62 6163 6b20 d recv callback │ │ │ │ -001affe0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001b0000: 2020 6677 7269 7465 2862 7566 2c20 7265 fwrite(buf, re │ │ │ │ -001b0010: 732c 2031 2c20 7374 6465 7272 293b 203c s, 1, stderr); < │ │ │ │ -001b0020: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    return res;
    . │ │ │ │ -001b0080: 7d3c 2f64 6976 3e0a 3c64 6976 2063 6c61 }
    .
    │ │ │ │ -001b00f0: 3c61 2068 7265 663d 2267 726f 7570 5f5f SOAP_EOM< │ │ │ │ -001b0140: 2f61 3e3c 2f64 6976 3e3c 6469 7620 636c /a>
    #de │ │ │ │ -001b0160: 6669 6e65 2053 4f41 505f 454f 4d3c 2f64 fine SOAP_EOM
    A soap_sta │ │ │ │ -001b0190: 7475 7320 6572 726f 7220 636f 6465 3a20 tus error code: │ │ │ │ -001b01a0: 6f75 7420 6f66 206d 656d 6f72 792e 3c2f out of memory.
    Defini │ │ │ │ -001b01d0: 7469 6f6e 3a3c 2f62 3e20 7374 6473 6f61 tion: stdsoa │ │ │ │ -001b01e0: 7032 2e68 3a32 3337 313c 2f64 6976 3e3c p2.h:2371
    < │ │ │ │ -001b01f0: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -001b0210: 4974 2069 7320 7468 6520 7265 7370 6f6e It is the respon │ │ │ │ -001b0220: 7369 6269 6c69 7479 206f 6620 7468 6520 sibility of the │ │ │ │ -001b0230: 706c 7567 696e 2074 6f20 6861 6e64 6c65 plugin to handle │ │ │ │ -001b0240: 2072 6567 6973 7472 7920 2869 6e69 7429 registry (init) │ │ │ │ -001b0250: 2c20 636f 7079 2c20 616e 6420 6465 6c65 , copy, and dele │ │ │ │ -001b0260: 7469 6f6e 206f 6620 7468 6520 706c 7567 tion of the plug │ │ │ │ -001b0270: 696e 2064 6174 6120 616e 6420 7265 7365 in data and rese │ │ │ │ -001b0280: 7420 6361 6c6c 6261 636b 732e 3c2f 703e t callbacks.

    │ │ │ │ -001b0290: 0a3c 703e 5468 6520 3c63 6f64 653e 6664 .

    The fd │ │ │ │ -001b02a0: 656c 6574 653c 2f63 6f64 653e 2063 616c elete cal │ │ │ │ -001b02b0: 6c62 6163 6b20 6f66 203c 636f 6465 3e73 lback of s │ │ │ │ -001b02c0: 7472 7563 7420 736f 6170 5f70 6c75 6769 truct soap_plugi │ │ │ │ -001b02d0: 6e3c 2f63 6f64 653e 206d 7573 7420 6265 n must be │ │ │ │ -001b02e0: 2073 6574 2074 6f20 6465 2d72 6567 6973 set to de-regis │ │ │ │ -001b02f0: 7465 7220 7468 6520 706c 7567 696e 2061 ter the plugin a │ │ │ │ -001b0300: 6e64 206c 6574 2069 7420 6465 6c65 7465 nd let it delete │ │ │ │ -001b0310: 2069 7473 2072 6573 6f75 7263 6573 2e3c its resources.< │ │ │ │ -001b0320: 2f70 3e0a 3c70 3e41 2070 6c75 6769 6e20 /p>.

    A plugin │ │ │ │ -001b0330: 6973 2063 6f70 6965 6420 616c 6f6e 6720 is copied along │ │ │ │ -001b0340: 7769 7468 2069 7473 2063 6f72 7265 7370 with its corresp │ │ │ │ -001b0350: 6f6e 6469 6e67 203c 636f 6465 3e3c 6120 onding soap context │ │ │ │ -001b03c0: 2077 6974 6820 7468 6520 3c63 6f64 653e with the │ │ │ │ -001b03d0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_ │ │ │ │ -001b0480: 636f 7079 3c2f 613e 3c2f 636f 6465 3e20 copy │ │ │ │ -001b0490: 6361 6c6c 2e20 5468 6973 2066 756e 6374 call. This funct │ │ │ │ -001b04a0: 696f 6e20 636f 7069 6573 2061 203c 636f ion copies a s │ │ │ │ -001b0500: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c │ │ │ │ -001b0510: 6f6e 7465 7874 2061 6e64 2074 6865 2063 ontext and the c │ │ │ │ -001b0520: 6861 696e 206f 6620 706c 7567 696e 732e hain of plugins. │ │ │ │ -001b0530: 2049 7420 6973 2075 7020 746f 2074 6865 It is up to the │ │ │ │ -001b0540: 2070 6c75 6769 6e20 696d 706c 656d 656e plugin implemen │ │ │ │ -001b0550: 7461 7469 6f6e 2074 6f20 7368 6172 6520 tation to share │ │ │ │ -001b0560: 7468 6520 706c 7567 696e 2064 6174 6120 the plugin data │ │ │ │ -001b0570: 6f72 206e 6f74 2061 7320 666f 6c6c 6f77 or not as follow │ │ │ │ -001b0580: 733a 3c2f 703e 0a3c 756c 3e0a 3c6c 693e s:

    .
      .
    • │ │ │ │ -001b0590: 6966 2074 6865 203c 636f 6465 3e66 636f if the fco │ │ │ │ -001b05a0: 7079 2829 3c2f 636f 6465 3e20 6361 6c6c py() call │ │ │ │ -001b05b0: 6261 636b 2069 7320 7365 7420 6279 2074 back is set by t │ │ │ │ -001b05c0: 6865 2070 6c75 6769 6e20 696e 6974 6961 he plugin initia │ │ │ │ -001b05d0: 6c69 7a61 7469 6f6e 2c20 7468 6973 2063 lization, this c │ │ │ │ -001b05e0: 616c 6c62 6163 6b20 7769 6c6c 2062 6520 allback will be │ │ │ │ -001b05f0: 6361 6c6c 6564 2074 6f20 616c 6c6f 7720 called to allow │ │ │ │ -001b0600: 7468 6520 706c 7567 696e 2074 6f20 636f the plugin to co │ │ │ │ -001b0610: 7079 2069 7473 206c 6f63 616c 2064 6174 py its local dat │ │ │ │ -001b0620: 6120 7570 6f6e 2061 203c 636f 6465 3e3c a upon a < │ │ │ │ -001b0630: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001b0640: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -001b0650: 5f63 6f6e 7465 7874 2e68 746d 6c23 6761 _context.html#ga │ │ │ │ -001b0660: 6234 6333 6638 6365 3830 6261 6630 6631 b4c3f8ce80baf0f1 │ │ │ │ -001b0670: 6665 6338 6338 3666 3062 6235 3738 3861 fec8c86f0bb5788a │ │ │ │ -001b0680: 2220 7469 746c 653d 2241 6c6c 6f63 6174 " title="Allocat │ │ │ │ -001b0690: 6520 616e 6420 696e 6974 6961 6c69 7a65 e and initialize │ │ │ │ -001b06a0: 2061 206e 6577 2073 6f61 7020 636f 6e74 a new soap cont │ │ │ │ -001b06b0: 6578 7420 6173 2061 2063 6f70 7920 6f66 ext as a copy of │ │ │ │ -001b06c0: 2074 6865 2067 6976 656e 2073 6f61 7020 the given soap │ │ │ │ -001b06d0: 636f 6e74 6578 742e 223e 736f 6170 5f63 context.">soap_c │ │ │ │ -001b06e0: 6f70 793c 2f61 3e3c 2f63 6f64 653e 2063 opy c │ │ │ │ -001b06f0: 616c 6c2e 2057 6865 6e20 3c63 6f64 653e all. When │ │ │ │ -001b0700: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_done or soap_free< │ │ │ │ -001b0890: 2f63 6f64 653e 2069 7320 6361 6c6c 6564 /code> is called │ │ │ │ -001b08a0: 206f 6e20 7468 6973 203c 636f 6465 3e3c on this < │ │ │ │ -001b08b0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001b08c0: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -001b08d0: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml" title="Conte │ │ │ │ -001b08e0: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi │ │ │ │ -001b08f0: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.">soap< │ │ │ │ -001b0900: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte │ │ │ │ -001b0910: 7874 2063 6f70 792c 2074 6865 203c 636f xt copy, the fdelete() callback is │ │ │ │ -001b0940: 6361 6c6c 6564 2066 6f72 2064 6561 6c6c called for deall │ │ │ │ -001b0950: 6f63 6174 696f 6e20 616e 6420 636c 6561 ocation and clea │ │ │ │ -001b0960: 6e75 7020 6f66 2074 6865 206c 6f63 616c nup of the local │ │ │ │ -001b0970: 2064 6174 612e 3c2f 6c69 3e0a 3c6c 693e data.
    • .
    • │ │ │ │ -001b0980: 6966 2074 6865 203c 636f 6465 3e66 636f if the fco │ │ │ │ -001b0990: 7079 2829 3c2f 636f 6465 3e20 6361 6c6c py() call │ │ │ │ -001b09a0: 6261 636b 2069 7320 6e6f 7420 7365 742c back is not set, │ │ │ │ -001b09b0: 2074 6865 6e20 7468 6520 706c 7567 696e then the plugin │ │ │ │ -001b09c0: 2064 6174 6120 7769 6c6c 2062 6520 7368 data will be sh │ │ │ │ -001b09d0: 6172 6564 2028 692e 652e 2074 6865 2064 ared (i.e. the d │ │ │ │ -001b09e0: 6174 6120 706f 696e 7465 7220 706f 696e ata pointer poin │ │ │ │ -001b09f0: 7473 2074 6f20 7468 6520 7361 6d65 2061 ts to the same a │ │ │ │ -001b0a00: 6464 7265 7373 292e 2054 6865 203c 636f ddress). The fdelete() callback wil │ │ │ │ -001b0a30: 6c20 6e6f 7420 6265 2063 616c 6c65 6420 l not be called │ │ │ │ -001b0a40: 7570 6f6e 2061 203c 636f 6465 3e3c 6120 upon a soap_done on a copy │ │ │ │ -001b0b30: 6f66 2074 6865 203c 636f 6465 3e3c 6120 of the soap context │ │ │ │ -001b0ba0: 202e 2054 6865 203c 636f 6465 3e66 6465 . The fde │ │ │ │ -001b0bb0: 6c65 7465 2829 3c2f 636f 6465 3e20 6361 lete() ca │ │ │ │ -001b0bc0: 6c6c 6261 636b 2077 696c 6c20 6265 2063 llback will be c │ │ │ │ -001b0bd0: 616c 6c65 6420 666f 7220 7468 6520 6f72 alled for the or │ │ │ │ -001b0be0: 6967 696e 616c 203c 636f 6465 3e3c 6120 iginal soap context │ │ │ │ -001b0c50: 2077 6974 6820 7768 6963 6820 7468 6520 with which the │ │ │ │ -001b0c60: 706c 7567 696e 2077 6173 2072 6567 6973 plugin was regis │ │ │ │ -001b0c70: 7465 7265 642e 3c2f 6c69 3e0a 3c2f 756c tered.
    • .
    .

    The example │ │ │ │ -001b0c90: 2070 6c75 6769 6e20 7368 6f75 6c64 2062 plugin should b │ │ │ │ -001b0ca0: 6520 7573 6564 2061 7320 666f 6c6c 6f77 e used as follow │ │ │ │ -001b0cb0: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    < │ │ │ │ -001b0ce0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b0cf0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soap< │ │ │ │ -001b0d60: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_ │ │ │ │ -001b0dc0: 6e65 773c 2f61 3e28 293b 203c 2f64 6976 new();
    .
    soap_reg │ │ │ │ -001b0e40: 6973 7465 725f 706c 7567 696e 3c2f 613e ister_plugin │ │ │ │ -001b0e50: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ -001b0e80: 2c20 706c 7567 696e 293b 203c 2f64 6976 , plugin);
    .

    To p │ │ │ │ -001b0eb0: 6173 7320 6120 3c63 6f64 653e 766f 6964 ass a void │ │ │ │ -001b0ec0: 2a3c 2f63 6f64 653e 2061 7267 756d 656e * argumen │ │ │ │ -001b0ed0: 7420 746f 2074 6865 2070 6c75 6769 6e27 t to the plugin' │ │ │ │ -001b0ee0: 7320 7265 6769 7374 7279 2066 756e 6374 s registry funct │ │ │ │ -001b0ef0: 696f 6e20 7573 653a 3c2f 703e 0a3c 6469 ion use:

    .
    struc │ │ │ │ -001b0f40: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ -001b0f70: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new(); │ │ │ │ -001b1010: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    . │ │ │ │ -001b10e0: 0a3c 2f64 6976 3e3c 212d 2d20 6672 6167 .

    Addit │ │ │ │ -001b1100: 696f 6e61 6c20 646f 6375 6d65 6e74 6174 ional documentat │ │ │ │ -001b1110: 696f 6e20 666f 7220 7468 6520 6772 6f77 ion for the grow │ │ │ │ -001b1120: 696e 6720 6e75 6d62 6572 206f 6620 6753 ing number of gS │ │ │ │ -001b1130: 4f41 5020 706c 7567 696e 7320 6361 6e20 OAP plugins can │ │ │ │ -001b1140: 6265 2066 6f75 6e64 2061 7420 3c61 2068 be found at https://www.ge │ │ │ │ -001b1180: 6e69 7669 612e 636f 6d2f 646f 633c 2f61 nivia.com/doc. A number of e │ │ │ │ -001b11a0: 7861 6d70 6c65 2070 6c75 6769 6e73 2061 xample plugins a │ │ │ │ -001b11b0: 7265 2069 6e63 6c75 6465 6420 696e 2074 re included in t │ │ │ │ -001b11c0: 6865 2067 534f 4150 2073 6f75 7263 6520 he gSOAP source │ │ │ │ -001b11d0: 636f 6465 2070 6163 6b61 6765 2773 203c code package's < │ │ │ │ -001b11e0: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p │ │ │ │ -001b11f0: 6c75 6769 6e3c 2f63 6f64 653e 3c2f 656d lugin directory. Som │ │ │ │ -001b1210: 6520 6f66 2074 6865 7365 2070 6c75 6769 e of these plugi │ │ │ │ -001b1220: 6e73 2061 7265 2064 6973 6375 7373 6564 ns are discussed │ │ │ │ -001b1230: 2069 6e20 7468 6520 6e65 7874 2073 6563 in the next sec │ │ │ │ -001b1240: 7469 6f6e 732e 3c2f 703e 0a3c 703e 5365 tions.

    .

    Se │ │ │ │ -001b1250: 6520 616c 736f 2041 5049 2064 6f63 756d e also API docum │ │ │ │ -001b1260: 656e 7461 7469 6f6e 204d 6f64 756c 6520 entation Module │ │ │ │ -001b1270: 3c61 2063 6c61 7373 3d22 656c 2220 6872 P │ │ │ │ -001b12a0: 6c75 6769 6e73 2061 6e64 2070 6c75 6769 lugins and plugi │ │ │ │ -001b12b0: 6e20 7265 6769 7374 7279 2066 756e 6374 n registry funct │ │ │ │ -001b12c0: 696f 6e73 3c2f 613e 202e 3c2f 703e 0a3c ions .

    .< │ │ │ │ -001b12d0: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ -001b12f0: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ -001b1300: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    .DOM API │ │ │ │ -001b1330: 206f 7665 7276 6965 773c 2f68 333e 0a3c overview

    .< │ │ │ │ -001b1340: 703e 5468 6520 444f 4d20 4150 4920 6973 p>The DOM API is │ │ │ │ -001b1350: 206e 6f74 2061 2070 6c75 6769 6e2c 2062 not a plugin, b │ │ │ │ -001b1360: 7574 2061 6e20 6578 7465 6e73 696f 6e20 ut an extension │ │ │ │ -001b1370: 7468 6174 2070 726f 7669 6465 7320 6120 that provides a │ │ │ │ -001b1380: 444f 4d20 4150 4920 6173 2061 2073 6570 DOM API as a sep │ │ │ │ -001b1390: 6172 6174 6520 736f 7572 6365 2063 6f64 arate source cod │ │ │ │ -001b13a0: 6520 6669 6c65 2074 6f20 636f 6d70 696c e file to compil │ │ │ │ -001b13b0: 6520 616e 6420 6c69 6e6b 2077 6974 6820 e and link with │ │ │ │ -001b13c0: 6753 4f41 5020 6170 706c 6963 6174 696f gSOAP applicatio │ │ │ │ -001b13d0: 6e73 2074 6f20 656e 6162 6c65 6420 7468 ns to enabled th │ │ │ │ -001b13e0: 6520 6753 4f41 5020 444f 4d2e 2058 4d4c e gSOAP DOM. XML │ │ │ │ -001b13f0: 2044 4f4d 2070 726f 6365 7373 696e 6720 DOM processing │ │ │ │ -001b1400: 6973 206f 7074 696f 6e61 6c2c 2061 6e64 is optional, and │ │ │ │ -001b1410: 2065 6e61 626c 6564 2077 6974 6820 3c61 enabled with wsdl2 │ │ │ │ -001b1440: 6820 2d64 3c2f 636f 6465 3e3c 2f62 3e20 h -d │ │ │ │ -001b1450: 6f70 7469 6f6e 203c 623e 3c63 6f64 653e option │ │ │ │ -001b1460: 2d64 3c2f 636f 6465 3e3c 2f62 3e3c 2f61 -d to generate DO │ │ │ │ -001b1480: 4d20 7374 7275 6374 7572 6573 2066 6f72 M structures for │ │ │ │ -001b1490: 203c 656d 3e3c 636f 6465 3e78 7364 3a61 xsd:a │ │ │ │ -001b14a0: 6e79 5479 7065 3c2f 636f 6465 3e3c 2f65 nyType, xs │ │ │ │ -001b14c0: 643a 616e 793c 2f63 6f64 653e 3c2f 656d d:any, and xsd:anyAttribut │ │ │ │ -001b14f0: 653c 2f63 6f64 653e 3c2f 656d 3e20 7363 e sc │ │ │ │ -001b1500: 6865 6d61 2063 6f6d 706f 6e65 6e74 732c hema components, │ │ │ │ -001b1510: 2077 6869 6368 2061 7265 2065 6e61 626c which are enabl │ │ │ │ -001b1520: 6564 2077 6974 6820 3c63 6f64 653e 2369 ed with #i │ │ │ │ -001b1530: 6d70 6f72 7420 2264 6f6d 2e68 223c 2f63 mport "dom.h" in an inter │ │ │ │ -001b1550: 6661 6365 2068 6561 6465 7220 6669 6c65 face header file │ │ │ │ -001b1560: 2066 6f72 2073 6f61 7063 7070 322e 2054 for soapcpp2. T │ │ │ │ -001b1570: 6869 7320 696d 706f 7274 7320 3c65 6d3e his imports │ │ │ │ -001b1580: 3c63 6f64 653e 6773 6f61 702f 696d 706f gsoap/impo │ │ │ │ -001b1590: 7274 2f64 6f6d 2e68 3c2f 636f 6465 3e3c rt/dom.h< │ │ │ │ -001b15a0: 2f65 6d3e 2e20 5468 656e 2063 6f6d 7069 /em>. Then compi │ │ │ │ -001b15b0: 6c65 203c 656d 3e3c 636f 6465 3e67 736f le gso │ │ │ │ -001b15c0: 6170 2f64 6f6d 2e63 3c2f 636f 6465 3e3c ap/dom.c< │ │ │ │ -001b15d0: 2f65 6d3e 2066 6f72 2043 206f 7220 3c65 /em> for C or gsoap/do │ │ │ │ -001b15f0: 6d2e 6370 703c 2f63 6f64 653e 3c2f 656d m.cpp for C++ with y │ │ │ │ -001b1610: 6f75 7220 6170 706c 6963 6174 696f 6e2e our application. │ │ │ │ -001b1620: 3c2f 703e 0a3c 703e 546f 2075 7365 2074

    .

    To use t │ │ │ │ -001b1630: 6865 2044 4f4d 2041 5049 2077 6974 6820 he DOM API with │ │ │ │ -001b1640: 5765 6220 7365 7276 6963 6573 2c20 6164 Web services, ad │ │ │ │ -001b1650: 6420 3c63 6f64 653e 2369 6d70 6f72 7420 d #import │ │ │ │ -001b1660: 2264 6f6d 2e68 223c 2f63 6f64 653e 2074 "dom.h" t │ │ │ │ -001b1670: 6f20 7468 6520 696e 7465 7266 6163 6520 o the interface │ │ │ │ -001b1680: 6865 6164 6572 2066 696c 6520 6f72 2075 header file or u │ │ │ │ -001b1690: 7365 203c 6120 6872 6566 3d22 2377 7364 se │ │ │ │ -001b16b0: 7773 646c 3268 202d 643c 2f63 6f64 653e wsdl2h -d │ │ │ │ -001b16c0: 3c2f 623e 206f 7074 696f 6e20 3c62 3e3c option < │ │ │ │ -001b16d0: 636f 6465 3e2d 643c 2f63 6f64 653e 3c2f code>-d:

    .
    # │ │ │ │ -001b1730: 696d 706f 7274 2026 7175 6f74 3b64 6f6d import "dom │ │ │ │ -001b1740: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"< │ │ │ │ -001b1750: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ -001b1770: 5468 6973 2064 6563 6c61 7265 7320 3c63 This declares xsd__anyType │ │ │ │ -001b1790: 3c2f 636f 6465 3e20 616e 6420 3c63 6f64 and xsd__anyAttrib │ │ │ │ -001b17b0: 7574 653c 2f63 6f64 653e 2074 7970 6573 ute types │ │ │ │ -001b17c0: 2e3c 2f70 3e0a 3c70 3e41 2044 4f4d 2065 .

    .

    A DOM e │ │ │ │ -001b17d0: 6c65 6d65 6e74 206e 6f64 6520 6973 2073 lement node is s │ │ │ │ -001b17e0: 6572 6961 6c69 7a65 6420 7769 7468 2074 erialized with t │ │ │ │ -001b17f0: 6865 203c 636f 6465 3e78 7364 5f5f 616e he xsd__an │ │ │ │ -001b1800: 7954 7970 653c 2f63 6f64 653e 2073 6572 yType ser │ │ │ │ -001b1810: 6961 6c69 7a61 626c 6520 7479 7065 2e20 ializable type. │ │ │ │ -001b1820: 5468 6520 756e 6465 726c 7969 6e67 2069 The underlying i │ │ │ │ -001b1830: 6d70 6c65 6d65 6e74 6174 696f 6e20 7479 mplementation ty │ │ │ │ -001b1840: 7065 206f 6620 3c63 6f64 653e 7873 645f pe of xsd_ │ │ │ │ -001b1850: 5f61 6e79 5479 7065 3c2f 636f 6465 3e20 _anyType │ │ │ │ -001b1860: 6973 203c 636f 6465 3e73 6f61 705f 646f is soap_do │ │ │ │ -001b1870: 6d5f 656c 656d 656e 743c 2f63 6f64 653e m_element │ │ │ │ -001b1880: 2e20 4f6e 6520 6f72 206d 6f72 6520 444f . One or more DO │ │ │ │ -001b1890: 4d20 6174 7472 6962 7574 6520 6e6f 6465 M attribute node │ │ │ │ -001b18a0: 7320 6172 6520 7365 7269 616c 697a 6564 s are serialized │ │ │ │ -001b18b0: 2077 6974 6820 7468 6520 3c63 6f64 653e with the │ │ │ │ -001b18c0: 7873 645f 5f61 6e79 4174 7472 6962 7574 xsd__anyAttribut │ │ │ │ -001b18d0: 653c 2f63 6f64 653e 2073 6572 6961 6c69 e seriali │ │ │ │ -001b18e0: 7a61 626c 6520 7479 7065 2e20 5468 6520 zable type. The │ │ │ │ -001b18f0: 756e 6465 726c 7969 6e67 2069 6d70 6c65 underlying imple │ │ │ │ -001b1900: 6d65 6e74 6174 696f 6e20 7479 7065 206f mentation type o │ │ │ │ -001b1910: 6620 3c63 6f64 653e 7873 645f 5f61 6e79 f xsd__any │ │ │ │ -001b1920: 4174 7472 6962 7574 653c 2f63 6f64 653e Attribute │ │ │ │ -001b1930: 2069 7320 3c63 6f64 653e 736f 6170 5f64 is soap_d │ │ │ │ -001b1940: 6f6d 5f61 7474 7269 6275 7465 3c2f 636f om_attribute, which is a │ │ │ │ -001b1960: 6c69 6e6b 6564 206c 6973 742e 3c2f 703e linked list.

    │ │ │ │ -001b1970: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo │ │ │ │ -001b19c0: 743b 646f 6d2e 6826 7175 6f74 3b3c 2f73 t;dom.h" // im │ │ │ │ -001b19f0: 706f 7274 7320 7873 645f 5f61 6e79 5479 ports xsd__anyTy │ │ │ │ -001b1a00: 7065 2061 7320 6120 444f 4d20 6e6f 6465 pe as a DOM node │ │ │ │ -001b1a10: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    .// the │ │ │ │ +001afc60: 6e65 7720 7265 6365 6976 6520 6361 6c6c new receive call │ │ │ │ +001afc70: 6261 636b 203c 2f73 7061 6e3e 3c2f 6469 back .
    stati │ │ │ │ +001afcb0: 633c 2f73 7061 6e3e 203c 7370 616e 2063 c size_t │ │ │ │ +001afce0: 2070 6c75 6769 6e5f 7265 6376 283c 7370 plugin_recv(struct │ │ │ │ +001afd10: 203c 6120 636c 6173 733d 2263 6f64 6522 soap │ │ │ │ +001afd40: 202a 3c61 2063 6c61 7373 3d22 636f 6465 *soap, cha │ │ │ │ +001afd90: 723c 2f73 7061 6e3e 202a 6275 662c 203c r *buf, < │ │ │ │ +001afda0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001afdb0: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype">size_t< │ │ │ │ +001afdc0: 2f73 7061 6e3e 206c 656e 2920 3c2f 6469 /span> len) .
    {
    . │ │ │ │ +001afe00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 struct plugin_data │ │ │ │ +001afe30: 202a 6461 7461 203d 2028 3c73 7061 6e20 *data = ( │ │ │ │ +001afe50: 7374 7275 6374 203c 2f73 7061 6e3e 706c struct pl │ │ │ │ +001afe60: 7567 696e 5f64 6174 612a 2973 6f61 705f ugin_data*)soap_ │ │ │ │ +001afe70: 6c6f 6f6b 7570 5f70 6c75 6769 6e28 3c61 lookup_plugin(soap, p │ │ │ │ +001afeb0: 6c75 6769 6e5f 6964 293b 203c 7370 616e lugin_id); // fetch plugin │ │ │ │ +001afee0: 2623 3339 3b73 206c 6f63 616c 2064 6174 's local dat │ │ │ │ +001afef0: 6120 3c2f 7370 616e 3e3c 2f64 6976 3e0a a
    . │ │ │ │ +001aff00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    si │ │ │ │ +001aff30: 7a65 5f74 3c2f 7370 616e 3e20 7265 7320 ze_t res │ │ │ │ +001aff40: 3d20 6461 7461 2d26 6774 3b66 7265 6376 = data->frecv │ │ │ │ +001aff50: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +001aff80: 2c20 6275 662c 206c 656e 293b 203c 7370 , buf, len); // get data f │ │ │ │ +001affb0: 726f 6d20 6f6c 6420 7265 6376 2063 616c rom old recv cal │ │ │ │ +001affc0: 6c62 6163 6b20 3c2f 7370 616e 3e3c 2f64 lback .
    fwrite(b │ │ │ │ +001afff0: 7566 2c20 7265 732c 2031 2c20 7374 6465 uf, res, 1, stde │ │ │ │ +001b0000: 7272 293b 203c 2f64 6976 3e0a 3c64 6976 rr);
    .
    │ │ │ │ +001b0020: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ +001b0040: 3c2f 7370 616e 3e20 7265 733b 203c 2f64 res; .
    }
    .< │ │ │ │ +001b0130: 6469 7620 636c 6173 733d 2274 7464 6563 div class="ttdec │ │ │ │ +001b0140: 6922 3e23 6465 6669 6e65 2053 4f41 505f i">#define SOAP_ │ │ │ │ +001b0150: 454f 4d3c 2f64 6976 3e3c 6469 7620 636c EOM
    A so │ │ │ │ +001b0170: 6170 5f73 7461 7475 7320 6572 726f 7220 ap_status error │ │ │ │ +001b0180: 636f 6465 3a20 6f75 7420 6f66 206d 656d code: out of mem │ │ │ │ +001b0190: 6f72 792e 3c2f 6469 763e 3c64 6976 2063 ory.
    │ │ │ │ +001b01b0: 4465 6669 6e69 7469 6f6e 3a3c 2f62 3e20 Definition: │ │ │ │ +001b01c0: 7374 6473 6f61 7032 2e68 3a32 3337 313c stdsoap2.h:2371< │ │ │ │ +001b01d0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    It is the │ │ │ │ +001b0200: 7265 7370 6f6e 7369 6269 6c69 7479 206f responsibility o │ │ │ │ +001b0210: 6620 7468 6520 706c 7567 696e 2074 6f20 f the plugin to │ │ │ │ +001b0220: 6861 6e64 6c65 2072 6567 6973 7472 7920 handle registry │ │ │ │ +001b0230: 2869 6e69 7429 2c20 636f 7079 2c20 616e (init), copy, an │ │ │ │ +001b0240: 6420 6465 6c65 7469 6f6e 206f 6620 7468 d deletion of th │ │ │ │ +001b0250: 6520 706c 7567 696e 2064 6174 6120 616e e plugin data an │ │ │ │ +001b0260: 6420 7265 7365 7420 6361 6c6c 6261 636b d reset callback │ │ │ │ +001b0270: 732e 3c2f 703e 0a3c 703e 5468 6520 3c63 s.

    .

    The fdelete callback of < │ │ │ │ +001b02a0: 636f 6465 3e73 7472 7563 7420 736f 6170 code>struct soap │ │ │ │ +001b02b0: 5f70 6c75 6769 6e3c 2f63 6f64 653e 206d _plugin m │ │ │ │ +001b02c0: 7573 7420 6265 2073 6574 2074 6f20 6465 ust be set to de │ │ │ │ +001b02d0: 2d72 6567 6973 7465 7220 7468 6520 706c -register the pl │ │ │ │ +001b02e0: 7567 696e 2061 6e64 206c 6574 2069 7420 ugin and let it │ │ │ │ +001b02f0: 6465 6c65 7465 2069 7473 2072 6573 6f75 delete its resou │ │ │ │ +001b0300: 7263 6573 2e3c 2f70 3e0a 3c70 3e41 2070 rces.

    .

    A p │ │ │ │ +001b0310: 6c75 6769 6e20 6973 2063 6f70 6965 6420 lugin is copied │ │ │ │ +001b0320: 616c 6f6e 6720 7769 7468 2069 7473 2063 along with its c │ │ │ │ +001b0330: 6f72 7265 7370 6f6e 6469 6e67 203c 636f orresponding s │ │ │ │ +001b0390: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c │ │ │ │ +001b03a0: 6f6e 7465 7874 2077 6974 6820 7468 6520 ontext with the │ │ │ │ +001b03b0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_copy call. This │ │ │ │ +001b0480: 2066 756e 6374 696f 6e20 636f 7069 6573 function copies │ │ │ │ +001b0490: 2061 203c 636f 6465 3e3c 6120 636c 6173 a soap context and │ │ │ │ +001b0500: 2074 6865 2063 6861 696e 206f 6620 706c the chain of pl │ │ │ │ +001b0510: 7567 696e 732e 2049 7420 6973 2075 7020 ugins. It is up │ │ │ │ +001b0520: 746f 2074 6865 2070 6c75 6769 6e20 696d to the plugin im │ │ │ │ +001b0530: 706c 656d 656e 7461 7469 6f6e 2074 6f20 plementation to │ │ │ │ +001b0540: 7368 6172 6520 7468 6520 706c 7567 696e share the plugin │ │ │ │ +001b0550: 2064 6174 6120 6f72 206e 6f74 2061 7320 data or not as │ │ │ │ +001b0560: 666f 6c6c 6f77 733a 3c2f 703e 0a3c 756c follows:

    .
      .
    • if the fcopy() callback is se │ │ │ │ +001b05a0: 7420 6279 2074 6865 2070 6c75 6769 6e20 t by the plugin │ │ │ │ +001b05b0: 696e 6974 6961 6c69 7a61 7469 6f6e 2c20 initialization, │ │ │ │ +001b05c0: 7468 6973 2063 616c 6c62 6163 6b20 7769 this callback wi │ │ │ │ +001b05d0: 6c6c 2062 6520 6361 6c6c 6564 2074 6f20 ll be called to │ │ │ │ +001b05e0: 616c 6c6f 7720 7468 6520 706c 7567 696e allow the plugin │ │ │ │ +001b05f0: 2074 6f20 636f 7079 2069 7473 206c 6f63 to copy its loc │ │ │ │ +001b0600: 616c 2064 6174 6120 7570 6f6e 2061 203c al data upon a < │ │ │ │ +001b0610: 636f 6465 3e3c 6120 636c 6173 733d 2265 code> │ │ │ │ +001b06c0: 736f 6170 5f63 6f70 793c 2f61 3e3c 2f63 soap_copy call. When │ │ │ │ +001b06e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_d │ │ │ │ +001b07b0: 6f6e 653c 2f61 3e3c 2f63 6f64 653e 206f one o │ │ │ │ +001b07c0: 7220 3c63 6f64 653e 3c61 2063 6c61 7373 r soap_fre │ │ │ │ +001b0870: 653c 2f61 3e3c 2f63 6f64 653e 2069 7320 e is │ │ │ │ +001b0880: 6361 6c6c 6564 206f 6e20 7468 6973 203c called on this < │ │ │ │ +001b0890: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap │ │ │ │ +001b08f0: 2063 6f6e 7465 7874 2063 6f70 792c 2074 context copy, t │ │ │ │ +001b0900: 6865 203c 636f 6465 3e66 6465 6c65 7465 he fdelete │ │ │ │ +001b0910: 2829 3c2f 636f 6465 3e20 6361 6c6c 6261 () callba │ │ │ │ +001b0920: 636b 2069 7320 6361 6c6c 6564 2066 6f72 ck is called for │ │ │ │ +001b0930: 2064 6561 6c6c 6f63 6174 696f 6e20 616e deallocation an │ │ │ │ +001b0940: 6420 636c 6561 6e75 7020 6f66 2074 6865 d cleanup of the │ │ │ │ +001b0950: 206c 6f63 616c 2064 6174 612e 3c2f 6c69 local data.
    • .
    • if the fcopy() callback is no │ │ │ │ +001b0990: 7420 7365 742c 2074 6865 6e20 7468 6520 t set, then the │ │ │ │ +001b09a0: 706c 7567 696e 2064 6174 6120 7769 6c6c plugin data will │ │ │ │ +001b09b0: 2062 6520 7368 6172 6564 2028 692e 652e be shared (i.e. │ │ │ │ +001b09c0: 2074 6865 2064 6174 6120 706f 696e 7465 the data pointe │ │ │ │ +001b09d0: 7220 706f 696e 7473 2074 6f20 7468 6520 r points to the │ │ │ │ +001b09e0: 7361 6d65 2061 6464 7265 7373 292e 2054 same address). T │ │ │ │ +001b09f0: 6865 203c 636f 6465 3e66 6465 6c65 7465 he fdelete │ │ │ │ +001b0a00: 2829 3c2f 636f 6465 3e20 6361 6c6c 6261 () callba │ │ │ │ +001b0a10: 636b 2077 696c 6c20 6e6f 7420 6265 2063 ck will not be c │ │ │ │ +001b0a20: 616c 6c65 6420 7570 6f6e 2061 203c 636f alled upon a soap_done │ │ │ │ +001b0b00: 3c2f 613e 3c2f 636f 6465 3e20 6f6e 2061 on a │ │ │ │ +001b0b10: 2063 6f70 7920 6f66 2074 6865 203c 636f copy of the s │ │ │ │ +001b0b70: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c │ │ │ │ +001b0b80: 6f6e 7465 7874 202e 2054 6865 203c 636f ontext . The fdelete() callback wil │ │ │ │ +001b0bb0: 6c20 6265 2063 616c 6c65 6420 666f 7220 l be called for │ │ │ │ +001b0bc0: 7468 6520 6f72 6967 696e 616c 203c 636f the original s │ │ │ │ +001b0c20: 6f61 703c 2f61 3e3c 2f63 6f64 653e 2063 oap c │ │ │ │ +001b0c30: 6f6e 7465 7874 2077 6974 6820 7768 6963 ontext with whic │ │ │ │ +001b0c40: 6820 7468 6520 706c 7567 696e 2077 6173 h the plugin was │ │ │ │ +001b0c50: 2072 6567 6973 7465 7265 642e 3c2f 6c69 registered.
    • .
    .

    The e │ │ │ │ +001b0c70: 7861 6d70 6c65 2070 6c75 6769 6e20 7368 xample plugin sh │ │ │ │ +001b0c80: 6f75 6c64 2062 6520 7573 6564 2061 7320 ould be used as │ │ │ │ +001b0c90: 666f 6c6c 6f77 733a 3c2f 703e 0a3c 6469 follows:

    .
    struc │ │ │ │ +001b0ce0: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ +001b0d10: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new(); │ │ │ │ +001b0db0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    ..
    < │ │ │ │ +001b0e90: 703e 546f 2070 6173 7320 6120 3c63 6f64 p>To pass a void* a │ │ │ │ +001b0eb0: 7267 756d 656e 7420 746f 2074 6865 2070 rgument to the p │ │ │ │ +001b0ec0: 6c75 6769 6e27 7320 7265 6769 7374 7279 lugin's registry │ │ │ │ +001b0ed0: 2066 756e 6374 696f 6e20 7573 653a 3c2f function use:.
    struct < │ │ │ │ +001b0f30: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b0f40: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b0f50: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +001b0f60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +001b0f90: 3d20 3c61 2063 6c61 7373 3d22 636f 6465 = soap_new< │ │ │ │ +001b0ff0: 2f61 3e28 293b 203c 2f64 6976 3e0a 3c64 /a>();
    . │ │ │ │ +001b1010: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe │ │ │ │ +001b1070: 725f 706c 7567 696e 5f61 7267 3c2f 613e r_plugin_arg │ │ │ │ +001b1080: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +001b10b0: 2c20 706c 7567 696e 2c20 6172 6729 3b20 , plugin, arg); │ │ │ │ +001b10c0: 3c2f 6469 763e 0a3c 2f64 6976 3e3c 212d
    .

    Additional docu │ │ │ │ +001b10f0: 6d65 6e74 6174 696f 6e20 666f 7220 7468 mentation for th │ │ │ │ +001b1100: 6520 6772 6f77 696e 6720 6e75 6d62 6572 e growing number │ │ │ │ +001b1110: 206f 6620 6753 4f41 5020 706c 7567 696e of gSOAP plugin │ │ │ │ +001b1120: 7320 6361 6e20 6265 2066 6f75 6e64 2061 s can be found a │ │ │ │ +001b1130: 7420 3c61 2068 7265 663d 2268 7474 7073 t https:// │ │ │ │ +001b1160: 7777 772e 6765 6e69 7669 612e 636f 6d2f www.genivia.com/ │ │ │ │ +001b1170: 646f 633c 2f61 3e2e 2041 206e 756d 6265 doc. A numbe │ │ │ │ +001b1180: 7220 6f66 2065 7861 6d70 6c65 2070 6c75 r of example plu │ │ │ │ +001b1190: 6769 6e73 2061 7265 2069 6e63 6c75 6465 gins are include │ │ │ │ +001b11a0: 6420 696e 2074 6865 2067 534f 4150 2073 d in the gSOAP s │ │ │ │ +001b11b0: 6f75 7263 6520 636f 6465 2070 6163 6b61 ource code packa │ │ │ │ +001b11c0: 6765 2773 203c 656d 3e3c 636f 6465 3e67 ge's g │ │ │ │ +001b11d0: 736f 6170 2f70 6c75 6769 6e3c 2f63 6f64 soap/plugin director │ │ │ │ +001b11f0: 792e 2053 6f6d 6520 6f66 2074 6865 7365 y. Some of these │ │ │ │ +001b1200: 2070 6c75 6769 6e73 2061 7265 2064 6973 plugins are dis │ │ │ │ +001b1210: 6375 7373 6564 2069 6e20 7468 6520 6e65 cussed in the ne │ │ │ │ +001b1220: 7874 2073 6563 7469 6f6e 732e 3c2f 703e xt sections.

    │ │ │ │ +001b1230: 0a3c 703e 5365 6520 616c 736f 2041 5049 .

    See also API │ │ │ │ +001b1240: 2064 6f63 756d 656e 7461 7469 6f6e 204d documentation M │ │ │ │ +001b1250: 6f64 756c 6520 3c61 2063 6c61 7373 3d22 odule Plugins and │ │ │ │ +001b1290: 2070 6c75 6769 6e20 7265 6769 7374 7279 plugin registry │ │ │ │ +001b12a0: 2066 756e 6374 696f 6e73 3c2f 613e 202e functions . │ │ │ │ +001b12b0: 3c2f 703e 0a3c 703e f09f 949d 203c 6120

    .

    .... Back to │ │ │ │ +001b12d0: 2074 6162 6c65 206f 6620 636f 6e74 656e table of conten │ │ │ │ +001b12e0: 7473 3c2f 613e 3c2f 703e 0a3c 6833 3e3c ts

    .

    < │ │ │ │ +001b12f0: 6120 636c 6173 733d 2261 6e63 686f 7222 a class="anchor" │ │ │ │ +001b1300: 2069 643d 2264 6f6d 223e 3c2f 613e 0a44 id="dom">.D │ │ │ │ +001b1310: 4f4d 2041 5049 206f 7665 7276 6965 773c OM API overview< │ │ │ │ +001b1320: 2f68 333e 0a3c 703e 5468 6520 444f 4d20 /h3>.

    The DOM │ │ │ │ +001b1330: 4150 4920 6973 206e 6f74 2061 2070 6c75 API is not a plu │ │ │ │ +001b1340: 6769 6e2c 2062 7574 2061 6e20 6578 7465 gin, but an exte │ │ │ │ +001b1350: 6e73 696f 6e20 7468 6174 2070 726f 7669 nsion that provi │ │ │ │ +001b1360: 6465 7320 6120 444f 4d20 4150 4920 6173 des a DOM API as │ │ │ │ +001b1370: 2061 2073 6570 6172 6174 6520 736f 7572 a separate sour │ │ │ │ +001b1380: 6365 2063 6f64 6520 6669 6c65 2074 6f20 ce code file to │ │ │ │ +001b1390: 636f 6d70 696c 6520 616e 6420 6c69 6e6b compile and link │ │ │ │ +001b13a0: 2077 6974 6820 6753 4f41 5020 6170 706c with gSOAP appl │ │ │ │ +001b13b0: 6963 6174 696f 6e73 2074 6f20 656e 6162 ications to enab │ │ │ │ +001b13c0: 6c65 6420 7468 6520 6753 4f41 5020 444f led the gSOAP DO │ │ │ │ +001b13d0: 4d2e 2058 4d4c 2044 4f4d 2070 726f 6365 M. XML DOM proce │ │ │ │ +001b13e0: 7373 696e 6720 6973 206f 7074 696f 6e61 ssing is optiona │ │ │ │ +001b13f0: 6c2c 2061 6e64 2065 6e61 626c 6564 2077 l, and enabled w │ │ │ │ +001b1400: 6974 6820 3c61 2068 7265 663d 2223 7773 ith wsdl2h -d option │ │ │ │ +001b1440: 3c63 6f64 653e 2d64 3c2f 636f 6465 3e3c -d< │ │ │ │ +001b1450: 2f62 3e3c 2f61 3e20 746f 2067 656e 6572 /b> to gener │ │ │ │ +001b1460: 6174 6520 444f 4d20 7374 7275 6374 7572 ate DOM structur │ │ │ │ +001b1470: 6573 2066 6f72 203c 656d 3e3c 636f 6465 es for xsd:anyType, xsd:any, and xsd:anyAt │ │ │ │ +001b14d0: 7472 6962 7574 653c 2f63 6f64 653e 3c2f tribute schema compo │ │ │ │ +001b14f0: 6e65 6e74 732c 2077 6869 6368 2061 7265 nents, which are │ │ │ │ +001b1500: 2065 6e61 626c 6564 2077 6974 6820 3c63 enabled with #import "dom │ │ │ │ +001b1520: 2e68 223c 2f63 6f64 653e 2069 6e20 616e .h" in an │ │ │ │ +001b1530: 2069 6e74 6572 6661 6365 2068 6561 6465 interface heade │ │ │ │ +001b1540: 7220 6669 6c65 2066 6f72 2073 6f61 7063 r file for soapc │ │ │ │ +001b1550: 7070 322e 2054 6869 7320 696d 706f 7274 pp2. This import │ │ │ │ +001b1560: 7320 3c65 6d3e 3c63 6f64 653e 6773 6f61 s gsoa │ │ │ │ +001b1570: 702f 696d 706f 7274 2f64 6f6d 2e68 3c2f p/import/dom.h. Then │ │ │ │ +001b1590: 2063 6f6d 7069 6c65 203c 656d 3e3c 636f compile gsoap/dom.c for C │ │ │ │ +001b15c0: 206f 7220 3c65 6d3e 3c63 6f64 653e 6773 or gs │ │ │ │ +001b15d0: 6f61 702f 646f 6d2e 6370 703c 2f63 6f64 oap/dom.cpp for C++ │ │ │ │ +001b15f0: 7769 7468 2079 6f75 7220 6170 706c 6963 with your applic │ │ │ │ +001b1600: 6174 696f 6e2e 3c2f 703e 0a3c 703e 546f ation.

    .

    To │ │ │ │ +001b1610: 2075 7365 2074 6865 2044 4f4d 2041 5049 use the DOM API │ │ │ │ +001b1620: 2077 6974 6820 5765 6220 7365 7276 6963 with Web servic │ │ │ │ +001b1630: 6573 2c20 6164 6420 3c63 6f64 653e 2369 es, add #i │ │ │ │ +001b1640: 6d70 6f72 7420 2264 6f6d 2e68 223c 2f63 mport "dom.h" to the inte │ │ │ │ +001b1660: 7266 6163 6520 6865 6164 6572 2066 696c rface header fil │ │ │ │ +001b1670: 6520 6f72 2075 7365 203c 6120 6872 6566 e or use │ │ │ │ +001b1690: 3c63 6f64 653e 7773 646c 3268 202d 643c wsdl2h -d< │ │ │ │ +001b16a0: 2f63 6f64 653e 3c2f 623e 206f 7074 696f /code> optio │ │ │ │ +001b16b0: 6e20 3c62 3e3c 636f 6465 3e2d 643c 2f63 n -d:

    .
    #import &qu │ │ │ │ +001b1720: 6f74 3b64 6f6d 2e68 2671 756f 743b 3c2f ot;dom.h"
    .

    This decla │ │ │ │ +001b1760: 7265 7320 3c63 6f64 653e 7873 645f 5f61 res xsd__a │ │ │ │ +001b1770: 6e79 5479 7065 3c2f 636f 6465 3e20 616e nyType an │ │ │ │ +001b1780: 6420 3c63 6f64 653e 7873 645f 5f61 6e79 d xsd__any │ │ │ │ +001b1790: 4174 7472 6962 7574 653c 2f63 6f64 653e Attribute │ │ │ │ +001b17a0: 2074 7970 6573 2e3c 2f70 3e0a 3c70 3e41 types.

    .

    A │ │ │ │ +001b17b0: 2044 4f4d 2065 6c65 6d65 6e74 206e 6f64 DOM element nod │ │ │ │ +001b17c0: 6520 6973 2073 6572 6961 6c69 7a65 6420 e is serialized │ │ │ │ +001b17d0: 7769 7468 2074 6865 203c 636f 6465 3e78 with the x │ │ │ │ +001b17e0: 7364 5f5f 616e 7954 7970 653c 2f63 6f64 sd__anyType serializable │ │ │ │ +001b1800: 7479 7065 2e20 5468 6520 756e 6465 726c type. The underl │ │ │ │ +001b1810: 7969 6e67 2069 6d70 6c65 6d65 6e74 6174 ying implementat │ │ │ │ +001b1820: 696f 6e20 7479 7065 206f 6620 3c63 6f64 ion type of xsd__anyType is s │ │ │ │ +001b1850: 6f61 705f 646f 6d5f 656c 656d 656e 743c oap_dom_element< │ │ │ │ +001b1860: 2f63 6f64 653e 2e20 4f6e 6520 6f72 206d /code>. One or m │ │ │ │ +001b1870: 6f72 6520 444f 4d20 6174 7472 6962 7574 ore DOM attribut │ │ │ │ +001b1880: 6520 6e6f 6465 7320 6172 6520 7365 7269 e nodes are seri │ │ │ │ +001b1890: 616c 697a 6564 2077 6974 6820 7468 6520 alized with the │ │ │ │ +001b18a0: 3c63 6f64 653e 7873 645f 5f61 6e79 4174 xsd__anyAt │ │ │ │ +001b18b0: 7472 6962 7574 653c 2f63 6f64 653e 2073 tribute s │ │ │ │ +001b18c0: 6572 6961 6c69 7a61 626c 6520 7479 7065 erializable type │ │ │ │ +001b18d0: 2e20 5468 6520 756e 6465 726c 7969 6e67 . The underlying │ │ │ │ +001b18e0: 2069 6d70 6c65 6d65 6e74 6174 696f 6e20 implementation │ │ │ │ +001b18f0: 7479 7065 206f 6620 3c63 6f64 653e 7873 type of xs │ │ │ │ +001b1900: 645f 5f61 6e79 4174 7472 6962 7574 653c d__anyAttribute< │ │ │ │ +001b1910: 2f63 6f64 653e 2069 7320 3c63 6f64 653e /code> is │ │ │ │ +001b1920: 736f 6170 5f64 6f6d 5f61 7474 7269 6275 soap_dom_attribu │ │ │ │ +001b1930: 7465 3c2f 636f 6465 3e2c 2077 6869 6368 te, which │ │ │ │ +001b1940: 2069 7320 6120 6c69 6e6b 6564 206c 6973 is a linked lis │ │ │ │ +001b1950: 742e 3c2f 703e 0a3c 6469 7620 636c 6173 t.

    .
    < │ │ │ │ +001b1980: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ +001b1990: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor">#impor │ │ │ │ +001b19a0: 7420 2671 756f 743b 646f 6d2e 6826 7175 t "dom.h&qu │ │ │ │ +001b19b0: 6f74 3b3c 2f73 7061 6e3e 203c 7370 616e ot; // imports xsd_ │ │ │ │ +001b19e0: 5f61 6e79 5479 7065 2061 7320 6120 444f _anyType as a DO │ │ │ │ +001b19f0: 4d20 6e6f 6465 3c2f 7370 616e 3e3c 2f64 M node.
    . │ │ │ │ -001b1a30: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001b1a60: 636c 6173 7320 3c2f 7370 616e 3e6e 735f class ns_ │ │ │ │ -001b1a70: 5f64 6174 6120 3a20 3c73 7061 6e20 636c _data : pu │ │ │ │ -001b1a90: 626c 6963 3c2f 7370 616e 3e20 7873 645f blic xsd_ │ │ │ │ -001b1aa0: 5f61 6e79 5479 7065 3c2f 6469 763e 0a3c _anyType
    .< │ │ │ │ -001b1ab0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001b1ac0: 3e7b 203c 7370 616e 2063 6c61 7373 3d22 >{ public< │ │ │ │ -001b1ae0: 2f73 7061 6e3e 3a3c 2f64 6976 3e0a 3c64 /span>:
    . │ │ │ │ -001b1b00: 2020 2020 7873 645f 5f61 6e79 5479 7065 xsd__anyType │ │ │ │ -001b1b10: 2a20 666f 6f3b 2020 2020 2020 2020 2020 * foo; │ │ │ │ -001b1b20: 2020 2020 2020 3c73 7061 6e20 636c 6173 // S │ │ │ │ -001b1b40: 746f 7265 2026 6c74 3b66 6f6f 2667 743b tore <foo> │ │ │ │ -001b1b50: 2065 6c65 6d65 6e74 2069 6e20 444f 4d20 element in DOM │ │ │ │ -001b1b60: 736f 6170 5f64 6f6d 5f65 6c65 6d65 6e74 soap_dom_element │ │ │ │ -001b1b70: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64

    . │ │ │ │ -001b1b90: 2020 2020 7873 645f 5f61 6e79 5479 7065 xsd__anyType │ │ │ │ -001b1ba0: 205f 5f61 6e79 3b20 2020 2020 2020 2020 __any; │ │ │ │ -001b1bb0: 2020 2020 2020 3c73 7061 6e20 636c 6173 // S │ │ │ │ -001b1bd0: 746f 7265 2061 6e79 2065 6c65 6d65 6e74 tore any element │ │ │ │ -001b1be0: 2063 6f6e 7465 6e74 2069 6e20 444f 4d20 content in DOM │ │ │ │ -001b1bf0: 736f 6170 5f64 6f6d 5f65 6c65 6d65 6e74 soap_dom_element │ │ │ │ -001b1c00: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001b1c20: 2020 4020 7873 645f 5f61 6e79 4174 7472 @ xsd__anyAttr │ │ │ │ -001b1c30: 6962 7574 6520 5f5f 616e 7941 7474 7269 ibute __anyAttri │ │ │ │ -001b1c40: 6275 7465 3b20 3c73 7061 6e20 636c 6173 bute; // S │ │ │ │ -001b1c60: 746f 7265 2061 6e79 4174 7472 6962 7574 tore anyAttribut │ │ │ │ -001b1c70: 6520 636f 6e74 656e 7420 696e 2044 4f4d e content in DOM │ │ │ │ -001b1c80: 2073 6f61 705f 646f 6d5f 6174 7472 6962 soap_dom_attrib │ │ │ │ -001b1c90: 7574 6520 6c69 6e6b 6564 206e 6f64 6520 ute linked node │ │ │ │ -001b1ca0: 7374 7275 6374 7572 653c 2f73 7061 6e3e structure │ │ │ │ -001b1cb0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    To m │ │ │ │ -001b1cf0: 616e 6970 756c 6174 6520 7468 6520 444f anipulate the DO │ │ │ │ -001b1d00: 4d20 656c 656d 656e 7473 2061 6e64 2061 M elements and a │ │ │ │ -001b1d10: 7474 7269 6275 7465 7320 7765 2075 7365 ttributes we use │ │ │ │ -001b1d20: 2074 6865 2044 4f4d 2041 5049 2066 756e the DOM API fun │ │ │ │ -001b1d30: 6374 696f 6e73 2064 6f63 756d 656e 7465 ctions documente │ │ │ │ -001b1d40: 6420 696e 2074 6865 2067 534f 4150 203c d in the gSOAP < │ │ │ │ -001b1d50: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 646f a href="../../do │ │ │ │ -001b1d60: 6d2f 6874 6d6c 2f69 6e64 6578 2e68 746d m/html/index.htm │ │ │ │ -001b1d70: 6c22 3e58 4d4c 2044 4f4d 2041 5049 2064 l">XML DOM API d │ │ │ │ -001b1d80: 6f63 756d 656e 7461 7469 6f6e 3c2f 613e ocumentation │ │ │ │ -001b1d90: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ -001b1db0: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ -001b1dc0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    │ │ │ │ -001b1dd0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .The me │ │ │ │ -001b1e00: 7373 6167 6520 6c6f 6767 696e 6720 706c ssage logging pl │ │ │ │ -001b1e10: 7567 696e 3c2f 6833 3e0a 3c70 3e54 6865 ugin

    .

    The │ │ │ │ -001b1e20: 206d 6573 7361 6765 203c 636f 6465 3e3c message < │ │ │ │ -001b1e30: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001b1e40: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ -001b1e50: 5f64 6562 7567 2e68 746d 6c23 6761 6336 _debug.html#gac6 │ │ │ │ -001b1e60: 3337 3934 3564 3038 3639 6439 3161 3462 37945d0869d91a4b │ │ │ │ -001b1e70: 3030 6463 3164 6461 6365 6435 3337 2220 00dc1ddaced537" │ │ │ │ -001b1e80: 7469 746c 653d 2254 6865 206c 6f67 6769 title="The loggi │ │ │ │ -001b1e90: 6e67 2070 6c75 6769 6e20 7265 6769 7374 ng plugin regist │ │ │ │ -001b1ea0: 7261 7469 6f6e 2066 756e 6374 696f 6e2e ration function. │ │ │ │ -001b1eb0: 223e 6c6f 6767 696e 673c 2f61 3e3c 2f63 ">logging plugin can │ │ │ │ -001b1ed0: 6265 2075 7365 6420 746f 2073 656c 6563 be used to selec │ │ │ │ -001b1ee0: 7469 7665 6c79 206c 6f67 2069 6e62 6f75 tively log inbou │ │ │ │ -001b1ef0: 6e64 2061 6e64 206f 7574 626f 756e 6420 nd and outbound │ │ │ │ -001b1f00: 6d65 7373 6167 6573 2074 6f20 6120 6669 messages to a fi │ │ │ │ -001b1f10: 6c65 206f 7220 7374 7265 616d 2e20 4974 le or stream. It │ │ │ │ -001b1f20: 2061 6c73 6f20 6b65 6570 7320 6163 6365 also keeps acce │ │ │ │ -001b1f30: 7373 2073 7461 7469 7374 6963 7320 746f ss statistics to │ │ │ │ -001b1f40: 206c 6f67 2074 6865 2074 6f74 616c 206e log the total n │ │ │ │ -001b1f50: 756d 6265 7220 6f66 2062 7974 6573 2073 umber of bytes s │ │ │ │ -001b1f60: 656e 7420 616e 6420 7265 6365 6976 6564 ent and received │ │ │ │ -001b1f70: 2e3c 2f70 3e0a 3c70 3e54 6f20 7573 6520 .

    .

    To use │ │ │ │ -001b1f80: 7468 6520 706c 7567 696e 2c20 636f 6d70 the plugin, comp │ │ │ │ -001b1f90: 696c 6520 616e 6420 6c69 6e6b 2079 6f75 ile and link you │ │ │ │ -001b1fa0: 7220 6170 706c 6963 6174 696f 6e20 7769 r application wi │ │ │ │ -001b1fb0: 7468 203c 656d 3e3c 636f 6465 3e6c 6f67 th log │ │ │ │ -001b1fc0: 6769 6e67 2e63 3c2f 636f 6465 3e3c 2f65 ging.c located in th │ │ │ │ -001b1fe0: 6520 3c65 6d3e 3c63 6f64 653e 6773 6f61 e gsoa │ │ │ │ -001b1ff0: 702f 706c 7567 696e 3c2f 636f 6465 3e3c p/plugin< │ │ │ │ -001b2000: 2f65 6d3e 2064 6972 6563 746f 7279 206f /em> directory o │ │ │ │ -001b2010: 6620 7468 6520 6753 4f41 5020 7061 636b f the gSOAP pack │ │ │ │ -001b2020: 6167 652e 2054 6f20 656e 6162 6c65 2074 age. To enable t │ │ │ │ -001b2030: 6865 2070 6c75 6769 6e20 696e 2079 6f75 he plugin in you │ │ │ │ -001b2040: 7220 636f 6465 2c20 7265 6769 7374 6572 r code, register │ │ │ │ -001b2050: 2074 6865 2070 6c75 6769 6e20 616e 6420 the plugin and │ │ │ │ -001b2060: 7365 7420 7468 6520 7374 7265 616d 7320 set the streams │ │ │ │ -001b2070: 6173 2066 6f6c 6c6f 7773 3a3c 2f70 3e0a as follows:

    . │ │ │ │ -001b2080: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    #include &quo │ │ │ │ -001b20d0: 743b 6c6f 6767 696e 672e 6826 7175 6f74 t;logging.h" │ │ │ │ -001b20e0: 3b3c 2f73 7061 6e3e 203c 2f64 6976 3e0a ;
    . │ │ │ │ +001b1a30: 3c73 7061 6e20 636c 6173 733d 226b 6579 class ns__data : public xsd__anyType.
    { p │ │ │ │ +001b1ac0: 7562 6c69 633c 2f73 7061 6e3e 3a3c 2f64 ublic:.
    xsd__a │ │ │ │ +001b1af0: 6e79 5479 7065 2a20 666f 6f3b 2020 2020 nyType* foo; │ │ │ │ +001b1b00: 2020 2020 2020 2020 2020 2020 3c73 7061 // Store <f │ │ │ │ +001b1b30: 6f6f 2667 743b 2065 6c65 6d65 6e74 2069 oo> element i │ │ │ │ +001b1b40: 6e20 444f 4d20 736f 6170 5f64 6f6d 5f65 n DOM soap_dom_e │ │ │ │ +001b1b50: 6c65 6d65 6e74 3c2f 7370 616e 3e3c 2f64 lement.
    xsd__a │ │ │ │ +001b1b80: 6e79 5479 7065 205f 5f61 6e79 3b20 2020 nyType __any; │ │ │ │ +001b1b90: 2020 2020 2020 2020 2020 2020 3c73 7061 // Store any e │ │ │ │ +001b1bc0: 6c65 6d65 6e74 2063 6f6e 7465 6e74 2069 lement content i │ │ │ │ +001b1bd0: 6e20 444f 4d20 736f 6170 5f64 6f6d 5f65 n DOM soap_dom_e │ │ │ │ +001b1be0: 6c65 6d65 6e74 3c2f 7370 616e 3e3c 2f64 lement.
    @ xsd__a │ │ │ │ +001b1c10: 6e79 4174 7472 6962 7574 6520 5f5f 616e nyAttribute __an │ │ │ │ +001b1c20: 7941 7474 7269 6275 7465 3b20 3c73 7061 yAttribute; // Store anyAt │ │ │ │ +001b1c50: 7472 6962 7574 6520 636f 6e74 656e 7420 tribute content │ │ │ │ +001b1c60: 696e 2044 4f4d 2073 6f61 705f 646f 6d5f in DOM soap_dom_ │ │ │ │ +001b1c70: 6174 7472 6962 7574 6520 6c69 6e6b 6564 attribute linked │ │ │ │ +001b1c80: 206e 6f64 6520 7374 7275 6374 7572 653c node structure< │ │ │ │ +001b1c90: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .} │ │ │ │ +001b1cb0: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    < │ │ │ │ +001b1cd0: 703e 546f 206d 616e 6970 756c 6174 6520 p>To manipulate │ │ │ │ +001b1ce0: 7468 6520 444f 4d20 656c 656d 656e 7473 the DOM elements │ │ │ │ +001b1cf0: 2061 6e64 2061 7474 7269 6275 7465 7320 and attributes │ │ │ │ +001b1d00: 7765 2075 7365 2074 6865 2044 4f4d 2041 we use the DOM A │ │ │ │ +001b1d10: 5049 2066 756e 6374 696f 6e73 2064 6f63 PI functions doc │ │ │ │ +001b1d20: 756d 656e 7465 6420 696e 2074 6865 2067 umented in the g │ │ │ │ +001b1d30: 534f 4150 203c 6120 6872 6566 3d22 2e2e SOAP XML DOM │ │ │ │ +001b1d60: 2041 5049 2064 6f63 756d 656e 7461 7469 API documentati │ │ │ │ +001b1d70: 6f6e 3c2f 613e 2e3c 2f70 3e0a 3c70 3ef0 on.

    .

    . │ │ │ │ +001b1d80: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ +001b1d90: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ +001b1da0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    . │ │ │ │ +001b1de0: 5468 6520 6d65 7373 6167 6520 6c6f 6767 The message logg │ │ │ │ +001b1df0: 696e 6720 706c 7567 696e 3c2f 6833 3e0a ing plugin

    . │ │ │ │ +001b1e00: 3c70 3e54 6865 206d 6573 7361 6765 203c

    The message < │ │ │ │ +001b1e10: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>logging< │ │ │ │ +001b1ea0: 2f61 3e3c 2f63 6f64 653e 2070 6c75 6769 /a> plugi │ │ │ │ +001b1eb0: 6e20 6361 6e20 6265 2075 7365 6420 746f n can be used to │ │ │ │ +001b1ec0: 2073 656c 6563 7469 7665 6c79 206c 6f67 selectively log │ │ │ │ +001b1ed0: 2069 6e62 6f75 6e64 2061 6e64 206f 7574 inbound and out │ │ │ │ +001b1ee0: 626f 756e 6420 6d65 7373 6167 6573 2074 bound messages t │ │ │ │ +001b1ef0: 6f20 6120 6669 6c65 206f 7220 7374 7265 o a file or stre │ │ │ │ +001b1f00: 616d 2e20 4974 2061 6c73 6f20 6b65 6570 am. It also keep │ │ │ │ +001b1f10: 7320 6163 6365 7373 2073 7461 7469 7374 s access statist │ │ │ │ +001b1f20: 6963 7320 746f 206c 6f67 2074 6865 2074 ics to log the t │ │ │ │ +001b1f30: 6f74 616c 206e 756d 6265 7220 6f66 2062 otal number of b │ │ │ │ +001b1f40: 7974 6573 2073 656e 7420 616e 6420 7265 ytes sent and re │ │ │ │ +001b1f50: 6365 6976 6564 2e3c 2f70 3e0a 3c70 3e54 ceived.

    .

    T │ │ │ │ +001b1f60: 6f20 7573 6520 7468 6520 706c 7567 696e o use the plugin │ │ │ │ +001b1f70: 2c20 636f 6d70 696c 6520 616e 6420 6c69 , compile and li │ │ │ │ +001b1f80: 6e6b 2079 6f75 7220 6170 706c 6963 6174 nk your applicat │ │ │ │ +001b1f90: 696f 6e20 7769 7468 203c 656d 3e3c 636f ion with logging.c located │ │ │ │ +001b1fc0: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/plugin direc │ │ │ │ +001b1ff0: 746f 7279 206f 6620 7468 6520 6753 4f41 tory of the gSOA │ │ │ │ +001b2000: 5020 7061 636b 6167 652e 2054 6f20 656e P package. To en │ │ │ │ +001b2010: 6162 6c65 2074 6865 2070 6c75 6769 6e20 able the plugin │ │ │ │ +001b2020: 696e 2079 6f75 7220 636f 6465 2c20 7265 in your code, re │ │ │ │ +001b2030: 6769 7374 6572 2074 6865 2070 6c75 6769 gister the plugi │ │ │ │ +001b2040: 6e20 616e 6420 7365 7420 7468 6520 7374 n and set the st │ │ │ │ +001b2050: 7265 616d 7320 6173 2066 6f6c 6c6f 7773 reams as follows │ │ │ │ +001b2060: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    #includ │ │ │ │ +001b20b0: 6520 2671 756f 743b 6c6f 6767 696e 672e e "logging. │ │ │ │ +001b20c0: 6826 7175 6f74 3b3c 2f73 7061 6e3e 203c h" < │ │ │ │ +001b20d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    . │ │ │ │ 001b20f0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .
    struct │ │ │ │ -001b2140: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ -001b2170: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ -001b21a0: 203d 203c 6120 636c 6173 733d 2263 6f64 = soap_new │ │ │ │ -001b2200: 3c2f 613e 2829 3b3c 2f64 6976 3e0a 3c64 ();
    . │ │ │ │ -001b2220: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ -001b2240: 3c2f 7370 616e 3e20 6279 7465 735f 696e bytes_in │ │ │ │ -001b2250: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    size_t bytes_out; ..
    ... │ │ │ │ -001b2410: 2f2f 2066 6169 6c65 6420 746f 2072 6567 // failed to reg │ │ │ │ -001b2420: 6973 7465 7220 3c2f 7370 616e 3e3c 2f64 ister .
    ... │ │ │ │ -001b2460: 2f2f 3c2f 7370 616e 3e3c 2f64 6976 3e0a //
    . │ │ │ │ -001b2470: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_set_lo │ │ │ │ -001b24e0: 6767 696e 675f 696e 626f 756e 643c 2f61 gging_inbound(soap, stdout); ..
    ... // process me │ │ │ │ -001b2630: 7373 6167 6573 3c2f 7370 616e 3e3c 2f64 ssages.
    soap_se │ │ │ │ -001b26b0: 745f 6c6f 6767 696e 675f 696e 626f 756e t_logging_inboun │ │ │ │ -001b26c0: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa │ │ │ │ -001b26f0: 703c 2f61 3e2c 204e 554c 4c29 3b20 3c73 p, NULL); // disable l │ │ │ │ -001b2720: 6f67 6769 6e67 203c 2f73 7061 6e3e 3c2f ogging .
    soap_s │ │ │ │ -001b27a0: 6574 5f6c 6f67 6769 6e67 5f6f 7574 626f et_logging_outbo │ │ │ │ -001b27b0: 756e 643c 2f61 3e28 3c61 2063 6c61 7373 und(s │ │ │ │ -001b27e0: 6f61 703c 2f61 3e2c 204e 554c 4c29 3b20 oap, NULL); │ │ │ │ -001b27f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // disable │ │ │ │ -001b2810: 206c 6f67 6769 6e67 203c 2f73 7061 6e3e logging │ │ │ │ -001b2820: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    ..
    ... │ │ │ │ -001b2910: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ -001b2930: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ │ -001b29f0: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ -001b2ac0: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    void soap_se │ │ │ │ -001b2ae0: 745f 6c6f 6767 696e 675f 6f75 7462 6f75 t_logging_outbou │ │ │ │ -001b2af0: 6e64 2873 7472 7563 7420 736f 6170 202a nd(struct soap * │ │ │ │ -001b2b00: 736f 6170 2c20 4649 4c45 202a 6664 293c soap, FILE *fd)< │ │ │ │ -001b2b10: 2f64 6976 3e3c 6469 7620 636c 6173 733d /div>
    Specify │ │ │ │ -001b2b30: 6f75 7462 6f75 6e64 206d 6573 7361 6765 outbound message │ │ │ │ -001b2b40: 206c 6f67 6769 6e67 2077 6974 6820 7468 logging with th │ │ │ │ -001b2b50: 6520 6c6f 6767 696e 6720 706c 7567 696e e logging plugin │ │ │ │ -001b2b60: 2e3c 2f64 6976 3e3c 2f64 6976 3e0a 3c64 .
    .void soap_reset │ │ │ │ -001b2c60: 5f6c 6f67 6769 6e67 5f73 7461 7473 2873 _logging_stats(s │ │ │ │ -001b2c70: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -001b2c80: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Reset │ │ │ │ -001b2ca0: 6d65 7373 6167 696e 6720 7374 6174 6973 messaging statis │ │ │ │ -001b2cb0: 7469 6373 2077 6974 6820 7468 6520 6c6f tics with the lo │ │ │ │ -001b2cc0: 6767 696e 6720 706c 7567 696e 2e3c 2f64 gging plugin.
    .
    soap_logg │ │ │ │ -001b2d90: 696e 675f 7374 6174 733c 2f61 3e3c 2f64 ing_stats
    void soap │ │ │ │ -001b2dc0: 5f6c 6f67 6769 6e67 5f73 7461 7473 2873 _logging_stats(s │ │ │ │ -001b2dd0: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ -001b2de0: 2c20 7369 7a65 5f74 202a 7365 6e74 2c20 , size_t *sent, │ │ │ │ -001b2df0: 7369 7a65 5f74 202a 7265 6376 293c 2f64 size_t *recv)
    Collect me │ │ │ │ -001b2e20: 7373 6167 696e 6720 7374 6174 6973 7469 ssaging statisti │ │ │ │ -001b2e30: 6373 2077 6974 6820 7468 6520 6c6f 6767 cs with the logg │ │ │ │ -001b2e40: 696e 6720 706c 7567 696e 2e3c 2f64 6976 ing plugin.
    .
    < │ │ │ │ -001b2ec0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ -001b2ed0: 726f 7570 5f5f 6465 6275 672e 6874 6d6c roup__debug.html │ │ │ │ -001b2ee0: 2367 6161 3034 6233 6236 3363 3862 6134 #gaa04b3b63c8ba4 │ │ │ │ -001b2ef0: 3764 6135 3637 3366 6261 6665 3338 3565 7da5673fbafe385e │ │ │ │ -001b2f00: 3961 6422 3e73 6f61 705f 7365 745f 6c6f 9ad">soap_set_lo │ │ │ │ -001b2f10: 6767 696e 675f 696e 626f 756e 643c 2f61 gging_inbound
    void │ │ │ │ -001b2f40: 736f 6170 5f73 6574 5f6c 6f67 6769 6e67 soap_set_logging │ │ │ │ -001b2f50: 5f69 6e62 6f75 6e64 2873 7472 7563 7420 _inbound(struct │ │ │ │ -001b2f60: 736f 6170 202a 736f 6170 2c20 4649 4c45 soap *soap, FILE │ │ │ │ -001b2f70: 202a 6664 293c 2f64 6976 3e3c 6469 7620 *fd)
    Sp │ │ │ │ -001b2f90: 6563 6966 7920 696e 626f 756e 6420 6d65 ecify inbound me │ │ │ │ -001b2fa0: 7373 6167 6520 6c6f 6767 696e 6720 7769 ssage logging wi │ │ │ │ -001b2fb0: 7468 2074 6865 206c 6f67 6769 6e67 2070 th the logging p │ │ │ │ -001b2fc0: 6c75 6769 6e2e 3c2f 6469 763e 3c2f 6469 lugin.
    .
    int logging │ │ │ │ -001b30b0: 2873 7472 7563 7420 736f 6170 202a 2c20 (struct soap *, │ │ │ │ -001b30c0: 7374 7275 6374 2073 6f61 705f 706c 7567 struct soap_plug │ │ │ │ -001b30d0: 696e 202a 2c20 766f 6964 202a 293c 2f64 in *, void *)
    The loggin │ │ │ │ -001b3100: 6720 706c 7567 696e 2072 6567 6973 7472 g plugin registr │ │ │ │ -001b3110: 6174 696f 6e20 6675 6e63 7469 6f6e 2e3c ation function.< │ │ │ │ -001b3120: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    If you use │ │ │ │ -001b3150: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_copy< │ │ │ │ -001b3210: 2f63 6f64 653e 2074 6f20 636f 7079 2074 /code> to copy t │ │ │ │ -001b3220: 6865 203c 636f 6465 3e3c 6120 636c 6173 he soap context wit │ │ │ │ -001b3290: 6820 7468 6520 706c 7567 696e 2c20 7468 h the plugin, th │ │ │ │ -001b32a0: 6520 706c 7567 696e 2773 2073 7461 7465 e plugin's state │ │ │ │ -001b32b0: 2077 696c 6c20 6265 2073 6861 7265 6420 will be shared │ │ │ │ -001b32c0: 6279 2074 6865 2063 6f70 792e 2054 6865 by the copy. The │ │ │ │ -001b32d0: 2070 6c75 6769 6e20 6973 2074 6872 6561 plugin is threa │ │ │ │ -001b32e0: 642d 7361 6665 2c20 6275 7420 646f 6573 d-safe, but does │ │ │ │ -001b32f0: 206e 6f74 2075 7365 2061 206c 6f63 6b20 not use a lock │ │ │ │ -001b3300: 746f 2070 726f 7465 6374 2074 6865 2069 to protect the i │ │ │ │ -001b3310: 6e74 6572 6e61 6c20 7374 6174 6973 7469 nternal statisti │ │ │ │ -001b3320: 6373 2063 6f75 6e74 6572 7320 746f 2065 cs counters to e │ │ │ │ -001b3330: 6e73 7572 6520 7468 6520 7370 6565 6420 nsure the speed │ │ │ │ -001b3340: 6f66 206d 6573 7361 6769 6e67 2069 7320 of messaging is │ │ │ │ -001b3350: 6e6f 7420 636f 6d70 726f 6d69 7365 642c not compromised, │ │ │ │ -001b3360: 206d 6561 6e69 6e67 2074 6861 7420 796f meaning that yo │ │ │ │ -001b3370: 7520 7368 6f75 6c64 206e 6f74 2066 756c u should not ful │ │ │ │ -001b3380: 6c79 2072 656c 7920 6f6e 2074 6865 2073 ly rely on the s │ │ │ │ -001b3390: 7461 7469 7374 6963 7320 746f 2062 6520 tatistics to be │ │ │ │ -001b33a0: 3130 3025 2061 6363 7572 6174 6520 666f 100% accurate fo │ │ │ │ -001b33b0: 7220 6d75 6c74 692d 7468 7265 6164 6564 r multi-threaded │ │ │ │ -001b33c0: 2073 6572 7669 6365 732e 3c2f 703e 0a3c services.

    .< │ │ │ │ -001b33d0: 703e 5365 6520 616c 736f 203c 636f 6465 p>See also logging< │ │ │ │ -001b3470: 2f63 6f64 653e 2e3c 2f70 3e0a 3c70 3ef0 /code>.

    .

    . │ │ │ │ -001b3480: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -001b3490: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -001b34a0: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .RESTful serve │ │ │ │ -001b34f0: 722d 7369 6465 2041 5049 2077 6974 6820 r-side API with │ │ │ │ -001b3500: 7468 6520 4854 5450 2047 4554 2070 6c75 the HTTP GET plu │ │ │ │ -001b3510: 6769 6e3c 2f68 333e 0a3c 703e 5365 7276 gin

    .

    Serv │ │ │ │ -001b3520: 6572 2d73 6964 6520 7573 6520 6f66 2052 er-side use of R │ │ │ │ -001b3530: 4553 5466 756c 2048 5454 5020 4745 5420 ESTful HTTP GET │ │ │ │ -001b3540: 6f70 6572 6174 696f 6e73 2069 7320 7375 operations is su │ │ │ │ -001b3550: 7070 6f72 7465 6420 7769 7468 2074 6865 pported with the │ │ │ │ -001b3560: 203c 636f 6465 3e3c 6120 636c 6173 733d http_get │ │ │ │ -001b35f0: 3c2f 613e 3c2f 636f 6465 3e20 4854 5450 HTTP │ │ │ │ -001b3600: 2047 4554 2070 6c75 6769 6e20 3c65 6d3e GET plugin │ │ │ │ -001b3610: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug │ │ │ │ -001b3620: 696e 2f68 7474 7067 6574 2e63 3c2f 636f in/httpget.c.

    .

    The HTTP GET pl │ │ │ │ -001b3650: 7567 696e 2061 6c6c 6f77 7320 796f 7572 ugin allows your │ │ │ │ -001b3660: 2073 6572 7665 7220 746f 2068 616e 646c server to handl │ │ │ │ -001b3670: 6520 5245 5354 6675 6c20 4854 5450 2047 e RESTful HTTP G │ │ │ │ -001b3680: 4554 2072 6571 7565 7374 7320 616e 6420 ET requests and │ │ │ │ -001b3690: 6174 2074 6865 2073 616d 6520 7469 6d65 at the same time │ │ │ │ -001b36a0: 2073 7469 6c6c 2073 6572 7665 2053 4f41 still serve SOA │ │ │ │ -001b36b0: 502d 6261 7365 6420 504f 5354 2072 6571 P-based POST req │ │ │ │ -001b36c0: 7565 7374 732e 2054 6865 2070 6c75 6769 uests. The plugi │ │ │ │ -001b36d0: 6e20 7072 6f76 6964 6573 2073 7570 706f n provides suppo │ │ │ │ -001b36e0: 7274 2074 6f20 636c 6965 6e74 2061 7070 rt to client app │ │ │ │ -001b36f0: 6c69 6361 7469 6f6e 7320 746f 2069 7373 lications to iss │ │ │ │ -001b3700: 7565 2048 5454 5020 4745 5420 6f70 6572 ue HTTP GET oper │ │ │ │ -001b3710: 6174 696f 6e73 2074 6f20 6120 7365 7276 ations to a serv │ │ │ │ -001b3720: 6572 2e3c 2f70 3e0a 3c70 3e4e 6f74 6520 er.

    .

    Note │ │ │ │ -001b3730: 7468 6174 2048 5454 5020 4745 5420 7265 that HTTP GET re │ │ │ │ -001b3740: 7175 6573 7473 2063 616e 2061 6c73 6f20 quests can also │ │ │ │ -001b3750: 6265 2068 616e 646c 6564 2061 7420 7468 be handled at th │ │ │ │ -001b3760: 6520 7365 7276 6572 2073 6964 6520 7769 e server side wi │ │ │ │ -001b3770: 7468 2074 6865 203c 636f 6465 3e3c 6120 th the s │ │ │ │ -001b3840: 6f61 703a 3a66 6765 743c 2f61 3e3c 2f63 oap::fget callback, s │ │ │ │ -001b3860: 6565 2053 6563 7469 6f6e 203c 6120 636c ee Section Function cal │ │ │ │ -001b38a0: 6c62 6163 6b73 2066 6f72 2063 7573 746f lbacks for custo │ │ │ │ -001b38b0: 6d69 7a65 6420 492f 4f20 616e 6420 4854 mized I/O and HT │ │ │ │ -001b38c0: 5450 2068 616e 646c 696e 673c 2f61 3e20 TP handling │ │ │ │ -001b38d0: 2e20 486f 7765 7665 722c 2074 6865 2048 . However, the H │ │ │ │ -001b38e0: 5454 5020 4745 5420 706c 7567 696e 2061 TTP GET plugin a │ │ │ │ -001b38f0: 6c73 6f20 6b65 6570 7320 7374 6174 6973 lso keeps statis │ │ │ │ -001b3900: 7469 6373 206f 6e20 7468 6520 6e75 6d62 tics on the numb │ │ │ │ -001b3910: 6572 206f 6620 7375 6363 6573 7366 756c er of successful │ │ │ │ -001b3920: 2050 4f53 5420 616e 6420 4745 5420 6578 POST and GET ex │ │ │ │ -001b3930: 6368 616e 6765 7320 616e 6420 6661 696c changes and fail │ │ │ │ -001b3940: 6564 206f 7065 7261 7469 6f6e 7320 2848 ed operations (H │ │ │ │ -001b3950: 5454 5020 6661 756c 7473 2c20 534f 4150 TTP faults, SOAP │ │ │ │ -001b3960: 2046 6175 6c74 732c 2065 7463 2e29 2e20 Faults, etc.). │ │ │ │ -001b3970: 4974 2061 6c73 6f20 6b65 6570 7320 6869 It also keeps hi │ │ │ │ -001b3980: 7420 6869 7374 6f67 7261 6d73 2061 6363 t histograms acc │ │ │ │ -001b3990: 756d 756c 6174 6564 2066 6f72 2075 7020 umulated for up │ │ │ │ -001b39a0: 746f 2061 2079 6561 7220 6f66 2072 756e to a year of run │ │ │ │ -001b39b0: 6e69 6e67 2074 696d 652e 3c2f 703e 0a3c ning time.

    .< │ │ │ │ -001b39c0: 703e 546f 2075 7365 2074 6865 203c 636f p>To use the http_get │ │ │ │ -001b3a60: 3c2f 636f 6465 3e20 706c 7567 696e 2c20 plugin, │ │ │ │ -001b3a70: 636f 6d70 696c 6520 616e 6420 6c69 6e6b compile and link │ │ │ │ -001b3a80: 2079 6f75 7220 6170 706c 6963 6174 696f your applicatio │ │ │ │ -001b3a90: 6e20 7769 7468 203c 656d 3e3c 636f 6465 n with httpget.c located i │ │ │ │ -001b3ac0: 6e20 7468 6520 3c65 6d3e 3c63 6f64 653e n the │ │ │ │ -001b3ad0: 6773 6f61 702f 706c 7567 696e 3c2f 636f gsoap/plugin directo │ │ │ │ -001b3af0: 7279 206f 6620 7468 6520 6753 4f41 5020 ry of the gSOAP │ │ │ │ -001b3b00: 7061 636b 6167 652e 2054 6f20 656e 6162 package. To enab │ │ │ │ -001b3b10: 6c65 2074 6865 2070 6c75 6769 6e20 696e le the plugin in │ │ │ │ -001b3b20: 2079 6f75 7220 636f 6465 2c20 7265 6769 your code, regi │ │ │ │ -001b3b30: 7374 6572 2074 6865 2070 6c75 6769 6e20 ster the plugin │ │ │ │ -001b3b40: 7769 7468 2079 6f75 7220 4854 5450 2047 with your HTTP G │ │ │ │ -001b3b50: 4554 2068 616e 646c 6572 2066 756e 6374 ET handler funct │ │ │ │ -001b3b60: 696f 6e20 6173 2066 6f6c 6c6f 7773 3a3c ion as follows:< │ │ │ │ -001b3b70: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.
    #include │ │ │ │ -001b3bc0: 2671 756f 743b 6874 7470 6765 742e 6826 "httpget.h& │ │ │ │ -001b3bd0: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;struct < │ │ │ │ +001b2120: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ +001b2150: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +001b2180: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so │ │ │ │ +001b21e0: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();.
    │ │ │ │ +001b2220: 7369 7a65 5f74 3c2f 7370 616e 3e20 6279 size_t by │ │ │ │ +001b2230: 7465 735f 696e 3b20 3c2f 6469 763e 0a3c tes_in;
    .< │ │ │ │ +001b2240: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001b2250: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >size_ │ │ │ │ +001b2270: 743c 2f73 7061 6e3e 2062 7974 6573 5f6f t bytes_o │ │ │ │ +001b2280: 7574 3b20 3c2f 6469 763e 0a3c 6469 7620 ut;
    .
    if │ │ │ │ +001b22c0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap_regis │ │ │ │ +001b2320: 7465 725f 706c 7567 696e 3c2f 613e 283c ter_plugin(< │ │ │ │ +001b2330: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b2340: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b2350: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001b2360: 3c61 2063 6c61 7373 3d22 636f 6465 2220 logging)) │ │ │ │ +001b23c0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... │ │ │ │ +001b23e0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // failed │ │ │ │ +001b2400: 746f 2072 6567 6973 7465 7220 3c2f 7370 to register
    .
    ... │ │ │ │ +001b2430: 3c73 7061 6e20 636c 6173 733d 2263 6f6d //< │ │ │ │ +001b2450: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.... │ │ │ │ +001b25f0: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. // proc │ │ │ │ +001b2610: 6573 7320 6d65 7373 6167 6573 3c2f 7370 ess messages
    .
    s │ │ │ │ +001b2690: 6f61 705f 7365 745f 6c6f 6767 696e 675f oap_set_logging_ │ │ │ │ +001b26a0: 696e 626f 756e 643c 2f61 3e28 3c61 2063 inbound(soap, NUL │ │ │ │ +001b26e0: 4c29 3b20 3c73 7061 6e20 636c 6173 733d L); // dis │ │ │ │ +001b2700: 6162 6c65 206c 6f67 6769 6e67 203c 2f73 able logging
    .
    │ │ │ │ +001b2780: 736f 6170 5f73 6574 5f6c 6f67 6769 6e67 soap_set_logging │ │ │ │ +001b2790: 5f6f 7574 626f 756e 643c 2f61 3e28 3c61 _outbound(soap, N │ │ │ │ +001b27d0: 554c 4c29 3b20 3c73 7061 6e20 636c 6173 ULL); // d │ │ │ │ +001b27f0: 6973 6162 6c65 206c 6f67 6769 6e67 203c isable logging < │ │ │ │ +001b2800: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001b2820: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b2830: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001b2840: 705f 5f64 6562 7567 2e68 746d 6c23 6761 p__debug.html#ga │ │ │ │ +001b2850: 3632 3862 6663 3462 3761 3662 6134 6265 628bfc4b7a6ba4be │ │ │ │ +001b2860: 6632 3362 6561 3437 3837 6566 3566 3564 f23bea4787ef5f5d │ │ │ │ +001b2870: 223e 736f 6170 5f6c 6f67 6769 6e67 5f73 ">soap_logging_s │ │ │ │ +001b2880: 7461 7473 3c2f 613e 283c 6120 636c 6173 tats( │ │ │ │ +001b28b0: 736f 6170 3c2f 613e 2c20 2661 6d70 3b62 soap, &b │ │ │ │ +001b28c0: 7974 6573 5f6f 7574 2c20 2661 6d70 3b62 ytes_out, &b │ │ │ │ +001b28d0: 7974 6573 5f69 6e29 3b3c 2f64 6976 3e0a ytes_in);
    . │ │ │ │ +001b28e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    ... //
    .
    soap_reset_logg │ │ │ │ +001b2990: 696e 675f 7374 6174 733c 2f61 3e28 3c61 ing_stats(soap);< │ │ │ │ +001b29d0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soap_set_logg │ │ │ │ +001b2a90: 696e 675f 6f75 7462 6f75 6e64 3c2f 613e ing_outbound │ │ │ │ +001b2aa0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    void s │ │ │ │ +001b2ac0: 6f61 705f 7365 745f 6c6f 6767 696e 675f oap_set_logging_ │ │ │ │ +001b2ad0: 6f75 7462 6f75 6e64 2873 7472 7563 7420 outbound(struct │ │ │ │ +001b2ae0: 736f 6170 202a 736f 6170 2c20 4649 4c45 soap *soap, FILE │ │ │ │ +001b2af0: 202a 6664 293c 2f64 6976 3e3c 6469 7620 *fd)
    Sp │ │ │ │ +001b2b10: 6563 6966 7920 6f75 7462 6f75 6e64 206d ecify outbound m │ │ │ │ +001b2b20: 6573 7361 6765 206c 6f67 6769 6e67 2077 essage logging w │ │ │ │ +001b2b30: 6974 6820 7468 6520 6c6f 6767 696e 6720 ith the logging │ │ │ │ +001b2b40: 706c 7567 696e 2e3c 2f64 6976 3e3c 2f64 plugin.
    .
    soap_reset_logg │ │ │ │ +001b2c10: 696e 675f 7374 6174 733c 2f61 3e3c 2f64 ing_stats
    void soap │ │ │ │ +001b2c40: 5f72 6573 6574 5f6c 6f67 6769 6e67 5f73 _reset_logging_s │ │ │ │ +001b2c50: 7461 7473 2873 7472 7563 7420 736f 6170 tats(struct soap │ │ │ │ +001b2c60: 202a 736f 6170 293c 2f64 6976 3e3c 6469 *soap)
    │ │ │ │ +001b2c80: 5265 7365 7420 6d65 7373 6167 696e 6720 Reset messaging │ │ │ │ +001b2c90: 7374 6174 6973 7469 6373 2077 6974 6820 statistics with │ │ │ │ +001b2ca0: 7468 6520 6c6f 6767 696e 6720 706c 7567 the logging plug │ │ │ │ +001b2cb0: 696e 2e3c 2f64 6976 3e3c 2f64 6976 3e0a in.
    . │ │ │ │ +001b2cc0: 3c64 6976 2063 6c61 7373 3d22 7474 6322 .void soap_set_l │ │ │ │ +001b2f30: 6f67 6769 6e67 5f69 6e62 6f75 6e64 2873 ogging_inbound(s │ │ │ │ +001b2f40: 7472 7563 7420 736f 6170 202a 736f 6170 truct soap *soap │ │ │ │ +001b2f50: 2c20 4649 4c45 202a 6664 293c 2f64 6976 , FILE *fd)
    Specify inbo │ │ │ │ +001b2f80: 756e 6420 6d65 7373 6167 6520 6c6f 6767 und message logg │ │ │ │ +001b2f90: 696e 6720 7769 7468 2074 6865 206c 6f67 ing with the log │ │ │ │ +001b2fa0: 6769 6e67 2070 6c75 6769 6e2e 3c2f 6469 ging plugin.
    .
    │ │ │ │ +001b3020: 3c61 2068 7265 663d 2267 726f 7570 5f5f logging
    int l │ │ │ │ +001b3090: 6f67 6769 6e67 2873 7472 7563 7420 736f ogging(struct so │ │ │ │ +001b30a0: 6170 202a 2c20 7374 7275 6374 2073 6f61 ap *, struct soa │ │ │ │ +001b30b0: 705f 706c 7567 696e 202a 2c20 766f 6964 p_plugin *, void │ │ │ │ +001b30c0: 202a 293c 2f64 6976 3e3c 6469 7620 636c *)
    The │ │ │ │ +001b30e0: 6c6f 6767 696e 6720 706c 7567 696e 2072 logging plugin r │ │ │ │ +001b30f0: 6567 6973 7472 6174 696f 6e20 6675 6e63 egistration func │ │ │ │ +001b3100: 7469 6f6e 2e3c 2f64 6976 3e3c 2f64 6976 tion.
    .

    If y │ │ │ │ +001b3130: 6f75 2075 7365 203c 636f 6465 3e3c 6120 ou use soap_cop │ │ │ │ +001b31f0: 793c 2f61 3e3c 2f63 6f64 653e 2074 6f20 y to │ │ │ │ +001b3200: 636f 7079 2074 6865 203c 636f 6465 3e3c copy the < │ │ │ │ +001b3210: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +001b3220: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ +001b3230: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml" title="Conte │ │ │ │ +001b3240: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi │ │ │ │ +001b3250: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.">soap< │ │ │ │ +001b3260: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte │ │ │ │ +001b3270: 7874 2077 6974 6820 7468 6520 706c 7567 xt with the plug │ │ │ │ +001b3280: 696e 2c20 7468 6520 706c 7567 696e 2773 in, the plugin's │ │ │ │ +001b3290: 2073 7461 7465 2077 696c 6c20 6265 2073 state will be s │ │ │ │ +001b32a0: 6861 7265 6420 6279 2074 6865 2063 6f70 hared by the cop │ │ │ │ +001b32b0: 792e 2054 6865 2070 6c75 6769 6e20 6973 y. The plugin is │ │ │ │ +001b32c0: 2074 6872 6561 642d 7361 6665 2c20 6275 thread-safe, bu │ │ │ │ +001b32d0: 7420 646f 6573 206e 6f74 2075 7365 2061 t does not use a │ │ │ │ +001b32e0: 206c 6f63 6b20 746f 2070 726f 7465 6374 lock to protect │ │ │ │ +001b32f0: 2074 6865 2069 6e74 6572 6e61 6c20 7374 the internal st │ │ │ │ +001b3300: 6174 6973 7469 6373 2063 6f75 6e74 6572 atistics counter │ │ │ │ +001b3310: 7320 746f 2065 6e73 7572 6520 7468 6520 s to ensure the │ │ │ │ +001b3320: 7370 6565 6420 6f66 206d 6573 7361 6769 speed of messagi │ │ │ │ +001b3330: 6e67 2069 7320 6e6f 7420 636f 6d70 726f ng is not compro │ │ │ │ +001b3340: 6d69 7365 642c 206d 6561 6e69 6e67 2074 mised, meaning t │ │ │ │ +001b3350: 6861 7420 796f 7520 7368 6f75 6c64 206e hat you should n │ │ │ │ +001b3360: 6f74 2066 756c 6c79 2072 656c 7920 6f6e ot fully rely on │ │ │ │ +001b3370: 2074 6865 2073 7461 7469 7374 6963 7320 the statistics │ │ │ │ +001b3380: 746f 2062 6520 3130 3025 2061 6363 7572 to be 100% accur │ │ │ │ +001b3390: 6174 6520 666f 7220 6d75 6c74 692d 7468 ate for multi-th │ │ │ │ +001b33a0: 7265 6164 6564 2073 6572 7669 6365 732e readed services. │ │ │ │ +001b33b0: 3c2f 703e 0a3c 703e 5365 6520 616c 736f

    .

    See also │ │ │ │ +001b33c0: 203c 636f 6465 3e3c 6120 636c 6173 733d loggin │ │ │ │ +001b3450: 673c 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 g.

    .

    .... Back to ta │ │ │ │ +001b3480: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +001b3490: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    .RESTful │ │ │ │ +001b34d0: 2073 6572 7665 722d 7369 6465 2041 5049 server-side API │ │ │ │ +001b34e0: 2077 6974 6820 7468 6520 4854 5450 2047 with the HTTP G │ │ │ │ +001b34f0: 4554 2070 6c75 6769 6e3c 2f68 333e 0a3c ET plugin

    .< │ │ │ │ +001b3500: 703e 5365 7276 6572 2d73 6964 6520 7573 p>Server-side us │ │ │ │ +001b3510: 6520 6f66 2052 4553 5466 756c 2048 5454 e of RESTful HTT │ │ │ │ +001b3520: 5020 4745 5420 6f70 6572 6174 696f 6e73 P GET operations │ │ │ │ +001b3530: 2069 7320 7375 7070 6f72 7465 6420 7769 is supported wi │ │ │ │ +001b3540: 7468 2074 6865 203c 636f 6465 3e3c 6120 th the ht │ │ │ │ +001b35d0: 7470 5f67 6574 3c2f 613e 3c2f 636f 6465 tp_get HTTP GET plugi │ │ │ │ +001b35f0: 6e20 3c65 6d3e 3c63 6f64 653e 6773 6f61 n gsoa │ │ │ │ +001b3600: 702f 706c 7567 696e 2f68 7474 7067 6574 p/plugin/httpget │ │ │ │ +001b3610: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c .c.< │ │ │ │ +001b3620: 2f70 3e0a 3c70 3e54 6865 2048 5454 5020 /p>.

    The HTTP │ │ │ │ +001b3630: 4745 5420 706c 7567 696e 2061 6c6c 6f77 GET plugin allow │ │ │ │ +001b3640: 7320 796f 7572 2073 6572 7665 7220 746f s your server to │ │ │ │ +001b3650: 2068 616e 646c 6520 5245 5354 6675 6c20 handle RESTful │ │ │ │ +001b3660: 4854 5450 2047 4554 2072 6571 7565 7374 HTTP GET request │ │ │ │ +001b3670: 7320 616e 6420 6174 2074 6865 2073 616d s and at the sam │ │ │ │ +001b3680: 6520 7469 6d65 2073 7469 6c6c 2073 6572 e time still ser │ │ │ │ +001b3690: 7665 2053 4f41 502d 6261 7365 6420 504f ve SOAP-based PO │ │ │ │ +001b36a0: 5354 2072 6571 7565 7374 732e 2054 6865 ST requests. The │ │ │ │ +001b36b0: 2070 6c75 6769 6e20 7072 6f76 6964 6573 plugin provides │ │ │ │ +001b36c0: 2073 7570 706f 7274 2074 6f20 636c 6965 support to clie │ │ │ │ +001b36d0: 6e74 2061 7070 6c69 6361 7469 6f6e 7320 nt applications │ │ │ │ +001b36e0: 746f 2069 7373 7565 2048 5454 5020 4745 to issue HTTP GE │ │ │ │ +001b36f0: 5420 6f70 6572 6174 696f 6e73 2074 6f20 T operations to │ │ │ │ +001b3700: 6120 7365 7276 6572 2e3c 2f70 3e0a 3c70 a server.

    .

    Note that HTTP │ │ │ │ +001b3720: 4745 5420 7265 7175 6573 7473 2063 616e GET requests can │ │ │ │ +001b3730: 2061 6c73 6f20 6265 2068 616e 646c 6564 also be handled │ │ │ │ +001b3740: 2061 7420 7468 6520 7365 7276 6572 2073 at the server s │ │ │ │ +001b3750: 6964 6520 7769 7468 2074 6865 203c 636f ide with the soap::fget< │ │ │ │ +001b3830: 2f61 3e3c 2f63 6f64 653e 2063 616c 6c62 /a> callb │ │ │ │ +001b3840: 6163 6b2c 2073 6565 2053 6563 7469 6f6e ack, see Section │ │ │ │ +001b3850: 203c 6120 636c 6173 733d 2265 6c22 2068 Functi │ │ │ │ +001b3880: 6f6e 2063 616c 6c62 6163 6b73 2066 6f72 on callbacks for │ │ │ │ +001b3890: 2063 7573 746f 6d69 7a65 6420 492f 4f20 customized I/O │ │ │ │ +001b38a0: 616e 6420 4854 5450 2068 616e 646c 696e and HTTP handlin │ │ │ │ +001b38b0: 673c 2f61 3e20 2e20 486f 7765 7665 722c g . However, │ │ │ │ +001b38c0: 2074 6865 2048 5454 5020 4745 5420 706c the HTTP GET pl │ │ │ │ +001b38d0: 7567 696e 2061 6c73 6f20 6b65 6570 7320 ugin also keeps │ │ │ │ +001b38e0: 7374 6174 6973 7469 6373 206f 6e20 7468 statistics on th │ │ │ │ +001b38f0: 6520 6e75 6d62 6572 206f 6620 7375 6363 e number of succ │ │ │ │ +001b3900: 6573 7366 756c 2050 4f53 5420 616e 6420 essful POST and │ │ │ │ +001b3910: 4745 5420 6578 6368 616e 6765 7320 616e GET exchanges an │ │ │ │ +001b3920: 6420 6661 696c 6564 206f 7065 7261 7469 d failed operati │ │ │ │ +001b3930: 6f6e 7320 2848 5454 5020 6661 756c 7473 ons (HTTP faults │ │ │ │ +001b3940: 2c20 534f 4150 2046 6175 6c74 732c 2065 , SOAP Faults, e │ │ │ │ +001b3950: 7463 2e29 2e20 4974 2061 6c73 6f20 6b65 tc.). It also ke │ │ │ │ +001b3960: 6570 7320 6869 7420 6869 7374 6f67 7261 eps hit histogra │ │ │ │ +001b3970: 6d73 2061 6363 756d 756c 6174 6564 2066 ms accumulated f │ │ │ │ +001b3980: 6f72 2075 7020 746f 2061 2079 6561 7220 or up to a year │ │ │ │ +001b3990: 6f66 2072 756e 6e69 6e67 2074 696d 652e of running time. │ │ │ │ +001b39a0: 3c2f 703e 0a3c 703e 546f 2075 7365 2074

    .

    To use t │ │ │ │ +001b39b0: 6865 203c 636f 6465 3e3c 6120 636c 6173 he http_g │ │ │ │ +001b3a40: 6574 3c2f 613e 3c2f 636f 6465 3e20 706c et pl │ │ │ │ +001b3a50: 7567 696e 2c20 636f 6d70 696c 6520 616e ugin, compile an │ │ │ │ +001b3a60: 6420 6c69 6e6b 2079 6f75 7220 6170 706c d link your appl │ │ │ │ +001b3a70: 6963 6174 696f 6e20 7769 7468 203c 656d ication with httpget.c │ │ │ │ +001b3a90: 3c2f 636f 6465 3e3c 2f65 6d3e 206c 6f63 loc │ │ │ │ +001b3aa0: 6174 6564 2069 6e20 7468 6520 3c65 6d3e ated in the │ │ │ │ +001b3ab0: 3c63 6f64 653e 6773 6f61 702f 706c 7567 gsoap/plug │ │ │ │ +001b3ac0: 696e 3c2f 636f 6465 3e3c 2f65 6d3e 2064 in d │ │ │ │ +001b3ad0: 6972 6563 746f 7279 206f 6620 7468 6520 irectory of the │ │ │ │ +001b3ae0: 6753 4f41 5020 7061 636b 6167 652e 2054 gSOAP package. T │ │ │ │ +001b3af0: 6f20 656e 6162 6c65 2074 6865 2070 6c75 o enable the plu │ │ │ │ +001b3b00: 6769 6e20 696e 2079 6f75 7220 636f 6465 gin in your code │ │ │ │ +001b3b10: 2c20 7265 6769 7374 6572 2074 6865 2070 , register the p │ │ │ │ +001b3b20: 6c75 6769 6e20 7769 7468 2079 6f75 7220 lugin with your │ │ │ │ +001b3b30: 4854 5450 2047 4554 2068 616e 646c 6572 HTTP GET handler │ │ │ │ +001b3b40: 2066 756e 6374 696f 6e20 6173 2066 6f6c function as fol │ │ │ │ +001b3b50: 6c6f 7773 3a3c 2f70 3e0a 3c64 6976 2063 lows:

    .
    │ │ │ │ +001b3b70: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in │ │ │ │ +001b3ba0: 636c 7564 6520 2671 756f 743b 6874 7470 clude "http │ │ │ │ +001b3bb0: 6765 742e 6826 7175 6f74 3b3c 2f73 7061 get.h"
    .
    .
    .< │ │ │ │ -001b3c10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b3c20: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int main()
    │ │ │ │ +001b3bf0: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine">i │ │ │ │ +001b3c10: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main() │ │ │ │ +001b3c20: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 001b3c40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ -001b3c70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b3c80: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soap< │ │ │ │ -001b3cf0: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_ │ │ │ │ -001b3d50: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    │ │ │ │ -001b3d60: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ -001b3d90: 663c 2f73 7061 6e3e 2028 3c61 2063 6c61 f (so │ │ │ │ -001b3df0: 6170 5f72 6567 6973 7465 725f 706c 7567 ap_register_plug │ │ │ │ -001b3e00: 696e 5f61 7267 3c2f 613e 283c 6120 636c in_arg(soap, http │ │ │ │ -001b3e90: 5f67 6574 3c2f 613e 2c20 283c 7370 616e _get, (void │ │ │ │ -001b3ec0: 2a29 6d79 5f68 7474 705f 6765 745f 6861 *)my_http_get_ha │ │ │ │ -001b3ed0: 6e64 6c65 7229 2920 3c2f 6469 763e 0a3c ndler))
    .< │ │ │ │ -001b3ee0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001b3ef0: 3e20 2020 203c 6120 636c 6173 733d 2263 > soap_pri │ │ │ │ -001b3f50: 6e74 5f66 6175 6c74 3c2f 613e 283c 6120 nt_fault(soap, st │ │ │ │ -001b3f90: 6465 7272 293b 203c 7370 616e 2063 6c61 derr); // │ │ │ │ -001b3fb0: 6661 696c 6564 2074 6f20 7265 6769 7374 failed to regist │ │ │ │ -001b3fc0: 6572 203c 2f73 7061 6e3e 3c2f 6469 763e er
    │ │ │ │ -001b3fd0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ -001b4000: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ -001b4010: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001b4020: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > struct │ │ │ │ -001b4040: 3c2f 7370 616e 3e68 7474 705f 6765 745f http_get_ │ │ │ │ -001b4050: 6461 7461 202a 6874 7470 6765 7464 6174 data *httpgetdat │ │ │ │ -001b4060: 613b 203c 2f64 6976 3e0a 3c64 6976 2063 a;
    .
    ht │ │ │ │ -001b4080: 7470 6765 7464 6174 6120 3d20 283c 7370 tpgetdata = (struct http_get_data*) │ │ │ │ -001b40c0: 736f 6170 5f6c 6f6f 6b75 705f 706c 7567 soap_lookup_plug │ │ │ │ -001b40d0: 696e 283c 6120 636c 6173 733d 2263 6f64 in(soap, http_get_id) │ │ │ │ -001b4110: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    if │ │ │ │ -001b4150: 2028 2168 7474 7067 6574 6461 7461 2920 (!httpgetdata) │ │ │ │ -001b4160: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... │ │ │ │ -001b4180: 203c 7370 616e 2063 6c61 7373 3d22 636f // if the │ │ │ │ -001b41a0: 2070 6c75 6769 6e20 7265 6769 7374 6572 plugin register │ │ │ │ -001b41b0: 6564 204f 4b2c 2074 6865 7265 2069 7320 ed OK, there is │ │ │ │ -001b41c0: 6365 7274 6169 6e6c 7920 6461 7461 2062 certainly data b │ │ │ │ -001b41d0: 7574 2063 616e 2623 3339 3b74 2068 7572 ut can't hur │ │ │ │ -001b41e0: 7420 746f 2063 6865 636b 203c 2f73 7061 t to check
    .
    ... │ │ │ │ -001b4210: 203c 7370 616e 2063 6c61 7373 3d22 636f // proces │ │ │ │ -001b4230: 7320 6d65 7373 6167 6573 3c2f 7370 616e s messages
    .
    size_t get_ok = htt │ │ │ │ -001b4290: 7067 6574 6461 7461 2d26 6774 3b73 7461 pgetdata->sta │ │ │ │ -001b42a0: 745f 6765 743b 203c 2f64 6976 3e0a 3c64 t_get;
    . │ │ │ │ -001b42c0: 2020 3c73 7061 6e20 636c 6173 733d 226b size │ │ │ │ -001b42e0: 5f74 3c2f 7370 616e 3e20 706f 7374 5f6f _t post_o │ │ │ │ -001b42f0: 6b20 3d20 6874 7470 6765 7464 6174 612d k = httpgetdata- │ │ │ │ -001b4300: 2667 743b 7374 6174 5f70 6f73 743b 203c >stat_post; < │ │ │ │ -001b4310: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    size_t errors = httpg │ │ │ │ -001b4360: 6574 6461 7461 2d26 6774 3b73 7461 745f etdata->stat_ │ │ │ │ -001b4370: 6661 696c 3b20 3c2f 6469 763e 0a3c 6469 fail;
    . │ │ │ │ -001b4390: 2074 696d 655f 7420 6e6f 7720 3d20 7469 time_t now = ti │ │ │ │ -001b43a0: 6d65 284e 554c 4c29 3b20 3c2f 6469 763e me(NULL);
    │ │ │ │ -001b43b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    struc │ │ │ │ -001b43e0: 7420 3c2f 7370 616e 3e74 6d20 2a54 3b20 t tm *T; │ │ │ │ -001b43f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    T = l │ │ │ │ -001b4410: 6f63 616c 7469 6d65 2826 616d 703b 6e6f ocaltime(&no │ │ │ │ -001b4420: 7729 3b20 3c2f 6469 763e 0a3c 6469 7620 w);
    .
    < │ │ │ │ -001b4440: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b4450: 6f72 6474 7970 6522 3e73 697a 655f 743c ordtype">size_t< │ │ │ │ -001b4460: 2f73 7061 6e3e 2068 6974 7374 6869 736d /span> hitsthism │ │ │ │ -001b4470: 696e 7574 6520 3d20 6874 7470 6765 7464 inute = httpgetd │ │ │ │ -001b4480: 6174 612d 2667 743b 6869 7374 5f6d 696e ata->hist_min │ │ │ │ -001b4490: 5b54 2d26 6774 3b74 6d5f 6d69 6e5d 3b20 [T->tm_min]; │ │ │ │ -001b44a0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t hitsthishour │ │ │ │ -001b44f0: 3d20 6874 7470 6765 7464 6174 612d 2667 = httpgetdata-&g │ │ │ │ -001b4500: 743b 6869 7374 5f68 6f75 725b 542d 2667 t;hist_hour[T-&g │ │ │ │ -001b4510: 743b 746d 5f68 6f75 725d 3b20 3c2f 6469 t;tm_hour]; .
    size_t h │ │ │ │ -001b4560: 6974 7374 6f64 6179 203d 2068 7474 7067 itstoday = httpg │ │ │ │ -001b4570: 6574 6461 7461 2d26 6774 3b68 6973 745f etdata->hist_ │ │ │ │ -001b4580: 6461 795b 542d 2667 743b 746d 5f79 6461 day[T->tm_yda │ │ │ │ -001b4590: 795d 3b3c 2f64 6976 3e0a 3c64 6976 2063 y];
    .
    }.

    An │ │ │ │ -001b45d0: 2048 5454 5020 4745 5420 6861 6e64 6c65 HTTP GET handle │ │ │ │ -001b45e0: 7220 6361 6e20 7369 6d70 6c79 2070 726f r can simply pro │ │ │ │ -001b45f0: 6475 6365 2073 6f6d 6520 4854 4d4c 2063 duce some HTML c │ │ │ │ -001b4600: 6f6e 7465 6e74 2c20 6f72 2061 6e79 206f ontent, or any o │ │ │ │ -001b4610: 7468 6572 2074 7970 6520 6f66 2063 6f6e ther type of con │ │ │ │ -001b4620: 7465 6e74 2062 7920 7365 6e64 696e 6720 tent by sending │ │ │ │ -001b4630: 6461 7461 2075 7369 6e67 203c 636f 6465 data using soap_resp │ │ │ │ -001b46f0: 6f6e 7365 3c2f 613e 3c2f 636f 6465 3e3a onse: │ │ │ │ -001b4700: 3c2f 703e 0a3c 6469 7620 636c 6173 733d

    .
    int my_http_get_ha │ │ │ │ -001b4760: 6e64 6c65 7228 3c73 7061 6e20 636c 6173 ndler(stru │ │ │ │ -001b4780: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap) struc │ │ │ │ +001b3c70: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ +001b3ca0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new(); │ │ │ │ +001b3d40: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ +001b3d80: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_registe │ │ │ │ +001b3de0: 725f 706c 7567 696e 5f61 7267 3c2f 613e r_plugin_arg │ │ │ │ +001b3df0: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +001b3e20: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , http_get, │ │ │ │ +001b3e80: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (void< │ │ │ │ +001b3ea0: 2f73 7061 6e3e 2a29 6d79 5f68 7474 705f /span>*)my_http_ │ │ │ │ +001b3eb0: 6765 745f 6861 6e64 6c65 7229 2920 3c2f get_handler)) ..
    ... < │ │ │ │ +001b3fd0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001b3fe0: 656e 7422 3e2f 2f3c 2f73 7061 6e3e 3c2f ent">//.
    s │ │ │ │ +001b4020: 7472 7563 7420 3c2f 7370 616e 3e68 7474 truct htt │ │ │ │ +001b4030: 705f 6765 745f 6461 7461 202a 6874 7470 p_get_data *http │ │ │ │ +001b4040: 6765 7464 6174 613b 203c 2f64 6976 3e0a getdata;
    . │ │ │ │ +001b4050: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    .< │ │ │ │ +001b4100: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001b4110: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > if< │ │ │ │ +001b4130: 2f73 7061 6e3e 2028 2168 7474 7067 6574 /span> (!httpget │ │ │ │ +001b4140: 6461 7461 2920 3c2f 6469 763e 0a3c 6469 data)
    . │ │ │ │ +001b4160: 2020 202e 2e2e 203c 7370 616e 2063 6c61 ... // │ │ │ │ +001b4180: 6966 2074 6865 2070 6c75 6769 6e20 7265 if the plugin re │ │ │ │ +001b4190: 6769 7374 6572 6564 204f 4b2c 2074 6865 gistered OK, the │ │ │ │ +001b41a0: 7265 2069 7320 6365 7274 6169 6e6c 7920 re is certainly │ │ │ │ +001b41b0: 6461 7461 2062 7574 2063 616e 2623 3339 data but can' │ │ │ │ +001b41c0: 3b74 2068 7572 7420 746f 2063 6865 636b ;t hurt to check │ │ │ │ +001b41d0: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001b41e0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001b41f0: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // │ │ │ │ +001b4210: 7072 6f63 6573 7320 6d65 7373 6167 6573 process messages │ │ │ │ +001b4220: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001b4240: 2020 3c73 7061 6e20 636c 6173 733d 226b size │ │ │ │ +001b4260: 5f74 3c2f 7370 616e 3e20 6765 745f 6f6b _t get_ok │ │ │ │ +001b4270: 203d 2068 7474 7067 6574 6461 7461 2d26 = httpgetdata-& │ │ │ │ +001b4280: 6774 3b73 7461 745f 6765 743b 203c 2f64 gt;stat_get; .
    size_t │ │ │ │ +001b42d0: 706f 7374 5f6f 6b20 3d20 6874 7470 6765 post_ok = httpge │ │ │ │ +001b42e0: 7464 6174 612d 2667 743b 7374 6174 5f70 tdata->stat_p │ │ │ │ +001b42f0: 6f73 743b 203c 2f64 6976 3e0a 3c64 6976 ost;
    .
    │ │ │ │ +001b4310: 3c73 7061 6e20 636c 6173 733d 226b 6579 size_t │ │ │ │ +001b4330: 3c2f 7370 616e 3e20 6572 726f 7273 203d errors = │ │ │ │ +001b4340: 2068 7474 7067 6574 6461 7461 2d26 6774 httpgetdata-> │ │ │ │ +001b4350: 3b73 7461 745f 6661 696c 3b20 3c2f 6469 ;stat_fail; .
    time_t no │ │ │ │ +001b4380: 7720 3d20 7469 6d65 284e 554c 4c29 3b20 w = time(NULL); │ │ │ │ +001b4390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    struct t │ │ │ │ +001b43d0: 6d20 2a54 3b20 3c2f 6469 763e 0a3c 6469 m *T;
    . │ │ │ │ +001b43f0: 2054 203d 206c 6f63 616c 7469 6d65 2826 T = localtime(& │ │ │ │ +001b4400: 616d 703b 6e6f 7729 3b20 3c2f 6469 763e amp;now);
    │ │ │ │ +001b4410: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    s │ │ │ │ +001b4440: 697a 655f 743c 2f73 7061 6e3e 2068 6974 ize_t hit │ │ │ │ +001b4450: 7374 6869 736d 696e 7574 6520 3d20 6874 sthisminute = ht │ │ │ │ +001b4460: 7470 6765 7464 6174 612d 2667 743b 6869 tpgetdata->hi │ │ │ │ +001b4470: 7374 5f6d 696e 5b54 2d26 6774 3b74 6d5f st_min[T->tm_ │ │ │ │ +001b4480: 6d69 6e5d 3b20 3c2f 6469 763e 0a3c 6469 min];
    . │ │ │ │ +001b44a0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 size_ │ │ │ │ +001b44c0: 743c 2f73 7061 6e3e 2068 6974 7374 6869 t hitsthi │ │ │ │ +001b44d0: 7368 6f75 7220 3d20 6874 7470 6765 7464 shour = httpgetd │ │ │ │ +001b44e0: 6174 612d 2667 743b 6869 7374 5f68 6f75 ata->hist_hou │ │ │ │ +001b44f0: 725b 542d 2667 743b 746d 5f68 6f75 725d r[T->tm_hour] │ │ │ │ +001b4500: 3b20 3c2f 6469 763e 0a3c 6469 7620 636c ;
    .
    size_t hitstoday = │ │ │ │ +001b4550: 2068 7474 7067 6574 6461 7461 2d26 6774 httpgetdata-> │ │ │ │ +001b4560: 3b68 6973 745f 6461 795b 542d 2667 743b ;hist_day[T-> │ │ │ │ +001b4570: 746d 5f79 6461 795d 3b3c 2f64 6976 3e0a tm_yday];
    . │ │ │ │ +001b4580: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    .
    │ │ │ │ +001b45a0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    If │ │ │ │ -001b4dd0: 796f 7520 7573 6520 3c63 6f64 653e 3c61 you use soap_co │ │ │ │ -001b4e90: 7079 3c2f 613e 3c2f 636f 6465 3e20 746f py to │ │ │ │ -001b4ea0: 2063 6f70 7920 7468 6520 3c63 6f64 653e copy the │ │ │ │ -001b4eb0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap │ │ │ │ -001b4f00: 3c2f 613e 3c2f 636f 6465 3e20 636f 6e74 cont │ │ │ │ -001b4f10: 6578 7420 7769 7468 2074 6865 2070 6c75 ext with the plu │ │ │ │ -001b4f20: 6769 6e2c 2074 6865 2070 6c75 6769 6e27 gin, the plugin' │ │ │ │ -001b4f30: 7320 6461 7461 2077 696c 6c20 6265 2073 s data will be s │ │ │ │ -001b4f40: 6861 7265 6420 6279 2074 6865 2063 6f70 hared by the cop │ │ │ │ -001b4f50: 792e 2054 6865 7265 666f 7265 2c20 7468 y. Therefore, th │ │ │ │ -001b4f60: 6520 7374 6174 6973 7469 6373 2061 7265 e statistics are │ │ │ │ -001b4f70: 206e 6f74 2031 3030 2520 6775 6172 616e not 100% guaran │ │ │ │ -001b4f80: 7465 6564 2074 6f20 6265 2061 6363 7572 teed to be accur │ │ │ │ -001b4f90: 6174 6520 666f 7220 6d75 6c74 692d 7468 ate for multi-th │ │ │ │ -001b4fa0: 7265 6164 6564 2073 6572 7669 6365 7320 readed services │ │ │ │ -001b4fb0: 7369 6e63 6520 7261 6365 2063 6f6e 6469 since race condi │ │ │ │ -001b4fc0: 7469 6f6e 7320 6f6e 2074 6865 2063 6f75 tions on the cou │ │ │ │ -001b4fd0: 6e74 6572 7320 6d61 7920 6f63 6375 722e nters may occur. │ │ │ │ -001b4fe0: 204d 7574 6578 2069 7320 6e6f 7420 7573 Mutex is not us │ │ │ │ -001b4ff0: 6564 2074 6f20 7570 6461 7465 2074 6865 ed to update the │ │ │ │ -001b5000: 2063 6f75 6e74 6572 7320 746f 2061 766f counters to avo │ │ │ │ -001b5010: 6964 2069 6e74 726f 6475 6369 6e67 2065 id introducing e │ │ │ │ -001b5020: 7870 656e 7369 7665 2073 796e 6368 726f xpensive synchro │ │ │ │ -001b5030: 6e69 7a61 7469 6f6e 2070 6f69 6e74 732e nization points. │ │ │ │ -001b5040: 2049 6620 3130 3025 2073 6572 7665 722d If 100% server- │ │ │ │ -001b5050: 7369 6465 2061 6363 7572 6163 7920 6973 side accuracy is │ │ │ │ -001b5060: 2072 6571 7569 7265 642c 2061 6464 206d required, add m │ │ │ │ -001b5070: 7574 6578 2061 7420 7468 6520 706f 696e utex at the poin │ │ │ │ -001b5080: 7473 2069 6e64 6963 6174 6564 2069 6e20 ts indicated in │ │ │ │ -001b5090: 7468 6520 3c65 6d3e 3c63 6f64 653e 6874 the ht │ │ │ │ -001b50a0: 7470 6765 742e 633c 2f63 6f64 653e 3c2f tpget.c code.

    .

    The client-side │ │ │ │ -001b50d0: 2075 7365 206f 6620 4854 5450 2047 4554 use of HTTP GET │ │ │ │ -001b50e0: 2069 7320 7072 6f76 6964 6564 2062 7920 is provided by │ │ │ │ -001b50f0: 7468 6520 3c63 6f64 653e 3c61 2063 6c61 the so │ │ │ │ -001b5170: 6170 5f47 4554 3c2f 613e 3c2f 636f 6465 ap_GET operation. To │ │ │ │ -001b5190: 7265 6365 6976 6520 6120 534f 4150 2f58 receive a SOAP/X │ │ │ │ -001b51a0: 4d4c 2028 7265 7370 6f6e 7365 2920 6d65 ML (response) me │ │ │ │ -001b51b0: 7373 6167 6520 3c65 6d3e 3c63 6f64 653e ssage │ │ │ │ -001b51c0: 6e73 3a6d 6574 686f 6452 6573 706f 6e73 ns:methodRespons │ │ │ │ -001b51d0: 653c 2f63 6f64 653e 3c2f 656d 3e2c 2075 e, u │ │ │ │ -001b51e0: 7365 3a3c 2f70 3e0a 3c64 6976 2063 6c61 se:

    .
    │ │ │ │ -001b5210: 3c73 7061 6e20 636c 6173 733d 226b 6579 int main()
    so │ │ │ │ +001b4830: 6170 3c2f 613e 2d26 6774 3b3c 6120 636c ap->http_content │ │ │ │ +001b4890: 3c2f 613e 203d 203c 7370 616e 2063 6c61 = "text/ht │ │ │ │ +001b48c0: 6d6c 2671 756f 743b 3c2f 7370 616e 3e3b ml"; │ │ │ │ +001b48d0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    if │ │ │ │ +001b4910: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_response(soap, SOAP_FILE)
    .
    || │ │ │ │ +001b4a20: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send(< │ │ │ │ +001b4a80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b4a90: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b4aa0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001b4ab0: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +001b4ad0: 743b 266c 743b 6874 6d6c 2667 743b 4865 t;<html>He │ │ │ │ +001b4ae0: 6c6c 6f26 6c74 3b2f 6874 6d6c 2667 743b llo</html> │ │ │ │ +001b4af0: 2671 756f 743b 3c2f 7370 616e 3e29 3c2f ").
    || soa │ │ │ │ +001b4b70: 705f 656e 645f 7365 6e64 3c2f 613e 283c p_end_send(< │ │ │ │ +001b4b80: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b4b90: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b4ba0: 6874 6d6c 223e 736f 6170 3c2f 613e 293c html">soap)< │ │ │ │ +001b4bb0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>..< │ │ │ │ +001b4c90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001b4ca0: 3e20 203c 7370 616e 2063 6c61 7373 3d22 > ret │ │ │ │ +001b4cc0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn S │ │ │ │ +001b4d20: 4f41 505f 4f4b 3c2f 613e 3b20 3c73 7061 OAP_OK; // return SOAP │ │ │ │ +001b4d50: 5f4f 4b20 6f72 2048 5454 5020 6572 726f _OK or HTTP erro │ │ │ │ +001b4d60: 7220 636f 6465 2c20 652e 672e 2034 3034 r code, e.g. 404 │ │ │ │ +001b4d70: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ +001b4d80: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001b4d90: 3e7d 3c2f 6469 763e 0a3c 2f64 6976 3e3c >}
    .
    < │ │ │ │ +001b4da0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +001b4db0: 3c70 3e49 6620 796f 7520 7573 6520 3c63

    If you use s │ │ │ │ +001b4e70: 6f61 705f 636f 7079 3c2f 613e 3c2f 636f oap_copy to copy the │ │ │ │ +001b4e90: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap context with t │ │ │ │ +001b4f00: 6865 2070 6c75 6769 6e2c 2074 6865 2070 he plugin, the p │ │ │ │ +001b4f10: 6c75 6769 6e27 7320 6461 7461 2077 696c lugin's data wil │ │ │ │ +001b4f20: 6c20 6265 2073 6861 7265 6420 6279 2074 l be shared by t │ │ │ │ +001b4f30: 6865 2063 6f70 792e 2054 6865 7265 666f he copy. Therefo │ │ │ │ +001b4f40: 7265 2c20 7468 6520 7374 6174 6973 7469 re, the statisti │ │ │ │ +001b4f50: 6373 2061 7265 206e 6f74 2031 3030 2520 cs are not 100% │ │ │ │ +001b4f60: 6775 6172 616e 7465 6564 2074 6f20 6265 guaranteed to be │ │ │ │ +001b4f70: 2061 6363 7572 6174 6520 666f 7220 6d75 accurate for mu │ │ │ │ +001b4f80: 6c74 692d 7468 7265 6164 6564 2073 6572 lti-threaded ser │ │ │ │ +001b4f90: 7669 6365 7320 7369 6e63 6520 7261 6365 vices since race │ │ │ │ +001b4fa0: 2063 6f6e 6469 7469 6f6e 7320 6f6e 2074 conditions on t │ │ │ │ +001b4fb0: 6865 2063 6f75 6e74 6572 7320 6d61 7920 he counters may │ │ │ │ +001b4fc0: 6f63 6375 722e 204d 7574 6578 2069 7320 occur. Mutex is │ │ │ │ +001b4fd0: 6e6f 7420 7573 6564 2074 6f20 7570 6461 not used to upda │ │ │ │ +001b4fe0: 7465 2074 6865 2063 6f75 6e74 6572 7320 te the counters │ │ │ │ +001b4ff0: 746f 2061 766f 6964 2069 6e74 726f 6475 to avoid introdu │ │ │ │ +001b5000: 6369 6e67 2065 7870 656e 7369 7665 2073 cing expensive s │ │ │ │ +001b5010: 796e 6368 726f 6e69 7a61 7469 6f6e 2070 ynchronization p │ │ │ │ +001b5020: 6f69 6e74 732e 2049 6620 3130 3025 2073 oints. If 100% s │ │ │ │ +001b5030: 6572 7665 722d 7369 6465 2061 6363 7572 erver-side accur │ │ │ │ +001b5040: 6163 7920 6973 2072 6571 7569 7265 642c acy is required, │ │ │ │ +001b5050: 2061 6464 206d 7574 6578 2061 7420 7468 add mutex at th │ │ │ │ +001b5060: 6520 706f 696e 7473 2069 6e64 6963 6174 e points indicat │ │ │ │ +001b5070: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the httpget.c code.< │ │ │ │ +001b50a0: 2f70 3e0a 3c70 3e54 6865 2063 6c69 656e /p>.

    The clien │ │ │ │ +001b50b0: 742d 7369 6465 2075 7365 206f 6620 4854 t-side use of HT │ │ │ │ +001b50c0: 5450 2047 4554 2069 7320 7072 6f76 6964 TP GET is provid │ │ │ │ +001b50d0: 6564 2062 7920 7468 6520 3c63 6f64 653e ed by the │ │ │ │ +001b50e0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 soap_GET │ │ │ │ +001b5160: 3c2f 636f 6465 3e20 6f70 6572 6174 696f operatio │ │ │ │ +001b5170: 6e2e 2054 6f20 7265 6365 6976 6520 6120 n. To receive a │ │ │ │ +001b5180: 534f 4150 2f58 4d4c 2028 7265 7370 6f6e SOAP/XML (respon │ │ │ │ +001b5190: 7365 2920 6d65 7373 6167 6520 3c65 6d3e se) message │ │ │ │ +001b51a0: 3c63 6f64 653e 6e73 3a6d 6574 686f 6452 ns:methodR │ │ │ │ +001b51b0: 6573 706f 6e73 653c 2f63 6f64 653e 3c2f esponse, use:

    .
    │ │ │ │ +001b5210: 696e 743c 2f73 7061 6e3e 206d 6169 6e28 int main( │ │ │ │ +001b5220: 293c 2f64 6976 3e0a 3c64 6976 2063 6c61 )
    .
    {
    .
    {
    .
    .
    │ │ │ │ -001b5390: 6966 3c2f 7370 616e 3e20 283c 6120 636c if (soap_ │ │ │ │ -001b53f0: 4745 543c 2f61 3e28 3c61 2063 6c61 7373 GET(s │ │ │ │ -001b5420: 6f61 703c 2f61 3e2c 203c 6120 636c 6173 oap, endpoint, │ │ │ │ -001b5480: 4e55 4c4c 2929 203c 2f64 6976 3e0a 3c64 NULL))
    . │ │ │ │ -001b54a0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... // │ │ │ │ -001b54c0: 2065 7272 6f72 3c2f 7370 616e 3e3c 2f64 error.
    else if (soap_recv_ns_ │ │ │ │ -001b5540: 5f77 6562 6d65 7468 6f64 5265 7370 6f6e _webmethodRespon │ │ │ │ -001b5550: 7365 283c 6120 636c 6173 733d 2263 6f64 se(soap, ...))
    │ │ │ │ -001b5590: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... // error │ │ │ │ -001b55d0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    else │ │ │ │ -001b5610: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    .. │ │ │ │ -001b5630: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . // succe │ │ │ │ -001b5650: 7373 3c2f 7370 616e 3e3c 2f64 6976 3e0a ss
    . │ │ │ │ -001b5660: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ -001b5710: 0a3c 6469 7620 636c 6173 733d 226c 696e .. │ │ │ │ -001b57d0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_done(soap);
    .
    < │ │ │ │ -001b58d0: 6120 6872 6566 3d22 6772 6f75 705f 5f67 a href="group__g │ │ │ │ -001b58e0: 726f 7570 5f5f 696f 2e68 746d 6c23 6761 roup__io.html#ga │ │ │ │ -001b58f0: 3935 3362 6465 6537 6562 6632 3432 6230 953bdee7ebf242b0 │ │ │ │ -001b5900: 3536 3833 3465 3535 3932 3037 3961 6539 56834e5592079ae9 │ │ │ │ -001b5910: 223e 736f 6170 5f47 4554 3c2f 613e 3c2f ">soap_GET
    int soap │ │ │ │ -001b5940: 5f47 4554 2873 7472 7563 7420 736f 6170 _GET(struct soap │ │ │ │ -001b5950: 202a 736f 6170 2c20 636f 6e73 7420 6368 *soap, const ch │ │ │ │ -001b5960: 6172 202a 656e 6470 6f69 6e74 2c20 636f ar *endpoint, co │ │ │ │ -001b5970: 6e73 7420 6368 6172 202a 6163 7469 6f6e nst char *action │ │ │ │ -001b5980: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    HTTP G │ │ │ │ -001b59a0: 4554 2063 6f6e 7465 6e74 2066 726f 6d20 ET content from │ │ │ │ -001b59b0: 7365 7276 6572 2e3c 2f64 6976 3e3c 2f64 server.
    .

    To │ │ │ │ -001b59e0: 2072 6563 6569 7665 2061 6e79 2048 5454 receive any HTT │ │ │ │ -001b59f0: 5020 426f 6479 2064 6174 6120 696e 746f P Body data into │ │ │ │ -001b5a00: 2061 2062 7566 6665 722c 2075 7365 3a3c a buffer, use:< │ │ │ │ -001b5a10: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    int │ │ │ │ -001b5a60: 206d 6169 6e28 293c 2f64 6976 3e0a 3c64 main()
    . stru │ │ │ │ +001b5270: 6374 203c 2f73 7061 6e3e 3c61 2063 6c61 ct soap *soap = soap_new() │ │ │ │ +001b5340: 3b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 ;
    .
    if │ │ │ │ +001b5380: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_GET(soap, < │ │ │ │ +001b5410: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b5420: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b5430: 6874 6d6c 2361 6564 3162 3836 6238 6133 html#aed1b86b8a3 │ │ │ │ +001b5440: 3461 6561 3836 3130 3337 3531 6139 3332 4aea86103751a932 │ │ │ │ +001b5450: 6339 6463 6539 223e 656e 6470 6f69 6e74 c9dce9">endpoint │ │ │ │ +001b5460: 3c2f 613e 2c20 4e55 4c4c 2929 203c 2f64 , NULL)) .
    ... // error
    .
    else if │ │ │ │ +001b5510: 3c2f 7370 616e 3e20 2873 6f61 705f 7265 (soap_re │ │ │ │ +001b5520: 6376 5f6e 735f 5f77 6562 6d65 7468 6f64 cv_ns__webmethod │ │ │ │ +001b5530: 5265 7370 6f6e 7365 283c 6120 636c 6173 Response( │ │ │ │ +001b5560: 736f 6170 3c2f 613e 2c20 2e2e 2e29 2920 soap, ...)) │ │ │ │ +001b5570: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... │ │ │ │ +001b5590: 203c 7370 616e 2063 6c61 7373 3d22 636f // error< │ │ │ │ +001b55b0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +001b55d0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ +001b55f0: 2f73 7061 6e3e 203c 2f64 6976 3e0a 3c64 /span>
    . │ │ │ │ +001b5610: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... // │ │ │ │ +001b5630: 2073 7563 6365 7373 3c2f 7370 616e 3e3c success< │ │ │ │ +001b5640: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    soa │ │ │ │ +001b56b0: 705f 6465 7374 726f 793c 2f61 3e28 3c61 p_destroy(soap); │ │ │ │ +001b56f0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    so │ │ │ │ +001b5760: 6170 5f65 6e64 3c2f 613e 283c 6120 636c ap_end(soap); . │ │ │ │ +001b5850: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    in │ │ │ │ +001b5920: 7420 736f 6170 5f47 4554 2873 7472 7563 t soap_GET(struc │ │ │ │ +001b5930: 7420 736f 6170 202a 736f 6170 2c20 636f t soap *soap, co │ │ │ │ +001b5940: 6e73 7420 6368 6172 202a 656e 6470 6f69 nst char *endpoi │ │ │ │ +001b5950: 6e74 2c20 636f 6e73 7420 6368 6172 202a nt, const char * │ │ │ │ +001b5960: 6163 7469 6f6e 293c 2f64 6976 3e3c 6469 action)
    │ │ │ │ +001b5980: 4854 5450 2047 4554 2063 6f6e 7465 6e74 HTTP GET content │ │ │ │ +001b5990: 2066 726f 6d20 7365 7276 6572 2e3c 2f64 from server.
    .
    │ │ │ │ +001b59b0: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    See also │ │ │ │ -001b64f0: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_get.

    .

    ... │ │ │ │ -001b6590: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -001b65a0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -001b65b0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -001b65c0: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .RESTful serve │ │ │ │ -001b6600: 722d 7369 6465 2041 5049 2077 6974 6820 r-side API with │ │ │ │ -001b6610: 7468 6520 4854 5450 2050 4f53 5420 706c the HTTP POST pl │ │ │ │ -001b6620: 7567 696e 3c2f 6833 3e0a 3c70 3e53 6572 ugin

    .

    Ser │ │ │ │ -001b6630: 7665 722d 7369 6465 2075 7365 206f 6620 ver-side use of │ │ │ │ -001b6640: 5245 5354 6675 6c20 4854 5450 2050 4f53 RESTful HTTP POS │ │ │ │ -001b6650: 542c 2050 5554 2c20 5041 5443 482c 2061 T, PUT, PATCH, a │ │ │ │ -001b6660: 6e64 2044 454c 4554 4520 6f70 6572 6174 nd DELETE operat │ │ │ │ -001b6670: 696f 6e73 2061 7265 2073 7570 706f 7274 ions are support │ │ │ │ -001b6680: 6564 2077 6974 6820 7468 6520 3c63 6f64 ed with the http_post HTTP PO │ │ │ │ -001b6730: 5354 2070 6c75 6769 6e20 3c65 6d3e 3c63 ST plugin gsoap/plugin │ │ │ │ -001b6750: 2f68 7474 7070 6f73 742e 633c 2f63 6f64 /httppost.c.

    .

    │ │ │ │ -001b6770: 5468 6520 3c63 6f64 653e 3c61 2063 6c61 The http │ │ │ │ -001b6800: 5f70 6f73 743c 2f61 3e3c 2f63 6f64 653e _post │ │ │ │ -001b6810: 2048 5454 5020 504f 5354 2070 6c75 6769 HTTP POST plugi │ │ │ │ -001b6820: 6e20 616c 6c6f 7773 2079 6f75 7220 7365 n allows your se │ │ │ │ -001b6830: 7276 6572 2074 6f20 6861 6e64 6c65 2052 rver to handle R │ │ │ │ -001b6840: 4553 5466 756c 2048 5454 5020 504f 5354 ESTful HTTP POST │ │ │ │ -001b6850: 2072 6571 7565 7374 7320 616e 6420 6174 requests and at │ │ │ │ -001b6860: 2074 6865 2073 616d 6520 7469 6d65 2073 the same time s │ │ │ │ -001b6870: 7469 6c6c 2073 6572 7665 2053 4f41 502d till serve SOAP- │ │ │ │ -001b6880: 6261 7365 6420 504f 5354 2072 6571 7565 based POST reque │ │ │ │ -001b6890: 7374 732e 2054 6865 2070 6c75 6769 6e20 sts. The plugin │ │ │ │ -001b68a0: 616c 736f 2070 726f 7669 6465 7320 7375 also provides su │ │ │ │ -001b68b0: 7070 6f72 7420 666f 7220 636c 6965 6e74 pport for client │ │ │ │ -001b68c0: 2061 7070 6c69 6361 7469 6f6e 7320 746f applications to │ │ │ │ -001b68d0: 2069 7373 7565 2048 5454 5020 504f 5354 issue HTTP POST │ │ │ │ -001b68e0: 206f 7065 7261 7469 6f6e 7320 746f 2061 operations to a │ │ │ │ -001b68f0: 2073 6572 7665 722e 3c2f 703e 0a3c 703e server.

    .

    │ │ │ │ -001b6900: 546f 2073 696d 706c 6966 7920 7468 6520 To simplify the │ │ │ │ -001b6910: 7365 7276 6572 2d73 6964 6520 6861 6e64 server-side hand │ │ │ │ -001b6920: 6c69 6e67 206f 6620 504f 5354 2072 6571 ling of POST req │ │ │ │ -001b6930: 7565 7374 732c 2068 616e 646c 6572 7320 uests, handlers │ │ │ │ -001b6940: 6361 6e20 6265 2061 7373 6f63 6961 7465 can be associate │ │ │ │ -001b6950: 6420 7769 7468 206d 6564 6961 2074 7970 d with media typ │ │ │ │ -001b6960: 6573 3a3c 2f70 3e0a 3c64 6976 2063 6c61 es:

    .
    │ │ │ │ -001b6990: 3c73 7061 6e20 636c 6173 733d 226b 6579 struct http_post_ha │ │ │ │ -001b69c0: 6e64 6c65 7273 206d 795f 6861 6e64 6c65 ndlers my_handle │ │ │ │ -001b69d0: 7273 5b5d 203d 203c 2f64 6976 3e0a 3c64 rs[] =
    .struct < │ │ │ │ +001b5aa0: 2f73 7061 6e3e 3c61 2063 6c61 7373 3d22 /span>soa │ │ │ │ +001b5ad0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ +001b5b00: 6170 3c2f 613e 203d 203c 6120 636c 6173 ap = so │ │ │ │ +001b5b60: 6170 5f6e 6577 3c2f 613e 2829 3b3c 2f64 ap_new();.
    char *r │ │ │ │ +001b5bb0: 6573 706f 6e73 6520 3d20 4e55 4c4c 3b20 esponse = NULL; │ │ │ │ +001b5bc0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    size_t response_len; │ │ │ │ +001b5c10: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    . │ │ │ │ +001b5d40: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    || (respon │ │ │ │ +001b5d60: 7365 203d 203c 6120 636c 6173 733d 2263 se = soap_http_g │ │ │ │ +001b5dc0: 6574 5f62 6f64 793c 2f61 3e28 3c61 2063 et_body(soap, &am │ │ │ │ +001b5e00: 703b 7265 7370 6f6e 7365 5f6c 656e 2929 p;response_len)) │ │ │ │ +001b5e10: 203d 3d20 4e55 4c4c 3c2f 6469 763e 0a3c == NULL
    .< │ │ │ │ +001b5e20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001b5e30: 3e20 2020 7c7c 203c 6120 636c 6173 733d > || soap_end_ │ │ │ │ +001b5e90: 7265 6376 3c2f 613e 2826 616d 703b 3c61 recv(&soap))< │ │ │ │ +001b5ed0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    ... │ │ │ │ +001b5ef0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error
    .
    │ │ │ │ +001b5f30: 3c73 7061 6e20 636c 6173 733d 226b 6579 else
    .
    │ │ │ │ +001b5f70: 2020 2e2e 2e20 3c73 7061 6e20 636c 6173 ... // u │ │ │ │ +001b5f90: 7365 2074 6865 2072 6573 706f 6e73 6520 se the response │ │ │ │ +001b5fa0: 7374 7269 6e67 2028 4e55 4c4c 2069 6e64 string (NULL ind │ │ │ │ +001b5fb0: 6963 6174 6573 206e 6f20 626f 6479 206f icates no body o │ │ │ │ +001b5fc0: 7220 6572 726f 7229 3c2f 7370 616e 3e3c r error)< │ │ │ │ +001b5fd0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ │ +001b60a0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end< │ │ │ │ +001b6100: 2f61 3e28 2661 6d70 3b3c 6120 636c 6173 /a>(& │ │ │ │ +001b6130: 736f 6170 3c2f 613e 293b 203c 2f64 6976 soap);
    .
    soap_ │ │ │ │ +001b61b0: 646f 6e65 3c2f 613e 2826 616d 703b 3c61 done(&soap);< │ │ │ │ +001b61f0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    }
    . │ │ │ │ +001b6210: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ +001b6260: 3c64 6976 2063 6c61 7373 3d22 7474 6e61 int soap_end_r │ │ │ │ +001b62f0: 6563 7628 7374 7275 6374 2073 6f61 7020 ecv(struct soap │ │ │ │ +001b6300: 2a73 6f61 7029 3c2f 6469 763e 3c64 6976 *soap)
    F │ │ │ │ +001b6320: 696e 616c 697a 6520 7468 6520 636f 6e74 inalize the cont │ │ │ │ +001b6330: 6578 7420 6166 7465 7220 7265 6365 6976 ext after receiv │ │ │ │ +001b6340: 696e 672e 3c2f 6469 763e 3c2f 6469 763e ing.
    │ │ │ │ +001b6350: 0a3c 6469 7620 636c 6173 733d 2274 7463 .
    soap_htt │ │ │ │ +001b6400: 705f 6765 745f 626f 6479 3c2f 613e 3c2f p_get_body
    char * s │ │ │ │ +001b6430: 6f61 705f 6874 7470 5f67 6574 5f62 6f64 oap_http_get_bod │ │ │ │ +001b6440: 7928 7374 7275 6374 2073 6f61 7020 2a73 y(struct soap *s │ │ │ │ +001b6450: 6f61 702c 2073 697a 655f 7420 2a6c 656e oap, size_t *len │ │ │ │ +001b6460: 293c 2f64 6976 3e3c 6469 7620 636c 6173 )
    Get th │ │ │ │ +001b6480: 6520 4854 5450 2062 6f64 7920 6d65 7373 e HTTP body mess │ │ │ │ +001b6490: 6167 6520 6173 2061 2073 7472 696e 672e age as a string. │ │ │ │ +001b64a0: 3c2f 6469 763e 3c2f 6469 763e 0a3c 2f64
    .

    See also │ │ │ │ +001b64d0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 http_get< │ │ │ │ +001b6560: 2f61 3e3c 2f63 6f64 653e 2e3c 2f70 3e0a /a>.

    . │ │ │ │ +001b6570: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +001b6590: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .RESTful │ │ │ │ +001b65e0: 2073 6572 7665 722d 7369 6465 2041 5049 server-side API │ │ │ │ +001b65f0: 2077 6974 6820 7468 6520 4854 5450 2050 with the HTTP P │ │ │ │ +001b6600: 4f53 5420 706c 7567 696e 3c2f 6833 3e0a OST plugin

    . │ │ │ │ +001b6610: 3c70 3e53 6572 7665 722d 7369 6465 2075

    Server-side u │ │ │ │ +001b6620: 7365 206f 6620 5245 5354 6675 6c20 4854 se of RESTful HT │ │ │ │ +001b6630: 5450 2050 4f53 542c 2050 5554 2c20 5041 TP POST, PUT, PA │ │ │ │ +001b6640: 5443 482c 2061 6e64 2044 454c 4554 4520 TCH, and DELETE │ │ │ │ +001b6650: 6f70 6572 6174 696f 6e73 2061 7265 2073 operations are s │ │ │ │ +001b6660: 7570 706f 7274 6564 2077 6974 6820 7468 upported with th │ │ │ │ +001b6670: 6520 3c63 6f64 653e 3c61 2063 6c61 7373 e http_p │ │ │ │ +001b6700: 6f73 743c 2f61 3e3c 2f63 6f64 653e 2048 ost H │ │ │ │ +001b6710: 5454 5020 504f 5354 2070 6c75 6769 6e20 TTP POST plugin │ │ │ │ +001b6720: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ +001b6730: 706c 7567 696e 2f68 7474 7070 6f73 742e plugin/httppost. │ │ │ │ +001b6740: 633c 2f63 6f64 653e 3c2f 656d 3e2e 3c2f c..

    The │ │ │ │ +001b6760: 3c61 2063 6c61 7373 3d22 656c 2220 6872 http_post< │ │ │ │ +001b67f0: 2f63 6f64 653e 2048 5454 5020 504f 5354 /code> HTTP POST │ │ │ │ +001b6800: 2070 6c75 6769 6e20 616c 6c6f 7773 2079 plugin allows y │ │ │ │ +001b6810: 6f75 7220 7365 7276 6572 2074 6f20 6861 our server to ha │ │ │ │ +001b6820: 6e64 6c65 2052 4553 5466 756c 2048 5454 ndle RESTful HTT │ │ │ │ +001b6830: 5020 504f 5354 2072 6571 7565 7374 7320 P POST requests │ │ │ │ +001b6840: 616e 6420 6174 2074 6865 2073 616d 6520 and at the same │ │ │ │ +001b6850: 7469 6d65 2073 7469 6c6c 2073 6572 7665 time still serve │ │ │ │ +001b6860: 2053 4f41 502d 6261 7365 6420 504f 5354 SOAP-based POST │ │ │ │ +001b6870: 2072 6571 7565 7374 732e 2054 6865 2070 requests. The p │ │ │ │ +001b6880: 6c75 6769 6e20 616c 736f 2070 726f 7669 lugin also provi │ │ │ │ +001b6890: 6465 7320 7375 7070 6f72 7420 666f 7220 des support for │ │ │ │ +001b68a0: 636c 6965 6e74 2061 7070 6c69 6361 7469 client applicati │ │ │ │ +001b68b0: 6f6e 7320 746f 2069 7373 7565 2048 5454 ons to issue HTT │ │ │ │ +001b68c0: 5020 504f 5354 206f 7065 7261 7469 6f6e P POST operation │ │ │ │ +001b68d0: 7320 746f 2061 2073 6572 7665 722e 3c2f s to a server..

    To simplif │ │ │ │ +001b68f0: 7920 7468 6520 7365 7276 6572 2d73 6964 y the server-sid │ │ │ │ +001b6900: 6520 6861 6e64 6c69 6e67 206f 6620 504f e handling of PO │ │ │ │ +001b6910: 5354 2072 6571 7565 7374 732c 2068 616e ST requests, han │ │ │ │ +001b6920: 646c 6572 7320 6361 6e20 6265 2061 7373 dlers can be ass │ │ │ │ +001b6930: 6f63 6961 7465 6420 7769 7468 206d 6564 ociated with med │ │ │ │ +001b6940: 6961 2074 7970 6573 3a3c 2f70 3e0a 3c64 ia types:

    .
    stru │ │ │ │ +001b6990: 6374 203c 2f73 7061 6e3e 6874 7470 5f70 ct http_p │ │ │ │ +001b69a0: 6f73 745f 6861 6e64 6c65 7273 206d 795f ost_handlers my_ │ │ │ │ +001b69b0: 6861 6e64 6c65 7273 5b5d 203d 203c 2f64 handlers[] = .
    {
    . │ │ │ │ -001b69f0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    { " │ │ │ │ -001b6a30: 696d 6167 652f 6a70 6726 7175 6f74 3b3c image/jpg"< │ │ │ │ -001b6a40: 2f73 7061 6e3e 2c20 6a70 6567 5f68 616e /span>, jpeg_han │ │ │ │ -001b6a50: 646c 6572 207d 2c20 3c2f 6469 763e 0a3c dler },
    .< │ │ │ │ -001b6a60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001b6a70: 3e20 207b 203c 7370 616e 2063 6c61 7373 > { "image/*&q │ │ │ │ -001b6aa0: 756f 743b 3c2f 7370 616e 3e2c 2020 2069 uot;, i │ │ │ │ -001b6ab0: 6d61 6765 5f68 616e 646c 6572 207d 2c20 mage_handler }, │ │ │ │ -001b6ac0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    { "t │ │ │ │ -001b6b00: 6578 742f 6874 6d6c 2671 756f 743b 3c2f ext/html", html_hand │ │ │ │ -001b6b20: 6c65 7220 7d2c 203c 2f64 6976 3e0a 3c64 ler },
    . │ │ │ │ -001b6b40: 2020 7b20 3c73 7061 6e20 636c 6173 733d { │ │ │ │ -001b6b60: 2671 756f 743b 7465 7874 2f2a 2671 756f "text/*&quo │ │ │ │ -001b6b70: 743b 3c2f 7370 616e 3e2c 2020 2020 7465 t;, te │ │ │ │ -001b6b80: 7874 5f68 616e 646c 6572 207d 2c20 3c2f xt_handler }, .
    { "POS │ │ │ │ -001b6bd0: 5426 7175 6f74 3b3c 2f73 7061 6e3e 2c20 T", │ │ │ │ -001b6be0: 2020 2020 2067 656e 6572 6963 5f50 4f53 generic_POS │ │ │ │ -001b6bf0: 545f 6861 6e64 6c65 7220 7d2c 203c 2f64 T_handler }, .
    { "PUT& │ │ │ │ -001b6c40: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -001b6c50: 2020 2020 6765 6e65 7269 635f 5055 545f generic_PUT_ │ │ │ │ -001b6c60: 6861 6e64 6c65 7220 7d2c 203c 2f64 6976 handler },
    .
    { "PATCH& │ │ │ │ -001b6cb0: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 2020 quot;, │ │ │ │ -001b6cc0: 2020 6765 6e65 7269 635f 5041 5443 485f generic_PATCH_ │ │ │ │ -001b6cd0: 6861 6e64 6c65 7220 7d2c 203c 2f64 6976 handler },
    .
    { "DELETE │ │ │ │ -001b6d20: 2671 756f 743b 3c2f 7370 616e 3e2c 2020 ", │ │ │ │ -001b6d30: 2020 6765 6e65 7269 635f 4445 4c45 5445 generic_DELETE │ │ │ │ -001b6d40: 5f68 616e 646c 6572 207d 2c20 3c2f 6469 _handler }, .
    { NULL } │ │ │ │ -001b6d70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    };
    .

    Note │ │ │ │ -001b6db0: 2074 6861 7420 3c63 6f64 653e 2a3c 2f63 that * and - │ │ │ │ -001b6dd0: 3c2f 636f 6465 3e20 6361 6e20 6265 2075 can be u │ │ │ │ -001b6de0: 7365 6420 6173 2077 696c 6463 6172 6473 sed as wildcards │ │ │ │ -001b6df0: 2074 6f20 6d61 7463 6820 616e 7920 7465 to match any te │ │ │ │ -001b6e00: 7874 2061 6e64 2061 6e79 2063 6861 7261 xt and any chara │ │ │ │ -001b6e10: 6374 6572 2c20 7265 7370 6563 7469 7665 cter, respective │ │ │ │ -001b6e20: 6c79 2e20 4d65 6469 6120 7479 7065 7320 ly. Media types │ │ │ │ -001b6e30: 6d61 7920 6861 7665 206f 7074 696f 6e61 may have optiona │ │ │ │ -001b6e40: 6c20 7061 7261 6d65 7465 7273 2061 6674 l parameters aft │ │ │ │ -001b6e50: 6572 203c 636f 6465 3e3b 3c2f 636f 6465 er ; such as │ │ │ │ -001b6e70: 6368 6172 7365 743c 2f63 6f64 653e 2061 charset a │ │ │ │ -001b6e80: 6e64 203c 636f 6465 3e62 6f75 6e64 6172 nd boundar │ │ │ │ -001b6e90: 793c 2f63 6f64 653e 2e20 5468 6573 6520 y. These │ │ │ │ -001b6ea0: 7061 7261 6d65 7465 7273 2063 616e 2062 parameters can b │ │ │ │ -001b6eb0: 6520 6d61 7463 6865 6420 6279 2074 6865 e matched by the │ │ │ │ -001b6ec0: 206d 6564 6961 2074 7970 6520 7061 7474 media type patt │ │ │ │ -001b6ed0: 6572 6e73 2069 6e20 7468 6520 7461 626c erns in the tabl │ │ │ │ -001b6ee0: 652e 2050 6174 7465 726e 7320 7468 6174 e. Patterns that │ │ │ │ -001b6ef0: 2061 7265 206d 6f72 6520 7370 6563 6966 are more specif │ │ │ │ -001b6f00: 6963 206d 7573 7420 7072 6563 6564 6520 ic must precede │ │ │ │ -001b6f10: 7061 7474 6572 6e73 2074 6861 7420 6172 patterns that ar │ │ │ │ -001b6f20: 6520 6c65 7373 2073 7065 6369 6669 6320 e less specific │ │ │ │ -001b6f30: 696e 2074 6865 2074 6162 6c65 2e20 466f in the table. Fo │ │ │ │ -001b6f40: 7220 6578 616d 706c 652c 203c 636f 6465 r example, "text/xml;*char │ │ │ │ -001b6f60: 7365 743d 7574 662d 382a 223c 2f63 6f64 set=utf-8*" must precede │ │ │ │ -001b6f80: 3c63 6f64 653e 2274 6578 742f 786d 6c22 "text/xml" │ │ │ │ -001b6f90: 3c2f 636f 6465 3e20 7768 6963 6820 6d75 which mu │ │ │ │ -001b6fa0: 7374 2070 7265 6365 6465 203c 636f 6465 st precede "text/*" │ │ │ │ -001b6fc0: 2e20 4e6f 7465 2074 6861 7420 3c63 6f64 . Note that "text/xml" also matches │ │ │ │ -001b6ff0: 2061 6e79 2070 6172 616d 6574 6572 7320 any parameters │ │ │ │ -001b7000: 6f66 2074 6865 206d 6564 6961 2074 7970 of the media typ │ │ │ │ -001b7010: 6520 6f66 2074 6865 206d 6573 7361 6765 e of the message │ │ │ │ -001b7020: 2072 6576 6569 7665 642c 2073 7563 6820 reveived, such │ │ │ │ -001b7030: 6173 203c 636f 6465 3e22 7465 7874 2f78 as "text/x │ │ │ │ -001b7040: 6d6c 3b20 6368 6172 7365 743d 7574 662d ml; charset=utf- │ │ │ │ -001b7050: 3822 3c2f 636f 6465 3e20 286f 6e6c 7920 8" (only │ │ │ │ -001b7060: 7369 6e63 6520 6753 4f41 5020 7665 7273 since gSOAP vers │ │ │ │ -001b7070: 696f 6e20 322e 382e 3735 292e 3c2f 703e ion 2.8.75).

    │ │ │ │ -001b7080: 0a3c 703e 5468 6520 6861 6e64 6c65 7273 .

    The handlers │ │ │ │ -001b7090: 2061 7265 2066 756e 6374 696f 6e73 2074 are functions t │ │ │ │ -001b70a0: 6861 7420 7769 6c6c 2062 6520 696e 766f hat will be invo │ │ │ │ -001b70b0: 6b65 6420 7768 656e 2061 2050 4f53 5465 ked when a POSTe │ │ │ │ -001b70c0: 6420 7265 7175 6573 7420 6d65 7373 6167 d request messag │ │ │ │ -001b70d0: 6520 6d61 7463 6869 6e67 206d 6564 6961 e matching media │ │ │ │ -001b70e0: 2074 7970 6520 6973 2073 656e 7420 746f type is sent to │ │ │ │ -001b70f0: 2074 6865 2073 6572 7665 722e 3c2f 703e the server.

    │ │ │ │ -001b7100: 0a3c 703e 416e 2065 7861 6d70 6c65 2069 .

    An example i │ │ │ │ -001b7110: 6d61 6765 2068 616e 646c 6572 2074 6861 mage handler tha │ │ │ │ -001b7120: 7420 6368 6563 6b73 2074 6865 2073 7065 t checks the spe │ │ │ │ -001b7130: 6369 6669 6320 696d 6167 6520 7479 7065 cific image type │ │ │ │ -001b7140: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    int image_handler │ │ │ │ -001b71a0: 283c 7370 616e 2063 6c61 7373 3d22 6b65 (struct soap │ │ │ │ -001b71f0: 3c2f 613e 202a 3c61 2063 6c61 7373 3d22 *soa │ │ │ │ -001b7220: 703c 2f61 3e29 203c 2f64 6976 3e0a 3c64 p)
    . │ │ │ │ +001b6a10: 2671 756f 743b 696d 6167 652f 6a70 6726 "image/jpg& │ │ │ │ +001b6a20: 7175 6f74 3b3c 2f73 7061 6e3e 2c20 6a70 quot;, jp │ │ │ │ +001b6a30: 6567 5f68 616e 646c 6572 207d 2c20 3c2f eg_handler }, .
    { "ima │ │ │ │ +001b6a80: 6765 2f2a 2671 756f 743b 3c2f 7370 616e ge/*", image_handl │ │ │ │ +001b6aa0: 6572 207d 2c20 3c2f 6469 763e 0a3c 6469 er },
    . │ │ │ │ +001b6ac0: 207b 203c 7370 616e 2063 6c61 7373 3d22 { & │ │ │ │ +001b6ae0: 7175 6f74 3b74 6578 742f 6874 6d6c 2671 quot;text/html&q │ │ │ │ +001b6af0: 756f 743b 3c2f 7370 616e 3e2c 2068 746d uot;, htm │ │ │ │ +001b6b00: 6c5f 6861 6e64 6c65 7220 7d2c 203c 2f64 l_handler },
    .
    { "text │ │ │ │ +001b6b50: 2f2a 2671 756f 743b 3c2f 7370 616e 3e2c /*", │ │ │ │ +001b6b60: 2020 2020 7465 7874 5f68 616e 646c 6572 text_handler │ │ │ │ +001b6b70: 207d 2c20 3c2f 6469 763e 0a3c 6469 7620 },
    .
    { │ │ │ │ +001b6b90: 203c 7370 616e 2063 6c61 7373 3d22 7374 &qu │ │ │ │ +001b6bb0: 6f74 3b50 4f53 5426 7175 6f74 3b3c 2f73 ot;POST", gener │ │ │ │ +001b6bd0: 6963 5f50 4f53 545f 6861 6e64 6c65 7220 ic_POST_handler │ │ │ │ +001b6be0: 7d2c 203c 2f64 6976 3e0a 3c64 6976 2063 },
    .
    { │ │ │ │ +001b6c00: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ +001b6c20: 743b 5055 5426 7175 6f74 3b3c 2f73 7061 t;PUT", generi │ │ │ │ +001b6c40: 635f 5055 545f 6861 6e64 6c65 7220 7d2c c_PUT_handler }, │ │ │ │ +001b6c50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { " │ │ │ │ +001b6c90: 5041 5443 4826 7175 6f74 3b3c 2f73 7061 PATCH", generic_ │ │ │ │ +001b6cb0: 5041 5443 485f 6861 6e64 6c65 7220 7d2c PATCH_handler }, │ │ │ │ +001b6cc0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    { " │ │ │ │ +001b6d00: 4445 4c45 5445 2671 756f 743b 3c2f 7370 DELETE", generic_ │ │ │ │ +001b6d20: 4445 4c45 5445 5f68 616e 646c 6572 207d DELETE_handler } │ │ │ │ +001b6d30: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    { N │ │ │ │ +001b6d50: 554c 4c20 7d20 3c2f 6469 763e 0a3c 6469 ULL }
    .} │ │ │ │ +001b6d70: 3b3c 2f64 6976 3e0a 3c2f 6469 763e 3c21 ;
    .
    < │ │ │ │ +001b6d90: 703e 4e6f 7465 2074 6861 7420 3c63 6f64 p>Note that * and < │ │ │ │ +001b6db0: 636f 6465 3e2d 3c2f 636f 6465 3e20 6361 code>- ca │ │ │ │ +001b6dc0: 6e20 6265 2075 7365 6420 6173 2077 696c n be used as wil │ │ │ │ +001b6dd0: 6463 6172 6473 2074 6f20 6d61 7463 6820 dcards to match │ │ │ │ +001b6de0: 616e 7920 7465 7874 2061 6e64 2061 6e79 any text and any │ │ │ │ +001b6df0: 2063 6861 7261 6374 6572 2c20 7265 7370 character, resp │ │ │ │ +001b6e00: 6563 7469 7665 6c79 2e20 4d65 6469 6120 ectively. Media │ │ │ │ +001b6e10: 7479 7065 7320 6d61 7920 6861 7665 206f types may have o │ │ │ │ +001b6e20: 7074 696f 6e61 6c20 7061 7261 6d65 7465 ptional paramete │ │ │ │ +001b6e30: 7273 2061 6674 6572 203c 636f 6465 3e3b rs after ; │ │ │ │ +001b6e40: 3c2f 636f 6465 3e20 7375 6368 2061 7320 such as │ │ │ │ +001b6e50: 3c63 6f64 653e 6368 6172 7365 743c 2f63 charset and b │ │ │ │ +001b6e70: 6f75 6e64 6172 793c 2f63 6f64 653e 2e20 oundary. │ │ │ │ +001b6e80: 5468 6573 6520 7061 7261 6d65 7465 7273 These parameters │ │ │ │ +001b6e90: 2063 616e 2062 6520 6d61 7463 6865 6420 can be matched │ │ │ │ +001b6ea0: 6279 2074 6865 206d 6564 6961 2074 7970 by the media typ │ │ │ │ +001b6eb0: 6520 7061 7474 6572 6e73 2069 6e20 7468 e patterns in th │ │ │ │ +001b6ec0: 6520 7461 626c 652e 2050 6174 7465 726e e table. Pattern │ │ │ │ +001b6ed0: 7320 7468 6174 2061 7265 206d 6f72 6520 s that are more │ │ │ │ +001b6ee0: 7370 6563 6966 6963 206d 7573 7420 7072 specific must pr │ │ │ │ +001b6ef0: 6563 6564 6520 7061 7474 6572 6e73 2074 ecede patterns t │ │ │ │ +001b6f00: 6861 7420 6172 6520 6c65 7373 2073 7065 hat are less spe │ │ │ │ +001b6f10: 6369 6669 6320 696e 2074 6865 2074 6162 cific in the tab │ │ │ │ +001b6f20: 6c65 2e20 466f 7220 6578 616d 706c 652c le. For example, │ │ │ │ +001b6f30: 203c 636f 6465 3e22 7465 7874 2f78 6d6c "text/xml │ │ │ │ +001b6f40: 3b2a 6368 6172 7365 743d 7574 662d 382a ;*charset=utf-8* │ │ │ │ +001b6f50: 223c 2f63 6f64 653e 206d 7573 7420 7072 " must pr │ │ │ │ +001b6f60: 6563 6564 6520 3c63 6f64 653e 2274 6578 ecede "tex │ │ │ │ +001b6f70: 742f 786d 6c22 3c2f 636f 6465 3e20 7768 t/xml" wh │ │ │ │ +001b6f80: 6963 6820 6d75 7374 2070 7265 6365 6465 ich must precede │ │ │ │ +001b6f90: 203c 636f 6465 3e22 7465 7874 2f2a 223c "text/*"< │ │ │ │ +001b6fa0: 2f63 6f64 653e 2e20 4e6f 7465 2074 6861 /code>. Note tha │ │ │ │ +001b6fb0: 7420 3c63 6f64 653e 2274 6578 742f 786d t "text/xm │ │ │ │ +001b6fc0: 6c22 3c2f 636f 6465 3e20 616c 736f 206d l" also m │ │ │ │ +001b6fd0: 6174 6368 6573 2061 6e79 2070 6172 616d atches any param │ │ │ │ +001b6fe0: 6574 6572 7320 6f66 2074 6865 206d 6564 eters of the med │ │ │ │ +001b6ff0: 6961 2074 7970 6520 6f66 2074 6865 206d ia type of the m │ │ │ │ +001b7000: 6573 7361 6765 2072 6576 6569 7665 642c essage reveived, │ │ │ │ +001b7010: 2073 7563 6820 6173 203c 636f 6465 3e22 such as " │ │ │ │ +001b7020: 7465 7874 2f78 6d6c 3b20 6368 6172 7365 text/xml; charse │ │ │ │ +001b7030: 743d 7574 662d 3822 3c2f 636f 6465 3e20 t=utf-8" │ │ │ │ +001b7040: 286f 6e6c 7920 7369 6e63 6520 6753 4f41 (only since gSOA │ │ │ │ +001b7050: 5020 7665 7273 696f 6e20 322e 382e 3735 P version 2.8.75 │ │ │ │ +001b7060: 292e 3c2f 703e 0a3c 703e 5468 6520 6861 ).

    .

    The ha │ │ │ │ +001b7070: 6e64 6c65 7273 2061 7265 2066 756e 6374 ndlers are funct │ │ │ │ +001b7080: 696f 6e73 2074 6861 7420 7769 6c6c 2062 ions that will b │ │ │ │ +001b7090: 6520 696e 766f 6b65 6420 7768 656e 2061 e invoked when a │ │ │ │ +001b70a0: 2050 4f53 5465 6420 7265 7175 6573 7420 POSTed request │ │ │ │ +001b70b0: 6d65 7373 6167 6520 6d61 7463 6869 6e67 message matching │ │ │ │ +001b70c0: 206d 6564 6961 2074 7970 6520 6973 2073 media type is s │ │ │ │ +001b70d0: 656e 7420 746f 2074 6865 2073 6572 7665 ent to the serve │ │ │ │ +001b70e0: 722e 3c2f 703e 0a3c 703e 416e 2065 7861 r.

    .

    An exa │ │ │ │ +001b70f0: 6d70 6c65 2069 6d61 6765 2068 616e 646c mple image handl │ │ │ │ +001b7100: 6572 2074 6861 7420 6368 6563 6b73 2074 er that checks t │ │ │ │ +001b7110: 6865 2073 7065 6369 6669 6320 696d 6167 he specific imag │ │ │ │ +001b7120: 6520 7479 7065 3a3c 2f70 3e0a 3c64 6976 e type:

    .
    in │ │ │ │ +001b7170: 743c 2f73 7061 6e3e 2069 6d61 6765 5f68 t image_h │ │ │ │ +001b7180: 616e 646c 6572 283c 7370 616e 2063 6c61 andler(str │ │ │ │ +001b71a0: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap) .
    {
    . │ │ │ │ -001b7240: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    const < │ │ │ │ -001b7280: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b7290: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *buf;
    .
    │ │ │ │ -001b72e0: 7369 7a65 5f74 3c2f 7370 616e 3e20 6c65 size_t le │ │ │ │ -001b72f0: 6e3b 203c 2f64 6976 3e0a 3c64 6976 2063 n;
    .
    // if necess │ │ │ │ -001b7330: 6172 792c 2063 6865 636b 2074 7970 6520 ary, check type │ │ │ │ -001b7340: 696e 2073 6f61 702d 2667 743b 6874 7470 in soap->http │ │ │ │ -001b7350: 5f63 6f6e 7465 6e74 203c 2f73 7061 6e3e _content │ │ │ │ -001b7360: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if ( │ │ │ │ -001b73a0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap- │ │ │ │ -001b73d0: 2667 743b 3c61 2063 6c61 7373 3d22 636f >htt │ │ │ │ -001b7420: 705f 636f 6e74 656e 743c 2f61 3e20 2661 p_content &a │ │ │ │ -001b7430: 6d70 3b26 616d 703b 2021 3c61 2063 6c61 mp;& !soap │ │ │ │ -001b7490: 5f74 6167 5f63 6d70 3c2f 613e 283c 6120 _tag_cmp(soap-> │ │ │ │ -001b74d0: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;http_c │ │ │ │ -001b7520: 6f6e 7465 6e74 3c2f 613e 2c20 3c73 7061 ontent, "im │ │ │ │ -001b7550: 6167 652f 6769 6626 7175 6f74 3b3c 2f73 age/gif")
    . │ │ │ │ -001b7580: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ -001b75a0: 7572 6e3c 2f73 7061 6e3e 2034 3034 3b20 urn 404; │ │ │ │ -001b75b0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // HTTP er │ │ │ │ -001b75d0: 726f 7220 3430 3420 3c2f 7370 616e 3e3c ror 404 < │ │ │ │ -001b75e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    if ((b │ │ │ │ -001b7600: 7566 203d 203c 6120 636c 6173 733d 2263 uf = soap_http_g │ │ │ │ -001b7660: 6574 5f62 6f64 793c 2f61 3e28 3c61 2063 et_body(soap, &am │ │ │ │ -001b76a0: 703b 6c65 6e29 2920 3d3d 204e 554c 4c29 p;len)) == NULL) │ │ │ │ -001b76b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    return soap │ │ │ │ -001b7720: 3c2f 613e 2d26 6774 3b3c 6120 636c 6173 ->error; .
    // │ │ │ │ -001b77b0: 202e 2e2e 206e 6f77 2070 726f 6365 7373 ... now process │ │ │ │ -001b77c0: 2069 6d61 6765 2069 6e20 6275 6620 3c2f image in buf
    .
    │ │ │ │ -001b77f0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // reply w │ │ │ │ -001b7810: 6974 6820 656d 7074 7920 4854 5450 2032 ith empty HTTP 2 │ │ │ │ -001b7820: 3030 204f 4b20 7265 7370 6f6e 7365 3a20 00 OK response: │ │ │ │ -001b7830: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ -001b7850: 2020 3c73 7061 6e20 636c 6173 733d 226b retu │ │ │ │ -001b7870: 726e 3c2f 7370 616e 3e20 3c61 2063 6c61 rn soap_s │ │ │ │ -001b78d0: 656e 645f 656d 7074 795f 7265 7370 6f6e end_empty_respon │ │ │ │ -001b78e0: 7365 3c2f 613e 283c 6120 636c 6173 733d se(so │ │ │ │ -001b7910: 6170 3c2f 613e 2c20 3230 3029 3b20 3c2f ap, 200); const
    c │ │ │ │ +001b7280: 6861 723c 2f73 7061 6e3e 202a 6275 663b har *buf; │ │ │ │ +001b7290: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    size_t len;
    . │ │ │ │ +001b72e0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    // if │ │ │ │ +001b7310: 6e65 6365 7373 6172 792c 2063 6865 636b necessary, check │ │ │ │ +001b7320: 2074 7970 6520 696e 2073 6f61 702d 2667 type in soap-&g │ │ │ │ +001b7330: 743b 6874 7470 5f63 6f6e 7465 6e74 203c t;http_content < │ │ │ │ +001b7340: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ +001b7360: 203c 7370 616e 2063 6c61 7373 3d22 6b65 if
    (soa │ │ │ │ +001b73b0: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->http_content< │ │ │ │ +001b7410: 2f61 3e20 2661 6d70 3b26 616d 703b 2021 /a> && ! │ │ │ │ +001b7420: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_tag_cmp(soap-> │ │ │ │ +001b7500: 6874 7470 5f63 6f6e 7465 6e74 3c2f 613e http_content │ │ │ │ +001b7510: 2c20 3c73 7061 6e20 636c 6173 733d 2273 , &q │ │ │ │ +001b7530: 756f 743b 696d 6167 652f 6769 6626 7175 uot;image/gif&qu │ │ │ │ +001b7540: 6f74 3b3c 2f73 7061 6e3e 2920 3c2f 6469 ot;) .
    return │ │ │ │ +001b7590: 2034 3034 3b20 3c73 7061 6e20 636c 6173 404; // H │ │ │ │ +001b75b0: 5454 5020 6572 726f 7220 3430 3420 3c2f TTP error 404
    .
    │ │ │ │ +001b75e0: 6966 2028 2862 7566 203d 203c 6120 636c if ((buf = soap_ │ │ │ │ +001b7640: 6874 7470 5f67 6574 5f62 6f64 793c 2f61 http_get_body(soap, &len)) == │ │ │ │ +001b7690: 204e 554c 4c29 3c2f 6469 763e 0a3c 6469 NULL)
    . │ │ │ │ +001b76b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 ret │ │ │ │ +001b76d0: 7572 6e3c 2f73 7061 6e3e 203c 6120 636c urn soap->< │ │ │ │ +001b7710: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b7720: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b7730: 6874 6d6c 2361 6238 3566 3564 3432 3730 html#ab85f5d4270 │ │ │ │ +001b7740: 3239 3633 6431 3365 6135 3430 6264 3938 2963d13ea540bd98 │ │ │ │ +001b7750: 3736 6536 6432 223e 6572 726f 723c 2f61 76e6d2">error;
    .
    // ... now p │ │ │ │ +001b77a0: 726f 6365 7373 2069 6d61 6765 2069 6e20 rocess image in │ │ │ │ +001b77b0: 6275 6620 3c2f 7370 616e 3e3c 2f64 6976 buf
    .
    // r │ │ │ │ +001b77f0: 6570 6c79 2077 6974 6820 656d 7074 7920 eply with empty │ │ │ │ +001b7800: 4854 5450 2032 3030 204f 4b20 7265 7370 HTTP 200 OK resp │ │ │ │ +001b7810: 6f6e 7365 3a20 3c2f 7370 616e 3e3c 2f64 onse: .
    return │ │ │ │ +001b7860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 │ │ │ │ +001b78b0: 736f 6170 5f73 656e 645f 656d 7074 795f soap_send_empty_ │ │ │ │ +001b78c0: 7265 7370 6f6e 7365 3c2f 613e 283c 6120 response(soap, 20 │ │ │ │ +001b7900: 3029 3b20 3c2f 6469 763e 0a3c 6469 7620 0);
    .
    }.
    }
    .< │ │ │ │ -001b7940: 6469 7620 636c 6173 733d 2274 7463 2220 div class="ttc" │ │ │ │ -001b7950: 6964 3d22 6167 726f 7570 5f5f 6772 6f75 id="agroup__grou │ │ │ │ -001b7960: 705f 5f6d 6973 635f 6874 6d6c 5f67 6165 p__misc_html_gae │ │ │ │ -001b7970: 3262 6661 6434 3939 3739 6661 6133 6136 2bfad49979faa3a6 │ │ │ │ -001b7980: 3235 6163 6134 3461 6361 6130 3137 6322 25aca44acaa017c" │ │ │ │ -001b7990: 3e3c 6469 7620 636c 6173 733d 2274 746e > │ │ │ │ -001b7a00: 3c64 6976 2063 6c61 7373 3d22 7474 6465
    int soap_tag │ │ │ │ -001b7a20: 5f63 6d70 2863 6f6e 7374 2063 6861 7220 _cmp(const char │ │ │ │ -001b7a30: 2a73 7472 696e 672c 2063 6f6e 7374 2063 *string, const c │ │ │ │ -001b7a40: 6861 7220 2a70 6174 7465 726e 293c 2f64 har *pattern)
    Compare st │ │ │ │ -001b7a70: 7269 6e67 2074 6f20 6120 7061 7474 6572 ring to a patter │ │ │ │ -001b7a80: 6e2e 3c2f 6469 763e 3c2f 6469 763e 0a3c n.
    .< │ │ │ │ -001b7a90: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    The abo │ │ │ │ -001b7ab0: 7665 2065 7861 6d70 6c65 2072 6574 7572 ve example retur │ │ │ │ -001b7ac0: 6e73 2048 5454 5020 4f4b 2e20 4966 2063 ns HTTP OK. If c │ │ │ │ -001b7ad0: 6f6e 7465 6e74 2069 7320 7375 7070 6f73 ontent is suppos │ │ │ │ -001b7ae0: 6564 2074 6f20 6265 2072 6574 7572 6e65 ed to be returne │ │ │ │ -001b7af0: 642c 2074 6865 6e20 7573 653a 3c2f 703e d, then use:

    │ │ │ │ -001b7b00: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    s │ │ │ │ -001b7b40: 7472 7563 7420 3c2f 7370 616e 3e3c 6120 truct soap *soap = │ │ │ │ -001b7bb0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_new();
    .
    ... │ │ │ │ -001b7c30: 203c 7370 616e 2063 6c61 7373 3d22 636f // │ │ │ │ -001b7c50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ -001b7c90: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->http_conte │ │ │ │ -001b7cf0: 6e74 3c2f 613e 203d 203c 7370 616e 2063 nt = "image │ │ │ │ -001b7d20: 2f6a 7065 6726 7175 6f74 3b3c 2f73 7061 /jpeg"; // a j │ │ │ │ -001b7d50: 7065 6720 696d 6167 6520 746f 2072 6574 peg image to ret │ │ │ │ -001b7d60: 7572 6e20 6261 636b 203c 2f73 7061 6e3e urn back │ │ │ │ -001b7d70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so │ │ │ │ -001b7e00: 6170 5f72 6573 706f 6e73 653c 2f61 3e28 ap_response( │ │ │ │ -001b7e10: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ -001b7e40: 203c 6120 636c 6173 733d 2263 6f64 6522 SOAP_FILE)) │ │ │ │ -001b7ea0: 203c 7370 616e 2063 6c61 7373 3d22 636f // SOAP_F │ │ │ │ -001b7ec0: 494c 4520 7365 7473 2063 7573 746f 6d20 ILE sets custom │ │ │ │ -001b7ed0: 6874 7470 2063 6f6e 7465 6e74 203c 2f73 http content
    .
    || │ │ │ │ -001b7f00: 203c 6120 636c 6173 733d 2263 6f64 6522 soap_send_raw(soap, buf │ │ │ │ -001b7fe0: 3c2f 613e 2c20 6c65 6e29 203c 7370 616e , len) // send image < │ │ │ │ -001b8010: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    . │ │ │ │ -001b8030: 7c7c 203c 6120 636c 6173 733d 2263 6f64 || soap_end_send │ │ │ │ -001b8090: 3c2f 613e 283c 6120 636c 6173 733d 2263 (soap │ │ │ │ -001b80c0: 3c2f 613e 293c 2f64 6976 3e0a 3c64 6976 )
    .
    │ │ │ │ -001b80e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 return │ │ │ │ -001b8100: 3c2f 7370 616e 3e20 3c61 2063 6c61 7373 soap_clo │ │ │ │ -001b8160: 7365 736f 636b 3c2f 613e 283c 6120 636c sesock(soap);.
    r │ │ │ │ -001b81d0: 6574 7572 6e3c 2f73 7061 6e3e 203c 6120 eturn SOAP_OK;.

    Fo │ │ │ │ -001b8260: 7220 636c 6965 6e74 2061 7070 6c69 6361 r client applica │ │ │ │ -001b8270: 7469 6f6e 7320 746f 2075 7365 2048 5454 tions to use HTT │ │ │ │ -001b8280: 5020 504f 5354 2c20 7573 6520 7468 6520 P POST, use the │ │ │ │ -001b8290: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 soap_PO │ │ │ │ -001b8310: 5354 3c2f 613e 3c2f 636f 6465 3e20 6f70 ST op │ │ │ │ -001b8320: 6572 6174 696f 6e3a 3c2f 703e 0a3c 6469 eration:

    .
    struc │ │ │ │ -001b8370: 7420 3c2f 7370 616e 3e3c 6120 636c 6173 t │ │ │ │ -001b83a0: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap = soap_new(); │ │ │ │ -001b8440: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... //.
    c │ │ │ │ -001b84b0: 6861 723c 2f73 7061 6e3e 202a 3c61 2063 har *buf; // holds the │ │ │ │ -001b8530: 2048 5454 5020 7265 7175 6573 742f 7265 HTTP request/re │ │ │ │ -001b8540: 7370 6f6e 7365 2062 6f64 7920 6461 7461 sponse body data │ │ │ │ -001b8550: 203c 2f73 7061 6e3e 3c2f 6469 763e 0a3c
    .< │ │ │ │ -001b8560: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001b8570: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >size_ │ │ │ │ -001b8590: 743c 2f73 7061 6e3e 206c 656e 3b20 3c73 t len; // length of │ │ │ │ -001b85c0: 2064 6174 6120 3c2f 7370 616e 3e3c 2f64 data .
    ... │ │ │ │ -001b8600: 2f2f 2070 6f70 756c 6174 6520 6275 6620 // populate buf │ │ │ │ -001b8610: 616e 6420 6c65 6e20 7769 7468 206d 6573 and len with mes │ │ │ │ -001b8620: 7361 6765 2074 6f20 7365 6e64 3c2f 7370 sage to send
    .
    if │ │ │ │ -001b8670: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap_POST(< │ │ │ │ -001b86d0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001b86e0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001b86f0: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001b8700: 3c73 7061 6e20 636c 6173 733d 2273 7472 &quo │ │ │ │ -001b8720: 743b 5552 4c26 7175 6f74 3b3c 2f73 7061 t;URL", │ │ │ │ -001b8750: 2671 756f 743b 534f 4150 2061 6374 696f "SOAP actio │ │ │ │ -001b8760: 6e20 6f72 204e 554c 4c26 7175 6f74 3b3c n or NULL"< │ │ │ │ -001b8770: 2f73 7061 6e3e 2c20 3c73 7061 6e20 636c /span>, "media │ │ │ │ -001b87a0: 7479 7065 2671 756f 743b 3c2f 7370 616e type")
    ..
    || soap_end │ │ │ │ -001b8930: 5f73 656e 643c 2f61 3e28 3c61 2063 6c61 _send(soap)) .
    ... │ │ │ │ -001b89a0: 2f2f 2065 7272 6f72 3c2f 7370 616e 3e3c // error< │ │ │ │ -001b89b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.. │ │ │ │ -001b8aa0: 207c 7c20 283c 6120 636c 6173 733d 2263 || (bu │ │ │ │ -001b8af0: 663c 2f61 3e20 3d20 3c61 2063 6c61 7373 f = soap_htt │ │ │ │ -001b8b50: 705f 6765 745f 626f 6479 3c2f 613e 283c p_get_body(< │ │ │ │ -001b8b60: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001b8b70: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001b8b80: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001b8b90: 2661 6d70 3b6c 656e 2929 203d 3d20 4e55 &len)) == NU │ │ │ │ -001b8ba0: 4c4c 3c2f 6469 763e 0a3c 6469 7620 636c LL
    .
    || < │ │ │ │ -001b8bc0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001b8bd0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ -001b8be0: 705f 5f69 6f2e 6874 6d6c 2367 6138 3662 p__io.html#ga86b │ │ │ │ -001b8bf0: 3063 3034 6538 6261 6139 3131 6663 3537 0c04e8baa911fc57 │ │ │ │ -001b8c00: 6537 6631 3232 3066 3965 6238 6622 3e73 e7f1220f9eb8f">s │ │ │ │ -001b8c10: 6f61 705f 656e 645f 7265 6376 3c2f 613e oap_end_recv │ │ │ │ -001b8c20: 2826 616d 703b 3c61 2063 6c61 7373 3d22 (&soa │ │ │ │ -001b8c50: 703c 2f61 3e29 2920 3c2f 6469 763e 0a3c p))
    .< │ │ │ │ -001b8c60: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001b8c70: 3e20 202e 2e2e 203c 7370 616e 2063 6c61 > ... // │ │ │ │ -001b8c90: 6572 726f 723c 2f73 7061 6e3e 3c2f 6469 error.
    // .. │ │ │ │ -001b8cd0: 2e20 7573 6520 6275 665b 302e 2e6c 656e . use buf[0..len │ │ │ │ -001b8ce0: 2d31 5d20 3c2f 7370 616e 3e3c 2f64 6976 -1]
    ... │ │ │ │ -001b8e60: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_free(soap);
    .
    i │ │ │ │ -001b8fd0: 6e74 2073 6f61 705f 6265 6769 6e5f 7265 nt soap_begin_re │ │ │ │ -001b8fe0: 6376 2873 7472 7563 7420 736f 6170 202a cv(struct soap * │ │ │ │ -001b8ff0: 736f 6170 293c 2f64 6976 3e3c 6469 7620 soap)
    In │ │ │ │ -001b9010: 6974 6961 6c69 7a65 2074 6865 2063 6f6e itialize the con │ │ │ │ -001b9020: 7465 7874 2066 6f72 2072 6563 6569 7669 text for receivi │ │ │ │ -001b9030: 6e67 2e3c 2f64 6976 3e3c 2f64 6976 3e0a ng.
    . │ │ │ │ -001b9040: 3c64 6976 2063 6c61 7373 3d22 7474 6322
    │ │ │ │ -001b9090: 3c64 6976 2063 6c61 7373 3d22 7474 6e61
    in │ │ │ │ -001b9110: 7420 736f 6170 5f50 4f53 5428 7374 7275 t soap_POST(stru │ │ │ │ -001b9120: 6374 2073 6f61 7020 2a73 6f61 702c 2063 ct soap *soap, c │ │ │ │ -001b9130: 6f6e 7374 2063 6861 7220 2a65 6e64 706f onst char *endpo │ │ │ │ -001b9140: 696e 742c 2063 6f6e 7374 2063 6861 7220 int, const char │ │ │ │ -001b9150: 2a61 6374 696f 6e2c 2063 6f6e 7374 2063 *action, const c │ │ │ │ -001b9160: 6861 7220 2a74 7970 6529 3c2f 6469 763e har *type)
    │ │ │ │ -001b9170: 3c64 6976 2063 6c61 7373 3d22 7474 646f
    HTTP POST con │ │ │ │ -001b9190: 7465 6e74 2074 6f20 7365 7276 6572 2e3c tent to server.< │ │ │ │ -001b91a0: 2f64 6976 3e3c 2f64 6976 3e0a 3c2f 6469 /div>
    .

    Similarly, │ │ │ │ -001b91d0: 203c 636f 6465 3e3c 6120 636c 6173 733d soap_PU │ │ │ │ -001b9250: 543c 2f61 3e3c 2f63 6f64 653e 2c20 3c63 T, soap_PAT │ │ │ │ -001b92e0: 4348 3c2f 613e 3c2f 636f 6465 3e2c 2061 CH, a │ │ │ │ -001b92f0: 6e64 203c 636f 6465 3e3c 6120 636c 6173 nd │ │ │ │ -001b9370: 736f 6170 5f44 454c 4554 453c 2f61 3e3c soap_DELETE< │ │ │ │ -001b9380: 2f63 6f64 653e 2063 6f6d 6d61 6e64 7320 /code> commands │ │ │ │ -001b9390: 6172 6520 7072 6f76 6964 6564 2066 6f72 are provided for │ │ │ │ -001b93a0: 2050 5554 2c20 5041 5443 482c 2061 6e64 PUT, PATCH, and │ │ │ │ -001b93b0: 2044 454c 4554 4520 6861 6e64 6c69 6e67 DELETE handling │ │ │ │ -001b93c0: 2e3c 2f70 3e0a 3c70 3e54 6f20 7375 7070 .

    .

    To supp │ │ │ │ -001b93d0: 6f72 7420 4854 5450 2070 6970 656c 696e ort HTTP pipelin │ │ │ │ -001b93e0: 696e 6720 7765 2075 7365 2074 6865 203c ing we use the < │ │ │ │ -001b93f0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>htt │ │ │ │ -001b9480: 705f 7069 7065 3c2f 613e 3c2f 636f 6465 p_pipe plugin, which │ │ │ │ -001b94a0: 6361 6e20 6265 2075 7365 6420 6174 2074 can be used at t │ │ │ │ -001b94b0: 6865 2073 6572 7665 7220 7369 6465 2074 he server side t │ │ │ │ -001b94c0: 6f20 656e 6162 6c65 2048 5454 5020 7069 o enable HTTP pi │ │ │ │ -001b94d0: 7065 6c69 6e69 6e67 2061 7574 6f6d 6174 pelining automat │ │ │ │ -001b94e0: 6963 616c 6c79 2c20 7768 656e 2072 6567 ically, when reg │ │ │ │ -001b94f0: 6973 7465 7265 642e 2054 6865 2070 6c75 istered. The plu │ │ │ │ -001b9500: 6769 6e20 6361 6e20 616c 736f 2062 6520 gin can also be │ │ │ │ -001b9510: 7573 6564 2061 7420 7468 6520 636c 6965 used at the clie │ │ │ │ -001b9520: 6e74 2073 6964 652c 2074 686f 7567 6820 nt side, though │ │ │ │ -001b9530: 7468 6973 2069 7320 6f6e 6c79 206e 6563 this is only nec │ │ │ │ -001b9540: 6573 7361 7279 2069 6e20 7363 656e 6172 essary in scenar │ │ │ │ -001b9550: 696f 7320 7468 6174 2072 6571 7569 7265 ios that require │ │ │ │ -001b9560: 2074 6865 2063 6c69 656e 7420 746f 2072 the client to r │ │ │ │ -001b9570: 6563 6569 7665 206d 756c 7469 706c 6520 eceive multiple │ │ │ │ -001b9580: 6d65 7373 6167 6573 2077 6974 686f 7574 messages without │ │ │ │ -001b9590: 2069 6e74 6572 6d69 7474 656e 6420 7365 intermittend se │ │ │ │ -001b95a0: 6e64 732c 2069 2e65 2e20 6d75 6c74 6970 nds, i.e. multip │ │ │ │ -001b95b0: 6c65 2073 656e 6473 2066 6f6c 6c6f 7765 le sends followe │ │ │ │ -001b95c0: 6420 6279 206d 756c 7469 706c 6520 7265 d by multiple re │ │ │ │ -001b95d0: 6365 6976 6573 2062 7920 7468 6520 7361 ceives by the sa │ │ │ │ -001b95e0: 6d65 2074 6872 6561 6420 7573 696e 6720 me thread using │ │ │ │ -001b95f0: 7468 6520 7361 6d65 203c 636f 6465 3e3c the same < │ │ │ │ -001b9600: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ -001b9610: 663d 2273 7472 7563 7473 6f61 702e 6874 f="structsoap.ht │ │ │ │ -001b9620: 6d6c 2220 7469 746c 653d 2243 6f6e 7465 ml" title="Conte │ │ │ │ -001b9630: 7874 2077 6974 6820 7468 6520 656e 6769 xt with the engi │ │ │ │ -001b9640: 6e65 2073 7461 7465 2e22 3e73 6f61 703c ne state.">soap< │ │ │ │ -001b9650: 2f61 3e3c 2f63 6f64 653e 2063 6f6e 7465 /a> conte │ │ │ │ -001b9660: 7874 2e20 486f 7765 7665 722c 2063 6c69 xt. However, cli │ │ │ │ -001b9670: 656e 7473 2073 686f 756c 6420 7573 6520 ents should use │ │ │ │ -001b9680: 6d75 6c74 6970 6c65 2074 6872 6561 6473 multiple threads │ │ │ │ -001b9690: 2077 6865 6e20 4854 5450 2070 6970 656c when HTTP pipel │ │ │ │ -001b96a0: 696e 696e 6720 6973 2075 7365 6420 746f ining is used to │ │ │ │ -001b96b0: 2070 7265 7665 6e74 2062 6c6f 636b 696e prevent blockin │ │ │ │ -001b96c0: 672e 2053 6565 2074 6865 203c 656d 3e3c g. See the < │ │ │ │ -001b96d0: 636f 6465 3e67 736f 6170 2f73 616d 706c code>gsoap/sampl │ │ │ │ -001b96e0: 6573 2f61 7379 6e63 3c2f 636f 6465 3e3c es/async< │ │ │ │ -001b96f0: 2f65 6d3e 2066 6f6c 6465 7220 696e 2074 /em> folder in t │ │ │ │ -001b9700: 6865 2067 534f 4150 2070 6163 6b61 6765 he gSOAP package │ │ │ │ -001b9710: 2066 6f72 2065 7870 6c61 6e61 7469 6f6e for explanation │ │ │ │ -001b9720: 2061 6e64 2065 7861 6d70 6c65 732e 3c2f and examples..

    See also < │ │ │ │ -001b9740: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>http_post │ │ │ │ -001b97d0: 3c2f 613e 3c2f 636f 6465 3e20 616e 6420 and │ │ │ │ -001b97e0: 3c63 6f64 653e 3c61 2063 6c61 7373 3d22 ht │ │ │ │ -001b9870: 7470 5f70 6970 653c 2f61 3e3c 2f63 6f64 tp_pipe.

    .

    .... │ │ │ │ -001b9890: 3c61 2068 7265 663d 2223 223e 4261 636b Back │ │ │ │ -001b98a0: 2074 6f20 7461 626c 6520 6f66 2063 6f6e to table of con │ │ │ │ -001b98b0: 7465 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 tents

    ..The H │ │ │ │ -001b98f0: 5454 5020 6469 6765 7374 2061 7574 6865 TTP digest authe │ │ │ │ -001b9900: 6e74 6963 6174 696f 6e20 706c 7567 696e ntication plugin │ │ │ │ -001b9910: 3c2f 6833 3e0a 3c70 3e54 6865 2048 5454 .

    The HTT │ │ │ │ -001b9920: 5020 6469 6765 7374 2061 7574 6865 6e74 P digest authent │ │ │ │ -001b9930: 6963 6174 696f 6e20 706c 7567 696e 2065 ication plugin e │ │ │ │ -001b9940: 6e61 626c 6573 2061 206d 6f72 6520 7365 nables a more se │ │ │ │ -001b9950: 6375 7265 2061 7574 6865 6e74 6963 6174 cure authenticat │ │ │ │ -001b9960: 696f 6e20 7363 6865 6d65 2063 6f6d 7061 ion scheme compa │ │ │ │ -001b9970: 7265 6420 746f 2062 6173 6963 2061 7574 red to basic aut │ │ │ │ -001b9980: 6865 6e74 6963 6174 696f 6e2e 2048 5454 hentication. HTT │ │ │ │ -001b9990: 5020 6261 7369 6320 6175 7468 656e 7469 P basic authenti │ │ │ │ -001b99a0: 6361 7469 6f6e 2073 656e 6473 2075 6e65 cation sends une │ │ │ │ -001b99b0: 6e63 7279 7074 6564 2075 7365 7269 6473 ncrypted userids │ │ │ │ -001b99c0: 2061 6e64 2070 6173 7377 6f72 6473 206f and passwords o │ │ │ │ -001b99d0: 7665 7220 7468 6520 6e65 742c 2077 6869 ver the net, whi │ │ │ │ -001b99e0: 6c65 2064 6967 6573 7420 6175 7468 656e le digest authen │ │ │ │ -001b99f0: 7469 6361 7469 6f6e 2064 6f65 7320 6e6f tication does no │ │ │ │ -001b9a00: 7420 6578 6368 616e 6765 2070 6173 7377 t exchange passw │ │ │ │ -001b9a10: 6f72 6473 2062 7574 2065 7863 6861 6e67 ords but exchang │ │ │ │ -001b9a20: 6573 2063 6865 636b 7375 6d73 206f 6620 es checksums of │ │ │ │ -001b9a30: 7061 7373 776f 7264 7320 2861 6e64 206f passwords (and o │ │ │ │ -001b9a40: 7468 6572 2064 6174 6120 7375 6368 2061 ther data such a │ │ │ │ -001b9a50: 7320 6e6f 6e63 6573 2074 6f20 6176 6f69 s nonces to avoi │ │ │ │ -001b9a60: 6420 7265 706c 6179 2061 7474 6163 6b73 d replay attacks │ │ │ │ -001b9a70: 292e 2046 6f72 206d 6f72 6520 6465 7461 ). For more deta │ │ │ │ -001b9a80: 696c 732c 2070 6c65 6173 6520 7365 6520 ils, please see │ │ │ │ -001b9a90: 5246 4320 3236 3137 2e3c 2f70 3e0a 3c70 RFC 2617.

    .

    The HTTP digest │ │ │ │ -001b9ab0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication │ │ │ │ -001b9ac0: 6361 6e20 6265 2075 7365 6420 6e65 7874 can be used next │ │ │ │ -001b9ad0: 2074 6f20 7468 6520 6275 696c 742d 696e to the built-in │ │ │ │ -001b9ae0: 2062 6173 6963 2061 7574 6865 6e74 6963 basic authentic │ │ │ │ -001b9af0: 6174 696f 6e2c 206f 7220 6261 7369 6320 ation, or basic │ │ │ │ -001b9b00: 6175 7468 656e 7469 6361 7469 6f6e 2063 authentication c │ │ │ │ -001b9b10: 616e 2062 6520 7265 6a65 6374 6564 2074 an be rejected t │ │ │ │ -001b9b20: 6f20 7469 6768 7465 6e20 7365 6375 7269 o tighten securi │ │ │ │ -001b9b30: 7479 2e20 5468 6520 7365 7276 6572 206d ty. The server m │ │ │ │ -001b9b40: 7573 7420 6861 7665 2061 2064 6174 6162 ust have a datab │ │ │ │ -001b9b50: 6173 6520 7769 7468 2075 7365 7269 6427 ase with userid' │ │ │ │ -001b9b60: 7320 616e 6420 7061 7373 776f 7264 7320 s and passwords │ │ │ │ -001b9b70: 2869 6e20 706c 6169 6e20 7465 7874 2066 (in plain text f │ │ │ │ -001b9b80: 6f72 6d29 2e20 5468 6520 636c 6965 6e74 orm). The client │ │ │ │ -001b9b90: 2c20 7768 656e 2063 6861 6c6c 656e 6765 , when challenge │ │ │ │ -001b9ba0: 6420 6279 2074 6865 2073 6572 7665 722c d by the server, │ │ │ │ -001b9bb0: 2063 6865 636b 7320 7468 6520 6175 7468 checks the auth │ │ │ │ -001b9bc0: 656e 7469 6361 7469 6f6e 2072 6561 6c6d entication realm │ │ │ │ -001b9bd0: 2070 726f 7669 6465 6420 6279 2074 6865 provided by the │ │ │ │ -001b9be0: 2073 6572 7665 7220 616e 6420 7365 7473 server and sets │ │ │ │ -001b9bf0: 2074 6865 2075 7365 7269 6420 616e 6420 the userid and │ │ │ │ -001b9c00: 7061 7373 776f 7264 7320 666f 7220 6469 passwords for di │ │ │ │ -001b9c10: 6765 7374 2061 7574 6865 6e74 6963 6174 gest authenticat │ │ │ │ -001b9c20: 696f 6e2e 2054 6865 2063 6c69 656e 7420 ion. The client │ │ │ │ -001b9c30: 6170 706c 6963 6174 696f 6e20 6361 6e20 application can │ │ │ │ -001b9c40: 7465 6d70 6f72 6172 696c 7920 7374 6f72 temporarily stor │ │ │ │ -001b9c50: 6520 7468 6520 7573 6572 6964 2061 6e64 e the userid and │ │ │ │ -001b9c60: 2070 6173 7377 6f72 6420 666f 7220 6120 password for a │ │ │ │ -001b9c70: 7365 7175 656e 6365 206f 6620 6d65 7373 sequence of mess │ │ │ │ -001b9c80: 6167 6520 6578 6368 616e 6765 7320 7769 age exchanges wi │ │ │ │ -001b9c90: 7468 2074 6865 2073 6572 7665 722c 2077 th the server, w │ │ │ │ -001b9ca0: 6869 6368 2069 7320 6661 7374 6572 2074 hich is faster t │ │ │ │ -001b9cb0: 6861 6e20 7265 7065 6174 6564 2061 7574 han repeated aut │ │ │ │ -001b9cc0: 686f 7269 7a61 7469 6f6e 2063 6861 6c6c horization chall │ │ │ │ -001b9cd0: 656e 6765 7320 616e 6420 6175 7468 656e enges and authen │ │ │ │ -001b9ce0: 7469 6361 7469 6f6e 2072 6573 706f 6e73 tication respons │ │ │ │ -001b9cf0: 6573 2e3c 2f70 3e0a 3c70 3e41 7420 7468 es.

    .

    At th │ │ │ │ -001b9d00: 6520 636c 6965 6e74 2073 6964 652c 2074 e client side, t │ │ │ │ -001b9d10: 6865 2070 6c75 6769 6e20 6973 2072 6567 he plugin is reg │ │ │ │ -001b9d20: 6973 7465 7265 6420 616e 6420 7365 7276 istered and serv │ │ │ │ -001b9d30: 6963 6520 696e 766f 6361 7469 6f6e 7320 ice invocations │ │ │ │ -001b9d40: 6172 6520 6368 6563 6b65 6420 666f 7220 are checked for │ │ │ │ -001b9d50: 6175 7468 6f72 697a 6174 696f 6e20 6368 authorization ch │ │ │ │ -001b9d60: 616c 6c65 6e67 6573 2028 4854 5450 2065 allenges (HTTP e │ │ │ │ -001b9d70: 7272 6f72 2063 6f64 6520 3430 3129 2e20 rror code 401). │ │ │ │ -001b9d80: 5768 656e 2074 6865 2073 6572 7665 7220 When the server │ │ │ │ -001b9d90: 6368 616c 6c65 6e67 6573 2074 6865 2063 challenges the c │ │ │ │ -001b9da0: 6c69 656e 742c 2074 6865 2063 6c69 656e lient, the clien │ │ │ │ -001b9db0: 7420 7368 6f75 6c64 2073 6574 2074 6865 t should set the │ │ │ │ -001b9dc0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass │ │ │ │ -001b9dd0: 776f 7264 2061 6e64 2072 6574 7279 2074 word and retry t │ │ │ │ -001b9de0: 6865 2069 6e76 6f63 6174 696f 6e2e 2054 he invocation. T │ │ │ │ -001b9df0: 6865 2063 6c69 656e 7420 6361 6e20 6465 he client can de │ │ │ │ -001b9e00: 7465 726d 696e 6520 7468 6520 7573 6572 termine the user │ │ │ │ -001b9e10: 6964 2061 6e64 2070 6173 7377 6f72 6420 id and password │ │ │ │ -001b9e20: 6261 7365 6420 6f6e 2074 6865 2061 7574 based on the aut │ │ │ │ -001b9e30: 6865 6e74 6963 6174 696f 6e20 7265 616c hentication real │ │ │ │ -001b9e40: 6d20 7061 7274 206f 6620 7468 6520 7365 m part of the se │ │ │ │ -001b9e50: 7276 6572 2773 2063 6861 6c6c 656e 6765 rver's challenge │ │ │ │ -001b9e60: 2e20 5468 6520 6175 7468 656e 7469 6361 . The authentica │ │ │ │ -001b9e70: 7469 6f6e 2069 6e66 6f72 6d61 7469 6f6e tion information │ │ │ │ -001b9e80: 2063 616e 2062 6520 7465 6d70 6f72 6172 can be temporar │ │ │ │ -001b9e90: 696c 7920 7361 7665 6420 666f 7220 6d75 ily saved for mu │ │ │ │ -001b9ea0: 6c74 6970 6c65 2069 6e76 6f63 6174 696f ltiple invocatio │ │ │ │ -001b9eb0: 6e73 2e3c 2f70 3e0a 3c70 3e43 6c69 656e ns.

    .

    Clien │ │ │ │ -001b9ec0: 742d 7369 6465 2065 7861 6d70 6c65 3a3c t-side example:< │ │ │ │ -001b9ed0: 2f70 3e0a 3c64 6976 2063 6c61 7373 3d22 /p>.

    #include │ │ │ │ -001b9f20: 2671 756f 743b 6874 7470 6461 2e68 2671 "httpda.h&q │ │ │ │ -001b9f30: 756f 743b 3c2f 7370 616e 3e20 3c2f 6469 uot;
    │ │ │ │ +001b79d0: 736f 6170 5f74 6167 5f63 6d70 3c2f 613e soap_tag_cmp │ │ │ │ +001b79e0: 3c2f 6469 763e 3c64 6976 2063 6c61 7373
    int so │ │ │ │ +001b7a00: 6170 5f74 6167 5f63 6d70 2863 6f6e 7374 ap_tag_cmp(const │ │ │ │ +001b7a10: 2063 6861 7220 2a73 7472 696e 672c 2063 char *string, c │ │ │ │ +001b7a20: 6f6e 7374 2063 6861 7220 2a70 6174 7465 onst char *patte │ │ │ │ +001b7a30: 726e 293c 2f64 6976 3e3c 6469 7620 636c rn)
    Comp │ │ │ │ +001b7a50: 6172 6520 7374 7269 6e67 2074 6f20 6120 are string to a │ │ │ │ +001b7a60: 7061 7474 6572 6e2e 3c2f 6469 763e 3c2f pattern.
    .

    T │ │ │ │ +001b7a90: 6865 2061 626f 7665 2065 7861 6d70 6c65 he above example │ │ │ │ +001b7aa0: 2072 6574 7572 6e73 2048 5454 5020 4f4b returns HTTP OK │ │ │ │ +001b7ab0: 2e20 4966 2063 6f6e 7465 6e74 2069 7320 . If content is │ │ │ │ +001b7ac0: 7375 7070 6f73 6564 2074 6f20 6265 2072 supposed to be r │ │ │ │ +001b7ad0: 6574 7572 6e65 642c 2074 6865 6e20 7573 eturned, then us │ │ │ │ +001b7ae0: 653a 3c2f 703e 0a3c 6469 7620 636c 6173 e:

    .
    < │ │ │ │ +001b7b10: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001b7b20: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soap< │ │ │ │ +001b7b90: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_ │ │ │ │ +001b7bf0: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    │ │ │ │ +001b7c00: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... //< │ │ │ │ +001b7c30: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001b7c50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001b7c60: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001b7c70: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ +001b7c80: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;http │ │ │ │ +001b7cd0: 5f63 6f6e 7465 6e74 3c2f 613e 203d 203c _content = < │ │ │ │ +001b7ce0: 7370 616e 2063 6c61 7373 3d22 7374 7269 span class="stri │ │ │ │ +001b7cf0: 6e67 6c69 7465 7261 6c22 3e26 7175 6f74 ngliteral">" │ │ │ │ +001b7d00: 3b69 6d61 6765 2f6a 7065 6726 7175 6f74 ;image/jpeg" │ │ │ │ +001b7d10: 3b3c 2f73 7061 6e3e 3b20 3c73 7061 6e20 ;; │ │ │ │ +001b7d30: 2f2f 2061 206a 7065 6720 696d 6167 6520 // a jpeg image │ │ │ │ +001b7d40: 746f 2072 6574 7572 6e20 6261 636b 203c to return back < │ │ │ │ +001b7d50: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001b7d70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001b7d80: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (soap_respons │ │ │ │ +001b7df0: 653c 2f61 3e28 3c61 2063 6c61 7373 3d22 e(soa │ │ │ │ +001b7e20: 703c 2f61 3e2c 203c 6120 636c 6173 733d p, SOAP_FILE │ │ │ │ +001b7e80: 3c2f 613e 2929 203c 7370 616e 2063 6c61 )) // │ │ │ │ +001b7ea0: 534f 4150 5f46 494c 4520 7365 7473 2063 SOAP_FILE sets c │ │ │ │ +001b7eb0: 7573 746f 6d20 6874 7470 2063 6f6e 7465 ustom http conte │ │ │ │ +001b7ec0: 6e74 203c 2f73 7061 6e3e 3c2f 6469 763e nt
    │ │ │ │ +001b7ed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    || soap_send │ │ │ │ +001b7f40: 5f72 6177 3c2f 613e 283c 6120 636c 6173 _raw( │ │ │ │ +001b7f70: 736f 6170 3c2f 613e 2c20 3c61 2063 6c61 soap, buf, len) │ │ │ │ +001b7fd0: 203c 7370 616e 2063 6c61 7373 3d22 636f // send i │ │ │ │ +001b7ff0: 6d61 6765 203c 2f73 7061 6e3e 3c2f 6469 mage ..
    │ │ │ │ +001b80e0: 7265 7475 726e 3c2f 7370 616e 3e20 3c61 return so │ │ │ │ +001b8140: 6170 5f63 6c6f 7365 736f 636b 3c2f 613e ap_closesock │ │ │ │ +001b8150: 283c 6120 636c 6173 733d 2263 6f64 6522 (soap │ │ │ │ +001b8180: 293b 3c2f 6469 763e 0a3c 6469 7620 636c );
    .
    return SOAP_OK;
    .
    │ │ │ │ +001b8230: 3c21 2d2d 2066 7261 676d 656e 7420 2d2d

    Simi │ │ │ │ +001b91b0: 6c61 726c 792c 203c 636f 6465 3e3c 6120 larly, s │ │ │ │ +001b9230: 6f61 705f 5055 543c 2f61 3e3c 2f63 6f64 oap_PUT, so │ │ │ │ +001b92c0: 6170 5f50 4154 4348 3c2f 613e 3c2f 636f ap_PATCH, and < │ │ │ │ +001b92e0: 6120 636c 6173 733d 2265 6c22 2068 7265 a class="el" hre │ │ │ │ +001b92f0: 663d 2267 726f 7570 5f5f 6772 6f75 705f f="group__group_ │ │ │ │ +001b9300: 5f69 6f2e 6874 6d6c 2367 6139 3865 3633 _io.html#ga98e63 │ │ │ │ +001b9310: 6636 3936 3964 3264 3833 6133 3166 3137 f6969d2d83a31f17 │ │ │ │ +001b9320: 3837 3238 6130 3163 3763 6322 2074 6974 8728a01c7cc" tit │ │ │ │ +001b9330: 6c65 3d22 4854 5450 2044 454c 4554 4520 le="HTTP DELETE │ │ │ │ +001b9340: 636f 6e74 656e 7420 6672 6f6d 2073 6572 content from ser │ │ │ │ +001b9350: 7665 722e 223e 736f 6170 5f44 454c 4554 ver.">soap_DELET │ │ │ │ +001b9360: 453c 2f61 3e3c 2f63 6f64 653e 2063 6f6d E com │ │ │ │ +001b9370: 6d61 6e64 7320 6172 6520 7072 6f76 6964 mands are provid │ │ │ │ +001b9380: 6564 2066 6f72 2050 5554 2c20 5041 5443 ed for PUT, PATC │ │ │ │ +001b9390: 482c 2061 6e64 2044 454c 4554 4520 6861 H, and DELETE ha │ │ │ │ +001b93a0: 6e64 6c69 6e67 2e3c 2f70 3e0a 3c70 3e54 ndling.

    .

    T │ │ │ │ +001b93b0: 6f20 7375 7070 6f72 7420 4854 5450 2070 o support HTTP p │ │ │ │ +001b93c0: 6970 656c 696e 696e 6720 7765 2075 7365 ipelining we use │ │ │ │ +001b93d0: 2074 6865 203c 636f 6465 3e3c 6120 636c the http_pipe │ │ │ │ +001b9470: 3c2f 636f 6465 3e20 706c 7567 696e 2c20 plugin, │ │ │ │ +001b9480: 7768 6963 6820 6361 6e20 6265 2075 7365 which can be use │ │ │ │ +001b9490: 6420 6174 2074 6865 2073 6572 7665 7220 d at the server │ │ │ │ +001b94a0: 7369 6465 2074 6f20 656e 6162 6c65 2048 side to enable H │ │ │ │ +001b94b0: 5454 5020 7069 7065 6c69 6e69 6e67 2061 TTP pipelining a │ │ │ │ +001b94c0: 7574 6f6d 6174 6963 616c 6c79 2c20 7768 utomatically, wh │ │ │ │ +001b94d0: 656e 2072 6567 6973 7465 7265 642e 2054 en registered. T │ │ │ │ +001b94e0: 6865 2070 6c75 6769 6e20 6361 6e20 616c he plugin can al │ │ │ │ +001b94f0: 736f 2062 6520 7573 6564 2061 7420 7468 so be used at th │ │ │ │ +001b9500: 6520 636c 6965 6e74 2073 6964 652c 2074 e client side, t │ │ │ │ +001b9510: 686f 7567 6820 7468 6973 2069 7320 6f6e hough this is on │ │ │ │ +001b9520: 6c79 206e 6563 6573 7361 7279 2069 6e20 ly necessary in │ │ │ │ +001b9530: 7363 656e 6172 696f 7320 7468 6174 2072 scenarios that r │ │ │ │ +001b9540: 6571 7569 7265 2074 6865 2063 6c69 656e equire the clien │ │ │ │ +001b9550: 7420 746f 2072 6563 6569 7665 206d 756c t to receive mul │ │ │ │ +001b9560: 7469 706c 6520 6d65 7373 6167 6573 2077 tiple messages w │ │ │ │ +001b9570: 6974 686f 7574 2069 6e74 6572 6d69 7474 ithout intermitt │ │ │ │ +001b9580: 656e 6420 7365 6e64 732c 2069 2e65 2e20 end sends, i.e. │ │ │ │ +001b9590: 6d75 6c74 6970 6c65 2073 656e 6473 2066 multiple sends f │ │ │ │ +001b95a0: 6f6c 6c6f 7765 6420 6279 206d 756c 7469 ollowed by multi │ │ │ │ +001b95b0: 706c 6520 7265 6365 6976 6573 2062 7920 ple receives by │ │ │ │ +001b95c0: 7468 6520 7361 6d65 2074 6872 6561 6420 the same thread │ │ │ │ +001b95d0: 7573 696e 6720 7468 6520 7361 6d65 203c using the same < │ │ │ │ +001b95e0: 636f 6465 3e3c 6120 636c 6173 733d 2265 code>soap │ │ │ │ +001b9640: 2063 6f6e 7465 7874 2e20 486f 7765 7665 context. Howeve │ │ │ │ +001b9650: 722c 2063 6c69 656e 7473 2073 686f 756c r, clients shoul │ │ │ │ +001b9660: 6420 7573 6520 6d75 6c74 6970 6c65 2074 d use multiple t │ │ │ │ +001b9670: 6872 6561 6473 2077 6865 6e20 4854 5450 hreads when HTTP │ │ │ │ +001b9680: 2070 6970 656c 696e 696e 6720 6973 2075 pipelining is u │ │ │ │ +001b9690: 7365 6420 746f 2070 7265 7665 6e74 2062 sed to prevent b │ │ │ │ +001b96a0: 6c6f 636b 696e 672e 2053 6565 2074 6865 locking. See the │ │ │ │ +001b96b0: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ +001b96c0: 2f73 616d 706c 6573 2f61 7379 6e63 3c2f /samples/async folde │ │ │ │ +001b96e0: 7220 696e 2074 6865 2067 534f 4150 2070 r in the gSOAP p │ │ │ │ +001b96f0: 6163 6b61 6765 2066 6f72 2065 7870 6c61 ackage for expla │ │ │ │ +001b9700: 6e61 7469 6f6e 2061 6e64 2065 7861 6d70 nation and examp │ │ │ │ +001b9710: 6c65 732e 3c2f 703e 0a3c 703e 5365 6520 les.

    .

    See │ │ │ │ +001b9720: 616c 736f 203c 636f 6465 3e3c 6120 636c also htt │ │ │ │ +001b97b0: 705f 706f 7374 3c2f 613e 3c2f 636f 6465 p_post and http_pipe.

    .

    .... Back to table │ │ │ │ +001b9890: 6f66 2063 6f6e 7465 6e74 733c 2f61 3e3c of contents< │ │ │ │ +001b98a0: 2f70 3e0a 3c68 333e 3c61 2063 6c61 7373 /p>.

    │ │ │ │ +001b98d0: 0a54 6865 2048 5454 5020 6469 6765 7374 .The HTTP digest │ │ │ │ +001b98e0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication │ │ │ │ +001b98f0: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e54 plugin

    .

    T │ │ │ │ +001b9900: 6865 2048 5454 5020 6469 6765 7374 2061 he HTTP digest a │ │ │ │ +001b9910: 7574 6865 6e74 6963 6174 696f 6e20 706c uthentication pl │ │ │ │ +001b9920: 7567 696e 2065 6e61 626c 6573 2061 206d ugin enables a m │ │ │ │ +001b9930: 6f72 6520 7365 6375 7265 2061 7574 6865 ore secure authe │ │ │ │ +001b9940: 6e74 6963 6174 696f 6e20 7363 6865 6d65 ntication scheme │ │ │ │ +001b9950: 2063 6f6d 7061 7265 6420 746f 2062 6173 compared to bas │ │ │ │ +001b9960: 6963 2061 7574 6865 6e74 6963 6174 696f ic authenticatio │ │ │ │ +001b9970: 6e2e 2048 5454 5020 6261 7369 6320 6175 n. HTTP basic au │ │ │ │ +001b9980: 7468 656e 7469 6361 7469 6f6e 2073 656e thentication sen │ │ │ │ +001b9990: 6473 2075 6e65 6e63 7279 7074 6564 2075 ds unencrypted u │ │ │ │ +001b99a0: 7365 7269 6473 2061 6e64 2070 6173 7377 serids and passw │ │ │ │ +001b99b0: 6f72 6473 206f 7665 7220 7468 6520 6e65 ords over the ne │ │ │ │ +001b99c0: 742c 2077 6869 6c65 2064 6967 6573 7420 t, while digest │ │ │ │ +001b99d0: 6175 7468 656e 7469 6361 7469 6f6e 2064 authentication d │ │ │ │ +001b99e0: 6f65 7320 6e6f 7420 6578 6368 616e 6765 oes not exchange │ │ │ │ +001b99f0: 2070 6173 7377 6f72 6473 2062 7574 2065 passwords but e │ │ │ │ +001b9a00: 7863 6861 6e67 6573 2063 6865 636b 7375 xchanges checksu │ │ │ │ +001b9a10: 6d73 206f 6620 7061 7373 776f 7264 7320 ms of passwords │ │ │ │ +001b9a20: 2861 6e64 206f 7468 6572 2064 6174 6120 (and other data │ │ │ │ +001b9a30: 7375 6368 2061 7320 6e6f 6e63 6573 2074 such as nonces t │ │ │ │ +001b9a40: 6f20 6176 6f69 6420 7265 706c 6179 2061 o avoid replay a │ │ │ │ +001b9a50: 7474 6163 6b73 292e 2046 6f72 206d 6f72 ttacks). For mor │ │ │ │ +001b9a60: 6520 6465 7461 696c 732c 2070 6c65 6173 e details, pleas │ │ │ │ +001b9a70: 6520 7365 6520 5246 4320 3236 3137 2e3c e see RFC 2617.< │ │ │ │ +001b9a80: 2f70 3e0a 3c70 3e54 6865 2048 5454 5020 /p>.

    The HTTP │ │ │ │ +001b9a90: 6469 6765 7374 2061 7574 6865 6e74 6963 digest authentic │ │ │ │ +001b9aa0: 6174 696f 6e20 6361 6e20 6265 2075 7365 ation can be use │ │ │ │ +001b9ab0: 6420 6e65 7874 2074 6f20 7468 6520 6275 d next to the bu │ │ │ │ +001b9ac0: 696c 742d 696e 2062 6173 6963 2061 7574 ilt-in basic aut │ │ │ │ +001b9ad0: 6865 6e74 6963 6174 696f 6e2c 206f 7220 hentication, or │ │ │ │ +001b9ae0: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica │ │ │ │ +001b9af0: 7469 6f6e 2063 616e 2062 6520 7265 6a65 tion can be reje │ │ │ │ +001b9b00: 6374 6564 2074 6f20 7469 6768 7465 6e20 cted to tighten │ │ │ │ +001b9b10: 7365 6375 7269 7479 2e20 5468 6520 7365 security. The se │ │ │ │ +001b9b20: 7276 6572 206d 7573 7420 6861 7665 2061 rver must have a │ │ │ │ +001b9b30: 2064 6174 6162 6173 6520 7769 7468 2075 database with u │ │ │ │ +001b9b40: 7365 7269 6427 7320 616e 6420 7061 7373 serid's and pass │ │ │ │ +001b9b50: 776f 7264 7320 2869 6e20 706c 6169 6e20 words (in plain │ │ │ │ +001b9b60: 7465 7874 2066 6f72 6d29 2e20 5468 6520 text form). The │ │ │ │ +001b9b70: 636c 6965 6e74 2c20 7768 656e 2063 6861 client, when cha │ │ │ │ +001b9b80: 6c6c 656e 6765 6420 6279 2074 6865 2073 llenged by the s │ │ │ │ +001b9b90: 6572 7665 722c 2063 6865 636b 7320 7468 erver, checks th │ │ │ │ +001b9ba0: 6520 6175 7468 656e 7469 6361 7469 6f6e e authentication │ │ │ │ +001b9bb0: 2072 6561 6c6d 2070 726f 7669 6465 6420 realm provided │ │ │ │ +001b9bc0: 6279 2074 6865 2073 6572 7665 7220 616e by the server an │ │ │ │ +001b9bd0: 6420 7365 7473 2074 6865 2075 7365 7269 d sets the useri │ │ │ │ +001b9be0: 6420 616e 6420 7061 7373 776f 7264 7320 d and passwords │ │ │ │ +001b9bf0: 666f 7220 6469 6765 7374 2061 7574 6865 for digest authe │ │ │ │ +001b9c00: 6e74 6963 6174 696f 6e2e 2054 6865 2063 ntication. The c │ │ │ │ +001b9c10: 6c69 656e 7420 6170 706c 6963 6174 696f lient applicatio │ │ │ │ +001b9c20: 6e20 6361 6e20 7465 6d70 6f72 6172 696c n can temporaril │ │ │ │ +001b9c30: 7920 7374 6f72 6520 7468 6520 7573 6572 y store the user │ │ │ │ +001b9c40: 6964 2061 6e64 2070 6173 7377 6f72 6420 id and password │ │ │ │ +001b9c50: 666f 7220 6120 7365 7175 656e 6365 206f for a sequence o │ │ │ │ +001b9c60: 6620 6d65 7373 6167 6520 6578 6368 616e f message exchan │ │ │ │ +001b9c70: 6765 7320 7769 7468 2074 6865 2073 6572 ges with the ser │ │ │ │ +001b9c80: 7665 722c 2077 6869 6368 2069 7320 6661 ver, which is fa │ │ │ │ +001b9c90: 7374 6572 2074 6861 6e20 7265 7065 6174 ster than repeat │ │ │ │ +001b9ca0: 6564 2061 7574 686f 7269 7a61 7469 6f6e ed authorization │ │ │ │ +001b9cb0: 2063 6861 6c6c 656e 6765 7320 616e 6420 challenges and │ │ │ │ +001b9cc0: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r │ │ │ │ +001b9cd0: 6573 706f 6e73 6573 2e3c 2f70 3e0a 3c70 esponses.

    .

    At the client s │ │ │ │ +001b9cf0: 6964 652c 2074 6865 2070 6c75 6769 6e20 ide, the plugin │ │ │ │ +001b9d00: 6973 2072 6567 6973 7465 7265 6420 616e is registered an │ │ │ │ +001b9d10: 6420 7365 7276 6963 6520 696e 766f 6361 d service invoca │ │ │ │ +001b9d20: 7469 6f6e 7320 6172 6520 6368 6563 6b65 tions are checke │ │ │ │ +001b9d30: 6420 666f 7220 6175 7468 6f72 697a 6174 d for authorizat │ │ │ │ +001b9d40: 696f 6e20 6368 616c 6c65 6e67 6573 2028 ion challenges ( │ │ │ │ +001b9d50: 4854 5450 2065 7272 6f72 2063 6f64 6520 HTTP error code │ │ │ │ +001b9d60: 3430 3129 2e20 5768 656e 2074 6865 2073 401). When the s │ │ │ │ +001b9d70: 6572 7665 7220 6368 616c 6c65 6e67 6573 erver challenges │ │ │ │ +001b9d80: 2074 6865 2063 6c69 656e 742c 2074 6865 the client, the │ │ │ │ +001b9d90: 2063 6c69 656e 7420 7368 6f75 6c64 2073 client should s │ │ │ │ +001b9da0: 6574 2074 6865 2075 7365 7269 6420 616e et the userid an │ │ │ │ +001b9db0: 6420 7061 7373 776f 7264 2061 6e64 2072 d password and r │ │ │ │ +001b9dc0: 6574 7279 2074 6865 2069 6e76 6f63 6174 etry the invocat │ │ │ │ +001b9dd0: 696f 6e2e 2054 6865 2063 6c69 656e 7420 ion. The client │ │ │ │ +001b9de0: 6361 6e20 6465 7465 726d 696e 6520 7468 can determine th │ │ │ │ +001b9df0: 6520 7573 6572 6964 2061 6e64 2070 6173 e userid and pas │ │ │ │ +001b9e00: 7377 6f72 6420 6261 7365 6420 6f6e 2074 sword based on t │ │ │ │ +001b9e10: 6865 2061 7574 6865 6e74 6963 6174 696f he authenticatio │ │ │ │ +001b9e20: 6e20 7265 616c 6d20 7061 7274 206f 6620 n realm part of │ │ │ │ +001b9e30: 7468 6520 7365 7276 6572 2773 2063 6861 the server's cha │ │ │ │ +001b9e40: 6c6c 656e 6765 2e20 5468 6520 6175 7468 llenge. The auth │ │ │ │ +001b9e50: 656e 7469 6361 7469 6f6e 2069 6e66 6f72 entication infor │ │ │ │ +001b9e60: 6d61 7469 6f6e 2063 616e 2062 6520 7465 mation can be te │ │ │ │ +001b9e70: 6d70 6f72 6172 696c 7920 7361 7665 6420 mporarily saved │ │ │ │ +001b9e80: 666f 7220 6d75 6c74 6970 6c65 2069 6e76 for multiple inv │ │ │ │ +001b9e90: 6f63 6174 696f 6e73 2e3c 2f70 3e0a 3c70 ocations.

    .

    Client-side exa │ │ │ │ +001b9eb0: 6d70 6c65 3a3c 2f70 3e0a 3c64 6976 2063 mple:

    .
    │ │ │ │ +001b9ed0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    #in │ │ │ │ +001b9f00: 636c 7564 6520 2671 756f 743b 6874 7470 clude "http │ │ │ │ +001b9f10: 6461 2e68 2671 756f 743b 3c2f 7370 616e da.h"
    .
    .
    .< │ │ │ │ -001b9f70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b9f80: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int main()
    │ │ │ │ +001b9f50: 696e 6522 3e3c 7370 616e 2063 6c61 7373 ine">i │ │ │ │ +001b9f70: 6e74 3c2f 7370 616e 3e20 6d61 696e 2829 nt main() │ │ │ │ +001b9f80: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    {
    │ │ │ │ 001b9fa0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    .
    < │ │ │ │ -001b9fd0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001b9fe0: 6f72 6422 3e73 7472 7563 7420 3c2f 7370 ord">struct soap *soap< │ │ │ │ -001ba050: 2f61 3e20 3d20 3c61 2063 6c61 7373 3d22 /a> = soap_ │ │ │ │ -001ba0b0: 6e65 773c 2f61 3e28 293b 3c2f 6469 763e new();
    │ │ │ │ -001ba0c0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    i │ │ │ │ -001ba0f0: 663c 2f73 7061 6e3e 203c 6120 636c 6173 f soa │ │ │ │ -001ba150: 705f 7265 6769 7374 6572 5f70 6c75 6769 p_register_plugi │ │ │ │ -001ba160: 6e3c 2f61 3e28 3c61 2063 6c61 7373 3d22 n(soa │ │ │ │ -001ba190: 703c 2f61 3e2c 2068 7474 705f 6461 2929 p, http_da)) │ │ │ │ -001ba1a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ex │ │ │ │ -001ba1c0: 6974 2845 5849 545f 4641 494c 5552 4529 it(EXIT_FAILURE) │ │ │ │ -001ba1d0: 3b20 3c73 7061 6e20 636c 6173 733d 2263 ; // faile │ │ │ │ -001ba1f0: 6420 746f 2072 6567 6973 7465 7220 3c2f d to register
    .
    │ │ │ │ -001ba220: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (soap_call_n │ │ │ │ -001ba250: 735f 5f77 6562 6d65 7468 6f64 283c 6120 s__webmethod(soap, .. │ │ │ │ -001ba290: 2e29 2920 3c2f 6469 763e 0a3c 6469 7620 .))
    .
    { │ │ │ │ -001ba2b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if │ │ │ │ -001ba2f0: 2028 3c61 2063 6c61 7373 3d22 636f 6465 (soap->e │ │ │ │ -001ba370: 7272 6f72 3c2f 613e 203d 3d20 3430 3129 rror == 401) │ │ │ │ -001ba380: 203c 7370 616e 2063 6c61 7373 3d22 636f // challe │ │ │ │ -001ba3a0: 6e67 653a 2048 5454 5020 6175 7468 656e nge: HTTP authen │ │ │ │ -001ba3b0: 7469 6361 7469 6f6e 2072 6571 7569 7265 tication require │ │ │ │ -001ba3c0: 6420 3c2f 7370 616e 3e3c 2f64 6976 3e0a d
    . │ │ │ │ -001ba3d0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    . │ │ │ │ -001ba400: 2020 2020 2020 3c73 7061 6e20 636c 6173 │ │ │ │ -001ba420: 6966 3c2f 7370 616e 3e20 2821 7374 7263 if (!strc │ │ │ │ -001ba430: 6d70 283c 6120 636c 6173 733d 2263 6f64 mp(soap-> │ │ │ │ -001ba4b0: 6175 7468 7265 616c 6d3c 2f61 3e2c 203c authrealm, < │ │ │ │ -001ba4c0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001ba4d0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001ba4e0: 6874 6d6c 2361 3864 6265 3537 6435 3966 html#a8dbe57d59f │ │ │ │ -001ba4f0: 3638 3364 3939 3330 3561 3434 6234 6437 683d99305a44b4d7 │ │ │ │ -001ba500: 3933 3962 6664 223e 6175 7468 7265 616c 939bfd">authreal │ │ │ │ -001ba510: 6d3c 2f61 3e29 2920 3c73 7061 6e20 636c m)) // │ │ │ │ -001ba530: 206f 7074 696f 6e61 6c6c 7920 6465 7465 optionally dete │ │ │ │ -001ba540: 726d 696e 6520 6175 7468 656e 7469 6361 rmine authentica │ │ │ │ -001ba550: 7469 6f6e 2072 6561 6c6d 3c2f 7370 616e tion realm
    .
    │ │ │ │ -001ba580: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ -001ba5a0: 2020 3c73 7061 6e20 636c 6173 733d 226b struct < │ │ │ │ -001ba5c0: 2f73 7061 6e3e 6874 7470 5f64 615f 696e /span>http_da_in │ │ │ │ -001ba5d0: 666f 2069 6e66 6f3b 203c 7370 616e 2063 fo info; / │ │ │ │ -001ba5f0: 2f20 746f 2073 746f 7265 2075 7365 7269 / to store useri │ │ │ │ -001ba600: 6420 616e 6420 7061 7373 7764 203c 2f73 d and passwd
    .
    │ │ │ │ -001ba630: 2020 2020 2068 7474 705f 6461 5f73 6176 http_da_sav │ │ │ │ -001ba640: 6528 3c61 2063 6c61 7373 3d22 636f 6465 e(soap, &info, au │ │ │ │ -001ba680: 7468 7265 616c 6d2c 2075 7365 7269 642c threalm, userid, │ │ │ │ -001ba690: 2070 6173 7377 6429 3b20 3c73 7061 6e20 passwd); │ │ │ │ -001ba6b0: 2f2f 2073 6574 2075 7365 7269 6420 616e // set userid an │ │ │ │ -001ba6c0: 6420 7061 7373 7764 2066 6f72 2074 6869 d passwd for thi │ │ │ │ -001ba6d0: 7320 7265 616c 6d3c 2f73 7061 6e3e 3c2f s realm.
    < │ │ │ │ -001ba700: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001ba710: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if (soap_call_ns │ │ │ │ -001ba730: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ... │ │ │ │ -001ba770: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // retr │ │ │ │ -001ba790: 7920 3c2f 7370 616e 3e3c 2f64 6976 3e0a y
    . │ │ │ │ -001ba7a0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    {
    .
    .. │ │ │ │ -001ba7e0: 2e20 3c73 7061 6e20 636c 6173 733d 2263 . //
    .
    │ │ │ │ -001ba820: 2020 2020 3c61 2063 6c61 7373 3d22 636f soap_en │ │ │ │ -001ba880: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa │ │ │ │ -001ba8b0: 703c 2f61 3e29 3b20 3c73 7061 6e20 636c p); // │ │ │ │ -001ba8d0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass │ │ │ │ -001ba8e0: 7764 2077 6572 6520 6465 616c 6c6f 6361 wd were dealloca │ │ │ │ -001ba8f0: 7465 6420 3c2f 7370 616e 3e3c 2f64 6976 ted
    .
    ht │ │ │ │ -001ba920: 7470 5f64 615f 7265 7374 6f72 6528 3c61 tp_da_restore(soap, & │ │ │ │ -001ba960: 616d 703b 696e 666f 293b 203c 7370 616e amp;info); // restore user │ │ │ │ -001ba990: 6964 2061 6e64 2070 6173 7377 6420 3c2f id and passwd
    .
    │ │ │ │ -001ba9c0: 2020 2020 2020 2020 3c73 7061 6e20 636c if (!so │ │ │ │ -001ba9f0: 6170 5f63 616c 6c5f 6e73 5f5f 7765 626d ap_call_ns__webm │ │ │ │ -001baa00: 6574 686f 6428 3c61 2063 6c61 7373 3d22 ethod(soa │ │ │ │ -001baa30: 703c 2f61 3e2c 202e 2e2e 2929 203c 7370 p, ...)) // another ca │ │ │ │ -001baa60: 6c6c 203c 2f73 7061 6e3e 3c2f 6469 763e ll
    │ │ │ │ -001baa70: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    . │ │ │ │ -001baa90: 2e2e 203c 7370 616e 2063 6c61 7373 3d22 .. //
    .
    │ │ │ │ -001baad0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    │ │ │ │ -001baaf0: 2020 207d 3c2f 6469 763e 0a3c 6469 7620 }
    .
    │ │ │ │ -001bab10: 207d 3c2f 6469 763e 0a3c 6469 7620 636c }
    .
    }.
    http_da │ │ │ │ -001bab50: 5f72 656c 6561 7365 283c 6120 636c 6173 _release( │ │ │ │ -001bab80: 736f 6170 3c2f 613e 2c20 2661 6d70 3b69 soap, &i │ │ │ │ -001bab90: 6e66 6f29 3b20 3c73 7061 6e20 636c 6173 nfo); // t │ │ │ │ -001babb0: 6f20 7265 6d6f 7665 2061 6c6c 2075 7365 o remove all use │ │ │ │ -001babc0: 7269 6420 616e 6420 7061 7373 7764 3c2f rid and passwd
    .. │ │ │ │ -001baca0: 2020 3c61 2063 6c61 7373 3d22 636f 6465 soap_end< │ │ │ │ -001bad00: 2f61 3e28 3c61 2063 6c61 7373 3d22 636f /a>(soap< │ │ │ │ -001bad30: 2f61 3e29 3b3c 2f64 6976 3e0a 3c64 6976 /a>);
    ..
    }.

    T │ │ │ │ -001bae20: 6869 7320 636f 6465 2073 7570 706f 7274 his code support │ │ │ │ -001bae30: 7320 626f 7468 2062 6173 6963 2061 6e64 s both basic and │ │ │ │ -001bae40: 2064 6967 6573 7420 6175 7468 656e 7469 digest authenti │ │ │ │ -001bae50: 6361 7469 6f6e 2e3c 2f70 3e0a 3c70 3e54 cation.

    .

    T │ │ │ │ -001bae60: 6865 2073 6572 7665 7220 6361 6e20 6368 he server can ch │ │ │ │ -001bae70: 616c 6c65 6e67 6520 6120 636c 6965 6e74 allenge a client │ │ │ │ -001bae80: 2075 7369 6e67 2048 5454 5020 636f 6465 using HTTP code │ │ │ │ -001bae90: 2034 3031 2e20 5769 7468 2074 6865 2070 401. With the p │ │ │ │ -001baea0: 6c75 6769 6e2c 2048 5454 5020 6469 6765 lugin, HTTP dige │ │ │ │ -001baeb0: 7374 2061 7574 6865 6e74 6963 6174 696f st authenticatio │ │ │ │ -001baec0: 6e20 6368 616c 6c65 6e67 6573 2061 7265 n challenges are │ │ │ │ -001baed0: 2073 656e 642e 2057 6974 686f 7574 2074 send. Without t │ │ │ │ -001baee0: 6865 2070 6c75 6769 6e2c 2062 6173 6963 he plugin, basic │ │ │ │ -001baef0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication │ │ │ │ -001baf00: 6368 616c 6c65 6e67 6573 2061 7265 2073 challenges are s │ │ │ │ -001baf10: 656e 642e 3c2f 703e 0a3c 703e 4561 6368 end.

    .

    Each │ │ │ │ -001baf20: 2073 6572 7665 7220 6d65 7468 6f64 2063 server method c │ │ │ │ -001baf30: 616e 2069 6d70 6c65 6d65 6e74 2061 7574 an implement aut │ │ │ │ -001baf40: 6865 6e74 6963 6174 696f 6e20 6173 2064 hentication as d │ │ │ │ -001baf50: 6573 6972 6564 2061 6e64 206d 6179 2065 esired and may e │ │ │ │ -001baf60: 6e66 6f72 6365 2064 6967 6573 7420 6175 nforce digest au │ │ │ │ -001baf70: 7468 656e 7469 6361 7469 6f6e 206f 7220 thentication or │ │ │ │ -001baf80: 6d61 7920 616c 736f 2061 6363 6570 7420 may also accept │ │ │ │ -001baf90: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica │ │ │ │ -001bafa0: 7469 6f6e 2072 6573 706f 6e73 6573 2e20 tion responses. │ │ │ │ -001bafb0: 546f 2076 6572 6966 7920 6469 6765 7374 To verify digest │ │ │ │ -001bafc0: 2061 7574 6865 6e74 6963 6174 696f 6e20 authentication │ │ │ │ -001bafd0: 7265 7370 6f6e 7365 732c 2074 6865 2073 responses, the s │ │ │ │ -001bafe0: 6572 7665 7220 7368 6f75 6c64 2063 6f6d erver should com │ │ │ │ -001baff0: 7075 7465 2061 6e64 2063 6f6d 7061 7265 pute and compare │ │ │ │ -001bb000: 2074 6865 2063 6865 636b 7375 6d73 2075 the checksums u │ │ │ │ -001bb010: 7369 6e67 2074 6865 2070 6c75 6769 6e27 sing the plugin' │ │ │ │ -001bb020: 7320 3c63 6f64 653e 6874 7470 5f64 615f s http_da_ │ │ │ │ -001bb030: 7665 7269 6679 5f70 6f73 743c 2f63 6f64 verify_post function for │ │ │ │ -001bb050: 4854 5450 2050 4f53 5420 7265 7175 6573 HTTP POST reques │ │ │ │ -001bb060: 7473 2028 616e 6420 3c63 6f64 653e 6874 ts (and ht │ │ │ │ -001bb070: 7470 5f64 615f 7665 7269 6679 5f67 6574 tp_da_verify_get │ │ │ │ -001bb080: 3c2f 636f 6465 3e20 666f 7220 4854 5450 for HTTP │ │ │ │ -001bb090: 2047 4554 2072 6571 7565 7374 7320 7769 GET requests wi │ │ │ │ -001bb0a0: 7468 2074 6865 2048 5454 5020 4745 5420 th the HTTP GET │ │ │ │ -001bb0b0: 706c 7567 696e 2920 6173 2066 6f6c 6c6f plugin) as follo │ │ │ │ -001bb0c0: 7773 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ws:

    .
    .
    if < │ │ │ │ +001ba0e0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001ba0f0: 7265 663d 2267 726f 7570 5f5f 6772 6f75 ref="group__grou │ │ │ │ +001ba100: 705f 5f70 6c75 6769 6e2e 6874 6d6c 2367 p__plugin.html#g │ │ │ │ +001ba110: 6164 3634 3565 3561 3538 6564 3434 3266 ad645e5a58ed442f │ │ │ │ +001ba120: 6534 3735 3364 6363 3233 3338 6338 6264 e4753dcc2338c8bd │ │ │ │ +001ba130: 6222 3e73 6f61 705f 7265 6769 7374 6572 b">soap_register │ │ │ │ +001ba140: 5f70 6c75 6769 6e3c 2f61 3e28 3c61 2063 _plugin(soap, htt │ │ │ │ +001ba180: 705f 6461 2929 203c 2f64 6976 3e0a 3c64 p_da))
    . │ │ │ │ +001ba1a0: 2020 2020 6578 6974 2845 5849 545f 4641 exit(EXIT_FA │ │ │ │ +001ba1b0: 494c 5552 4529 3b20 3c73 7061 6e20 636c ILURE); // │ │ │ │ +001ba1d0: 2066 6169 6c65 6420 746f 2072 6567 6973 failed to regis │ │ │ │ +001ba1e0: 7465 7220 3c2f 7370 616e 3e3c 2f64 6976 ter
    .
    │ │ │ │ +001ba220: 6966 3c2f 7370 616e 3e20 2873 6f61 705f if (soap_ │ │ │ │ +001ba230: 6361 6c6c 5f6e 735f 5f77 6562 6d65 7468 call_ns__webmeth │ │ │ │ +001ba240: 6f64 283c 6120 636c 6173 733d 2263 6f64 od(soap, ...))
    │ │ │ │ +001ba280: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    . │ │ │ │ +001ba2b0: 2020 203c 7370 616e 2063 6c61 7373 3d22 if< │ │ │ │ +001ba2d0: 2f73 7061 6e3e 2028 3c61 2063 6c61 7373 /span> (
    s │ │ │ │ +001ba300: 6f61 703c 2f61 3e2d 2667 743b 3c61 2063 oap->error = │ │ │ │ +001ba360: 3d20 3430 3129 203c 7370 616e 2063 6c61 = 401) // │ │ │ │ +001ba380: 6368 616c 6c65 6e67 653a 2048 5454 5020 challenge: HTTP │ │ │ │ +001ba390: 6175 7468 656e 7469 6361 7469 6f6e 2072 authentication r │ │ │ │ +001ba3a0: 6571 7569 7265 6420 3c2f 7370 616e 3e3c equired < │ │ │ │ +001ba3b0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    {.
    if │ │ │ │ +001ba410: 2821 7374 7263 6d70 283c 6120 636c 6173 (!strcmp( │ │ │ │ +001ba440: 736f 6170 3c2f 613e 2d26 6774 3b3c 6120 soap->authrealm< │ │ │ │ +001ba4a0: 2f61 3e2c 203c 6120 636c 6173 733d 2263 /a>, au │ │ │ │ +001ba4f0: 7468 7265 616c 6d3c 2f61 3e29 2920 3c73 threalm)) // optionall │ │ │ │ +001ba520: 7920 6465 7465 726d 696e 6520 6175 7468 y determine auth │ │ │ │ +001ba530: 656e 7469 6361 7469 6f6e 2072 6561 6c6d entication realm │ │ │ │ +001ba540: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001ba560: 2020 2020 2020 7b3c 2f64 6976 3e0a 3c64 {
    . │ │ │ │ +001ba580: 2020 2020 2020 2020 3c73 7061 6e20 636c st │ │ │ │ +001ba5a0: 7275 6374 203c 2f73 7061 6e3e 6874 7470 ruct http │ │ │ │ +001ba5b0: 5f64 615f 696e 666f 2069 6e66 6f3b 203c _da_info info; < │ │ │ │ +001ba5c0: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001ba5d0: 656e 7422 3e2f 2f20 746f 2073 746f 7265 ent">// to store │ │ │ │ +001ba5e0: 2075 7365 7269 6420 616e 6420 7061 7373 userid and pass │ │ │ │ +001ba5f0: 7764 203c 2f73 7061 6e3e 3c2f 6469 763e wd
    │ │ │ │ +001ba600: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    http_ │ │ │ │ +001ba620: 6461 5f73 6176 6528 3c61 2063 6c61 7373 da_save(s │ │ │ │ +001ba650: 6f61 703c 2f61 3e2c 2026 616d 703b 696e oap, &in │ │ │ │ +001ba660: 666f 2c20 6175 7468 7265 616c 6d2c 2075 fo, authrealm, u │ │ │ │ +001ba670: 7365 7269 642c 2070 6173 7377 6429 3b20 serid, passwd); │ │ │ │ +001ba680: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // set use │ │ │ │ +001ba6a0: 7269 6420 616e 6420 7061 7373 7764 2066 rid and passwd f │ │ │ │ +001ba6b0: 6f72 2074 6869 7320 7265 616c 6d3c 2f73 or this realm
    .
    │ │ │ │ +001ba6e0: 2020 2020 203c 7370 616e 2063 6c61 7373 i │ │ │ │ +001ba700: 663c 2f73 7061 6e3e 2028 736f 6170 5f63 f (soap_c │ │ │ │ +001ba710: 616c 6c5f 6e73 5f5f 7765 626d 6574 686f all_ns__webmetho │ │ │ │ +001ba720: 6428 3c61 2063 6c61 7373 3d22 636f 6465 d(soap, ...)) / │ │ │ │ +001ba770: 2f20 7265 7472 7920 3c2f 7370 616e 3e3c / retry < │ │ │ │ +001ba780: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    │ │ │ │ +001ba7a0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +001ba7c0: 2020 2020 2e2e 2e20 3c73 7061 6e20 636c ... // │ │ │ │ +001ba7e0: 3c2f 7370 616e 3e3c 2f64 6976 3e0a 3c64
    . │ │ │ │ +001ba800: 2020 2020 2020 2020 2020 3c61 2063 6c61 s │ │ │ │ +001ba860: 6f61 705f 656e 643c 2f61 3e28 3c61 2063 oap_end(soap); // userid an │ │ │ │ +001ba8c0: 6420 7061 7373 7764 2077 6572 6520 6465 d passwd were de │ │ │ │ +001ba8d0: 616c 6c6f 6361 7465 6420 3c2f 7370 616e allocated
    ..
    if (!soap_call_ns │ │ │ │ +001ba9e0: 5f5f 7765 626d 6574 686f 6428 3c61 2063 __webmethod(soap, ... │ │ │ │ +001baa20: 2929 203c 7370 616e 2063 6c61 7373 3d22 )) // anot │ │ │ │ +001baa40: 6865 7220 6361 6c6c 203c 2f73 7061 6e3e her call │ │ │ │ +001baa50: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    │ │ │ │ +001baa70: 2020 2020 202e 2e2e 203c 7370 616e 2063 ... / │ │ │ │ +001baa90: 2f3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c /
    .< │ │ │ │ +001baaa0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001baab0: 3e20 2020 2020 2020 207d 3c2f 6469 763e > }
    │ │ │ │ +001baac0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    │ │ │ │ +001baae0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    .< │ │ │ │ +001bab00: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001bab10: 3e20 207d 3c2f 6469 763e 0a3c 6469 7620 > }
    .
    h │ │ │ │ +001bab30: 7474 705f 6461 5f72 656c 6561 7365 283c ttp_da_release(< │ │ │ │ +001bab40: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001bab50: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001bab60: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ +001bab70: 2661 6d70 3b69 6e66 6f29 3b20 3c73 7061 &info); // to remove a │ │ │ │ +001baba0: 6c6c 2075 7365 7269 6420 616e 6420 7061 ll userid and pa │ │ │ │ +001babb0: 7373 7764 3c2f 7370 616e 3e3c 2f64 6976 sswd
    .

    For mor │ │ │ │ -001bc870: 6520 6465 7461 696c 732c 2069 6e63 6c75 e details, inclu │ │ │ │ -001bc880: 6469 6e67 2068 6f77 2074 6f20 636f 6e66 ding how to conf │ │ │ │ -001bc890: 6967 7572 6520 4854 5450 2044 6967 6573 igure HTTP Diges │ │ │ │ -001bc8a0: 7420 6175 7468 656e 7469 6361 7469 6f6e t authentication │ │ │ │ -001bc8b0: 2066 6f72 2070 726f 7869 6573 2c20 7365 for proxies, se │ │ │ │ -001bc8c0: 6520 7468 6520 3c61 2068 7265 663d 222e e the HT │ │ │ │ -001bc8f0: 5450 2064 6967 6573 7420 6175 7468 656e TP digest authen │ │ │ │ -001bc900: 7469 6361 7469 6f6e 2070 6c75 6769 6e3c tication plugin< │ │ │ │ -001bc910: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio │ │ │ │ -001bc920: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

    .... < │ │ │ │ -001bc930: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -001bc940: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -001bc950: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    .The │ │ │ │ -001bc990: 4854 5450 2073 6573 7369 6f6e 7320 706c HTTP sessions pl │ │ │ │ -001bc9a0: 7567 696e 3c2f 6833 3e0a 3c70 3e54 6865 ugin

    .

    The p │ │ │ │ -001bd0d0: 6c75 6769 6e20 636f 6465 2069 7320 6c6f lugin code is lo │ │ │ │ -001bd0e0: 6361 7465 6420 696e 2074 6865 203c 656d cated in the gsoap/plu │ │ │ │ -001bd100: 6769 6e3c 2f63 6f64 653e 3c2f 656d 3e20 gin │ │ │ │ -001bd110: 6469 7265 6374 6f72 7920 636f 6e74 6169 directory contai │ │ │ │ -001bd120: 6e69 6e67 203c 656d 3e3c 636f 6465 3e77 ning w │ │ │ │ -001bd130: 7361 6170 692e 683c 2f63 6f64 653e 3c2f saapi.h and wsaapi.c (to be us │ │ │ │ -001bd170: 6564 2069 6e20 4320 616e 6420 432b 2b29 ed in C and C++) │ │ │ │ -001bd180: 2e3c 2f70 3e0a 3c70 3e54 6f20 656e 6162 .

    .

    To enab │ │ │ │ -001bd190: 6c65 2057 532d 4164 6472 6573 7369 6e67 le WS-Addressing │ │ │ │ -001bd1a0: 2032 3030 3520 2861 6e64 2073 7570 706f 2005 (and suppo │ │ │ │ -001bd1b0: 7274 2066 6f72 2038 2f32 3030 3429 2c20 rt for 8/2004), │ │ │ │ -001bd1c0: 7468 6520 7365 7276 6963 6520 6465 6669 the service defi │ │ │ │ -001bd1d0: 6e69 7469 6f6e 7320 6865 6164 6572 2066 nitions header f │ │ │ │ -001bd1e0: 696c 6520 666f 7220 736f 6170 6370 7032 ile for soapcpp2 │ │ │ │ -001bd1f0: 2073 686f 756c 6420 696e 636c 7564 6520 should include │ │ │ │ -001bd200: 7468 6520 666f 6c6c 6f77 696e 6720 696d the following im │ │ │ │ -001bd210: 706f 7274 733a 3c2f 703e 0a3c 6469 7620 ports:

    .
    #i │ │ │ │ -001bd260: 6d70 6f72 7420 2671 756f 743b 696d 706f mport "impo │ │ │ │ -001bd270: 7274 2f77 7361 352e 6826 7175 6f74 3b3c rt/wsa5.h"< │ │ │ │ -001bd280: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 2f64 /span>
    .

    This impo │ │ │ │ -001bd2b0: 7274 7320 7468 6520 534f 4150 2068 6561 rts the SOAP hea │ │ │ │ -001bd2c0: 6465 7220 656c 656d 656e 7473 2072 6571 der elements req │ │ │ │ -001bd2d0: 7569 7265 6420 6279 2057 532d 4164 6472 uired by WS-Addr │ │ │ │ -001bd2e0: 6573 7369 6e67 2e3c 2f70 3e0a 3c70 3e46 essing.

    .

    F │ │ │ │ -001bd2f0: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ │ -001bd300: 2073 6565 2074 6865 203c 6120 6872 6566 see the WS- │ │ │ │ -001bd330: 4164 6472 6573 7369 6e67 2070 6c75 6769 Addressing plugi │ │ │ │ -001bd340: 6e3c 2f61 3e20 646f 6375 6d65 6e74 6174 n documentat │ │ │ │ -001bd350: 696f 6e2e 3c2f 703e 0a3c 703e f09f 949d ion.

    .

    .... │ │ │ │ -001bd360: 203c 6120 6872 6566 3d22 2322 3e42 6163 Bac │ │ │ │ -001bd370: 6b20 746f 2074 6162 6c65 206f 6620 636f k to table of co │ │ │ │ -001bd380: 6e74 656e 7473 3c2f 613e 3c2f 703e 0a3c ntents

    .< │ │ │ │ -001bd390: 6833 3e3c 6120 636c 6173 733d 2261 6e63 h3>.The WS │ │ │ │ -001bd3c0: 2d52 656c 6961 626c 654d 6573 7361 6769 -ReliableMessagi │ │ │ │ -001bd3d0: 6e67 2070 6c75 6769 6e3c 2f68 333e 0a3c ng plugin.< │ │ │ │ -001bd3e0: 703e 5468 6520 706c 7567 696e 2063 6f64 p>The plugin cod │ │ │ │ -001bd3f0: 6520 6973 206c 6f63 6174 6564 2069 6e20 e is located in │ │ │ │ -001bd400: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs │ │ │ │ -001bd410: 6f61 702f 706c 7567 696e 3c2f 636f 6465 oap/plugin directory │ │ │ │ -001bd430: 2063 6f6e 7461 696e 696e 6720 3c65 6d3e containing │ │ │ │ -001bd440: 3c63 6f64 653e 7773 726d 6170 692e 683c wsrmapi.h< │ │ │ │ -001bd450: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ -001bd460: 3c65 6d3e 3c63 6f64 653e 7773 726d 6170 wsrmap │ │ │ │ -001bd470: 692e 633c 2f63 6f64 653e 3c2f 656d 3e20 i.c │ │ │ │ -001bd480: 2874 6f20 6265 2075 7365 6420 696e 2043 (to be used in C │ │ │ │ -001bd490: 2061 6e64 2043 2b2b 292e 3c2f 703e 0a3c and C++).

    .< │ │ │ │ -001bd4a0: 703e 416c 736f 206e 6565 6465 6420 6172 p>Also needed ar │ │ │ │ -001bd4b0: 6520 3c65 6d3e 3c63 6f64 653e 7468 7265 e thre │ │ │ │ -001bd4c0: 6164 732e 683c 2f63 6f64 653e 3c2f 656d ads.h and │ │ │ │ -001bd4e0: 7468 7265 6164 732e 633c 2f63 6f64 653e threads.c │ │ │ │ -001bd4f0: 3c2f 656d 3e20 666f 7220 6d75 6c74 692d for multi- │ │ │ │ -001bd500: 7468 7265 6164 696e 6720 616e 6420 6c6f threading and lo │ │ │ │ -001bd510: 636b 696e 6720 7375 7070 6f72 742e 3c2f cking support..

    To enable │ │ │ │ -001bd530: 5753 2d52 656c 6961 626c 654d 6573 7361 WS-ReliableMessa │ │ │ │ -001bd540: 6769 6e67 2c20 7468 6520 7365 7276 6963 ging, the servic │ │ │ │ -001bd550: 6520 6465 6669 6e69 7469 6f6e 7320 6865 e definitions he │ │ │ │ -001bd560: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so │ │ │ │ -001bd570: 6170 6370 7032 2073 686f 756c 6420 696e apcpp2 should in │ │ │ │ -001bd580: 636c 7564 6520 7468 6520 666f 6c6c 6f77 clude the follow │ │ │ │ -001bd590: 696e 6720 696d 706f 7274 733a 3c2f 703e ing imports:

    │ │ │ │ -001bd5a0: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo │ │ │ │ -001bd5f0: 743b 696d 706f 7274 2f77 7372 6d2e 6826 t;import/wsrm.h& │ │ │ │ -001bd600: 7175 6f74 3b3c 2f73 7061 6e3e 203c 2f64 quot; .
    #import "i │ │ │ │ -001bd650: 6d70 6f72 742f 7773 6135 2e68 2671 756f mport/wsa5.h&quo │ │ │ │ -001bd660: 743b 3c2f 7370 616e 3e3c 2f64 6976 3e0a t;
    . │ │ │ │ -001bd670: 3c2f 6469 763e 3c21 2d2d 2066 7261 676d

    This i │ │ │ │ -001bd690: 6d70 6f72 7473 2074 6865 2053 4f41 5020 mports the SOAP │ │ │ │ -001bd6a0: 6865 6164 6572 2065 6c65 6d65 6e74 7320 header elements │ │ │ │ -001bd6b0: 7265 7175 6972 6564 2062 7920 5753 2d52 required by WS-R │ │ │ │ -001bd6c0: 656c 6961 626c 654d 6573 7361 6769 6e67 eliableMessaging │ │ │ │ -001bd6d0: 2e3c 2f70 3e0a 3c70 3e46 6f72 206d 6f72 .

    .

    For mor │ │ │ │ -001bd6e0: 6520 6465 7461 696c 732c 2073 6565 2074 e details, see t │ │ │ │ -001bd6f0: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he WS-Reli │ │ │ │ -001bd720: 6162 6c65 4d65 7373 6167 696e 6720 706c ableMessaging pl │ │ │ │ -001bd730: 7567 696e 3c2f 613e 2064 6f63 756d 656e ugin documen │ │ │ │ -001bd740: 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 tation.

    .

    . │ │ │ │ -001bd750: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ -001bd760: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ -001bd770: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .The │ │ │ │ -001bd7b0: 2057 532d 5365 6375 7269 7479 2070 6c75 WS-Security plu │ │ │ │ -001bd7c0: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

    .

    The │ │ │ │ -001bd7d0: 706c 7567 696e 2063 6f64 6520 6973 206c plugin code is l │ │ │ │ -001bd7e0: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/pl │ │ │ │ -001bd800: 7567 696e 3c2f 636f 6465 3e3c 2f65 6d3e ugin │ │ │ │ -001bd810: 2064 6972 6563 746f 7279 2063 6f6e 7461 directory conta │ │ │ │ -001bd820: 696e 696e 6720 3c65 6d3e 3c63 6f64 653e ining │ │ │ │ -001bd830: 7773 7365 6170 692e 683c 2f63 6f64 653e wsseapi.h │ │ │ │ -001bd840: 3c2f 656d 3e20 616e 6420 3c65 6d3e 3c63 and wsseapi.c (to be │ │ │ │ -001bd870: 2075 7365 6420 696e 2043 2061 6e64 2043 used in C and C │ │ │ │ -001bd880: 2b2b 292e 3c2f 703e 0a3c 703e 416c 736f ++).

    .

    Also │ │ │ │ -001bd890: 206e 6565 6465 6420 6172 653a 203c 656d needed are: smdevp.h< │ │ │ │ -001bd8b0: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ -001bd8c0: 3c65 6d3e 3c63 6f64 653e 736d 6465 7670 smdevp │ │ │ │ -001bd8d0: 2e63 3c2f 636f 6465 3e3c 2f65 6d3e 2066 .c f │ │ │ │ -001bd8e0: 6f72 2073 7472 6561 6d69 6e67 2058 4d4c or streaming XML │ │ │ │ -001bd8f0: 2073 6967 6e61 7475 7265 2061 6e64 206d signature and m │ │ │ │ -001bd900: 6573 7361 6765 2064 6967 6573 7420 656e essage digest en │ │ │ │ -001bd910: 6769 6e65 2c20 3c65 6d3e 3c63 6f64 653e gine, │ │ │ │ -001bd920: 6d65 6365 7670 2e68 3c2f 636f 6465 3e3c mecevp.h< │ │ │ │ -001bd930: 2f65 6d3e 2061 6e64 203c 656d 3e3c 636f /em> and mecevp.c for the │ │ │ │ -001bd960: 7374 7265 616d 696e 6720 584d 4c20 656e streaming XML en │ │ │ │ -001bd970: 6372 7970 7469 6f6e 2065 6e67 696e 652c cryption engine, │ │ │ │ -001bd980: 203c 656d 3e3c 636f 6465 3e74 6872 6561 threa │ │ │ │ -001bd990: 6473 2e68 3c2f 636f 6465 3e3c 2f65 6d3e ds.h │ │ │ │ -001bd9a0: 2061 6e64 203c 656d 3e3c 636f 6465 3e74 and t │ │ │ │ -001bd9b0: 6872 6561 6473 2e63 3c2f 636f 6465 3e3c hreads.c< │ │ │ │ -001bd9c0: 2f65 6d3e 2066 6f72 206d 756c 7469 2d74 /em> for multi-t │ │ │ │ -001bd9d0: 6872 6561 6469 6e67 2061 6e64 206c 6f63 hreading and loc │ │ │ │ -001bd9e0: 6b69 6e67 2073 7570 706f 7274 2e3c 2f70 king support.

    .

    To enable W │ │ │ │ -001bda00: 532d 5365 6375 7269 7479 2c20 7468 6520 S-Security, the │ │ │ │ -001bda10: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti │ │ │ │ -001bda20: 6f6e 7320 6865 6164 6572 2066 696c 6520 ons header file │ │ │ │ -001bda30: 666f 7220 736f 6170 6370 7032 2073 686f for soapcpp2 sho │ │ │ │ -001bda40: 756c 6420 696e 636c 7564 6520 7468 6520 uld include the │ │ │ │ -001bda50: 666f 6c6c 6f77 696e 6720 696d 706f 7274 following import │ │ │ │ -001bda60: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    < │ │ │ │ -001bda90: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ -001bdaa0: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor">#impor │ │ │ │ -001bdab0: 7420 2671 756f 743b 696d 706f 7274 2f77 t "import/w │ │ │ │ -001bdac0: 7373 652e 6826 7175 6f74 3b3c 2f73 7061 sse.h"
    .
    < │ │ │ │ -001bdae0: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ -001bdaf0: 3c70 3e54 6869 7320 696d 706f 7274 7320

    This imports │ │ │ │ -001bdb00: 7468 6520 534f 4150 2068 6561 6465 7220 the SOAP header │ │ │ │ -001bdb10: 656c 656d 656e 7473 2072 6571 7569 7265 elements require │ │ │ │ -001bdb20: 6420 6279 2057 532d 5365 6375 7269 7479 d by WS-Security │ │ │ │ -001bdb30: 2e3c 2f70 3e0a 3c70 3e46 6f72 206d 6f72 .

    .

    For mor │ │ │ │ -001bdb40: 6520 6465 7461 696c 732c 2073 6565 2074 e details, see t │ │ │ │ -001bdb50: 6865 203c 6120 6872 6566 3d22 2e2e 2f2e he WS-Securi │ │ │ │ -001bdb80: 7479 2070 6c75 6769 6e3c 2f61 3e20 646f ty plugin do │ │ │ │ -001bdb90: 6375 6d65 6e74 6174 696f 6e2e 3c2f 703e cumentation.

    │ │ │ │ -001bdba0: 0a3c 703e f09f 949d 203c 6120 6872 6566 .

    .... Back to tab │ │ │ │ -001bdbc0: 6c65 206f 6620 636f 6e74 656e 7473 3c2f le of contents

    .

    .The WS-Discove │ │ │ │ -001bdc10: 7279 2070 6c75 6769 6e3c 2f68 333e 0a3c ry plugin

    .< │ │ │ │ -001bdc20: 703e 4261 7369 6361 6c6c 792c 2074 6f20 p>Basically, to │ │ │ │ -001bdc30: 6164 6420 5753 2d44 6973 636f 7665 7279 add WS-Discovery │ │ │ │ -001bdc40: 2073 7570 706f 7274 2074 6865 2066 6f6c support the fol │ │ │ │ -001bdc50: 6c6f 7769 6e67 2065 7665 6e74 2068 616e lowing event han │ │ │ │ -001bdc60: 646c 6572 7320 6d75 7374 2062 6520 6465 dlers must be de │ │ │ │ -001bdc70: 6669 6e65 6420 616e 6420 6c69 6e6b 6564 fined and linked │ │ │ │ -001bdc80: 3a3c 2f70 3e0a 3c64 6976 2063 6c61 7373 :

    .
    void wsdd_event_H │ │ │ │ -001bdce0: 656c 6c6f 283c 7370 616e 2063 6c61 7373 ello(struc │ │ │ │ -001bdd00: 743c 2f73 7061 6e3e 203c 6120 636c 6173 t │ │ │ │ -001bdd30: 736f 6170 3c2f 613e 202a 3c61 2063 6c61 soap *soap,
    .
    un │ │ │ │ -001bdda0: 7369 676e 6564 3c2f 7370 616e 3e20 3c73 signed int InstanceId, < │ │ │ │ -001bdde0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co │ │ │ │ -001bde10: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -001bde40: 202a 5365 7175 656e 6365 4964 2c20 3c2f *SequenceId, .
    unsigned │ │ │ │ -001bde90: 203c 7370 616e 2063 6c61 7373 3d22 6b65 int MessageNum │ │ │ │ -001bdec0: 6265 722c 203c 2f64 6976 3e0a 3c64 6976 ber,
    .
    const │ │ │ │ -001bdf00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -001bdf20: 2f73 7061 6e3e 202a 4d65 7373 6167 6549 /span> *MessageI │ │ │ │ -001bdf30: 442c 203c 2f64 6976 3e0a 3c64 6976 2063 D,
    .
    const < │ │ │ │ -001bdf70: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001bdf80: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *RelatesTo, │ │ │ │ -001bdfa0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001bdfd0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *EndpointRefe │ │ │ │ -001be010: 7265 6e63 652c 203c 2f64 6976 3e0a 3c64 rence,
    . │ │ │ │ -001be030: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ -001be070: 723c 2f73 7061 6e3e 202a 5479 7065 732c r *Types, │ │ │ │ -001be080: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001be0b0: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *Scopes, .
    const │ │ │ │ -001be120: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *M │ │ │ │ -001be150: 6174 6368 4279 2c20 3c2f 6469 763e 0a3c atchBy,
    .< │ │ │ │ -001be160: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001be170: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const
    ch │ │ │ │ -001be1b0: 6172 3c2f 7370 616e 3e20 2a58 4164 6472 ar *XAddr │ │ │ │ -001be1c0: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    unsigned │ │ │ │ -001be220: 696e 743c 2f73 7061 6e3e 204d 6574 6164 int Metad │ │ │ │ -001be230: 6174 6156 6572 7369 6f6e 293c 2f64 6976 ataVersion)
    .
    < │ │ │ │ -001be270: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001be280: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ -001be2a0: 2f73 7061 6e3e 2077 7364 645f 6576 656e /span> wsdd_even │ │ │ │ -001be2b0: 745f 4279 6528 3c73 7061 6e20 636c 6173 t_Bye(stru │ │ │ │ -001be2d0: 6374 3c2f 7370 616e 3e20 3c61 2063 6c61 ct soap *soap, .
    u │ │ │ │ -001be370: 6e73 6967 6e65 643c 2f73 7061 6e3e 203c nsigned < │ │ │ │ -001be380: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001be390: 6f72 6474 7970 6522 3e69 6e74 3c2f 7370 ordtype">int InstanceId, │ │ │ │ -001be3b0: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    c │ │ │ │ -001be3e0: 6f6e 7374 3c2f 7370 616e 3e20 3c73 7061 onst char *SequenceId, < │ │ │ │ -001be420: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int< │ │ │ │ -001be480: 2f73 7061 6e3e 204d 6573 7361 6765 4e75 /span> MessageNu │ │ │ │ -001be490: 6d62 6572 2c20 3c2f 6469 763e 0a3c 6469 mber,
    .< │ │ │ │ -001be4b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001be4c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ -001be4f0: 3c2f 7370 616e 3e20 2a4d 6573 7361 6765 *Message │ │ │ │ -001be500: 4944 2c20 3c2f 6469 763e 0a3c 6469 7620 ID,
    .
    const │ │ │ │ -001be540: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *RelatesTo │ │ │ │ -001be570: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *EndpointRef │ │ │ │ -001be5e0: 6572 656e 6365 2c20 3c2f 6469 763e 0a3c erence,
    .< │ │ │ │ -001be5f0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001be600: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch │ │ │ │ -001be640: 6172 3c2f 7370 616e 3e20 2a54 7970 6573 ar *Types │ │ │ │ -001be650: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *Scopes, .
    cons │ │ │ │ -001be6f0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ -001be720: 4d61 7463 6842 792c 203c 2f64 6976 3e0a MatchBy,
    . │ │ │ │ -001be730: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c │ │ │ │ -001be780: 6861 723c 2f73 7061 6e3e 202a 5841 6464 har *XAdd │ │ │ │ -001be790: 7273 2c20 3c2f 6469 763e 0a3c 6469 7620 rs,
    .
    unsigned< │ │ │ │ -001be7d0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int Meta │ │ │ │ -001be800: 6461 7461 5665 7273 696f 6e29 3c2f 6469 dataVersion).
    │ │ │ │ -001be840: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    soap_wsdd_mode │ │ │ │ -001be860: 2077 7364 645f 6576 656e 745f 5072 6f62 wsdd_event_Prob │ │ │ │ -001be870: 6528 3c73 7061 6e20 636c 6173 733d 226b e(struct soa │ │ │ │ -001be8c0: 703c 2f61 3e20 2a3c 6120 636c 6173 733d p *so │ │ │ │ -001be8f0: 6170 3c2f 613e 2c20 3c2f 6469 763e 0a3c ap,
    .< │ │ │ │ -001be900: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001be910: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch │ │ │ │ -001be950: 6172 3c2f 7370 616e 3e20 2a4d 6573 7361 ar *Messa │ │ │ │ -001be960: 6765 4944 2c20 3c2f 6469 763e 0a3c 6469 geID,
    .< │ │ │ │ -001be980: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001be990: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ -001be9c0: 3c2f 7370 616e 3e20 2a52 6570 6c79 546f *ReplyTo │ │ │ │ -001be9d0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *Types, .
    const │ │ │ │ -001bea70: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *S │ │ │ │ -001beaa0: 636f 7065 732c 203c 2f64 6976 3e0a 3c64 copes,
    . │ │ │ │ -001beac0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ -001beb00: 723c 2f73 7061 6e3e 202a 4d61 7463 6842 r *MatchB │ │ │ │ -001beb10: 792c 203c 2f64 6976 3e0a 3c64 6976 2063 y,
    .
    struct │ │ │ │ -001beb50: 7773 6464 5f5f 5072 6f62 654d 6174 6368 wsdd__ProbeMatch │ │ │ │ -001beb60: 6573 5479 7065 202a 5072 6f62 654d 6174 esType *ProbeMat │ │ │ │ -001beb70: 6368 6573 293c 2f64 6976 3e0a 3c2f 6469 ches)
    .
    void │ │ │ │ -001bebe0: 2077 7364 645f 6576 656e 745f 5072 6f62 wsdd_event_Prob │ │ │ │ -001bebf0: 654d 6174 6368 6573 283c 7370 616e 2063 eMatches(s │ │ │ │ -001bec10: 7472 7563 743c 2f73 7061 6e3e 203c 6120 truct soap *soap, < │ │ │ │ -001bec80: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int< │ │ │ │ -001bece0: 2f73 7061 6e3e 2049 6e73 7461 6e63 6549 /span> InstanceI │ │ │ │ -001becf0: 642c 203c 2f64 6976 3e0a 3c64 6976 2063 d,
    .
    const < │ │ │ │ -001bed30: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001bed40: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *SequenceId │ │ │ │ -001bed60: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    unsigned i │ │ │ │ -001bedc0: 6e74 3c2f 7370 616e 3e20 4d65 7373 6167 nt Messag │ │ │ │ -001bedd0: 654e 756d 6265 722c 203c 2f64 6976 3e0a eNumber,
    . │ │ │ │ -001bede0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c │ │ │ │ -001bee30: 6861 723c 2f73 7061 6e3e 202a 4d65 7373 har *Mess │ │ │ │ -001bee40: 6167 6549 442c 203c 2f64 6976 3e0a 3c64 ageID,
    . │ │ │ │ -001bee60: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ -001beea0: 723c 2f73 7061 6e3e 202a 5265 6c61 7465 r *Relate │ │ │ │ -001beeb0: 7354 6f2c 203c 2f64 6976 3e0a 3c64 6976 sTo,
    .
    struct wsdd__ProbeMat │ │ │ │ -001bef00: 6368 6573 5479 7065 202a 5072 6f62 654d chesType *ProbeM │ │ │ │ -001bef10: 6174 6368 6573 293c 2f64 6976 3e0a 3c2f atches)
    .
    soa │ │ │ │ -001bef60: 705f 7773 6464 5f6d 6f64 6520 7773 6464 p_wsdd_mode wsdd │ │ │ │ -001bef70: 5f65 7665 6e74 5f52 6573 6f6c 7665 283c _event_Resolve(< │ │ │ │ -001bef80: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001bef90: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ -001bf000: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    .
    const │ │ │ │ -001bf040: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ -001bf060: 2f73 7061 6e3e 202a 4d65 7373 6167 6549 /span> *MessageI │ │ │ │ -001bf070: 442c 203c 2f64 6976 3e0a 3c64 6976 2063 D,
    .
    const < │ │ │ │ -001bf0b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001bf0c0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *ReplyTo, < │ │ │ │ -001bf0e0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co │ │ │ │ -001bf110: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -001bf140: 202a 456e 6470 6f69 6e74 5265 6665 7265 *EndpointRefere │ │ │ │ -001bf150: 6e63 652c 203c 2f64 6976 3e0a 3c64 6976 nce,
    .
    struct wsdd__ResolveM │ │ │ │ -001bf1a0: 6174 6368 6573 5479 7065 202a 5265 736f atchesType *Reso │ │ │ │ -001bf1b0: 6c76 654d 6174 6368 6573 293c 2f64 6976 lveMatches)
    .
    . │ │ │ │ -001bf2e0: 3c73 7061 6e20 636c 6173 733d 226b 6579 unsign │ │ │ │ -001bf300: 6564 3c2f 7370 616e 3e20 3c73 7061 6e20 ed int I │ │ │ │ -001bf330: 6e73 7461 6e63 6549 642c 203c 2f64 6976 nstanceId,
    .
    const< │ │ │ │ -001bf370: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Se │ │ │ │ -001bf3a0: 7175 656e 6365 4964 2c20 3c2f 6469 763e quenceId,
    │ │ │ │ -001bf3b0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    uns │ │ │ │ -001bf3e0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int MessageNumber, │ │ │ │ -001bf420: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ -001bf450: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *MessageID, < │ │ │ │ -001bf490: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co │ │ │ │ -001bf4c0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ -001bf4f0: 202a 5265 6c61 7465 7354 6f2c 203c 2f64 *RelatesTo, .
    cons │ │ │ │ -001bf530: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ -001bf560: 456e 6470 6f69 6e74 5265 6665 7265 6e63 EndpointReferenc │ │ │ │ -001bf570: 652c 203c 2f64 6976 3e0a 3c64 6976 2063 e,
    .
    const < │ │ │ │ -001bf5b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ -001bf5c0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *Types, .
    cons │ │ │ │ -001bf610: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ -001bf640: 5363 6f70 6573 2c20 3c2f 6469 763e 0a3c Scopes,
    .< │ │ │ │ -001bf650: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ -001bf660: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch │ │ │ │ -001bf6a0: 6172 3c2f 7370 616e 3e20 2a4d 6174 6368 ar *Match │ │ │ │ -001bf6b0: 4279 2c20 3c2f 6469 763e 0a3c 6469 7620 By,
    .
    const │ │ │ │ -001bf6f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 char *XAddrs, < │ │ │ │ -001bf720: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    unsigned int< │ │ │ │ -001bf780: 2f73 7061 6e3e 204d 6574 6164 6174 6156 /span> MetadataV │ │ │ │ -001bf790: 6572 7369 6f6e 293c 2f64 6976 3e0a 3c2f ersion)
    .

    These ev │ │ │ │ -001bf7c0: 656e 7420 6861 6e64 6c65 7273 2077 696c ent handlers wil │ │ │ │ -001bf7d0: 6c20 6265 2069 6e76 6f6b 6564 2077 6865 l be invoked whe │ │ │ │ -001bf7e0: 6e20 696e 626f 756e 6420 5753 2d44 6973 n inbound WS-Dis │ │ │ │ -001bf7f0: 636f 7665 7279 206d 6573 7361 6765 7320 covery messages │ │ │ │ -001bf800: 6172 7269 7665 2075 7369 6e67 3a3c 2f70 arrive using:

    .
    if (! │ │ │ │ -001bf860: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap_valid_soc │ │ │ │ -001bf8c0: 6b65 743c 2f61 3e28 3c61 2063 6c61 7373 ket(soap_bin │ │ │ │ -001bf920: 643c 2f61 3e28 3c61 2063 6c61 7373 3d22 d(soa │ │ │ │ -001bf950: 703c 2f61 3e2c 204e 554c 4c2c 203c 6120 p, NULL, port, │ │ │ │ -001bf9b0: 4241 434b 4c4f 4729 2929 203c 2f64 6976 BACKLOG)))
    .
    ... │ │ │ │ -001bf9f0: 2f2f 2065 7272 6f72 203c 2f73 7061 6e3e // error │ │ │ │ -001bfa00: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    if (so │ │ │ │ -001bfa40: 6170 5f77 7364 645f 6c69 7374 656e 283c ap_wsdd_listen(< │ │ │ │ -001bfa50: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ -001bfa60: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ -001bfa70: 6874 6d6c 223e 736f 6170 3c2f 613e 2c20 html">soap, │ │ │ │ -001bfa80: 7469 6d65 6f75 7429 2920 3c2f 6469 763e timeout))
    │ │ │ │ -001bfa90: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... / │ │ │ │ -001bfac0: 2f20 6572 726f 723c 2f73 7061 6e3e 3c2f / error.

    w │ │ │ │ -001bfaf0: 6869 6368 2077 696c 6c20 6c69 7374 656e hich will listen │ │ │ │ -001bfb00: 2066 6f72 203c 636f 6465 3e74 696d 656f for timeo │ │ │ │ -001bfb10: 7574 3c2f 636f 6465 3e20 7365 636f 6e64 ut second │ │ │ │ -001bfb20: 7320 746f 2069 6e62 6f75 6e64 2057 532d s to inbound WS- │ │ │ │ -001bfb30: 4469 7363 6f76 6572 7920 6d65 7373 6167 Discovery messag │ │ │ │ -001bfb40: 6573 206f 6e20 6120 706f 7274 2061 6e64 es on a port and │ │ │ │ -001bfb50: 2064 6973 7061 7463 6865 7320 7468 656d dispatches them │ │ │ │ -001bfb60: 2074 6f20 7468 6520 6576 656e 7420 6861 to the event ha │ │ │ │ -001bfb70: 6e64 6c65 7273 2e20 4120 6e65 6761 7469 ndlers. A negati │ │ │ │ -001bfb80: 7665 203c 636f 6465 3e74 696d 656f 7574 ve timeout │ │ │ │ -001bfb90: 3c2f 636f 6465 3e20 7661 6c75 6520 7370 value sp │ │ │ │ -001bfba0: 6563 6966 6965 7320 7468 6520 7469 6d65 ecifies the time │ │ │ │ -001bfbb0: 6f75 7420 696e 206d 6963 726f 7365 636f out in microseco │ │ │ │ -001bfbc0: 6e64 732e 3c2f 703e 0a3c 703e 466f 7220 nds.

    .

    For │ │ │ │ -001bfbd0: 6d6f 7265 2064 6574 6169 6c73 2c20 7365 more details, se │ │ │ │ -001bfbe0: 6520 7468 6520 3c61 2068 7265 663d 222e e the WS-D │ │ │ │ -001bfc10: 6973 636f 7665 7279 2070 6c75 6769 6e3c iscovery plugin< │ │ │ │ -001bfc20: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio │ │ │ │ -001bfc30: 6e2e 3c2f 703e 0a3c 6831 3e3c 6120 636c n.

    .

    │ │ │ │ -001bfc60: 0a43 6f70 7972 6967 6874 3c2f 6831 3e0a .Copyright

    . │ │ │ │ -001bfc70: 3c70 3e3c 656d 3e43 6f70 7972 6967 6874

    Copyright │ │ │ │ -001bfc80: 2028 6329 2032 3030 302d 3230 3230 2c20 (c) 2000-2020, │ │ │ │ -001bfc90: 526f 6265 7274 2041 2e20 7661 6e20 456e Robert A. van En │ │ │ │ -001bfca0: 6765 6c65 6e2c 2047 656e 6976 6961 2049 gelen, Genivia I │ │ │ │ -001bfcb0: 6e63 2e3c 6272 2020 2f3e 0a41 6c6c 2072 nc.
    .All r │ │ │ │ -001bfcc0: 6967 6874 7320 7265 7365 7276 6564 2e3c ights reserved.< │ │ │ │ -001bfcd0: 2f65 6d3e 203c 2f70 3e0a 3c2f 6469 763e /em>

    .
    │ │ │ │ -001bfce0: 3c2f 6469 763e 3c21 2d2d 2050 6167 6544
    .
    .< │ │ │ │ -001bfd10: 2f64 6976 3e3c 212d 2d20 646f 632d 636f /div>.
    ..Copyright │ │ │ │ -001bfd60: 2028 4329 2032 3032 312c 2052 6f62 6572 (C) 2021, Rober │ │ │ │ -001bfd70: 7420 7661 6e20 456e 6765 6c65 6e2c 2047 t van Engelen, G │ │ │ │ -001bfd80: 656e 6976 6961 2049 6e63 2e2c 2041 6c6c enivia Inc., All │ │ │ │ -001bfd90: 2052 6967 6874 7320 5265 7365 7276 6564 Rights Reserved │ │ │ │ -001bfda0: 2e0a 3c2f 6164 6472 6573 733e 0a3c 6164 ....Con │ │ │ │ -001bfdd0: 7665 7274 6564 206f 6e20 4d6f 6e20 4d61 verted on Mon Ma │ │ │ │ -001bfde0: 7220 3820 3230 3231 2031 333a 3036 3a32 r 8 2021 13:06:2 │ │ │ │ -001bfdf0: 3320 6279 203c 6120 7461 7267 6574 3d22 3 by Doxygen 1.9 │ │ │ │ -001bfe40: 2e31 3c2f 736d 616c 6c3e 3c2f 6164 6472 .1.
    .
    ... │ │ │ │ +001bb970: 3d22 6c69 6e65 223e 2020 3c73 7061 6e20 ="line"> if (< │ │ │ │ +001bb9a0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001bb9b0: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001bb9c0: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ +001bb9d0: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;user │ │ │ │ +001bba20: 6964 3c2f 613e 2026 616d 703b 2661 6d70 id && │ │ │ │ +001bba30: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap->p │ │ │ │ +001bbab0: 6173 7377 643c 2f61 3e29 203c 7370 616e asswd) // client used │ │ │ │ +001bbae0: 6261 7369 6320 6175 7468 656e 7469 6361 basic authentica │ │ │ │ +001bbaf0: 7469 6f6e 203c 2f73 7061 6e3e 3c2f 6469 tion .
    {
    .< │ │ │ │ +001bbb20: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001bbb30: 3e20 2020 203c 7370 616e 2063 6c61 7373 > // ma │ │ │ │ +001bbb50: 7920 6465 6369 6465 206e 6f74 2074 6f20 y decide not to │ │ │ │ +001bbb60: 6861 6e64 6c65 2c20 6275 7420 6966 206f handle, but if o │ │ │ │ +001bbb70: 6b20 7468 656e 2067 6f20 6168 6561 6420 k then go ahead │ │ │ │ +001bbb80: 616e 6420 636f 6d70 6172 6520 696e 666f and compare info │ │ │ │ +001bbb90: 3a20 3c2f 7370 616e 3e3c 2f64 6976 3e0a :
    . │ │ │ │ +001bbba0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    │ │ │ │ +001bbbd0: 6966 3c2f 7370 616e 3e20 2821 7374 7263 if (!strc │ │ │ │ +001bbbe0: 6d70 283c 6120 636c 6173 733d 2263 6f64 mp(soap-> │ │ │ │ +001bbc60: 7573 6572 6964 3c2f 613e 2c20 3c61 2063 userid, userid) │ │ │ │ +001bbcc0: 2026 616d 703b 2661 6d70 3b20 2173 7472 && !str │ │ │ │ +001bbcd0: 636d 7028 3c61 2063 6c61 7373 3d22 636f cmp(soap< │ │ │ │ +001bbd00: 2f61 3e2d 2667 743b 3c61 2063 6c61 7373 /a>->passwd, passwd │ │ │ │ +001bbdb0: 2929 203c 2f64 6976 3e0a 3c64 6976 2063 ))
    .
    │ │ │ │ +001bbdd0: 7b3c 2f64 6976 3e0a 3c64 6976 2063 6c61 {
    .
    │ │ │ │ +001bbdf0: 2e2e 2e20 3c73 7061 6e20 636c 6173 733d ... // han │ │ │ │ +001bbe10: 646c 6520 7265 7175 6573 743c 2f73 7061 dle request
    .
    │ │ │ │ +001bbe40: 203c 7370 616e 2063 6c61 7373 3d22 6b65 retur │ │ │ │ +001bbe60: 6e3c 2f73 7061 6e3e 203c 6120 636c 6173 n SOA │ │ │ │ +001bbec0: 505f 4f4b 3c2f 613e 3b20 3c2f 6469 763e P_OK;
    │ │ │ │ +001bbed0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    }
    . │ │ │ │ +001bbef0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    }
    . │ │ │ │ +001bbf20: 203c 7370 616e 2063 6c61 7373 3d22 6b65 else< │ │ │ │ +001bbf40: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> if (soap-> │ │ │ │ +001bbfa0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 authrea │ │ │ │ +001bbff0: 6c6d 3c2f 613e 2026 616d 703b 2661 6d70 lm && │ │ │ │ +001bc000: 3b20 3c61 2063 6c61 7373 3d22 636f 6465 ; soap->u │ │ │ │ +001bc080: 7365 7269 643c 2f61 3e29 203c 7370 616e serid) // Digest authe │ │ │ │ +001bc0b0: 6e74 6963 6174 696f 6e20 3c2f 7370 616e ntication
    .
    {.
    passwd = │ │ │ │ +001bc150: 2e2e 2e3b 203c 7370 616e 2063 6c61 7373 ...; // da │ │ │ │ +001bc170: 7461 6261 7365 206c 6f6f 6b75 7020 6f6e tabase lookup on │ │ │ │ +001bc180: 2075 7365 7269 6420 616e 6420 6175 7468 userid and auth │ │ │ │ +001bc190: 7265 616c 6d20 746f 2066 696e 6420 7061 realm to find pa │ │ │ │ +001bc1a0: 7373 7764 203c 2f73 7061 6e3e 3c2f 6469 sswd .
    if (!s │ │ │ │ +001bc1f0: 7472 636d 7028 3c61 2063 6c61 7373 3d22 trcmp(soa │ │ │ │ +001bc220: 703c 2f61 3e2d 2667 743b 3c61 2063 6c61 p->authrealm │ │ │ │ +001bc280: 2c20 3c61 2063 6c61 7373 3d22 636f 6465 , authr │ │ │ │ +001bc2d0: 6561 6c6d 3c2f 613e 2920 2661 6d70 3b26 ealm) && │ │ │ │ +001bc2e0: 616d 703b 2021 7374 7263 6d70 283c 6120 amp; !strcmp(soap-> │ │ │ │ +001bc320: 3b3c 6120 636c 6173 733d 2263 6f64 6522 ;userid │ │ │ │ +001bc370: 3c2f 613e 2c20 3c61 2063 6c61 7373 3d22 , u │ │ │ │ +001bc3c0: 7365 7269 643c 2f61 3e29 2920 3c2f 6469 serid)) .
    {
    │ │ │ │ +001bc3f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    if (!h │ │ │ │ +001bc430: 7474 705f 6461 5f76 6572 6966 795f 706f ttp_da_verify_po │ │ │ │ +001bc440: 7374 283c 6120 636c 6173 733d 2263 6f64 st(soap, pas │ │ │ │ +001bc4c0: 7377 643c 2f61 3e29 2920 3c2f 6469 763e swd))
    │ │ │ │ +001bc4d0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    {
    │ │ │ │ +001bc4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    ... < │ │ │ │ +001bc510: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001bc520: 656e 7422 3e2f 2f20 6861 6e64 6c65 2072 ent">// handle r │ │ │ │ +001bc530: 6571 7565 7374 3c2f 7370 616e 3e3c 2f64 equest.. │ │ │ │ +001bc600: 2020 2020 2020 7d20 3c2f 6469 763e 0a3c }
    .< │ │ │ │ +001bc610: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001bc620: 3e20 2020 207d 203c 2f64 6976 3e0a 3c64 > }
    . │ │ │ │ +001bc640: 2020 7d20 3c2f 6469 763e 0a3c 6469 7620 }
    .
    < │ │ │ │ +001bc660: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001bc670: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001bc680: 6874 6d6c 223e 736f 6170 3c2f 613e 2d26 html">soap-& │ │ │ │ +001bc690: 6774 3b3c 6120 636c 6173 733d 2263 6f64 gt;auth │ │ │ │ +001bc6e0: 7265 616c 6d3c 2f61 3e20 3d20 3c61 2063 realm = authrealm; // set │ │ │ │ +001bc760: 2072 6561 6c6d 2066 6f72 2063 6861 6c6c realm for chall │ │ │ │ +001bc770: 656e 6765 203c 2f73 7061 6e3e 3c2f 6469 enge .
    return 4 │ │ │ │ +001bc7c0: 3031 3b20 3c73 7061 6e20 636c 6173 733d 01; // Not │ │ │ │ +001bc7e0: 2061 7574 686f 7269 7a65 642c 2063 6861 authorized, cha │ │ │ │ +001bc7f0: 6c6c 656e 6765 2064 6967 6573 7420 6175 llenge digest au │ │ │ │ +001bc800: 7468 656e 7469 6361 7469 6f6e 203c 2f73 thentication
    .
    }.

    F │ │ │ │ +001bc850: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ │ +001bc860: 2069 6e63 6c75 6469 6e67 2068 6f77 2074 including how t │ │ │ │ +001bc870: 6f20 636f 6e66 6967 7572 6520 4854 5450 o configure HTTP │ │ │ │ +001bc880: 2044 6967 6573 7420 6175 7468 656e 7469 Digest authenti │ │ │ │ +001bc890: 6361 7469 6f6e 2066 6f72 2070 726f 7869 cation for proxi │ │ │ │ +001bc8a0: 6573 2c20 7365 6520 7468 6520 3c61 2068 es, see the HTTP digest │ │ │ │ +001bc8e0: 6175 7468 656e 7469 6361 7469 6f6e 2070 authentication p │ │ │ │ +001bc8f0: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume │ │ │ │ +001bc900: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

    .

    │ │ │ │ +001bc910: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +001bc930: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    .The HTTP sessi │ │ │ │ +001bc980: 6f6e 7320 706c 7567 696e 3c2f 6833 3e0a ons plugin

    . │ │ │ │ +001bc990: 3c70 3e54 6865 2070 6c75 6769 6e20 636f

    The plugin co │ │ │ │ +001bc9a0: 6465 2069 7320 6c6f 6361 7465 6420 696e de is located in │ │ │ │ +001bc9b0: 2074 6865 203c 656d 3e3c 636f 6465 3e67 the g │ │ │ │ +001bc9c0: 736f 6170 2f70 6c75 6769 6e3c 2f63 6f64 soap/plugin director │ │ │ │ +001bc9e0: 7920 636f 6e74 6169 6e69 6e67 203c 656d y containing sessions. │ │ │ │ +001bca00: 683c 2f63 6f64 653e 3c2f 656d 3e20 616e h an │ │ │ │ +001bca10: 6420 3c65 6d3e 3c63 6f64 653e 7365 7373 d sess │ │ │ │ +001bca20: 696f 6e73 2e63 3c2f 636f 6465 3e3c 2f65 ions.c.

    .

    For m │ │ │ │ +001bca40: 6f72 6520 6465 7461 696c 732c 2073 6565 ore details, see │ │ │ │ +001bca50: 2074 6865 203c 6120 6872 6566 3d22 2e2e the HT │ │ │ │ +001bca80: 5450 2073 6573 7369 6f6e 7320 706c 7567 TP sessions plug │ │ │ │ +001bca90: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta │ │ │ │ +001bcaa0: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

    ... │ │ │ │ +001bcab0: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ +001bcac0: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ +001bcad0: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ +001bcae0: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .The │ │ │ │ +001bcb10: 2041 7061 6368 6520 6d6f 6475 6c65 2070 Apache module p │ │ │ │ +001bcb20: 6c75 6769 6e3c 2f68 333e 0a3c 703e 5468 lugin

    .

    Th │ │ │ │ +001bcb30: 6520 706c 7567 696e 2063 6f64 6520 6973 e plugin code is │ │ │ │ +001bcb40: 206c 6f63 6174 6564 2069 6e20 7468 6520 located in the │ │ │ │ +001bcb50: 3c65 6d3e 3c63 6f64 653e 6773 6f61 702f gsoap/ │ │ │ │ +001bcb60: 6d6f 645f 6773 6f61 702f 6d6f 645f 6773 mod_gsoap/mod_gs │ │ │ │ +001bcb70: 6f61 702d 302e 392f 6170 6163 6865 5f32 oap-0.9/apache_2 │ │ │ │ +001bcb80: 303c 2f63 6f64 653e 3c2f 656d 3e20 6469 0 di │ │ │ │ +001bcb90: 7265 6374 6f72 792e 3c2f 703e 0a3c 703e rectory.

    .

    │ │ │ │ +001bcba0: 466f 7220 6d6f 7265 2064 6574 6169 6c73 For more details │ │ │ │ +001bcbb0: 2c20 7365 6520 7468 6520 3c61 2068 7265 , see the Apache module documentation │ │ │ │ +001bcc00: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ +001bcc20: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ +001bcc30: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    │ │ │ │ +001bcc40: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .The ISAP │ │ │ │ +001bcc70: 4920 6578 7465 6e73 696f 6e20 706c 7567 I extension plug │ │ │ │ +001bcc80: 696e 3c2f 6833 3e0a 3c70 3e54 6865 2070 in

    .

    The p │ │ │ │ +001bcc90: 6c75 6769 6e20 636f 6465 2069 7320 6c6f lugin code is lo │ │ │ │ +001bcca0: 6361 7465 6420 696e 2074 6865 203c 656d cated in the gsoap/mod │ │ │ │ +001bccc0: 5f67 736f 6170 2f67 736f 6170 5f77 696e _gsoap/gsoap_win │ │ │ │ +001bccd0: 2f69 7361 7069 3c2f 636f 6465 3e3c 2f65 /isapi directory.

    .

    For more de │ │ │ │ +001bcd00: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the < │ │ │ │ +001bcd10: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 6973 a href="../../is │ │ │ │ +001bcd20: 6170 692f 6874 6d6c 2f69 6e64 6578 2e68 api/html/index.h │ │ │ │ +001bcd30: 746d 6c22 3e49 5341 5049 2065 7874 656e tml">ISAPI exten │ │ │ │ +001bcd40: 7369 6f6e 3c2f 613e 2064 6f63 756d 656e sion documen │ │ │ │ +001bcd50: 7461 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 tation.

    .

    . │ │ │ │ +001bcd60: 9f94 9d20 3c61 2068 7265 663d 2223 223e ... │ │ │ │ +001bcd70: 4261 636b 2074 6f20 7461 626c 6520 6f66 Back to table of │ │ │ │ +001bcd80: 2063 6f6e 7465 6e74 733c 2f61 3e3c 2f70 contents

    .

    .The │ │ │ │ +001bcdc0: 2043 5552 4c20 706c 7567 696e 3c2f 6833 CURL plugin

    .

    The plugin │ │ │ │ +001bcde0: 636f 6465 2069 7320 6c6f 6361 7465 6420 code is located │ │ │ │ +001bcdf0: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/plugin direct │ │ │ │ +001bce20: 6f72 7920 636f 6e74 6169 6e69 6e67 203c ory containing < │ │ │ │ +001bce30: 656d 3e3c 636f 6465 3e63 7572 6c61 7069 em>curlapi │ │ │ │ +001bce40: 2e68 3c2f 636f 6465 3e3c 2f65 6d3e 2061 .h a │ │ │ │ +001bce50: 6e64 203c 656d 3e3c 636f 6465 3e63 7572 nd cur │ │ │ │ +001bce60: 6c61 7069 2e63 3c2f 636f 6465 3e3c 2f65 lapi.c.

    .

    For m │ │ │ │ +001bce80: 6f72 6520 6465 7461 696c 732c 2073 6565 ore details, see │ │ │ │ +001bce90: 2074 6865 203c 6120 6872 6566 3d22 2e2e the CURL p │ │ │ │ +001bcec0: 6c75 6769 6e3c 2f61 3e20 646f 6375 6d65 lugin docume │ │ │ │ +001bced0: 6e74 6174 696f 6e2e 3c2f 703e 0a3c 703e ntation.

    .

    │ │ │ │ +001bcee0: f09f 949d 203c 6120 6872 6566 3d22 2322 .... Back to table o │ │ │ │ +001bcf00: 6620 636f 6e74 656e 7473 3c2f 613e 3c2f f contents.

    │ │ │ │ +001bcf40: 0a54 6865 2057 696e 496e 6574 2070 6c75 .The WinInet plu │ │ │ │ +001bcf50: 6769 6e3c 2f68 333e 0a3c 703e 5468 6520 gin

    .

    The │ │ │ │ +001bcf60: 706c 7567 696e 2063 6f64 6520 6973 206c plugin code is l │ │ │ │ +001bcf70: 6f63 6174 6564 2069 6e20 7468 6520 3c65 ocated in the gsoap/mo │ │ │ │ +001bcf90: 645f 6773 6f61 702f 6773 6f61 705f 7769 d_gsoap/gsoap_wi │ │ │ │ +001bcfa0: 6e2f 7769 6e69 6e65 743c 2f63 6f64 653e n/wininet │ │ │ │ +001bcfb0: 3c2f 656d 3e20 6469 7265 6374 6f72 792e directory. │ │ │ │ +001bcfc0: 3c2f 703e 0a3c 703e 466f 7220 6d6f 7265

    .

    For more │ │ │ │ +001bcfd0: 2064 6574 6169 6c73 2c20 7365 6520 7468 details, see th │ │ │ │ +001bcfe0: 6520 3c61 2068 7265 663d 222e 2e2f 2e2e e WinIne │ │ │ │ +001bd010: 7420 706c 7567 696e 3c2f 613e 2064 6f63 t plugin doc │ │ │ │ +001bd020: 756d 656e 7461 7469 6f6e 2e3c 2f70 3e0a umentation.

    . │ │ │ │ +001bd030: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ +001bd050: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    . │ │ │ │ +001bd090: 5468 6520 5753 2d41 6464 7265 7373 696e The WS-Addressin │ │ │ │ +001bd0a0: 6720 706c 7567 696e 3c2f 6833 3e0a 3c70 g plugin

    .

    The plugin code │ │ │ │ +001bd0c0: 2069 7320 6c6f 6361 7465 6420 696e 2074 is located in t │ │ │ │ +001bd0d0: 6865 203c 656d 3e3c 636f 6465 3e67 736f he gso │ │ │ │ +001bd0e0: 6170 2f70 6c75 6769 6e3c 2f63 6f64 653e ap/plugin │ │ │ │ +001bd0f0: 3c2f 656d 3e20 6469 7265 6374 6f72 7920 directory │ │ │ │ +001bd100: 636f 6e74 6169 6e69 6e67 203c 656d 3e3c containing < │ │ │ │ +001bd110: 636f 6465 3e77 7361 6170 692e 683c 2f63 code>wsaapi.h and wsaapi.c │ │ │ │ +001bd140: 3c2f 636f 6465 3e3c 2f65 6d3e 2028 746f (to │ │ │ │ +001bd150: 2062 6520 7573 6564 2069 6e20 4320 616e be used in C an │ │ │ │ +001bd160: 6420 432b 2b29 2e3c 2f70 3e0a 3c70 3e54 d C++).

    .

    T │ │ │ │ +001bd170: 6f20 656e 6162 6c65 2057 532d 4164 6472 o enable WS-Addr │ │ │ │ +001bd180: 6573 7369 6e67 2032 3030 3520 2861 6e64 essing 2005 (and │ │ │ │ +001bd190: 2073 7570 706f 7274 2066 6f72 2038 2f32 support for 8/2 │ │ │ │ +001bd1a0: 3030 3429 2c20 7468 6520 7365 7276 6963 004), the servic │ │ │ │ +001bd1b0: 6520 6465 6669 6e69 7469 6f6e 7320 6865 e definitions he │ │ │ │ +001bd1c0: 6164 6572 2066 696c 6520 666f 7220 736f ader file for so │ │ │ │ +001bd1d0: 6170 6370 7032 2073 686f 756c 6420 696e apcpp2 should in │ │ │ │ +001bd1e0: 636c 7564 6520 7468 6520 666f 6c6c 6f77 clude the follow │ │ │ │ +001bd1f0: 696e 6720 696d 706f 7274 733a 3c2f 703e ing imports:

    │ │ │ │ +001bd200: 0a3c 6469 7620 636c 6173 733d 2266 7261 .
    #import &quo │ │ │ │ +001bd250: 743b 696d 706f 7274 2f77 7361 352e 6826 t;import/wsa5.h& │ │ │ │ +001bd260: 7175 6f74 3b3c 2f73 7061 6e3e 3c2f 6469 quot;.

    Thi │ │ │ │ +001bd290: 7320 696d 706f 7274 7320 7468 6520 534f s imports the SO │ │ │ │ +001bd2a0: 4150 2068 6561 6465 7220 656c 656d 656e AP header elemen │ │ │ │ +001bd2b0: 7473 2072 6571 7569 7265 6420 6279 2057 ts required by W │ │ │ │ +001bd2c0: 532d 4164 6472 6573 7369 6e67 2e3c 2f70 S-Addressing.

    .

    For more de │ │ │ │ +001bd2e0: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the < │ │ │ │ +001bd2f0: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7773 a href="../../ws │ │ │ │ +001bd300: 612f 6874 6d6c 2f77 7361 5f30 2e68 746d a/html/wsa_0.htm │ │ │ │ +001bd310: 6c22 3e57 532d 4164 6472 6573 7369 6e67 l">WS-Addressing │ │ │ │ +001bd320: 2070 6c75 6769 6e3c 2f61 3e20 646f 6375 plugin docu │ │ │ │ +001bd330: 6d65 6e74 6174 696f 6e2e 3c2f 703e 0a3c mentation.

    .< │ │ │ │ +001bd340: 703e f09f 949d 203c 6120 6872 6566 3d22 p>.... Back to table │ │ │ │ +001bd360: 206f 6620 636f 6e74 656e 7473 3c2f 613e of contents │ │ │ │ +001bd370: 3c2f 703e 0a3c 6833 3e3c 6120 636c 6173

    .

    . │ │ │ │ +001bd3a0: 5468 6520 5753 2d52 656c 6961 626c 654d The WS-ReliableM │ │ │ │ +001bd3b0: 6573 7361 6769 6e67 2070 6c75 6769 6e3c essaging plugin< │ │ │ │ +001bd3c0: 2f68 333e 0a3c 703e 5468 6520 706c 7567 /h3>.

    The plug │ │ │ │ +001bd3d0: 696e 2063 6f64 6520 6973 206c 6f63 6174 in code is locat │ │ │ │ +001bd3e0: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the gsoap/plugin │ │ │ │ +001bd400: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir │ │ │ │ +001bd410: 6563 746f 7279 2063 6f6e 7461 696e 696e ectory containin │ │ │ │ +001bd420: 6720 3c65 6d3e 3c63 6f64 653e 7773 726d g wsrm │ │ │ │ +001bd430: 6170 692e 683c 2f63 6f64 653e 3c2f 656d api.h and │ │ │ │ +001bd450: 7773 726d 6170 692e 633c 2f63 6f64 653e wsrmapi.c │ │ │ │ +001bd460: 3c2f 656d 3e20 2874 6f20 6265 2075 7365 (to be use │ │ │ │ +001bd470: 6420 696e 2043 2061 6e64 2043 2b2b 292e d in C and C++). │ │ │ │ +001bd480: 3c2f 703e 0a3c 703e 416c 736f 206e 6565

    .

    Also nee │ │ │ │ +001bd490: 6465 6420 6172 6520 3c65 6d3e 3c63 6f64 ded are threads.h and │ │ │ │ +001bd4c0: 3c63 6f64 653e 7468 7265 6164 732e 633c threads.c< │ │ │ │ +001bd4d0: 2f63 6f64 653e 3c2f 656d 3e20 666f 7220 /code> for │ │ │ │ +001bd4e0: 6d75 6c74 692d 7468 7265 6164 696e 6720 multi-threading │ │ │ │ +001bd4f0: 616e 6420 6c6f 636b 696e 6720 7375 7070 and locking supp │ │ │ │ +001bd500: 6f72 742e 3c2f 703e 0a3c 703e 546f 2065 ort.

    .

    To e │ │ │ │ +001bd510: 6e61 626c 6520 5753 2d52 656c 6961 626c nable WS-Reliabl │ │ │ │ +001bd520: 654d 6573 7361 6769 6e67 2c20 7468 6520 eMessaging, the │ │ │ │ +001bd530: 7365 7276 6963 6520 6465 6669 6e69 7469 service definiti │ │ │ │ +001bd540: 6f6e 7320 6865 6164 6572 2066 696c 6520 ons header file │ │ │ │ +001bd550: 666f 7220 736f 6170 6370 7032 2073 686f for soapcpp2 sho │ │ │ │ +001bd560: 756c 6420 696e 636c 7564 6520 7468 6520 uld include the │ │ │ │ +001bd570: 666f 6c6c 6f77 696e 6720 696d 706f 7274 following import │ │ │ │ +001bd580: 733a 3c2f 703e 0a3c 6469 7620 636c 6173 s:

    .
    < │ │ │ │ +001bd5b0: 7370 616e 2063 6c61 7373 3d22 7072 6570 span class="prep │ │ │ │ +001bd5c0: 726f 6365 7373 6f72 223e 2369 6d70 6f72 rocessor">#impor │ │ │ │ +001bd5d0: 7420 2671 756f 743b 696d 706f 7274 2f77 t "import/w │ │ │ │ +001bd5e0: 7372 6d2e 6826 7175 6f74 3b3c 2f73 7061 srm.h"
    .
    #import & │ │ │ │ +001bd630: 7175 6f74 3b69 6d70 6f72 742f 7773 6135 quot;import/wsa5 │ │ │ │ +001bd640: 2e68 2671 756f 743b 3c2f 7370 616e 3e3c .h"< │ │ │ │ +001bd650: 2f64 6976 3e0a 3c2f 6469 763e 3c21 2d2d /div>.

    │ │ │ │ +001bd670: 5468 6973 2069 6d70 6f72 7473 2074 6865 This imports the │ │ │ │ +001bd680: 2053 4f41 5020 6865 6164 6572 2065 6c65 SOAP header ele │ │ │ │ +001bd690: 6d65 6e74 7320 7265 7175 6972 6564 2062 ments required b │ │ │ │ +001bd6a0: 7920 5753 2d52 656c 6961 626c 654d 6573 y WS-ReliableMes │ │ │ │ +001bd6b0: 7361 6769 6e67 2e3c 2f70 3e0a 3c70 3e46 saging.

    .

    F │ │ │ │ +001bd6c0: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ │ +001bd6d0: 2073 6565 2074 6865 203c 6120 6872 6566 see the W │ │ │ │ +001bd700: 532d 5265 6c69 6162 6c65 4d65 7373 6167 S-ReliableMessag │ │ │ │ +001bd710: 696e 6720 706c 7567 696e 3c2f 613e 2064 ing plugin d │ │ │ │ +001bd720: 6f63 756d 656e 7461 7469 6f6e 2e3c 2f70 ocumentation.

    .

    .... Back to ta │ │ │ │ +001bd750: 626c 6520 6f66 2063 6f6e 7465 6e74 733c ble of contents< │ │ │ │ +001bd760: 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 2063 /a>

    .

    .The WS-Securi │ │ │ │ +001bd7a0: 7479 2070 6c75 6769 6e3c 2f68 333e 0a3c ty plugin

    .< │ │ │ │ +001bd7b0: 703e 5468 6520 706c 7567 696e 2063 6f64 p>The plugin cod │ │ │ │ +001bd7c0: 6520 6973 206c 6f63 6174 6564 2069 6e20 e is located in │ │ │ │ +001bd7d0: 7468 6520 3c65 6d3e 3c63 6f64 653e 6773 the gs │ │ │ │ +001bd7e0: 6f61 702f 706c 7567 696e 3c2f 636f 6465 oap/plugin directory │ │ │ │ +001bd800: 2063 6f6e 7461 696e 696e 6720 3c65 6d3e containing │ │ │ │ +001bd810: 3c63 6f64 653e 7773 7365 6170 692e 683c wsseapi.h< │ │ │ │ +001bd820: 2f63 6f64 653e 3c2f 656d 3e20 616e 6420 /code> and │ │ │ │ +001bd830: 3c65 6d3e 3c63 6f64 653e 7773 7365 6170 wsseap │ │ │ │ +001bd840: 692e 633c 2f63 6f64 653e 3c2f 656d 3e20 i.c │ │ │ │ +001bd850: 2874 6f20 6265 2075 7365 6420 696e 2043 (to be used in C │ │ │ │ +001bd860: 2061 6e64 2043 2b2b 292e 3c2f 703e 0a3c and C++).

    .< │ │ │ │ +001bd870: 703e 416c 736f 206e 6565 6465 6420 6172 p>Also needed ar │ │ │ │ +001bd880: 653a 203c 656d 3e3c 636f 6465 3e73 6d64 e: smd │ │ │ │ +001bd890: 6576 702e 683c 2f63 6f64 653e 3c2f 656d evp.h and │ │ │ │ +001bd8b0: 736d 6465 7670 2e63 3c2f 636f 6465 3e3c smdevp.c< │ │ │ │ +001bd8c0: 2f65 6d3e 2066 6f72 2073 7472 6561 6d69 /em> for streami │ │ │ │ +001bd8d0: 6e67 2058 4d4c 2073 6967 6e61 7475 7265 ng XML signature │ │ │ │ +001bd8e0: 2061 6e64 206d 6573 7361 6765 2064 6967 and message dig │ │ │ │ +001bd8f0: 6573 7420 656e 6769 6e65 2c20 3c65 6d3e est engine, │ │ │ │ +001bd900: 3c63 6f64 653e 6d65 6365 7670 2e68 3c2f mecevp.h and < │ │ │ │ +001bd920: 656d 3e3c 636f 6465 3e6d 6563 6576 702e em>mecevp. │ │ │ │ +001bd930: 633c 2f63 6f64 653e 3c2f 656d 3e20 666f c fo │ │ │ │ +001bd940: 7220 7468 6520 7374 7265 616d 696e 6720 r the streaming │ │ │ │ +001bd950: 584d 4c20 656e 6372 7970 7469 6f6e 2065 XML encryption e │ │ │ │ +001bd960: 6e67 696e 652c 203c 656d 3e3c 636f 6465 ngine, threads.h and < │ │ │ │ +001bd990: 636f 6465 3e74 6872 6561 6473 2e63 3c2f code>threads.c for m │ │ │ │ +001bd9b0: 756c 7469 2d74 6872 6561 6469 6e67 2061 ulti-threading a │ │ │ │ +001bd9c0: 6e64 206c 6f63 6b69 6e67 2073 7570 706f nd locking suppo │ │ │ │ +001bd9d0: 7274 2e3c 2f70 3e0a 3c70 3e54 6f20 656e rt.

    .

    To en │ │ │ │ +001bd9e0: 6162 6c65 2057 532d 5365 6375 7269 7479 able WS-Security │ │ │ │ +001bd9f0: 2c20 7468 6520 7365 7276 6963 6520 6465 , the service de │ │ │ │ +001bda00: 6669 6e69 7469 6f6e 7320 6865 6164 6572 finitions header │ │ │ │ +001bda10: 2066 696c 6520 666f 7220 736f 6170 6370 file for soapcp │ │ │ │ +001bda20: 7032 2073 686f 756c 6420 696e 636c 7564 p2 should includ │ │ │ │ +001bda30: 6520 7468 6520 666f 6c6c 6f77 696e 6720 e the following │ │ │ │ +001bda40: 696d 706f 7274 733a 3c2f 703e 0a3c 6469 imports:

    .
    │ │ │ │ +001bda90: 2369 6d70 6f72 7420 2671 756f 743b 696d #import "im │ │ │ │ +001bdaa0: 706f 7274 2f77 7373 652e 6826 7175 6f74 port/wsse.h" │ │ │ │ +001bdab0: 3b3c 2f73 7061 6e3e 3c2f 6469 763e 0a3c ;
    .< │ │ │ │ +001bdac0: 2f64 6976 3e3c 212d 2d20 6672 6167 6d65 /div>

    This im │ │ │ │ +001bdae0: 706f 7274 7320 7468 6520 534f 4150 2068 ports the SOAP h │ │ │ │ +001bdaf0: 6561 6465 7220 656c 656d 656e 7473 2072 eader elements r │ │ │ │ +001bdb00: 6571 7569 7265 6420 6279 2057 532d 5365 equired by WS-Se │ │ │ │ +001bdb10: 6375 7269 7479 2e3c 2f70 3e0a 3c70 3e46 curity.

    .

    F │ │ │ │ +001bdb20: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ │ +001bdb30: 2073 6565 2074 6865 203c 6120 6872 6566 see the WS- │ │ │ │ +001bdb60: 5365 6375 7269 7479 2070 6c75 6769 6e3c Security plugin< │ │ │ │ +001bdb70: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio │ │ │ │ +001bdb80: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

    .... < │ │ │ │ +001bdb90: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ +001bdba0: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ +001bdbb0: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    .The WS-D │ │ │ │ +001bdbf0: 6973 636f 7665 7279 2070 6c75 6769 6e3c iscovery plugin< │ │ │ │ +001bdc00: 2f68 333e 0a3c 703e 4261 7369 6361 6c6c /h3>.

    Basicall │ │ │ │ +001bdc10: 792c 2074 6f20 6164 6420 5753 2d44 6973 y, to add WS-Dis │ │ │ │ +001bdc20: 636f 7665 7279 2073 7570 706f 7274 2074 covery support t │ │ │ │ +001bdc30: 6865 2066 6f6c 6c6f 7769 6e67 2065 7665 he following eve │ │ │ │ +001bdc40: 6e74 2068 616e 646c 6572 7320 6d75 7374 nt handlers must │ │ │ │ +001bdc50: 2062 6520 6465 6669 6e65 6420 616e 6420 be defined and │ │ │ │ +001bdc60: 6c69 6e6b 6564 3a3c 2f70 3e0a 3c64 6976 linked:

    .
    vo │ │ │ │ +001bdcb0: 6964 3c2f 7370 616e 3e20 7773 6464 5f65 id wsdd_e │ │ │ │ +001bdcc0: 7665 6e74 5f48 656c 6c6f 283c 7370 616e vent_Hello(struct < │ │ │ │ +001bdcf0: 6120 636c 6173 733d 2263 6f64 6522 2068 a class="code" h │ │ │ │ +001bdd00: 7265 663d 2273 7472 7563 7473 6f61 702e ref="structsoap. │ │ │ │ +001bdd10: 6874 6d6c 223e 736f 6170 3c2f 613e 202a html">soap * │ │ │ │ +001bdd20: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap, │ │ │ │ +001bdd50: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    unsigned in │ │ │ │ +001bddb0: 743c 2f73 7061 6e3e 2049 6e73 7461 6e63 t Instanc │ │ │ │ +001bddc0: 6549 642c 203c 2f64 6976 3e0a 3c64 6976 eId,
    .
    const │ │ │ │ +001bde00: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001bde20: 2f73 7061 6e3e 202a 5365 7175 656e 6365 /span> *Sequence │ │ │ │ +001bde30: 4964 2c20 3c2f 6469 763e 0a3c 6469 7620 Id,
    .
    unsigned< │ │ │ │ +001bde70: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> int Mess │ │ │ │ +001bdea0: 6167 654e 756d 6265 722c 203c 2f64 6976 ageNumber,
    .
    const< │ │ │ │ +001bdee0: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Me │ │ │ │ +001bdf10: 7373 6167 6549 442c 203c 2f64 6976 3e0a ssageID,
    . │ │ │ │ +001bdf20: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c │ │ │ │ +001bdf70: 6861 723c 2f73 7061 6e3e 202a 5265 6c61 har *Rela │ │ │ │ +001bdf80: 7465 7354 6f2c 203c 2f64 6976 3e0a 3c64 tesTo,
    . │ │ │ │ +001bdfa0: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ +001bdfe0: 723c 2f73 7061 6e3e 202a 456e 6470 6f69 r *Endpoi │ │ │ │ +001bdff0: 6e74 5265 6665 7265 6e63 652c 203c 2f64 ntReference, .
    cons │ │ │ │ +001be030: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ +001be060: 5479 7065 732c 203c 2f64 6976 3e0a 3c64 Types,
    . │ │ │ │ +001be080: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ +001be0c0: 723c 2f73 7061 6e3e 202a 5363 6f70 6573 r *Scopes │ │ │ │ +001be0d0: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *MatchBy, .
    con │ │ │ │ +001be170: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +001be1a0: 2a58 4164 6472 732c 203c 2f64 6976 3e0a *XAddrs,
    . │ │ │ │ +001be1b0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    unsi │ │ │ │ +001be1e0: 676e 6564 3c2f 7370 616e 3e20 3c73 7061 gned int │ │ │ │ +001be210: 204d 6574 6164 6174 6156 6572 7369 6f6e MetadataVersion │ │ │ │ +001be220: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
    .
    < │ │ │ │ +001be240: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +001be250: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    void wsd │ │ │ │ +001be290: 645f 6576 656e 745f 4279 6528 3c73 7061 d_event_Bye(struct │ │ │ │ +001be2c0: 3c61 2063 6c61 7373 3d22 636f 6465 2220 soap │ │ │ │ +001be2f0: 2a3c 6120 636c 6173 733d 2263 6f64 6522 *soap │ │ │ │ +001be320: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    unsigned i │ │ │ │ +001be380: 6e74 3c2f 7370 616e 3e20 496e 7374 616e nt Instan │ │ │ │ +001be390: 6365 4964 2c20 3c2f 6469 763e 0a3c 6469 ceId,
    .< │ │ │ │ +001be3b0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001be3c0: 6f72 6422 3e63 6f6e 7374 3c2f 7370 616e ord">const char │ │ │ │ +001be3f0: 3c2f 7370 616e 3e20 2a53 6571 7565 6e63 *Sequenc │ │ │ │ +001be400: 6549 642c 203c 2f64 6976 3e0a 3c64 6976 eId,

    .
    unsigned │ │ │ │ +001be440: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Mes │ │ │ │ +001be470: 7361 6765 4e75 6d62 6572 2c20 3c2f 6469 sageNumber, .
    const │ │ │ │ +001be4b0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *M │ │ │ │ +001be4e0: 6573 7361 6765 4944 2c20 3c2f 6469 763e essageID,
    │ │ │ │ +001be4f0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const │ │ │ │ +001be540: 6368 6172 3c2f 7370 616e 3e20 2a52 656c char *Rel │ │ │ │ +001be550: 6174 6573 546f 2c20 3c2f 6469 763e 0a3c atesTo,
    .< │ │ │ │ +001be560: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001be570: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch │ │ │ │ +001be5b0: 6172 3c2f 7370 616e 3e20 2a45 6e64 706f ar *Endpo │ │ │ │ +001be5c0: 696e 7452 6566 6572 656e 6365 2c20 3c2f intReference, .
    con │ │ │ │ +001be600: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +001be630: 2a54 7970 6573 2c20 3c2f 6469 763e 0a3c *Types,
    .< │ │ │ │ +001be640: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001be650: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch │ │ │ │ +001be690: 6172 3c2f 7370 616e 3e20 2a53 636f 7065 ar *Scope │ │ │ │ +001be6a0: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    const < │ │ │ │ +001be6e0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001be6f0: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *MatchBy, < │ │ │ │ +001be710: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co │ │ │ │ +001be740: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ +001be770: 202a 5841 6464 7273 2c20 3c2f 6469 763e *XAddrs,
    │ │ │ │ +001be780: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    uns │ │ │ │ +001be7b0: 6967 6e65 643c 2f73 7061 6e3e 203c 7370 igned int MetadataVersio │ │ │ │ +001be7f0: 6e29 3c2f 6469 763e 0a3c 2f64 6976 3e3c n)
    .
    < │ │ │ │ +001be800: 212d 2d20 6672 6167 6d65 6e74 202d 2d3e !-- fragment --> │ │ │ │ +001be810: 3c64 6976 2063 6c61 7373 3d22 6672 6167
    soap_wsd │ │ │ │ +001be840: 645f 6d6f 6465 2077 7364 645f 6576 656e d_mode wsdd_even │ │ │ │ +001be850: 745f 5072 6f62 6528 3c73 7061 6e20 636c t_Probe(st │ │ │ │ +001be870: 7275 6374 3c2f 7370 616e 3e20 3c61 2063 ruct soap *soap, .
    con │ │ │ │ +001be910: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +001be940: 2a4d 6573 7361 6765 4944 2c20 3c2f 6469 *MessageID, .
    const │ │ │ │ +001be980: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c char *R │ │ │ │ +001be9b0: 6570 6c79 546f 2c20 3c2f 6469 763e 0a3c eplyTo,
    .< │ │ │ │ +001be9c0: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001be9d0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >const ch │ │ │ │ +001bea10: 6172 3c2f 7370 616e 3e20 2a54 7970 6573 ar *Types │ │ │ │ +001bea20: 2c20 3c2f 6469 763e 0a3c 6469 7620 636c ,
    .
    const char *Scopes, .
    cons │ │ │ │ +001beac0: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ +001beaf0: 4d61 7463 6842 792c 203c 2f64 6976 3e0a MatchBy,
    . │ │ │ │ +001beb00: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    struct wsdd__Prob │ │ │ │ +001beb40: 654d 6174 6368 6573 5479 7065 202a 5072 eMatchesType *Pr │ │ │ │ +001beb50: 6f62 654d 6174 6368 6573 293c 2f64 6976 obeMatches)
    .
    < │ │ │ │ +001beb90: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001beba0: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >void< │ │ │ │ +001bebc0: 2f73 7061 6e3e 2077 7364 645f 6576 656e /span> wsdd_even │ │ │ │ +001bebd0: 745f 5072 6f62 654d 6174 6368 6573 283c t_ProbeMatches(< │ │ │ │ +001bebe0: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001bebf0: 6f72 6422 3e73 7472 7563 743c 2f73 7061 ord">struct soap *soap< │ │ │ │ +001bec60: 2f61 3e2c 203c 2f64 6976 3e0a 3c64 6976 /a>,
    .
    unsigned │ │ │ │ +001beca0: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Ins │ │ │ │ +001becd0: 7461 6e63 6549 642c 203c 2f64 6976 3e0a tanceId,
    . │ │ │ │ +001bece0: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c │ │ │ │ +001bed30: 6861 723c 2f73 7061 6e3e 202a 5365 7175 har *Sequ │ │ │ │ +001bed40: 656e 6365 4964 2c20 3c2f 6469 763e 0a3c enceId,
    .< │ │ │ │ +001bed50: 6469 7620 636c 6173 733d 226c 696e 6522 div class="line" │ │ │ │ +001bed60: 3e3c 7370 616e 2063 6c61 7373 3d22 6b65 >unsig │ │ │ │ +001bed80: 6e65 643c 2f73 7061 6e3e 203c 7370 616e ned int │ │ │ │ +001bedb0: 4d65 7373 6167 654e 756d 6265 722c 203c MessageNumber, < │ │ │ │ +001bedc0: 2f64 6976 3e0a 3c64 6976 2063 6c61 7373 /div>.
    co │ │ │ │ +001bedf0: 6e73 743c 2f73 7061 6e3e 203c 7370 616e nst char │ │ │ │ +001bee20: 202a 4d65 7373 6167 6549 442c 203c 2f64 *MessageID, .
    cons │ │ │ │ +001bee60: 743c 2f73 7061 6e3e 203c 7370 616e 2063 t char * │ │ │ │ +001bee90: 5265 6c61 7465 7354 6f2c 203c 2f64 6976 RelatesTo,
    .
    struct │ │ │ │ +001beed0: 3c2f 7370 616e 3e20 7773 6464 5f5f 5072 wsdd__Pr │ │ │ │ +001beee0: 6f62 654d 6174 6368 6573 5479 7065 202a obeMatchesType * │ │ │ │ +001beef0: 5072 6f62 654d 6174 6368 6573 293c 2f64 ProbeMatches).
    .
    const< │ │ │ │ +001bf020: 2f73 7061 6e3e 203c 7370 616e 2063 6c61 /span> char *Me │ │ │ │ +001bf050: 7373 6167 6549 442c 203c 2f64 6976 3e0a ssageID,
    . │ │ │ │ +001bf060: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c │ │ │ │ +001bf0b0: 6861 723c 2f73 7061 6e3e 202a 5265 706c har *Repl │ │ │ │ +001bf0c0: 7954 6f2c 203c 2f64 6976 3e0a 3c64 6976 yTo,
    .
    const │ │ │ │ +001bf100: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001bf120: 2f73 7061 6e3e 202a 456e 6470 6f69 6e74 /span> *Endpoint │ │ │ │ +001bf130: 5265 6665 7265 6e63 652c 203c 2f64 6976 Reference,
    .
    struct │ │ │ │ +001bf170: 3c2f 7370 616e 3e20 7773 6464 5f5f 5265 wsdd__Re │ │ │ │ +001bf180: 736f 6c76 654d 6174 6368 6573 5479 7065 solveMatchesType │ │ │ │ +001bf190: 202a 5265 736f 6c76 654d 6174 6368 6573 *ResolveMatches │ │ │ │ +001bf1a0: 293c 2f64 6976 3e0a 3c2f 6469 763e 3c21 )
    .
    < │ │ │ │ +001bf1c0: 6469 7620 636c 6173 733d 2266 7261 676d div class="fragm │ │ │ │ +001bf1d0: 656e 7422 3e3c 6469 7620 636c 6173 733d ent">
    void wsd │ │ │ │ +001bf210: 645f 6576 656e 745f 5265 736f 6c76 654d d_event_ResolveM │ │ │ │ +001bf220: 6174 6368 6573 283c 7370 616e 2063 6c61 atches(str │ │ │ │ +001bf240: 7563 743c 2f73 7061 6e3e 203c 6120 636c uct soap *soap, .
    │ │ │ │ +001bf2e0: 756e 7369 676e 6564 3c2f 7370 616e 3e20 unsigned │ │ │ │ +001bf2f0: 3c73 7061 6e20 636c 6173 733d 226b 6579 int InstanceId, │ │ │ │ +001bf320: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    │ │ │ │ +001bf350: 636f 6e73 743c 2f73 7061 6e3e 203c 7370 const char *SequenceId, │ │ │ │ +001bf390: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    unsigned int │ │ │ │ +001bf3f0: 3c2f 7370 616e 3e20 4d65 7373 6167 654e MessageN │ │ │ │ +001bf400: 756d 6265 722c 203c 2f64 6976 3e0a 3c64 umber,
    . │ │ │ │ +001bf420: 3c73 7061 6e20 636c 6173 733d 226b 6579 const cha │ │ │ │ +001bf460: 723c 2f73 7061 6e3e 202a 4d65 7373 6167 r *Messag │ │ │ │ +001bf470: 6549 442c 203c 2f64 6976 3e0a 3c64 6976 eID,
    .
    const │ │ │ │ +001bf4b0: 203c 7370 616e 2063 6c61 7373 3d22 6b65 char< │ │ │ │ +001bf4d0: 2f73 7061 6e3e 202a 5265 6c61 7465 7354 /span> *RelatesT │ │ │ │ +001bf4e0: 6f2c 203c 2f64 6976 3e0a 3c64 6976 2063 o,
    .
    const < │ │ │ │ +001bf520: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001bf530: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *EndpointRe │ │ │ │ +001bf550: 6665 7265 6e63 652c 203c 2f64 6976 3e0a ference,
    . │ │ │ │ +001bf560: 3c64 6976 2063 6c61 7373 3d22 6c69 6e65
    const c │ │ │ │ +001bf5b0: 6861 723c 2f73 7061 6e3e 202a 5479 7065 har *Type │ │ │ │ +001bf5c0: 732c 203c 2f64 6976 3e0a 3c64 6976 2063 s,
    .
    const < │ │ │ │ +001bf600: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001bf610: 6f72 6474 7970 6522 3e63 6861 723c 2f73 ordtype">char *Scopes, .
    con │ │ │ │ +001bf660: 7374 3c2f 7370 616e 3e20 3c73 7061 6e20 st char │ │ │ │ +001bf690: 2a4d 6174 6368 4279 2c20 3c2f 6469 763e *MatchBy,
    │ │ │ │ +001bf6a0: 0a3c 6469 7620 636c 6173 733d 226c 696e .
    const │ │ │ │ +001bf6f0: 6368 6172 3c2f 7370 616e 3e20 2a58 4164 char *XAd │ │ │ │ +001bf700: 6472 732c 203c 2f64 6976 3e0a 3c64 6976 drs,
    .
    unsigned │ │ │ │ +001bf740: 3c2f 7370 616e 3e20 3c73 7061 6e20 636c int Met │ │ │ │ +001bf770: 6164 6174 6156 6572 7369 6f6e 293c 2f64 adataVersion).

    Th │ │ │ │ +001bf7a0: 6573 6520 6576 656e 7420 6861 6e64 6c65 ese event handle │ │ │ │ +001bf7b0: 7273 2077 696c 6c20 6265 2069 6e76 6f6b rs will be invok │ │ │ │ +001bf7c0: 6564 2077 6865 6e20 696e 626f 756e 6420 ed when inbound │ │ │ │ +001bf7d0: 5753 2d44 6973 636f 7665 7279 206d 6573 WS-Discovery mes │ │ │ │ +001bf7e0: 7361 6765 7320 6172 7269 7665 2075 7369 sages arrive usi │ │ │ │ +001bf7f0: 6e67 3a3c 2f70 3e0a 3c64 6976 2063 6c61 ng:

    .
    │ │ │ │ +001bf820: 3c73 7061 6e20 636c 6173 733d 226b 6579 if (!soap_val │ │ │ │ +001bf8a0: 6964 5f73 6f63 6b65 743c 2f61 3e28 3c61 id_socket(so │ │ │ │ +001bf900: 6170 5f62 696e 643c 2f61 3e28 3c61 2063 ap_bind(soap, NUL │ │ │ │ +001bf940: 4c2c 203c 6120 636c 6173 733d 2263 6f64 L, port │ │ │ │ +001bf990: 3c2f 613e 2c20 4241 434b 4c4f 4729 2929 , BACKLOG))) │ │ │ │ +001bf9a0: 203c 2f64 6976 3e0a 3c64 6976 2063 6c61
    .
    ... │ │ │ │ +001bf9c0: 3c73 7061 6e20 636c 6173 733d 2263 6f6d // error < │ │ │ │ +001bf9e0: 2f73 7061 6e3e 3c2f 6469 763e 0a3c 6469 /span>
    .< │ │ │ │ +001bfa00: 7370 616e 2063 6c61 7373 3d22 6b65 7977 span class="keyw │ │ │ │ +001bfa10: 6f72 6466 6c6f 7722 3e69 663c 2f73 7061 ordflow">if
    (soap_wsdd_li │ │ │ │ +001bfa30: 7374 656e 283c 6120 636c 6173 733d 2263 sten(soap │ │ │ │ +001bfa60: 3c2f 613e 2c20 7469 6d65 6f75 7429 2920 , timeout)) │ │ │ │ +001bfa70: 3c2f 6469 763e 0a3c 6469 7620 636c 6173
    .
    ... < │ │ │ │ +001bfa90: 7370 616e 2063 6c61 7373 3d22 636f 6d6d span class="comm │ │ │ │ +001bfaa0: 656e 7422 3e2f 2f20 6572 726f 723c 2f73 ent">// error
    .
    ..
    . │ │ │ │ +001bfd10: 3c68 7220 636c 6173 733d 2266 6f6f 7465
    .
    .Cop │ │ │ │ +001bfd40: 7972 6967 6874 2028 4329 2032 3032 312c yright (C) 2021, │ │ │ │ +001bfd50: 2052 6f62 6572 7420 7661 6e20 456e 6765 Robert van Enge │ │ │ │ +001bfd60: 6c65 6e2c 2047 656e 6976 6961 2049 6e63 len, Genivia Inc │ │ │ │ +001bfd70: 2e2c 2041 6c6c 2052 6967 6874 7320 5265 ., All Rights Re │ │ │ │ +001bfd80: 7365 7276 6564 2e0a 3c2f 6164 6472 6573 served...
    .Converted on │ │ │ │ +001bfdc0: 4d6f 6e20 4d61 7220 3820 3230 3231 2031 Mon Mar 8 2021 1 │ │ │ │ +001bfdd0: 333a 3036 3a32 3320 6279 203c 6120 7461 3:06:23 by Doxygen 1.9.1 │ │ │ │ +001bfe30: 3c2f 6164 6472 6573 733e 0a3c 6272 3e0a
    .
    . │ │ │ │ +001bfe40: 3c64 6976 2073 7479 6c65 3d22 6865 6967
    ...

    The │ │ │ │ -001bc9b0: 2070 6c75 6769 6e20 636f 6465 2069 7320 plugin code is │ │ │ │ -001bc9c0: 6c6f 6361 7465 6420 696e 2074 6865 203c located in the < │ │ │ │ -001bc9d0: 656d 3e3c 636f 6465 3e67 736f 6170 2f70 em>gsoap/p │ │ │ │ -001bc9e0: 6c75 6769 6e3c 2f63 6f64 653e 3c2f 656d lugin directory cont │ │ │ │ -001bca00: 6169 6e69 6e67 203c 656d 3e3c 636f 6465 aining sessions.h and │ │ │ │ -001bca30: 3c63 6f64 653e 7365 7373 696f 6e73 2e63 sessions.c │ │ │ │ -001bca40: 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c 2f70 .

    .

    For more de │ │ │ │ -001bca60: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the < │ │ │ │ -001bca70: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 7365 a href="../../se │ │ │ │ -001bca80: 7373 696f 6e73 2f68 746d 6c2f 696e 6465 ssions/html/inde │ │ │ │ -001bca90: 782e 6874 6d6c 223e 4854 5450 2073 6573 x.html">HTTP ses │ │ │ │ -001bcaa0: 7369 6f6e 7320 706c 7567 696e 3c2f 613e sions plugin │ │ │ │ -001bcab0: 2064 6f63 756d 656e 7461 7469 6f6e 2e3c documentation.< │ │ │ │ -001bcac0: 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 2068 /p>.

    .... Back to │ │ │ │ -001bcae0: 7461 626c 6520 6f66 2063 6f6e 7465 6e74 table of content │ │ │ │ -001bcaf0: 733c 2f61 3e3c 2f70 3e0a 3c68 333e 3c61 s

    .

    .The Apach │ │ │ │ -001bcb30: 6520 6d6f 6475 6c65 2070 6c75 6769 6e3c e module plugin< │ │ │ │ -001bcb40: 2f68 333e 0a3c 703e 5468 6520 706c 7567 /h3>.

    The plug │ │ │ │ -001bcb50: 696e 2063 6f64 6520 6973 206c 6f63 6174 in code is locat │ │ │ │ -001bcb60: 6564 2069 6e20 7468 6520 3c65 6d3e 3c63 ed in the gsoap/mod_gs │ │ │ │ -001bcb80: 6f61 702f 6d6f 645f 6773 6f61 702d 302e oap/mod_gsoap-0. │ │ │ │ -001bcb90: 392f 6170 6163 6865 5f32 303c 2f63 6f64 9/apache_20 director │ │ │ │ -001bcbb0: 792e 3c2f 703e 0a3c 703e 466f 7220 6d6f y.

    .

    For mo │ │ │ │ -001bcbc0: 7265 2064 6574 6169 6c73 2c20 7365 6520 re details, see │ │ │ │ -001bcbd0: 7468 6520 3c61 2068 7265 663d 222e 2e2f the Apach │ │ │ │ -001bcc00: 6520 6d6f 6475 6c65 3c2f 613e 2064 6f63 e module doc │ │ │ │ -001bcc10: 756d 656e 7461 7469 6f6e 2e3c 2f70 3e0a umentation.

    . │ │ │ │ -001bcc20: 3c70 3ef0 9f94 9d20 3c61 2068 7265 663d

    .... Back to tabl │ │ │ │ -001bcc40: 6520 6f66 2063 6f6e 7465 6e74 733c 2f61 e of contents

    .

    .The ISAPI exte │ │ │ │ -001bcc90: 6e73 696f 6e20 706c 7567 696e 3c2f 6833 nsion plugin

    .

    The plugin │ │ │ │ -001bccb0: 636f 6465 2069 7320 6c6f 6361 7465 6420 code is located │ │ │ │ -001bccc0: 696e 2074 6865 203c 656d 3e3c 636f 6465 in the gsoap/mod_gsoap │ │ │ │ -001bcce0: 2f67 736f 6170 5f77 696e 2f69 7361 7069 /gsoap_win/isapi │ │ │ │ -001bccf0: 3c2f 636f 6465 3e3c 2f65 6d3e 2064 6972 dir │ │ │ │ -001bcd00: 6563 746f 7279 2e3c 2f70 3e0a 3c70 3e46 ectory.

    .

    F │ │ │ │ -001bcd10: 6f72 206d 6f72 6520 6465 7461 696c 732c or more details, │ │ │ │ -001bcd20: 2073 6565 2074 6865 203c 6120 6872 6566 see the I │ │ │ │ -001bcd50: 5341 5049 2065 7874 656e 7369 6f6e 3c2f SAPI extension documentation │ │ │ │ -001bcd70: 2e3c 2f70 3e0a 3c70 3ef0 9f94 9d20 3c61 .

    .

    .... Back t │ │ │ │ -001bcd90: 6f20 7461 626c 6520 6f66 2063 6f6e 7465 o table of conte │ │ │ │ -001bcda0: 6e74 733c 2f61 3e3c 2f70 3e0a 3c68 333e nts

    .

    │ │ │ │ -001bcdb0: 3c61 2063 6c61 7373 3d22 616e 6368 6f72 .The CURL │ │ │ │ -001bcde0: 706c 7567 696e 3c2f 6833 3e0a 3c70 3e54 plugin

    .

    T │ │ │ │ -001bcdf0: 6865 2070 6c75 6769 6e20 636f 6465 2069 he plugin code i │ │ │ │ -001bce00: 7320 6c6f 6361 7465 6420 696e 2074 6865 s located in the │ │ │ │ -001bce10: 203c 656d 3e3c 636f 6465 3e67 736f 6170 gsoap │ │ │ │ -001bce20: 2f70 6c75 6769 6e3c 2f63 6f64 653e 3c2f /plugin directory co │ │ │ │ -001bce40: 6e74 6169 6e69 6e67 203c 656d 3e3c 636f ntaining curlapi.h and curlapi.c │ │ │ │ -001bce80: 3c2f 636f 6465 3e3c 2f65 6d3e 2e3c 2f70 .

    .

    For more de │ │ │ │ -001bcea0: 7461 696c 732c 2073 6565 2074 6865 203c tails, see the < │ │ │ │ -001bceb0: 6120 6872 6566 3d22 2e2e 2f2e 2e2f 6375 a href="../../cu │ │ │ │ -001bcec0: 726c 2f68 746d 6c2f 696e 6465 782e 6874 rl/html/index.ht │ │ │ │ -001bced0: 6d6c 223e 4355 524c 2070 6c75 6769 6e3c ml">CURL plugin< │ │ │ │ -001bcee0: 2f61 3e20 646f 6375 6d65 6e74 6174 696f /a> documentatio │ │ │ │ -001bcef0: 6e2e 3c2f 703e 0a3c 703e f09f 949d 203c n.

    .

    .... < │ │ │ │ -001bcf00: 6120 6872 6566 3d22 2322 3e42 6163 6b20 a href="#">Back │ │ │ │ -001bcf10: 746f 2074 6162 6c65 206f 6620 636f 6e74 to table of cont │ │ │ │ -001bcf20: 656e 7473 3c2f 613e 3c2f 703e 0a3c 6833 ents

    .

    .The W │ │ │ │ -001bcf60: 696e 496e 6574 2070 6c75 6769 6e3c 2f68 inInet plugin.

    The plugin │ │ │ │ -001bcf80: 2063 6f64 6520 6973 206c 6f63 6174 6564 code is located │ │ │ │ -001bcf90: 2069 6e20 7468 6520 3c65 6d3e 3c63 6f64 in the gsoap/mod_gsoa │ │ │ │ -001bcfb0: 702f 6773 6f61 705f 7769 6e2f 7769 6e69 p/gsoap_win/wini │ │ │ │ -001bcfc0: 6e65 743c 2f63 6f64 653e 3c2f 656d 3e20 net │ │ │ │ -001bcfd0: 6469 7265 6374 6f72 792e 3c2f 703e 0a3c directory.

    .< │ │ │ │ -001bcfe0: 703e 466f 7220 6d6f 7265 2064 6574 6169 p>For more detai │ │ │ │ -001bcff0: 6c73 2c20 7365 6520 7468 6520 3c61 2068 ls, see the WinInet plug │ │ │ │ -001bd030: 696e 3c2f 613e 2064 6f63 756d 656e 7461 in documenta │ │ │ │ -001bd040: 7469 6f6e 2e3c 2f70 3e0a 3c70 3ef0 9f94 tion.

    .

    ... │ │ │ │ -001bd050: 9d20 3c61 2068 7265 663d 2223 223e 4261 . Ba │ │ │ │ -001bd060: 636b 2074 6f20 7461 626c 6520 6f66 2063 ck to table of c │ │ │ │ -001bd070: 6f6e 7465 6e74 733c 2f61 3e3c 2f70 3e0a ontents

    . │ │ │ │ -001bd080: 3c68 333e 3c61 2063 6c61 7373 3d22 616e

    .The WS │ │ │ │ -001bd0b0: 2d41 6464 7265 7373 696e 6720 706c 7567 -Addressing plug │ │ │ │ -001bd0c0: 696e 3c2f 6833 3e0a 3c70 3e54 6865 2070 in

    .